/* ─────────────────────────────────────────────
 * 해체하라! 폭탄! (2026-11-13 누구나 모드) — 소재: 해체 작업대 위의 강철 폭탄 케이스와 경고 테이프
 * 작업대 강판 #1a1e25(바탕) · 케이스 패널 #252b34 · 경고 테이프 노랑 #f2c230(강조) · 신관 빨강 #e0453e(실수·막바지) · 해제 초록 #4cc38a · 글자 #e8eaee
 * 시그니처(하나): 경고 테이프 띠를 두른 빨간 LED 타이머 창(.df-timer) — 모두에게 같은 남은 시간.
 * 배치·단추·자리·탭은 공용 public/css/boardgame/room.css 클래스 — 여기선 토큰·타이머·폭탄 위젯·설명서·방 채팅 배치만.
 * ───────────────────────────────────────────── */
.df-root, .chat-fab, .chat-panel {
    --df-plate: #1a1e25;
    --df-case: #252b34;
    --df-case-2: #2f3640;
    --df-tape: #f2c230;
    --df-fuse: #e0453e;
    --df-ok: #4cc38a;
    --df-ink: #e8eaee;
    --df-led: #ff5a4a;
    --bg-bg: var(--df-plate);
    --bg-panel: var(--df-case);
    --bg-line: color-mix(in srgb, var(--df-ink) 13%, var(--df-case));
    --bg-ink: var(--df-ink);
    --bg-dim: color-mix(in srgb, var(--df-ink) 60%, var(--df-plate));
    --bg-accent: var(--df-tape);
    --bg-accent-ink: #231c05;
    --bg-warn: var(--df-fuse);
    --chat-accent: var(--df-tape);
    --chat-accent-ink: #231c05;
}
.df-root .df-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", monospace; font-variant-numeric: tabular-nums; }
.df-root .df-free { font-size: 0.78rem; color: var(--bg-dim); }

