/* Bút Thần — giao diện tím mực + giấy trắng, ưu tiên điện thoại. Màu đổi ở :root. */
:root {
  --bg: #211f38; --panel: #2c2949; --panel2: #24223f; --line: #3d3966; --ink: #1f1d2b;
  --text: #fff; --text2: #d3cfee; --muted: #9a95c4;
  --coral: #ff6b5b; --coral-dk: #c9483b; --sun: #ffd23f; --mint: #3ccf91; --sky: #4cc3ff; --red: #e5383b; --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg) radial-gradient(rgba(255,255,255,.055) 1px, transparent 1.2px) 0 0 / 22px 22px; color: var(--text); font: 15px/1.45 "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.top { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 10px; background: rgba(28,26,48,.92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: .2px; }
.logo i { width: 32px; height: 32px; background: url(/favicon.svg) center/contain no-repeat; }
.sp { flex: 1; }
.ib { border: 0; background: none; min-width: 44px; height: 44px; font-size: 20px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--text2); }
.ib:hover { background: rgba(255,255,255,.07); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius); padding: 8px 16px; font-weight: 800; background: #3a3762; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); min-height: 44px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #47437a; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--coral); box-shadow: inset 0 -4px 0 var(--coral-dk); }
.btn.primary:hover { background: #ff7f70; }
.btn.danger { background: var(--red); box-shadow: inset 0 -4px 0 #9e2124; }
.btn.big { width: 100%; font-size: 19px; min-height: 54px; }
.btn.sm { min-height: 44px; padding: 4px 12px; font-size: 14px; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--text2); }
.btn.ghost2 { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn .ic { width: 18px; height: 18px; }
.inp { width: 100%; background: #1a1830; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 16px; min-height: 44px; outline: none; }
.inp:focus { border-color: var(--sun); }
.inp:disabled { opacity: .55; }
.inp.code { text-transform: uppercase; letter-spacing: 4px; font-weight: 800; text-align: center; }
.lbl { font-size: 12px; color: var(--muted); font-weight: 800; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.note { color: var(--muted); font-size: 13px; }
.row2 { display: flex; gap: 6px; }
.card { background: var(--panel); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.cbody { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

/* trang chủ */
.home { max-width: 460px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.hero h1 { margin: 0 0 2px; font-size: 38px; line-height: 1.1; }
.hero p { margin: 0; color: var(--text2); }
.hero-art { display: flex; gap: 6px; margin-bottom: 12px; }
.hero-art i { width: 46px; height: 10px; border-radius: 5px; background: var(--coral); }
.hero-art i:nth-child(2) { background: var(--sun); width: 30px; }
.hero-art i:nth-child(3) { background: var(--sky); width: 18px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.recent { display: flex; flex-direction: column; gap: 6px; }
.recent a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--panel2); border-radius: var(--radius); text-decoration: none; min-height: 44px; }
.recent small { color: var(--muted); }
.howto ol { margin: 0; padding-left: 20px; color: var(--text2); display: flex; flex-direction: column; gap: 4px; }
.howto .btn { align-self: flex-start; }

/* phòng */
.room { max-width: 1260px; margin: 0 auto; padding: 10px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 48px; }
.hud-main { flex: 1 1 480px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.hud-main.lobby-h { flex-wrap: wrap; }
.round { font-weight: 800; color: var(--text2); font-size: 14px; white-space: nowrap; }
.tape { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tape > :first-child { background: var(--sun); color: var(--ink); padding: 3px 14px; border-radius: 4px; transform: rotate(-1.2deg); box-shadow: 0 3px 0 rgba(0,0,0,.2); font-weight: 800; }
.tape-txt { font-size: 15px; }
.word-known { font-size: 20px; text-transform: uppercase; letter-spacing: 1px; }
.mask { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.mw { display: inline-flex; gap: 3px; }
.mw i { width: 17px; height: 26px; border-bottom: 3px solid var(--ink); font-style: normal; font-weight: 800; font-size: 18px; text-align: center; text-transform: uppercase; line-height: 26px; }
.tape.flash > :first-child { animation: popit .5s ease; }
@keyframes popit { 40% { transform: scale(1.15) rotate(-1.2deg); } }
.tier { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 1px 7px; border-radius: 6px; border: 2px solid currentColor; white-space: nowrap; }
.tier.t1 { color: #3ccf91; } .tier.t2 { color: #6fa0ff; } .tier.t3 { color: #ff7a6e; }
.timer { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.crayon { width: 130px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.12); overflow: hidden; position: relative; }
.fillbar { position: absolute; inset: 0 auto 0 0; width: calc(var(--left, 1) * 100%); background: linear-gradient(90deg, #ff9152, var(--sun)); border-radius: 7px; transition: width .25s linear; }
.timer.low .fillbar { background: var(--coral); }
.timer.low b { color: var(--coral); }
.timer b { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 8px 0 2px; scrollbar-width: thin; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px 4px 4px; position: relative; flex: none; }
.chip .av { width: 30px; height: 30px; font-size: 14px; }
.cn b { font-size: 13px; display: block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.cn small { font-size: 11px; color: var(--muted); display: block; line-height: 1.2; }
.chip.me .cn b { color: var(--sun); }
.chip.drawer { border-color: var(--sun); }
.chip.got { background: #1d4a3f; border-color: var(--mint); }
.chip.off { opacity: .5; }
.badge { width: 22px; height: 22px; border-radius: 7px; background: var(--sun); color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.badge .ic { width: 15px; height: 15px; }
.badge.ok { background: var(--mint); }
.plus { position: absolute; top: -9px; right: -4px; background: var(--mint); color: #08281c; font-style: normal; font-weight: 800; font-size: 12px; border-radius: 8px; padding: 0 6px; }

.mid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.play { width: min(100%, calc((100svh - 250px) * 4 / 3)); min-width: min(100%, 300px); display: flex; flex-direction: column; gap: 8px; }

/* giấy vẽ */
.paperwrap { position: relative; padding-top: 8px; }
.paperwrap::before, .paperwrap::after { content: ''; position: absolute; top: 0; width: 78px; height: 22px; background: rgba(255,107,91,.8); z-index: 3; border-radius: 2px; }
.paperwrap::before { left: 18px; transform: rotate(-5deg); }
.paperwrap::after { right: 18px; transform: rotate(4deg); background: rgba(76,195,255,.75); }
.board { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 0 rgba(0,0,0,.18), 0 12px 30px rgba(0,0,0,.35); touch-action: none; user-select: none; -webkit-user-select: none; }
.board canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board.drawing .pre { cursor: crosshair; }
.board.dim .paper { opacity: .3; }
.board.hidepic .paper { filter: blur(22px); }
.ovl { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; background: rgba(33,31,56,.32); z-index: 2; color: var(--ink); }
.ov-card { background: #fffdf6; border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 100%; max-height: 100%; overflow: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ov-card.wait { flex-direction: row; font-size: 17px; }
.ov-t { font-weight: 800; font-size: 17px; }
.picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pick { border: 2px solid var(--ink); background: #fff; border-radius: 10px; padding: 8px 14px; min-height: 64px; min-width: 110px; display: flex; flex-direction: column; align-items: center; color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.pick:nth-child(1) { transform: rotate(-2deg); } .pick:nth-child(3) { transform: rotate(2deg); }
.pick:hover { background: #fff6d2; }
.pick b { font-size: 19px; line-height: 1.2; }
.pick small { font-weight: 800; font-size: 13px; border-top: 2px solid var(--coral); width: 100%; margin-top: 4px; padding-top: 2px; }
.pick.t1 small { color: #1f8a4c; } .pick.t2 small { color: #2a5bd7; } .pick.t3 small { color: #c8302d; }
.reveal .tier.t1 { color: #1f8a4c; } .reveal .tier.t2 { color: #2a5bd7; } .reveal .tier.t3 { color: #c8302d; }
.rv-why { font-size: 13px; color: #6b6790; font-weight: 700; }
.rv-l { font-size: 13px; color: #6b6790; }
.rv-word { font-size: 30px; font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.rv-rows { display: flex; flex-direction: column; gap: 2px; min-width: 200px; margin-top: 4px; }
.rv-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.rv-row span { flex: 1; text-align: left; }
.rv-row b { color: #1f8a4c; }
.rv-row .ic { width: 16px; height: 16px; }

/* dụng cụ vẽ */
.under { width: 100%; position: relative; }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; position: relative; }
.tools.off { opacity: .45; pointer-events: none; }
.tgrp { display: flex; gap: 4px; align-items: center; }
.tb { width: 44px; height: 44px; border: 0; border-radius: 10px; background: #3a3762; color: #fff; display: grid; place-items: center; padding: 0; }
.tb:hover { background: #47437a; }
.tb.on { background: var(--sun); color: var(--ink); }
.tb.danger:hover { background: #7a2a33; }
.tb.cur i { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #fff; }
.sw { width: 40px; height: 44px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.sw i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); }
.sw.on i { outline: 3px solid var(--sun); outline-offset: 1px; }
.szdot { width: var(--s); height: var(--s); border-radius: 50%; background: currentColor; }
.pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fffdf6; color: var(--ink); border-radius: 14px; padding: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.45); z-index: 20; display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.pop.row { flex-direction: row; min-width: 0; }
.pop .tb { background: #ece8fa; color: var(--ink); }
.pop .tb.on { background: var(--sun); }
.pop .note { color: #6b6790; }
.pgrid { display: grid; grid-template-columns: repeat(8, 40px); gap: 2px; }
.sw.big { width: 40px; height: 44px; }
.sw.big i { width: 30px; height: 30px; border-color: rgba(0,0,0,.15); }
.sw.big.on i { outline-color: var(--coral); }
.more { display: flex; align-items: center; gap: 10px; font-weight: 800; min-height: 44px; }
.more input { width: 48px; height: 36px; border: 1px solid #ccc; border-radius: 8px; padding: 2px; background: #fff; }
.pi { display: flex; align-items: center; gap: 10px; border: 0; background: #ece8fa; border-radius: 10px; min-height: 44px; padding: 6px 12px; color: var(--ink); font-weight: 700; }
.pi.on { background: var(--sun); }

/* ô đoán */
.guessf { display: flex; gap: 6px; width: 100%; }
.guessf .inp { background: #fffdf6; color: var(--ink); border-color: #fffdf6; }
.guessf .inp::placeholder { color: #8a86a8; }
.guessf.got .inp { background: #dff8ec; border-color: var(--mint); }
.closetip { color: var(--sun); font-weight: 800; text-align: center; padding-top: 4px; }
.closetip:empty { display: none; }
.spect { text-align: center; color: var(--text2); background: var(--panel); border-radius: 12px; padding: 10px; }

/* thanh dưới */
.bar { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; }
.bl, .br { flex: 1; min-width: 0; }
.br { display: flex; justify-content: flex-end; align-items: center; }
.bm { flex: none; }
.btn.flag { background: #2b2847; box-shadow: inset 0 0 0 1px var(--line); }
.btn.flag.on { background: #7a2a33; box-shadow: none; }
.btn.leave { background: #8a2f3a; box-shadow: inset 0 -4px 0 #5e1f28; }
.watch { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-right: 4px; font-weight: 700; }
.watch .ic { width: 18px; height: 18px; }

/* diễn biến + trò chuyện */
.feed { background: #1a1830; border: 2px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; height: min(640px, calc(100svh - 150px)); position: sticky; top: 62px; }
.feedhead { padding: 8px 12px 4px; font-weight: 800; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.feedlog { flex: 1; overflow-y: auto; padding: 0 12px 8px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; overflow-wrap: anywhere; }
.chatf { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.fi .ic { width: 14px; height: 14px; vertical-align: -2px; }
.fi.ok { color: var(--mint); font-weight: 700; }
.fi.close { color: var(--sun); font-weight: 700; }
.fi.sys { color: var(--muted); font-size: 13px; }
.fi.word { background: rgba(255,210,63,.12); border-radius: 8px; padding: 3px 8px; color: #ffe9a6; margin: 2px 0; }
.fi.word small { color: var(--muted); }
.fi.priv { color: #c9c3f0; font-style: italic; }
.lock { font-style: normal; margin-right: 4px; font-size: 12px; }

/* phòng chờ */
.lobbywrap { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 12px; }
.lobby, .result { background: var(--panel); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.lhead { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cnt { font-weight: 800; }
.slots { display: grid; grid-template-columns: 1fr 1fr; }
.slot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 48px; border-bottom: 1px solid var(--line); min-width: 0; }
.slot:nth-child(odd) { border-right: 1px solid var(--line); }
.slot.empty { color: #5f5a8a; }
.slot.me .sn { color: var(--sun); }
.slot.off { opacity: .6; }
.slot .ph { width: 30px; height: 30px; border: 2px dashed #4a4677; border-radius: 8px; flex: none; }
.slot .av { width: 30px; height: 30px; font-size: 14px; }
.sn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.sn small { color: var(--muted); font-weight: 500; }
.wins { font-size: 12px; color: var(--text2); }
.mk { flex: none; }
.mk.host { color: var(--sun); display: grid; }
.mk.ready { color: var(--mint); font-weight: 900; font-size: 18px; }
.mk.wait { font-size: 11px; color: var(--muted); }
.lrules { padding: 4px 12px; color: var(--text2); font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; border-bottom: 1px solid var(--line); min-height: 44px; }
.lnk { border: 0; background: none; color: var(--sun); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; }
.lnk .ic { width: 18px; height: 18px; }
.lfoot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.lfoot .lbl { margin: 0; }
.codebtn { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 0 12px; min-height: 44px; font-weight: 800; letter-spacing: 2px; }
.codebtn .ic { width: 16px; height: 16px; color: var(--muted); }
.joinrow { display: flex; gap: 6px; flex: 1 1 100%; }
.joinrow .btn { flex: none; }
.rhead { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 800; font-size: 17px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rank { padding: 6px 12px 10px; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.rrow .pos { width: 26px; text-align: center; font-weight: 800; }
.rrow .av { width: 30px; height: 30px; }
.rrow.win b { color: var(--sun); }
.result .note { padding: 0 12px 10px; }

.av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; position: relative; flex: none; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.av .dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #6a6690; border: 2px solid var(--panel); }
.av .dot.on { background: var(--mint); }

/* hộp thoại */
.modal { position: fixed; inset: 0; background: rgba(10,8,24,.65); display: grid; place-items: center; z-index: 100; padding: 16px; }
.mbox { width: min(420px, 100%); background: var(--panel); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); max-height: calc(100svh - 32px); display: flex; flex-direction: column; }
.mbox.wide { width: min(760px, 100%); }
.mhead { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 4px 16px; font-weight: 800; background: var(--panel2); flex: none; }
.mhead button { border: 0; background: none; width: 44px; height: 44px; font-size: 18px; }
.mbody { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.mbody p { margin: 0; }
.rulesbox p { margin: 0 0 8px; color: var(--text2); }
.rulesbox b { color: #fff; }
.setrow { display: flex; flex-direction: column; gap: 4px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { min-width: 54px; min-height: 44px; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; font-weight: 800; padding: 0 12px; }
.seg button.on { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gi { border: 0; padding: 0; background: #fffdf6; border-radius: 10px; overflow: hidden; color: var(--ink); text-align: left; display: flex; flex-direction: column; }
.gi img, .gph { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; background: #f1eefb; object-fit: cover; }
.gph { background: #f6dede; font-weight: 700; }
.gw { display: flex; flex-direction: column; padding: 6px 8px; line-height: 1.25; }
.gw small { color: #6b6790; }
.bigpic { width: 100%; border-radius: 10px; background: #fff; display: block; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f0d1f; padding: 10px 16px; border-radius: 10px; z-index: 200; font-weight: 700; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.45); pointer-events: none; border: 1px solid var(--line); }
.banner { position: fixed; top: 0; left: 0; right: 0; background: #b5762a; text-align: center; padding: 6px; font-size: 14px; z-index: 150; font-weight: 700; }
.center-msg { padding: 60px 20px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.conf { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 300; }
.conf i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 900px) {
  .mid { grid-template-columns: minmax(0, 1fr); }
  .feed { position: static; height: 300px; }
  .play { width: 100%; max-width: calc((100svh - 230px) * 4 / 3); min-width: min(100%, 320px); }
}
@media (max-width: 560px) {
  .room { padding: 8px 8px 16px; gap: 8px; }
  .hud-main { gap: 8px; flex-basis: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .hud-main.lobby-h { display: flex; }
  .crayon { width: 54px; }
  .round { font-size: 12px; }
  .word-known { font-size: 17px; }
  .mw i { width: 14px; font-size: 16px; }
  .tools { gap: 4px; padding: 4px; }
  .tgrp { gap: 2px; }
  .sw { width: 40px; }
  .pgrid { grid-template-columns: repeat(6, 44px); }
  .sw.big { width: 44px; }
  .pick { min-width: 0; padding: 6px 10px; }
  .pick b { font-size: 16px; }
  .slot { padding: 6px 8px; gap: 6px; }
  .mk.wait { display: none; }
  .bl { display: none; }
  .bm { flex: 1; }
  .bm .btn { width: 100%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .top { height: 44px; position: static; }
  body.playing .top { display: none; }
  .room { padding-top: 6px; gap: 6px; }
  .mid { grid-template-columns: minmax(0, 1fr) 250px; }
  .play { width: min(100%, calc((100svh - 130px) * 4 / 3)); max-width: none; min-width: 0; gap: 6px; }
  .play.drawer { width: auto; flex-direction: row; align-items: flex-start; }
  .play.drawer .paperwrap { width: min(calc(100vw - 400px), calc((100svh - 70px) * 4 / 3)); }
  .play.drawer .under { width: 96px; flex: none; }
  .play.drawer .tools { flex-direction: column; align-items: center; }
  .play.drawer .tgrp { flex-wrap: wrap; justify-content: center; width: 90px; }
  .play.drawer .pop { bottom: auto; top: 0; left: auto; right: calc(100% + 8px); transform: none; }
  .feed { position: sticky; top: 6px; height: calc(100svh - 12px); }
  .hud { min-height: 0; }
  .chips { padding-top: 0; }
  .paperwrap { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .conf { display: none; } .fillbar { transition: none; } }
