/* 同時通訳の画面。スマホ縦持ちで左右に並べる（対の文が同じ高さ・同じ色・同じ番号）。 */
:root {
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --ink2: #6b6b70;
  --line: #e3dfd6;
  --accent: #2f6fde;
  --ok: #1f9d55;
  --no: #c2410c;
  --fs: 1;
  --head-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15161a; --paper: #1f2026; --ink: #f2f2f5; --ink2: #a0a0aa; --line: #30313a; --accent: #6ea0ff;
  }
}
:root[data-theme="dark"] {
  --bg: #15161a; --paper: #1f2026; --ink: #f2f2f5; --ink2: #a0a0aa; --line: #30313a; --accent: #6ea0ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* 罠：列の幅を minmax(0,1fr) にしないと、下のボタンの列や長い見出しで画面がスマホより広がり、左が切れる（iPhone 幅 390 で実測） */
/* 縦に積む箱（見出し・文の段・境目・下の段・帯）。段の高さの分け方は --mine-fr / --aite-fr（app.js が境目の位置から置く） */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#app > * { min-width: 0; flex: 0 0 auto; }
:root { --col-l: minmax(0, 1fr); --col-r: minmax(0, 1fr); --mid-w: 30px; --mine-fr: 1; --aite-fr: 0; }
#app.loading { visibility: hidden; }

/* ---- 見出し ---- */
#heads { display: grid; grid-template-columns: var(--col-l) var(--mid-w) var(--col-r); gap: 0; background: var(--paper);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.head { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--head-h);
  padding: 6px 8px; flex-wrap: wrap; text-align: center; }
.head { overflow: hidden; }
.head .flag { font-size: 26px; line-height: 1; }
.head .lname { font-weight: 700; font-size: 17px; }
.head .sel { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; border-radius: 999px;
  padding: 4px 10px; font-size: 13px; font-weight: 600; }
.head.unset .flag, .head.unset .lname { display: none; }
.head.unset .sel { background: var(--accent); color: #fff; font-size: 15px; padding: 8px 14px; }
.guest .host-only { display: none !important; }

/* ---- 対の文 ---- */
#log { overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; padding: 10px 0 24px;
  flex: var(--mine-fr) 1 0 !important; min-height: 0; }
#rows { display: flex; flex-direction: column; gap: 8px; }
.pair { display: grid; grid-template-columns: var(--col-l) var(--mid-w) var(--col-r); align-items: stretch; padding: 0 8px;
  --h: 210; animation: rise .28s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.cell { background: hsl(var(--h) 70% 96%); border: 1.5px solid hsl(var(--h) 55% 84%);
  border-radius: 14px; padding: 10px 12px; font-size: calc(19px * var(--fs)); line-height: 1.5;
  word-break: break-word; overflow-wrap: anywhere; transition: background .3s, border-color .3s, box-shadow .3s; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cell { background: hsl(var(--h) 30% 18%); border-color: hsl(var(--h) 35% 30%); }
}
.cell .txt { opacity: .42; transition: opacity .45s ease, filter .45s ease; filter: blur(.2px); }
.cell.fin .txt { opacity: 1; filter: none; }
.cell .who { display: block; font-size: 11px; color: var(--ink2); margin-bottom: 2px; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.orig .who::before { content: "🎤 "; }
.cell[dir="rtl"] { text-align: right; }
.mid { position: relative; display: flex; align-items: center; justify-content: center; }
.mid::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 3px; transform: translateY(-50%);
  background: hsl(var(--h) 60% 70%); border-radius: 2px; }
.mid .no { position: relative; min-width: 26px; height: 26px; border-radius: 13px; background: hsl(var(--h) 60% 48%);
  color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.pair.live .mid .no { animation: beat 1s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.15); } }
/* 片方を触ると対も光る */
.pair.lit .cell { box-shadow: 0 0 0 3px hsl(var(--h) 80% 55%); background: hsl(var(--h) 85% 90%); }
.pair.flash .cell { animation: flash .9s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 hsl(var(--h) 80% 55% / .7); } 100% { box-shadow: 0 0 0 10px hsl(var(--h) 80% 55% / 0); } }

#empty { text-align: center; color: var(--ink2); padding: 12vh 20px 0; }
#empty .empty-big { font-size: 56px; opacity: .5; }
#empty .empty-msg { font-size: 18px; line-height: 1.7; white-space: pre-line; }
#empty .empty-name { margin-top: 18px; font-size: 13px; letter-spacing: .08em; opacity: .7; }
#rows:not(:empty) ~ #tail { height: 8px; }
.has-rows #empty { display: none; }

#newer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom));
  background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font-size: 16px;
  font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 5; }

/* ---- 下の帯 ---- */
#bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper);
  border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
#listen { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); min-width: 0; flex: 1 1 auto; }
#listen .dot { width: 12px; height: 12px; border-radius: 6px; background: #bbb; flex: none; }
#listen.on .dot { background: #e11d48; animation: beat 1.4s infinite; }
#listen .meter { width: 54px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; flex: none; }
#listen .meter i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s; }
#listen-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btns { display: flex; gap: 8px; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.bar-btns::-webkit-scrollbar { display: none; }
.bar-btns button { flex: none; }
.bar-btns button { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 8px 14px;
  font-size: 16px; font-weight: 600; min-height: 44px; }
