/* LINE公式アカウントの受付ボット（体験版）。色は common/base.css のトークンだけを使う（LINEの見た目を再現する所だけ例外） */
/* ───────── 左右に分かれる画面（左：お客さん側／右：お店側）。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; }
.time-hint { margin-top: 8px; padding: 6px 10px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--ink); font-size: 12.5px; line-height: 1.55; }
.time-hint[hidden] { display: none; }
.hand-form textarea::placeholder { color: var(--ink-3); opacity: .75; }
.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; }
}
/* ───────── LINE のトーク画面（再現）。LINEの見た目を再現する所だけ色の値を直書きする ───────── */
.ln { flex: 1; min-height: 0; display: flex; flex-direction: column; min-width: 0; position: relative; background: #8ea4b5; }
.ln-head { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #2f4250; color: #fff; flex: none; }
.ln-av { width: 34px; height: 34px; border-radius: 50%; background: #eef2f5; color: var(--brand-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.ln-head > div { min-width: 0; flex: 1; }
.ln-head b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-head small { font-size: 11.5px; color: #c4d1da; }
.ln-official { flex: none; padding: 1px 8px; border-radius: 4px; background: #06c755; color: #fff; font-size: 11px; font-weight: 700; }
.ln-log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 14px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ln-day { text-align: center; margin: 4px 0 10px; }
.ln-day span { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(32, 50, 62, .32); color: #fff; font-size: 11.5px; }
.ln-m { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
.ln-m.own { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.ln-who { font-size: 11.5px; color: #f1f5f8; margin-bottom: 2px; }
.ln-row { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.ln-m.own .ln-row { flex-direction: row-reverse; }
.ln-bubble { max-width: 252px; padding: 8px 12px; border-radius: 18px; background: #fff; color: #1d2a33; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.ln-m.own .ln-bubble { background: #c5ecaa; }
.ln-photo { width: 168px; height: 112px; padding: 0; display: grid; place-items: center; color: #4f6574; font-size: 12px; background: linear-gradient(135deg, #e6edf1, #c9d6de); border-radius: 14px; }
.ln-time { font-size: 10.5px; color: #eef3f6; white-space: nowrap; flex: none; }
.ln-chip { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.ln-chip.push { background: var(--accent-soft); color: var(--accent-deep); }
.ln-m.fresh .ln-bubble, .ln-m.fresh .ln-photo { animation: ln-pop .32s ease-out; }
@keyframes ln-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ln-typing { display: inline-flex; gap: 4px; padding: 11px 14px; border-radius: 18px; background: #fff; }
.ln-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa9b3; animation: ln-dot 1s infinite; }
.ln-typing i:nth-child(2) { animation-delay: .15s; } .ln-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ln-dot { 50% { transform: translateY(-4px); opacity: .5; } }
.ln-qr { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; background: rgba(255, 255, 255, .22); flex: none; scrollbar-width: none; }
.ln-qr::-webkit-scrollbar { display: none; }
.ln-qr:empty { display: none; }
.ln-qr button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1.5px solid #06c755; color: #057a35; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.ln-qr button:hover { background: #effaf3; }
.ln-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); flex: none; }
.ln-input input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sunken); font-size: 14.5px; }
.ln-input .ln-send { min-width: 44px; height: 40px; color: #057a35; font-weight: 700; font-size: 14px; }
.ln-input .ln-send:disabled { color: var(--ink-3); }
.ln-ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.ln-ibtn:hover { background: var(--sunken); }
.ln-ibtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ln-rich { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #f6f7f9; border-top: 1px solid var(--line); flex: none; }
.ln-rich button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 12.5px; font-weight: 600; color: var(--ink); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8f9fb; }
.ln-rich button:nth-child(3n) { border-right: 0; }
.ln-rich button:nth-child(n+4) { border-bottom: 0; }
.ln-rich button:hover { background: #fff; }
.ln-rich button.hot { background: #fde9ef; color: #a8325a; }
.ln-rich svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  .ln-bubble { max-width: 232px; }
  .ln-input input { font-size: 16px; }
  .ln-rich button { min-height: 46px; font-size: 12px; }
}
/* ───────── 例文の一覧 ───────── */
.ex-sheet { flex: none; max-height: 56%; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line-2); padding: 8px 10px 10px; }
.ex-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin: 2px 4px 6px; }
.ex-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); text-align: left; min-height: 46px; }
.ex-item:hover { background: var(--sunken); }
.ex-item b { display: block; font-size: 14px; font-weight: 600; }
.ex-item small { display: block; font-size: 12px; color: var(--ink-3); }
.ex-note { margin: 6px 4px 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; }

/* ───────── 右：シート ───────── */
.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); }
.hand-list { display: grid; gap: 12px; }
.hand { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; box-shadow: var(--shadow-s); }
.hand header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hand header .num { font-size: 12.5px; color: var(--ink-3); }
.hand header .chip { margin-left: auto; }
.hand-q { margin-top: 8px; font-size: 15px; font-weight: 600; white-space: pre-line; }
.hand-why { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.hand-reply { margin-top: 10px; padding: 8px 12px; border-radius: var(--r-s); background: var(--ok-soft); color: var(--ok); white-space: pre-line; font-size: 14px; }
.hand-sent { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.hand-see { display: none; margin-left: 8px; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) { .hand-see { display: inline-block; } }
.hand-form { margin-top: 10px; display: grid; gap: 8px; }
.hand-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--paper); font-size: 16px; line-height: 1.55; resize: none; overflow: hidden; }
.hand-form .btn { justify-self: end; }
.hand-need { display: none; font-size: 12.5px; color: var(--ink-3); }
.hand-form.is-empty .hand-need { display: block; }
.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; }

/* スマホでは、表をカードの並びにする（横にはみ出させない） */
@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%; }
}
