/* 問い合わせの自動仕分け（体験版）。色は common/base.css のトークンだけを使う */
/* ───────── 左右に分かれる画面（左：お客さん側／右：お店側）。900px 未満は切り替え ───────── */
.dual { display: grid; grid-template-columns: 384px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); background: var(--paper); }
.mswitch { display: none; }
.left-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line-2); background: var(--surface); }
.left-ctrl { padding: 12px 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.ctrl-cap { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.ctrl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ctrl-row .lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.ctrl-link { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brand-2); min-height: 28px; text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; padding: 2px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--paper); }
.seg button { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.right-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.work-head { display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px; background: var(--brand); color: var(--on-brand); min-height: 52px; flex: none; }
.work-brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.work-brand b { color: #fff; font-size: 15px; }
.work-brand span { font-size: 12px; color: var(--on-brand-2); }
.work-tabs { display: flex; gap: 4px; margin-left: auto; align-self: stretch; }
.work-tabs button { position: relative; display: flex; align-items: center; gap: 7px; padding: 0 14px; color: var(--on-brand); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.work-tabs button:hover { background: rgba(255, 255, 255, .06); }
.work-tabs button[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); background: rgba(255, 255, 255, .08); }
.work-tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.work-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 32px; -webkit-overflow-scrolling: touch; }
@media (max-width: 1179px) { .dual { grid-template-columns: 344px minmax(0, 1fr); } .work-brand span { display: none; } }
@media (max-width: 899px) {
  .dual { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mswitch button { height: 38px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
  .mswitch button[aria-selected="true"] { background: var(--brand); color: #fff; }
  .mswitch .mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .dual[data-view="left"] .right-col, .dual[data-view="right"] .left-col { display: none; }
  .left-col { border-right: 0; }
  .work-head { padding: 0 6px 0 14px; min-height: 46px; }
  .work-brand { display: none; }
  .work-tabs { margin-left: 0; flex: 1; gap: 0; overflow-x: auto; }
  .work-tabs button { flex: 1; justify-content: center; padding: 0 9px; font-size: 13px; }
}
@media (max-width: 640px) {
  .left-ctrl { padding: 8px 12px; }
  .ctrl-cap { display: none; }
  .ctrl-row { margin-top: 0; }
  .work-body { padding: 14px 14px 28px; }
}

/* ───────── 右：シート ───────── */
.sheet-cap { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.sheet-empty { padding: 28px 16px; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-m); }
.sheet-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); }
.sheet { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.sheet th { position: sticky; top: 0; text-align: left; padding: 9px 12px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.sheet td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet tr.own td { background: var(--accent-soft); }
.sheet .nw { white-space: nowrap; }
.sheet .cell-text { min-width: 200px; white-space: pre-line; overflow-wrap: anywhere; }
.sheet .cell-act { margin-top: 6px; }
.muted { color: var(--ink-3); }

/* スマホでは、表をカードの並びにする（横にはみ出させない） */
@media (max-width: 640px) {
  .sheet-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  .sheet { display: block; min-width: 0; }
  .sheet thead { display: none; }
  .sheet tbody { display: grid; gap: 10px; }
  .sheet tr { display: grid; gap: 4px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); }
  .sheet td { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 0; border: 0; align-items: start; }
  .sheet td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; font-weight: 700; line-height: 1.9; }
  .sheet tr.own, .sheet tr.own td { background: var(--accent-soft); }
  .sheet td.nw { white-space: normal; }
  .sheet .cell-act { margin-top: 0; }
  .sheet .cell-act .btn { width: 100%; }
  .sheet td .chip, .sheet td .cell-act { justify-self: start; }
  .sheet td .cell-act { width: 100%; }
}

.notif { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: var(--r-s); padding: 10px 14px; margin-bottom: 10px; }
.notif small { color: var(--ink-3); }
.notif pre { margin: 4px 0 0; font: inherit; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }


/* ───────── 左：申込みフォーム ───────── */
.fm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 24px; background: var(--sunken); display: grid; gap: 12px; align-content: start; -webkit-overflow-scrolling: touch; }
.fm { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--brand-2); border-radius: var(--r-m); padding: 16px 16px 14px; display: grid; gap: 16px; box-shadow: var(--shadow-s); }
.fm-head b { display: block; font-size: 19px; font-weight: 800; }
.fm-head span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.fm-head p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.fm-q { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.fm-q legend, .fm-q label { font-size: 14px; font-weight: 700; padding: 0; }
.fm-q input[type="text"], .fm-q input[type="email"] { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: var(--paper); font-size: 16px; }
.fm-q input:focus { border-color: var(--brand-2); background: #fff; outline: none; }
#slotList { display: grid; gap: 8px; }
.slot-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); text-align: left; min-height: 56px; }
.slot-opt:hover { background: var(--paper); }
.slot-opt[aria-checked="true"] { border-color: var(--brand-2); background: var(--brand-soft); }
.radio { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.slot-opt[aria-checked="true"] .radio { border-color: var(--brand-2); box-shadow: inset 0 0 0 3.5px #fff; background: var(--brand-2); }
.so-main { flex: 1; min-width: 0; display: grid; font-size: 14px; line-height: 1.45; }
.so-main b { font-weight: 700; font-size: 13.5px; }
.fm-help { font-size: 12.5px; color: var(--ink-3); }
.fm-empty { padding: 14px; text-align: center; color: var(--ink-3); background: var(--paper); border-radius: var(--r-m); font-size: 13.5px; }
.fm .seg button { min-width: 56px; }
.fm-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 3; margin: 0 -16px -14px; padding: 12px 16px 12px; border-radius: 0 0 var(--r-m) var(--r-m); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 14px rgba(23, 57, 74, .07); }   /* フォームが長くなっても、送信ボタンは画面の下に残る */
.fm-foot .btn { min-width: 160px; min-height: 46px; }
.fm-foot .ctrl-link { margin-left: 0; }

/* 資料の表示 */
.dlg { position: fixed; inset: 0; z-index: 900; background: rgba(12, 24, 32, .5); display: grid; place-items: center; padding: 16px; }
.dlg-box { width: min(560px, 100%); max-height: min(78vh, 640px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-l); overflow: hidden; }
.dlg-box header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-box header b { font-size: 16px; }
.dlg-x { width: 36px; height: 36px; border-radius: 8px; font-size: 22px; color: var(--ink-3); }
.dlg-x:hover { background: var(--sunken); }
.dlg-body { overflow-y: auto; padding: 14px 18px 20px; display: grid; gap: 12px; }
.dlg-doc { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dlg-doc span { font-size: 12px; color: var(--ink-3); }
.dlg-note { font-size: 12.5px; color: var(--ink-3); }
.sec { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.sec.hl { border-color: var(--accent); background: var(--accent-soft); }
.sec h3 { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; }
.sec p { white-space: pre-line; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.dlg-docs { list-style: none; display: grid; gap: 6px; }
.dlg-docs button { width: 100%; text-align: left; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-s); font-weight: 600; min-height: 46px; }


/* ───────── この作品だけ ───────── */
.sample-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-row button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sample-row button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.fm-q .lbl { font-size: 14px; font-weight: 700; }
.fm-q textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: var(--paper); font-size: 16px; line-height: 1.65; resize: vertical; max-height: 260px; }
.fm-q textarea:focus { border-color: var(--brand-2); background: #fff; outline: none; }
.fail-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-s); cursor: pointer; }
.fail-opt input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.fail-opt b { display: block; font-size: 13.5px; font-weight: 600; }
.fail-opt small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.sheet td small { display: block; color: var(--ink-3); font-size: 12px; }
.sheet tr.hot td { background: var(--bad-soft); }
.sheet .st { height: 34px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); font-size: 13px; }
.row-open { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.src { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.src.ai { color: var(--ok); }
.spin { width: 9px; height: 9px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nf-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nf-count { margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-3); }
.nf-filter label { font-size: 13.5px; font-weight: 700; }
.nf-filter select { height: 36px; padding: 0 10px; border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); font-size: 14px; }
.notif.hi { border-left-color: var(--bad); }
.d-src { padding: 6px 10px; border-radius: var(--r-s); background: var(--sunken); font-size: 12.5px; color: var(--ink-2); }
.d-src.ai { background: var(--ok-soft); color: var(--ok); }
.d-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.d-meta span { display: grid; gap: 2px; }
.d-meta small { font-size: 12px; color: var(--ink-3); }
.dlg-body section h3 { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-bottom: 3px; }
.dlg-body section p { font-size: 14.5px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.d-reply { padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); }
.d-body { color: var(--ink-2); }
@media (max-width: 640px) { .sheet tr.hot, .sheet tr.hot td { background: var(--bad-soft); } }
@media (max-width: 899px) { .left-col .fm-scroll { padding-top: 12px; } }
@media (max-width: 640px) {
  .dlg { place-items: end center; padding: 0; }
  .dlg-box { border-radius: var(--r-l) var(--r-l) 0 0; max-height: 82vh; }
}

/* 対応状況を変えると、一覧の行にも出る */
.st-tally { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.st-chip { margin-top: 4px; }
.sheet tr.st-done, .sheet tr.st-done td { background: var(--ok-soft); }
.sheet tr.st-done .cell-text, .sheet tr.st-done td b { color: var(--ink-2); }
.sheet tr.st-doing, .sheet tr.st-doing td { background: var(--brand-soft); }
