/* styles.css — モバイルファースト。深いティール/インディゴのフェルトに琥珀のアクセント。
   PLO版（緑フェルト）と意図的に色相を変え、別ゲームであることを示す。
   構成: 答え（上部固定・最大の数字）→ 入力（話す/打つ → タップ）→ くわしい結果。 */

:root {
  --felt-0: #061620;
  --felt-1: #0a1f2e;
  --felt-2: #103247;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --surface: #102634;
  --surface-2: #15303f;
  --surface-3: #1b3c4d;
  --text: #eaf2f6;
  --text-dim: #aac2cf;
  --gold: #e6b450;
  --gold-2: #f4d488;
  --gold-ink: #281c05;
  --teal: #45c9b0;
  --green: #5ad19a;
  --tie: #8aa0a8;
  --loss: #e0664f;
  --bad: #ee8a76;
  --card-face: #f6f3ea;
  --card-red: #c8312f;
  --card-black: #1d2421;

  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
  --gutter: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.40);
  --duration-fast: 150ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
button, input { font-family: inherit; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(130% 80% at 50% -10%, var(--felt-2) 0%, var(--felt-1) 46%, var(--felt-0) 100%) fixed;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
  padding: 0 0 env(safe-area-inset-bottom);
}
body.no-scroll { overflow: hidden; }

/* ---- ヘッダー ---- */
.app-header { padding: max(env(safe-area-inset-top), 12px) 18px 8px; text-align: center; }
.app-header h1 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.app-header .accent { color: var(--gold); }
.subtitle { margin-top: 2px; font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.02em; }

main {
  max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 20px;
  display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr);
}

/* ---- 答え（上部固定）---- */
.answer {
  position: sticky; top: 0; z-index: 20;
  margin: 0 calc(-1 * var(--gutter)); padding: 10px 16px 11px;
  background: linear-gradient(180deg, rgba(9, 28, 41, 0.97), rgba(9, 28, 41, 0.90));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-block: 1px solid var(--line-2);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

/* 未入力のあいだは案内と例が主役なので固定しない（入力欄を隠さない） */
.answer.is-idle { position: static; box-shadow: none; padding-block: 14px 16px; }

.idle-lead { font-size: 0.95rem; line-height: 1.6; }
.idle-lead b { color: var(--gold-2); font-weight: 700; }
.idle-sub { margin-top: 8px; font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.06em; }
.examples { display: grid; gap: 6px; margin-top: 6px; }
.example {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  min-height: var(--tap); padding: 8px 12px; text-align: left; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text);
}
.example:active { background: var(--surface-3); }
.example-title { font-weight: 700; font-size: 0.92rem; }
.example-sub { font-size: 0.74rem; color: var(--text-dim); }

