/* つうじる — カウンターに置く通訳。
   上半分＝お客さん（英語・檜の色、向かい合わせで逆さ）、下半分＝スタッフ（日本語・藍の色）、まんなかに操作の帯。 */
:root {
  --ja-bg: #1b2c4a;      /* 藍 */
  --ja-fg: #eef2f8;
  --ja-sub: #a9b8d2;
  --en-bg: #ead7b0;      /* 檜 */
  --en-fg: #2b2010;
  --en-sub: #6f5a35;
  --bar-bg: #101318;
  --bar-fg: #f2f3f5;
  --bar-sub: #8d939e;
  --live: #3ccf9a;       /* 聞いている合図（若竹） */
  --warn: #f2b33d;
  --err: #ef6a5a;
  --sheet-bg: #fbfaf7;
  --sheet-fg: #1d222b;
  --sheet-sub: #646b78;
  --sheet-line: #e2e0d9;
  --seg-on: #1b2c4a;
  --chip-ja: rgba(255, 255, 255, .1);
  --chip-en: rgba(60, 40, 10, .1);
  --font-ja: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-en: "Figtree", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --scale: 1;
  --lvl: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ja-bg: #142139; --ja-fg: #e6ebf4; --ja-sub: #8e9dba;
    --en-bg: #3b2e18; --en-fg: #f3e4c4; --en-sub: #c3ab7c;
    --bar-bg: #07090c; --chip-en: rgba(255, 240, 210, .1);
    --sheet-bg: #191c22; --sheet-fg: #eceef2; --sheet-sub: #9aa1ad; --sheet-line: #2c3039; --seg-on: #3ccf9a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ja-bg: #142139; --ja-fg: #e6ebf4; --ja-sub: #8e9dba;
  --en-bg: #3b2e18; --en-fg: #f3e4c4; --en-sub: #c3ab7c;
  --bar-bg: #07090c; --chip-en: rgba(255, 240, 210, .1);
  --sheet-bg: #191c22; --sheet-fg: #eceef2; --sheet-sub: #9aa1ad; --sheet-line: #2c3039; --seg-on: #3ccf9a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bar-bg);
  color: var(--bar-fg);
  font-family: var(--font-ja);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--live); outline-offset: 2px; }

