:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: #111;
  background: #fff;
  --text: #111;
  --muted: #626262;
  --quiet: #767676;
  --line: #dedede;
  --surface: #f6f6f6;
  --sidebar: 232px;
  --focus: #222;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-weight: 500; }
button, input, textarea, select { font: inherit; }
input, textarea, select { font-weight: 500; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
input, textarea, select { width: 100%; min-width: 0; color: var(--text); background: #fff; border: 1px solid #dedede; border-radius: 8px; padding: 9px 12px; line-height: 1.6; transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover, select:hover { border-color: #bdbdbd; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #878787; box-shadow: 0 0 0 2px #ededed; }
input::placeholder, textarea::placeholder { color: #969696; }
input:disabled { background: #f8f8f8; color: #a0a0a0; border-color: #eee; }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; accent-color: #111; flex-shrink: 0; }
textarea { resize: vertical; min-height: 80px; }
select { padding-right: 28px; }
h1, h2, h3, p { margin: 0; }
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle; fill: currentColor; }
button .icon, button span { pointer-events: none; }
[hidden] { display: none !important; }

/* Navigation: one quiet surface, with a single selected item. */
.sidebar { width: var(--sidebar); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #f7f7f7; border-right: 1px solid #eaeaea; padding: 22px 12px 0; z-index: 10; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px; min-height: 42px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .025em; }
.brand-name>span { display: block; font-size: 11px; font-weight: 400; color: #838383; letter-spacing: 0; margin-top: 4px; }
.brand-short { display: none; font-size: 18px; font-weight: 600; }
.nav-caption { margin: 30px 12px 9px; color: #919191; font-size: 11px; }
.nav-link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; margin: 2px 0; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: 13px; font-weight: 600; color: #333; }
.nav-link:hover { background: #efefef; }
.nav-link.active { color: #111; background: #e5e5e5; font-weight: 600; }
.nav-link .icon { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; }
.phone-summary { padding: 24px 12px; display: flex; gap: 11px; align-items: center; color: #797979; }
.phone-summary .icon { width: 17px; height: 17px; }
.phone-summary span { font-size: 11px; }
.phone-summary strong { display: block; color: #333; font-size: 12px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.user { padding: 18px 10px; display: flex; gap: 10px; align-items: center; border-top: 1px solid #e7e7e7; font-size: 13px; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: #272727; color: #fff; font-size: 12px; }
.user small { display: block; color: #8a8a8a; font-size: 10px; margin-top: 5px; }
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 40px; min-height: 96px; }
.title-row { display: flex; align-items: center; gap: 13px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.35; }
.badge { display: inline-flex; align-items: center; background: #f3f3f3; border: 1px solid #ebebeb; border-radius: 5px; padding: 3px 7px; font-size: 11px; color: #777; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dedede; border-radius: 8px; background: #fff; padding: 10px 14px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover { background: #f6f6f6; border-color: #c9c9c9; }
.button .icon { width: 17px; height: 17px; }
.button.primary { background: #202020; border-color: #111; color: #fff; }
.button.primary:hover { background: #404040; border-color: #404040; }
.button.small { font-size: 12px; padding: 7px 11px; }
.button.small .icon { width: 16px; height: 16px; }
.button.danger { border-color: transparent; background: transparent; color: #868686; }
.button.danger:hover { color: #b33636; background: #fdf2f2; }
.button.destructive { background: #b43b3b; border-color: #b43b3b; color: #fff; }
.icon-button { width: 30px; height: 30px; background: transparent; border: 0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #777; padding: 4px; }
.icon-button:hover { color: #222; background: #ececec; }
.icon-button .icon { width: 18px; height: 18px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 4px 0; color: #757575; font-size: 12px; }
.text-button:hover { color: #111; }
.text-button .icon { width: 14px; height: 14px; }
.save-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #828282; white-space: nowrap; }
.save-status .icon { width: 15px; height: 15px; color: #858585; }
.save-status.error { color: #b14737; }
.saving-dot { width: 5px; height: 5px; border-radius: 50%; background: #9c9c9c; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.content { margin: 0 40px; flex: 1; min-height: 0; }
.page-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 40px; min-height: 43px; color: #8b8b8b; font-size: 11px; }
.page-footer>span { display: flex; align-items: center; gap: 6px; }
.page-footer .icon { width: 14px; height: 14px; }

/* Flow editor. Panels are part of the workspace, not nested cards. */
.flow-page { height: 100dvh; }
.flow-page .page-header, .flow-page .page-footer { flex-shrink: 0; }
.flow-content { margin: 0; flex: 1; min-height: 490px; }
.flow-panel { height: 100%; width: 100%; display: flex; flex-direction: column; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 61px; min-height: 61px; padding: 0 28px 0 36px; border-bottom: 1px solid var(--line); }
.flow-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.flow-title>.icon { width: 18px; height: 18px; color: #777; }
.flow-title input { width: 195px; padding: 5px 6px; border: 1px solid transparent; font-size: 13px; font-weight: 600; background: transparent; }
.flow-title input:hover { border-color: #ddd; }
.subtle { color: #8a8a8a; font-size: 11px; white-space: nowrap; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }
.toolbar-actions .button:first-child { border-color: transparent; }
.toolbar-actions .button:first-child:hover { background: #f5f5f5; }
.editor { display: flex; min-height: 0; flex: 1; position: relative; }
.canvas-area { flex: 1; position: relative; min-width: 0; overflow: hidden; background-color: #fafafa; background-image: radial-gradient(#dedede .7px, transparent .7px); background-size: 20px 20px; }
.graph-scroll { position: absolute; inset: 0; overflow: auto; padding: 28px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d3d3d3 transparent; }
#graph-space { margin: 0 auto; }
#graph-stage { position: relative; transform-origin: 0 0; }
#wires { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.wire path { stroke: #c7c7c7; stroke-width: 1.4; fill: none; }
.wire.active path { stroke: #525252; stroke-width: 1.8; }
.wire text { font-size: 11px; fill: #656565; paint-order: stroke; stroke: #fafafa; stroke-width: 5px; stroke-linejoin: round; }
.flow-node { position: absolute; width: 228px; height: 126px; border: 1px solid #d0d0d0; border-radius: 9px; background: #fff; box-shadow: 0 2px 3px #00000003; transition: border-color .15s, box-shadow .15s; }
.flow-node:hover { border-color: #b7b7b7; }
.flow-node.selected { border-color: #222; box-shadow: 0 0 0 1px #222, 0 4px 12px #00000005; }
.flow-node.traced { border-color: #5d8d79; box-shadow: 0 0 0 2px #bed8cc; }
.flow-node.connect-target:hover { border-color: #343434; box-shadow: 0 0 0 3px #e1e1e1; }
.node-body { width: 100%; height: 97px; display: block; border: 0; border-radius: 9px 9px 0 0; background: transparent; padding: 12px 14px 8px; text-align: left; cursor: grab; touch-action: none; }
.node-body:active { cursor: grabbing; }
.node-top { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.type-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 5px; flex-shrink: 0; background: #f4f4f4; color: #6c6c6c; }
.type-icon .icon { width: 16px; height: 16px; }
.type-icon.purple { background: #f2effa; color: #8a72bb; }
.type-icon.green { background: #f0f5f2; color: #6a8a77; }
.type-icon.large { width: 34px; height: 34px; border-radius: 7px; }
.type-icon.large .icon { width: 21px; height: 21px; }
.node-type { color: #626262; font-size: 12px; font-weight: 500; }
.node-index { margin-left: auto; color: #aaa; font-size: 10px; font-variant-numeric: tabular-nums; }
.node-body>strong { display: block; font-weight: 600; color: #111; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.node-body>p { margin-top: 6px; color: #686868; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.node-bottom { height: 28px; padding: 5px 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f0f0; color: #727272; font-size: 10px; }
.node-bottom button { background: transparent; border: 0; padding: 0; font-size: 10px; color: #777; }
.node-bottom button .icon, .node-bottom>.icon { width: 12px; height: 12px; }
.zoom-tools { position: absolute; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid #e3e3e3; border-radius: 8px; background: #fff; box-shadow: 0 2px 4px #00000003; }
.zoom-tools>span { min-width: 38px; text-align: center; font-size: 11px; color: #737373; font-variant-numeric: tabular-nums; }
.zoom-tools>i { height: 16px; border-left: 1px solid #e8e8e8; margin: 0 3px; }
.inspector { flex-shrink: 0; width: 316px; background: #fff; border-left: 1px solid var(--line); overflow: auto; scrollbar-width: thin; scrollbar-color: #dedede transparent; }
.inspector-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fff; color: #333; font-size: 12px; }
.inspector-intro { display: flex; align-items: center; gap: 10px; padding: 23px 22px; }
.inspector-intro h2 { font-size: 14px; font-weight: 600; }
.inspector-form { padding: 0 22px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field>span { color: #222; font-size: 13px; font-weight: 600; }
.field small, .field-help { font-size: 12px; line-height: 1.8; color: #868686; font-weight: 400; }
.inspector .field>span { font-size: 12px; }
.inspector input, .inspector textarea, .inspector select { font-size: 12px; padding: 9px 10px; }
.inspector .field small, .inspector .field-help { font-size: 11px; }
.info-box { margin: 12px 0 22px; padding: 12px 14px; border-radius: 7px; background: #f7f7f7; font-size: 12px; line-height: 1.8; color: #777; }
.info-box strong { color: #222; font-weight: 600; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; margin: 26px 0 18px; border-top: 1px solid var(--line); }
.section-heading h3 { font-size: 12px; font-weight: 600; }
.section-heading>span { color: #919191; font-size: 11px; }
.connection-row { margin-bottom: 15px; }
.connection-row>div { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.connection-row label { color: #444; font-size: 12px; min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.port-pick { border: 0; background: transparent; padding: 3px 5px; border-radius: 4px; color: #989898; }
.port-pick:hover, .port-pick.active { background: #efefef; color: #333; }
.port-pick .icon { width: 15px; height: 15px; }
.inspector-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; margin-top: 25px; border-top: 1px solid var(--line); }
.inline-link { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; color: #5a5a5a; font-size: 12px; background: transparent; }
.inline-link:hover { color: #111; }
.inline-link .icon { width: 14px; height: 14px; }
.palette { position: absolute; top: 16px; left: 18px; z-index: 4; width: 298px; max-height: calc(100% - 82px); overflow: auto; background: #fff; border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 8px 30px #0000000f; padding: 16px 12px; }
.section-title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; padding-left: 8px; }
.palette-item { min-height: 44px; display: flex; align-items: center; gap: 11px; text-align: left; width: 100%; padding: 10px 8px; border: 0; background: transparent; border-radius: 7px; }
.palette-item:hover { background: #f6f6f6; }
.palette-item>span:nth-child(2) { flex: 1; }
.palette-item strong { display: block; font-weight: 600; font-size: 13px; }
.palette-item>.icon { width: 14px; height: 14px; color: #a0a0a0; }
.connection-banner { position: absolute; z-index: 5; top: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); background: #242424; color: #fff; padding: 11px 14px; border-radius: 8px; font-size: 12px; box-shadow: 0 4px 16px #0001; }
.connection-banner .icon { width: 16px; height: 16px; }
.connection-banner .text-button { margin-left: 8px; color: #ccc; font-size: 11px; }
.validation-result { position: absolute; bottom: 74px; left: 24px; right: 24px; z-index: 3; max-height: 235px; overflow: auto; background: #fff; border: 1px solid #d0d0d0; border-radius: 9px; padding: 14px 18px; box-shadow: 0 5px 25px #0000000c; }
.validation-result>div { display: flex; justify-content: space-between; align-items: center; }
.validation-result strong { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.validation-result strong .icon { width: 17px; height: 17px; }
.validation-result p { font-size: 12px; color: #7d7d7d; margin-top: 6px; }
.validation-result ul { margin-bottom: 0; padding-left: 17px; font-size: 12px; line-height: 1.9; color: #8a6539; }
.validation-result li button { background: transparent; border: 0; text-align: left; padding: 3px 0; font-size: 12px; color: #8a6539; }
.validation-result li button:hover { text-decoration: underline; }

/* Knowledge: a simple list and a readable editing surface. */
.collection-layout { display: grid; grid-template-columns: 268px minmax(0,1fr); border-top: 1px solid var(--line); min-height: calc(100vh - 140px); }
.collection-sidebar { border-right: 1px solid var(--line); padding: 26px 18px 26px 0; }
.collection-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; margin: 0 10px 20px; }
.collection-title>span { color: #8a8a8a; font-weight: 400; font-size: 11px; }
.search-box { display: flex; align-items: center; gap: 7px; border: 1px solid #e2e2e2; border-radius: 7px; padding: 0 10px; margin: 0 2px 20px; }
.search-box .icon { color: #969696; width: 17px; height: 17px; }
.search-box input { padding: 9px 0; background: transparent; border: 0; font-size: 12px; box-shadow: none; }
.search-box:focus-within { border-color: #999; }
.collection-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 7px; padding: 14px 10px; margin: 2px 0; }
.collection-item:hover { background: #f7f7f7; }
.collection-item.active { background: #f0f0f0; }
.collection-item>span:nth-child(2) { min-width: 0; flex: 1; }
.collection-item strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; }
.collection-item small { display: block; margin-top: 6px; font-size: 11px; color: #686868; line-height: 1.5; }
.collection-item>.icon { width: 13px; height: 13px; color: #a0a0a0; }
.service-avatar { display: grid; place-items: center; width: 24px; height: 28px; color: #717171; flex-shrink: 0; }
.service-avatar .icon { width: 19px; height: 19px; }
.detail-panel { padding: 30px 40px 38px; width: 100%; max-width: 900px; margin: 0 auto; min-width: 0; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.detail-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; line-height: 1.5; word-break: break-word; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
.form-grid .field { margin-bottom: 26px; }
.form-grid input, .form-grid textarea, .form-grid select { font-size: 14px; }
.span-2 { grid-column: 1/-1; }
.related-faq { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding-top: 25px; margin-top: 5px; }
.related-faq h3 { font-size: 14px; font-weight: 600; display: inline; margin-right: 8px; }
.faq-layout { grid-template-columns: 292px minmax(0,1fr); }
.filter { margin: 0 2px 14px; }
.filter>span { display: none; }
.filter select { font-size: 12px; }
.faq-item { align-items: flex-start; }
.question-mark { color: #868686; padding-top: 2px; }
.question-mark .icon { width: 19px; height: 19px; }
.tiny-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #688d78; margin-right: 4px; vertical-align: middle; }
.tiny-dot.off { background: #b6b6b6; }
.detail-actions { display: flex; align-items: center; gap: 14px; }
.switch-label { position: relative; display: inline-flex; align-items: center; gap: 9px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; width: 30px; height: 18px; }
.switch { position: relative; width: 30px; height: 18px; border-radius: 12px; background: #d4d4d4; display: inline-block; flex-shrink: 0; pointer-events: none; }
.switch:after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-label input:checked+.switch { background: #242424; }
.switch-label input:checked+.switch:after { transform: translateX(12px); }
.switch-label input:focus-visible+.switch { outline: 2px solid #555; outline-offset: 3px; }
.empty { padding: 65px 24px; text-align: center; color: #8c8c8c; font-size: 13px; line-height: 1.9; }
.empty>.icon { width: 33px; height: 33px; color: #a5a5a5; margin-bottom: 18px; }
.empty h3 { font-size: 15px; color: #666; font-weight: 600; margin-bottom: 10px; }
.empty p { font-size: 12px; max-width: 330px; margin: 0 auto; }
.empty.compact { padding: 30px 12px; font-size: 12px; }
.hours-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 55px; border-top: 1px solid var(--line); padding-top: 30px; align-items: start; }
.settings-card { padding: 0; min-width: 0; }
.settings-card .detail-heading { margin-bottom: 16px; }
.setting-priority { color: #626262; font-size: 11px; margin: -7px 0 16px; }
.settings-card h2 { font-size: 18px; }
.muted { color: #7e7e7e; font-size: 12px; line-height: 1.9; margin-bottom: 20px; }
.schedule-row { display: flex; align-items: center; gap: 18px; padding: 19px 0; border-bottom: 1px solid #eee; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row .switch-label { min-width: 95px; font-size: 13px; }
.time-range { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #999; }
.time-range input { width: 112px; padding: 7px 9px; font-size: 13px; }
.schedule-status { color: #999; font-size: 11px; margin-left: auto; white-space: nowrap; }
.exception-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid #eee; }
.exception-row>input { width: 165px; font-size: 12px; }
.exception-row>label { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.exception-row>button { margin-left: auto; }
.exception-row .time-range { width: 100%; }

/* Dialogs and transient feedback. */
dialog { max-width: calc(100vw - 36px); max-height: calc(100vh - 48px); padding: 28px; border: 1px solid #e0e0e0; border-radius: 13px; background: #fff; color: #111; box-shadow: 0 24px 90px #0002; }
dialog::backdrop { background: #0005; backdrop-filter: blur(2px); }
.confirm-dialog { width: 460px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.dialog-heading h2 { font-size: 20px; font-weight: 600; }
.dialog-heading p { font-size: 12px; color: #777; line-height: 1.8; margin-top: 10px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.confirm-copy { color: #666; font-size: 13px; line-height: 1.9; }
.test-dialog { width: 980px; }
.test-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 30px; }
.test-layout form { padding-right: 26px; border-right: 1px solid var(--line); }
.test-layout input, .test-layout select { font-size: 12px; }
.test-layout .field { margin-bottom: 17px; }
.test-layout .field small { font-size: 11px; }
.test-layout .button[type=submit] { width: 100%; margin-top: 16px; }
.check-row { display: flex; align-items: center; gap: 8px; color: #444; font-size: 12px; line-height: 1.7; margin: 10px 0; }
.test-disclaimer { color: #8a8a8a; font-size: 11px; line-height: 1.9; margin-top: 15px; }
#test-result { max-height: 66vh; overflow: auto; padding-right: 8px; }
.test-summary { display: flex; align-items: center; gap: 11px; padding: 17px; background: #f6f6f6; border-radius: 8px; }
.test-summary strong { font-size: 14px; font-weight: 600; }
.test-summary p { color: #888; font-size: 12px; margin-top: 6px; }
.trace-list { padding: 0; margin: 25px 0 0; list-style: none; }
.trace-list li { display: flex; gap: 15px; padding-bottom: 27px; position: relative; }
.trace-list li:before { content: ""; position: absolute; top: 27px; left: 12px; bottom: 0; border-left: 1px solid #e3e3e3; }
.trace-list li:last-child:before { display: none; }
.trace-number { flex-shrink: 0; width: 25px; height: 25px; display: grid; place-items: center; background: #f2f2f2; border-radius: 50%; color: #888; font-size: 11px; }
.trace-list strong { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }
.trace-list p { font-size: 12px; line-height: 1.9; margin-top: 8px; color: #777; white-space: pre-wrap; word-break: break-word; }
.trace-outcome { display: inline-flex; align-items: center; gap: 8px; color: #888; font-size: 11px; margin-top: 9px; }
.trace-outcome .icon { width: 13px; height: 13px; }
.error-box { background: #fff6ec; border: 1px solid #efddc8; color: #966d40; font-size: 12px; line-height: 1.8; border-radius: 7px; padding: 13px; margin-top: 15px; }
.loading, .load-error { text-align: center; padding: 15vh 30px; color: #777; }
.load-error h1 { font-size: 22px; margin: 15px; }
.load-error p { margin-bottom: 20px; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%,12px); max-width: 85vw; background: #272727; color: #fff; padding: 12px 18px; font-size: 12px; line-height: 1.7; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s,transform .15s; box-shadow: 0 4px 18px #0001; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }

/* Compact navigation and responsive editing panels. */
.sidebar-collapsed { --sidebar: 64px; }
.sidebar-collapsed .sidebar { padding-left: 8px; padding-right: 8px; }
.sidebar-collapsed .sidebar-heading { flex-direction: column; gap: 12px; padding: 0; }
.sidebar-collapsed .brand-short { display: inline; }
.sidebar-collapsed .brand-name, .sidebar-collapsed .nav-caption, .sidebar-collapsed .nav-link span, .sidebar-collapsed .phone-summary, .sidebar-collapsed .user>div { display: none; }
.sidebar-collapsed nav { margin-top: 24px; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 12px; }
.sidebar-collapsed .user { justify-content: center; padding: 18px 0; }
@media (max-width:1350px) {
  :root { --sidebar: 205px; }
  .page-header { padding-left: 30px; padding-right: 30px; }
  .content { margin-left: 30px; margin-right: 30px; }
  .flow-content { margin: 0; }
  .flow-toolbar { padding-left: 24px; padding-right: 20px; }
  .page-footer { padding-left: 25px; padding-right: 25px; }
  .header-actions { gap: 14px; }
  .flow-title input { width: 180px; }
  .inspector { width: 295px; }
  .collection-layout { grid-template-columns: 235px minmax(0,1fr); }
  .faq-layout { grid-template-columns: 255px minmax(0,1fr); }
  .detail-panel { padding: 28px; }
  .hours-layout { gap: 30px; }
  .schedule-status { display: none; }
  .time-range input { width: 102px; }
}
@media (max-width:1100px) {
  .inspector { position: absolute; z-index: 3; right: 15px; top: 15px; bottom: 75px; width: 305px; border: 1px solid #dedede; border-radius: 10px; box-shadow: 0 8px 32px #0000000a; }
  .save-status { font-size: 11px; }
  .flow-title .subtle { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hours-layout { grid-template-columns: 1fr; max-width: 760px; gap: 35px; }
  .settings-card+.settings-card { border-top: 1px solid var(--line); padding-top: 28px; }
}
@media (max-width:900px) {
  :root { --sidebar: 64px; }
  .sidebar { padding: 20px 8px 0; }
  .sidebar-heading { justify-content: center; padding: 0; }
  .brand-short { display: inline; }
  .brand-name, .sidebar-toggle, .nav-caption, .nav-link span, .phone-summary, .user>div { display: none; }
  .sidebar nav { margin-top: 26px; }
  .nav-link { justify-content: center; padding: 12px; }
  .user { justify-content: center; padding: 18px 0; }
  .page-header { padding: 25px; min-height: 96px; }
  h1 { font-size: 25px; }
  .header-actions { gap: 10px; }
  .save-status { font-size: 10px; }
  .content:not(.flow-content) { margin-left: 24px; margin-right: 24px; }
  .collection-layout { grid-template-columns: 210px minmax(0,1fr); }
  .collection-sidebar { padding-right: 14px; }
  .detail-panel { padding: 25px; }
  .detail-heading { flex-wrap: wrap; gap: 15px; }
  .detail-actions { flex-wrap: wrap; }
  .test-layout { grid-template-columns: 250px minmax(0,1fr); gap: 23px; }
  .test-layout form { padding-right: 20px; }
}
@media (max-width:700px) {
  .page-header { padding: 25px 20px 23px; gap: 15px; align-items: flex-start; }
  h1 { font-size: 23px; }
  .header-actions { flex-direction: column-reverse; align-items: flex-end; gap: 10px; }
  .header-actions .button { padding: 9px 12px; font-size: 12px; }
  .badge { font-size: 10px; }
  .title-row { gap: 8px; }
  .flow-toolbar { flex-wrap: wrap; gap: 10px; padding: 13px 18px; height: auto; min-height: 95px; }
  .flow-title { width: 100%; }
  .flow-title input { width: 205px; font-size: 12px; }
  .flow-title .subtle { display: inline; font-size: 10px; margin-left: auto; }
  .toolbar-actions { width: 100%; justify-content: flex-end; }
  .toolbar-actions .button { font-size: 11px; }
  .zoom-tools { right: 15px; bottom: 18px; }
  .graph-scroll { padding: 22px; }
  .inspector { right: 12px; top: 12px; bottom: 73px; width: min(310px,calc(100% - 24px)); }
  .page-footer { padding: 12px 20px; font-size: 10px; gap: 8px; flex-wrap: wrap; }
  .page-footer .text-button { font-size: 10px; }
  .collection-layout, .faq-layout { display: block; min-height: 0; }
  .collection-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; max-height: 300px; overflow: auto; }
  .collection-title { margin-bottom: 15px; }
  .collection-list { display: flex; flex-direction: column; }
  .collection-item { padding: 12px; }
  .detail-panel { padding: 26px 0; }
  .detail-heading h2 { font-size: 20px; }
  .detail-actions { gap: 15px; }
  .form-grid input, .form-grid textarea, .form-grid select { font-size: 14px; }
  .hours-layout { padding-top: 25px; }
  .settings-card .detail-heading { gap: 10px; }
  .settings-card h2 { font-size: 16px; }
  .schedule-row { gap: 12px; }
  .schedule-row .switch-label { min-width: 83px; font-size: 12px; }
  .time-range { gap: 6px; }
  .time-range input { width: 90px; font-size: 12px; padding: 7px; }
  .test-layout { display: block; }
  .test-layout form { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 25px; }
  #test-result { max-height: none; margin-top: 25px; }
  .test-dialog { padding: 24px; }
  .palette { max-width: calc(100% - 36px); }
}
@media (max-width:430px) {
  :root { --sidebar: 52px; }
  .sidebar { padding-left: 4px; padding-right: 4px; }
  .page-header { padding-left: 15px; padding-right: 15px; }
  .page-header .badge { display: none; }
  .save-status { font-size: 9px; }
  .content:not(.flow-content) { margin: 0 16px; }
  .flow-toolbar { padding-left: 12px; padding-right: 12px; }
  .flow-title input { width: 180px; }
  .flow-title .subtle { display: none; }
  .schedule-row { gap: 8px; flex-wrap: wrap; }
  .schedule-row .time-range { gap: 5px; }
  .schedule-row .time-range input { width: 78px; font-size: 11px; }
  .page-footer>span { font-size: 9px; }
  .connection-banner { font-size: 10px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion:reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* AI conversation and per-turn evidence. */
.ai-workspace { display:grid; grid-template-columns:minmax(340px,1fr) 350px; border-top:1px solid var(--line); min-height:630px; height:calc(100vh - 176px); }
.ai-conversation { display:flex; flex-direction:column; min-height:0; min-width:0; padding-right:28px; }
.ai-toolbar { display:flex; justify-content:space-between; align-items:center; min-height:65px; gap:12px; }
.ai-model { display:flex; align-items:center; gap:9px; font-size:12px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:#aaa; }.status-dot.ready { background:#23975b; }
.ai-conditions { padding-bottom:14px; border-bottom:1px solid #eee; font-size:12px; }
.ai-conditions summary { cursor:pointer; font-weight:600; padding:3px 0; }.ai-conditions summary span { color:var(--muted); font-weight:500; margin-left:10px; font-size:11px; }
.ai-condition-fields { display:grid; grid-template-columns:1fr 1.2fr; gap:12px; padding-top:15px; }.ai-condition-fields .field { margin:0; }.ai-condition-fields .check-row { grid-column:1/-1; }.ai-condition-fields input,.ai-condition-fields select { font-size:12px; }
.ai-messages { flex:1; min-height:220px; overflow:auto; padding:30px 6px 12px 0; scroll-behavior:smooth; }
.ai-welcome { height:100%; min-height:210px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:18px; }.ai-welcome h2 { font-size:23px; letter-spacing:-.04em; }.ai-welcome p { color:var(--muted); font-size:12px; }
.ai-welcome-icon { width:46px; height:46px; display:grid; place-items:center; border:1px solid var(--line); border-radius:14px; }.ai-welcome-icon .icon { width:24px; height:24px; }
.chat-user { display:flex; flex-direction:column; align-items:flex-end; margin:5px 0 30px 40px; }.chat-user>span { color:var(--muted); font-size:11px; margin:0 3px 7px; }.chat-user p { padding:12px 17px; border-radius:14px 14px 3px 14px; background:#f2f2f2; max-width:90%; }
.chat-user p,.chat-assistant>p { white-space:pre-wrap; line-height:1.95; overflow-wrap:anywhere; font-size:14px; }
.chat-assistant { margin:0 0 30px; padding:0 14px 0 2px; }.chat-name { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; margin-bottom:11px; }.chat-name>.icon { width:18px; height:18px; }
.chat-evidence { display:flex; gap:9px; align-items:center; margin-top:13px; padding:6px 9px; border:1px solid transparent; background:transparent; color:#646464; border-radius:6px; font-size:11px; }.chat-evidence .icon { width:13px; height:13px; }.chat-evidence span { color:#aaa; }.chat-evidence:hover,.chat-evidence[aria-pressed=true] { border-color:#dedede; color:#111; background:#fafafa; }
.ai-thinking { display:flex; align-items:center; gap:9px; font-size:12px; color:var(--muted); padding:4px 0 20px; }
.ai-composer { display:flex; align-items:flex-end; gap:10px; padding:10px; border:1px solid #c9c9c9; border-radius:12px; background:#fff; }.ai-composer:focus-within { border-color:#555; }.ai-composer textarea { resize:none; min-height:54px; max-height:180px; padding:4px 6px; border:0; box-shadow:none; background:transparent; font-size:14px; }.ai-composer .button { height:35px; width:35px; padding:7px; border-radius:8px; }
.ai-footnote { text-align:center; padding:10px 0 5px; font-size:10px; color:var(--muted); }
.ai-warning,.ai-request-error { display:flex; gap:8px; align-items:flex-start; padding:12px; background:#fff7ec; color:#8e501a; border:1px solid #f0d9bc; border-radius:7px; font-size:12px; line-height:1.7; margin:12px 0; }.ai-warning .icon,.ai-request-error .icon { width:16px; height:16px; margin-top:2px; }
.ai-evidence { overflow:auto; padding:22px 0 24px 25px; border-left:1px solid var(--line); min-width:0; }.evidence-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:25px; }.evidence-heading h2 { font-size:15px; font-weight:700; }.evidence-section { padding:0 0 22px; margin-bottom:23px; border-bottom:1px solid #eee; }.evidence-section:last-child { border:0; }.evidence-section h3 { font-size:12px; font-weight:700; margin-bottom:14px; display:flex; gap:8px; }.evidence-section h3 span { font-weight:500; color:var(--muted); }.evidence-none { font-size:12px; color:var(--muted); }.evidence-empty { padding:28px 0; color:#777; display:flex; flex-direction:column; align-items:center; gap:13px; }.evidence-empty h2 { font-size:13px; font-weight:500; }
.source-item { font-size:12px; margin-bottom:14px; }.source-item summary { cursor:pointer; font-weight:600; line-height:1.7; overflow-wrap:anywhere; }.source-item p { margin:10px 0; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; color:#444; }.source-item .source-condition { color:var(--muted); font-size:11px; }.source-item .inline-link { font-size:11px; }
.evidence-flow-title { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }.evidence-flow-title .text-button { font-size:11px; }.evidence-flow-title .icon { width:14px; height:14px; }.ai-trace { margin-top:3px; }.ai-trace li { padding-bottom:18px; }.ai-trace strong { font-size:12px; }.ai-trace p { font-size:11px; overflow-wrap:anywhere; }.ai-trace .trace-outcome { display:block; width:fit-content; font-size:10px; margin-top:6px; }.ai-trace .trace-number { width:24px; height:24px; font-size:10px; }
@media(min-width:1500px) { .ai-workspace { grid-template-columns:minmax(400px,1fr) 390px; }.ai-conversation { padding-right:48px; }.ai-messages { padding-left:24px; padding-right:24px; }.ai-composer { margin-left:24px; margin-right:24px; } }
@media(max-width:1100px) { .ai-workspace { grid-template-columns:minmax(300px,1fr) 290px; }.ai-conversation { padding-right:18px; }.ai-evidence { padding-left:18px; } }
@media(max-width:850px) { .ai-workspace { display:flex; flex-direction:column; height:auto; }.ai-conversation { padding-right:0; min-height:620px; }.ai-messages { max-height:520px; }.ai-evidence { border-left:0; border-top:1px solid var(--line); padding:24px 0 0; margin-top:24px; overflow:visible; }.ai-condition-fields { grid-template-columns:1fr; }.ai-evidence .evidence-empty { display:none; } }

.voice-workspace{max-width:1040px;margin:0 auto}.voice-connection{padding:12px 0 28px;border-bottom:1px solid var(--border,#e5e5e5)}.voice-heading,.voice-heading>div,.voice-publish{display:flex;align-items:center;gap:16px}.voice-heading{justify-content:space-between}.voice-heading h2{font-size:24px;margin:0}.voice-status{margin:28px 0;display:grid;gap:14px}.voice-status>div{display:flex;gap:24px}.voice-status dt{color:#737373;min-width:130px}.voice-status dd{margin:0;font-weight:600}.voice-publish span,.voice-note{color:#737373;font-size:12px}.voice-note{margin:20px 0 0;line-height:1.8}.voice-endpoints{margin-top:20px}.voice-endpoints code{display:block;margin-top:12px;overflow-wrap:anywhere}.voice-history{padding:26px 0}.voice-history h2{font-size:18px}.voice-call-list{display:grid;gap:1px}.voice-call{background:#fff;border:0;border-bottom:1px solid #eee;display:flex;align-items:center;gap:24px;text-align:left;padding:16px 8px;cursor:pointer}.voice-call.selected,.voice-call:hover{background:#f5f5f5}.voice-call>span:nth-child(2){color:#737373;font-size:13px;flex:1}.voice-call-detail{margin-top:30px;border-top:1px solid #ddd;padding-top:20px}.voice-turn{padding:20px 0;border-bottom:1px solid #eee}.voice-turn p{white-space:pre-wrap;line-height:1.8}.voice-turn summary{font-size:12px;color:#666;cursor:pointer}.voice-caller{background:#f5f5f5;padding:12px;border-radius:8px}.voice-callback{border-left:3px solid #222;padding:8px 16px;margin:16px 0}.voice-turn .source-item{padding:14px 0}.voice-turn strong{font-weight:650}@media(max-width:600px){.voice-heading>div{align-items:flex-start;flex-direction:column;gap:8px}.voice-call{flex-wrap:wrap;gap:8px}.voice-status>div{gap:8px;flex-direction:column}.voice-publish{align-items:flex-start;flex-direction:column;gap:8px}}

/* Response rules: ordered cards and named branches instead of a free-position canvas. */
.rule-canvas{background:#fafafa;background-image:none}.rule-scroll{padding:30px 40px 70px}.rules{max-width:760px;margin:0 auto}.rule-card{background:#fff;border:1px solid #dedede;border-radius:10px;position:relative;scroll-margin:30px}.rule-card.selected{border-color:#181818;box-shadow:0 0 0 1px #181818}.rule-card.traced{border-left:4px solid #16855b}.rule-main{display:flex;align-items:center;gap:14px;width:100%;padding:19px 20px;text-align:left;background:transparent;border:0;border-radius:10px;cursor:pointer}.rule-main:hover{background:#fcfcfc}.rule-index{font-size:11px;color:#7a7a7a;font-variant-numeric:tabular-nums}.rule-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}.rule-copy strong{font-size:14px;font-weight:700;color:#111}.rule-type{font-size:10px;font-weight:600;color:#646464}.rule-summary{font-size:12px;line-height:1.7;color:#555;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.rule-edit{display:flex;gap:7px;align-items:center;font-size:11px;font-weight:600;color:#555}.rule-edit .icon{width:12px;height:12px}.rule-connector{display:flex;justify-content:center;align-items:center;height:36px;position:relative}.rule-connector:before{content:'';width:1px;background:#d4d4d4;height:100%;position:absolute}.rule-insert{position:relative;background:#fafafa;border:1px solid #d8d8d8;border-radius:50%;width:21px;height:21px;display:grid;place-items:center;padding:3px;color:#666}.rule-insert:hover{color:#000;border-color:#333}.rule-insert .icon{width:12px;height:12px}.rule-branches{margin:0 0 20px 27px;border-left:1px solid #d6d6d6;padding:6px 0 0 24px}.rule-branch{margin:0 0 12px}.rule-branch>summary{display:flex;align-items:center;gap:8px;position:relative;list-style:none;cursor:pointer;font-size:11px;color:#3b3b3b;padding:12px 0}.rule-branch>summary::-webkit-details-marker{display:none}.rule-branch>summary:before{content:'';position:absolute;left:-25px;width:16px;height:1px;background:#d6d6d6}.rule-branch>summary strong{font-weight:650;line-height:1.7}.rule-branch>summary>.icon{width:12px;height:12px;transition:transform .15s}.rule-branch:not([open])>summary>.icon{transform:rotate(-90deg)}.branch-content{padding:2px 0}.rule-reference{display:flex;align-items:center;gap:10px;width:100%;border:1px solid #e4e4e4;background:#fff;padding:12px 16px;border-radius:8px;text-align:left;color:#222;font-size:12px;font-weight:600;cursor:pointer}.rule-reference:hover{border-color:#888}.rule-reference>.icon{width:14px;height:14px}.rule-reference>span{margin-left:auto;font-size:10px;color:#777;font-weight:400}.rule-error>summary{color:#7d6b57}.rule-missing{font-size:12px;color:#965620;padding:15px;border:1px dashed #d7bca3;border-radius:8px;background:#fffbf5}.unconnected-rules{border-top:1px dashed #bbb;margin-top:32px;padding-top:24px}.unconnected-rules h3{font-size:12px;margin-bottom:16px}.unconnected-rules>.rule-card{margin-bottom:12px}.rule-panel .palette{z-index:5}.rule-panel .inspector{width:340px}.rule-panel .port-pick{display:none}.rule-panel .connection-row>div{margin-bottom:7px}.rule-panel .inspector-heading{font-weight:700}
.cost-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:24px 0}.cost-stat{padding:20px;border:1px solid #e3e3e3;border-radius:10px}.cost-stat>span{font-size:11px;color:#666}.cost-stat strong{display:block;font-size:26px;letter-spacing:-.04em;margin-top:8px;font-variant-numeric:tabular-nums}.cost-stat small{display:block;font-size:10px;color:#777;margin-top:5px}.call-cost{font-variant-numeric:tabular-nums;min-width:80px;text-align:right;font-weight:700}.cost-breakdown{background:#fafafa;border:1px solid #e5e5e5;border-radius:10px;padding:20px;margin-bottom:25px}.cost-breakdown h3{font-size:13px;margin-bottom:16px}.cost-breakdown dl{display:grid;grid-template-columns:1fr auto;gap:12px;font-size:12px}.cost-breakdown dd{margin:0;font-variant-numeric:tabular-nums;font-weight:650}.cost-breakdown p{font-size:11px;line-height:1.8;color:#666;margin-top:16px}.voice-call .badge{white-space:nowrap}
@media(max-width:1100px){.rule-scroll{padding:24px 22px 60px}.rule-panel .inspector{width:310px}.rule-main{padding:16px 14px;gap:10px}.rule-index{display:none}}
@media(max-width:760px){.rule-scroll{padding:20px 15px 60px}.rule-branches{margin-left:13px;padding-left:17px}.rule-branch>summary:before{left:-18px;width:12px}.rule-edit{font-size:0;gap:0}.rule-panel .editor.has-inspector .inspector{width:min(360px,calc(100% - 20px));position:absolute;right:0;top:0;bottom:0;z-index:4;box-shadow:-8px 0 30px #0001}.cost-grid{grid-template-columns:1fr;gap:8px}.cost-stat{padding:15px}.cost-stat strong{font-size:22px}.voice-call{gap:12px}.rule-main>.type-icon{width:30px;height:30px}.rule-summary{font-size:11px}}
.reception-details{margin:16px 0}.reception-details .voice-status{margin:16px 0;gap:10px}.reception-details p{font-size:12px;color:#666}.voice-callback .badge{margin-left:8px}
.voice-model-settings{display:grid;gap:14px;max-width:620px;padding:20px;border:1px solid #e5e5e5;border-radius:10px;margin:24px 0}.voice-model-settings .button{justify-self:start}.voice-model-settings .voice-note{margin:0}.check-field{display:flex;align-items:center;gap:8px;font-size:13px}
/* 電話帳・SMS・録音 */
.contacts-workspace{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:24px;max-width:1040px;margin:0 auto}
.contact-list{display:flex;flex-direction:column;gap:6px}
.contact-item{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;padding:10px 12px;border:1px solid #e5e5e5;border-radius:8px;background:#fff;cursor:pointer;font:inherit;color:inherit}
.contact-item span{font-size:12px;color:#777}
.contact-item.selected{border-color:#111;background:#fafafa}
.contact-detail form{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
.contact-detail h3,.sms-templates h3,.sms-log h3,.recording h3,.call-extras h3{font-size:14px;margin:14px 0 8px}
.form-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
.form-actions select{min-height:32px;border:1px solid #d9d9d9;border-radius:6px;padding:0 8px;font:inherit}
.badge.danger{background:#fdecec;color:#a32020}
.sms-workspace{max-width:880px;margin:0 auto;display:flex;flex-direction:column;gap:28px}
.sms-settings,.sms-templates{display:flex;flex-direction:column;gap:12px}
.sms-template{border:1px solid #e5e5e5;border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:10px}
.sms-table{width:100%;border-collapse:collapse;font-size:12px}
.sms-table th,.sms-table td{border-bottom:1px solid #e5e5e5;padding:8px 6px;text-align:left;vertical-align:top}
.recording audio{width:100%;margin:6px 0}
.recording small{color:#777;font-size:11px}
.call-extras{margin:10px 0}
.sms-mini{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:6px;font-size:12px}
.sms-mini .badge{margin-right:6px}
@media (max-width:760px){.contacts-workspace{grid-template-columns:1fr}}

/* ---- ログイン・アカウント・担当者 ---- */
.auth-body{min-height:100vh;display:flex;align-items:flex-start;justify-content:center;background:#f7f7f7;padding:9vh 16px 40px}
.auth-card{width:100%;max-width:420px;background:#fff;border:1px solid #e5e5e5;border-radius:14px;padding:32px 30px;box-shadow:0 12px 40px #0000000a}
.auth-card h1{font-size:22px;margin-bottom:12px}
.auth-card h2{font-size:14px;margin:26px 0 12px}
.auth-card>p,.auth-card form>p{line-height:1.8;color:#444;margin-bottom:16px;font-size:13px}
.auth-card>p a{font-weight:600}
.auth-card>button+p:not(.auth-note),.auth-card>.auth-error+p{margin:18px 0 0;text-align:center}
.auth-brand{font-weight:700;font-size:15px;margin-bottom:26px;display:flex;gap:6px;align-items:baseline}
.auth-brand span{color:#8a8a8a;font-size:12px;font-weight:600}
.auth-wide{width:100%;padding:12px 14px}
.auth-note{color:#737373;font-size:12px;line-height:1.8;margin:10px 0 0}
.auth-card .auth-note{margin-bottom:6px}
details.auth-note{margin:4px 0 18px}
details.auth-note summary{cursor:pointer}
details code,.auth-codes code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;letter-spacing:.04em;color:#111}
.auth-divider{display:flex;align-items:center;gap:12px;color:#9a9a9a;font-size:12px;margin:22px 0}
.auth-divider:before,.auth-divider:after{content:'';flex:1;border-top:1px solid #e5e5e5}
.auth-error{margin-top:14px;padding:10px 12px;border-radius:8px;background:#fdecec;color:#a32020;font-size:13px;line-height:1.7}
.auth-qr{display:flex;justify-content:center;margin:14px 0}
.auth-qr svg{width:200px;height:200px;border:1px solid #eee;border-radius:8px}
.auth-codes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 18px;padding:16px 16px 16px 40px;margin:0 0 18px;background:#f7f7f7;border-radius:8px;font-size:12px;color:#888}
.auth-card .check-field{margin-bottom:16px}
.logout-button{margin-left:auto}
.sidebar-collapsed .logout-button{display:none}
.account-workspace{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:20px;padding-bottom:40px}
.account-card{border:1px solid #e5e5e5;border-radius:10px;padding:22px}
.account-card h2{font-size:18px}
.account-card h3{font-size:15px;display:flex;align-items:center;gap:8px;margin-bottom:12px}
.account-card h3 .icon{width:18px;height:18px}
.account-card .subtle{font-size:12px;margin-top:6px;white-space:normal}
.account-card .voice-status{margin:16px 0}
.account-card .voice-note{margin:0 0 14px}
.account-card form{max-width:420px}
.passkey-list{list-style:none;margin:0 0 16px;padding:0;border-top:1px solid #eee}
.passkey-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eee}
.passkey-list small{display:block;color:#8a8a8a;font-size:11px;margin-top:4px}
.inline-form{display:flex;gap:10px;align-items:flex-end;max-width:none!important}
.inline-form .field{margin-bottom:0;flex:1}
.users-workspace{max-width:1040px;margin:0 auto;display:flex;flex-direction:column;gap:28px;padding-bottom:40px}
.users-workspace h3{font-size:15px;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.users-table select{padding:4px 26px 4px 8px;font-size:12px;width:auto}
.users-table td{vertical-align:middle}
.row-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center;white-space:nowrap}
.users-workspace .voice-note{margin-top:12px}
.invite-link{border:1px solid #d8e6d8;background:#f5faf5;border-radius:10px;padding:18px}
.invite-link h3 .icon{width:18px;height:18px}
.invite-link .voice-note{margin:0 0 12px}
.link-row{display:flex;gap:8px;align-items:center}
.link-row input{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.table-scroll{overflow-x:auto}
.sms-body{white-space:pre-wrap;line-height:1.7;font-size:13px;color:#333}
@media (max-width:720px){
  .auth-card{padding:26px 20px}
  .inline-form{flex-direction:column;align-items:stretch}
  .users-table thead{display:none}
  .users-table tr{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;padding:10px 0;border-bottom:1px solid #e5e5e5}
  .users-table td{border:0;padding:2px 0}
  .row-actions{grid-column:1/-1;justify-content:flex-start}
}