.scene {
  display: flex; flex-wrap: wrap; column-gap: 0.5em;
  font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.01em; line-height: 1.4;
}
.scene span { white-space: nowrap; }
.scene span + span::before { content: '／'; margin-right: 0.5em; opacity: 0.55; }
.answer-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 2px; }
.eq { display: flex; flex-direction: column; flex: none; }
.eq-cap { font-size: 0.76rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.eq-figure { display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.eq-num {
  font-size: 3.5rem; font-weight: 800; color: var(--gold); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.02;
}
.eq-unit { font-size: 1.3rem; font-weight: 700; color: var(--gold); }

.mini-stats { display: flex; flex-direction: column; gap: 2px; text-align: right; padding-bottom: 5px; min-width: 0; }
.mini { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.mini b { font-size: 1.22rem; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; order: 2; }
.mini span { font-size: 0.72rem; color: var(--text-dim); order: 1; }

.eq-bar {
  display: flex; width: 100%; height: 10px; margin-top: 6px;
  border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, 0.35);
}
.eq-bar .seg { height: 100%; }
.eq-bar .win { background: var(--green); }
.eq-bar .tie { background: var(--tie); }
.eq-bar .loss { background: var(--loss); }

.answer-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.verdict { font-size: 0.86rem; font-weight: 700; }
.verdict.good { color: var(--green); }
.verdict.even { color: var(--gold-2); }
.verdict.bad { color: var(--bad); }
.verdict.error { color: var(--bad); font-weight: 600; }
.live-status { font-size: 0.68rem; color: var(--text-dim); font-variant-numeric: tabular-nums; margin-left: auto; }
.live-status.busy { color: var(--gold-2); }

/* ---- パネル共通 ---- */
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.panel-title { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; color: var(--gold-2); letter-spacing: 0.04em; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.field-label {
  display: block; font-size: 0.84rem; font-weight: 700; color: var(--text);
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.field-head .field-label { margin-bottom: 0; }
.field-label .opt { color: var(--text-dim); font-size: 0.7rem; font-weight: 400; margin-left: 6px; }
.field-note { margin-top: 8px; font-size: 0.72rem; color: var(--text-dim); line-height: 1.55; }

/* ---- 話す・打つ ---- */
.cmd-row { display: flex; gap: 10px; align-items: stretch; }
.mic-btn {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%;
  border: none; cursor: pointer; color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 6px 16px rgba(230, 180, 80, 0.30);
  display: grid; place-items: center;
}
.mic-btn.unavailable { background: var(--surface-3); color: var(--text-dim); box-shadow: none; border: 1px solid var(--line-2); }
.mic-btn.listening { background: linear-gradient(180deg, #ff9a85, var(--loss)); color: #fff; box-shadow: 0 6px 16px rgba(224, 102, 79, 0.35); }
.mic-btn.listening::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--loss); animation: mic-pulse 1.2s var(--ease-out) infinite;
}
@keyframes mic-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.55); opacity: 0; } }

.cmd-input, .range-input {
  width: 100%; min-width: 0; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: #0a1e2a; color: var(--text);
  padding: 10px 12px; font-size: 1rem; /* 16px 未満だと iOS が拡大する */
}
.cmd-input { flex: 1; min-height: 54px; }
.range-input { min-height: var(--tap); font-family: var(--font-mono); letter-spacing: 0.03em; }
.cmd-input::placeholder, .range-input::placeholder { color: rgba(170, 194, 207, 0.6); }
.cmd-input:focus, .range-input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.cmd-feedback { margin-top: 8px; font-size: 0.86rem; font-weight: 600; min-height: 1.3em; line-height: 1.5; }
.cmd-feedback.ok { color: var(--teal); }
.cmd-feedback.warn { color: var(--gold-2); }
.cmd-feedback.error { color: var(--bad); font-weight: 500; }
.cmd-feedback.listening { color: var(--gold-2); }
.cmd-hint { margin-top: 2px; font-size: 0.72rem; color: var(--text-dim); line-height: 1.55; }

/* ---- 自分の札 ---- */
.hero-summary { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); }
.hero-summary.muted { color: var(--text-dim); font-weight: 400; }
.hero-summary.ok { color: var(--teal); }
.hero-summary.good { color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(230, 180, 80, 0.4); }
.hero-summary.bad { color: var(--bad); }

.slots { display: flex; gap: 8px; }
.slot {
  position: relative; flex: 1; max-width: 56px; height: 62px;
  border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--card-face); color: var(--card-black);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; font-weight: 800; padding: 0; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
.slot.empty { background: rgba(255, 255, 255, 0.04); border-style: dashed; box-shadow: none; }
.slot.red { color: var(--card-red); }
.slot-rank { font-size: 1.5rem; line-height: 1; }
.slot-suit { font-size: 0.95rem; line-height: 1; opacity: 0.85; }
.slot-ph { font-size: 1.2rem; color: var(--text-dim); font-weight: 400; }
.slot-clear {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px;
  border-radius: 50%; background: #07181f; color: #fff; border: 1px solid var(--line-2);
  font-size: 0.78rem; display: grid; place-items: center; line-height: 1; z-index: 2;
}
.slot-clear::before { content: ''; position: absolute; inset: -11px; } /* タップ領域を44pxへ広げる */

.rank-pad { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.rank-btn {
  min-height: 48px; padding: 0; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text);
  font-size: 1.25rem; font-weight: 800;
  transition: transform var(--duration-fast) var(--ease-out);
}
.rank-btn:active { transform: scale(0.94); }
.rank-btn[aria-pressed="true"] {
  background: var(--card-face); color: var(--card-black); border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.3);
}
.rank-btn.pad-clear { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); background: transparent; }
.rank-btn:disabled { opacity: 0.35; cursor: default; }

/* ---- セグメント・チップ ---- */
.segmented { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.seg-btn {
  flex: 1; min-height: var(--tap); padding: 0 8px; border: none; background: var(--surface);
  color: var(--text-dim); font-size: 0.95rem; font-weight: 700; cursor: pointer;
  border-right: 1px solid var(--line-2);
}
.seg-btn:last-child { border-right: none; }
.seg-btn.active { background: var(--gold); color: var(--gold-ink); }

/* 選択肢は等幅の1行に並べる（個数ぶんの列を自動で作る） */
.chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.chip {
  min-height: 50px; padding: 4px 2px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.25;
}
.chip .choice-label { font-size: 0.95rem; font-weight: 800; white-space: nowrap; }
.chip .choice-hint { font-size: 0.66rem; color: var(--text-dim); white-space: nowrap; }
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip.active .choice-hint { color: rgba(40, 28, 5, 0.75); }
.chips.small .chip { min-height: var(--tap); }
.chips.small .choice-label { font-size: 0.8rem; font-weight: 700; }

.sub-field { margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.18); }
.sub-label { display: block; font-size: 0.74rem; color: var(--text-dim); margin-bottom: 6px; }
.range-meta { margin-top: 8px; font-size: 0.72rem; min-height: 1.2em; font-family: var(--font-mono); }
.range-meta.ok { color: var(--text-dim); }
.range-meta.error { color: var(--bad); font-family: var(--font); font-size: 0.8rem; }