/* ── 시그니처: 타이머 창 ── */
.df-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px clamp(12px, 2vw, 28px); width: 100%; }
.df-timer {
    position: relative; padding: clamp(6px, 0.8vw, 10px) clamp(14px, 1.6vw, 22px); border-radius: 10px; background: #0b0d10;
    border: clamp(4px, 0.5vw, 6px) solid transparent;
    background-image: linear-gradient(#0b0d10, #0b0d10), repeating-linear-gradient(-45deg, var(--df-tape) 0 10px, #15171b 10px 20px);
    background-origin: border-box; background-clip: padding-box, border-box;
}
.df-timer b {
    display: block; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 800;
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 1; letter-spacing: 0.06em; color: var(--df-led);
    text-shadow: 0 0 12px color-mix(in srgb, var(--df-led) 60%, transparent);
}
.df-timer.low b { animation: df-blink 1s steps(1) infinite; }
.df-timer.idle b { color: #5a4643; text-shadow: none; }
@keyframes df-blink { 50% { opacity: 0.35; } }
.df-stat { display: grid; gap: 4px; font-size: 0.78rem; color: var(--bg-dim); }
.df-stat strong { color: var(--bg-ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.df-strikes { display: flex; gap: 6px; }
.df-strikes i { width: 16px; height: 16px; border-radius: 50%; background: var(--df-case-2); border: 1px solid var(--bg-line); }
.df-strikes i.on { background: var(--df-fuse); border-color: var(--df-fuse); box-shadow: 0 0 8px color-mix(in srgb, var(--df-fuse) 70%, transparent); }
.df-role { margin-left: auto; font-size: 0.86rem; color: var(--bg-ink); border: 1px solid var(--bg-line); border-radius: 999px; padding: 5px 12px; background: var(--bg-soft); }
.df-role.me-defuser { border-color: var(--df-tape); color: var(--df-tape); font-weight: 800; }

/* ── 방 배치: 판 + 옆(방 채팅을 맨 위에 크게) ── */
.df-room { display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 27vw, 440px); gap: 14px; align-items: start; margin-top: 12px; }
.df-stage { min-width: 0; display: grid; gap: 12px; }
.df-side { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar-h, 0px) + 10px); }
.df-chat { border-color: color-mix(in srgb, var(--df-tape) 45%, var(--bg-line)); }
.df-chat .bg-h { display: flex; align-items: baseline; gap: 6px; }
.df-chat-list { height: clamp(180px, 38vh, 520px); overflow-y: auto; display: grid; align-content: start; gap: 5px; font-size: 0.9rem; margin-bottom: 8px; padding-right: 4px; }
.df-chat-list p { margin: 0; color: var(--bg-ink); overflow-wrap: anywhere; line-height: 1.45; }
.df-chat-list p b { color: var(--bg-dim); font-weight: 700; margin-right: 6px; }
.df-chat-list p.df-from-defuser b { color: var(--df-tape); }
.df-chat-list p.df-from-defuser b::before { content: "💣 "; }
.df-chat-list p.mine { background: color-mix(in srgb, var(--df-tape) 7%, transparent); border-radius: 6px; padding: 0 4px; }
#df-roomview[data-status="waiting"] .df-chat-list { height: clamp(100px, 16vh, 220px); }
.df-chat-row { display: flex; gap: 6px; }
.df-chat-row .input { flex: 1; min-width: 0; font-size: 0.95rem; padding: 9px 10px; }
.df-board { background: var(--bg-panel); border: 1px solid var(--bg-line); border-radius: 14px; padding: clamp(12px, 1.2vw, 18px); min-width: 0; }
.df-board h2 { margin: 0 0 8px; font-size: 1rem; color: var(--bg-ink); }
.df-lead { color: var(--bg-ink); font-size: 0.92rem; line-height: 1.7; margin: 0 0 10px; }
.df-lead b { color: var(--df-tape); }
.df-last { font-size: 0.86rem; color: var(--bg-ink); background: var(--bg-soft); border-radius: 8px; padding: 7px 12px; margin: 8px 0 0; }
.df-last.bad { box-shadow: inset 3px 0 0 var(--df-fuse); }
.df-last.good { box-shadow: inset 3px 0 0 var(--df-ok); }

/* 자리 역할 표시 */
.df-sicon { font-size: 1.15rem; width: 1.6em; text-align: center; }
.bg-seat.df-defuser { border-color: var(--df-tape); }

/* 모듈 칩(설명서 쪽 '이번 판 모듈') */
.df-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 6px; }
.df-chip { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--bg-soft); color: var(--bg-ink); border: 1px solid var(--bg-line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 0.86rem; cursor: pointer; }
.df-chip:hover { border-color: var(--df-tape); }
.df-chip.done { border-color: var(--df-ok); color: var(--df-ok); }
.df-chip.sel { border-color: var(--df-tape); box-shadow: inset 3px 0 0 var(--df-tape); }

/* 결과 */
.df-result { text-align: center; padding: clamp(16px, 3vw, 40px) 10px; }
.df-result .big { font-family: "hb-games-display", var(--font-sans); font-size: clamp(2.2rem, 1.6rem + 3vw, 4.4rem); line-height: 1.1; color: var(--df-fuse); }
.df-result .big.ok { color: var(--df-ok); }
.df-result p { color: var(--bg-ink); margin: 10px 0 0; }

