:root {
  --ink: #ece7dd;
  --dim: #8f8a80;
  --faint: rgba(236, 231, 221, .14);
  --brass: #d7a546;
  --blood: #c2352b;
  --ok: #6fb38a;
  --glass: rgba(9, 9, 11, .58);
  --glass-strong: rgba(9, 9, 11, .82);
  --font: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: #050506; color: var(--ink); font: 15px/1.4 var(--font); font-stretch: 90%; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
b { font-weight: 600; }

button, input, select { font: inherit; font-stretch: inherit; color: var(--ink); min-width: 0; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .35; cursor: default; }
input, select {
  background: rgba(255, 255, 255, .05); border: 1px solid var(--faint); border-radius: 2px; padding: 6px 9px;
}
select { padding: 6px 4px; }
select option { background: #111; }
input:focus, select:focus, button:focus-visible { outline: 1px solid var(--brass); outline-offset: 1px; }

/* ---------- сцена ---------- */
#table { position: fixed; inset: 0; z-index: 0; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#vignette, #gore { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#vignette { background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 42%, rgba(0,0,0,.62) 100%); }
#table.wounded #vignette { background: radial-gradient(ellipse at 50% 46%, rgba(60,0,0,0) 34%, rgba(96,0,0,.6) 100%); animation: pulse-red 1.6s infinite; }
@keyframes pulse-red { 50% { opacity: .62; } }
#gore { opacity: 0; }
#table:not(.three) #vignette, #table:not(.three) #gore { display: none; }
#felt { position: absolute; left: 12%; right: 12%; top: 16%; bottom: 18%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #1f4332, #0d1f17 75%); border: 12px solid #3b2616; }
#felt { display: none; }
#table.flat #felt { display: block; } /* плоский стол — только если 3D не запустилось */

/* заставка на время загрузки */
#boot { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #040405; transition: opacity .6s; }
#boot div { display: flex; flex-direction: column; align-items: center; gap: 22px; }
#boot b { font-size: clamp(28px, 4vw, 54px); font-weight: 700; font-stretch: 78%; letter-spacing: .12em; text-transform: uppercase; }
#boot b span { color: var(--brass); }
#boot i { width: 140px; height: 1px; background: var(--faint); position: relative; overflow: hidden; }
#boot i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--brass); animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
body:not(.booting) #boot { opacity: 0; pointer-events: none; }
body.booting .screen { visibility: hidden; }
body.in-menu #seats, body.in-menu #center, body.in-menu #banner { display: none; }

/* зерно плёнки поверх всего */
#grain { position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 20% { transform: translate(-4%,3%); } 40% { transform: translate(3%,-5%); } 60% { transform: translate(-2%,-3%); } 80% { transform: translate(5%,2%); } 100% { transform: translate(0,0); } }

/* ---------- меню ---------- */
.screen { position: fixed; inset: 0; z-index: 5; }
.menu { display: flex; align-items: center; padding: 0 clamp(24px, 8vw, 140px);
  background: linear-gradient(90deg, rgba(4,4,5,.94) 0%, rgba(4,4,5,.78) 34%, rgba(4,4,5,.12) 70%, rgba(4,4,5,0) 100%); }
.menu-col { width: min(460px, 100%); display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--brass); }
.menu h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: .92; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; font-stretch: 78%; text-shadow: 0 6px 40px rgba(0,0,0,.8); }
.menu h1 span { display: block; color: var(--brass); }
.menu h1.code-title { font-size: clamp(38px, 5.4vw, 76px); }
.menu h1.code-title span { display: inline; letter-spacing: .12em; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-top: 10px; }
.field input { background: none; border: 0; border-bottom: 1px solid var(--faint); border-radius: 0; padding: 6px 0; font-size: 22px; letter-spacing: .04em; text-transform: none; }
.field input:focus { outline: none; border-bottom-color: var(--brass); }