.advanced { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.advanced summary, .app-footer summary { cursor: pointer; font-weight: 600; font-size: 0.82rem; color: var(--text-dim); min-height: 32px; display: flex; align-items: center; gap: 6px; }
.advanced summary::before, .app-footer summary::before { content: '＋'; color: var(--gold); font-weight: 700; }
.advanced[open] summary::before, .app-footer details[open] summary::before { content: '－'; }
.advanced summary::-webkit-details-marker, .app-footer summary::-webkit-details-marker { display: none; }
.advanced .field { margin-top: 10px; }

/* ---- くわしい結果 ---- */
.detail-section + .detail-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-title { margin: 0; font-size: 0.98rem; font-weight: 800; letter-spacing: 0.01em; }
.detail-sub { margin-top: 2px; font-size: 0.72rem; color: var(--text-dim); line-height: 1.55; }
.detail-note { margin-top: 8px; font-size: 0.72rem; color: var(--text-dim); line-height: 1.55; }
.detail-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.7rem; color: var(--text-dim); line-height: 1.6; }

.reach { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.reach-tile { text-align: center; padding: 8px 2px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.22); }
.reach-tile.key { background: rgba(230, 180, 80, 0.14); box-shadow: inset 0 0 0 1px rgba(230, 180, 80, 0.45); }
.reach-num { display: block; font-size: 1.12rem; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; line-height: 1.2; }
.reach-tile.key .reach-num { color: var(--gold-2); font-size: 1.3rem; }
.reach-lab { font-size: 0.7rem; color: var(--text-dim); }