/* ── 폭탄(해체 담당 화면) ── */
.df-bombtop { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.8rem; }
.df-bombtop .k { display: block; color: var(--bg-dim); font-size: 0.72rem; }
.df-bombtop .v { color: var(--bg-ink); font-weight: 800; font-size: 1rem; letter-spacing: 0.06em; }
.df-ind { display: flex; gap: 5px; flex-wrap: wrap; }
.df-ind span { border: 1px solid var(--bg-line-2); border-radius: 6px; padding: 2px 8px; color: var(--bg-dim); }
.df-ind span.on { background: color-mix(in srgb, var(--df-tape) 18%, transparent); border-color: var(--df-tape); color: var(--df-tape); }
.df-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.df-mod { background: var(--bg-soft); border: 2px solid var(--bg-line); border-radius: 14px; padding: 12px 14px; position: relative; min-width: 0; }
.df-mod.done { border-color: var(--df-ok); }
.df-mod.done::after { content: "해제 완료"; position: absolute; inset: 0; background: color-mix(in srgb, #0c1c15 88%, transparent); color: var(--df-ok); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.df-mod h3 { font-size: 0.95rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--bg-ink); }
.df-mod h3 small { color: var(--bg-dim); font-weight: 400; font-size: 0.74rem; }
.df-lv { font-size: 0.66rem; border-radius: 5px; padding: 2px 6px; font-weight: 700; }
.df-lv1 { background: rgba(76, 195, 138, 0.16); color: #7fd9ab; }
.df-lv2 { background: rgba(242, 194, 48, 0.16); color: #f2c230; }
.df-lv3 { background: rgba(224, 69, 62, 0.16); color: #ff8a8a; }
.df-msg { position: sticky; bottom: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; background: var(--bg-panel); border: 1px solid var(--bg-line); color: var(--bg-ink); }
.df-msg.ok { border-color: var(--df-ok); color: var(--df-ok); }
.df-msg.bad { border-color: var(--df-fuse); color: #ff9a92; }

/* 위젯 — 누르는 것은 모두 <button> */
.df-w + .df-w { margin-top: 10px; }
.df-root .df-mod button { font: inherit; color: inherit; }
.df-wires { display: flex; flex-direction: column; gap: 6px; }
.df-wire { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 3px 0; cursor: pointer; width: 100%; }
.df-wire .no { width: 18px; color: var(--bg-dim); font-size: 0.75rem; }
.df-wire .line { flex: 1; height: 12px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.35); }
.df-wire .nm { font-size: 0.75rem; color: var(--bg-dim); min-width: 58px; text-align: right; }
.df-wire.cut .line { opacity: 0.25; background-image: linear-gradient(90deg, transparent 46%, var(--df-plate) 46%, var(--df-plate) 54%, transparent 54%) !important; }
.df-wire:hover .line, .df-wire:focus-visible .line { outline: 2px solid var(--df-ink); }
.df-bigbtn { width: clamp(120px, 34vw, 150px); aspect-ratio: 1; border-radius: 50%; margin: 6px auto; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 800; cursor: pointer; border: 5px solid rgba(0, 0, 0, 0.35); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); touch-action: none; user-select: none; -webkit-user-select: none; }
.df-bigbtn:active { transform: translateY(3px); }
.df-holdbar { height: 8px; background: var(--df-case-2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.df-holdbar i { display: block; height: 100%; width: 0; background: var(--df-tape); }
.df-hint { font-size: 0.72rem; color: var(--bg-dim); text-align: center; margin-top: 6px; }
.df-keys { display: grid; gap: 8px; }
.df-key { background: var(--df-case-2); border: 2px solid var(--bg-line-2); border-radius: 10px; padding: 12px 4px; font-size: 1.35rem; text-align: center; cursor: pointer; line-height: 1.25; }
.df-key.big { font-size: 2rem; padding: 14px 0; }
.df-key.small { font-size: 0.88rem; padding: 10px 4px; font-weight: 700; }
.df-key:hover { border-color: var(--df-ink); }
.df-key.done { border-color: var(--df-ok); color: var(--df-ok); }
.df-key .sub { display: block; font-size: 0.7rem; color: var(--bg-dim); margin-top: 3px; font-weight: 400; }
.df-screen { background: #0b0d10; border: 2px solid var(--bg-line-2); border-radius: 10px; text-align: center; padding: 10px 8px; }
.df-screen .tx { font-size: 1.35rem; font-weight: 800; color: var(--df-tape); word-break: break-all; }
.df-screen.big .tx { font-size: 2.4rem; letter-spacing: 1px; }
.df-screen .sb { font-size: 0.7rem; color: var(--bg-dim); margin-top: 4px; }
.df-lamp { width: 74px; height: 74px; border-radius: 50%; background: var(--df-case-2); border: 3px solid var(--bg-line-2); margin: 4px auto 10px; }
.df-lamp.on { background: var(--df-tape); box-shadow: 0 0 26px color-mix(in srgb, var(--df-tape) 80%, transparent); }
.df-dials { display: grid; gap: 8px; }
.df-dial { text-align: center; }
.df-dial .ch { background: #0b0d10; border: 2px solid var(--bg-line-2); border-radius: 8px; font-size: 1.7rem; font-weight: 800; padding: 8px 0; margin: 4px 0; color: var(--bg-ink); }
.df-dial button { width: 100%; background: var(--df-case-2); border: 1px solid var(--bg-line-2); border-radius: 6px; cursor: pointer; font-size: 0.8rem; padding: 4px 0; }
.df-submit { width: 100%; margin-top: 8px; }
.df-tgl { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--df-case-2); border: 2px solid var(--bg-line-2); border-radius: 10px; padding: 8px 10px; cursor: pointer; margin-bottom: 6px; }
.df-tgl.on { border-color: var(--df-fuse); background: color-mix(in srgb, var(--df-fuse) 12%, var(--df-case-2)); }
.df-tgl .sw { display: flex; gap: 3px; }
.df-tgl .sw i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.4); display: block; }
.df-tgl .tx { font-size: 0.8rem; font-weight: 700; }
.df-tgl .sb { font-size: 0.7rem; color: var(--bg-dim); }
.df-tgl .mark { margin-left: auto; font-size: 0.75rem; font-weight: 800; color: var(--bg-dim); }
.df-tgl.on .mark { color: #ff8a8a; }
.df-switches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.df-swbox { background: var(--df-case-2); border: 2px solid var(--bg-line-2); border-radius: 10px; padding: 8px 0; text-align: center; cursor: pointer; }
.df-swbox .bar { width: 22px; height: 44px; border-radius: 11px; background: var(--df-plate); border: 1px solid var(--bg-line-2); margin: 0 auto 6px; position: relative; }
.df-swbox .bar b { position: absolute; left: 2px; right: 2px; height: 18px; border-radius: 9px; background: #6d737c; top: 22px; transition: top 0.12s; }
.df-swbox.on .bar b { top: 2px; background: var(--df-ok); }
.df-swbox span { font-size: 0.7rem; color: var(--bg-dim); }
.df-lights { display: grid; gap: 6px; justify-content: center; }
.df-lights i { width: 22px; height: 22px; border-radius: 50%; background: var(--df-case-2); border: 2px solid var(--bg-line-2); display: block; }
.df-lights i.on { background: var(--df-tape); border-color: var(--df-tape); box-shadow: 0 0 10px color-mix(in srgb, var(--df-tape) 60%, transparent); }
.df-lights i.blink { animation: df-blink 0.7s steps(1) infinite; }
.df-wtitle { font-size: 0.7rem; color: var(--bg-dim); text-align: center; margin-bottom: 5px; }
.df-padout { background: #0b0d10; border: 2px solid var(--bg-line-2); border-radius: 8px; text-align: center; font-size: 1.8rem; font-weight: 800; letter-spacing: 6px; padding: 6px 0; margin-bottom: 8px; color: var(--df-tape); min-height: 2.4rem; }
.df-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.df-pad button { background: var(--df-case-2); border: 1px solid var(--bg-line-2); border-radius: 8px; font-size: 1.1rem; font-weight: 700; padding: 10px 0; cursor: pointer; }
.df-root .df-pad button.bg-btn { background: var(--df-tape); color: var(--bg-accent-ink); }
.df-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.df-info div { background: var(--df-case-2); border-radius: 8px; padding: 6px 10px; font-size: 0.75rem; display: flex; justify-content: space-between; gap: 6px; color: var(--bg-ink); }
.df-info .k { color: var(--bg-dim); }
.df-simon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 240px; margin: 0 auto; }
.df-pad4 { height: 74px; border-radius: 12px; cursor: pointer; opacity: 0.35; transition: opacity 0.08s, transform 0.08s; border: 2px solid rgba(0, 0, 0, 0.35); }
.df-pad4.flash { opacity: 1; transform: scale(1.04); box-shadow: 0 0 24px rgba(255, 255, 255, 0.35); }
.df-pad4:hover, .df-pad4:focus-visible { opacity: 0.7; }
.df-steps { display: flex; gap: 5px; justify-content: center; align-items: center; margin-top: 8px; }
.df-steps i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-line-2); }
.df-steps i.on { background: var(--df-ok); }
.df-steps span { font-size: 0.7rem; color: var(--bg-dim); margin-left: 6px; }
.df-piano { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.df-piano button { background: #e8ebef; color: #14161c !important; border: 1px solid var(--bg-line-2); border-radius: 0 0 6px 6px; height: 78px; font-size: 0.88rem; font-weight: 800; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.df-piano button:active { background: #b9bec6; }
.df-bands { background: #d8b98a; border-radius: 10px; padding: 14px 10px; display: flex; gap: 10px; justify-content: center; }
.df-bands i { width: 16px; height: 54px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.35); display: block; }
.df-bandnames { display: flex; gap: 10px; justify-content: center; font-size: 0.7rem; color: var(--bg-dim); margin-top: 5px; }
.df-maze { display: grid; margin: 0 auto; width: max-content; max-width: 100%; background: #0b0d10; padding: 6px; border-radius: 8px; }
.df-mcell { width: clamp(26px, 7vw, 34px); height: clamp(26px, 7vw, 34px); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; box-sizing: border-box; border: 1px dashed var(--df-case-2); }
.df-dotcells { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.df-dotcell { display: grid; grid-template-columns: repeat(2, 14px); gap: 5px; background: #0b0d10; border: 2px solid var(--bg-line-2); border-radius: 8px; padding: 8px; }
.df-dotcell i { width: 14px; height: 14px; border-radius: 50%; background: var(--df-case-2); display: block; }
.df-dotcell i.on { background: var(--df-tape); }
.df-cwrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--bg-line); flex-wrap: wrap; }
.df-cwrow .no { width: 16px; font-size: 0.7rem; color: var(--bg-dim); }
.df-cwrow .tx { flex: 1; font-size: 1.1rem; font-weight: 800; }
.df-cwrow button { background: var(--df-case-2); border: 1px solid var(--bg-line-2); border-radius: 6px; font-size: 0.75rem; padding: 4px 10px; cursor: pointer; }

/* ── 설명서 ── */
.df-mini { position: sticky; top: calc(var(--topbar-h, 0px) + 6px); z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--df-case-2); border: 1px solid var(--bg-line-2); border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; font-size: 0.82rem; color: var(--bg-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.df-mini .t { font-weight: 800; color: var(--df-led); font-family: ui-monospace, Consolas, monospace; }
.df-search { width: 100%; margin-bottom: 10px; }
/* 그림 (2026-11-14) — 크기는 width/height 속성, 여기서는 줄 맞춤만 */
.df-art { display: inline-block; vertical-align: middle; object-fit: contain; flex: none; }
.df-key .df-art { display: block; margin: 0 auto; }
.df-key.big .df-art { width: 48px; height: 48px; }
.df-art-row { display: inline-flex; align-items: center; gap: 2px; }
.df-bombtop .df-art-row { vertical-align: middle; }
.df-bat { margin-right: -6px; }
.df-bat:last-of-type { margin-right: 4px; }
.df-resart { display: block; margin: 0 auto 6px; width: clamp(96px, 22vw, 128px); height: auto; aspect-ratio: 1; }
.df-mhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.df-mhead .df-search { margin-bottom: 0; }
.df-cover { width: clamp(56px, 14vw, 96px); height: auto; aspect-ratio: 1; }
.df-manual .pairs span, .df-manual .chips span { display: inline-flex; align-items: center; gap: 5px; }
.df-navgroup { margin-bottom: 8px; }
.df-navgroup .gh { font-size: 0.72rem; color: var(--bg-dim); margin-bottom: 4px; }
.df-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.df-nav button { font: inherit; font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--bg-line-2); background: transparent; color: var(--bg-ink); cursor: pointer; }
.df-nav button.sel { background: var(--df-tape); border-color: var(--df-tape); color: var(--bg-accent-ink); font-weight: 700; }
.df-nav button.on-bomb { border-color: color-mix(in srgb, var(--df-tape) 60%, var(--bg-line-2)); }
.df-manual { margin-top: 12px; color: var(--bg-ink); }
.df-manual .sec-head { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.df-manual .desc { font-size: 0.84rem; color: var(--bg-dim); line-height: 1.65; margin-bottom: 10px; }
.df-manual .blk { margin-bottom: 12px; }
.df-manual .blk-h { font-size: 0.86rem; font-weight: 700; margin: 12px 0 6px; }
.df-manual .rulelist { font-size: 0.88rem; line-height: 1.85; padding: 0; margin: 0; }
.df-manual .rulelist li { padding: 6px 0 6px 4px; border-bottom: 1px dashed var(--bg-line); list-style: none; }
.df-manual .rulelist li:last-child { border-bottom: 0; }
.df-manual .rulelist li b, .df-manual .hint b { color: var(--df-tape); }
.df-manual .rulelist .step { display: inline-block; min-width: 22px; color: var(--bg-dim); font-size: 0.78rem; }
.df-manual .hint { font-size: 0.82rem; color: var(--bg-dim); background: var(--bg-soft); border-left: 3px solid var(--bg-line-2); border-radius: 6px; padding: 8px 12px; margin: 10px 0; line-height: 1.7; }
.df-manual .tabbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.df-manual .tabbar button { font: inherit; font-size: 0.78rem; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--bg-line-2); background: transparent; color: var(--bg-ink); cursor: pointer; }
.df-manual .tabbar button.sel { background: var(--df-case-2); font-weight: 700; border-color: var(--df-tape); }
.df-manual .tbl-wrap { overflow-x: auto; }
.df-manual .dtable { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.df-manual .dtable th { text-align: left; color: var(--bg-dim); font-weight: 600; font-size: 0.76rem; padding: 6px 8px; border-bottom: 1px solid var(--bg-line-2); }
.df-manual .dtable td { padding: 6px 8px; border-bottom: 1px solid var(--bg-line); line-height: 1.6; }
.df-manual .dtable td:first-child { font-weight: 700; white-space: nowrap; }
.df-manual .pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.df-manual .pairs div { background: var(--bg-soft); border-radius: 6px; padding: 6px 10px; font-size: 0.84rem; display: flex; justify-content: space-between; gap: 8px; }
.df-manual .pairs b { color: var(--df-tape); letter-spacing: 1px; }
.df-manual .keytable { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.df-manual .keycol { background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 8px; padding: 8px 4px; text-align: center; }
.df-manual .keycol .h { font-size: 0.72rem; color: var(--bg-dim); margin-bottom: 4px; }
.df-manual .keycol .s { font-size: 1.25rem; line-height: 1.7; }
.df-manual .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.df-manual .chips span { background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 6px; padding: 4px 10px; font-size: 0.84rem; }
.df-manual .swatch { display: flex; flex-wrap: wrap; gap: 8px; }
.df-manual .swatch span { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; background: var(--bg-soft); border-radius: 6px; padding: 4px 10px; }
.df-manual .swatch i { width: 14px; height: 14px; border-radius: 3px; display: block; border: 1px solid rgba(0, 0, 0, 0.3); }
.df-manual .ledrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.df-manual .ledrow { background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 8px; padding: 8px 10px; text-align: center; }
.df-manual .ledrow .dots { display: grid; justify-content: center; gap: 4px; margin-bottom: 6px; }
.df-manual .ledrow .dots i { width: 13px; height: 13px; border-radius: 50%; background: var(--df-case-2); border: 1px solid var(--bg-line-2); display: block; }
.df-manual .ledrow .dots i.on { background: var(--df-tape); border-color: var(--df-tape); }
.df-manual .ledrow .lb { font-size: 0.8rem; font-weight: 700; color: var(--df-tape); }
.df-manual .mazes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.df-manual .mazebox { background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 8px; padding: 10px; text-align: center; }
.df-manual .mazebox .h { font-size: 0.76rem; color: var(--bg-dim); margin-bottom: 6px; }
.df-manual .mzgrid { display: grid; width: max-content; margin: 0 auto; }
.df-manual .mzc { width: 26px; height: 26px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.df-manual .mzc b { width: 9px; height: 9px; border-radius: 50%; background: var(--df-ok); display: block; }
.df-manual .dotlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.df-manual .dotbox { background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 8px; padding: 8px; text-align: center; }
.df-manual .dotbox .cell { display: grid; grid-template-columns: repeat(2, 12px); gap: 4px; justify-content: center; margin-bottom: 5px; }
.df-manual .dotbox .cell i { width: 12px; height: 12px; border-radius: 50%; background: var(--df-case-2); border: 1px solid var(--bg-line-2); display: block; }
.df-manual .dotbox .cell i.on { background: var(--df-tape); border-color: var(--df-tape); }
.df-manual .dotbox .lb { font-size: 0.9rem; font-weight: 800; }

/* ── 설정 칸(방 만들기·방 설정) ── */
.df-pick { display: grid; gap: 8px; grid-column: 1 / -1; }
.df-pick .gh { font-size: 0.74rem; color: var(--bg-dim); display: flex; gap: 8px; align-items: center; }
.df-pick .modpick { display: flex; flex-wrap: wrap; gap: 5px; }
.df-pick .modpick button { font: inherit; font-size: 0.78rem; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--bg-line-2); background: var(--bg-soft); color: var(--bg-ink); cursor: pointer; }
.df-pick .modpick button[aria-pressed="true"] { border-color: var(--df-tape); color: var(--df-tape); font-weight: 700; }
.df-pick .modpick button:disabled { opacity: 0.6; cursor: default; }
.df-who { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── 내 기록 ── */
.df-rec { display: grid; grid-template-columns: 92px auto 1fr auto; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--bg-line); font-size: 0.86rem; color: var(--bg-ink); }
.df-rec:last-child { border-bottom: 0; }
.df-rec .when { color: var(--bg-dim); font-variant-numeric: tabular-nums; }
.df-rec .who { color: var(--bg-dim); overflow-wrap: anywhere; }
.df-rec .ok { color: var(--df-ok); font-weight: 700; text-align: right; }
.df-rec .no { color: #ff8a8a; font-weight: 700; text-align: right; }

@media (max-width: 1024px) {
    .df-root .bg-lobby .bg-rooms-panel { order: 0; } /* 한 줄일 때 열린 방을 맨 위로(방 만들기 칸은 길어서 그 아래) */
    .df-room { grid-template-columns: 1fr; }
    .df-side { position: static; display: contents; }
    /* 한 줄일 때: 머리(타이머) → 방 채팅(판 위에 바로) → 판 → 자리 → 설정 */
    .df-room > .df-stage { order: 2; }
    .df-side > .df-chat { order: 1; }
    .df-side > * { order: 3; }
    .df-chat-list { height: clamp(120px, 24vh, 260px); }
    .df-chat { position: sticky; top: calc(var(--topbar-h, 0px) + 4px); z-index: 4; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
}
@media (max-width: 640px) {
    .df-role { margin-left: 0; }
    .df-rec { grid-template-columns: 1fr auto; }
    .df-rec .who, .df-rec .role { grid-column: 1 / -1; }
    .df-manual .keytable { grid-template-columns: repeat(4, 1fr); }
    .df-chat-list { height: clamp(96px, 18vh, 200px); font-size: 0.86rem; }
}
@media (min-width: 2400px) {
    .df-root { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .df-timer.low b, .df-lights i.blink { animation: none; }
    .df-pad4, .df-swbox .bar b { transition: none; }
}
