/* 試作用：画面いっぱいにする（ui.css の上に重ねる） */
[hidden] { display: none !important; }  /* display:flex などを指定した要素でも hidden で消えるように */
html, body { height: 100%; overflow: hidden; }
body { padding: 0; background: #1f1a2e; }
#screen { position: fixed; inset: 0; width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; container-type: normal; }
#hud { font-size: clamp(11px, 1.25vw, 19px); }
#labels { font-size: clamp(10px, 1.05vw, 16px); }
#hud.cine > :not([data-big]):not([data-flash]):not(.result) { opacity: 0; transition: opacity .2s; }
#hud > * { transition: opacity .3s; }

.help { position: absolute; left: 50%; bottom: 1.2%; transform: translateX(-50%); font-size: .7em; font-weight: 700; padding: .35em 1em; text-align: center; line-height: 1.6; white-space: nowrap; opacity: .85; }
.help b { background: var(--ink); color: #fff; border-radius: .4em; padding: 0 .4em; margin-right: .2em; font-weight: 800; }
.status { bottom: 9%; }
.action { bottom: 11%; }
.feed { top: 16%; }
.zbanner { bottom: 22%; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 1.4em; height: 1.4em; margin: -.7em 0 0 -.7em; border: .2em solid #fff; border-radius: 50%; box-shadow: 0 0 0 .12em var(--ink); }
.lbl .tag .hp { color: #1ea5d8; margin-left: .2em; letter-spacing: -.1em; }
/* 人の印（ボットでなく人のキャラ。icons.js の PERSON_MARK）：名前の前の小さなゲームパッド */
.pmark { display: inline-block; width: 1.3em; height: .87em; vertical-align: -.06em; margin-right: .22em; flex: none; }
.lbl .tag .fresh { color: #fff; background: #1ea5d8; border-radius: 99px; padding: 0 .4em; margin-left: .3em; font-size: .85em; }
.result { position: absolute; inset: 0; pointer-events: auto; }
.result .banner { font-size: 3.2em; }

.lil-gui.root { position: fixed; top: 0; right: 0; max-height: 100vh; overflow: auto; z-index: 20; font-family: "M PLUS Rounded 1c", sans-serif; --width: 380px; }
/* 長い 名前は 折りかえす（前は 1行の まま のびて、つまみが 右に はみ出して 動かせなかった。2026-10-04 ユーザー）。全文は マウスを のせると 出る */
.lil-gui.root .controller > .name { min-width: 0; width: var(--name-width); flex-shrink: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; padding-top: 2px; padding-bottom: 2px; }
.lil-gui.root .controller.function .name { white-space: normal; line-height: 1.25; }
.lil-gui.root.hidden-panel { display: none; }
.lbl .in.bt-enemyprop { font-size: .78em; font-weight: 900; color: #fff; background: #ff4f6b; border: .12em solid var(--ink); border-radius: 999px; padding: 0 .5em; white-space: nowrap; }
.lbl .in.bt-enemyprop b { font-weight: 900; margin-right: .15em; }
.lil-gui.root .gui-search { display: block; box-sizing: border-box; width: calc(100% - 8px); margin: 4px; padding: 4px 8px; font: inherit; font-size: 12px; color: #fff; background: #1f1f1f; border: 1px solid #555; border-radius: 4px; }

/* 数値テストの結果 */
.bench { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; width: min(92vw, 860px); max-height: 86vh; overflow: auto; background: var(--card); color: var(--ink); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 16px 20px; font-size: 14px; }
.bench h2 { margin: 0 0 6px; font-size: 18px; font-weight: 900; }
.bench p { margin: 4px 0 10px; color: var(--muted); font-weight: 700; }
.bench table { width: 100%; border-collapse: collapse; }
.bench td, .bench th { padding: 5px 8px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.bench th { background: #f6efe6; }
.bench td:first-child { font-weight: 800; white-space: nowrap; }
.bench button { font: inherit; font-weight: 900; cursor: pointer; background: var(--card); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 16px; box-shadow: 0 3px 0 var(--ink); margin-top: 10px; }
.bench .bar { height: 10px; background: #eee; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.bench .bar i { display: block; height: 100%; background: var(--human-d); }

#hud.ended > :not(.result):not([data-feed]) { opacity: 0; pointer-events: none; }
#hud.ended [data-feed] { opacity: 0; }

/* 「さいごの ひとり／ゾンビ」：人数表示のすぐ下に小さく出しっぱなし */
.banner.small { font-size: 1em; top: 14%; padding: .1em .9em .15em; animation: none; transform: translateX(-50%); border-width: .12em; box-shadow: 0 .12em 0 var(--ink); }
.banner.lastz { background: linear-gradient(#b8f07c, #5fae36); border: .12em solid var(--ink); }
.banner.last.small:not([hidden]) ~ .banner.lastz.small { top: 17.5%; }

/* お知らせ：画面の上のほうに小さめに（まんなかのキャラをかくさない） */
.announce { position: absolute; left: 50%; top: 19%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3em; pointer-events: none; z-index: 2; }
.announce .a-main { font-size: 1.9em; font-weight: 900; color: #fff; white-space: nowrap; padding: .05em .8em .12em; border-radius: .5em; text-shadow: var(--outline); border: .08em solid var(--ink); box-shadow: 0 .08em 0 var(--ink); background: linear-gradient(#ffd06b, #ff9f3c); animation: annpop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.announce .a-sub { font-size: .85em; font-weight: 800; padding: .2em .9em; white-space: nowrap; animation: annpop .4s .08s cubic-bezier(.2, 1.6, .4, 1) both; }
.announce.warn .a-main { background: linear-gradient(#ff8a5b, #ff4f6b); }
.announce.green .a-main { background: linear-gradient(#b8f07c, #5fae36); }
.announce.blue .a-main { background: linear-gradient(#8fe3ff, #2fa8e0); }
.announce.gold .a-main { background: linear-gradient(#ffe58a, #ffb52e); }
.announce.info .a-main { background: linear-gradient(#fff, #f3e9ff); color: var(--ink); text-shadow: none; font-size: 1.4em; }
#hud.finale .announce { top: 7%; }
#hud.finale .announce .a-main { font-size: 2.4em; }
@keyframes annpop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* のこり10びょう：タイマーの下に */
.countdown { position: absolute; left: 50%; top: 13%; transform: translate(-50%, 0); font-size: 3.2em; font-weight: 900; color: #fff; text-shadow: var(--outline), 0 .08em 0 var(--ink); pointer-events: none; opacity: 0; }
.countdown.on { animation: cdpop .95s ease-out forwards; }
@keyframes cdpop { 0% { transform: translate(-50%, 0) scale(1.8); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1); opacity: .95; } 70% { opacity: .9; } 100% { transform: translate(-50%, 0) scale(.85); opacity: 0; } }

/* E などのキー表示（物の上に出る） */
.prompt { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: .4em; padding: .2em .8em .2em .25em; background: rgba(255, 255, 255, .96); border: .14em solid var(--ink); border-radius: 999px; box-shadow: 0 .14em 0 var(--ink); font-weight: 900; font-size: .95em; white-space: nowrap; pointer-events: none; z-index: 3; }
.prompt .k { background: var(--ink); color: #fff; border-radius: .45em; padding: .05em .5em .1em; min-width: 1.5em; text-align: center; }

/* リザルト：おどっているみんなを隠さない配置 */
.result .banner.win { top: 3%; font-size: 2.4em; }
.result .subbanner { top: 15.5% !important; font-size: .95em; max-width: 60%; white-space: normal; text-align: center; line-height: 1.5; }
.result .awards { top: auto; bottom: 4%; right: 1.5%; width: 27%; font-size: .66em; padding: .5em .7em; opacity: .96; }
.result .allwin { font-size: 1em; bottom: 4%; }
.result .resbtns { bottom: 4%; }

/* 決着の瞬間は、お知らせと人数だけ残す */
#hud.finale > :not([data-ann]):not([data-teambar]):not([data-big]) { opacity: 0; pointer-events: none; }

.lbl .tag .ammo { color: #1ea5d8; margin-left: .15em; font-size: .9em; }
.lbl .tag .tired { color: #fff; background: #ff8a5b; border-radius: 99px; padding: 0 .4em; margin-left: .2em; font-size: .8em; }

/* 試合 → お祭りに切りかわるときの丸いワイプ */
#wipe { position: fixed; inset: 0; background: var(--ink); pointer-events: none; z-index: 15; clip-path: circle(0% at 50% 50%); }
#wipe.on { animation: wipe 1.1s ease-in-out forwards; }
@keyframes wipe { 0% { clip-path: circle(0% at 50% 50%); } 35% { clip-path: circle(80% at 50% 50%); } 55% { clip-path: circle(80% at 50% 50%); } 100% { clip-path: circle(0% at 50% 50%); } }
/* なかまにした数 */
.myscore { position: absolute; top: calc(2.6% + 4.3em); left: 1.8%; display: flex; gap: .7em; padding: .25em .8em; font-size: .72em; font-weight: 800; white-space: nowrap; }
.myscore b { font-size: 1.25em; margin-left: .15em; }
.myscore .dead { color: var(--muted); }
.board { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .6em 1em .8em; font-size: .85em; z-index: 4; }
.board h3 { margin: 0 0 .4em; font-size: 1.05em; font-weight: 900; }
.board h3 small { font-size: .7em; color: var(--muted); }
.board table { border-collapse: collapse; }
.board th { font-size: .75em; font-weight: 800; color: var(--muted); padding: .1em .7em; line-height: 1.2; }
.board td { padding: .15em .7em; text-align: center; font-weight: 900; border-top: 1px solid rgba(58,45,79,.12); }
.board td small { font-size: .7em; color: var(--muted); font-weight: 700; margin-left: .3em; }
.board td.nm { text-align: left; display: flex; align-items: center; gap: .35em; }
.board td.nm svg.face { width: 1.5em; height: 1.6em; }
.board td.sum { font-size: 1.15em; color: var(--human-d); }
.board tr.me td { background: #fff3c4; }
.result .board.inresult { left: 1.5%; top: auto; bottom: 12%; transform: none; font-size: .62em; opacity: .96; }
.result .allwin { bottom: 4%; }

/* ================= ゾーン配置（重ならないように） ================= */
.hud-tl { position: absolute; top: 2.4%; left: 1.6%; display: flex; flex-direction: column; gap: .4em; }
.hud-tl .you { position: static; padding: .35em .9em .4em .4em; }
.you .nm .role { margin-left: .3em; vertical-align: .12em; }
.you .sc { display: flex; align-items: center; gap: .6em; margin-top: .25em; font-size: .82em; font-weight: 900; }
.you .sc span { display: inline-flex; align-items: center; gap: .12em; }
.you .sc .ico { width: 1.4em; height: 1.4em; }
.you .sc .sum b { color: var(--human-d); }
.you .sc .dead { padding-left: .55em; border-left: .12em solid rgba(58, 45, 79, .2); color: var(--muted); }

.hud-top { position: absolute; top: 2.2%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .45em; }
.hud-top .teambar { position: static; transform: none; }
.hud-top .announce { position: static; transform: none; }
.chips { display: flex; gap: .4em; }
.chips:not(:has(.chip:not([hidden]))) { display: none; }
.chip { font-weight: 900; font-size: .85em; color: #fff; padding: .08em .9em .14em; border-radius: 999px; border: .13em solid var(--ink); box-shadow: 0 .12em 0 var(--ink); text-shadow: var(--outline); }
.chip.last { background: linear-gradient(#ff8a5b, #ff4f6b); }
.chip.lastz { background: linear-gradient(#b8f07c, #5fae36); }
.tb-timer.count { font-size: 2em; color: #ff4f6b; animation: throb .5s infinite; }

.feed { top: 5.5%; }
.help.mini { font-size: .68em; padding: .2em .9em; opacity: .75; }
/* 操作説明の表（hud.js の helpGrid）：キー｜説明 を 2組ずつ。キーは右よせ・説明は左よせ */
.help .help-grid { display: grid; grid-template-columns: repeat(2, max-content minmax(0, 1fr)); gap: .25em .6em; align-items: baseline; text-align: left; white-space: normal; line-height: 1.35; }
.help .help-grid .hk { justify-self: end; white-space: nowrap; }
.help .help-grid .hk b { margin-right: 0; }
.help .help-grid .hd { min-width: 6em; }
.help .help-grid .hn { grid-column: 1 / -1; text-align: center; }
@media (max-width: 760px) { .help .help-grid { grid-template-columns: max-content minmax(0, 1fr); } }
.status { bottom: 4%; }
.action { bottom: 7.5%; }

#hud.finale > :not(.hud-top):not([data-big]) { opacity: 0; pointer-events: none; }
#hud.finale .chips { display: none; }
#hud.finale .hud-top .announce .a-main { font-size: 2.4em; }

/* スコア表：見出しはアイコン */
.board th .ico { width: 1.6em; height: 1.6em; display: block; margin: 0 auto; }
.board th small { display: block; font-size: .8em; }
.board td.dead { color: var(--muted); }
.board td.dead small .ico { width: 1em; height: 1em; vertical-align: -.15em; margin-left: .2em; }

/* みんなに賞：2列につめて余白を減らす */
.result .awards { width: auto; max-width: 44%; display: grid; grid-template-columns: repeat(2, auto); column-gap: 1.1em; row-gap: .25em; padding: .5em .8em .6em; align-items: center; }
.result .awards h3 { grid-column: 1 / -1; margin: 0 0 .1em; }
.result .awards .aw { gap: .35em; font-size: .8em; line-height: 1.25; }
.result .awards .aw svg.face { width: 1.6em; height: 1.7em; }
.result .awards .aw b { font-size: .95em; white-space: nowrap; }
.result .awards .aw small { font-size: .82em; white-space: nowrap; }

/* ================= こっそりモード ================= */
/* 目的：ざいりょうの びん（そろった数） */
.tb-obj { display: flex; align-items: center; gap: .15em; }
.tb-obj .ico { width: 1.45em; height: 1.45em; }
.tb-obj .ico.empty { opacity: .25; filter: grayscale(1); }
.tb-obj small { font-weight: 900; margin-left: .3em; font-size: .85em; }
.you .sc .ico { vertical-align: middle; }
/* 足音の大きさ */
.status .ico { width: 1.5em; height: 1.5em; }
.status .loud { font-weight: 900; padding: .02em .6em .08em; border-radius: 999px; color: #fff; font-size: .85em; }
.status .loud.q { background: #7ec8a4; }
.status .loud.n { background: #9a8fbf; }
.status .loud.m { background: #ffa865; }
.status .loud.l { background: #ff4f6b; animation: throb .5s infinite; }
.status .shh { font-weight: 900; font-size: .8em; background: var(--ink); color: #fff; padding: .02em .6em .08em; border-radius: 999px; }
/* 長押しのゲージ */
.prompt .hold { display: inline-block; width: 4.5em; height: .55em; border: .12em solid var(--ink); border-radius: 999px; background: #eee; overflow: hidden; }
.prompt .hold i { display: block; height: 100%; background: var(--human-d); }
/* マシンの札・材料を持っている人の札 */
.lbl .note.mach { background: #2f2a52; border: .12em solid #7fe0ff; font-size: .8em; }
.lbl .note.mach.busy { border-color: #ffb347; }
.lbl .note.mach b { color: #7fe0ff; margin-left: .2em; }
.lbl .note.mach.busy b { color: #ffb347; }
.lbl .tag .carry { color: #fff; background: #ff7fa8; border-radius: 99px; padding: 0 .45em; margin-left: .2em; font-size: .8em; }
.lbl .pop.blue { color: #7fe0ff; }
.lbl .pop.heal { color: #6fe07a; font-size: 1.5em; }

/* モードえらび */
#hud > .modesel { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(31, 26, 46, .55); pointer-events: auto !important; opacity: 1 !important; z-index: 10; }
#hud > .modesel[hidden] { display: none; }
.modesel .ms-in { position: static; padding: 1.2em 1.6em 1.1em; text-align: center; max-width: 92%; }
.modesel h1 { margin: 0; font-size: 2.2em; font-weight: 900; color: var(--human-d); text-shadow: 0 .06em 0 var(--ink); letter-spacing: .02em; }
.modesel h1 small { display: block; font-size: .42em; letter-spacing: .12em; color: var(--ink); text-shadow: none; opacity: .7; }
.modesel .ms-sub { font-weight: 800; color: var(--muted); margin: .2em 0 .8em; }
.modesel .mtag { align-self: flex-start; font-size: .7em; font-weight: 900; padding: .05em .7em .1em; border-radius: 999px; background: var(--ink); color: #fff; }
.perf { position: fixed; right: .5em; bottom: .4em; z-index: 50; font: 700 11px/1.3 system-ui, sans-serif; color: #fff; background: rgba(40,30,60,.55); padding: .15em .6em; border-radius: 6px; pointer-events: none; }
.perf.bad { background: rgba(220,50,80,.8); }
.crosshair.zhot { border-color: #ff5f8a; transform: scale(1.35); box-shadow: 0 0 0 .12em var(--ink), 0 0 .8em #ff5f8a; }
.modesel .ms-note { margin-top: .6em; font-size: .75em; font-weight: 700; color: var(--muted); }
.modesel .ms-note b { background: var(--ink); color: #fff; border-radius: .4em; padding: 0 .4em; }
/* キャラえらび（バトロワ） */
.charsel .cs-in { max-width: 96%; max-height: 96%; overflow: auto; padding: .9em 1.2em 1em; }
.charsel h1 { margin: 0; font-size: 1.5em; }
.charsel .ms-sub { margin: .2em 0 .5em; font-size: .9em; }
.charsel .cs-order { display: flex; justify-content: center; align-items: center; gap: .4em; flex-wrap: wrap; margin-bottom: .6em; font-weight: 800; font-size: .85em; }
.charsel .cs-order > span { color: var(--muted); margin-right: .2em; }
.charsel .cs-order > i { font-style: normal; color: var(--muted); }
.charsel .cs-who { display: flex; align-items: center; gap: .3em; background: var(--card); border: .13em solid var(--ink); border-radius: .8em; padding: .15em .6em; min-height: 2.2em; }
.charsel .cs-who.me { background: #fff6d6; }
.charsel .cs-who.now { box-shadow: 0 0 0 .18em var(--gold); }
.charsel .cs-who .cs-no { background: var(--ink); color: #fff; border-radius: 999px; width: 1.4em; height: 1.4em; display: grid; place-items: center; font-size: .8em; }
.charsel .cs-who svg.face { width: 1.5em; height: 1.6em; }
.charsel .cs-who small { color: var(--muted); font-weight: 700; }
.charsel .cs-cards { display: grid; grid-template-columns: repeat(7, minmax(8em, 11.5em)); gap: .45em; justify-content: center; }   /* 14体：7れつ×2だん（2-② で 8→11体、2-③ で 14体） */
.charsel .cs-card { font: inherit; color: var(--ink); text-align: left; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: .25em; padding: .5em .65em .6em; background: var(--card); border: .15em solid var(--ink); border-radius: .9em; box-shadow: 0 .2em 0 var(--ink); transition: transform .1s; }
.charsel .cs-card:hover:not([disabled]) { transform: translateY(-.12em); }
.charsel .cs-card.on { background: #fff6d6; outline: .2em solid var(--gold); outline-offset: .1em; }
.charsel .cs-card.taken { opacity: .45; cursor: not-allowed; }
.charsel .cs-card kbd { position: absolute; top: .35em; right: .45em; font: inherit; font-size: .7em; font-weight: 900; background: var(--ink); color: #fff; border-radius: .35em; padding: 0 .35em; }
.charsel .cs-top { display: flex; align-items: center; gap: .45em; }
.charsel .cs-top svg.face { width: 2.6em; height: 2.8em; flex: none; }
.charsel .cs-name { font-size: 1.05em; font-weight: 900; display: block; }
.charsel .cs-name small { font-size: .65em; color: var(--muted); }
.charsel .cs-role { font-size: .7em; font-weight: 900; background: #efe7ff; border-radius: 999px; padding: 0 .5em; }
.charsel .cs-ab { display: flex; align-items: center; flex-wrap: wrap; gap: .1em .3em; font-size: .9em; }
.charsel .cs-ab b { white-space: nowrap; }
.charsel .cs-ab .ico { width: 1.6em; height: 1.6em; flex: none; }
.charsel .cs-cool { margin-left: auto; font-size: .7em; font-weight: 800; color: #2f8a5a; background: #e6fff0; border-radius: 999px; padding: 0 .45em; white-space: nowrap; }
.charsel .cs-cool.heavy { color: #b05a1a; background: #fff0e0; }
.charsel .cs-note { font-size: .68em; font-weight: 700; line-height: 1.35; }
.charsel .cs-ctr { font-size: .64em; font-weight: 700; color: var(--muted); line-height: 1.3; }
.charsel .cs-taken { position: absolute; inset: auto 0 40% 0; text-align: center; font-style: normal; font-weight: 900; background: rgba(58,45,79,.85); color: #fff; padding: .2em 0; }
.charsel .cs-btns { margin-top: .7em; display: flex; justify-content: center; gap: .5em; flex-wrap: wrap; }
.charsel .cs-btns button { font: inherit; font-weight: 900; cursor: pointer; background: var(--card); color: var(--ink); border: .15em solid var(--ink); border-radius: 999px; padding: .25em 1.1em; box-shadow: 0 .15em 0 var(--ink); }
.charsel .cs-btns button[data-go] { background: var(--gold); font-size: 1.1em; }
.charsel .cs-btns button[disabled] { opacity: .5; cursor: default; }
/* 下のゾーン：左＝状態、まんなか＝操作説明、右＝アクション。横に重ならない幅にする */
.help { max-width: 54%; white-space: normal; }
.status { max-width: 15em; }
.status .row small { white-space: normal; line-height: 1.35; }

/* 気配マーク：聞こえた音の方向（画面のまんなかを囲む輪の上） */
.sring { position: absolute; left: 50%; top: 52%; width: 0; height: 0; pointer-events: none; z-index: 1; }
.smark { position: absolute; left: 0; top: 0; width: 3.6em; height: 1.1em; border-radius: 50% 50% 40% 40% / 100% 100% 30% 30%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(ellipse at 50% 100%, currentColor 0%, currentColor 35%, transparent 72%); filter: drop-shadow(0 0 .35em currentColor); }
.smark.zombie { color: #8fe35a; }
.smark.human { color: #ffa865; }
.smark.lunge { color: #ff4f6b; width: 4.6em; height: 1.4em; }
#hud.cine .sring, #hud.ended .sring { display: none; }

/* どうぐ（Q・F）：アクションボタンの左 */
.gslots { position: absolute; right: calc(2.6% + 8.2em); bottom: 7.5%; display: flex; gap: .45em; }
.gslots:empty { display: none; }
.gs { position: relative; width: 4.4em; height: 4.4em; border-radius: 1em; background: color-mix(in srgb, var(--paper) 95%, transparent); border: .15em solid var(--ink); box-shadow: 0 .18em 0 var(--ink); display: grid; place-items: center; text-align: center; }
.gs .ico { width: 2.3em; height: 2.3em; margin-top: -.5em; }
.gs small { position: absolute; bottom: .25em; left: 0; right: 0; font-size: .58em; font-weight: 900; line-height: 1.15; color: var(--ink); }
.gs.empty { opacity: .55; }
.gs.empty small { position: static; color: var(--muted); }
.gs .gk { position: absolute; top: -.55em; left: -.45em; background: var(--ink); color: #fff; border-radius: .45em; padding: 0 .45em .05em; font-weight: 900; font-size: .75em; }
/* マウス操作のヒント（1人称・3人称でマウスがつかまっていないとき） */
.lockhint { position: absolute; left: 50%; top: 36%; transform: translateX(-50%); background: var(--ink); color: #fff; font-weight: 900; padding: .35em 1.1em .4em; border-radius: 999px; font-size: .9em; pointer-events: none; opacity: .9; }
/* Esc メニュー（試合は つづく）・一時停止の 札 */
.escmenu { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: .5em; padding: 1em 1.6em 1.2em; min-width: 16em; text-align: center; z-index: 30; }
.escmenu h2 { margin: 0; font-size: 1.5em; font-weight: 900; }
.escmenu .em-note { font-size: .8em; font-weight: 800; color: var(--muted); margin-bottom: .2em; }
.escmenu button { font: inherit; font-weight: 900; cursor: pointer; background: var(--card); color: var(--ink); border: .15em solid var(--ink); border-radius: 999px; padding: .35em 1em; box-shadow: 0 .15em 0 var(--ink); }
.escmenu button.main { background: #ffd84d; font-size: 1.1em; }
.escmenu .ms-vol { display: grid; grid-template-columns: 3.6em 9em 3.2em 5.4em; justify-content: center; justify-items: start; align-items: center; gap: .6em; font-weight: 900; margin-top: .2em; }
.escmenu .ms-vol input { width: 9em; accent-color: #ff8fb8; }
.escmenu .ms-vol button { padding: .1em .6em; font-size: .8em; box-shadow: 0 .1em 0 var(--ink); }
/* 通報（Esc のメニューの中。2026-11-06）：プレイヤーをえらぶ → 理由をえらぶ */
.escmenu .rp-row { display: flex; justify-content: space-between; align-items: center; gap: .8em; padding: .3em .4em; }
.escmenu .rp-row b { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escmenu .rp-done { font-size: .85em; font-weight: 900; color: var(--muted); white-space: nowrap; }
.escmenu .rp-who { font-weight: 900; color: var(--muted); }
.escmenu .rp-note { font-size: .85em; font-weight: 800; color: var(--muted); }
.escmenu button:disabled { opacity: .45; cursor: default; }
.escmenu .ms-vol button.on { background: var(--gold); }
.escmenu.muted .ms-vol input, .escmenu.muted .ms-vol b { opacity: .35; }
.escmenu .ms-vol span, .escmenu .ms-vol b { white-space: nowrap; }
.escmenu .pad-sel { outline: .22em solid #ff8fb8; outline-offset: .15em; }
.escmenu .ms-vol.pad-sel { border-radius: 999px; }
.pausechip { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); background: var(--ink); color: #fff; font-weight: 900; padding: .45em 1.3em .5em; border-radius: 1em; text-align: center; font-size: 1.1em; pointer-events: none; z-index: 30; }
.pausechip small { display: block; font-size: .7em; opacity: .85; }
/* 長押しのゲージ：ねらいの輪のまわり */
.crosshair { background: conic-gradient(var(--human-d) calc(var(--hold, 0) * 1turn), transparent 0); }
/* ロッカーの中：すき間からのぞく */
.hideov { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(rgba(12, 10, 24, .96) 0 30%, transparent 30% 36%, rgba(12, 10, 24, .96) 36% 44%, transparent 44% 50%, rgba(12, 10, 24, .96) 50% 58%, transparent 58% 64%, rgba(12, 10, 24, .96) 64% 100%); }
/* くんくん中：画面のふちが緑に */
.sniffov { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 6em 1em rgba(120, 220, 90, .45); }
/* ボットのゾンビの気づき */
.lbl .tag .alert { display: inline-block; margin-right: .3em; color: #fff; background: #ffb52e; border-radius: 99px; padding: 0 .4em; font-weight: 900; }
.lbl .tag .alert.on { background: #ff4f6b; }
/* キャラえらび：14体（7れつ）でも 720p で ボタンまで 見えるように 少し つめる（2026-10-04） */
.charsel .cs-in { font-size: .92em; }
.charsel .cs-card { padding: .4em .5em .5em; gap: .2em; }
.charsel .cs-top { gap: .3em; }
.charsel .cs-top svg.face { width: 2.2em; height: 2.4em; }
.charsel .cs-name { font-size: .95em; white-space: nowrap; }
.charsel .cs-name small { display: none; }
.charsel .cs-ab { font-size: .85em; }
.charsel .cs-note { font-size: .64em; line-height: 1.3; }
.charsel .cs-ctr { font-size: .6em; line-height: 1.25; }
/* 開始直後に 重ならないように（2026-10-04 ユーザー「開始直後の アビリティ説明や アイテム説明が UI 重なりまくってる・説明が 横長すぎる」）
   お知らせの 下の字は 折りかえす。マウス操作の ヒントは まんなかより 下（上は お知らせ・リングの 矢じるし） */
.announce .a-sub { white-space: normal; width: max-content; max-width: min(44em, 78vw); text-align: center; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }   /* わかち書きの すきまで 折りかえす */
.lockhint { top: auto; bottom: 14%; }   /* 下の 操作説明の すぐ上（まんなかの上は お知らせ・下は 拾った物の お知らせ） */
.hud-top .ab-dome { position: static !important; transform: none !important; }
.bt-toast, .help .bt-legend, .status .bt-note { word-break: keep-all; overflow-wrap: anywhere; }

/* ロビー（作業4-① E。lobbyView.js。2026-10-14 にふつうのマルチプレイの形につくりなおした）
   左にいまのモード（かえる）・きせかえ・せってい、まん中に自分と仲間のキャラ、右に部屋と大きなスタート。モードとマップ・きせかえ・せっていは重ねて出す */
#hud > .modesel[data-modesel] { background: none; }   /* うしろはロビーの 3D（lobbyStage.js）。レースの風景の暗い膜は 3D の中でかける（キャラを暗くしないように） */
/* ロビーの間は、うしろの試合の HUD と名前の札を出さない（うしろの 3D だけ見せる） */
#hud:has(> [data-modesel]:not([hidden])) > :not([data-modesel]):not([data-charsel]), #screen:has([data-modesel]:not([hidden])) #labels { visibility: hidden; }
.modesel .lb { box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; gap: .8em; padding: 1.1em 1.5em 1.3em; overflow: auto; text-align: left; color: var(--ink); }
.lb button { font: inherit; font-weight: 900; cursor: pointer; color: var(--ink); background: var(--card); border: .15em solid var(--ink); border-radius: 999px; padding: .25em 1em; box-shadow: 0 .15em 0 var(--ink); transition: transform .08s; }
.lb button:hover:not([disabled]) { transform: translateY(-.08em); }
.lb button:active:not([disabled]) { transform: translateY(.1em); box-shadow: 0 .05em 0 var(--ink); }
.lb button[disabled] { cursor: default; opacity: .5; }
.lb .lb-ico { width: 1.15em; height: 1.15em; margin-right: .4em; flex: none; }
.lb .mtag { align-self: flex-start; font-size: .7em; font-weight: 900; padding: .05em .7em .1em; border-radius: 999px; background: var(--ink); color: #fff; white-space: nowrap; }
.lb-cap { font-size: .75em; font-weight: 900; color: var(--muted); letter-spacing: .08em; }
.lb-card { display: flex; flex-direction: column; gap: .45em; padding: .8em .95em .9em; background: var(--card); border: .17em solid var(--ink); border-radius: 1.1em; box-shadow: 0 .22em 0 var(--ink); }
.lb-top { display: flex; align-items: flex-end; justify-content: space-between; gap: .4em 1em; flex-wrap: wrap; }
.lb-top h1 { margin: 0; font-size: 2.3em; font-weight: 900; line-height: 1.05; color: #fff; text-shadow: var(--outline), 0 .1em 0 var(--ink); letter-spacing: .03em; }
.lb-top h1 small { display: block; font-size: .38em; letter-spacing: .16em; margin-top: .2em; }
.lb-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3em 1.2em; align-items: center; font-size: .78em; font-weight: 800; color: #fff; text-shadow: 0 .06em .25em rgba(0, 0, 0, .55); }
.lb-foot b { background: var(--card); color: var(--ink); border-radius: .4em; padding: 0 .45em; margin-right: .3em; text-shadow: none; }
.lb-ver { opacity: .8; }
.lb-cols { flex: 1 0 auto; display: grid; grid-template-columns: minmax(12em, 16em) minmax(0, 1fr) minmax(12em, 16em); gap: 1.4em; align-items: center; }
.lb-left, .lb-right { display: flex; flex-direction: column; gap: .7em; }
/* 左：いまのモード・きせかえ・せってい */
.lb-mname { display: flex; flex-direction: column; gap: .2em; }
.lb-mname b { font-size: 1.35em; font-weight: 900; line-height: 1.2; }
.lb-mrows { list-style: none; margin: 0; padding: .45em .65em; display: flex; flex-direction: column; gap: .2em; background: var(--hl); border-radius: .7em; font-size: .88em; }
.lb-mrows li { display: flex; justify-content: space-between; gap: .6em; }
.lb-mrows span { font-weight: 800; color: var(--muted); white-space: nowrap; }
.lb-mrows b { font-weight: 900; text-align: right; }
.lb .lb-change { display: flex; align-items: center; justify-content: center; background: var(--gold); padding: .4em .8em; }
.lb-mnote { font-size: .8em; font-weight: 800; color: var(--muted); }
.lb-menu { display: flex; flex-direction: column; gap: .5em; }
.lb .lb-menu button { display: flex; align-items: center; padding: .45em 1.1em; font-size: 1.05em; }
/* まん中：自分と仲間のキャラ。キャラは裏の 3D（lobbyStage.js）が .lb-stand の中に立たせる。ここは名前の札と準備OK だけ */
.lb-party { display: flex; flex-direction: column; align-items: center; gap: .6em; min-width: 0; }
.lb-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 1em .6em; }
.lb-pc { position: relative; box-sizing: border-box; width: 9.4em; display: flex; flex-direction: column; align-items: center; gap: .3em; color: var(--ink); text-align: center; }
.lb-stand { width: 100%; height: 13em; flex: none; display: grid; place-items: center; }
.lb-pc[data-team="0"] { --tc: #ff6f7f; }
.lb-pc[data-team="1"] { --tc: #4fa8ff; }
.lb-pc[data-team="2"] { --tc: #5ccf6a; }
.lb-pc[data-team="3"] { --tc: #ffc93c; }
.lb-pc.gone { opacity: .55; }
.lb-plate { display: flex; align-items: center; justify-content: center; gap: .35em; max-width: 100%; box-sizing: border-box; padding: .15em .8em .2em; background: var(--card); border: .15em solid var(--ink); border-radius: 999px; box-shadow: 0 .15em 0 var(--ink); }
.lb-pc.me .lb-plate { background: var(--gold); }
.lb-pname { font-size: 1em; font-weight: 900; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.lb-you { flex: none; font-size: .7em; font-weight: 900; }
.lb-pchar { font-size: .75em; font-weight: 800; color: #fff; text-shadow: 0 .06em .25em rgba(0, 0, 0, .6); }
.lb .lb-pcbtn { display: flex; flex-direction: column; align-items: center; gap: 0; padding: .15em .9em .25em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); background: var(--gold); line-height: 1.2; }
.lb .lb-pcbtn small { font-size: .62em; font-weight: 800; }
.lb .lb-pcbtn b { font-size: .8em; }
.lb .lb-danger { background: #ffb3b3; }
.lb .lb-danger small { display: block; font-size: .7em; }
.lb-pc > i { font-style: normal; font-size: .8em; font-weight: 900; line-height: 1.25; border: .12em solid var(--ink); border-radius: 999px; padding: .05em .9em .1em; }
.lb-ok { background: #9fe89a; }
.lb-wait { background: #eee; color: var(--muted); }
.lb-host { background: var(--gold); }
.lb-pc > i.lb-no { background: #ffd0d8; border-radius: .8em; font-size: .7em; }
.lb-team { flex: none; font: inherit; font-size: .72em; font-weight: 900; background: var(--tc, var(--ink)); color: #fff; border: 0; border-radius: .4em; padding: .02em .35em; text-shadow: 0 .05em 0 rgba(0, 0, 0, .25); }
select.lb-team { cursor: pointer; }
.lb .lb-pc.empty { padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; color: var(--ink); }
.lb .lb-pc.empty:hover { transform: none; }
.lb-plus { width: 1.6em; height: 1.6em; display: grid; place-items: center; font-size: 2.4em; font-weight: 900; line-height: 1; color: var(--ink); background: rgba(255, 255, 255, .8); border: .07em solid var(--ink); border-radius: 50%; box-shadow: 0 .07em 0 var(--ink); transition: transform .1s; }
.lb button.lb-pc.empty:hover .lb-plus { transform: scale(1.08); background: #fff; }
.lb-pc.empty .lb-plate { font-weight: 900; }
.lb-pc.empty small.lb-plate { font-size: .8em; background: rgba(255, 255, 255, .7); }
.lb-pnote { font-size: .8em; font-weight: 800; color: #fff; text-shadow: 0 .06em .25em rgba(0, 0, 0, .6); background: rgba(31, 26, 46, .38); border-radius: 999px; padding: .1em .9em .15em; }   /* 明るい背景（ボート乗り場）でも読めるように */
/* 右：部屋とスタート */
.lb-room .lb-rt { font-size: 1.3em; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
/* 部屋の名前のとなりの「ぬける・とじる」：部屋のことはカードの中にまとめる。URL のコピーより弱く（白い小さな丸いボタン） */
.lb-rhead { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.lb-rhead .lb-rt { min-width: 0; }
.lb .lb-rout { flex: none; font-size: .78em; padding: .15em .8em .2em; border-width: .12em; border-radius: 999px; box-shadow: 0 .1em 0 var(--ink); background: #fff; color: var(--ink); }
.lb .lb-room .lb-danger { width: 100%; }
.lb-room small:not(.lb-cap) { font-size: .75em; font-weight: 700; color: var(--muted); }
.lb-card.lb-note { border-color: #c4456a; background: #ffeef3; }
.lb-note b { font-weight: 900; color: #c4456a; }
.lb-note small { font-size: .78em; font-weight: 700; }
.lb .lb-note button { align-self: flex-start; background: var(--gold); }
.lb-btns { display: flex; flex-direction: column; gap: .5em; }
.lb .lb-go { display: flex; flex-direction: column; align-items: center; gap: .05em; font-size: 1.9em; line-height: 1.1; padding: .35em .8em .4em; border-width: .1em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); background: var(--gold); letter-spacing: .06em; }
.lb .lb-go small { font-size: .38em; letter-spacing: 0; opacity: .75; }
.lb .lb-pop { display: none; }   /* 新しい UI（uiPop.css）だけで出す絵 */
.lb .lb-go.on { background: #9fe89a; }
.lb-playing { font-weight: 900; color: #fff; text-align: center; text-shadow: 0 .06em .25em rgba(0, 0, 0, .6); }
.lb-why { font-size: .8em; font-weight: 800; color: #c4456a; background: #ffeef3; border: .13em solid #c4456a; border-radius: .7em; padding: .35em .6em; }
/* 重ねて出す画面（モードとマップ・きせかえ・せってい） */
.lb-layer { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(20, 16, 40, .55); }
.lb-sheet { box-sizing: border-box; width: min(64em, 94%); max-height: 92%; overflow: auto; display: flex; flex-direction: column; gap: .8em; padding: 1em 1.3em 1.1em; background: var(--paper); color: var(--ink); border: .2em solid var(--ink); border-radius: 1.3em; box-shadow: 0 .3em 0 var(--ink); text-align: left; }
.lb-sheet.lb-dress, .lb-sheet.lb-set { width: min(40em, 94%); }
.lb-sheet h2 { margin: 0; font-size: 1.5em; font-weight: 900; }
.lb-sheet h3 { margin: 0 0 .1em; font-size: .9em; font-weight: 900; color: var(--muted); letter-spacing: .08em; }
.lb-sheet h3 small { margin-left: .6em; font-weight: 700; letter-spacing: 0; }
.lb-sheet h4 { margin: .25em 0 .3em; font-size: .85em; font-weight: 900; color: var(--muted); }
.lb-sheet-btns { display: flex; gap: .6em; justify-content: flex-end; }
.lb .lb-sheet-btns .main { background: var(--gold); font-size: 1.1em; padding: .3em 1.4em; }
.lb-hint { margin: 0; font-size: .8em; font-weight: 700; color: var(--muted); }
/* 友だちをさそう（部屋をつくっています… → 部屋をつくりました！・URL をコピー） */
.lb-sheet.lb-inv { width: min(34em, 94%); align-items: center; text-align: center; }
.lb-inv p { margin: 0; font-weight: 800; }
.lb-inv .lb-sheet-btns { align-self: stretch; justify-content: center; }
.lb-spin { width: 2.4em; height: 2.4em; border: .32em solid #e6eefc; border-top-color: var(--ink); border-radius: 50%; animation: nlspin .9s linear infinite; }
.lb-url { display: flex; gap: .5em; width: 100%; }
.lb-url input { flex: 1; min-width: 0; font: inherit; font-weight: 800; font-size: .9em; padding: .3em .6em; border: .15em solid var(--ink); border-radius: .6em; background: var(--card); color: var(--ink); }
.lb .lb-url .main { background: var(--gold); white-space: nowrap; }
.lb-code b { font-size: 1.4em; letter-spacing: .12em; margin-left: .3em; }
/* モードとマップ */
.lb-sheet.lb-msel { overflow: hidden; }   /* モードの一覧と決めごとは、それぞれの中でスクロール（決定のボタンはいつも見える） */
.lb-ms { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 1.1em; align-items: start; }
.lb-ms-list { max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: .5em; padding: .3em .4em .5em .2em; }
.lb-ms-feat { display: flex; flex-direction: column; gap: .5em; }
.lb .lb-mc { display: flex; flex-direction: column; gap: .2em; text-align: left; border-radius: 1em; padding: .55em .8em .6em; box-shadow: 0 .18em 0 var(--ink); }
.lb .lb-mc b { font-size: 1.05em; line-height: 1.25; }
.lb .lb-mc small { font-size: .78em; font-weight: 700; color: var(--muted); line-height: 1.45; }
.lb .lb-mc.on { background: var(--hl); outline: .2em solid var(--gold); outline-offset: .1em; }
.lb .lb-mc.feat { padding: .8em 1em 2.4em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 9 Q12.5 2 25 9 T50 9 T75 9 T100 9 T125 9 T150 9 T175 9 T200 9 V20 H0Z' fill='%2357c0f2'/%3E%3Cpath d='M0 14 Q12.5 8 25 14 T50 14 T75 14 T100 14 T125 14 T150 14 T175 14 T200 14 V20 H0Z' fill='%232f9fdc'/%3E%3C/svg%3E") bottom / 100% 1.9em no-repeat, linear-gradient(#b4e6ff, #f2fbff 75%); }
.lb .lb-mc.feat b { font-size: 1.4em; }
.lb .lb-mc.feat small { color: var(--ink); opacity: .75; }
.lb .lb-others { align-self: stretch; text-align: left; margin-top: .3em; background: transparent; box-shadow: none; border-style: dashed; color: var(--muted); }
.lb .lb-others small { margin-left: .5em; font-weight: 700; }
.lb-ms-bar { display: flex; justify-content: space-between; align-items: center; gap: .6em; }   /* やめるは左下・決定は右下（2026-11-06） */
.lb .lb-ms-bar .main { background: var(--gold); font-size: 1.1em; padding: .3em 1.4em; }
.lb-key { font-size: .7em; font-weight: 900; color: #fff; background: var(--ink); border-radius: .35em; padding: .05em .45em .1em; margin-left: .3em; }
.lb-ms-row { display: grid; grid-template-columns: 6em minmax(0, 1fr); align-items: center; gap: .6em; }
.lb-ms-row h4 { margin: 0; }
.lb-ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: .45em; }
.lb .lb-ms-grid .lb-mc b { font-size: .9em; }
.lb-ms-detail { box-sizing: border-box; max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: .5em; padding: .8em .95em .9em; background: var(--card); border: .17em solid var(--ink); border-radius: 1.1em; }
.lb-ms-lines { display: flex; flex-direction: column; gap: .1em; font-size: .8em; font-weight: 700; color: var(--muted); line-height: 1.45; }
.lb-seg { display: flex; flex-wrap: wrap; gap: .35em; }
.lb .lb-seg button { padding: .2em .85em; font-size: .9em; box-shadow: 0 .12em 0 var(--ink); }
.lb .lb-seg button.on, .lb .lb-maps button.on { background: var(--gold); }
.lb-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: .4em; }
.lb .lb-maps button { display: flex; flex-direction: column; align-items: flex-start; gap: .05em; text-align: left; border-radius: .8em; padding: .35em .7em .4em; box-shadow: 0 .12em 0 var(--ink); }
.lb .lb-maps small { font-size: .72em; font-weight: 700; color: var(--muted); }
/* きせかえ */
.lb-name { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .6em; font-weight: 900; }
.lb-name input { flex: 1 1 10em; min-width: 0; font: inherit; font-weight: 800; padding: .25em .55em; border: .15em solid var(--ink); border-radius: .6em; background: var(--card); color: var(--ink); }
.lb-name small { flex-basis: 100%; font-size: .75em; font-weight: 700; color: var(--muted); }
.lb-name small:empty { display: none; }
.lb-chars { display: flex; flex-wrap: wrap; gap: .4em; }
.lb .lb-ch { display: flex; flex-direction: column; align-items: center; gap: .05em; width: 5.6em; padding: .3em .2em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); }
.lb-ch svg.face { width: 2.4em; height: 2.55em; overflow: visible; }
.lb-ch b { font-size: .75em; }
.lb-ch small { font-size: .62em; color: var(--muted); font-weight: 700; }
.lb .lb-ch.on { background: var(--hl); outline: .18em solid var(--gold); }
.lb .lb-ch.taken { opacity: .35; }
/* きせかえのアバター（ぷにまる／動物。src/avatars.js） */
.lb-avatars { display: flex; flex-wrap: wrap; gap: .4em; }
.lb .lb-av { display: flex; flex-direction: column; align-items: center; gap: .05em; width: 5em; padding: .3em .2em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); }
.lb-av svg.face { width: 2.4em; height: 2.55em; overflow: visible; }
.lb-av b { font-size: .7em; white-space: nowrap; }
.lb .lb-av.on { background: var(--hl); outline: .18em solid var(--gold); }
/* きせかえ（src/avatars.js）：左に自分の 3D（プレビュー。lobbyStage.js が data-dprev の枠に立たせる）・右にタブとえらぶ物 */
.lb-layer.lb-dlayer { display: grid; grid-template-columns: minmax(0, 1fr) min(34em, 58%); align-items: center; gap: 1em; padding: 0 2% 0 0; background: linear-gradient(90deg, rgba(20, 16, 40, 0) 0 30%, rgba(20, 16, 40, .5) 62%); }
.lb-dressing > :not(.lb-layer) { visibility: hidden; }
.lb-dprev { height: 100%; display: grid; place-items: center; cursor: grab; touch-action: none; }
.lb-dprev:active { cursor: grabbing; }
.lb-dprev .lb-stand { width: 30vh; height: 46vh; }
.lb-dlayer .lb-sheet.lb-dress { width: 100%; max-height: 90%; gap: .6em; }
/* タブ（本当のタブの形：えらんでいるタブは下の板とつながる。2026-10-21 ユーザー：設定の物が全部カプセル形でまぎらわしい）。
   板は上の角も丸く、タブは板の角より内がわにならべる（前は上の角がとがっていた） */
.lb-dtabs { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: .25em; padding: 0 .9em; margin-bottom: -.17em; }
.lb .lb-dtabs button { flex: 1 1 auto; white-space: nowrap; padding: .4em .45em .3em; margin-bottom: .17em; border-bottom: 0; border-radius: .75em .75em 0 0; box-shadow: none; font-weight: 900; color: var(--muted);
  background: color-mix(in srgb, var(--paper) 88%, var(--ink) 12%); }
.lb .lb-dtabs button:active:not([disabled]) { transform: none; box-shadow: none; }
.lb .lb-dtabs button.on { color: var(--ink); background: var(--card); margin-bottom: 0; padding-bottom: calc(.3em + .17em); }
.lb-dpanel { display: flex; flex-direction: column; gap: .7em; margin-top: -.6em; padding: .9em .9em 1em; background: var(--card); border: .17em solid var(--ink); border-radius: 1em; }
.lb-dbody { display: flex; flex-direction: column; gap: .7em; }
.lb-dbody:empty { display: none; }
.lb-dh { margin: 0 0 -.3em; font-size: .78em; font-weight: 900; color: var(--muted); }
/* 柄の絵のボタン（前とうしろの絵。lobbyStage.js の thumbOf） */
.lb-coats { display: flex; flex-wrap: wrap; gap: .4em; }
.lb .lb-coat { display: flex; flex-direction: column; align-items: center; gap: .05em; width: 6.2em; padding: .25em .2em .3em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); }
.lb-coat img { width: 5.4em; height: 3.6em; object-fit: contain; }
.lb-coat img:not([src]) { visibility: hidden; }
.lb-coat b { font-size: .66em; white-space: nowrap; }
/* まゆの形（目とまゆの絵のボタン） */
.lb-brows { display: flex; flex-wrap: wrap; gap: .35em; }
.lb .lb-brow { display: flex; flex-direction: column; align-items: center; gap: 0; width: 3.6em; padding: .25em .15em .2em; border-radius: .7em; box-shadow: 0 .12em 0 var(--ink); }
.lb-brow svg { width: 2.6em; height: 1.6em; }
.lb-brow b { font-size: .62em; white-space: nowrap; }
.lb .lb-brow.on { background: var(--hl); outline: .18em solid var(--gold); }
.lb .lb-coat.on { background: var(--hl); outline: .18em solid var(--gold); }
.lb-dslots { display: flex; flex-wrap: wrap; gap: .35em; }
.lb .lb-dslots button { display: flex; align-items: center; gap: .35em; padding: .25em .9em .25em .35em; border-radius: 99px; box-shadow: 0 .12em 0 var(--ink); font-weight: 900; }
.lb .lb-dslots button.on { background: var(--hl); outline: .18em solid var(--gold); }
.lb-dslots i { width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--c); border: .12em solid var(--ink); }
.lb-dslots i.no { background: linear-gradient(135deg, transparent 44%, var(--ink) 44% 56%, transparent 56%), var(--card); }   /* 鼻・まゆなし */
.lb-sws { display: flex; flex-wrap: wrap; gap: .3em; }
.lb .lb-sw { width: 1.75em; height: 1.75em; padding: 0; border-radius: 50%; background: var(--c, var(--card)); box-shadow: 0 .12em 0 var(--ink); }
.lb .lb-sw.auto { width: auto; padding: 0 .7em; border-radius: 99px; }
.lb .lb-sw.auto b { font-size: .72em; }
.lb .lb-sw.on { outline: .2em solid var(--gold); outline-offset: .08em; }
.lb-hats { display: flex; flex-wrap: wrap; gap: .4em; }
.lb .lb-hat { display: flex; flex-direction: column; align-items: center; gap: .05em; width: 4.6em; padding: .3em .2em; border-radius: .8em; box-shadow: 0 .12em 0 var(--ink); }
.lb-hat svg.face { width: 2.1em; height: 2.25em; overflow: visible; }
.lb-hat b { font-size: .66em; white-space: nowrap; }
.lb .lb-hat.on { background: var(--hl); outline: .18em solid var(--gold); }
/* せってい */
.lb-srow { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: .8em; align-items: center; padding: .55em 0; border-bottom: .1em dashed rgba(0, 0, 0, .12); }
.lb-sk { font-weight: 900; line-height: 1.25; }
.lb-sk small { font-size: .75em; color: var(--muted); }
.lb-sv { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .7em; }
.lb-sv small { flex: 1 1 14em; font-size: .78em; font-weight: 700; color: var(--muted); line-height: 1.45; }
.lb-sv small b { color: #e0436b; }
.lb-sv input[type="range"] { width: 12em; accent-color: #ff8fb8; }
.lb-sv input[type="checkbox"] { transform: scale(1.35); accent-color: #ff8fb8; cursor: pointer; }
.lb-sv > b { min-width: 6em; }
label.lb-srow { cursor: pointer; }
/* おと：全体（＋ミュート）・効果音・BGM を1つの表に（名前・つまみ・％・ボタンの列をそろえる） */
.lb-vols { display: grid; grid-template-columns: auto minmax(6em, 12em) max-content auto; gap: .45em .7em; align-items: center; justify-items: start; flex: 1 1 100%; }
.lb-vols span, .lb-vols b { font-weight: 800; white-space: nowrap; }
.lb-vols input[type="range"] { width: 100%; }
.lb .lb-vols button { padding: .2em .85em; font-size: .9em; box-shadow: 0 .12em 0 var(--ink); }
.lb .lb-vols button.on { background: var(--gold); }
.lb-vols.muted input, .lb-vols.muted b { opacity: .35; }
/* キーコンフィグ（keymap.js）：はたらきの名前とキーを2組ずつならべる */
.lb-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr) auto); gap: .3em .6em; align-items: center; flex: 1 1 100%; }
.lb-kc { display: flex; align-items: center; gap: .3em; }
.lb-kc button { width: 4.6em; }
.lb-kc i { font-style: normal; font-size: .75em; font-weight: 800; padding: .15em .45em; border-radius: .45em; border: .12em dashed rgba(58, 45, 79, .3); color: rgba(58, 45, 79, .45); white-space: nowrap; }
.lb-kc i:empty { display: none; }
.lb-keys span { font-size: .85em; font-weight: 800; line-height: 1.2; }
.lb .lb-keys button { padding: .15em .3em; font-size: .85em; min-width: 0; box-shadow: 0 .12em 0 var(--ink); }
.lb .lb-keys button.wait { background: var(--gold); }
@media (max-width: 760px) { .lb-keys { grid-template-columns: minmax(0, 1fr) auto; } }
/* エモートのセット（2026-11-06）：キーごとに4つの枠・枠をえらぶと下に一覧 */
.lb-srow:has(.lb-emo) { grid-template-columns: minmax(0, 1fr); gap: .4em; }
.lb-emo { display: flex; flex-direction: column; gap: .35em; flex: 1 1 100%; }
.lb-emo-r { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); align-items: center; gap: .35em; }
.lb-emo kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; font: 900 .8em/1 sans-serif; color: var(--ink); background: #fff; border: .13em solid var(--ink); border-radius: .4em; box-shadow: 0 .1em 0 var(--ink); }
.lb .lb-emo .say { display: inline-flex; align-items: center; gap: .25em; min-width: 0; font-size: .82em; font-weight: 900; color: var(--ink); background: #fff; border: .13em solid #0c94cb; border-radius: 1em; padding: .16em .6em .2em .35em; box-shadow: 0 .1em 0 #0c94cb; white-space: nowrap; }
.lb .lb-emo .say.quiet { padding: .16em .3em .2em; }
.lb .lb-emo .say.on { background: var(--hl); outline: .16em solid var(--gold); }
.lb-emo .say-ico { display: inline-flex; width: 1.3em; height: 1.3em; flex: none; }
.lb-emo .say-ico svg { width: 100%; height: 100%; }
.lb-emo-pool { display: flex; flex-wrap: wrap; gap: .35em; padding: .55em; background: rgba(12, 148, 203, .08); border: .12em dashed rgba(12, 148, 203, .45); border-radius: .8em; }
.lb-emo-pool[hidden] { display: none; }
.lb-emo-r .say { justify-content: flex-start; overflow: hidden; }
.lb .lb-emo [data-emoreset] { align-self: flex-start; padding: .2em .85em; font-size: .85em; box-shadow: 0 .12em 0 var(--ink); }
@media (max-width: 760px) {
  .lb-cols { grid-template-columns: minmax(0, 1fr); }
  .lb-sheet.lb-msel { overflow: auto; }
  .lb-ms { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .lb-ms-list, .lb-ms-detail { max-height: none; overflow: visible; }
  .lb-srow { grid-template-columns: minmax(0, 1fr); gap: .3em; }
  /* きせかえ：せまい画面は 上にプレビュー（小さく）・下にえらぶ物 */
  .lb-layer.lb-dlayer { grid-template-columns: minmax(0, 1fr); grid-template-rows: 30vh minmax(0, 1fr); padding: 0 3%; background: rgba(20, 16, 40, .35); }
  .lb-dprev .lb-stand { width: 18vh; height: 27vh; }
  .lb-dlayer .lb-sheet.lb-dress { max-height: 100%; align-self: start; }
}

/* ホストと切れたときのゲストの画面（netLost.js） */
.netlost { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(30, 20, 50, .45); font-size: 17px; }
.netlost[hidden] { display: none; }
.netlost .nl-card { display: flex; flex-direction: column; align-items: center; gap: .45em; max-width: min(88vw, 26em); padding: 1.1em 1.6em 1em; background: var(--card); color: var(--ink); border: .22em solid var(--ink); border-radius: 1.2em; box-shadow: 0 .3em 0 var(--ink); text-align: center; }
.netlost .nl-card b { font-size: 1.2em; font-weight: 900; }
.netlost .nl-card small { font-weight: 700; color: var(--muted); }
.netlost .nl-sec { font-size: .85em; font-weight: 800; color: var(--muted); }
.netlost .nl-spin { width: 2.2em; height: 2.2em; border: .32em solid #f1e6d4; border-top-color: var(--ink); border-radius: 50%; animation: nlspin .9s linear infinite; }
.netlost .nl-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; }
.netlost [hidden] { display: none; }
.netlost button { font: inherit; font-weight: 900; cursor: pointer; margin-top: .3em; background: var(--gold); color: var(--ink); border: .15em solid var(--ink); border-radius: 999px; padding: .25em 1.1em; box-shadow: 0 .15em 0 var(--ink); }
@keyframes nlspin { to { transform: rotate(360deg); } }
/* だれかと遊ぶ（2026-11-05）：自動でスタートするまでの秒（部屋のカードの右上） */
.lb-room { position: relative; }
.lb-room .lb-qcount { position: absolute; right: .6em; top: .35em; font-size: 1.3em; font-weight: 900; color: var(--ink); }
.lb .lb-quick { width: 100%; }