.bars { margin-top: 12px; display: grid; gap: 5px; }
.bar-row, .compare-row { display: grid; align-items: center; gap: 8px; }
.bar-row { grid-template-columns: 5.6em minmax(0, 1fr) 3.6em; font-size: 0.8rem; }
.bar-label { color: var(--text); }
.bar-row.junk .bar-label { color: var(--text-dim); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.bar-track { display: block; height: 12px; border-radius: 4px; background: rgba(0, 0, 0, 0.28); overflow: hidden; }
.bar-fill {
  display: block; height: 100%; border-radius: 4px; background: var(--teal);
  transform: scaleX(var(--p, 0)); transform-origin: left center;
  transition: transform var(--duration-fast) var(--ease-out);
}
.bar-row.junk .bar-fill { background: var(--loss); }
.bar-divider {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 2px; padding-top: 6px; border-top: 1px dashed var(--line-2);
  font-size: 0.68rem; color: var(--teal);
}
.bar-divider .bad { color: var(--bad); }

.compare { margin-top: 10px; display: grid; gap: 8px; }
.compare-row {
  grid-template-columns: minmax(0, auto) minmax(36px, 1fr) 4em;
  padding: 9px 10px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.2);
}
.compare-row.best { background: rgba(90, 209, 154, 0.12); box-shadow: inset 0 0 0 1px rgba(90, 209, 154, 0.5); }
.compare-text { display: flex; flex-direction: column; min-width: 0; }
.compare-label { font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
.compare-sub { font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-mono); }
.compare-val { text-align: right; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.compare-row.best .compare-val { color: var(--green); }
.compare-row .bar-fill { background: var(--tie); }
.compare-row.best .bar-fill { background: var(--green); }

.outs-lead { margin-top: 10px; font-size: 0.86rem; }
.outs-lead b { color: var(--gold-2); font-size: 1.1rem; margin: 0 2px; }
.out-rows { margin-top: 8px; display: grid; gap: 4px; }
.out-row {
  display: grid; grid-template-columns: 7.6em minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.18); font-size: 0.8rem;
  border-left: 3px solid var(--teal);
}
.out-row.strong { border-left-color: var(--gold); background: rgba(230, 180, 80, 0.10); }
.out-row.junk { border-left-color: var(--loss); }
.out-row.junk .out-label { color: var(--text-dim); }
.out-label { font-weight: 700; }
.out-ranks { display: flex; gap: 3px; flex-wrap: wrap; }
.out-rank {
  min-width: 1.5em; padding: 1px 4px; text-align: center; border-radius: 4px;
  background: var(--card-face); color: var(--card-black); font-weight: 800; font-size: 0.8rem;
}
.out-row.junk .out-rank { background: rgba(255, 255, 255, 0.14); color: var(--text-dim); }
.out-num { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.out-num span { color: var(--text-dim); font-size: 0.74rem; min-width: 3.2em; text-align: right; }

/* ---- フッター ---- */
.app-footer { color: var(--text-dim); display: grid; gap: 6px; }
.app-footer details { font-size: 0.8rem; background: rgba(0, 0, 0, 0.16); border-radius: var(--radius-sm); padding: 6px 12px; }
.app-footer ul { margin: 6px 0 4px; padding-left: 18px; }
.app-footer li { margin: 5px 0; line-height: 1.6; }
.app-footer li b { color: var(--text); }
.app-footer code {
  font-family: var(--font-mono); background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px; border-radius: 5px; color: var(--gold-2); white-space: nowrap;
}
.help-note { font-size: 0.72rem; color: var(--text-dim); margin: 6px 0 4px; line-height: 1.55; }
.credit { text-align: center; font-size: 0.7rem; margin: 8px 0 12px; }

/* ---- カードピッカー（ボトムシート）---- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 40; }
.picker-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: linear-gradient(180deg, var(--surface-2), var(--felt-0));
  border-top-left-radius: 20px; border-top-right-radius: 20px; border-top: 1px solid var(--line-2);
  padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5); animation: sheet-up 0.2s var(--ease-out);
  max-height: 80dvh; overflow-y: auto;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.picker-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.picker-title { font-weight: 700; font-size: 0.95rem; }
.picker-count { font-size: 0.78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.picker-actions { display: flex; gap: 8px; margin-left: auto; }
.picker-clear, .picker-close {
  min-height: var(--tap); padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 0.84rem;
  cursor: pointer; border: 1px solid var(--line-2);
}
.picker-clear { background: var(--surface); color: var(--text-dim); }
.picker-close { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

.picker-grid { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 0 auto; }
.suit-row { display: grid; grid-template-columns: 22px repeat(13, 1fr); gap: 4px; align-items: center; }
.suit-tag { font-size: 1.1rem; text-align: center; }
.suit-tag.red { color: #ff8f86; }
.suit-tag.black { color: var(--text); }
.pick {
  min-height: 42px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--card-face); font-weight: 700; font-size: 0.92rem; cursor: pointer; padding: 0;
}
.pick.red { color: var(--card-red); }
.pick.black { color: var(--card-black); }
.pick.selected { outline: 3px solid var(--gold); background: var(--gold-2); }
.pick:disabled { opacity: 0.22; cursor: not-allowed; }

/* ---- 小さい画面 ---- */
@media (max-width: 360px) {
  .eq-num { font-size: 3rem; }
  .mini b { font-size: 1.05rem; }
  .mini span { font-size: 0.66rem; }
  .mini { gap: 4px; }
  .rank-btn { min-height: 44px; font-size: 1.1rem; }
  .reach-tile.key .reach-num { font-size: 1.12rem; }
  .reach-num { font-size: 1rem; }
  .out-row { grid-template-columns: 6.6em minmax(0, 1fr) auto; }
  /* 「8ロー以上」が1行4つに収まらない幅では 2×2 に折り返す */
  #patLevels { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 各カードボタンは最低 24px（WCAG 2.5.8）を確保。収まらなければ行を横スクロール。 */
  .picker-grid { overflow-x: auto; }
  .suit-row { grid-template-columns: 18px repeat(13, minmax(24px, 1fr)); gap: 2px; min-width: max-content; }
  .pick { min-height: 38px; min-width: 24px; font-size: 0.78rem; }
}

/* ---- 広い画面：左に入力、右にくわしい結果 ---- */
@media (min-width: 900px) {
  main {
    max-width: 1080px; column-gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "answer answer" "command detail" "inputs detail" "footer detail";
    grid-template-rows: auto auto auto 1fr; /* 右列が長いときの余りは最下段に逃がす（左列に隙間を作らない） */
    align-items: start;
  }
  .answer { grid-area: answer; margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 22px 16px; }
  .command { grid-area: command; }
  .inputs { grid-area: inputs; }
  .detail { grid-area: detail; }
  .app-footer { grid-area: footer; }
  .eq-num { font-size: 4.4rem; }
  .examples { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .picker-sheet, .mic-btn.listening::after { animation: none; }
  * { transition: none !important; }
}
