:root {
  color-scheme: dark;
  --ink: #2a1a10; --paper: #f3e6cc; --paper2: #e8d3a6; --red: #c8261c; --gold: #e8a33d;
  --night: #140c08; --wood: #5a3a22; --glass: rgba(20, 12, 8, .78);
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: #fff;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; touch-action: manipulation; border: 0; color: inherit; }
input { font: inherit; font-size: 16px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }

/* ---------- 共通の画面 ---------- */
.screen { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 20;
  padding: calc(var(--sat) + 14px) 16px calc(var(--sab) + 20px); }
#entrance { background: linear-gradient(180deg, rgba(20,12,8,.25) 0%, rgba(20,12,8,.55) 40%, rgba(20,12,8,.92) 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; }
.sign { text-align: center; text-shadow: 0 2px 8px #000; }
.sign-sub { font-family: var(--mincho); letter-spacing: .3em; color: var(--paper2); font-size: 14px; }
.sign h1 { font-family: var(--mincho); font-size: clamp(38px, 12vw, 64px); margin: 2px 0 6px; letter-spacing: .08em; color: #fff4e0; }
.open-state { display: inline-block; font-weight: 800; padding: 6px 16px; border-radius: 999px; background: #333; font-size: 15px; }
.open-state.on { background: var(--red); box-shadow: 0 0 18px rgba(255,90,40,.6); }
.open-state.soon { background: #8a5a1a; }
.schedule { margin-top: 8px; color: var(--paper2); font-size: 14px; line-height: 1.6; }
.card { width: 100%; max-width: 420px; background: rgba(243,230,204,.97); color: var(--ink); border-radius: 18px; padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 10px; }
.me-row { display: flex; gap: 12px; align-items: center; }
#meFace { width: 64px; height: 64px; border-radius: 50%; background: #d9c39a; flex: none; border: 3px solid var(--wood); }
.me-info { flex: 1; min-width: 0; }
.lbl { display: block; font-size: 13px; font-weight: 700; color: #6b4a2a; margin-bottom: 3px; }
.card input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 2px solid #c9a978; background: #fffaf0; color: var(--ink); }
button.big { width: 100%; padding: 15px; border-radius: 14px; background: var(--red); color: #fff; font-size: 20px; font-weight: 800;
  font-family: var(--mincho); letter-spacing: .05em; box-shadow: 0 4px 0 #7a140e; }
button.big:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a140e; }
button.big:disabled { background: #8a7a6a; box-shadow: 0 4px 0 #5a4a3a; }
.row2 { display: flex; gap: 8px; }
button.sub { flex: 1; padding: 12px 6px; border-radius: 12px; background: var(--wood); color: #fff; font-weight: 700; font-size: 15px; }
.msg { color: var(--red); font-weight: 700; font-size: 14px; min-height: 1em; text-align: center; }
.msg:empty { display: none; }
.note { font-size: 12px; color: #7a5a3a; text-align: center; line-height: 1.5; }
.note:empty { display: none; }

/* ---------- アバターを作る ---------- */
#maker { background: linear-gradient(180deg, #3a2414, #1e130c); padding-left: 0; padding-right: 0; display: flex; flex-direction: column; overflow: hidden; }
.mk-top { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px; gap: 8px; }
.mk-title { font-family: var(--mincho); font-weight: 800; font-size: 19px; }
button.ghost { background: transparent; color: var(--paper2); font-weight: 700; padding: 8px 4px; font-size: 15px; }
button.ok { background: var(--gold); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 8px 20px; font-size: 16px; }
.mk-preview { position: relative; height: 38vh; min-height: 220px; flex: none; }
#preview { width: 100%; height: 100%; display: block; touch-action: none; }
.mk-tools { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 6px; }
.mk-hint { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.5); }
button.chip { background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.mk-tabs { display: flex; overflow-x: auto; gap: 6px; padding: 8px 12px; flex: none; scrollbar-width: none; }
.mk-tabs::-webkit-scrollbar { display: none; }
.mk-tabs button { flex: none; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 700; font-size: 14px; }
.mk-tabs button.on { background: var(--paper); color: var(--ink); }
.mk-body { flex: 1; overflow-y: auto; padding: 4px 12px 24px; background: rgba(0,0,0,.25); }
.mk-sec { margin: 10px 0 4px; font-size: 13px; color: var(--paper2); font-weight: 700; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button { padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.1); font-size: 14px; font-weight: 600; border: 2px solid transparent; }
.opts button.on { border-color: var(--gold); background: rgba(232,163,61,.25); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px var(--gold); }
.free-color { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; border: 2px solid transparent; }
.free-color.on { border-color: var(--gold); }
.free-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.mk-sex { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 4px; font-weight: 800; font-size: 14px; }
.mk-sex button { background: rgba(255,255,255,.12); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--paper2); }
.mk-sexpick { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 14px 4px; text-align: center; }
.mk-sexpick p { width: 100%; margin: 0 0 4px; line-height: 1.7; font-size: 15px; }
.mk-sexpick button { width: calc(50% - 8px); max-width: 180px; padding: 18px 8px; border-radius: 18px; background: var(--paper); color: var(--ink); font-size: 20px; font-weight: 800; font-family: var(--mincho); display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 4px 0 #8a6a3a; }
.mk-sexpick button span { font-size: 48px; }
.mk-sexpick small { width: 100%; color: var(--paper2); font-size: 12px; }
button.ok:disabled { opacity: .4; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.presets button { padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.1); font-size: 13px; font-weight: 700; }
.mk-body input[type=range] { width: 100%; }
.mk-body input[type=text] { width: 100%; padding: 10px; border-radius: 10px; border: 0; }

/* ---------- 予約 ---------- */
#reserve { background: linear-gradient(180deg, #3a2414, #1e130c); }
.rs-help { color: var(--paper2); font-size: 14px; line-height: 1.6; margin: 4px 4px 12px; }
.rs-me { display: flex; align-items: center; gap: 10px; background: rgba(243,230,204,.1); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.rs-me canvas { width: 52px; height: 52px; border-radius: 50%; background: #d9c39a; flex: none; }
.rs-me div { flex: 1; min-width: 0; } .rs-me b { display: block; font-size: 16px; } .rs-me small { color: var(--paper2); font-size: 12px; }
.rs-me button { background: var(--wood); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; flex: none; }
.tag.free.mine { background: var(--gold); }
.rs-day { background: rgba(243,230,204,.08); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.rs-date { font-weight: 800; font-family: var(--mincho); font-size: 17px; margin-bottom: 8px; }
.rs-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.rs-seats button { padding: 10px 4px; border-radius: 10px; background: #e8d3a6; color: var(--ink); font-weight: 700; font-size: 13px; line-height: 1.3; }
.rs-seats button.taken { background: #4a3a2a; color: #b8a888; }
.rs-seats button.mine { background: var(--red); color: #fff; }

/* ---------- お店の中 ---------- */
#shop { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#shop > * { pointer-events: auto; }
.topbar { position: absolute; top: calc(var(--sat) + 8px); left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center;
  background: var(--glass); border-radius: 999px; padding: 7px 14px; font-size: 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tb-left b { font-family: var(--mincho); margin-right: 8px; }
#tbState { color: var(--gold); font-weight: 700; }
.np-row { position: absolute; top: calc(var(--sat) + 52px); left: 10px; max-width: calc(100% - 90px); display: flex; gap: 6px; align-items: center; }
.np-skip { flex: none; background: var(--red); color: #fff; font-weight: 800; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.np { min-width: 0; background: var(--glass); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
/* 大将のうしろのモニター。640×360 の箱を 3D の画面の位置に重ねる */
#tv { position: fixed; left: 0; top: 0; width: 640px; height: 360px; transform-origin: 0 0; z-index: 8; background: #000; pointer-events: none; overflow: hidden; }
#tv.anim { transition: transform .35s ease; }
#tv.pip { pointer-events: auto; border-radius: 22px; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
#tv.big { pointer-events: auto; z-index: 26; border-radius: 10px; }
#tvHolder, #tvHolder iframe, #tvHolder video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; object-fit: contain; }
#tvHolder iframe, #tvHolder video { pointer-events: none; }
#tv.big #tvHolder iframe, #tv.big #tvHolder video { pointer-events: auto; }
/* モニターの上・小窓は「押すと大きく」の受け皿。大きいときは動画を直接さわれる */
#tvCatch { position: absolute; inset: 0; pointer-events: auto; cursor: pointer; }
#tv.big #tvCatch { display: none; }
#tvBadge { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,.72); color: #fff; font-size: 30px; padding: 8px 18px; border-radius: 999px; }
#tv.pip #tvBadge { font-size: 52px; }
#tvClose { position: fixed; left: 50%; bottom: calc(var(--sab) + 28px); transform: translateX(-50%); z-index: 27; background: var(--paper); color: var(--ink); font-weight: 800; padding: 12px 22px; border-radius: 999px; font-size: 16px; }
#tvBack { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 25; }
body.tv-land #tvBack { background: #000; }
body.tv-land #tvClose { left: auto; right: calc(env(safe-area-inset-right, 0px) + 10px); top: calc(var(--sat) + 10px); bottom: auto; transform: none; padding: 8px 14px; font-size: 14px; opacity: .85; }
.side { position: absolute; right: 8px; top: calc(var(--sat) + 52px); display: flex; flex-direction: column; gap: 7px; z-index: 6; flex-wrap: wrap-reverse; align-content: flex-start; }   /* 下の会話に もぐらないよう、入りきらない分は 左に もう1列(高さは js の fitSide。11-21 ノブさん「帰りたいのに帰れない」) */
.sbtn { position: relative; width: 58px; padding: 7px 0 5px; border-radius: 14px; background: var(--glass); display: flex; flex-direction: column; align-items: center; gap: 1px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* 👁(目線)は どの画面でも ぴったり同じ所・同じ大きさ(右のボタン列の 右上の角に 固定。11-22 ノブさん「あちこちに飛ぶ。ずらさないで」)
   ボタン列の中には 同じ大きさの「あき」(::before)を入れて、ほかのボタンが 👁 の下(おしゃべり画面では 左)に並ぶようにする */
.side::before { content: ''; flex: none; width: 58px; height: 52px; order: -2; }
.side > #bView { position: absolute; top: 0; right: 0; width: 58px; height: 52px; margin: 0; padding: 7px 0 5px; z-index: 1; }
.side > #bView span { font-size: 22px; }
.side > #bView small { font-size: 11px; white-space: nowrap; letter-spacing: -.03em; }
body.talk-on .side::before { order: -2; }
.sbtn span { font-size: 22px; line-height: 1.1; }
.sbtn small { font-size: 10.5px; font-weight: 700; color: var(--paper2); }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; border-radius: 999px; min-width: 20px; padding: 1px 5px; }
body:not(.is-owner) .owner-only { display: none; }
.bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 8px calc(var(--sab) + 8px); display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, rgba(20,12,8,0), rgba(20,12,8,.7) 40%); pointer-events: none; }
.bottom > * { pointer-events: auto; }
.pick-hint { align-self: center; background: var(--red); padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.mine { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mine::-webkit-scrollbar { display: none; }
.mine button { flex: none; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 14px; box-shadow: 0 2px 0 #8a5a1a; }
.mine button b { font-weight: 800; }
.mine button:active { transform: translateY(2px); box-shadow: none; }
.phrases { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.phrases::-webkit-scrollbar { display: none; }
.phrases button.more { background: rgba(255,210,122,.95); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.ph-grid button { background: #f3e6cc; color: var(--ink); border-radius: 12px; padding: 11px 8px; font-weight: 800; font-size: 15px; text-align: left; line-height: 1.25; }
.ph-grid button:active { transform: scale(.97); }
.phrases button { flex: none; background: rgba(243,230,204,.92); color: var(--ink); border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: calc(14px * var(--fz, 1)); }
.log-wrap { position: relative; }
.log { max-height: 16vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: calc(13.5px * var(--fz, 1)); line-height: 1.45;
  mask-image: linear-gradient(180deg, transparent 0, transparent 20px, #000 56px); -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 20px, #000 56px); padding-top: 20px; }   /* 上の「全部見る」の下は 文字を見せない(長い文が ボタンに かぶっていた 11-23) */
.log .ln { background: rgba(0,0,0,.35); align-self: flex-start; border-radius: 10px; padding: 3px 9px; max-width: 92%; word-break: break-word; white-space: pre-wrap; }
.log .ln b { color: var(--gold); margin-right: 5px; }
.log .ln.owner b { color: #ff8a6a; }
.log .ln.sys { color: var(--paper2); font-size: calc(12px * var(--fz, 1)); background: transparent; }
.log-btn { position: absolute; right: 2px; top: -6px; background: rgba(20,12,8,.8); border: 1px solid rgba(232,163,61,.6); color: var(--paper2);
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
/* 会話の記録を 画面いっぱいに広げたとき */
.log-wrap.big { position: fixed; left: 8px; right: 8px; top: calc(var(--sat) + 52px); bottom: calc(var(--sab) + 70px); z-index: 12;
  background: rgba(20,12,8,.985); border-radius: 16px; border: 1px solid rgba(232,163,61,.4); padding: 34px 10px 10px; }
.log-wrap.big .log > :first-child { margin-top: auto; }
.log-wrap.big .log { max-height: 100%; height: 100%; mask-image: none; -webkit-mask-image: none; padding-top: 0; font-size: calc(15px * var(--fz, 1)); gap: 6px; }
.log-wrap.big .log-btn { top: 8px; right: 10px; }
.chat { display: flex; gap: 6px; align-items: flex-end; }
.chat textarea { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 22px; border: 0; background: rgba(255,250,240,.96); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.4; resize: none; max-height: 140px; overflow-y: auto; display: block; }
.chat button { background: var(--red); color: #fff; font-weight: 800; border-radius: 999px; padding: 0 18px; font-size: 15px; height: 44px; flex: none; }
.chat textarea:disabled, .chat button:disabled { opacity: .5; }

/* 頭の上の札と吹き出し */
#tags, #bubbles, #floaters { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.tag { position: absolute; transform: translate(-50%, -100%); font-size: calc(11px * var(--fz, 1)); font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); white-space: nowrap; }
.tag.owner { background: rgba(200,38,28,.85); }
.tag.me { background: rgba(232,163,61,.9); color: var(--ink); }
.tag.free { pointer-events: auto; background: rgba(243,230,204,.95); color: var(--ink); font-size: calc(13px * var(--fz, 1)); padding: 7px 12px; border: 2px solid var(--wood); cursor: pointer; }
.tag.away { background: rgba(60,60,70,.85); color: #ddd; font-size: calc(11px * var(--fz, 1)); }
.tag.reserved { background: rgba(80,60,40,.92); color: #ffe7b8; font-size: calc(12px * var(--fz, 1)); padding: 4px 10px; border: 1px solid rgba(232,163,61,.6); }
.tag.moved { font-size: calc(10px * var(--fz, 1)); padding: 1px 6px; opacity: .93; }   /* ほかの名札と重なるので 小さくして上へ(11-23) */
.tag.free.moved { font-size: calc(11px * var(--fz, 1)); padding: 3px 8px; border-width: 1.5px; }
.tag.reserved.moved { font-size: calc(10px * var(--fz, 1)); padding: 2px 7px; }
.bubble { position: absolute; transform: translate(-50%, calc(-100% - 22px)); width: max-content; max-width: min(62vw, 260px); white-space: pre-wrap; box-sizing: border-box; background: #fffaf0; color: var(--ink);
  border-radius: 14px; padding: 7px 11px; font-size: calc(14px * var(--fz, 1)); line-height: 1.4; box-shadow: 0 3px 10px rgba(0,0,0,.4); word-break: break-word; transition: opacity .4s; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fffaf0; border-bottom: 0; }
.bubble.phrase { background: var(--gold); font-weight: 800; font-size: calc(16px * var(--fz, 1)); }
.bubble.phrase::after { border-top-color: var(--gold); }
.bubble.fade { opacity: 0; }
.bubble.long { max-width: min(74vw, 320px); font-size: calc(13.5px * var(--fz, 1)); }
.bubble .bt { overflow: hidden; }
.bubble .bn { display: none; font-size: 11px; font-weight: 800; color: #9a5a1a; margin-bottom: 1px; }
.bubble.moved .bn { display: block; }
.bubble.moved::after { display: none; }
.bubble.moved { box-shadow: 0 3px 10px rgba(0,0,0,.4), 0 0 0 2px rgba(232,163,61,.7); }
.bubble.scroll .bt { mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.floater { position: absolute; font-size: 34px; animation: floatUp 1.8s ease-out forwards; }
@keyframes floatUp { from { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); } to { transform: translate(-50%, -90px) scale(1); opacity: 0; } }

/* 2D の代わり(3D が動かないスマホ) */
#strip2d { position: fixed; left: 0; right: 0; top: 34%; display: flex; justify-content: center; gap: 4px; padding: 0 6px; z-index: 1; flex-wrap: wrap; }
body.no3d { background: radial-gradient(ellipse at 50% 30%, #6b3a1a, #140c08 70%); }
body.no3d #stage { display: none; }
.s2 { width: 46px; text-align: center; font-size: 11px; }
.s2 .f { width: 42px; height: 42px; margin: 0 auto 2px; border-radius: 50%; background: #3a2616; display: flex; align-items: center; justify-content: center; font-size: 22px; border: 2px solid var(--wood); }
.s2.on .f { background: var(--paper2); }

/* ---------- 下から出る板 ---------- */
#sheetBack { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 78vh; z-index: 31; background: var(--paper); color: var(--ink); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.5); padding-bottom: var(--sab); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40%); opacity: .5; } }
.sh-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 6px; font-family: var(--mincho); font-size: 18px; }
button.mini { background: rgba(0,0,0,.1); border-radius: 999px; width: 30px; height: 30px; font-weight: 800; }
.sh-body { overflow-y: auto; padding: 4px 14px 18px; }
.sh-sec { font-weight: 800; font-size: 13px; color: #8a6a3a; margin: 12px 0 6px; }
.mn-count { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #6b4a2a; margin: 2px 0 8px; }
.mn-count b { background: #fffaf0; border: 2px solid #d9c39a; border-radius: 999px; padding: 2px 10px; color: var(--ink); }
.mn-count b.full { border-color: var(--red); color: var(--red); }
.mn-count small { width: 100%; font-weight: 600; color: #8a6a3a; font-size: 11.5px; }
.mn-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; position: sticky; top: -4px; background: var(--paper); z-index: 1; }
.mn-tabs::-webkit-scrollbar { display: none; }
.mn-tabs button { flex: none; padding: 8px 12px; border-radius: 999px; background: #e8d3a6; color: var(--ink); font-weight: 800; font-size: 13.5px; }
.mn-tabs button.on { background: var(--red); color: #fff; }
.mn-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mn-card { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; text-align: left;
  background: #fffaf0; border: 2px solid #d9c39a; border-radius: 14px; padding: 9px 10px; color: var(--ink); min-height: 64px; }
.mn-card:active { background: var(--paper2); }
.mn-emoji { grid-row: 1 / 3; font-size: 32px; text-align: center; }
.mn-name { font-weight: 800; font-size: 14px; line-height: 1.25; font-family: var(--mincho); }
.mn-desc { font-size: 11px; color: #8a6a3a; line-height: 1.3; }
.mn-card.pun { border-color: var(--gold); background: linear-gradient(135deg, #fff6df, #fffaf0); }
.mn-badge { position: absolute; top: -7px; right: 8px; background: var(--red); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.mn-card.off { opacity: .45; }
.mn-card.off .mn-desc { color: var(--red); font-weight: 700; }
@media (max-width: 340px) { .mn-list { grid-template-columns: 1fr; } }
.list { display: flex; flex-direction: column; gap: 6px; }
.li { display: flex; align-items: center; gap: 8px; background: #fffaf0; border-radius: 12px; padding: 9px 10px; font-size: 14px; }
.li .t { flex: 1; min-width: 0; }
.li .t small { display: block; color: #8a6a3a; font-size: 12px; }
.li button { background: var(--red); color: #fff; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; flex: none; }
.li button.gray { background: #8a7a6a; }
.li.now { border: 2px solid var(--red); }
.yt-row { display: flex; gap: 6px; }
.yt-row input { flex: 1; min-width: 0; padding: 10px; border-radius: 10px; border: 2px solid #c9a978; background: #fffaf0; color: var(--ink); }
.yt-row button { background: var(--red); color: #fff; border-radius: 10px; padding: 0 14px; font-weight: 800; }
.vol { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.vol input { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row button { background: var(--wood); color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.btn-row button.red { background: var(--red); }
.small-note { font-size: 12px; color: #8a6a3a; line-height: 1.5; margin-top: 6px; }

.toast { position: fixed; left: 50%; top: calc(var(--sat) + 96px); transform: translateX(-50%); background: rgba(20,12,8,.92); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 40; max-width: 90vw; text-align: center; border: 1px solid var(--gold); }

.pl-form { display: flex; flex-direction: column; gap: 10px; }
.pl-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #6b4a2a; }
.pl-form input, .pl-form select, .pl-form textarea { font-size: 16px; padding: 10px; border-radius: 10px; border: 2px solid #c9a978; background: #fffaf0; color: var(--ink); font-family: inherit; }
.pl-form textarea { min-height: 64px; resize: vertical; }
.pl-form label.pl-check { flex-direction: row; align-items: center; gap: 8px; }
.pl-form label.pl-check input { width: 22px; height: 22px; }
.pl-when { font-family: var(--mincho); font-weight: 800; font-size: 17px; }
.pl-lbl { font-size: 13px; font-weight: 700; color: #6b4a2a; }
.pl-opts button { background: #e8d3a6; color: var(--ink); }
.pl-opts button.on { background: var(--red); color: #fff; border-color: var(--red); }
.pl-tag { font-style: normal; font-size: 11px; background: var(--gold); border-radius: 999px; padding: 1px 7px; }
.li.off { opacity: .55; }
.pl-news { width: 100%; min-height: 110px; font-size: 11px; font-family: ui-monospace, Menlo, monospace; border-radius: 10px; border: 2px solid #c9a978; background: #fffaf0; color: var(--ink); padding: 8px; }
.free { display: inline-block; margin-top: 8px; background: #e8a33d; color: #2a1a10; font-weight: 800; font-size: 14px; padding: 4px 14px; border-radius: 999px; letter-spacing: .05em; text-shadow: none; }
.master-note { margin-top: 8px; color: #fff4e0; font-size: 14px; line-height: 1.6; background: rgba(200,38,28,.55); border-radius: 12px; padding: 6px 12px; text-shadow: none; }
.toast.has-btn { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; width: max-content; max-width: 92vw; text-align: left; }
.toast-btn { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13px; flex: none; }
#closing { background: rgba(10,6,4,.88); display: flex; align-items: center; justify-content: center; z-index: 35; }
.closing-box { text-align: center; max-width: 340px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.closing-moon { font-size: 60px; }
.closing-box h2 { font-family: var(--mincho); margin: 0; font-size: 26px; }
.closing-box p { color: var(--paper2); line-height: 1.7; margin: 0; }

/* ---------- だれのコメントか分かるように・押すと その人あてに書く(2026-11-19) ---------- */
.tag.tap { pointer-events: auto; cursor: pointer; }
.tag.tap::after { content: ' 💬'; font-size: 9px; }
.bubble.owner { background: #8c1d16; color: #fff; border: 2px solid var(--gold); font-weight: 700; }
.bubble.owner::after { border-top-color: #8c1d16; }
.bubble.owner .bn, .bubble.owner.moved .bn { display: block; color: var(--gold); }
.bubble.owner .bn::before { content: '🏮 '; }
.bubble.clamp .bt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.log .ln { cursor: pointer; }
.log .ln.owner { background: rgba(140,29,22,.9); border: 1px solid rgba(232,163,61,.75); color: #fff; }
.log .ln.owner b { color: var(--gold); }
.log .ln.new { background: rgba(255,232,170,.2); box-shadow: inset 3px 0 0 var(--gold); }
@keyframes toFlash { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 0 rgba(232,163,61,0); } }
.chat textarea.to-flash { animation: toFlash 1.2s ease-out; }
/* 大将の接客画面: 会話の欄を大きく、右のボタンは「☰」にたたむ */
/* 右のボタン(11-23 ノブさん A案): 表は いつも同じ4つ+「☰ ほか」。残りは「ほか」の小窓の中 */
.side > .sbtn.in-more { display: none !important; }
#bMore { order: 50; }
#bMore.on { background: rgba(232,163,61,.92); }
#bMore.on span, #bMore.on small { color: #2a1a10; }
.more-menu { position: fixed; z-index: 30; background: rgba(255,248,232,.97); border-radius: 18px; padding: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.mm-grid { display: grid; grid-template-columns: repeat(3, 78px); gap: 8px; }
.mm-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 66px; border-radius: 14px; background: #f1e3c4; color: #3a2414; padding: 6px 2px; }
.mm-b span { font-size: 24px; line-height: 1.1; font-weight: 900; }
.mm-b small { font-size: 12px; font-weight: 800; line-height: 1.2; text-align: center; }
.mm-b small b { display: block; font-size: 11px; color: #b5121b; }
.mm-b:active { transform: scale(.96); }
@media (orientation: landscape) and (max-height: 520px) { .mm-grid { grid-template-columns: repeat(5, 70px); } .mm-b { min-height: 58px; } .mm-b span { font-size: 21px; } }
body.owner-view .side > #bView { order: -1; }   /* 大将も 👁 は いつも いちばん上(右上)。おしゃべり画面と 同じ所で 続けて押せる 11-22 ノブさん */
body.owner-view .log { max-height: 27vh; font-size: calc(14.5px * var(--fz, 1)); background: rgba(20,12,8,.55); border-radius: 12px; padding: 14px 6px 6px; }
body.owner-view .log .ln { background: rgba(255,255,255,.07); }
body.owner-view .log .ln.owner { background: rgba(140,29,22,.9); }
body.owner-view .log .ln.new { background: rgba(255,232,170,.2); }

/* ---------- 横向き(スマホを横にしたとき) ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { right: auto; width: min(46vw, 420px); padding: 5px 12px; font-size: 13px; }
  .np-row { top: calc(var(--sat) + 44px); max-width: 48vw; }
  .np { font-size: 12px; padding: 5px 12px; }
  .np-skip { font-size: 12px; padding: 5px 10px; }
  .side { top: calc(var(--sat) + 6px); right: calc(env(safe-area-inset-right, 0px) + 8px); flex-direction: row; gap: 5px; }
  .sbtn { width: 50px; padding: 5px 0 3px; border-radius: 12px; }
  .side::before { width: 50px; height: 46px; order: 99; }
  .side > #bView { width: 50px; height: 46px; padding: 5px 0 3px; }
  .side > #bView span { font-size: 19px; } .side > #bView small { font-size: 9.5px; }
  .sbtn span { font-size: 19px; }
  .sbtn small { font-size: 9.5px; }
  .bottom { right: auto; width: min(60vw, 560px); padding-left: calc(env(safe-area-inset-left, 0px) + 8px); }
  /* 横向きでも 会話を出す(ノブさん 11-23「できるだけ多く。上ほど薄く、見づらいけど見えるくらい」)。
     会話は 決まり文句の上に置き、新しい行ほど下(決まり文句の近く)。古い行ほど だんだん薄くして、うしろの絵や人に なじませる */
  .log-wrap { order: -1; }
  .log { display: flex; max-height: calc(100vh - 196px); max-height: calc(100dvh - 196px); padding-top: 26px;
    mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.12) 26px, rgba(0,0,0,.45) 38%, rgba(0,0,0,.85) 68%, #000 84%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.12) 26px, rgba(0,0,0,.45) 38%, rgba(0,0,0,.85) 68%, #000 84%); }
  .log .ln { background: rgba(0,0,0,.5); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
  .log .ln.me { text-shadow: none; }
  .log-wrap.big .log { display: flex; }
  body.owner-view .log { display: flex; max-height: calc(100vh - 222px); max-height: calc(100dvh - 222px); font-size: calc(13px * var(--fz, 1)); }
  body.owner-view.has-tv .log { max-height: calc(100vh - 300px); max-height: calc(100dvh - 300px); }
  body.owner-view .bottom { width: min(40vw, 380px); background: linear-gradient(90deg, rgba(20,12,8,.75), rgba(20,12,8,.55)); }
  body.owner-view .topbar { width: min(40vw, 380px); }
  body.owner-view .np-row { max-width: min(40vw, 380px); }
  .log-btn { top: 0; }   /* 全部見る は 会話の右上(古くて薄い行の上)に */
  .phrases button { padding: 4px 10px; font-size: calc(12.5px * var(--fz, 1)); }
  .bottom { gap: 4px; }
  .chat textarea { max-height: 90px; padding: 9px 12px; }
  .chat button { height: 40px; }
  .log-wrap.big { top: calc(var(--sat) + 44px); right: auto; width: min(60vw, 560px); bottom: calc(var(--sab) + 60px); }
  #entrance { justify-content: center; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .sign h1 { font-size: 44px; }
  .sheet { left: auto; right: 0; width: min(520px, 70vw); max-height: 92vh; border-radius: 20px 0 0 0; }
  .mk-preview { height: 46vh; }
  .toast { top: calc(var(--sat) + 60px); }
}
/* 横向きのアバター作り: 左に見本、右に選ぶところ */
@media (orientation: landscape) and (max-height: 520px) {
  #maker { display: grid; grid-template-columns: 42% 58%; grid-template-rows: auto auto 1fr; padding-top: calc(var(--sat) + 6px); }
  #maker .mk-top { grid-column: 1 / 3; padding-bottom: 2px; }
  #maker .mk-preview { grid-column: 1; grid-row: 2 / 4; height: auto; min-height: 0; }
  #maker .mk-tabs { grid-column: 2; grid-row: 2; padding: 4px 8px; }
  #maker .mk-body { grid-column: 2; grid-row: 3; min-height: 0; }
  .mk-sexpick { padding: 6px 4px; gap: 8px; } .mk-sexpick button { padding: 10px 6px; font-size: 17px; } .mk-sexpick button span { font-size: 34px; }
  .mk-sexpick p { font-size: 13px; }
  .rs-help { margin-top: 0; }
}

/* ---------- 記念撮影 ---------- */
body.photo-mode .bottom, body.photo-mode .side, body.photo-mode #tags, body.photo-mode #bubbles, body.photo-mode #tv, body.photo-mode .topbar, body.photo-mode .np-row { visibility: hidden !important; }
.photo-ui { position: fixed; inset: 0; z-index: 60; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.ph-top { pointer-events: none; text-align: center; padding: calc(10px + env(safe-area-inset-top)) 16px 0; background: linear-gradient(rgba(20,12,8,.85), rgba(20,12,8,0)); }
.ph-title { color: #fff; font-weight: 800; font-size: 15px; text-shadow: 0 1px 4px #000; line-height: 1.4; }
.ph-count { color: #ffd27a; font-weight: 900; font-size: 54px; line-height: 1.05; text-shadow: 0 2px 10px rgba(0,0,0,.7); font-variant-numeric: tabular-nums; }
.ph-pick { pointer-events: auto; background: rgba(20,12,8,.88); border-radius: 18px 18px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); max-height: 40vh; overflow-y: auto; }
.ph-hide { width: 100%; font-size: 17px; font-weight: 900; padding: 11px; border-radius: 14px; background: #fff; color: #c8261c; border: 3px solid #c8261c; }
.ph-hide.on { background: #c8261c; color: #fff; border-color: #fff; box-shadow: 0 0 0 3px #c8261c; }
.ph-ai { width: 100%; margin-top: 7px; font-size: 15px; font-weight: 900; padding: 9px; border-radius: 14px; background: #fff5e2; color: #8a5a20; border: 2px dashed #d9a35a; }
.ph-ai.on { background: #ffd27a; color: #5a3410; border: 2px solid #c8261c; }
.ph-pick.locked .ph-ai { opacity: .5; pointer-events: none; }
.ph-sec { color: #e8d7b6; font-size: 12px; font-weight: 800; margin: 8px 0 4px; }
.ph-chips { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ph-chips::-webkit-scrollbar { display: none; }
.ph-chips button { flex: none; background: #f3e6cc; color: var(--ink); border-radius: 999px; padding: 7px 11px; font-weight: 800; font-size: 13.5px; border: 2px solid transparent; }
.ph-chips button.on { background: #ffd27a; border-color: #c8261c; }
/* 小窓(大将の操作など)の中の 選ぶボタン: 地の色と同じで ただの字に見えていた 11-23 → 白地に茶色のふち */
#shBody .ph-chips button { background: #fff; border-color: #e3cfa4; }
#shBody .ph-chips button.on { background: #ffd27a; border-color: #c8261c; }
#shBody .ph-chips button:disabled { opacity: .45; }
#phChoose.off { opacity: .35; pointer-events: none; }
.ph-pick.locked .ph-hide { opacity: .5; }
.ph-note { color: #f3e6cc; font-size: 12.5px; margin: 8px 0 0; line-height: 1.45; }
.flash { position: fixed; inset: 0; background: #fff; z-index: 70; pointer-events: none; opacity: 0; }
.flash.go { animation: phflash .8s ease-out; }
@keyframes phflash { 0% { opacity: 1; } 100% { opacity: 0; } }
#photoBox { z-index: 75; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.75); padding: 16px; }
#photoBox.hidden { display: none; }
.pb-card { background: #f3e6cc; color: var(--ink); border-radius: 16px; padding: 14px; width: min(100%, 440px); max-height: 92vh; overflow-y: auto; text-align: center; }
.pb-title { font-weight: 900; font-size: 18px; margin-bottom: 8px; }
.pb-card img { width: 100%; border-radius: 8px; display: block; margin-bottom: 10px; -webkit-touch-callout: default; }
.pb-card .btn-row { justify-content: center; }
#pbClose { margin-top: 8px; }
.ph-list { display: grid; gap: 12px; }
.ph-item img { width: 100%; border-radius: 8px; display: block; }
.ph-meta { font-weight: 800; margin: 6px 0; }
.ph-meta small { display: block; font-weight: 600; color: #7a6248; }

/* ---------- 乾杯の連鎖 ---------- */
.kp { position: fixed; left: 50%; bottom: calc(200px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.kp-join { pointer-events: auto; white-space: nowrap; background: #ffd27a; color: #2a1a10; font-weight: 900; font-size: 20px; padding: 14px 26px; border-radius: 999px; border: 3px solid #fff; box-shadow: 0 4px 18px rgba(0,0,0,.45); animation: kppulse .6s ease-in-out infinite alternate; }
.kp-join.hidden { display: none; }
@keyframes kppulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.kp-count { color: #fff; font-weight: 900; font-size: 16px; background: rgba(20,12,8,.7); padding: 4px 12px; border-radius: 999px; }
.kp-banner { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 46; color: #ffd27a; font-weight: 900; font-size: 30px; text-shadow: 0 2px 10px rgba(0,0,0,.8), 0 0 2px #000; white-space: nowrap; pointer-events: none; }
.kp-banner.go { animation: kpban 1.9s ease-out forwards; }
@keyframes kpban { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
body.photo-mode .kp, body.photo-mode .kp-banner { display: none; }

/* ---------- 声えらび(試し聞きつきのカード) ---------- */
.vc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.vc { background: #f3e6cc; color: var(--ink); border-radius: 12px; padding: 9px 10px; border: 2px solid transparent; cursor: pointer; }
.vc.on { border-color: #c8261c; background: #ffe9b8; }
.vc b { display: block; font-size: 15px; margin-bottom: 6px; }
.vc-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.vc-btns button { background: #5a3a22; color: #fff; border-radius: 999px; padding: 5px 9px; font-size: 12.5px; font-weight: 800; }

/* 大将の画面: だれもいないときの ひとこと(真ん中より少し上) */
#emptyNote { position: fixed; left: 50%; top: 34%; transform: translateX(-50%); z-index: 8; pointer-events: none; text-align: center;
  background: rgba(20,12,8,.72); color: #fff3d6; border: 1px solid rgba(255,214,140,.45); border-radius: 14px; padding: 12px 18px; font-size: 16px; font-weight: 700; white-space: nowrap; }
#emptyNote small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; opacity: .85; }
#emptyNote.hidden, body:not(.owner-view) #emptyNote { display: none; }
@media (orientation: portrait) { #emptyNote { left: calc(50% - 34px); max-width: calc(100vw - 100px); white-space: normal; } }   /* 右のボタン列に かからないように(11-24) */
@media (orientation: landscape) and (max-height: 520px) { body.owner-view #emptyNote { left: 69%; } }

/* 注文票: 料理の出し方(手で / 自動) */
.auto-pick { flex-wrap: wrap; }
.auto-tag { flex: none; font-size: 11.5px; font-weight: 800; color: #8c1d16; background: #ffe7b0; border-radius: 999px; padding: 3px 8px; margin-right: 6px; }

/* 大将の画面: お客さんのテーブルの前の「🍶 出す」と、人を押したときの「話しかける / 料理を出す」 */
.tag.serve { pointer-events: auto; transform: translate(-50%, 0); background: rgba(255,210,122,.95); color: var(--ink); font-size: 13px; padding: 6px 10px; white-space: nowrap; border: 2px solid #8c1d16; cursor: pointer; }
#whoPick { position: fixed; z-index: 60; background: #fff6e4; color: var(--ink); border-radius: 14px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
#whoPick.hidden { display: none; }
#whoPick .wp-name { font-weight: 800; font-size: 14px; color: #8a6a3a; text-align: center; }
#whoPick button { font-size: 16px; font-weight: 800; padding: 12px 14px; border-radius: 12px; background: #f3e6cc; color: var(--ink); }
#whoPick button[data-w=serve] { background: #ffd27a; }
#whoPick button[data-w=look] { background: #ffd27a; }

.tag.serve.mini { padding: 6px 9px; font-size: 15px; }
.seat-serve { flex-wrap: wrap; }

/* 入力欄の上の「〇〇さんへ ✕ 消す」 */
.to-chip { display: flex; align-items: center; gap: 8px; margin: 0 0 6px 6px; align-self: flex-start; background: rgba(255,232,170,.95); color: var(--ink); border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 13.5px; font-weight: 800; max-width: calc(100% - 12px); }
.to-chip.hidden { display: none; }
.to-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-chip button { flex: none; background: #8c1d16; color: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 800; }
body.kp-on .tag.serve { visibility: hidden; }

/* お祝いモード */
.tb-celeb { margin-left: 6px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #c8202a; color: #fff3c8; white-space: nowrap; }
.tb-celeb.hidden { display: none; }
body.celeb-xmas .tb-celeb { background: linear-gradient(90deg, #c8202a, #1f7a3c); }
body.celeb-newyear .tb-celeb { background: linear-gradient(90deg, #c8202a, #c8a040); }
body.celeb-birthday .tb-celeb { background: linear-gradient(90deg, #ff4a8a, #ffb02a); }
.cel-pick, .cos-pick { flex-wrap: wrap; }
.countdown { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; text-align: center; pointer-events: none;
  font-size: min(42vw, 260px); font-weight: 900; color: #fff3c8; text-shadow: 0 0 24px rgba(255,180,60,.9), 0 6px 0 #8c1d16, 0 0 2px #000; background: radial-gradient(circle, rgba(20,8,4,.35), rgba(20,8,4,0) 70%); }
.countdown.hidden { display: none; }
.countdown.pop { animation: cdPop .9s ease-out; }
.countdown.done { font-size: min(12vw, 72px); line-height: 1.25; animation: cdPop 1.2s ease-out; }
@keyframes cdPop { 0% { transform: scale(1.8); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .95; } }
.tb-celeb i { font-style: normal; margin-left: 3px; }
@media (max-width: 560px) { .tb-celeb { padding: 1px 5px; margin-left: 4px; } .tb-celeb i { display: none; } }

/* 見本(#demo): 入力やボタンは出さない。会話は見える。説明の札 */
.demo-note { display: none; }
body.demo .demo-note { display: block; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(54px + env(safe-area-inset-bottom)); z-index: 12; width: min(92vw, 460px);
  background: rgba(20,12,8,.82); color: #fff3d6; border: 1px solid rgba(255,214,140,.45); border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.55; pointer-events: none; }
body.demo .demo-note b { display: block; font-size: 15px; color: #ffd27a; margin-bottom: 2px; }
body.demo .demo-note .dn-try { display: block; margin-top: 4px; font-weight: 800; color: #ffe7b0; }
body.demo .demo-note i { font-style: normal; }
body.demo .chat, body.demo #phrases, body.demo #toChip, body.demo #pickHint, body.demo #mine, body.demo #npSkip, body.demo .tb-right { display: none !important; }
body.demo .side > .sbtn:not(#bView) { pointer-events: none; }   /* 見本: 右のボタンは ふつうの色で見せるだけ(押せない)。押せるのは 👁 だけ(2026-11-21 ノブさん「薄くしなくていい」) */
body.demo #bView { box-shadow: 0 0 0 3px #ffd27a, 0 0 18px rgba(255,210,122,.8); animation: demoPulse 1.6s ease-in-out infinite; }
@keyframes demoPulse { 50% { box-shadow: 0 0 0 5px #ffd27a, 0 0 26px rgba(255,210,122,1); } }
body.demo .log { font-size: 12px; }
@media (orientation: landscape) and (max-height: 520px) { body.demo .demo-note { top: auto; bottom: 12px; left: auto; right: 12px; transform: none; width: min(40vw, 380px); font-size: 12px; padding: 7px 12px; line-height: 1.45; } body.demo .demo-note b { display: inline; font-size: 13px; margin-right: 6px; } }

/* 座る前(横向き): 会話の欄をしまって 1〜4番の席も押せるように。案内の帯は 上へ */
@media (orientation: landscape) and (max-height: 520px) {
  body.picking #phrases, body.picking .log-wrap, body.picking .chat, body.picking #toChip { display: none !important; }
  body.picking #pickHint { position: fixed; top: calc(52px + env(safe-area-inset-top)); left: 0; right: 0; margin: 0 auto; width: max-content; z-index: 20; }
}
/* 乾杯の人数が 決まり文句に重ならないように / カウントダウン中は 乾杯の帯を出さない */
@media (orientation: portrait) { .kp { bottom: calc(250px + env(safe-area-inset-bottom)); } }
body.cd-on #kpBanner, body.cd-on #kpUi { display: none !important; }
@media (orientation: landscape) and (max-height: 520px) { body.demo .log { display: flex; max-height: 30vh; } }   /* 見本は 横向きでも会話の行を見せる */
body.demo .demo-note.mini .dn-body { display: none; }   /* 10秒たったら 1行に */
body.demo .demo-note.mini { padding: 6px 12px; bottom: auto; top: calc(96px + env(safe-area-inset-top)); width: auto; max-width: min(78vw, 460px); left: 12px; transform: none; }
body.demo .demo-note.mini b { display: inline; font-size: 13px; margin-right: 6px; }
body.demo .demo-note.mini .dn-try { display: inline; margin-top: 0; }
@media (orientation: landscape) and (max-height: 520px) { body.demo .demo-note.mini { top: auto; bottom: 12px; left: auto; right: 12px; max-width: 36vw; } }
@media (orientation: portrait) and (max-height: 700px) { body.demo .demo-note.mini { display: none; } }   /* 小さいスマホは 小さくしたあと しまう(👁 は光っている) */

/* 着がえ中の名札(2026-11-21 ノブさん「かわいらしく」) */
.tag.kigae { background: #ffd1e3 !important; color: #8a2d55 !important; border: 2px dashed #ff8fbd; animation: kigaeWiggle 1.2s ease-in-out infinite; }
@keyframes kigaeWiggle { 0%,100% { rotate: -3deg; } 50% { rotate: 3deg; } }
body.demo .side > #bCos { display: none !important; }
body.demo .side > #bBot { display: none !important; }   /* おためし客は 見本では出さない */
/* 着がえ中は、上に重なるもの(乾杯・撮影・カウントダウン・小窓)を出さない。撮影の写真は 着がえが終わってから見える */
body.kigae-on #kpUi, body.kigae-on #kpBanner, body.kigae-on #photoUi, body.kigae-on #flash, body.kigae-on #photoBox, body.kigae-on #countdown, body.kigae-on #whoPick, body.kigae-on #sheet, body.kigae-on #sheetBack { display: none !important; }
/* 自分の名札も押せる(押すと 着がえ) */
.tag.me { pointer-events: auto; cursor: pointer; }
.tag.me::after { content: ' 👕'; font-size: 9px; }
body.is-owner .tag.owner { pointer-events: auto; cursor: pointer; }
.tag.kigae::after { content: "" !important; }
.tag.gaming { background: #24324a !important; color: #e6efff !important; border: 1.5px dashed #8fb4ff; }   /* 🎮 ゲーム中 */
.tag.gaming::after { content: "" !important; }
body.demo .side > #bGame { display: none !important; }   /* 着がえ中は 💬・👕 の印を出さない */
/* バトンタッチ */
#whoPick button[data-w=baton] { background: #e6f0ff; }
.bt-lead { font-size: 16px; margin: 4px 0 8px; line-height: 1.6; }
.bt-free { width: 100%; margin-top: 8px; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 2px solid #d9c49a; }
.yt-tall { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin: 6px 0 0; }
.yt-tall input { width: 18px; height: 18px; }

/* ===== おしゃべり画面(11-22 ノブさん「会話がメインの画面」)。顔のカードを ならべる。自分は出さない ===== */
#talkBg { position: fixed; inset: 0; z-index: 9; background: radial-gradient(120% 70% at 50% 30%, #3a2618 0%, #20150e 70%); }
#talkBg::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--sat) + 46px); background: linear-gradient(#2a3a6a, #22305a); border-bottom: 3px solid #c8402c; }
#talk { position: absolute; left: 8px; right: 8px; z-index: 5; display: flex; align-items: center; justify-content: center; }
.tk-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-content: center; flex: 1 1 auto; min-height: 0; max-width: 100%; }
.tk-card { position: relative; flex: none; padding: 0; border: 3px solid #6b4728; border-radius: 14px; background: #4a2e1a; overflow: hidden; display: block; font: inherit; color: #fbf3e4; cursor: pointer; transition: box-shadow .25s, border-color .25s; }
.tk-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 70%; display: block; }
.tk-card.owner { border-color: #e8b830; background: #5a3a1c; }
.tk-card.talk { border-color: #f5c04a; box-shadow: 0 0 0 3px rgba(245,192,74,.45), 0 0 18px rgba(245,192,74,.55); }
.tk-card.away img { filter: grayscale(.7) brightness(.7); }
.tk-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; opacity: .6; }
.tk-nm { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); background: rgba(20,12,8,.8); border-radius: 8px; padding: 2px 8px; font-size: calc(13px * var(--fz, 1)); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-card.owner .tk-nm { background: #c8402c; }
.tk-dr { position: absolute; right: 6px; bottom: 5px; font-size: 20px; }
.tk-st { position: absolute; right: 6px; top: 6px; font-size: 11px; font-weight: 800; background: #d9442e; border-radius: 99px; padding: 2px 7px; }
.tk-bub { position: absolute; left: 6px; right: 6px; top: 6px; background: #fffdf6; color: #2a1a10; border-radius: 12px; padding: 5px 9px; font-size: calc(13px * var(--fz, 1)); line-height: 1.35; font-weight: 800; text-align: left; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-empty { color: #e8dcc6; text-align: center; font-size: 15px; line-height: 1.8; }
.tk-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tk-quick::-webkit-scrollbar { display: none; }
.tk-quick button { flex: none; background: #4a3a2c; color: #fbf3e4; border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: calc(14px * var(--fz, 1)); }
/* おしゃべり画面の間: 右のボタンは 上に 横ならび。頭の上の吹き出し・名札・モニターは かくす。会話の欄は 少し広く */
body.talk-on .side { flex-direction: row-reverse; flex-wrap: wrap; left: 8px; right: 8px; max-height: none !important; gap: 5px; justify-content: flex-start; align-content: flex-start; }
body.talk-on .side > #bView { order: -1; }   /* 👁 は いちばん右上(ふつうの画面の 👁 と だいたい同じ所。続けて押せるように 11-22 ノブさん) */   /* ボタンは 全部見えるように(入りきらなければ 2段に) */
body.talk-on .side::-webkit-scrollbar { display: none; }
@media (orientation: landscape) and (max-height: 520px) { body.talk-on .side { flex-direction: row; justify-content: flex-end; } body.talk-on .side::before { order: 99; } }   /* 横向きの おしゃべり画面: ふつうの画面と同じ並び(左右逆になっていた 11-23) */
body.talk-on .sbtn { flex: none; width: 49px; padding: 5px 0 4px; }
body.talk-on .sbtn span { font-size: 19px; }
body.talk-on .sbtn small { font-size: 9.5px; white-space: nowrap; letter-spacing: -.03em; }
.tk-card.dr .tk-nm { max-width: calc(100% - 38px); }
.tk-grid.small .tk-nm { font-size: calc(11.5px * var(--fz, 1)); padding: 1px 6px; left: 4px; bottom: 4px; }
.tk-grid.small .tk-bub { font-size: calc(11.5px * var(--fz, 1)); padding: 4px 7px; -webkit-line-clamp: 2; left: 4px; right: 4px; top: 4px; }
.tk-grid.small .tk-dr { font-size: 16px; right: 4px; bottom: 3px; }
.tk-grid.small .tk-st { font-size: 10px; padding: 1px 5px; }
body.talk-on .np-row, body.talk-on #bubbles, body.talk-on #tags, body.talk-on #pickHint { display: none !important; }
body.talk-on #tv, body.talk-on #tvBack, body.talk-on #tvClose { visibility: hidden; }
body.talk-on .log { max-height: 22vh; }

#talk { flex-direction: column; }

/* 大将用のおしゃべり画面: 注文ありの印・出すボタン(お客さんの画面には出ない) */
.tk-ord { position: absolute; left: 6px; bottom: 34px; font-size: 12px; font-weight: 900; background: #f5c04a; color: #2a1a10; border-radius: 99px; padding: 2px 8px; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.tk-serve { position: absolute; right: 6px; bottom: 30px; font-size: 13px; font-weight: 900; background: #c8402c; color: #fff; border-radius: 99px; padding: 6px 10px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.tk-grid.small .tk-serve { font-size: 11.5px; padding: 4px 8px; right: 4px; bottom: 24px; }
.tk-grid.small .tk-ord { font-size: 10.5px; left: 4px; bottom: 50px; }   /* 小さいカードでは「出す」の上の段に(重なって 見えなかった 11-22) */
body.talk-on.owner-view .log { max-height: 22vh; }
body.talk-on .log-wrap.big .log, body.talk-on.owner-view .log-wrap.big .log { max-height: 100%; }   /* 「全部見る」は おしゃべりの見え方でも 画面いっぱいに(大将の画面で 上の3分の1しか出ていなかった 11-23) */
/* 自分の言葉(ノブさん 11-22「埋もれないように、自分が話した言葉はすぐわかるように」): 右に寄せて、明るい色+「あなた」の札 */
.log .ln.me { align-self: flex-end; background: #fff1cf; color: #2a1a10; border: 2px solid #e8463d; font-weight: 600; }
.log .ln.me b { color: #b5121b; }
.log .ln.owner.me { background: rgba(140,29,22,.95); color: #fff; border: 2px solid #ffd36a; }
.log .ln.owner.me b { color: #ffd36a; }
body.owner-view .log .ln.me:not(.owner) { background: #fff1cf; }
body.owner-view .log .ln.owner.me { background: rgba(140,29,22,.95); }
.bubble.me { border: 3px solid #e8463d; }
/* 「あなた」の札は 11-23 にやめた(名前が入っているので) */

/* ---------- 大将の「👧 アイちゃん」ボタンとパネル(2026-11-23) ---------- */
#bAi small { white-space: nowrap; letter-spacing: -.06em; }
.ai-dot { position: absolute; top: 4px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: #5ad16a; box-shadow: 0 0 0 2px rgba(20,12,8,.85); }
.ai-top { display: flex; gap: 12px; align-items: center; background: #fff8e8; border-radius: 14px; padding: 8px 10px; border: 1px solid #e3cfa4; }
.ai-pic { width: 84px; height: 112px; flex: none; border-radius: 12px; background: radial-gradient(circle at 50% 35%, #fff3dc, #e8d3a6); object-fit: contain; }
.ai-pic-wait { display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: .55; }
.ai-st { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; line-height: 1.4; color: #5a3a22; min-width: 0; }
.ai-here { font-size: 15px; color: #8a7a6a; }
.ai-here.on { color: #2a8a3a; }
.ai-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ai-seg.two { grid-template-columns: repeat(2, 1fr); }
.ai-seg button { min-height: 58px; border-radius: 14px; background: #f3e6cc; color: var(--ink); font-weight: 900; font-size: 15px; border: 2px solid #d9c39a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; padding: 6px 2px; }
.ai-seg button i { font-style: normal; font-size: 18px; }
.ai-seg button small { font-size: 10.5px; font-weight: 700; color: #8a6a3a; }
.ai-seg button.on { background: #ffd27a; border-color: #c8261c; box-shadow: 0 0 0 1px #c8261c inset; }
.ai-seg button.bye.on { background: #4a3a5a; color: #fff; border-color: #2a1a3a; }
.ai-seg button.bye.on small { color: #e0d6ee; }
.ai-say { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.ai-say-h { flex: none; width: 5.2em; font-size: 10.5px; font-weight: 800; color: #8a6a3a; line-height: 1.2; display: flex; flex-direction: column; align-items: center; white-space: nowrap; letter-spacing: -.04em; }
.ai-say-h i { font-style: normal; font-size: 17px; }
.ai-say .ph-chips { flex: 1; min-width: 0; }
.ai-say .ph-chips button { background: #fff; border: 2px solid #e3cfa4; font-size: 13px; padding: 8px 11px; }
.ai-say .ph-chips button.said { background: #ffd27a; border-color: #c8261c; }
.sheet button:disabled { opacity: .38; }
.ai-g { font-size: 12px; font-weight: 800; color: #8a6a3a; margin: 10px 0 5px; }
.ai-fits { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ai-fits button { min-height: 42px; border-radius: 12px; background: #fff; border: 2px solid #e3cfa4; color: var(--ink); font-weight: 800; font-size: 12.5px; line-height: 1.25; padding: 4px 6px; }
.ai-fits button.on { background: #ffd27a; border-color: #c8261c; }
.ai-chips button { background: #fff; border-color: #e3cfa4; }
.ai-chips button.on { background: #ffd27a; border-color: #c8261c; }
.ai-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-sw button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(0,0,0,.18); }
.ai-sw button.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c8261c; }
.ai-more { margin-top: 12px; background: #fff8e8; border-radius: 12px; padding: 8px 10px; border: 1px solid #e3cfa4; }
.ai-more summary { font-weight: 800; font-size: 13.5px; color: #5a3a22; cursor: pointer; padding: 4px 0; }
.ai-shuffle { margin-top: 12px; }
.ai-shuffle button { width: 100%; }
@media (orientation: landscape) and (max-height: 520px) {
  .ai-pic { width: 66px; height: 88px; }
  .ai-seg button { min-height: 50px; }
}

/* ---------- 🤫 こそっと話す(2026-11-23) ---------- */
#whoPick button small { display: block; font-size: 11.5px; font-weight: 700; opacity: .75; margin-top: 2px; }
#whoPick button.wp-wh { background: #4a3566; color: #fff; }
.to-chip.wh { background: rgba(74,53,102,.97); color: #fff; }
.to-chip.wh { font-size: 15px; padding: 5px 5px 5px 14px; }
.to-chip.wh button { background: #fff; color: #4a3566; font-size: 16px; padding: 10px 16px; min-height: 42px; border: 2px solid #c9b3ea; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.chat.wh-on textarea { background: #efe6ff; box-shadow: 0 0 0 3px #7a5aa8; }
.chat.wh-on textarea::placeholder { color: #6d5a8a; }
.chat.wh-on button { background: #5b3f86; }
.log .ln.wh, body.owner-view .log .ln.wh { background: rgba(74,53,102,.88); border: 1px dashed rgba(214,190,255,.8); color: #fff; }
.log .ln.wh b { color: #e2d0ff; }
.log .ln.wh.me { align-self: flex-end; }
body.owner-view .log .ln.wh.me { background: rgba(74,53,102,.88); color: #fff; }
.bubble.wh { background: #efe6ff; border: 2px dashed #7a5aa8; }
.bubble.wh::after { border-top-color: #efe6ff; }

/* 使い方(ノブさん 11-23): 上の帯の「？」→ guide.html を 同じ画面の中で開く。はじめての人には 3まいだけの案内 */
.tb-help { margin-left: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(243,230,204,.18); border: 1.5px solid rgba(232,163,61,.7); color: #fff4e0; font-weight: 900; font-size: 15px; line-height: 1; padding: 0; }
.help-box { position: fixed; inset: 0; z-index: 90; background: #2a1810; display: flex; flex-direction: column; }
.help-box.hidden { display: none; }
.help-bar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--sat, 0px) + 8px) 12px 8px; background: #1d1410; color: #fff4e0; }
.help-bar button { background: #8c1d16; color: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: 15px; }
.help-box iframe { flex: 1; width: 100%; border: 0; background: #2a1810; }
.first-guide { position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.first-guide.hidden { display: none; }
.fg-card { width: 100%; max-width: 360px; background: #fff8ec; color: #2a1a10; border-radius: 20px; padding: 22px 20px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.45); text-align: center; }
.fg-card .fg-ico { font-size: 46px; line-height: 1.1; }
.fg-card h3 { margin: 8px 0 6px; font-size: 20px; }
.fg-card p { margin: 0; font-size: 15.5px; line-height: 1.7; }
.fg-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0 12px; }
.fg-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e2cfae; }
.fg-dots i.on { background: #d12a1e; }
.fg-btns { display: flex; gap: 10px; }
.fg-btns button { flex: 1; border-radius: 999px; padding: 12px; font-weight: 800; font-size: 16px; }
#fgSkip { background: #efe2cb; color: #6b4a2a; }
#fgNext { background: #d12a1e; color: #fff; }

/* お店の雰囲気: 看板の名前の欄 */
.mood-name { display: flex; gap: 6px; margin: 4px 0 6px; }
.mood-name input { flex: 1; min-width: 0; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #c9a46a; background: #fff8ec; color: #2a1a10; }
.mood-name button { flex: none; border-radius: 10px; padding: 8px 12px; font-weight: 800; background: #8c1d16; color: #fff; }
.mood-name button#moodNameBack { background: #efe2cb; color: #6b4a2a; }

/* こそっと中は 決まり文句を隠す(押すと みんなに聞こえるので) 11-23 */
body.wh-mode #phrases { display: none !important; }
/* 大将: 頼まれている品 */
.mn-card.ordered { outline: 3px solid #c8261c; }
.mn-badge.ord { background: #c8261c; color: #fff; left: auto; right: 6px; }
/* 上の帯: せまい画面で こわれないように(「・大将あり」を隠し、店名を省く) 11-23 */
.topbar .tb-left { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar .tb-right { flex: none; display: flex; align-items: center; white-space: nowrap; }
@media (max-width: 360px) { .tb-own { display: none; } .topbar { padding: 7px 10px; font-size: 13px; } }
/* 座る前(縦向き): 案内を上に出し、決まり文句を隠して 下の席の名札を押せるように 11-23 */
@media (orientation: portrait) {
  body.picking #phrases { display: none !important; }
  body.picking #pickHint { position: fixed; top: calc(96px + env(safe-area-inset-top)); left: 0; right: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 24px); z-index: 20; }
}
/* 座る前の案内は 押せる物ではないので、上からでも 下の名札を押せるように 11-23 */
#pickHint { pointer-events: none; }

/* 「お店を出ますか?」の確認(スマホの「戻る」・帰るボタン。11-23) */
.leave-ask { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20,10,4,.58); }
.leave-ask.hidden { display: none; }
.la-box { width: min(330px, 100%); background: #fff8ec; border: 3px solid #5a3a1e; border-radius: 18px; padding: 24px 18px 18px; text-align: center; color: #3a2412; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.la-ttl { font-size: 23px; font-weight: 900; }
.la-sub { font-size: 15px; margin-top: 8px; color: #6b4a2a; line-height: 1.5; }
.la-btns { display: flex; gap: 10px; margin-top: 20px; }
.la-btns button { flex: 1; min-height: 54px; font: inherit; font-size: 18px; font-weight: 900; border-radius: 14px; border: 2px solid #5a3a1e; cursor: pointer; }
#laStay { background: #fff; color: #3a2412; }
#laGo { background: #c0392b; color: #fff; border-color: #7a1c12; }

/* ===== 11-23 夜 ノブさんの答え(A・言葉) ===== */
/* 字の大きさ: 小さめ・ふつう・大きめ(人が多いときは小さく、少ないときは大きく。ノブさん 11-23)。名札・会話・吹き出し・決まり文句が変わる */
body.fz-s { --fz: .88; } body.fz-l { --fz: 1.2; }
.fz-btn { display: none; }
.log-wrap.big .fz-btn { display: block; position: absolute; top: 8px; left: 10px; background: rgba(255,250,240,.12); border: 1px solid rgba(232,163,61,.6); color: var(--paper2);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 800; }
.fz-btn b { color: var(--gold); margin-left: 4px; }
/* 🤫 こそっと話すボタン(入力欄の左。ノブさん 11-23「大事な機能。ごちゃごちゃさせず、見やすく」) */
.chat .wh-btn { flex: none; width: 48px; height: 44px; padding: 0; border-radius: 14px; background: rgba(74,53,102,.95); border: 1.5px solid #c9b3ea; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1; }
.chat .wh-btn span { font-size: 19px; line-height: 1.05; }
.chat .wh-btn small { font-size: 9.5px; font-weight: 800; letter-spacing: -.04em; margin-top: 1px; }
.chat.wh-on .wh-btn { background: #fff; color: #4a3566; border-color: #7a5aa8; box-shadow: 0 0 0 3px #7a5aa8; }
body.demo .chat .wh-btn { display: none; }
@media (orientation: landscape) and (max-height: 520px) { .chat .wh-btn { height: 40px; width: 44px; } }
/* 横向きの おしゃべりの見え方: 会話は 右下のあき(顔の下)に。左下は 決まり文句と入力 */
@media (orientation: landscape) and (max-height: 520px) {
  body.talk-on .log-wrap:not(.big) { position: fixed; left: calc(min(60vw, 560px) + 14px); right: calc(env(safe-area-inset-right, 0px) + 8px); bottom: calc(var(--sab) + 8px); top: 60vh; }   /* top は js(顔のカードの下) */
  body.talk-on .log-wrap:not(.big) .log { max-height: none; height: 100%; padding-top: 22px; }
  body.talk-on .log-wrap:not(.big) .log > :first-child { margin-top: auto; }
}

/* ===== B: 大将の操作を3つの見出しに(11-23 夜) ===== */
.osec { margin: 10px 0; border-radius: 14px; background: rgba(255,255,255,.55); border: 1.5px solid #d8c19a; }
.osec > summary { list-style: none; cursor: pointer; padding: 12px 40px 12px 14px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.osec > summary::-webkit-details-marker { display: none; }
.osec > summary b { font-size: 17px; }
.osec > summary small { font-size: 12px; color: #8a6a3a; font-weight: 600; }
.osec > summary::after { content: '▼'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #8a6a3a; transition: transform .2s; }
.osec[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
.osec-in { padding: 0 12px 12px; }
.osec-in > .sh-sec:first-child, .osec-in > .small-note:first-child { margin-top: 0; }
.osec-end { border-color: #e2a99e; background: rgba(255,236,230,.6); }
.osec-end > summary b { color: #a0281c; }
.bt-how button small { white-space: normal; }
.ai-fuku > summary { font-weight: 800; }

/* ===== C: 今日のおすすめの木札・いつもの(11-23 夜) ===== */
.osu-board { margin: 2px 0 12px; padding: 10px 10px 12px; border-radius: 14px; background: linear-gradient(180deg, #3a2414, #2a190d); box-shadow: inset 0 0 0 2px #6b4524; }
.osu-ttl { color: #ffd98a; font-weight: 900; font-size: 15px; letter-spacing: .2em; text-align: center; margin-bottom: 8px; }
.osu-tags { display: flex; justify-content: center; gap: 12px; }
.osu-tag { width: 64px; min-height: 150px; padding: 8px 4px 10px; border-radius: 6px 6px 10px 10px; background: linear-gradient(90deg, #e9cf9f, #f6e3bd 45%, #dcbd86); color: #2a1a10; border: 1.5px solid #9a6a36;
  box-shadow: 0 4px 0 #5a3a1c, 0 6px 10px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.osu-tag i { font-style: normal; font-size: 24px; line-height: 1; }
.osu-tag span { writing-mode: vertical-rl; font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 800; font-size: 16px; line-height: 1.15; letter-spacing: .05em; }
.osu-tag:active { transform: translateY(3px); box-shadow: 0 1px 0 #5a3a1c; }
.osu-tag.off { opacity: .45; }
.osu-pick > summary { font-weight: 800; display: flex; flex-direction: column; gap: 2px; }
.osu-pick > summary small { font-weight: 600; color: #8a6a3a; font-size: 12px; }
.mine button.itsumo { background: #fff3d6; border: 2px solid var(--gold); }

/* 帰るときの形(11-23。ノブさんの OK まで BYE_V2 は false) */
.bye-card { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(20,12,8,.55); animation: byein .35s ease-out; }
.bye-card.hidden { display: none; }
.bye-in { position: relative; width: min(78vw, 300px); padding: 18px 16px 14px; border-radius: 22px; background: linear-gradient(180deg, #3a2414, #24160c); box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 2px #6b4524; text-align: center; color: #fbf3e4; }
.bye-bub { position: relative; display: inline-block; background: #fffaf0; color: #2a1a10; font-weight: 900; font-size: 18px; padding: 9px 16px; border-radius: 16px; margin-bottom: 4px; }
.bye-bub::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 9px solid transparent; border-top-color: #fffaf0; border-bottom: 0; }
.bye-fig { position: relative; width: 92%; margin: 6px auto 0; aspect-ratio: 3 / 3.3; overflow: hidden; border-radius: 12px 12px 4px 4px; }
.bye-img { display: block; width: 100%; }
.bye-counter { position: absolute; left: -4%; right: -4%; bottom: 0; height: 15%; background: linear-gradient(180deg, #d9a46a, #b67c45 30%, #8a5a2e); border-top: 3px solid #f0c890; box-shadow: 0 -3px 8px rgba(0,0,0,.35); }
.bye-emo { font-size: 90px; line-height: 1.2; }
.bye-name { font-size: 13px; font-weight: 800; color: #ffd98a; margin-top: -2px; }
.bye-next { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255,217,138,.35); font-size: 13px; color: #e8dcc6; }
.bye-next b { color: #fff; }
@keyframes byein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bye-card { animation: none; } }

/* ===== おしゃべりの見え方(11-23 夜 ノブさんの答え E・言葉を残す) ===== */
/* 新しい言葉は 顔の上に大きく → 数秒後 顔の下に小さく残す(次に話すまで・2分まで)。顔は 下の帯の分しか かくれない */
.tk-bub.keep { top: auto; bottom: 32px; background: rgba(20,12,8,.8); color: #fff6e6; font-weight: 700; font-size: calc(12px * var(--fz, 1)); padding: 3px 8px; -webkit-line-clamp: 2; box-shadow: none; border: 1px solid rgba(255,240,210,.25); }
.tk-bub.keep.old { opacity: .6; }
.tk-grid.small .tk-bub.keep { top: auto; bottom: 25px; font-size: calc(10.5px * var(--fz, 1)); padding: 2px 6px; -webkit-line-clamp: 2; }
body.is-owner .tk-bub.keep { bottom: 62px; }
body.is-owner .tk-grid.small .tk-bub.keep { bottom: 50px; }
.tk-card.tk-big .tk-bub { -webkit-line-clamp: 5; font-size: calc(15px * var(--fz, 1)); }
.tk-card.tk-big .tk-bub.keep { -webkit-line-clamp: 3; font-size: calc(13.5px * var(--fz, 1)); }
/* だれに話したか(E-3) */
.tk-to { display: block; font-style: normal; font-size: .82em; font-weight: 800; color: #b5121b; line-height: 1.2; }
.tk-bub.keep .tk-to { color: #ffd36a; display: inline; margin-right: 5px; }
.tk-to.me { color: #fff; background: #e8463d; border-radius: 99px; padding: 0 6px; display: inline-block; }
.tk-card.called { border-color: #8fd0ff; box-shadow: 0 0 0 2px rgba(143,208,255,.45), 0 0 14px rgba(143,208,255,.5); }
/* ✍️ 書いています(E-1) */
.tk-typing { position: absolute; top: 6px; left: 6px; background: #fffdf6; color: #2a1a10; border-radius: 99px; padding: 2px 9px 2px 7px; font-size: 13px; display: flex; align-items: center; gap: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.tk-typing.low { top: auto; bottom: 32px; }
.tk-grid.small .tk-typing.low { bottom: 25px; } body.is-owner .tk-typing.low { bottom: 62px; }
.tk-typing i { width: 5px; height: 5px; border-radius: 50%; background: #8a6a3a; animation: tkDot 1.1s infinite ease-in-out; }
.tk-typing i:nth-child(2) { animation-delay: .18s; } .tk-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tkDot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-3px); opacity: 1; } }
/* 長く押した人を大きく(E-4) */
.tk-focus { display: flex; flex-direction: column; gap: 8px; align-items: center; height: 100%; justify-content: center; }
.tk-focus.land { flex-direction: row; }
.tk-focus .tk-grid { flex: none; }
.tk-card.tk-big { border-color: #f5c04a; }
/* 横向き: 顔は左の6割、会話は右の列(E-2) */
@media (orientation: landscape) and (max-height: 520px) { body.talk-on #talk { right: auto; width: min(60vw, 560px); } }

/* 設定: 右に出すボタン(11-24) */
.side-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.side-pick button { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 9px 6px; border-radius: 12px; border: 2px solid #d9c39a; background: #fffaf0; color: var(--ink); font-weight: 700; font-size: 13px; }
.side-pick button span { font-size: 18px; }
.side-pick button.on { border-color: var(--red); background: #fff1e6; color: var(--red); }
.linkish { background: none; border: 0; padding: 0 0 0 6px; color: var(--red); font-weight: 700; text-decoration: underline; font-size: inherit; }