/* 縁ything を開く入口（ほかのボタンと同じ見た目・派手な色なし） */
.bar-btns .bar-link { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--bg);
  color: inherit; text-decoration: none; border-radius: 12px; padding: 8px 14px; font-size: 16px; font-weight: 600; min-height: 44px; }
.bar-btns .bar-link[hidden] { display: none; }

/* ---- 重ね窓 ---- */
.ov { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; align-items: center;
  justify-content: center; padding: 20px; overflow-y: auto; }
/* 罠：align-items:center のままだと、中身が画面より高い時に上が切れてスクロールでも戻れない（iPhone SE で一覧の上が押せなかった）。
   中身の margin:auto で真ん中に置き、はみ出す時は上から読めるようにする */
.ov:not(.sheet-ov) { align-items: flex-start; justify-content: flex-start; }
.ov:not(.sheet-ov) > * { margin: auto; }
.sheet-ov { background: rgba(0,0,0,.45); align-items: flex-end; padding: 0; }
.sheet { background: var(--paper); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0 0 8px; font-size: 20px; }
.sheet h3 { margin: 18px 0 8px; font-size: 15px; color: var(--ink2); }
.sheet section { border-top: 1px solid var(--line); }
.sheet section:first-of-type { border-top: 0; }
.sheet .note { font-size: 13px; color: var(--ink2); margin: 6px 0 0; }
.sheet select, .sheet .row-btns button, .sheet section > button { font-size: 16px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); min-height: 44px; }
.sheet section > button { width: 100%; text-align: left; }
.sheet select { width: 100%; margin-top: 8px; }
.row-btns { display: flex; align-items: center; gap: 14px; }
.row-btns button { min-width: 64px; }
.sw { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.sw input { width: 22px; height: 22px; }
.danger button { color: var(--no); margin-top: 14px; }
.big { font-size: 20px; font-weight: 700; padding: 14px 22px; border-radius: 16px; border: 0; min-height: 56px; }
.close { width: 100%; margin-top: 18px; background: var(--bg); border: 1px solid var(--line); }

.member { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.member .m-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.member .m-view { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.member .m-view select { margin-top: 6px; }
.member .m-ctl { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 14px; flex-wrap: wrap; }
.member .m-ctl button { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.member .off { color: var(--ink2); font-weight: 400; font-size: 13px; }

.link { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.link:last-child { border-bottom: 0; }
.link-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.link-st { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.link-st.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.link-w { font-size: 14px; margin-top: 4px; }
.link-k { font-size: 13px; margin-top: 2px; opacity: .8; }
.addon { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 15px; }
.addon .st { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); min-width: 56px; }
.addon .st.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.addon .st.stop { background: #888; color: #fff; }

/* 登録 */
.reg { width: 100%; max-width: 520px; text-align: center; }
.ring { position: relative; width: 140px; height: 140px; margin: 10px auto 20px; display: flex; align-items: center; justify-content: center; }
.ring i { position: absolute; inset: 0; border-radius: 50%; background: hsl(210 90% 60% / .18);
  transform: scale(var(--lv, .6)); transition: transform .08s; }
.ring span { font-size: 54px; position: relative; }
#reg-words { display: grid; gap: 6px; }
#reg-words div { font-size: 20px; font-weight: 600; }
#reg-words div:first-child { font-size: 28px; }
#reg-words div[dir="rtl"] { direction: rtl; }
.link { background: none; border: 0; color: var(--accent); font-size: 16px; margin-top: 22px; padding: 10px; display: block; width: 100%; }
.ok-flag { font-size: 90px; line-height: 1.1; }
.ok-big { font-size: 38px; font-weight: 800; margin: 10px 0 6px; animation: rise .4s ease-out; }
.ok-sub { font-size: 16px; color: var(--ink2); }
.ok-btns { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.yes { background: var(--ok); color: #fff; min-width: 140px; }
.no { background: var(--bg); color: var(--no); border: 2px solid var(--no) !important; min-width: 140px; }
#flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; text-align: left; }
#flags button { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); font-size: 16px; min-height: 52px; }
#flags button .f { font-size: 26px; }
.list-title { font-size: 34px; margin-bottom: 10px; }

.start { background: var(--paper); border: 2px solid var(--accent); border-radius: 28px; padding: 30px 24px; width: 100%;
  max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.start-ico { font-size: 64px; }
#start-words div { font-size: 20px; font-weight: 700; line-height: 1.6; }
#start-words div:first-child { font-size: 26px; }

.qr-sheet { text-align: center; }
#qr-box { display: flex; justify-content: center; padding: 10px; background: #fff; border-radius: 16px; }
#qr-box svg, #qr-box img { width: min(76vw, 320px); height: auto; }
.qr-words { margin-top: 10px; font-size: 16px; font-weight: 600; line-height: 1.6; }
#qr-url { font-size: 12px; color: var(--ink2); word-break: break-all; margin-top: 6px; }

.ended { text-align: center; }
.ended-ico { font-size: 70px; }
#ended-words div { font-size: 22px; font-weight: 700; line-height: 1.7; }
#ended-words div:first-child { font-size: 28px; }

/* 知らせの置き場（黒い知らせ＋お知らせ）。下のボタンの段のすぐ上（bottom は app.js の dockPlace が測って置く）。
   出ている間は --dock-h の分だけ文の欄を縮める＝ボタンにも文にも重ならない */
#dock { position: fixed; left: 8px; right: 8px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 35; margin: 0 auto;
  max-width: 520px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#dock.kakusu { display: none; }
#log { margin-bottom: var(--dock-h, 0px); }
#toast { align-self: center; pointer-events: auto;
  background: rgba(20,20,25,.88); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px;
  max-width: 100%; box-sizing: border-box; text-align: center; }

/* 横持ち・大きい画面はゆったり */
@media (min-width: 760px) {
  .cell { font-size: calc(22px * var(--fs)); padding: 14px 18px; }
  :root { --mid-w: 40px; }
  .pair { padding: 0 16px; }
  .cell.mine { font-size: calc(24px * var(--fs)); }
  .cell.aite { font-size: calc(19px * var(--fs)); }
  .head .lname { font-size: 20px; }
}

/* 無料の口：このスマホが聞いている言葉に 🎤。ホストは見出しを触って左右を切り替える */
.head.listening .lname::after { content: " 🎤"; font-size: .8em; }
body.host .head { cursor: pointer; }

/* ---- アドオンの見た目（アドオンが切でも害はない） ---- */
#addon-bar { display: contents; }
.bar-btns .addon-btn { font-size: 18px; padding: 8px 10px; }
.cell .modoshi { display: block; margin-top: 6px; font-size: calc(13px * var(--fs)); color: var(--ink2); }
mark.suuji { background: rgba(255, 200, 0, .28); color: inherit; border-radius: 4px; padding: 0 2px; font-weight: 700; }
mark.suuji[data-c]::after { content: " " attr(data-c); font-size: .62em; font-weight: 400; color: var(--ink2); }
#ov-hitokoto .hk-list { display: grid; gap: 8px; margin: 12px 0; }
#ov-hitokoto .hk { text-align: left; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
#ov-hitokoto .hk.own { border-color: var(--accent); }
#ov-hitokoto .hk-add { display: flex; gap: 8px; margin-bottom: 12px; }
#ov-hitokoto .hk-add input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
#ov-hitokoto .hk-add button { font-size: 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
#pdf-head { display: none; }
@media print {
  #pdf-head { display: block; font-size: 14px; margin: 0 0 10px; color: #000; }
  html, body { height: auto; background: #fff; color: #000; }
  #app { display: block; height: auto; }
  #heads { position: static; }
  #log { overflow: visible; height: auto; }
  #bar, #newer, #lag, .ov, #toast, #heads button, #sakai, #log2, #btn-kao { display: none !important; }
  /* 紙には、境目の位置にかかわらず両方の言葉を左右に並べて残す */
  .pair, #heads { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) !important; }
  .pair > .cell.aite, #heads .head[data-pane="1"] { display: flex !important; }
  #sakai-yoko { visibility: hidden; }
  .pair { break-inside: avoid; }
}

/* ---- 吹き出しの型（案C・お客様の画面。ホストが ⚙ で切り替える） ---- */
.bub { display: none; }
body.lay-bubble .pair { display: flex; flex-direction: column; align-items: flex-start; padding: 0 12px; }
body.lay-bubble .pair .cell, body.lay-bubble .pair .mid { display: none; }
body.lay-bubble .bub { display: block; max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 18px 4px;
  background: hsl(var(--h) 70% 96%); border: 1.5px solid hsl(var(--h) 55% 84%); transition: box-shadow .3s, background .3s; }
body.lay-bubble .pair.me { align-items: flex-end; }
body.lay-bubble .pair.me .bub { border-radius: 18px 18px 4px 18px; background: hsl(210 80% 93%); border-color: hsl(210 60% 80%); }
.bub .o { font-size: calc(13px * var(--fs)); color: var(--ink2); margin-bottom: 3px; line-height: 1.4; word-break: break-word; }
.bub .o:empty { display: none; }
.bub .t { font-size: calc(21px * var(--fs)); font-weight: 700; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere;
  opacity: .45; transition: opacity .45s; }
.bub.fin .t { opacity: 1; }
.bub [dir="rtl"] { text-align: right; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.lay-bubble .bub { background: hsl(var(--h) 30% 18%); border-color: hsl(var(--h) 35% 30%); }
  :root:not([data-theme="light"]) body.lay-bubble .pair.me .bub { background: hsl(210 40% 22%); border-color: hsl(210 40% 34%); }
}
body.lay-bubble .pair.lit .bub { box-shadow: 0 0 0 3px hsl(var(--h) 80% 55%); }
body.lay-bubble .pair.flash .bub { animation: flash .9s ease-out; }

/* 自分の声が字になっている間、このスマホの縁が光る */
#app { position: relative; }
#app::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 15; border-radius: 0;
  box-shadow: inset 0 0 0 0 transparent; transition: box-shadow .25s; }
body.talking #app::after { box-shadow: inset 0 0 0 5px #e11d48, inset 0 0 22px 6px rgba(225, 29, 72, .35); }

/* 言い終わってから訳が出るまでの秒（右上に小さく） */
#lag { position: fixed; top: calc(4px + env(safe-area-inset-top)); right: 6px; z-index: 6; font-size: 11px;
  color: var(--ink2); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1px 6px; opacity: .85; }
/* ほかのモードの入口（設定の奥）：入りのアドオンが無い時は欄ごと隠す */
#mode-sec:not(:has(#mode-btns button:not([hidden]))) { display: none; }
#mode-btns .addon-btn { font-size: 16px; font-weight: 700; }
#layout-btns button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
#kidou-btns { flex-wrap: wrap; gap: 8px; }
#kidou-btns button { min-width: 0; }
#kidou-btns button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
#rows .pair { -webkit-touch-callout: none; } /* 長押し（ゆっくり読む）で iPhone の囲みを出さない */

/* ---- 登録の聞き直し ---- */
#reg-again { background: #fff4e5; color: #8a4b00; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; text-align: center; }
#reg-again div { font-size: 16px; line-height: 1.6; }
#reg-again div:first-child { font-size: 20px; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #reg-again { background: #3a2a12; color: #ffd08a; } }

/* ---- アドオン：写真・間取り図 ---- */
#ad-pic-view { background: rgba(0,0,0,.92); flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; z-index: 30; }
#ad-pic-view .pv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; color: #ddd; font-size: 14px; }
#ad-pic-view .pv-close { font-size: 16px; padding: 10px 14px; border-radius: 999px; border: 0; background: #fff; color: #111; flex: none; }
#ad-pic-view .pv-img { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; -webkit-overflow-scrolling: touch; }
#ad-pic-view .pv-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
#ad-pic-view .pv-img.zoom { display: block; }
#ad-pic-view .pv-img.zoom img { max-width: none; max-height: none; width: 250%; }
.pv-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.pv-thumbs:empty { display: none; }
.pv-th { flex: none; width: 72px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #333; }
.pv-th.on { border-color: var(--accent); }
.pv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-thumbs { flex-wrap: wrap; padding: 12px 0; }
.ps-pick { display: block; text-align: center; background: var(--accent); color: #fff; border-radius: 14px; padding: 14px; font-size: 18px; margin-top: 8px; cursor: pointer; }

/* ---- アドオン：3行のまとめ ---- */
#ended-extra { margin-top: 22px; display: grid; gap: 12px; text-align: left; }
/* リバベルを渡す（QR）。お客様の終わりの画面では小さく・真面目な言葉だけ */
.watasu-qr { display: flex; justify-content: center; padding: 8px; background: #fff; border-radius: 14px; }
.watasu-qr svg { width: min(60vw, 220px); height: auto; }
.watasu-qr.chiisai svg { width: min(34vw, 120px); }
.watasu-url { font-size: 12px; color: var(--ink2); word-break: break-all; }
.kai-mei { margin: 6px 0 0; font-size: 12px; color: var(--ink2); text-align: center; letter-spacing: .04em; }
#ended-watasu { margin-top: 26px; display: grid; justify-items: center; gap: 8px; }
#ended-watasu[hidden] { display: none; }
#ended-watasu a { font-size: 14px; color: var(--ink2); }
/* 縁ything へ移る前に1回だけ聞く */
.utsuru-btns { display: flex; gap: 12px; margin-top: 16px; }
.utsuru-btns .big { flex: 1; min-width: 0; }
.mt-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.mt-card .mt-title { font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.mt-card ol { margin: 0; padding-inline-start: 22px; font-size: 18px; line-height: 1.6; }
.mt-card.small { opacity: .8; }
.mt-card.small .mt-title, .mt-card.small ol { font-size: 15px; }
#ov-matome .mt-body { display: grid; gap: 10px; margin: 10px 0 14px; }
.mt-wait { color: var(--ink2); font-size: 16px; text-align: center; }

/* スマホの幅（ホストは下のボタンが6つ並ぶ）：ボタンを詰めて1列に収める */
@media (max-width: 480px) {
  #bar { padding-left: 8px; padding-right: 8px; gap: 6px; flex-wrap: wrap; row-gap: 2px; padding-top: 4px; }
  #listen { flex: 1 1 100%; min-height: 18px; }
  /* ボタンが多い時（アドオンを入れた時・👥）は2段に折り返す（右寄せで横に流すと左のボタンが見えなくなる） */
  .bar-btns { gap: 5px; flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; row-gap: 5px; overflow: visible; }
  .bar-btns button { padding: 8px 9px; min-width: 44px; }
  .bar-btns .bar-link { padding: 8px 9px; }
  .bar-btns .addon-btn { padding: 8px 6px; }
  #listen { gap: 5px; }
  #listen .meter { width: 28px; }
  .head .sel { padding: 3px 8px; font-size: 12px; }
}

/* お客様の一覧（ホスト）・お待ちください（お客様） */
#btn-kyaku { position: relative; }
#btn-kyaku.knock::after { content: ''; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--no); animation: knock 1s ease-in-out infinite alternate; }
@keyframes knock { from { opacity: .35; } to { opacity: 1; } }
#kyaku-now { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 4px; }
#kyaku-now button, .kyaku button { font-size: 15px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.kyaku { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.kyaku .k-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; }
.kyaku .k-knock { display: none; font-size: 13px; color: var(--no); font-weight: 700; }
.kyaku.knock { border-color: var(--no); }
.kyaku.knock .k-knock { display: inline; }
.kyaku .k-sub { font-size: 13px; color: var(--ink2); margin: 4px 0 8px; overflow-wrap: anywhere; }
.kyaku .k-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.kyaku .k-go { font-weight: 700; }
.kyaku .k-done { color: var(--no); margin-left: auto; }
#paused { position: fixed; top: calc(env(safe-area-inset-top) + 76px); left: 8px; right: 8px; z-index: 30; margin: 0 auto; max-width: 560px; padding: 14px 16px; border-radius: 14px; background: #fff6d8;
  border: 1px solid #e8cf7a; font-size: calc(17px * var(--fs, 1)); line-height: 1.5; }
#paused > div + div { margin-top: 6px; font-size: .85em; color: var(--ink2); }

/* ---- AI ゲージ（ホストの上の端に細く。帯＝残り） ---- */
/* 見出しの上の自分の段（2つの見出しにまたがる）。棒は幅いっぱい・太さ 28px・字は棒の中 */
#gauge { grid-column: 1 / -1; padding: 6px 10px; border-bottom: 1px solid var(--line); pointer-events: none; }
#gauge .g-bou { position: relative; width: 100%; height: 28px; border-radius: 14px; background: var(--line); overflow: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.06); }
#gauge i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ok); transition: width .3s; }
#gauge b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px;
  font-weight: 700; color: var(--ink); white-space: nowrap; text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper); }
#gauge.sukunai i { background: #eab308; }
#gauge.sukunai .g-bou { box-shadow: inset 0 0 0 2px #eab308; }
#gauge.ippai i { background: #e11d48; }
#gauge.ippai .g-bou { box-shadow: inset 0 0 0 2px #e11d48; }
#gauge.ippai b { color: #b0103a; }
#matte { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 64px); z-index: 30;
  background: #fff6d8; color: #6b4e00; border-radius: 12px; padding: 10px 16px; font-size: 17px; font-weight: 600; max-width: 90vw; text-align: center; }

/* ---- お知らせ（ホストだけ・1か所） ---- */
#oshirase { display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#os-h { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 13px; color: var(--ink2); }
#os-e { width: 32px; height: 32px; border-radius: 16px; overflow: hidden; flex: none; }
#os-list { display: flex; flex-direction: column; gap: 6px; }
.os-i { pointer-events: auto; display: flex; align-items: flex-start; gap: 8px; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line); border-left: 5px solid var(--accent); border-radius: 12px; padding: 10px 10px 10px 12px;
  font-size: 16px; line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.os-i.warn { border-left-color: #e11d48; }
.os-i.chiisai { font-size: 13px; padding: 5px 8px 5px 10px; border-left-width: 3px; box-shadow: none; }
.os-t { flex: 1 1 auto; min-width: 0; }
.os-x { flex: none; border: 0; background: transparent; color: var(--ink2); font-size: 16px; padding: 2px 6px; cursor: pointer; }

/* ---- ご意見・不具合 ---- */
.goiken-btns { display: flex; gap: 8px; }
.goiken-btns button { flex: 1 1 0; }
#ov-goiken textarea { width: 100%; box-sizing: border-box; font-size: 17px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); margin-top: 8px; }
.gk-photo { margin-top: 10px; }
.gk-add { display: inline-block; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
#gk-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#gk-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gk-go { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }
.gk-go .close { font-size: 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* ---- お世話係の絵（入りの時だけ。切りの時は入れ物ごと作らない）---- */
.os-e { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fbf6ea; }

/* ==== 2026-11-26 社長：自分の言葉を大きく・相手の段は自分で狭められる（ほぼ0まで）・スマホ縦は上下2段 ==== */
/* 自分の言葉（左／上）は大きく、相手の言葉（右／下）は少し小さく */
.cell.mine { font-size: calc(21px * var(--fs)); }
.cell.aite { font-size: calc(17px * var(--fs)); }

/* 境目（左右の形）：見出しの真ん中の細い帯。左右に引くと相手の段の幅が変わる・触ると細く⇔戻す */
#sakai-yoko { display: flex; align-items: center; justify-content: center; cursor: col-resize; touch-action: none;
  user-select: none; -webkit-user-select: none; min-height: var(--head-h); }
#sakai-yoko i { width: 4px; height: 28px; border-radius: 2px; background: var(--line); transition: background .2s; }
#sakai-yoko:hover i, #sakai-yoko.hiku i { background: var(--accent); }
body.lay-bubble #heads { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); }
body.lay-bubble #sakai-yoko, body.lay-bubble #sakai, body.lay-bubble #log2 { display: none !important; }
/* 相手の段をほぼ0まで狭めた時：相手の言葉を出さない（境目の帯だけ残る＝引けば戻る） */
body.lay-yoko.aite-0 .pair > .cell.aite, body.lay-yoko.aite-0 #heads .head[data-pane="1"] { display: none; }

/* ---- 上下2段（スマホ縦持ち）：上＝自分の言葉・下＝相手の言葉。同じ番号・同じ色の札が一緒に光り、一緒に流れる ---- */
#sakai, #log2 { display: none; }
body.lay-dan #heads { grid-template-columns: minmax(0, 1fr); }
body.lay-dan #sakai-yoko { display: none; }
body.lay-dan #rows .pair { grid-template-columns: var(--mid-w) minmax(0, 1fr); }
body.lay-dan #rows .pair > .mid { order: -1; }
body.lay-dan #rows .pair > .cell.aite { display: none; }
body.lay-dan #sakai { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative;
  min-height: 40px; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: row-resize; touch-action: none; user-select: none; -webkit-user-select: none; flex: 0 0 auto; }
#sakai .grip-bar { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 44px; height: 4px;
  border-radius: 2px; background: var(--line); transition: background .2s; }
#sakai.hiku .grip-bar, #sakai:hover .grip-bar { background: var(--accent); }
#sakai .head { min-height: 36px; padding: 6px 8px 2px; }
#sakai .head .flag { font-size: 20px; }
#sakai .head .lname { font-size: 15px; }
body.lay-dan #log2 { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative;
  padding: 8px 0 16px; flex: var(--aite-fr) 1 0; min-height: 0; background: var(--bg); }
body.lay-dan #log { padding-bottom: 12px; }
#rows2 { display: flex; flex-direction: column; gap: 6px; }
.pair.twin { grid-template-columns: var(--mid-w) minmax(0, 1fr); }
.pair.twin .mid .no { min-width: 22px; height: 22px; font-size: 11px; }
#rows2 .pair { -webkit-touch-callout: none; }
/* 下の段をほぼ0まで狭めた時：段は消え、境目の帯（相手の言葉の名札）だけ残る */
body.lay-dan.aite-0 #log2 { flex: 0 0 0; padding: 0; overflow: hidden; }
body.lay-dan:not(.aite-0) #log { margin-bottom: 0; }
body.lay-dan:not(.aite-0) #log2 { margin-bottom: var(--dock-h, 0px); }

/* ---- 顔の丸（写真・アイコン・名前の頭文字）。どの文も頭に話した人の顔 ---- */
.cell { display: flex; align-items: flex-start; gap: 8px; }
.cell .cb { flex: 1 1 auto; min-width: 0; }
.kao { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; overflow: hidden; background: hsl(var(--kh, 210) 55% 46%); color: #fff; font-size: 12px;
  font-weight: 700; line-height: 1; letter-spacing: -.02em; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 2px var(--paper); }
.kao.ikon { background: hsl(var(--kh, 210) 60% 90%); font-size: 18px; }
.kao.photo { background: var(--line); }
.kao img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell.aite .kao { width: 26px; height: 26px; font-size: 11px; }
.cell.aite .kao.ikon { font-size: 16px; }
@media (min-width: 760px) { .kao { width: 36px; height: 36px; font-size: 14px; } .cell.aite .kao { width: 30px; height: 30px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kao.ikon { background: hsl(var(--kh, 210) 30% 28%); }
}
body.lay-bubble .bub { display: flex; align-items: flex-start; gap: 8px; }
body.lay-bubble .pair.me .bub { flex-direction: row-reverse; }
.bub .bc { flex: 1 1 auto; min-width: 0; }
.member .m-top .kao { width: 26px; height: 26px; font-size: 11px; margin-right: 6px; vertical-align: middle; }

/* 自分の顔のボタン（下の帯）と、写真・アイコンをえらぶ窓 */
#btn-kao { padding: 4px 6px; }
#btn-kao .kao { width: 30px; height: 30px; }
.kao-sheet { text-align: center; }
.kao-sheet h3 { font-size: 15px; margin: 16px 0 8px; color: var(--ink2); font-weight: 600; }
.kao-now { display: flex; justify-content: center; margin: 8px 0 12px; }
.kao.kao-big { width: 96px; height: 96px; font-size: 36px; box-shadow: 0 0 0 3px var(--line); }
.kao.kao-big.ikon { font-size: 54px; }
.kao-pick { display: inline-block; font-size: 17px; padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--accent);
  color: var(--accent); font-weight: 700; cursor: pointer; }
#kao-ikon { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
#kao-ikon .ik { height: 46px; font-size: 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); padding: 0; }
#kao-ikon .ik[data-ikon=""] { font-size: 15px; font-weight: 700; }
#kao-ikon .ik.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#kao-name { width: 100%; box-sizing: border-box; font-size: 17px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); }

/* ==== 2026-11-27 社長「日本語とか表示されるところが縦の幅をとって…国旗だけ出して、〇ホの下にでもおいたらどうだ」
   「ミニボタンも左右どっちかの端に寄せよう」 ====
   横持ちの上下2段：見出しの帯をやめ、国旗の小さな札を段の右上に浮かせる（国旗を触る＝その言葉だけで聞く・▾＝言葉を選ぶ）。
   どの文も顔の丸の下に国旗。境目の帯は細くし、引くつまみは左の端へ。 */
.kao-col { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.hata { display: none; font-size: 15px; line-height: 1; }
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  body.lay-dan #app { position: relative; }
  body.lay-dan .hata { display: block; }
  body.lay-dan #heads { position: absolute; top: calc(env(safe-area-inset-top) + 4px); right: 8px; z-index: 6;
    background: transparent; border: 0; padding: 0; display: block; }
  body.lay-dan .head:not(.unset) { min-height: 0; padding: 2px 4px 2px 8px; gap: 2px; flex-wrap: nowrap;
    background: var(--paper); border: 1px solid var(--line); border-radius: 999px; opacity: .92; }
  body.lay-dan .head:not(.unset) .lname { display: none; }
  body.lay-dan .head:not(.unset) .flag { font-size: 20px; }
  body.lay-dan .head:not(.unset) .sel { font-size: 0; padding: 2px 6px; border: 0; line-height: 1; }
  body.lay-dan .head:not(.unset) .sel::after { content: "▾"; font-size: 14px; }
  body.lay-dan .head.listening:not(.unset) { border-color: var(--accent); }
  body.lay-dan .head.listening .lname::after { content: none; }
  body.lay-dan .head.listening .flag::after { content: "🎤"; font-size: 12px; }
  body.lay-dan #sakai { min-height: 16px; z-index: 6; overflow: visible; }
  body.lay-dan #sakai .grip-bar { left: 14px; top: 50%; transform: translateY(-50%); width: 40px; }
  body.lay-dan #sakai .head { position: absolute; right: 8px; top: calc(100% + 4px); }
  body.lay-dan #sakai .head.unset { position: static; }
}
/* 全ソフト共通のデバッグツールの🐞（右下に浮く）が、帯のいちばん右のボタンに重ならないように右を空ける */
body:has(#bugt-btn) #bar { padding-right: 64px; }

/* ==== 2026-11-27 社長「なるべくたくさんの列を表示したいので、名前の横の列に小さい文字を出そうか」
   「ミニボタンたちの場所がかわってねえ。左右のどちらかに縦に並べろ。じゃまだ」 ====
   横持ちの上下2段：下の帯をやめ、ボタンを左の端に縦に並べる（2列）。訳し戻しの小さい字は名前の横の行へ。 */
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  body.lay-dan { --bar-w: 100px; }
  body.lay-dan #app { padding-left: var(--bar-w); }
  body.lay-dan #bar, body.lay-dan:has(#bugt-btn) #bar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--bar-w); z-index: 7;
    flex-direction: column; justify-content: flex-start; align-items: center; flex-wrap: nowrap; gap: 6px; overflow-y: auto;
    padding: calc(env(safe-area-inset-top) + 6px) 4px calc(env(safe-area-inset-bottom) + 6px) calc(env(safe-area-inset-left) + 4px);
    border-top: 0; border-right: 1px solid var(--line); }
  body.lay-dan #listen { flex: none; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; }
  body.lay-dan #listen .meter { width: 40px; }
  body.lay-dan #listen-msg { white-space: normal; font-size: 10px; line-height: 1.25; text-align: center; width: 100%; }
  body.lay-dan .bar-btns { display: grid; grid-template-columns: repeat(2, 42px); gap: 5px; flex: none; overflow: visible; justify-content: center; }
  body.lay-dan .bar-btns button, body.lay-dan .bar-btns .addon-btn { width: 42px; height: 40px; min-width: 0; padding: 0; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
  body.lay-dan #btn-qr span { display: none; }
  body.lay-dan .bar-btns .bar-link { grid-column: 1 / -1; justify-content: center; font-size: 12px; padding: 6px 2px; }
  body.lay-dan #dock { left: calc(var(--bar-w) + 8px); }
  body.lay-dan #newer { left: calc(50% + var(--bar-w) / 2); bottom: calc(12px + env(safe-area-inset-bottom)); }
  /* 名前の行の横に訳し戻しの小さい字（文の行を1つ減らす） */
  body.lay-dan .cell .cb { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
  body.lay-dan .cell .who { grid-column: 1; grid-row: 1; }
  body.lay-dan .cell .txt { grid-column: 1 / -1; grid-row: 2; }
  body.lay-dan .cell .modoshi { grid-column: 2; grid-row: 1; margin-top: 0; font-size: calc(11px * var(--fs)); line-height: 1.3; }
  body.lay-dan .cell .who[hidden] + .txt ~ .modoshi { grid-column: 1 / -1; }
}
/* ==== 2026-11-27 社長（デバッグ報告で赤丸）「左側の番号みたいなやついらんぞ」 ====
   横持ちの上下2段：文の左の番号の丸を出さず、その幅も字に回す（対の札は触ると上下一緒に光るので見分けられる） */
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  body.lay-dan #rows .pair, body.lay-dan #rows2 .pair.twin { grid-template-columns: minmax(0, 1fr); }
  body.lay-dan #rows .pair > .mid, body.lay-dan #rows2 .pair > .mid { display: none; }
  body.lay-dan #log, body.lay-dan #log2 { padding-left: 8px; }
}

/* 画面切り替え（自分の言葉だけ ⇔ 両方）のボタン。自分の言葉だけの時は色がつく。吹き出しの形では使わない */
#btn-kiri { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 12px;
  padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
#btn-kiri .k-ico { font-style: normal; font-size: 18px; line-height: 1; }
#btn-kiri.on { background: var(--accent); color: #fff; border-color: var(--accent); }
body.lay-bubble #btn-kiri { display: none; }
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  /* 左の列に全部のボタンが収まるように（画面の高さ 360 前後でも縦に流れ出ない） */
  body.lay-dan #bar, body.lay-dan:has(#bugt-btn) #bar { gap: 4px; overflow-x: hidden; }
  body.lay-dan .bar-btns { gap: 4px; }
  body.lay-dan .bar-btns button, body.lay-dan .bar-btns .addon-btn { height: 36px; }
  body.lay-dan .bar-btns .bar-link { padding: 4px 2px; }
}
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  body.lay-dan .bar-btns .bar-link { grid-column: auto; width: 42px; height: 36px; padding: 0; font-size: 9px; letter-spacing: -.02em;
    border-radius: 10px; overflow: hidden; }
}
/* ==== 2026-11-27 社長（LINE の画面写真を見せて）「明らかにこっちの方が文字が多く映ってねえか、この列が。参考にしてください。」 ====
   横持ちの上下2段：吹き出しを LINE のように詰める。名前の行は出さない（誰かは顔の丸で分かる）、余白・間・顔の丸を小さく。
   訳し戻しの小さい字がある時だけ、字の上に1行。 */
@media all { /* 上下2段なら縦持ちでも（2026-11-27 社長「どこが直ってるんだよ」） */
  body.lay-dan #rows, body.lay-dan #rows2 { gap: 4px; }
  body.lay-dan #log { padding-top: 4px; }
  body.lay-dan #log2 { padding-top: 4px; }
  body.lay-dan .cell { padding: 5px 10px; border-radius: 12px; line-height: 1.38; gap: 8px; align-items: center; }
  body.lay-dan .cell .who { display: none; }
  body.lay-dan .cell .modoshi { grid-column: 1 / -1; grid-row: 1; margin: 0 0 1px; }
  body.lay-dan .kao-col { gap: 1px; }
  body.lay-dan .kao, body.lay-dan .cell.aite .kao { width: 24px; height: 24px; font-size: 10px; }
  body.lay-dan .hata { font-size: 12px; }
}
/* 縦持ちの上下2段：左のボタンの列は1列で細く（字の幅を残す） */
@media (orientation: portrait) {
  body.lay-dan { --bar-w: 54px; }
  body.lay-dan .bar-btns { grid-template-columns: 42px; }
  body.lay-dan #listen .meter { width: 36px; }
  body.lay-dan #listen-msg { font-size: 9px; }
}
/* 縦持ちの上下2段：字も LINE くらいに（行が多く入るように） */
@media (orientation: portrait) {
  body.lay-dan .cell.mine { font-size: calc(17px * var(--fs)); }
  body.lay-dan .cell.aite { font-size: calc(15px * var(--fs)); }
  body.lay-dan .cell { line-height: 1.4; padding: 5px 9px; }
}

/* 上下2段：切り替えボタンは左の列の下の空き所に大きく（ワンタッチで 2つ割り ⇔ 自分だけ） */
body.lay-dan #btn-kiri { margin-top: auto; width: calc(100% - 4px); min-height: 64px; flex-direction: column; justify-content: center;
  gap: 4px; padding: 8px 2px; font-size: 11px; line-height: 1.2; }
body.lay-dan #btn-kiri .k-ico { font-size: 24px; }
@media (orientation: portrait) {
  body.lay-dan #btn-kiri { min-height: 120px; font-size: 12px; }
  body.lay-dan #btn-kiri .k-ico { font-size: 28px; }
}
@media (orientation: landscape) {
  /* 横持ちは高さが足りないので、絵と字を横に並べた低いボタンにする（列から切れない） */
  body.lay-dan #btn-kiri { min-height: 0; flex-direction: row; gap: 4px; padding: 6px 2px; flex: none; }
  body.lay-dan #btn-kiri .k-ico { font-size: 18px; }
  body.lay-dan #listen { gap: 2px; }
}