.menu-list { display: flex; flex-direction: column; margin-top: 6px; }
#lobby-host { display: flex; flex-direction: column; }
.item { position: relative; display: flex; align-items: baseline; gap: 14px; text-align: left; padding: 13px 0 13px 22px; border-top: 1px solid var(--faint); transition: padding .18s, background .18s; }
.item::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--brass); transform: translateY(-50%); transition: height .18s; }
.item b { font-size: 21px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.item i { font-style: normal; font-size: 13px; color: var(--dim); }
button.item:hover:not(:disabled), .item.join:focus-within { padding-left: 32px; background: linear-gradient(90deg, rgba(215,165,70,.14), rgba(215,165,70,0) 75%); }
button.item:hover:not(:disabled)::before, .item.join:focus-within::before { height: 62%; }
button.item:hover:not(:disabled) b { color: var(--brass); }
.item.primary b { color: var(--brass); }
.item.join { justify-content: space-between; align-items: center; }
.item.join span { display: flex; gap: 8px; }
#code { width: 96px; text-align: center; text-transform: uppercase; letter-spacing: .35em; font-size: 18px; }
#btn-join, #btn-copy { padding: 6px 16px; border: 1px solid var(--faint); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
#btn-join:hover, #btn-copy:hover { border-color: var(--brass); color: var(--brass); }
.invite { display: flex; gap: 8px; }
.invite input { flex: 1; color: var(--dim); }
#lobby-players { list-style: none; margin: 0; padding: 0; counter-reset: seat; }
#lobby-players li { counter-increment: seat; display: flex; align-items: baseline; gap: 14px; padding: 8px 0; border-top: 1px solid var(--faint); font-size: 18px; letter-spacing: .04em; }
#lobby-players li::before { content: "0" counter(seat); font-size: 12px; color: var(--brass); letter-spacing: .1em; }
#lobby-players li span:first-of-type { flex: 1; }
#lobby-players li.free { color: rgba(236,231,221,.28); }
.tag { color: var(--dim); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.hint { color: var(--dim); font-size: 12px; margin: 6px 0 0; }
.build { position: absolute; right: 24px; bottom: 18px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(236,231,221,.32); }

/* ---------- игровой экран ---------- */
.hud { pointer-events: none; }
.hud > * { pointer-events: auto; }

#topbar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 22px 40px;
  background: linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; }
#topbar > * { pointer-events: auto; }
.tb-left { display: flex; align-items: center; gap: 22px; }
.tb-tag { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.tb-tag b { color: var(--ink); font-size: 15px; letter-spacing: .14em; margin-left: 6px; }
#g-bullets { display: flex; align-items: flex-end; gap: 5px; height: 24px; }
.round { width: 8px; height: 22px; border-radius: 4px 4px 1px 1px; background: linear-gradient(90deg, #7a5a1e, #f0c868 45%, #8a6622); box-shadow: 0 0 10px rgba(240,200,104,.35); }
.round::after { content: ""; display: block; height: 7px; border-radius: 4px 4px 0 0; background: linear-gradient(90deg, #5a5a60, #b9b9c0 45%, #5e5e64); }
.round.spent { background: #2a2622; box-shadow: none; opacity: .6; }
.round.spent::after { background: #2a2622; }
.tb-right { display: flex; gap: 4px; }
.tb-right button { padding: 6px 12px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.tb-right button:hover { color: var(--brass); }

/* таблички над игроками */
#seats { position: absolute; inset: 0; pointer-events: none; }
.seat { position: absolute; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; pointer-events: auto;
  padding: 4px 10px 5px; text-shadow: 0 1px 3px #000, 0 0 14px #000; transition: opacity .4s; }
.seat .nm { font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.seat .meta { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 2px; font-size: 13px; }
.seat .lv { display: inline-flex; gap: 4px; }
.seat .lv u { width: 9px; height: 9px; background: var(--blood); transform: rotate(45deg); box-shadow: 0 0 8px rgba(194,53,43,.8); }
.seat .lv u.gone { background: none; border: 1px solid rgba(236,231,221,.3); box-shadow: none; }
.seat .cn { color: var(--brass); letter-spacing: .06em; }
.seat .st { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); min-height: 14px; margin-top: 1px; }
.seat::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 2px; background: var(--brass); transform: translateX(-50%); transition: width .25s; box-shadow: 0 0 12px var(--brass); }
.seat.turn::after { width: 100%; }
.seat.turn .st { color: var(--brass); }
.seat.aimed::after { width: 100%; background: var(--blood); box-shadow: 0 0 14px var(--blood); }
.seat.aimed .nm { color: #ff8a7d; }
.seat.dead { opacity: .5; }
.seat.dead .nm { text-decoration: line-through; text-decoration-color: var(--blood); }
.seat.pick { cursor: crosshair; outline: 1px dashed var(--blood); outline-offset: 2px; background: rgba(120,10,6,.28); }
.seat.pick:hover { background: rgba(160,14,8,.5); }
.seat.hit { animation: hit .7s; }
@keyframes hit { 0% { background: rgba(194,53,43,.9); } 100% { background: rgba(194,53,43,0); } }
.seat.me { left: 50% !important; top: auto !important; bottom: 118px; transform: translateX(-50%); }
body.spectating .seat.me { bottom: 168px; }
#table:not(.three) .seat { transform: translate(-50%, -50%); }

/* барабан и банк */
#center { position: absolute; left: 22px; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#bank { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
#bank b { display: block; text-align: center; font-size: 26px; letter-spacing: .04em; color: var(--brass); line-height: 1; margin-top: 2px; }
#drum { position: relative; width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #5c5d62 0%, #2b2c30 45%, #131316 100%);
  box-shadow: 0 10px 34px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -8px 16px rgba(0,0,0,.6); }
#drum::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #8a8b91, #1a1a1d); }
.ch { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #050506 55%, #1d1d20 100%); box-shadow: inset 0 3px 6px #000, 0 1px 0 rgba(255,255,255,.12);
  color: rgba(236,231,221,.45); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.ch.next { color: var(--brass); box-shadow: inset 0 3px 6px #000, 0 0 0 2px var(--brass), 0 0 18px rgba(215,165,70,.7); animation: next 1.3s infinite; }
@keyframes next { 50% { box-shadow: inset 0 3px 6px #000, 0 0 0 2px var(--brass), 0 0 4px rgba(215,165,70,.3); } }
.ch.empty { color: rgba(236,231,221,.16); background: #101012; }
.ch.bullet { background: radial-gradient(circle at 45% 38%, #f0705f, #7a1610); color: #fff; box-shadow: 0 0 14px rgba(194,53,43,.7); }
.ch.k-empty::after, .ch.k-bullet::after, .ch.n-empty::after, .ch.n-bullet::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; }
.ch.k-empty::after { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.ch.k-bullet::after { background: var(--blood); box-shadow: 0 0 8px var(--blood); }
.ch.n-empty::after { border: 2px dashed var(--ok); }
.ch.n-bullet::after { border: 2px dashed var(--blood); }

/* надпись о происходящем — как титр */
#banner { position: absolute; left: 50%; top: 15%; transform: translateX(-50%); max-width: 80%; text-align: center; pointer-events: none;
  font-size: clamp(18px, 2.3vw, 30px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 2px 6px #000, 0 0 30px #000; animation: banner .35s ease-out; }
#banner.bullet { color: #ff6a58; letter-spacing: .26em; }
#banner.empty { color: #cfe6d6; }
@keyframes banner { from { opacity: 0; letter-spacing: .5em; } }

/* действия */
#bottom { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: calc(100% - 700px); min-width: 420px; pointer-events: none; }
#bottom > * { pointer-events: auto; }
#actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; min-height: 58px; }
#actions .wait, #actions .mine { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; text-shadow: 0 1px 4px #000; }
#actions .wait { color: var(--dim); }
#actions .mine { color: var(--brass); flex-basis: 100%; text-align: center; }
#actions button { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 22px 14px 16px; background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid var(--faint); border-radius: 2px; font-size: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: border-color .15s, background .15s, transform .08s; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
#actions button:hover:not(:disabled) { border-color: var(--brass); background: rgba(215,165,70,.16); }
#actions button:active:not(:disabled) { transform: translateY(1px); }
#actions button.danger { border-color: rgba(194,53,43,.7); background: rgba(120,16,10,.5); }
#actions button.danger:hover:not(:disabled) { border-color: #ff6a58; background: rgba(170,24,14,.62); }
#actions button.solid { background: var(--brass); color: #171108; border-color: var(--brass); }
#actions button small { font-size: 12px; font-weight: 400; letter-spacing: .06em; color: var(--brass); text-transform: none; }
kbd { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid rgba(236,231,221,.35); border-radius: 3px; font: inherit; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--dim); }
#timer { font-size: 13px; letter-spacing: .12em; color: var(--dim); min-width: 44px; text-align: left; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px #000; }
#timer.low { color: #ff6a58; }

#spectator { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--faint); border-radius: 2px; }
.spec-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.spec-row b { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); min-width: 190px; }
.spec-row > span { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--dim); }
#spectator button, .sell button, .offer button, #chat button { padding: 6px 12px; border: 1px solid var(--faint); border-radius: 2px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
#spectator button:hover:not(:disabled), .sell button:hover:not(:disabled), .offer button:hover:not(:disabled), #chat button:hover { border-color: var(--brass); color: var(--brass); }

/* правая панель: сведения, торг, журнал */
.right { position: absolute; right: 18px; top: 62px; bottom: 20px; width: 304px; display: flex; flex-direction: column; gap: 14px; min-height: 0;
  padding: 16px; background: linear-gradient(180deg, rgba(8,8,10,.74), rgba(8,8,10,.5)); backdrop-filter: blur(12px); border: 1px solid var(--faint); border-radius: 2px;
  transition: transform .3s, opacity .3s; }
body.panel-hidden .right { transform: translateX(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.right section { min-height: 0; }
.right section.grow { flex: 1; display: flex; flex-direction: column; }
.right h3 { font-size: 10px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.right h3::after { content: ""; flex: 1; height: 1px; background: var(--faint); }

#know { display: flex; flex-direction: column; gap: 6px; }
.fact { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; background: rgba(255,255,255,.04); border-left: 2px solid var(--faint); font-size: 13px; flex-wrap: wrap; }
.fact em { font-style: normal; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.fact b { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.fact.empty { border-left-color: var(--ok); }
.fact.empty b { color: var(--ok); }
.fact.bullet { border-left-color: var(--blood); }
.fact.bullet b { color: #ff7a6b; }
.fact.old { opacity: .35; }
.fact small { flex-basis: 100%; color: var(--dim); font-size: 11px; }

#offers { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
#offers .none { color: var(--dim); font-size: 12px; }
.offer { display: flex; align-items: center; gap: 8px; padding: 5px 0 5px 10px; border-left: 2px solid var(--brass); font-size: 13px; }
.offer span { flex: 1; }
.offer span i { font-style: normal; color: var(--brass); }
.sell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.sell input { width: 58px; }

#log { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; padding-right: 6px;
  mask-image: linear-gradient(180deg, transparent 0, #000 22px); scrollbar-width: thin; scrollbar-color: rgba(236,231,221,.2) transparent; }
#log div { color: rgba(236,231,221,.62); }
#log .bullet { color: #ff7a6b; }
#log .empty { color: #a9d6b8; }
#log .drum { color: var(--brass); margin-top: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
#log .win { color: var(--brass); font-weight: 600; }
#log .trade { color: #9db7d6; }
#log .pass { color: #c9b48a; }
#log .chat { color: var(--ink); }
#chat { display: flex; gap: 6px; margin-top: 10px; }
#chat input { flex: 1; }

/* окно правил, сообщения, вспышка */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.sheet { width: min(620px, 100%); padding: 30px 34px; background: var(--glass-strong); border: 1px solid var(--faint); border-top: 2px solid var(--brass); display: flex; flex-direction: column; gap: 18px; }
.sheet h2 { font-size: 28px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sheet ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; color: rgba(236,231,221,.82); }
.sheet li { padding-left: 16px; position: relative; }
.sheet li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--brass); }
.sheet li b { color: var(--ink); }
button.solid { align-self: flex-start; padding: 12px 26px; background: var(--brass); color: #171108; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
#toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 35; max-width: 90%; padding: 10px 20px; background: rgba(90,12,8,.9); border-left: 2px solid #ff6a58; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
#flash { position: fixed; inset: 0; z-index: 25; background: #b3140c; opacity: 0; pointer-events: none; }
#flash.on { animation: flash .5s; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }

/* планшет */
@media (max-width: 1180px) and (min-width: 761px) {
  #bottom { max-width: calc(100% - 40px); bottom: 20px; }
  .right { width: 280px; }
  #center { transform: scale(.82); transform-origin: left bottom; }
}

/* телефон */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1000px) {
  html, body { height: 100dvh; touch-action: manipulation; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
  body { font-size: 14px; }
  kbd { display: none; }

  .menu { align-items: flex-end; padding: 0 20px calc(26px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(4,4,5,.25) 0%, rgba(4,4,5,.8) 45%, rgba(4,4,5,.96) 100%); }
  .menu-col { width: 100%; gap: 12px; }
  .menu h1 { font-size: clamp(44px, 15vw, 72px); }
  .menu h1.code-title { font-size: clamp(34px, 11vw, 54px); }
  .eyebrow { font-size: 10px; letter-spacing: .2em; }
  .item { padding: 14px 0 14px 16px; }
  .item b { font-size: 18px; }
  .item i { display: none; }
  .invite { flex-direction: column; }
  #lobby-players li { font-size: 16px; padding: 6px 0; }
  .build { display: none; }

  #topbar { padding: calc(10px + env(safe-area-inset-top)) 12px 30px; }
  .tb-left { gap: 12px; }
  .tb-tag { font-size: 9px; letter-spacing: .16em; }
  .tb-tag b { font-size: 13px; margin-left: 4px; }
  .tb-right button { padding: 8px 8px; font-size: 10px; letter-spacing: .14em; }

  .seat .nm { font-size: 12px; letter-spacing: .1em; }
  .seat .meta { font-size: 11px; gap: 6px; }
  .seat .lv u { width: 7px; height: 7px; }
  .seat .st { font-size: 8px; letter-spacing: .16em; min-height: 11px; }
  .seat.me { bottom: calc(112px + env(safe-area-inset-bottom)); }
  body.spectating .seat.me { bottom: calc(196px + env(safe-area-inset-bottom)); }

  #banner { top: 11%; font-size: 15px; letter-spacing: .12em; max-width: 92%; }
  #banner.bullet { letter-spacing: .16em; }

  #center { left: 8px; bottom: calc(104px + env(safe-area-inset-bottom)); transform: scale(.62); transform-origin: left bottom; }
  body.spectating #center { bottom: calc(188px + env(safe-area-inset-bottom)); }

  #bottom { left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; width: auto; min-width: 0; max-width: none; padding: 0 8px; align-items: stretch; }
  #actions { gap: 6px; flex-wrap: wrap; min-height: 72px; }
  #actions .mine, #actions .wait { flex-basis: 100%; text-align: center; font-size: 10px; letter-spacing: .2em; }
  #actions button { flex: 1 1 0; justify-content: center; gap: 6px; padding: 17px 6px; font-size: 13px; letter-spacing: .08em; white-space: nowrap; }
  #timer { position: absolute; right: 12px; top: -2px; min-width: 0; font-size: 11px; }
  #spectator { padding: 8px 10px; gap: 6px; }
  .spec-row { gap: 6px; }
  .spec-row b { min-width: 0; flex-basis: 100%; font-size: 9px; }
  .spec-row select { max-width: 31%; }

  .right { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 62dvh; z-index: 12; border-width: 1px 0 0; border-top-color: var(--brass);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); background: rgba(8,8,10,.94); }
  body.panel-hidden .right { transform: translateY(105%); }
  body:not(.panel-hidden) .tb-right #btn-panel { color: var(--brass); }
  .sheet { padding: 22px 20px; max-height: 88dvh; overflow-y: auto; }
  .sheet h2 { font-size: 22px; }
}
