@font-face { font-family: 'Oswald'; src: url('../fonts/oswald-cyrillic.woff2') format('woff2'); font-weight: 200 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; src: url('../fonts/oswald-latin.woff2') format('woff2'); font-weight: 200 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #050505; --panel: rgba(16, 16, 17, 0.92); --panel2: rgba(30, 30, 32, 0.92); --line: rgba(236, 230, 218, 0.14);
  --text: #ece6da; --muted: #9a948a; --hazard: #f2c230; --danger: #e0352b; --ok: #45d062; --cool: #7fd4ff;
  --font: 'Oswald', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --bw: 0px; --bh: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
html, body { -webkit-touch-callout: none; margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; overscroll-behavior: none; }
img, canvas { -webkit-user-drag: none; user-select: none; }
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; display: flex; flex-direction: row; }
#stage { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.65) 100%); }
#vignette.hurt { animation: hurt 0.9s ease-out; }
@keyframes hurt { 0% { background-color: rgba(220, 20, 10, 0.55); } 100% { background-color: rgba(220, 20, 10, 0); } }
#vignette.flash { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { background-color: rgba(255,255,255,0.9); } 100% { background-color: rgba(255,255,255,0); } }

/* banner slot: right column in landscape, bottom row in portrait */
#banner-slot { display: none; position: relative; background: #0a0a0a; border-left: 1px solid #1c1c1c; overflow: hidden; }
body.banner-right #banner-slot { display: block; width: var(--bw); flex: 0 0 var(--bw); }
body.banner-bottom #app { flex-direction: column; }
body.banner-bottom #banner-slot { display: block; height: var(--bh); flex: 0 0 var(--bh); width: 100%; border-left: 0; border-top: 1px solid #1c1c1c; }
body.banner-right { --bw: 300px; }
body.banner-right.mobile { --bw: 160px; }
body.banner-bottom { --bh: 60px; }
body.banner-bottom-overlay #stage { padding-bottom: 0; }
body.banner-bottom-overlay .hud-bottom { bottom: 64px; }
.banner-fake { position: absolute; inset: 8px; border: 1px dashed #333; color: #444; display: flex; align-items: center; justify-content: center; font-size: 22px; letter-spacing: 4px; }
body:not(.fake-banner) .banner-fake { display: none; }

/* loading */
#loading { position: absolute; inset: 0; background: #050505; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; z-index: 50; transition: opacity .5s; }
#loading.gone { opacity: 0; pointer-events: none; }
.ld-logo { font-size: 96px; font-weight: 700; font-style: italic; color: var(--text); text-shadow: 0 0 30px rgba(224,53,43,.6); }
.ld-bar { width: min(260px, 60vw); height: 4px; background: #1d1d1d; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s; }

/* ---------------- HUD ---------------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: none; }
#hud.cinema .hud-bottom, #hud.cinema #opp-tag, #hud.cinema #feed { opacity: 0; transition: opacity .4s; }
#hud button, #hud .sheet { pointer-events: auto; }
.hud-top { position: absolute; top: calc(8px + var(--safe-t)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.chip { background: rgba(0,0,0,.55); border: 1px solid var(--line); padding: 4px 10px; font-size: 15px; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.info { color: var(--muted); }
.coin { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe58a, #d19a12 60%, #8a5c05); box-shadow: 0 0 0 2px rgba(0,0,0,.4); display: inline-block; flex: 0 0 auto; }
.icon-btn { width: 38px; height: 38px; background: rgba(0,0,0,.55); border: 1px solid var(--line); font-size: 18px; display: flex; align-items: center; justify-content: center; }
.icon-btn:active { transform: scale(.94); }

.opp-tag { position: absolute; transform: translate(-50%, -100%); text-align: center; text-shadow: 0 2px 6px #000; transition: opacity .2s; }
.ot-name { font-size: 14px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; display: flex; gap: 6px; justify-content: center; align-items: center; }
.bot-tag { font-size: 11px; color: #111; background: var(--muted); padding: 0 5px; }
.bot-tag:empty { display: none; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.conn.off { background: var(--danger); animation: blink 1s infinite; }
.ot-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.opp-tag .score { font-size: 30px; font-style: italic; font-weight: 500; background: rgba(0,0,0,.6); padding: 0 10px; }
.tr { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; color: var(--hazard); }
.tr-ico { width: 14px; height: 14px; border: 2px solid var(--hazard); transform: rotate(45deg); display: inline-block; }

#feed { position: absolute; top: calc(54px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(92%, 560px); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.feed-item { font-size: 16px; background: rgba(0,0,0,.6); padding: 3px 12px; text-shadow: 0 1px 2px #000; animation: feedIn .25s ease-out; transition: opacity .4s, transform .4s; text-align: center; }
.feed-item.star::before { content: '★ '; color: var(--hazard); }
.feed-item.warn { color: #ffb4a8; }
.feed-item.out { opacity: 0; transform: translateY(-6px); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } }

#card-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; z-index: 4; }
.cpop { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; background: rgba(10,10,12,.88); border: 2px solid var(--hazard); box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: popIn .35s cubic-bezier(.2,1.6,.4,1); transition: opacity .35s, transform .35s; }
.cpop img { width: 64px; height: 64px; }
.cpop small { display: block; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.cpop b { display: block; font-size: 26px; font-weight: 600; letter-spacing: .5px; }
.cpop.got { border-color: var(--hazard); } .cpop.got small { color: var(--hazard); }
.cpop.opp { border-color: #b07aff; } .cpop.opp small { color: #c9a6ff; }
.cpop.mine { border-color: #555; }
.cpop.out { opacity: 0; transform: scale(.9); }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } }
@media (max-height: 480px) { .cpop img { width: 44px; height: 44px; } .cpop b { font-size: 20px; } }
#say { position: absolute; left: 50%; bottom: calc(176px + var(--safe-b)); transform: translateX(-50%); font-size: 20px; color: #fff; text-shadow: 0 2px 6px #000; opacity: 0; transition: opacity .3s; white-space: nowrap; }
#say.on { opacity: 1; }

#big-msg { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: clamp(34px, 7vw, 72px); font-weight: 700; font-style: italic; letter-spacing: 2px; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; text-shadow: 0 4px 24px rgba(0,0,0,.9); }
#big-msg.on { opacity: 1; transform: scale(1); }
#big-msg small { display: block; font-size: .38em; font-style: normal; font-weight: 400; letter-spacing: 1px; color: var(--text); opacity: .9; }
#big-msg.rise { top: 60%; font-style: normal; }
#big-msg.win { color: var(--ok); } #big-msg.lose { color: var(--danger); } #big-msg.tie { color: var(--text); }

.hud-bottom { position: absolute; left: 0; right: 0; bottom: calc(10px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 10px; }
.score-row { width: 100%; max-width: 760px; display: flex; align-items: flex-end; justify-content: space-between; }
.my-score { font-size: clamp(46px, 9vw, 84px); font-style: italic; font-weight: 500; line-height: 1; background: linear-gradient(90deg, rgba(0,0,0,.7), rgba(0,0,0,0)); padding: 2px 30px 2px 14px; text-shadow: 0 2px 10px #000; transition: color .2s; }
.my-score.bust { color: var(--danger); } .my-score.exact { color: var(--ok); }
.side-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.swing { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.swing:empty { display: none; }
.sw { font-size: 13px; letter-spacing: 1px; padding: 2px 8px; background: rgba(0,0,0,.65); border: 1px solid; white-space: nowrap; }
.sw b { font-size: 15px; margin-left: 4px; }
.sw.win { color: #8ef0a2; border-color: rgba(69,208,98,.5); }
.sw.lose { color: #ff9a90; border-color: rgba(224,53,43,.55); }
.sw.lethal { background: rgba(120,10,5,.75); }
.turn-chip { font-size: 16px; letter-spacing: 2px; padding: 4px 12px; background: rgba(0,0,0,.6); border-left: 3px solid var(--muted); color: var(--muted); }
.turn-chip.mine { border-color: var(--hazard); color: var(--hazard); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes blink { 50% { opacity: .2; } }
.timer-bar { width: 100%; max-width: 760px; height: 4px; background: rgba(255,255,255,.08); }
.timer-bar i { display: block; height: 100%; width: 0; background: var(--hazard); }
.timer-bar i.low { background: var(--danger); }
.actions { width: 100%; max-width: 760px; display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 8px; }
.btn { position: relative; height: 58px; font-size: 20px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: transform .08s, filter .15s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; filter: grayscale(1); cursor: default; }
.btn-hit { background: linear-gradient(180deg, #f6cf45, #d9a414); color: #141210; }
.btn-stand { background: linear-gradient(180deg, #3a3b3e, #232427); border: 1px solid #555; }
.btn-trumps { background: linear-gradient(180deg, #2b2240, #1a1428); border: 1px solid #5b4a8a; }
.btn-trumps .count { background: var(--hazard); color: #111; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; padding: 0 5px; }
.btn-trumps.has { box-shadow: inset 0 0 18px rgba(170,130,255,.35); }
.keys-hint { font-size: 12px; color: var(--muted); letter-spacing: 1px; opacity: .7; }
body.mobile .keys-hint { display: none; }

/* trump panel (bottom sheet) */
.sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 760px); max-height: 74%; background: var(--panel); border-top: 2px solid var(--hazard); display: flex; flex-direction: column; animation: sheetIn .22s ease-out; z-index: 5; }
@keyframes sheetIn { from { transform: translate(-50%, 30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; padding: 10px 14px; gap: 10px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; font-size: 22px; letter-spacing: 2px; text-transform: uppercase; flex: 1; }
.sheet-body { overflow-y: auto; padding: 10px 14px 14px; }
.sec-title { font-size: 13px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin: 8px 0 6px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.tcard { background: var(--panel2); border: 1px solid var(--line); padding: 6px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; line-height: 1.1; text-align: center; min-height: 104px; }
.tcard img { width: 58px; height: 58px; }
.tcard.sel { border-color: var(--hazard); box-shadow: 0 0 0 1px var(--hazard), 0 0 18px rgba(242,194,48,.25); }
.tdetail { margin-top: 10px; background: rgba(0,0,0,.35); border-left: 3px solid var(--hazard); padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.tdetail img { width: 64px; height: 64px; flex: 0 0 auto; }
.tdetail .tx { flex: 1; } .tdetail b { font-size: 18px; letter-spacing: 1px; } .tdetail p { margin: 4px 0 0; font-size: 15px; color: #d6d0c4; font-family: system-ui, sans-serif; line-height: 1.3; }
.use-btn { height: 46px; padding: 0 18px; font-size: 17px; }
.table-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 40px; }
.table-row img { width: 40px; height: 40px; cursor: pointer; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); font-family: system-ui, sans-serif; line-height: 1.35; }

/* ---------------- screens ---------------- */
#screens { position: absolute; inset: 0; pointer-events: none; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; align-items: flex-start; justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b)); animation: fadeIn .25s ease-out; }
.screen.dim { background: rgba(0,0,0,.55); }
@keyframes fadeIn { from { opacity: 0; } }
.screen > * { margin: auto; }  /* centred, but scrollable instead of clipped on short screens (req. 1.10.1) */
.menu { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; }
.menu .logo { text-align: center; margin-bottom: 6px; }
.logo .n { font-size: clamp(90px, 22vh, 150px); line-height: .9; font-weight: 700; font-style: italic; color: var(--text); text-shadow: 0 0 40px rgba(224,53,43,.55), 0 6px 0 #000; }
.logo .tt { font-size: clamp(26px, 5vh, 40px); letter-spacing: 6px; font-weight: 700; color: var(--text); margin-top: 2px; }
.logo .s { font-size: clamp(14px, 2.6vh, 20px); letter-spacing: 6px; color: var(--hazard); margin-top: 2px; }
.mbtn { height: 54px; font-size: 20px; letter-spacing: 1.5px; text-transform: uppercase; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 10px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: background .15s, transform .08s; }
.mbtn:hover { background: #222; } .mbtn:active { transform: scale(.98); }
.mbtn.primary { background: linear-gradient(180deg, #f6cf45, #d9a414); color: #141210; border: 0; font-weight: 700; }
.mbtn.login { flex-direction: column; gap: 0; height: auto; padding: 8px 10px; font-size: 17px; }
.mbtn.login small { font-size: 12px; letter-spacing: .5px; text-transform: none; color: var(--muted); }
.mbtn img.cur { width: 22px; height: 22px; margin-right: 6px; vertical-align: middle; }
.mbtn.ad { background: linear-gradient(180deg, #24422a, #162a1a); border-color: #3d6b45; }
.mbtn:disabled { opacity: .45; cursor: default; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row2 > .mbtn { min-width: 0; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.profile-bar { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: var(--muted); padding: 0 2px; }
.profile-bar .bal { color: var(--text); font-size: 22px; display: flex; gap: 8px; align-items: center; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.status-dot.online { background: var(--ok); } .status-dot.offline { background: var(--hazard); } .status-dot.connecting { background: var(--muted); animation: blink 1s infinite; }
.ver { position: absolute; right: 10px; bottom: calc(6px + var(--safe-b)); font-size: 11px; color: #444; }

body.compact .menu { width: min(760px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; align-items: center; }
body.compact .menu .logo { grid-row: span 6; }
body.compact .menu .mbtn { height: 46px; font-size: 17px; }
body.compact .menu .row2 .mbtn { font-size: 15px; letter-spacing: 1px; }

.panel { width: min(620px, 100%); max-height: 100%; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.panel.wide { width: min(860px, 100%); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 24px; letter-spacing: 2px; text-transform: uppercase; flex: 1; }
.panel-body { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.x-btn { width: 40px; height: 40px; font-size: 22px; background: rgba(255,255,255,.06); }

.stake { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line); text-align: left; font-size: 18px; }
.stake:hover:not(:disabled) { border-color: var(--hazard); }
.stake:disabled { opacity: .4; }
.stake .amt { font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 110px; }
.stake .lvl { font-size: 13px; color: var(--muted); letter-spacing: .5px; } .stake .lvl b { color: var(--hazard); font-weight: 400; letter-spacing: 1px; }
.stake .qn { font-size: 13px; color: var(--cool); white-space: nowrap; }
.bot-note { color: var(--hazard); font-size: 16px; }
.stake .gain { color: var(--ok); font-size: 15px; } .stake .loss { color: #ff8b80; font-size: 15px; }

.search { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); padding: 26px 22px; width: min(420px, 100%); }
.spinner { width: 54px; height: 54px; border: 4px solid #2a2a2a; border-top-color: var(--hazard); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search .time { font-size: 34px; font-style: italic; }

.tabs { display: flex; gap: 6px; }
.tab { padding: 8px 14px; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; background: var(--panel2); border: 1px solid var(--line); }
.tab.on { background: var(--hazard); color: #111; border-color: var(--hazard); }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.skin { background: var(--panel2); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.skin.eq { border-color: var(--hazard); }
.skin .pv { display: flex; gap: 4px; align-items: flex-end; }
.skin .pv canvas { width: 54px; height: 81px; border-radius: 5px; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.skin .pv canvas.bk { width: 40px; height: 60px; opacity: .95; }
.skin .nm { font-size: 17px; letter-spacing: 1px; }
.skin .sbtn { width: 100%; height: 36px; font-size: 15px; text-transform: uppercase; background: #2c2c2f; border: 1px solid #444; display: flex; align-items: center; justify-content: center; gap: 6px; }
.skin .sbtn.buy { background: linear-gradient(180deg, #f6cf45, #d9a414); color: #111; border: 0; font-weight: 600; }
.skin img.thumb { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.skin.donate { background: linear-gradient(180deg, rgba(242,194,48,.10), var(--panel2) 60%); }
.tabs { flex-wrap: wrap; }
.skin .sbtn.eqd { background: transparent; color: var(--hazard); border-color: var(--hazard); }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.prod { background: var(--panel2); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.prod .big { font-size: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.prod .stack { display: flex; } .prod .stack .coin { width: 22px; height: 22px; margin-left: -8px; }

.lb-guest { display: flex; flex-direction: column; gap: 8px; background: rgba(242,194,48,.08); border-left: 3px solid var(--hazard); padding: 10px 12px; font-family: system-ui, sans-serif; font-size: 14px; color: #d6d0c4; }
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-row { display: grid; grid-template-columns: 34px 32px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 17px; }
.lb-row.me { border-color: var(--hazard); background: rgba(242,194,48,.1); }
.lb-row .rk { color: var(--hazard); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.lb-row img, .lb-row .av0 { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.lb-row .av0 { display: flex; align-items: center; justify-content: center; background: #2c2c30; color: var(--muted); }
.lb-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .sc { font-variant-numeric: tabular-nums; }
.lb-gap { text-align: center; color: var(--muted); line-height: 1; }
.rules h4 { margin: 6px 0 2px; font-size: 18px; color: var(--hazard); letter-spacing: 1px; text-transform: uppercase; }
.rules p { margin: 0; font-family: system-ui, sans-serif; font-size: 15px; line-height: 1.45; color: #d9d3c7; }
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.titem { display: flex; gap: 10px; align-items: center; background: var(--panel2); padding: 8px; border: 1px solid var(--line); }
.titem img { width: 48px; height: 48px; flex: 0 0 auto; }
.titem b { font-size: 16px; } .titem p { margin: 2px 0 0; font-size: 13px; font-family: system-ui, sans-serif; color: #c9c3b7; line-height: 1.3; }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.seg button { padding: 6px 12px; background: var(--panel2); border: 1px solid var(--line); font-size: 15px; }
.seg button.on { background: var(--hazard); color: #111; border-color: var(--hazard); }

.result { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; background: rgba(10,10,10,.88); border: 1px solid var(--line); padding: 26px 24px; width: min(440px, 100%); }
.result .ttl { font-size: clamp(48px, 10vw, 76px); font-weight: 700; font-style: italic; line-height: 1; }
.result .ttl.win { color: var(--ok); } .result .ttl.lose { color: var(--danger); }
.result .delta { font-size: 30px; display: flex; gap: 8px; align-items: center; }
.result .delta.pos { color: var(--ok); } .result .delta.neg { color: #ff8b80; }
.result .why { color: var(--muted); font-size: 16px; }
.result .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

.modal { background: var(--panel); border: 1px solid var(--line); padding: 20px; width: min(380px, 100%); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.modal h3 { margin: 0; font-size: 24px; letter-spacing: 1px; }
.modal p { margin: 0; color: #d6d0c4; font-family: system-ui, sans-serif; }

#toasts { position: absolute; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; z-index: 40; }
.toast { background: rgba(20,20,20,.95); border: 1px solid var(--hazard); padding: 8px 16px; font-size: 17px; animation: feedIn .25s ease-out; transition: opacity .4s; }
.toast.err { border-color: var(--danger); }

.fake-ad { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 32px; letter-spacing: 6px; }
.fake-ad small { font-size: 14px; color: #888; letter-spacing: 1px; }

/* small heights (phones in landscape) */
/* landscape: score on the left, buttons on the right, one compact row */
@media (min-aspect-ratio: 1/1) {
  .hud-bottom { display: grid; grid-template-columns: auto minmax(0, 600px); grid-template-areas: "score timer" "score actions" "score keys"; justify-content: center; column-gap: 16px; row-gap: 6px; align-items: end; }
  .score-row { grid-area: score; flex-direction: column; align-items: flex-start; width: auto; gap: 4px; }
  .score-row .side-col { order: -1; align-items: flex-start; }
  .swing { justify-content: flex-start; }
  .timer-bar { grid-area: timer; }
  .actions { grid-area: actions; }
  .keys-hint { grid-area: keys; text-align: center; }
  .my-score { font-size: clamp(44px, 7vh, 70px); padding-right: 18px; }
  #say { bottom: calc(120px + var(--safe-b)); }
}
@media (max-height: 480px) {
  .btn { height: 42px; font-size: 16px; }
  .my-score { font-size: 38px !important; padding: 0 14px 0 8px; }
  .turn-chip { font-size: 12px; padding: 2px 8px; }
  .hud-bottom { gap: 4px; row-gap: 4px; bottom: calc(6px + var(--safe-b)); }
  .keys-hint { display: none; }
  #say { bottom: 84px !important; }
  .feed-item { font-size: 13px; }
  .opp-tag .score { font-size: 22px; }
  .chip { font-size: 13px; padding: 3px 8px; }
  .icon-btn { width: 32px; height: 32px; }
  .sheet { max-height: 92%; }
  .tcard { min-height: 84px; } .tcard img { width: 42px; height: 42px; }
  .panel-body { padding: 10px; gap: 8px; }
  .stake { padding: 6px 12px; }
  .stake .amt { font-size: 20px; }
}
@media (max-width: 420px) {
  .btn { font-size: 16px; height: 54px; }
  .actions { grid-template-columns: 1fr 1.4fr 1fr; gap: 6px; }
  .chip { font-size: 13px; padding: 3px 7px; }
}

/* ---------- friends lobby ---------- */
.friends { display: flex; flex-direction: column; gap: 12px; }
.fr-or { text-align: center; color: var(--muted); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }
.fr-join { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.fr-join input { height: 54px; background: #0d0d0e; border: 1px solid var(--line); color: var(--text); font: 600 30px var(--font); letter-spacing: 10px; text-align: center; text-transform: uppercase; outline: none; min-width: 0; -webkit-user-select: text; user-select: text; }
.fr-join input:focus { border-color: var(--hazard); }
.fr-join input::placeholder { color: #4a4744; letter-spacing: 3px; font-size: 18px; }
.fr-join .mbtn { padding: 0 22px; }
.note.warn { color: var(--hazard); }
.room-code { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.room-code span { width: 56px; height: 72px; display: grid; place-items: center; font-size: 46px; font-weight: 700; background: #0d0d0e; border: 1px solid var(--line); color: var(--hazard); box-shadow: inset 0 -36px 0 rgba(255,255,255,.03); }
.searching { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.searching .spinner { width: 26px; height: 26px; border-width: 3px; }
.rm-note { color: var(--hazard); min-height: 1.2em; }

/* ---------- tutorial ---------- */
#tut { position: absolute; z-index: 30; background: #f2c230; color: #141414; padding: 12px 14px 10px; font-size: 17px; line-height: 1.3; box-shadow: 0 10px 30px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s; clip-path: none; }
#tut.on { opacity: 1; pointer-events: auto; }
#tut .tut-skip { margin-top: 8px; background: transparent; border: 0; color: rgba(0,0,0,.55); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; padding: 0; cursor: pointer; }
#tut .tut-arrow { position: absolute; bottom: -9px; width: 18px; height: 18px; margin-left: -9px; background: #f2c230; transform: rotate(45deg); }
#tut.below .tut-arrow { bottom: auto; top: -9px; }
.tut-focus { position: relative; z-index: 2; animation: tutPulse 1.1s ease-in-out infinite; }
@keyframes tutPulse { 0%, 100% { transform: scale(1); filter: brightness(1.05); } 50% { transform: scale(1.05); filter: brightness(1.45) saturate(1.2); } }
body.tut-on .btn.tut-focus { opacity: 1 !important; }
body.tut-on .actions .btn:not(.tut-focus) { opacity: .35; pointer-events: none; }
body.tut-on #trump-panel .tcard:not(.tut-focus):not(.sel) { pointer-events: auto; }

/* ---------- HUD: sound & give-up buttons (clearly visible) ---------- */
.hud-btn { width: auto; min-width: 44px; height: 44px; padding: 0 12px; gap: 8px; background: rgba(12,12,14,.82); border: 1px solid rgba(242,194,48,.55); color: var(--hazard); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.hud-btn svg { width: 22px; height: 22px; flex: none; }
.hud-btn:hover { background: rgba(242,194,48,.16); }
.hud-btn.off { color: var(--muted); border-color: var(--line); }
.hud-btn.leave { color: #ff6a5a; border-color: rgba(224,53,43,.7); background: rgba(40,8,6,.82); }
.hud-btn.leave:hover { background: rgba(224,53,43,.25); }
@media (max-width: 700px), (max-height: 520px) { .hud-btn { height: 38px; min-width: 38px; padding: 0 8px; } .hud-btn .lbl { display: none; } .hud-btn svg { width: 20px; height: 20px; } }

/* ---------- volume sliders ---------- */
.vol { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 300px; }
.vol b { width: 46px; text-align: right; font-weight: 500; color: var(--text); }
.vol input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 8px; background: linear-gradient(90deg, var(--hazard) var(--p, 50%), #2a2a2d var(--p, 50%)); border-radius: 4px; outline: none; touch-action: pan-x; }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #f6e3a0; border: 3px solid #1a1a1c; box-shadow: 0 0 0 2px var(--hazard); cursor: pointer; }
.vol input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #f6e3a0; border: 3px solid #1a1a1c; box-shadow: 0 0 0 2px var(--hazard); cursor: pointer; }

/* ---------- shop: not enough chips / real-money items ---------- */
.skin .sbtn.buy:disabled, .stake:disabled { opacity: .38; filter: grayscale(1); cursor: default; }
.skin .sbtn.iap, .prod .mbtn.iap { background: linear-gradient(180deg, #a76bff, #6b2fd8); color: #fff; border: 0; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.skin .sbtn.iap:disabled, .prod .mbtn.iap:disabled { opacity: .45; filter: saturate(.4); }
.skin .sbtn.iap img.cur, .prod .mbtn.iap img.cur { width: 18px; height: 18px; }
.skin.donate { background: linear-gradient(180deg, rgba(167,107,255,.16), var(--panel2) 60%); border-color: rgba(167,107,255,.45); }
.skin.donate .nm::after { content: ''; }

.prod .mbtn.ad { font-size: 15px; letter-spacing: .5px; white-space: nowrap; }

/* while a fullscreen ad is being requested/shown the UI ignores clicks */
body.ad-busy #screens, body.ad-busy #hud { pointer-events: none; }