.app {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

/* ---- 半分ずつの画面 ---- */
.half {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: box-shadow .25s ease;
}
.half-ja { background: var(--ja-bg); color: var(--ja-fg); padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
.half-en { background: var(--en-bg); color: var(--en-fg); font-family: var(--font-en); padding-top: max(14px, env(safe-area-inset-top, 0px)); }
.app[data-face="on"] .half-en { transform: rotate(180deg); padding-top: 14px; padding-bottom: max(14px, env(safe-area-inset-top, 0px)); }

.half.speaking { box-shadow: inset 0 0 0 4px var(--live); }
.half.selected { box-shadow: inset 0 0 0 4px var(--warn); }

.half-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; letter-spacing: .06em; }
.half-ja .half-head { color: var(--ja-sub); }
.half-en .half-head { color: var(--en-sub); }
.who { font-weight: 700; margin-right: auto; }
.langs { display: flex; gap: 4px; }
.langs button {
  border: 1.5px solid currentColor; background: transparent; color: inherit;
  border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 700; letter-spacing: 0; opacity: .7;
}
.langs button[aria-pressed="true"] { background: var(--en-fg); color: var(--en-bg); border-color: var(--en-fg); opacity: 1; }
.tag { font-weight: 700; padding: 2px 10px; border-radius: 999px; background: transparent; }
.tag:empty { display: none; }
/* いまの通訳のしくみ（スタッフ側の上。押すと設定） */
.mode-chip {
  flex: 0 0 auto; border: 1.5px solid rgba(255, 255, 255, .28); background: transparent; color: var(--ja-fg);
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4;
  display: inline-flex; align-items: center; gap: 6px;
}
.mode-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.mode-chip[data-kind="careful"]::before { background: #8fb4ff; }
.mode-chip[data-kind="trial"]::before { background: var(--warn); }
.mode-chip:empty { display: none; }
/* テスト版：テスターさんの、のこり時間 */
.trial-left { font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--warn); color: var(--warn); letter-spacing: .02em; white-space: nowrap; }
.trial-left[hidden] { display: none; }
.half.speaking .tag { background: var(--live); color: #062a1d; }

/* 会話の文字 */
.live {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.live > :first-child { margin-top: auto; }
.hint { margin: 0; font-size: calc(1.05rem * var(--scale)); line-height: 1.6; text-wrap: balance; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.half-ja .hint { color: var(--ja-sub); }
.half-en .hint { color: var(--en-sub); }
.hint-main { font-size: 1.15em; font-weight: 700; opacity: .95; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.half-ja .hint-main { color: var(--ja-fg); }
.half-en .hint-main { color: var(--en-fg); }
.hint-steps { margin: 0; padding-left: 1.3em; font-size: .9em; line-height: 1.7; opacity: .9; }
.hint-badge {
  display: inline-block; font-size: .72em; font-weight: 700; letter-spacing: .04em;
  padding: 2px 10px; border-radius: 999px; border: 1.5px solid currentColor; opacity: .75;
}

.msg { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.msg.other { font-size: calc(1.75rem * var(--scale)); font-weight: 700; }
.msg.own { font-size: calc(.95rem * var(--scale)); opacity: .72; }
.msg.own .arrow { display: block; font-size: .9em; opacity: .85; }
.msg.pending::after { content: "…"; opacity: .6; }
.msg.old { opacity: .45; }
.msg.other.old { font-size: calc(1.15rem * var(--scale)); }
/* 「ちがう？」ボタン（日本語側の訳のうしろ。新しい2つだけに出す） */
.fb {
  display: inline-block; vertical-align: middle; margin: 2px 0 2px 10px;
  border: 1.5px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
  padding: 5px 12px; font-family: var(--font-ja); font-size: .8rem; font-weight: 700; line-height: 1.4; letter-spacing: 0;
  white-space: nowrap; opacity: .6;
}
.msg.own .fb { margin-left: 0; margin-top: 6px; }
.fb.on { background: var(--warn); border-color: var(--warn); color: #2b1d00; opacity: 1; }
.fb:disabled { opacity: .7; }
/* 「ちがう？」の原因の見こみ（訳の下の小さな1行）と、単語帳に入れるボタン */
.why { display: block; margin-top: 6px; font-family: var(--font-ja); font-size: .78rem; font-weight: 500; line-height: 1.5; letter-spacing: 0; opacity: .8; }
.msg.own .why { font-size: .85em; }
.why-add {
  display: inline-block; margin: 6px 0 0; border: 1.5px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
  padding: 4px 12px; font-family: var(--font-ja); font-size: .78rem; font-weight: 700; line-height: 1.4; max-width: 100%; white-space: normal; text-align: left;
}
.why-add:disabled { opacity: .7; }
.why-tip { font-weight: 700; color: var(--warn); }
.msg.old .fb:not(.on) { display: none; }
/* お客さんの言葉→日本語を、あとから整えた訳にしたときの小さな札（v0.5.1〜） */
.nice-tag { display: inline-block; vertical-align: middle; margin: 2px 0 2px 8px; font-family: var(--font-ja); font-size: .72rem; font-weight: 700; line-height: 1.4; letter-spacing: 0; white-space: nowrap; opacity: .55; }
.msg.old .nice-tag { display: none; }

/* ひとこと＆キーボード */
.tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.phrases {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.phrases::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 0; border-radius: 999px;
  padding: 9px 14px;
  font-size: .9rem; white-space: nowrap;
}
.half-ja .chip { background: var(--chip-ja); color: var(--ja-fg); }
.half-en .chip { background: var(--chip-en); color: var(--en-fg); }
.chip:active { transform: scale(.97); }
.kb-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 1.1rem;
}
.half-ja .kb-btn { background: var(--chip-ja); }
.half-en .kb-btn { background: var(--chip-en); }
.kb { display: flex; gap: 8px; }
.kb input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 0; font-size: 1rem; background: var(--sheet-bg); color: var(--sheet-fg); }
.kb button { border: 0; border-radius: 12px; padding: 0 16px; font-weight: 700; background: var(--live); color: #062a1d; }

/* ---- まんなかの帯 ---- */
.bar {
  display: grid;
  grid-template-columns: 44px 1fr auto 44px;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--bar-bg);
  color: var(--bar-fg);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--bar-fg);
  font-size: 1.15rem; display: grid; place-items: center;
}
.main-btn {
  position: relative; justify-self: center;
  min-width: 168px; height: 54px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--live); color: #062a1d;
  font-weight: 700; font-size: 1.1rem; letter-spacing: .04em;
  box-shadow: 0 0 0 calc(var(--lvl) * 14px) rgba(60, 207, 154, .28);
  transition: box-shadow .08s linear, background .2s;
}
.app[data-run="running"] .main-btn { background: #f2f3f5; color: #101318; }
.app[data-run="busy"] .main-btn { background: #3a3f48; color: var(--bar-fg); }
.app[data-run="paused"] .main-btn { background: var(--warn); color: #2b1d02; }
/* 一時中断（通訳中だけ）。ボタンを並べるので、通訳中は「とめる」を少し細く */
.main-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; }
.app[data-run="running"] .main-btn { min-width: 112px; padding: 0 18px; }
.hold-btn {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: var(--bar-fg);
  font-size: 1.2rem; display: grid; place-items: center;
}
.app[data-hold="1"] .hold-btn { background: var(--warn); border-color: var(--warn); color: #2b1d02; }
.app[data-hold="1"] .main-btn { box-shadow: none; }
.ring { position: absolute; inset: -6px; border-radius: inherit; border: 2px solid transparent; pointer-events: none; }
.app[data-run="busy"] .ring { border-top-color: var(--live); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--bar-sub); max-width: 9.5em; line-height: 1.3; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--bar-sub); }
.status[data-tone="live"] .status-dot { background: var(--live); }
.status[data-tone="warn"] .status-dot { background: var(--warn); }
.status[data-tone="err"] .status-dot { background: var(--err); }
.status[data-tone="err"] { color: #ffb4a9; }
/* 長いお知らせ（使いきった・エラーなど）は、ボタンの下の段に横長で出す（2026-11-27：iPhone で1行5文字の縦長になっていた） */
.app[data-long-status="1"] .bar { grid-template-columns: auto 1fr auto; }
.app[data-long-status="1"] .status { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 30em; }
/* スマホ（幅430pxまで）は、いつもボタンの下の段に1行で（「どうぞ話してください」も3行に折れていた。段が出たり消えたりしないように） */
@media (max-width: 430px) {
  .bar { grid-template-columns: 44px 1fr 44px; row-gap: 6px; }
  .status { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: none; }
}

@media (max-width: 380px) {
  .bar { grid-template-columns: 40px 1fr 40px; }
  .status { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: none; }
  .main-btn { min-width: 140px; }
}

/* ---- AIの通訳が止まったとき（スタッフ側に出るカード） ---- */
.down {
  position: fixed; z-index: 15;
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 8px);
  max-width: 520px; margin: 0 auto;
  background: var(--sheet-bg); color: var(--sheet-fg);
  border-radius: 18px; border-top: 5px solid var(--err);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  animation: down-in .22s ease-out;
}
@keyframes down-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.down p { margin: 0; }
.down-title { font-size: 1.1rem; font-weight: 700; padding-right: 36px; }
.down-why { font-weight: 700; line-height: 1.55; }
.down-help { font-size: .88rem; color: var(--sheet-sub); line-height: 1.6; }
.down-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.down-btns button { flex: 1 1 auto; min-height: 48px; border-radius: 999px; font-weight: 700; font-size: 1rem; padding: 0 14px; white-space: nowrap; }
.down-retry { border: 0; background: var(--live); color: #062a1d; }
.down-free { border: 1.5px solid var(--sheet-line); background: transparent; color: var(--sheet-fg); }
.down-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--sheet-sub); font-size: 1rem;
}

/* ---- お客さんの同意（販売版 v0.6〜）。上＝お客さん（向かい合わせなら逆さ）、下＝お店の人 ---- */
.consent {
  position: fixed; inset: 0; z-index: 18;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  background: var(--bar-bg);
}
.consent-guest {
  background: var(--en-bg); color: var(--en-fg); font-family: var(--font-en);
  overflow-y: auto; padding: max(16px, env(safe-area-inset-top, 0px)) 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.consent[data-face="on"] .consent-guest { transform: rotate(180deg); padding-top: 14px; padding-bottom: max(16px, env(safe-area-inset-top, 0px)); }
.consent p { margin: 0; }
.consent-title { font-weight: 700; font-size: 1.05rem; line-height: 1.5; text-align: center; }
.consent-title span { display: inline-block; margin: 0 6px; }
.consent-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.consent-card {
  background: rgba(255, 255, 255, .55); border-radius: 16px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .consent-card { background: rgba(0, 0, 0, .25); } }
:root[data-theme="dark"] .consent-card { background: rgba(0, 0, 0, .25); }
.consent-card[lang="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
.consent-lang { font-weight: 700; font-size: 1.15rem; }
.consent-text { font-size: .95rem; line-height: 1.55; }
.consent-more { color: inherit; font-size: .85rem; font-weight: 700; line-height: 1.45; text-underline-offset: 3px; }
.consent-agree {
  margin-top: 4px; min-height: 52px; border: 0; border-radius: 999px;
  background: var(--en-fg); color: var(--en-bg); font-weight: 700; font-size: 1.05rem;
}
.consent-no {
  align-self: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid currentColor; background: transparent; color: inherit; font-weight: 700; font-size: .9rem; opacity: .8;
}
.consent-staff {
  background: var(--ja-bg); color: var(--ja-fg); font-family: var(--font-ja);
  padding: 14px 16px max(16px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px;
}
.consent-staff a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.consent-staff-ask { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; line-height: 1.6; }
.consent-staff-ok { min-height: 48px; border: 0; border-radius: 999px; background: var(--live); color: #062a1d; font-weight: 700; font-size: 1rem; }
.consent-staff-wait { font-size: .92rem; line-height: 1.6; color: var(--ja-sub); }
.consent-cancel { align-self: center; min-height: 40px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--ja-sub); background: transparent; color: var(--ja-fg); font-weight: 700; }
/* お店の人の同意がまだのときは、お客さんのボタンを押せない */
.consent[data-staff="ask"] .consent-agree { opacity: .35; pointer-events: none; }
.consent[data-staff="ok"] .consent-staff-ask { display: none; }
.consent[data-staff="ask"] .consent-staff-wait { display: none; }
/* お客さんが断ったとき：外へ送らない「ひとこと」（決まった訳）だけ */
.app[data-declined="on"] .kb-btn,
.app[data-declined="on"] .kb,
.app[data-declined="on"] .chip[data-ai="on"] { display: none !important; }
/* お客さん側のひとことは、ふだんは出さない（はじめてのお客さんは、横に流れるボタンをまず使わない。話すか ⌨ で十分）。
   お客さんが送るのを断ったとき（外へ送らない「ひとこと」だけで続けるとき）だけ出す（2026-11-27 運営者） */
.app:not([data-declined="on"]) #phrases-en { display: none; }
.half-en .tools { justify-content: flex-end; }

/* ---- 設定シート ---- */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 88%; overflow-y: auto;
  background: var(--sheet-bg); color: var(--sheet-fg);
  border-radius: 20px 20px 0 0;
  padding-block: 0 max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px;
  max-width: 640px; margin: 0 auto;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; background: var(--sheet-bg); padding: 14px 0 8px; border-bottom: 1px solid transparent; }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: -6px; }
.sheet-links a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--sheet-line); color: var(--sheet-fg); text-decoration: none; font-weight: 700; font-size: .86rem; line-height: 1.35;
}
.group { display: flex; flex-direction: column; gap: 18px; }
.group.more { border-top: 1px solid var(--sheet-line); padding-top: 4px; gap: 0; }
.group.more > summary {
  list-style: none; cursor: pointer; padding: 12px 28px 10px 0; position: relative;
  font-weight: 700; font-size: 1rem;
}
.group.more > summary::-webkit-details-marker { display: none; }
.group.more > summary::after {
  content: ""; position: absolute; right: 6px; top: 18px; width: 9px; height: 9px;
  border-right: 2px solid var(--sheet-sub); border-bottom: 2px solid var(--sheet-sub); transform: rotate(45deg); transition: transform .2s;
}
.group.more[open] > summary::after { transform: rotate(-135deg); top: 22px; }
.group.more > summary small { display: block; font-size: .76rem; font-weight: 500; color: var(--sheet-sub); margin-top: 2px; }
.group.more[open] { gap: 18px; padding-bottom: 10px; }
.sheet .icon-btn { color: var(--sheet-fg); border-color: var(--sheet-line); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.field.row label small, .seg small { display: block; font-size: .75rem; color: var(--sheet-sub); font-weight: 500; }
.seg small { word-break: keep-all; overflow-wrap: anywhere; margin-top: 2px; line-height: 1.45; }
.label { font-size: .8rem; font-weight: 700; color: var(--sheet-sub); letter-spacing: .04em; }
.note { margin: 0; font-size: .78rem; color: var(--sheet-sub); line-height: 1.55; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--sheet-line); font-weight: 700; font-size: .92rem; height: 100%; }
.seg input:checked + span { border-color: var(--seg-on); box-shadow: inset 0 0 0 1px var(--seg-on); }
.seg input:disabled + span { opacity: .45; }
.seg input:focus-visible + span { outline: 3px solid var(--live); outline-offset: 2px; }
.sheet input[type="range"] { width: 100%; margin-inline: 0; accent-color: var(--live); }
.sheet textarea { resize: vertical; line-height: 1.5; font-size: .95rem; }
.sheet select, .sheet input[type="password"], .sheet textarea { padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--sheet-line); background: transparent; }
.switch { width: 46px; height: 26px; accent-color: var(--live); flex: 0 0 auto; }
.usage p { margin: 0; }
.usage strong { font-variant-numeric: tabular-nums; }
.diag summary { font-size: .82rem; color: var(--sheet-sub); cursor: pointer; }
.diag pre { margin: 0; max-height: 220px; overflow: auto; font-size: .68rem; line-height: 1.45; white-space: pre-wrap; word-break: break-all; color: var(--sheet-sub); border: 1px solid var(--sheet-line); border-radius: 8px; padding: 8px; }
.sheet-foot { border-top: 1px solid var(--sheet-line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.sheet-foot p { margin: 0; font-size: .75rem; color: var(--sheet-sub); }
.text-btn { align-self: flex-start; border: 0; background: transparent; color: var(--err); padding: 4px 0; font-weight: 700; }
.field > .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field > .row label small { display: block; font-size: .75rem; color: var(--sheet-sub); font-weight: 500; }
.test-btns { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* ひとことの編集（⚙ → お店に合わせる。0.6.6-dev〜） */
.ph-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1.5px solid var(--sheet-line); border-radius: 12px; overflow: hidden; }
.ph-list li { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; min-height: 44px; }
.ph-list li + li { border-top: 1px solid var(--sheet-line); }
.ph-list li.ph-empty { color: var(--sheet-sub); font-size: .86rem; }
.ph-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ph-txt b { font-weight: 700; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.ph-txt small { font-size: .76rem; color: var(--sheet-sub); line-height: 1.35; overflow-wrap: anywhere; }
.ph-mine { flex: 0 0 auto; font-size: .7rem; font-weight: 700; color: var(--sheet-sub); border: 1px solid var(--sheet-line); border-radius: 999px; padding: 1px 7px; }
.ph-list button { flex: 0 0 auto; border: 1.5px solid var(--sheet-line); background: transparent; color: var(--sheet-fg); border-radius: 10px; min-height: 36px; padding: 0 10px; font-weight: 700; font-size: .84rem; }
.ph-list .ph-x { width: 36px; padding: 0; font-size: .95rem; color: var(--sheet-sub); }
.ph-list .ph-del { color: var(--err); }
.ph-add { display: flex; gap: 8px; }
.ph-add input, .ph-check input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--sheet-line); background: transparent; color: var(--sheet-fg); font-size: 1rem; }
.ph-add button, .ph-check .ph-ok { flex: 0 0 auto; border: 0; border-radius: 12px; padding: 0 14px; min-height: 44px; font-weight: 700; background: var(--live); color: #062a1d; }
.ph-check { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--seg-on); }
.ph-check-ja { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.ph-check-more { white-space: pre-line; overflow-wrap: anywhere; }
.ph-check-btns { display: flex; gap: 12px; align-items: center; }
.ph-check .ph-ok:disabled { opacity: .45; }
.ph-check .ph-no { border: 0; background: transparent; color: var(--sheet-sub); font-weight: 700; padding: 8px 4px; }
.ph-msg { font-weight: 700; color: var(--sheet-fg); }
.ph-off summary { font-size: .86rem; font-weight: 700; color: var(--sheet-sub); cursor: pointer; padding: 4px 0; }
.ph-off .ph-list { margin-top: 6px; }
.ph-off .ph-txt b { font-weight: 500; color: var(--sheet-sub); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
