/* MIMIC GULP — 70s supermarket-flyer / enamel-ware style. Flat colours, paper grain, no glass/glow. */
@font-face { font-family: 'Slab'; src: url(../fonts/alfa-slab-one-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; font-display: swap; }
@font-face { font-family: 'Slab'; src: url(../fonts/alfa-slab-one-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: 'Slab'; src: url(../fonts/alfa-slab-one-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 500; src: url(../fonts/oswald-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 700; src: url(../fonts/oswald-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 500; src: url(../fonts/oswald-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 700; src: url(../fonts/oswald-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 500; src: url(../fonts/oswald-vietnamese-500-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }
@font-face { font-family: 'Cond'; font-weight: 700; src: url(../fonts/oswald-vietnamese-700-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }

:root {
  --paper: #F6EFE2; --paper2: #EEDCC3; --paper3: #E4CFAE; --red: #D93829; --red-d: #A42A1E; --mus: #E3A82B; --mus-d: #B98318;
  --olive: #2B3A2E; --olive2: #3B4D3D; --ink: #1F2620; --brass: #C99A3E;
  --intl: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', 'Noto Sans JP', 'Yu Gothic', 'Noto Sans KR', 'Malgun Gothic', 'Noto Sans Arabic', 'Segoe UI', 'Noto Sans Devanagari', 'Nirmala UI', sans-serif;
  --f-title: 'Slab', var(--intl); --f-text: 'Cond', var(--intl);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); color: var(--ink); font-family: var(--f-text); font-weight: 500; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.dia { width: .7em; height: .7em; color: var(--red); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.screen { position: fixed; inset: 0; z-index: 10; display: none; }
body.mode-lobby #lobby, body.mode-game #hud, body.mode-result #result { display: flex; }
body.mode-lobby, body.mode-result { background: var(--paper); }

/* ---------- shared plates & buttons ---------- */
.plate-dark { background: var(--olive); color: var(--paper); border: 3px solid var(--brass); box-shadow: inset 0 0 0 2px var(--olive), inset 0 0 0 3px #8c6a2a; position: relative; }
.plate-dark::before, .plate-dark::after { content: ''; position: absolute; width: 9px; height: 9px; background: var(--red); transform: rotate(45deg); top: 50%; margin-top: -4.5px; border: 1.5px solid var(--brass); }
.plate-dark::before { left: -7px; } .plate-dark::after { right: -7px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; color: var(--paper); }
.btn-play { position: relative; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 16px; background: var(--red); color: var(--paper); border: 3px solid var(--brass); box-shadow: inset 0 0 0 3px var(--red-d), 0 4px 0 #7d2016; padding: 10px 18px 8px; width: 100%; }
.btn-play::before, .btn-play::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--red-d); border: 2px solid var(--brass); transform: rotate(45deg); }
.btn-play::before { left: -10px; } .btn-play::after { right: -10px; }
.btn-play svg { grid-row: span 2; font-size: 54px; color: var(--paper); }
.btn-play .big { font-family: var(--f-title); font-size: 60px; line-height: 1; letter-spacing: 1px; }
.btn-play .small { font-size: 18px; letter-spacing: .5px; border-top: 1.5px solid #f6efe266; padding-top: 2px; margin-top: 2px; }
.btn-play:active, .btn-olive:active, .btn-gold:active { transform: translateY(2px); box-shadow: inset 0 0 0 3px var(--red-d), 0 2px 0 #7d2016; }
.btn-olive { display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--olive); color: var(--paper); border: 3px solid var(--brass); box-shadow: inset 0 0 0 2px var(--olive), inset 0 0 0 3px #8c6a2a, 0 3px 0 #18201a; font-family: var(--f-title); font-size: 30px; padding: 10px; min-height: 64px; }
.btn-olive svg { font-size: 40px; }
.btn-gold { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--mus); color: var(--olive); border: 3px solid var(--olive); box-shadow: inset 0 0 0 2px #f2c65f, 0 4px 0 var(--mus-d); font-family: var(--f-title); font-size: 34px; padding: 10px 14px; min-height: 66px; }
.btn-gold.slim, .btn-play.slim { min-height: 0; font-size: 20px; padding: 8px 12px; }
.btn-play.slim .big { font-size: 34px; } .btn-play.slim svg { font-size: 32px; } .btn-play.slim .small { font-size: 14px; }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.foot { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 700; letter-spacing: 1px; color: var(--olive); font-size: 15px; }
.foot::before, .foot::after { content: ''; height: 1.5px; width: 22%; background: var(--olive); opacity: .5; }

/* ---------- LOBBY (portrait base, 1024x1536 design) ---------- */
#lobby { flex-direction: column; padding: calc(10px + var(--safe-t)) 14px calc(8px + var(--safe-b)); gap: 8px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; height: 62px; flex: none; }
.avatar { width: 54px; height: 54px; background: var(--paper2); border: 2.5px solid var(--brass); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 112%; }
.who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.who b { font-family: var(--f-text); font-weight: 700; font-size: 22px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvl { align-self: flex-start; background: var(--mus); color: var(--olive); font-weight: 700; font-size: 13px; padding: 0 8px; border: 1.5px solid var(--brass); }
.coins { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-left: 2px solid var(--brass); border-right: 2px solid var(--brass); height: 70%; }
.coins img { width: 30px; height: 30px; } .coins b { font-family: var(--f-title); font-size: 22px; }
.lobby-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.lobby-col { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.lobby-left { flex: 1; }
.title-block { position: relative; text-align: center; padding: 2px 70px 0; }
.logo { margin: 0; font-family: var(--f-title); font-weight: 400; color: var(--red); line-height: .92; font-size: clamp(40px, 12.5vw, 78px); display: flex; flex-direction: column; letter-spacing: 1px; text-shadow: 2px 2px 0 #7d201622; }
.laurel { position: absolute; top: 4px; height: 82%; }
.laurel.l { left: 6px; } .laurel.r { right: 6px; }
.ribbon { display: inline-block; margin-top: 4px; background: var(--olive); color: var(--paper); font-weight: 700; letter-spacing: 3px; font-size: clamp(13px, 3.2vw, 20px); padding: 2px 22px; border: 2px solid var(--brass); clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); }
.rule-row { display: flex; align-items: center; gap: 10px; border-top: 1.5px solid var(--olive); border-bottom: 1.5px solid var(--olive); padding: 4px 6px; font-weight: 700; letter-spacing: 1.5px; font-size: clamp(12px, 2.9vw, 17px); color: var(--olive); }
.rule-row span:first-of-type { flex: 1; text-align: center; } .rule-row i { width: 2px; height: 18px; background: var(--olive); }
.rule-row #online-n { flex: .55; text-align: center; }
.showcase { position: relative; flex: 1; min-height: 160px; background: var(--olive); border: 4px solid var(--brass); box-shadow: inset 0 0 0 3px #8c6a2a; overflow: hidden; margin-top: 12px; }
.showcase .tab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; background: var(--paper); color: var(--olive); border: 2.5px solid var(--brass); border-top: 0; font-weight: 700; letter-spacing: 1.5px; font-size: 17px; padding: 2px 22px; white-space: nowrap; }
.arches { position: absolute; inset: 0 0 26% 0; display: flex; justify-content: space-around; padding: 0 2%; }
.arches i { width: 12%; height: 100%; background: linear-gradient(var(--paper3), var(--paper3)) left/18% 100% no-repeat, linear-gradient(var(--paper3), var(--paper3)) right/18% 100% no-repeat; border-top: 0; position: relative; }
.arches i::before { content: ''; position: absolute; top: 6%; left: -150%; width: 400%; height: 30%; border: 9px solid var(--paper3); border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.arches i:first-child, .arches i:last-child { opacity: 0; }
.showcase::before { content: ''; position: absolute; left: 0; right: 0; bottom: 26%; height: 18%; background: repeating-linear-gradient(90deg, #24332a 0 22%, #2f4033 22% 23%); border-top: 3px solid #4a5b47; }
.banner { position: absolute; top: 16%; width: 12%; height: 34%; background: var(--red); border: 2px solid var(--brass); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.banner.l { left: 9%; } .banner.r { right: 9%; }
.banner::after { content: ''; position: absolute; left: 30%; top: 30%; width: 40%; height: 22%; background: var(--mus); clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.showcase .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: repeating-conic-gradient(from 45deg, #efe3cd 0 25%, #e6d6ba 0 50%) 0 0/56px 56px; border-top: 2px solid #c9b796; }
.showcase .stage { position: absolute; inset: 8% 0 3% 0; z-index: 2; }
.sc-arrow { position: absolute; z-index: 3; top: 50%; margin-top: -24px; width: 40px; height: 48px; background: var(--paper); color: var(--olive); border: 2.5px solid var(--brass); display: grid; place-items: center; font-size: 26px; }
.sc-arrow.l { left: 8px; } .sc-arrow.r { right: 8px; }
.nameplate { position: absolute; z-index: 3; bottom: 6px; left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--olive); border: 3px solid var(--brass); font-family: var(--f-title); font-size: clamp(20px, 5vw, 34px); padding: 2px 30px; white-space: nowrap; clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%); }
.stat-row { display: flex; align-items: center; background: var(--paper); border: 3px solid var(--brass); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px #b48a3a; padding: 4px 10px; }
.stat-row > div, .stat-row > button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--olive); letter-spacing: 1px; }
.stat-row svg { font-size: 30px; } .stat-row b { font-family: var(--f-title); font-weight: 400; font-size: 34px; color: var(--red); }
.stat-row > i { width: 2px; height: 32px; background: var(--olive); opacity: .7; }
.navbar { display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--olive); border: 3px solid var(--brass); box-shadow: inset 0 0 0 2px var(--olive), inset 0 0 0 3px #8c6a2a; }
.navbar button { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--paper); font-family: var(--f-title); font-size: 21px; padding: 10px 4px; border-left: 2px solid #8c6a2a; }
.navbar button:first-child { border-left: 0; } .navbar button svg { font-size: 30px; } .navbar button.on { background: var(--red); }

/* landscape lobby: two columns (title+showcase | actions) */
@media (orientation: landscape) {
  #lobby { padding: calc(6px + var(--safe-t)) max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left)); gap: 6px; }
  .topbar { height: 52px; } .avatar { width: 44px; height: 44px; }
  .lobby-body { flex-direction: row; gap: 18px; }
  .lobby-left { flex: 1.15; } .lobby-right { flex: 1; justify-content: center; gap: 12px; }
  .title-block { display: none; }
  .lobby-right::before { content: ''; }
  .logo { font-size: clamp(30px, 6vh, 60px); }
  .showcase { margin-top: 10px; }
  .btn-play .big { font-size: clamp(36px, 8vh, 60px); }
  .btn-olive { min-height: 52px; font-size: 24px; }
  .navbar button { padding: 6px 4px; }
  body.mode-lobby .lobby-right .title-land { display: block; }
}
.title-land { display: none; position: relative; text-align: center; }
.title-land .logo { flex-direction: row; justify-content: center; gap: .3em; font-size: clamp(30px, 7.5vh, 64px); }

/* ---------- HUD ---------- */
#hud { pointer-events: none; font-family: var(--f-text); }
#hud button, #hud .joy, #hud .private-chip { pointer-events: auto; }
.hud-title { position: absolute; top: calc(6px + var(--safe-t)); left: 50%; transform: translateX(-50%); background: var(--olive); color: var(--paper); font-family: var(--f-title); font-size: 26px; padding: 2px 36px 4px; border: 3px solid var(--brass); clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%); white-space: nowrap; }
.hud-top { position: absolute; top: calc(52px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: center; align-items: stretch; gap: 6px; }
.hbox { background: var(--olive); color: var(--paper); border: 2.5px solid var(--brass); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 12px; min-width: 96px; }
.hbox small { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; color: var(--paper2); }
.hbox b { font-family: var(--f-title); font-weight: 400; font-size: 24px; line-height: 1.05; }
.hbox.timer { background: var(--red); min-width: 120px; } .hbox.timer b { font-size: 36px; }
.hbox.timer.hot { background: var(--mus); color: var(--olive); }
.hud-gear { position: absolute; right: 0; top: 0; background: var(--olive); border: 2.5px solid var(--brass); width: 48px; height: 48px; }
.zone-strip { position: absolute; top: calc(112px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--red); color: var(--paper); border: 2px solid var(--brass); padding: 3px 18px; font-weight: 700; font-size: 17px; letter-spacing: 1px; white-space: nowrap; clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%); }
.zone-strip svg { font-size: 18px; } .zone-strip.calm { background: var(--olive); }
.hud-left { position: absolute; left: 8px; top: calc(150px + var(--safe-t)); width: 46%; max-width: 330px; display: flex; flex-direction: column; gap: 4px; }
.me-card { display: none; }
.feed { display: flex; flex-direction: column; gap: 3px; }
.feed div { background: #2B3A2Ee6; color: var(--paper); border-left: 4px solid var(--mus); padding: 2px 8px; font-size: 14px; font-weight: 500; animation: feedin .25s ease-out; }
.feed div.me { border-left-color: var(--red); background: #2B3A2Ef2; } .feed div.big { font-family: var(--f-title); font-size: 18px; color: var(--mus); }
@keyframes feedin { from { transform: translateX(-20px); opacity: 0; } }
.leaders { position: absolute; left: 8px; top: calc(150px + var(--safe-t)); background: var(--olive); color: var(--paper); border: 2.5px solid var(--brass); width: 44%; max-width: 270px; padding: 2px 0; }
.leaders .lh { display: none; align-items: center; justify-content: center; gap: 6px; font-family: var(--f-title); color: var(--mus); font-size: 18px; border-bottom: 1.5px solid var(--brass); }
.leaders ol { list-style: none; margin: 0; padding: 0; }
.leaders li { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; align-items: center; padding: 1px 8px; font-weight: 700; font-size: 16px; }
.leaders li .n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.leaders li.me { background: var(--mus); color: var(--olive); }
.leaders li .r { font-family: var(--f-title); font-weight: 400; text-align: center; }
body.has-leaders .hud-left { top: calc(250px + var(--safe-t)); }
.private-chip { position: absolute; right: 8px; top: calc(150px + var(--safe-t)); display: none; align-items: center; gap: 6px; background: var(--paper); color: var(--olive); border: 2.5px solid var(--brass); padding: 2px 4px 2px 10px; font-weight: 700; font-size: 14px; }
.private-chip button { width: 34px; height: 34px; display: grid; place-items: center; background: var(--olive); color: var(--paper); font-size: 20px; }
body.in-private .private-chip { display: flex; }
#tags { position: absolute; inset: 0; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; white-space: nowrap; }
.tag .nm { background: var(--olive); color: var(--paper); font-weight: 700; font-size: 13px; padding: 0 10px; border: 1.5px solid var(--brass); clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%); }
.tag.me .nm { background: var(--mus); color: var(--olive); font-family: var(--f-title); font-weight: 400; font-size: 17px; padding: 0 14px; }
.tag .bar { display: flex; align-items: center; gap: 4px; margin-top: 2px; background: var(--olive); border: 1.5px solid var(--brass); padding: 0 4px 0 0; }
.tag .bar b { background: var(--ink); color: var(--paper); font-size: 11px; padding: 0 4px; font-weight: 700; }
.tag .bar i { width: 46px; height: 7px; background: #1a221c; display: block; position: relative; }
.tag .bar i u { position: absolute; inset: 0 auto 0 0; background: #6aa84f; }
.tag .bar i u.danger { background: var(--red); } .tag .bar i u.prey { background: var(--mus); }
.tag .arrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--red); margin-top: 1px; }
.tag.me .arrow { border-top-color: var(--mus); }
.tag.nem .nm { background: var(--red); }
.center-msg { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-family: var(--f-title); font-size: 40px; color: var(--paper); -webkit-text-stroke: 1.5px var(--olive); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--olive); text-align: center; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.center-msg.show { opacity: 1; animation: pop .35s cubic-bezier(.2, 1.6, .5, 1); }
.center-msg.warn { color: var(--mus); font-size: 26px; top: 26%; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.5); } }
.joy { position: absolute; left: 14px; bottom: calc(76px + var(--safe-b)); width: 150px; height: 160px; touch-action: none; }
.joy img { width: 100%; height: 100%; pointer-events: none; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 30%; height: 28%; margin: -14% 0 0 -15%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f0c860, #b4842a 70%); border: 3px solid #6e5420; pointer-events: none; display: none; }
.joy.active .knob { display: block; }
.growth { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(62vw, 520px); display: flex; flex-direction: column; align-items: center; }
.growth .gl { background: var(--olive); color: var(--paper); font-weight: 700; letter-spacing: 1.5px; font-size: 15px; padding: 1px 18px; border: 2px solid var(--brass); border-bottom: 0; white-space: nowrap; }
.gbar { width: 100%; height: 22px; background: var(--olive); border: 3px solid var(--brass); padding: 3px; }
.gbar i { display: block; height: 100%; width: 0; background: var(--mus); transition: width .3s; }
.btn-freeze, .btn-bite { position: absolute; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--paper); }
.btn-freeze { right: 150px; bottom: calc(78px + var(--safe-b)); width: 104px; height: 104px; background: var(--olive); border: 4px solid var(--brass); box-shadow: 0 4px 0 #18201a; }
.btn-freeze .ic { font-size: 40px; color: var(--mus); } .btn-freeze span { font-weight: 700; font-size: 14px; letter-spacing: 1px; margin-top: 2px; }
.btn-freeze em { position: absolute; top: -6px; right: -6px; width: 32px; height: 32px; border-radius: 50%; background: var(--mus); color: var(--olive); border: 2.5px solid var(--olive); font-style: normal; font-family: var(--f-title); font-size: 18px; display: grid; place-items: center; }
.btn-freeze .ring, .btn-bite .cd { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.btn-freeze .ring circle { stroke: var(--mus); stroke-width: 6; stroke-dasharray: 289; stroke-dashoffset: 0; fill: none; }
.btn-freeze.on { background: var(--mus); color: var(--olive); } .btn-freeze.on .ic { color: var(--olive); }
.btn-freeze.empty { opacity: .55; }
.btn-bite { right: 14px; bottom: calc(60px + var(--safe-b)); width: 138px; height: 138px; background: var(--red); border: 5px solid var(--brass); box-shadow: inset 0 0 0 4px var(--red-d), 0 5px 0 #7d2016; }
.btn-bite img { width: 62%; margin-top: 4px; pointer-events: none; }
.btn-bite span { font-family: var(--f-title); font-size: 26px; line-height: 1; margin-top: -2px; }
.btn-bite .cd circle { stroke: #1F2620aa; stroke-width: 92; fill: none; stroke-dasharray: 289; stroke-dashoffset: 289; r: 23; }
.btn-bite.ambush { background: var(--mus); } .btn-bite.ambush span { color: var(--olive); }
.btn-freeze:active, .btn-bite:active { transform: translateY(3px); }
body.spectate .btn-freeze, body.spectate .btn-bite, body.spectate .joy, body.spectate .growth { display: none; }

/* landscape HUD (design 9) */
@media (orientation: landscape) {
  .hud-title { left: 8px; transform: none; font-size: 24px; clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%); padding-right: 44px; }
  .hud-top { top: calc(6px + var(--safe-t)); left: 50%; right: auto; transform: translateX(-50%); }
  .hbox.score { display: none; }
  .hud-top .alive { position: fixed; right: 64px; top: calc(6px + var(--safe-t)); flex-direction: row; gap: 8px; }
  .hud-top .alive small { font-size: 16px; }
  .hud-gear { position: fixed; right: 8px; top: calc(6px + var(--safe-t)); }
  .zone-strip { top: calc(62px + var(--safe-t)); }
  .hud-left, body.has-leaders .hud-left { top: calc(56px + var(--safe-t)); width: 300px; background: #2B3A2Ee0; border: 2.5px solid var(--brass); padding: 6px; }
  .me-card { display: flex; align-items: center; gap: 8px; color: var(--paper); font-weight: 700; font-size: 18px; letter-spacing: 1px; }
  .me-card svg { color: var(--mus); font-size: 22px; }
  .feed div { background: none; }
  .leaders { left: auto; right: 8px; top: calc(60px + var(--safe-t)); width: 270px; }
  .leaders .lh { display: flex; }
  .private-chip { top: auto; bottom: calc(150px + var(--safe-b)); left: 8px; right: auto; }
  .joy { bottom: calc(16px + var(--safe-b)); left: max(14px, env(safe-area-inset-left)); }
  .btn-bite { bottom: calc(16px + var(--safe-b)); right: max(14px, env(safe-area-inset-right)); }
  .btn-freeze { bottom: calc(22px + var(--safe-b)); right: 168px; }
  .growth { width: min(40vw, 520px); }
  .center-msg { top: 30%; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .joy { width: 120px; height: 128px; } .btn-bite { width: 112px; height: 112px; } .btn-freeze { width: 86px; height: 86px; right: 136px; }
  .leaders li { font-size: 13px; } .hud-left { width: 240px; } .feed div { font-size: 12px; }
}
@media (max-width: 420px) and (orientation: portrait) {
  .hbox { min-width: 76px; padding: 2px 6px; } .hbox b { font-size: 20px; } .hbox.timer b { font-size: 30px; }
  .btn-bite { width: 118px; height: 118px; } .btn-freeze { width: 88px; height: 88px; right: 136px; }
  .joy { width: 130px; height: 140px; }
}

/* ---------- RESULT ---------- */
#result { flex-direction: column; padding: calc(8px + var(--safe-t)) 12px calc(6px + var(--safe-b)); gap: 6px; overflow-y: auto; touch-action: pan-y; }
.res-top { display: flex; align-items: center; justify-content: space-between; height: 52px; flex: none; padding: 0 4px; }
.res-top .t { font-family: var(--f-title); font-size: 22px; color: var(--mus); }
.res-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.res-col { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.res-head { position: relative; text-align: center; padding: 0 70px; }
.res-head .laurel { height: 100%; top: 0; }
.res-head h2 { margin: 0; font-family: var(--f-title); font-weight: 400; font-size: clamp(44px, 12vw, 76px); line-height: 1; color: var(--red); }
.res-head h2.lose { color: var(--olive); }
.res-sub { display: inline-block; background: var(--olive); color: var(--paper); font-weight: 700; letter-spacing: 3px; font-size: 15px; padding: 1px 18px; border: 2px solid var(--brass); }
.medal { position: relative; align-self: center; width: min(54vw, 300px); aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(var(--mus) 0 7.5deg, #ebbc4c 0 15deg); border: 5px solid var(--olive); box-shadow: inset 0 0 0 6px var(--brass), inset 0 0 0 14px var(--paper); }
.medal .stage { position: absolute; inset: 4%; }
.rank-plaque { align-self: center; margin-top: -26px; z-index: 2; background: var(--red); color: var(--paper); font-family: var(--f-title); font-size: 34px; padding: 2px 34px; border: 3px solid var(--brass); clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%); }
.res-why { text-align: center; font-weight: 700; letter-spacing: 3px; color: var(--olive); font-size: 15px; }
.stat-row.three > div { gap: 6px; font-size: 15px; } .stat-row.three b { font-size: 26px; }
.sec-title { display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; font-family: var(--f-title); color: var(--olive); font-size: 22px; }
.sec-title::before, .sec-title::after { content: ''; flex: 1; height: 2px; background: var(--brass); }
.sec-title .wallet { position: absolute; right: 0; display: flex; align-items: center; gap: 4px; background: var(--olive); color: var(--paper); padding: 0 10px 0 4px; border: 2px solid var(--brass); font-size: 18px; }
.sec-title .wallet img { width: 22px; }
.rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rw { background: var(--olive); border: 2.5px solid var(--brass); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; color: var(--paper); }
.rw img { width: 48px; height: 48px; } .rw svg.xp { font-size: 46px; color: var(--mus); }
.rw b { font-family: var(--f-title); font-weight: 400; font-size: 20px; background: var(--paper); color: var(--olive); padding: 0 12px; border: 1.5px solid var(--brass); }
#rw-clip.ready { background: var(--red); } #rw-clip.none { opacity: .55; }
.shop-rows { display: flex; flex-direction: column; gap: 6px; }
.shop-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; background: var(--paper); border: 2.5px solid var(--brass); padding: 4px 8px; }
.shop-row .ic { width: 56px; height: 50px; display: grid; place-items: center; background: var(--paper2); }
.shop-row .ic img { max-width: 100%; max-height: 100%; }
.shop-row .nm { font-weight: 700; font-size: 18px; color: var(--olive); letter-spacing: .5px; line-height: 1.1; }
.shop-row .nm small { display: block; font-weight: 500; font-size: 13px; color: #5b604f; }
.price { display: flex; align-items: center; gap: 6px; background: var(--mus); color: var(--olive); border: 2px solid var(--olive); font-family: var(--f-title); font-size: 18px; padding: 4px 12px; box-shadow: 0 3px 0 var(--mus-d); min-width: 92px; justify-content: center; }
.price img { width: 22px; } .price.owned { background: var(--olive); color: var(--paper); box-shadow: none; } .price.poor { opacity: .6; }
.res-actions { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
@media (orientation: landscape) {
  .res-body { flex-direction: row; gap: 20px; } .res-col { flex: 1; justify-content: center; }
  .medal { width: min(38vh, 280px); }
}

/* ---------- MODALS ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 14px; background: #1F262099; }
.modal-wrap.show { display: flex; }
.panel.paper { background: var(--paper); border: 4px solid var(--brass); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px #b48a3a, 6px 6px 0 #1F262055; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; touch-action: pan-y; }
.panel h2, .panel h3 { margin: 0; font-family: var(--f-title); font-weight: 400; color: var(--red); text-align: center; font-size: 34px; }
.panel h3 { font-size: 22px; color: var(--olive); }
.mhead { display: flex; align-items: center; gap: 8px; } .mhead h2 { flex: 1; }
.mhead .x { width: 42px; height: 42px; background: var(--olive); color: var(--paper); display: grid; place-items: center; font-size: 22px; border: 2px solid var(--brass); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2.5px solid var(--brass); }
.tabs button { padding: 8px; font-weight: 700; letter-spacing: 1px; font-size: 16px; color: var(--olive); background: var(--paper2); }
.tabs button.on { background: var(--olive); color: var(--paper); }
.list { display: flex; flex-direction: column; gap: 4px; }
.lrow { display: grid; grid-template-columns: 34px 40px 1fr auto; gap: 8px; align-items: center; background: #fff8ec; border: 1.5px solid var(--paper3); padding: 3px 8px; font-weight: 700; font-size: 16px; color: var(--olive); }
.lrow .rk { font-family: var(--f-title); font-weight: 400; font-size: 18px; text-align: center; color: var(--red); }
.lrow .av { width: 40px; height: 34px; display: grid; place-items: center; overflow: hidden; }
.lrow .av img { max-width: 100%; max-height: 100%; }
.lrow .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .lrow .nm small { font-size: 11px; background: var(--olive); color: var(--paper); padding: 0 4px; margin-left: 6px; vertical-align: 2px; }
.lrow .kg { font-family: var(--f-title); font-weight: 400; color: var(--olive); }
.lrow.me { background: var(--mus); }
.room-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: #fff8ec; border: 1.5px solid var(--paper3); padding: 6px 8px; color: var(--olive); }
.room-row b { font-family: var(--f-title); font-weight: 400; font-size: 18px; } .room-row small { display: block; font-size: 13px; color: #5b604f; }
.room-row .cnt { font-weight: 700; font-size: 18px; }
.small-btn { background: var(--red); color: var(--paper); font-family: var(--f-title); font-size: 17px; padding: 6px 14px; border: 2px solid var(--brass); }
.small-btn.ol { background: var(--olive); }
.field { display: flex; gap: 8px; } .field input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; padding: 8px 10px; border: 2.5px solid var(--olive); background: #fffaf0; color: var(--olive); text-transform: uppercase; letter-spacing: 2px; user-select: text; -webkit-user-select: text; }
.field input.name { text-transform: none; letter-spacing: .5px; }
.grid-skins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.skin-card { background: #fff8ec; border: 2.5px solid var(--paper3); padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--olive); }
.skin-card.sel { border-color: var(--red); background: #fbe7cf; }
.skin-card .pv { width: 100%; aspect-ratio: 1.15; display: grid; place-items: center; background: var(--olive); }
.skin-card .pv img { width: 92%; max-width: 100%; min-width: 0; }
.skin-card { min-width: 0; } .skin-card b { max-width: 100%; overflow-wrap: anywhere; }
.skin-card b { font-weight: 700; font-size: 14px; text-align: center; line-height: 1.1; min-height: 2.2em; display: flex; align-items: center; }
.skin-card .price { font-size: 15px; min-width: 0; padding: 2px 8px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 18px; color: var(--olive); }
.kv b { font-family: var(--f-title); font-weight: 400; color: var(--red); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1.5px dashed var(--paper3); font-weight: 700; font-size: 18px; color: var(--olive); }
.set-row .seg { display: flex; border: 2px solid var(--olive); } .set-row .seg button { padding: 4px 12px; font-weight: 700; } .set-row .seg button.on { background: var(--olive); color: var(--paper); }
.how { display: grid; grid-template-columns: 44px 1fr; gap: 8px 10px; align-items: center; font-size: 17px; color: var(--ink); }
.how .n { width: 40px; height: 40px; display: grid; place-items: center; background: var(--red); color: var(--paper); font-family: var(--f-title); font-size: 22px; border: 2px solid var(--brass); }
.dead-card { text-align: center; max-width: 420px; }
.dead-card p { margin: 0; font-weight: 700; font-size: 20px; color: var(--olive); }
.dead-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dead-stats div { background: var(--olive); color: var(--paper); border: 2px solid var(--brass); padding: 4px; }
.dead-stats small { display: block; font-weight: 700; letter-spacing: 1px; } .dead-stats b { font-family: var(--f-title); font-weight: 400; font-size: 28px; color: var(--mus); }
.ad-card { max-width: 360px; align-items: center; } .ad-t { font-family: var(--f-title); font-size: 26px; color: var(--olive); }
.ad-fill { width: 100%; height: 14px; border: 2px solid var(--olive); } .ad-fill i { display: block; height: 100%; width: 0; background: var(--red); }
#toast { position: fixed; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 60; background: var(--olive); color: var(--paper); border: 2.5px solid var(--brass); font-weight: 700; font-size: 18px; padding: 6px 18px; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; }
#boot { position: fixed; inset: 0; z-index: 70; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .4s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-logo { font-family: var(--f-title); color: var(--red); font-size: 64px; line-height: .9; display: flex; flex-direction: column; align-items: center; }
.boot-bar { width: min(70vw, 320px); height: 16px; border: 3px solid var(--olive); padding: 2px; } .boot-bar i { display: block; height: 100%; width: 5%; background: var(--red); transition: width .2s; }
#boot-t { font-weight: 700; letter-spacing: 2px; color: var(--olive); }
/* restyle shared language popup to match the art direction */
#vds-lang-pop { background: #1F262099 !important; }
#vds-lang-pop > div { background: var(--paper) !important; color: var(--olive) !important; border-radius: 0 !important; border: 4px solid var(--brass) !important; font-family: var(--f-text) !important; }
#vds-lang-pop > div > div:first-child { font-family: var(--f-title) !important; font-weight: 400 !important; color: var(--red) !important; font-size: 24px !important; }
#vds-lang-pop button { border-radius: 0 !important; background: #fff8ec !important; color: var(--olive) !important; border: 2px solid var(--paper3) !important; font-family: var(--f-text), var(--intl) !important; font-weight: 700 !important; }
#vds-lang-pop button[style*="6366f1"] { background: var(--olive) !important; color: var(--paper) !important; border-color: var(--brass) !important; }
[dir=rtl] .feed div { border-left: 0; border-right: 4px solid var(--mus); }

/* ---- fixes after first visual pass ---- */
body.mode-lobby #gl, body.mode-result #gl { z-index: 20; pointer-events: none; }
.showcase .stage { inset: 9% 13% 17% 13%; }
.btn-olive { font-size: clamp(18px, 6vw, 30px); gap: 10px; padding: 8px 6px; }
.btn-olive svg { font-size: clamp(26px, 8vw, 40px); }
.navbar button { font-size: clamp(13px, 4.1vw, 21px); gap: 5px; }
.navbar button svg { font-size: clamp(20px, 6vw, 30px); }
.stat-row b { white-space: nowrap; }
.stat-row.three b { font-size: clamp(18px, 5.4vw, 26px); }
.stat-row.three > div { font-size: clamp(11px, 3.4vw, 15px); white-space: nowrap; }
@media (orientation: landscape) {
  .hud-top { left: 0; right: 0; transform: none; }
  .hud-top .alive { position: absolute; right: 64px; top: 0; }
  .hud-gear { position: absolute; right: 8px; top: 0; }
  .btn-olive { font-size: clamp(16px, 3.2vh, 26px); }
  .navbar button { font-size: clamp(13px, 2.2vw, 20px); }
}
@media (orientation: landscape) {
  .lobby-right { justify-content: flex-start; gap: 8px; padding-top: 4px; }
  .title-land { display: block; }
  .title-land .logo { font-size: clamp(26px, 8vh, 56px); line-height: 1; }
  .title-land .ribbon { font-size: clamp(11px, 2.6vh, 16px); padding: 1px 16px; margin-top: 2px; }
}
#zone-arrow { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--red); pointer-events: none; }
#zone-arrow svg { width: 46px; height: 46px; filter: drop-shadow(2px 2px 0 var(--olive)); }
#zone-arrow b { background: var(--red); color: var(--paper); font-size: 13px; letter-spacing: 1px; padding: 0 8px; border: 1.5px solid var(--brass); }
@media (orientation: landscape) and (max-height: 460px) {
  #lobby { gap: 4px; } .topbar { height: 44px; } .avatar { width: 38px; height: 38px; } .who b { font-size: 18px; }
  .rule-row { padding: 2px 6px; } .showcase { margin-top: 6px; }
  .lobby-right { gap: 5px; } .stat-row { padding: 0 10px; } .stat-row b { font-size: 26px; } .stat-row svg { font-size: 24px; }
  .btn-play { padding: 4px 18px 4px; } .btn-play .big { font-size: 38px; } .btn-play svg { font-size: 36px; } .btn-play .small { font-size: 14px; }
  .btn-olive { min-height: 42px; padding: 4px; } .navbar button { padding: 4px; } .foot { display: none; }
  .title-land .logo { font-size: 34px; } .title-land .ribbon { display: none; }
}
@media (orientation: landscape) {
  .res-col { min-width: 0; gap: 5px; }
  .res-body { min-height: 0; }
  .res-head h2 { font-size: clamp(34px, 11vh, 70px); }
  .medal { width: min(34vh, 260px); }
  .rank-plaque { font-size: clamp(20px, 6vh, 34px); margin-top: -18px; }
  .rewards .rw { padding: 4px; } .rw img { width: 34px; height: 34px; } .rw svg.xp { font-size: 32px; } .rw b { font-size: 16px; }
  .btn-gold { min-height: 46px; font-size: clamp(20px, 5vh, 30px); } .btn-gold.slim { font-size: 16px; padding: 5px; }
  .shop-row { padding: 2px 6px; grid-template-columns: 44px 1fr auto; } .shop-row .ic { width: 44px; height: 38px; } .shop-row .nm { font-size: 15px; }
  .sec-title { font-size: 18px; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .res-top { height: 40px; } .res-sub, .res-why { font-size: 12px; } .res-col .foot { font-size: 12px; }
}
#tags { z-index: 0; }
@media (orientation: landscape) and (max-height: 360px) {
  #lobby { padding-bottom: max(4px, var(--safe-b)); }
  #lobby .lobby-right::before { display: none; }
  #lobby .title-land { display: none; }
  /* verified at 568x320 + 915x412 (en, ar rotated) by tools/e2e.js -> checkLobbyNav */
}
.hud-title, .hud-top, .zone-strip, .hud-left, .leaders, .joy, .growth, .btn-freeze, .btn-bite, .private-chip, .center-msg, #zone-arrow { z-index: 2; }
/* shared 🌐 language button, restyled into the lobby footer */
.lang-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--olive); color: var(--paper); border: 2px solid var(--brass); padding: 3px 12px; font-family: var(--f-text), var(--intl); font-weight: 700; font-size: 15px; letter-spacing: .5px; min-height: 34px; cursor: pointer; white-space: nowrap; }
#lang-slot { display: inline-flex; }
/* nav labels: never clip in long languages (fr DÉGUISEMENTS, de VERKLEIDUNGEN...) */
.navbar button { min-width: 0; overflow: hidden; }
.navbar button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (orientation: portrait) and (max-width: 520px) {
  .navbar button { flex-direction: column; gap: 1px; padding: 6px 2px 5px; font-size: clamp(11px, 3.3vw, 16px); }
  .navbar button svg { font-size: clamp(20px, 5.6vw, 26px); }
  .ribbon { white-space: nowrap; font-size: clamp(11px, 3vw, 18px); letter-spacing: 2px; padding: 2px 16px; }
  .two-btns .btn-olive span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .foot { display: flex; font-size: 12px; } .lang-btn { font-size: 12px; min-height: 26px; padding: 1px 8px; }
}
@media (orientation: landscape) and (max-height: 360px) {
  .foot { font-size: 11px; } .lang-btn { min-height: 24px; }
  .showcase .nameplate { font-size: 18px; }
}
/* very short landscape phones (568x320, 640x360): compact everything so nav + 🌐 stay on screen */
@media (orientation: landscape) and (max-height: 360px) {
  #lobby { gap: 3px; padding-top: calc(4px + var(--safe-t)); }
  .topbar { height: 38px; } .avatar { width: 32px; height: 32px; } .who b { font-size: 15px; } .lvl { font-size: 10px; }
  .coins img { width: 22px; height: 22px; } .coins b { font-size: 17px; } .icon-btn { width: 36px; height: 36px; font-size: 20px; }
  .rule-row { font-size: 10px; white-space: nowrap; padding: 1px 4px; letter-spacing: .5px; }
  .lobby-right { gap: 4px; padding-top: 0; }
  .stat-row { padding: 0 8px; } .stat-row b { font-size: 20px; } .stat-row svg { font-size: 18px; }
  .stat-row > div, .stat-row > button { font-size: 12px; gap: 6px; } .stat-row > i { height: 20px; }
  .btn-play { padding: 2px 14px; column-gap: 10px; } .btn-play .big { font-size: 28px; } .btn-play svg { font-size: 26px; } .btn-play .small { font-size: 10px; }
  .btn-olive { min-height: 34px; font-size: 15px; gap: 6px; padding: 2px; } .btn-olive svg { font-size: 20px; }
  .navbar button { flex-direction: column; gap: 0; font-size: 11px; padding: 2px; } .navbar button svg { font-size: 17px; }
  .foot { font-size: 10px; gap: 8px; } .foot #ping-lbl { display: none; } .lang-btn { font-size: 11px; min-height: 22px; padding: 0 8px; }
  .showcase { margin-top: 4px; min-height: 120px; } .showcase .tab { font-size: 12px; padding: 0 12px; }
}
@media (orientation: landscape) {
  .navbar button { flex-direction: column; gap: 1px; padding: 4px 2px; font-size: clamp(11px, 1.7vw, 17px); }
  .navbar button svg { font-size: clamp(17px, 2.6vw, 26px); }
}
@media (orientation: portrait) { .btn-play .big { font-size: clamp(34px, 12vw, 60px); } }
#ping-lbl { white-space: nowrap; }
.btn-play .big { max-width: 100%; overflow-x: clip; overflow-y: visible; line-height: normal; white-space: nowrap; }
.privacy-link { align-self: center; color: var(--olive); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 4px 8px; }

/* ---------- agy round 1 fixes ---------- */
.logo span { white-space: nowrap; overflow-x: clip; overflow-y: visible; line-height: 1.02; padding-top: .06em; }
.stat-row > i { flex: none; margin: 0 10px; }
.stat-row > div > span, .stat-row > button > span { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stat-row > div, .stat-row > button { min-width: 0; }
/* result: actions never squashed or pushed off-screen */
#result { overflow: hidden; }
.res-body { min-height: 0; }
.res-col { min-height: 0; }
#btn-double, .res-actions, .res-actions > button, #res-next, .rewards, .stat-row.three, .sec-title { flex-shrink: 0; }
#btn-double { min-height: 40px; }
#res-next { text-align: center; }
@media (orientation: portrait) {
  .res-head h2 { font-size: clamp(36px, min(12vw, 7vh), 76px); }
  .medal { width: min(50vw, 300px, 22vh); }
  .rank-plaque { font-size: clamp(22px, 3.8vh, 34px); margin-top: -20px; }
  .rw { padding: 5px 4px; } .rw img { width: min(48px, 5vh); height: min(48px, 5vh); } .rw svg.xp { font-size: min(46px, 5vh); }
  .shop-rows { min-height: 0; overflow-y: auto; flex-shrink: 1; }
  .btn-gold { min-height: min(66px, 7.4vh); }
  .res-actions .btn-gold, .res-actions .btn-olive { font-size: clamp(22px, 3.8vh, 34px); }
}
@media (orientation: landscape) {
  .res-col:last-child { justify-content: flex-start; overflow: hidden; }
  .res-col:last-child .shop-rows { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
  .stat-row.three { padding: 0 8px; }
  .rewards { gap: 6px; } .rewards .rw { flex-direction: row; gap: 6px; padding: 2px 4px; }
  .rw img { width: 26px; height: 26px; } .rw svg.xp { font-size: 24px; } .rw b { font-size: 14px; padding: 0 6px; }
  #btn-double { min-height: 36px; }
  .res-actions .btn-gold, .res-actions .btn-olive { min-height: 44px; font-size: clamp(18px, 5vh, 28px); padding: 4px 10px; }
}
@media (orientation: landscape) and (max-height: 360px) {
  .res-col:last-child .shop-rows .shop-row:nth-child(n+2) { display: none; }
  .res-top { height: 34px; } .res-head .res-sub, .res-why { display: none; }
}

/* theme packs + real-money rows */
.skin-card { position: relative; }
.theme-tag { display: inline-block; font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: 1px; padding: 0 6px; border: 1.5px solid var(--olive); color: var(--paper); line-height: 1.5; }
.skin-card .theme-tag { position: absolute; top: 4px; left: 4px; z-index: 1; }
.t-antique { background: #8a5a2b; } .t-fastfood { background: var(--red); } .t-electro { background: var(--olive); }
.shop-row .nm .theme-tag { font-size: 14px; }
.pack-ic { display: flex; width: 100%; height: 100%; } .pack-ic img { width: 50%; object-fit: contain; }
.price.cash { background: var(--red); color: var(--paper); box-shadow: 0 3px 0 #7d2016; }
img.pv-wait { opacity: .35; filter: grayscale(1); }
.tabs.three button { font-size: 15px; padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#res-title { white-space: nowrap; }
.res-actions > button { white-space: nowrap; min-width: 0; overflow: hidden; }
#result .sec-title .wallet { position: static; order: 3; }
@media (orientation: portrait) {
  .res-head h2 { font-size: clamp(36px, min(12vw, 6.4vh), 76px); }
  .medal { width: min(50vw, 300px, 20vh); }
  .rewards .rw { flex-direction: row; gap: 8px; padding: 6px 4px; }
  .rw img { width: 30px; height: 30px; } .rw svg.xp { font-size: 30px; } .rw b { font-size: 17px; padding: 0 6px; }
  .res-actions .btn-gold, .res-actions .btn-olive { font-size: clamp(20px, 3.3vh, 32px); min-height: min(62px, 7vh); }
}
@media (orientation: landscape) and (max-height: 440px) {
  #result .res-col:last-child .shop-rows .shop-row:nth-child(n+2) { display: none; }
}
.res-col:first-child { flex-shrink: 0; }
.rw b { white-space: nowrap; }
@media (orientation: portrait) and (max-height: 900px) {
  #result .shop-rows .shop-row:nth-child(n+2) { display: none; }
}

@media (orientation: landscape) and (max-height: 360px) {
  .stat-row.three > div > span { display: none; }
  #btn-double { white-space: nowrap; font-size: 13px; min-height: 34px; } #btn-double span { overflow: hidden; text-overflow: ellipsis; }
  .rewards .rw b { font-size: 12px; padding: 0 4px; } .rewards .rw svg.xp, .rewards .rw img { width: 20px; height: 20px; font-size: 20px; }
  .res-actions .btn-gold, .res-actions .btn-olive { min-height: 38px; font-size: 18px; }
  #res-next { font-size: 11px; }
  .res-col:last-child { gap: 4px; }
}
@media (orientation: landscape) { .btn-play { padding-top: 0; padding-bottom: 2px; } .btn-play .small { padding-top: 0; margin-top: 0; } }
@media (orientation: landscape) and (max-height: 460px) { .btn-play .big { font-size: 34px; } }

.shop-row:has(.pack-ic) { grid-template-columns: 84px 1fr auto; } .shop-row .ic:has(.pack-ic) { width: 84px; height: 62px; }
.pack-ic img { width: 58%; } .pack-ic img + img { margin-left: -16%; }
.stat-row > div > span, .stat-row > button > span { font-size: clamp(12px, 4.2vw, 20px); }
@media (orientation: landscape) and (max-height: 360px) {
  #result .sec-title:has(#res-coins), #result #res-shop { display: none; }
  .stat-row.three b { font-size: 18px; } .stat-row.three svg { font-size: 16px; } .stat-row.three > div { gap: 3px; }
  #res-next { white-space: nowrap; }
  .rewards .rw b { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
