/* mods/outpost/public/style.css — Outpost. Menyu va xona — oddiy sahifa (kit.css ranglari); o'yin — butun ekran xarita, ustida ingichka HUD,
   pastda bitta «Keyingi to'lqin» tugmasi, minora tanlash va kuchaytirish — pastdan chiqadigan varaq. Telefon yotiq bo'lsa — tugmalar o'ng ustunda. */
:root, :root[data-theme="dark"] {
  --p0: #19d3c5; --p1: #ffb020; --p2: #ff6fa8; --en: #f2b84b; --life: #ff5a6e;
  --t-gun: #aab4c6; --t-cannon: #5b8def; --t-frost: #7fd8f5; --t-laser: #b48cff; --t-missile: #3ddc84;
  --e-crawler: #ff8a4c; --e-runner: #ffc845; --e-brute: #e5484d; --e-drone: #ff6fa8; --e-swarm: #ffb067; --e-splitter: #f0763c; --e-mammoth: #d93a3a;
  --glass: rgba(19,22,30,.78); --glass2: rgba(27,31,42,.9); --ov: rgba(6,8,12,.62);
}
:root[data-theme="light"] {
  --p0: #0fb3a6; --p1: #d98a00; --p2: #e64b8a; --en: #c98a12; --life: #e23c52;
  --t-gun: #5d6b82; --t-cannon: #2f66d0; --t-frost: #1e9cd0; --t-laser: #7a4fe0; --t-missile: #1a9f58;
  --e-crawler: #f0702c; --e-runner: #e0a10f; --e-brute: #d63340; --e-drone: #e64b8a; --e-swarm: #f08a35; --e-splitter: #d9581e; --e-mammoth: #c42525;
  --glass: rgba(255,255,255,.84); --glass2: rgba(255,255,255,.94); --ov: rgba(20,26,38,.38);
}
.c-gun { color: var(--t-gun); } .c-cannon { color: var(--t-cannon); } .c-frost { color: var(--t-frost); } .c-laser { color: var(--t-laser); } .c-missile { color: var(--t-missile); }
.e-crawler { color: var(--e-crawler); } .e-runner { color: var(--e-runner); } .e-brute { color: var(--e-brute); } .e-drone { color: var(--e-drone); }
.e-swarm { color: var(--e-swarm); } .e-splitter { color: var(--e-splitter); } .e-mammoth { color: var(--e-mammoth); }
.p0 { --pc: var(--p0); } .p1 { --pc: var(--p1); } .p2 { --pc: var(--p2); }

/* ================= sahifalar (menyu, bosqichlar, xona) ================= */
.op-page { max-width: 760px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.op-page h2 { margin: 0; font-size: 18px; font-weight: 760; letter-spacing: -.015em; }

.hero { position: relative; border-radius: 18px; overflow: hidden; background: var(--sur); border: 1px solid var(--line); aspect-ratio: 15 / 8.2; max-height: 300px; width: 100%; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(to top, var(--bg) 8%, color-mix(in srgb, var(--bg) 72%, transparent) 55%, transparent); pointer-events: none; }
.hero-copy h2 { font-size: 22px; letter-spacing: -.02em; }
.hero-copy p { margin: 3px 0 0; color: var(--mut); font-size: 13.5px; max-width: 460px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.mc { display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--sur); text-align: left; cursor: pointer; transition: transform .08s ease, background .15s, border-color .15s; min-width: 0; }
.mc:hover { background: var(--sur2); border-color: var(--line2); }
.mc:active { transform: scale(.98); }
.mc.wide { grid-column: 1 / -1; }
.mc .ci { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sur2); color: var(--acc-text); flex: none; }
.mc .ci svg { width: 21px; height: 21px; }
.mc span { display: flex; flex-direction: column; min-width: 0; }
.mc b { font-size: 15.5px; font-weight: 740; line-height: 1.2; }
/* izoh ikki qatorgacha o'qiladi (telefonda «How long ca…» bo'lib qolardi), undan uzuni — «…» */
.mc small { color: var(--mut); font-size: 12.5px; line-height: 1.3; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.mc.primary { background: var(--acc); border-color: transparent; color: var(--acc-ink); min-height: 70px; }
.mc.primary:hover { filter: brightness(1.06); }
.mc.primary .ci { background: rgba(4,32,30,.14); color: var(--acc-ink); }
.mc.primary small { color: rgba(4,32,30,.72); }
#mDaily .ci { color: var(--amber); }
.mc.coop { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
/* tor telefon (≤400 px): yarim kartalarda belgi tepada, matn butun kenglikda — ru «Бесконечный», «С друзьями» 320 px da ekrandan chiqib ketardi */
@media (max-width: 400px) {
  .cards .mc:not(.wide) { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 12px; }
  .cards .mc:not(.wide) > span { align-self: stretch; }
  .cards .mc:not(.wide) .ci { width: 34px; height: 34px; border-radius: 10px; }
  .cards .mc:not(.wide) .ci svg { width: 19px; height: 19px; }
}

.top { margin-top: 22px; }
.top-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.top-h .gu-seg { flex: none; }
.top-note { margin: 0 0 6px; color: var(--mut); font-size: 12.5px; }
.top-note:empty { display: none; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
#sponsors { margin-top: 18px; }

/* bosqichlar */
.lv-h { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 12px; }
.lv-stars { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-weight: 650; font-variant-numeric: tabular-nums; }
.lv-stars .star svg { width: 17px; height: 17px; color: var(--amber); display: block; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lv { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--sur); cursor: pointer; aspect-ratio: 15 / 10.4; transition: transform .08s ease, border-color .15s; }
.lv:hover { border-color: var(--line2); }
.lv:active { transform: scale(.98); }
.lv canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lv-b { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 18px 10px 7px; background: linear-gradient(to top, var(--sur) 30%, transparent); }
.lv-b b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lv-s { display: inline-flex; gap: 1px; margin-left: auto; }
.lv-s i svg { width: 15px; height: 15px; display: block; color: var(--sur3); }
.lv-s i.on svg { color: var(--amber); }
.lv .lk { position: absolute; top: 8px; right: 8px; color: var(--mut); }
.lv .lk svg { width: 18px; height: 18px; display: block; }
.lv.locked canvas { opacity: .32; filter: grayscale(1); }
.lv.locked { cursor: default; }
.lv.locked .lv-s { visibility: hidden; }

/* xona */
.rm-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--sur); }
.rm-code { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rm-code small { color: var(--mut); font-size: 13px; }
.rm-code b { font-size: 34px; font-weight: 820; letter-spacing: .16em; font-variant-numeric: tabular-nums; color: var(--acc-text); line-height: 1; }
.rm-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rm-share .gu-btn { flex-direction: column; gap: 3px; padding: 8px 6px; min-height: 60px; font-size: 12.5px; font-weight: 650; line-height: 1.2; text-align: center; }
.rm-share .gu-btn svg { width: 20px; height: 20px; color: var(--acc-text); }
#rmInvite { border-color: color-mix(in srgb, var(--acc) 45%, var(--line2)); }
.rm-players { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pl { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--sur); }
.pl .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--pc, var(--sur3)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc, transparent) 22%, transparent); }
.pl b { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .crown { color: var(--amber); display: inline-flex; }
.pl .crown svg { width: 16px; height: 16px; }
.pl small { margin-left: auto; color: var(--mut); font-size: 12.5px; white-space: nowrap; }
.pl.off { opacity: .55; }
.pl.empty { border-style: dashed; background: transparent; color: var(--mut); }
.pl.empty .dot { background: transparent; border: 1.5px dashed var(--line2); box-shadow: none; }
.rm-map { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--sur); }
.rm-map-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rm-map-h small { color: var(--mut); font-size: 13px; }
.rm-map-h b { font-weight: 720; }
#rmCv { display: block; width: 100%; aspect-ratio: 15 / 9; border-radius: 10px; background: var(--sur2); }
.rm-pick { display: flex; gap: 6px; overflow-x: auto; padding: 10px 1px 2px; scrollbar-width: none; }
.rm-pick::-webkit-scrollbar { display: none; }
.mp { flex: none; display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 12px; background: var(--sur2); font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; }
.mp svg { width: 20px; height: 20px; }
.mp.on { background: var(--acc); border-color: transparent; color: var(--acc-ink); }
.rm-note { margin: 12px 2px 0; text-align: center; color: var(--mut); font-size: 13.5px; min-height: 1.4em; }
.rm-note:empty { display: none; }
/* «Boshlash» doim ko'rinsin: tugmalar bitta qatorda va ekran pastiga yopishadi (uzun ro'yxatda ham); «Chiqish» — chapda, ixcham */
.rm-acts { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; margin-top: 2px; padding: 10px 0 max(8px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 78%, transparent); }
.rm-acts .gu-btn { width: auto; }
#rmStart { flex: 1; }
#rmLeave { order: -1; flex: none; padding-inline: 18px; }
#rmStart[hidden] ~ #rmLeave { flex: 1; }
/* keng ekran: chapda kod va o'yinchilar, o'ngda xarita va tugmalar — hammasi birinchi ekranda */
@media (min-width: 880px), (orientation: landscape) and (min-width: 640px) {
  #room.op-page { max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 14px; align-items: start; }
  #room .rm-map { margin-top: 0; }
}
#rmStart { min-height: 52px; font-size: 16.5px; }

/* ================= o'yin ekrani ================= */
body[data-view="game"] { overflow: hidden; overscroll-behavior: none; }
body[data-view="game"] .gu-bar { display: none; }
#game { position: fixed; inset: 0; overflow: hidden; background: var(--bg); z-index: 1; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* HUD: bitta ingichka qator */
#hud { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 6px; height: calc(54px + env(safe-area-inset-top));
  padding: calc(env(safe-area-inset-top) + 7px) max(8px, env(safe-area-inset-right)) 7px max(8px, env(safe-area-inset-left)); pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud .sp { flex: 1; min-width: 0; pointer-events: none; }
.hb { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 40px; min-width: 40px; padding: 0 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); color: var(--fg); cursor: pointer; flex: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); position: relative; }
.hb::after { content: ""; position: absolute; inset: -3px; }
.hb:hover { background: var(--glass2); }
.hb:active { transform: scale(.95); }
.hb svg { width: 19px; height: 19px; flex: none; }
.sp-btn b { font-size: 12.5px; font-weight: 760; font-variant-numeric: tabular-nums; }
.sp-btn svg { width: 16px; height: 16px; }
/* ko'rsatkichlar bitta ixcham kapsulada (jon · energiya · to'lqin), seriya — burchakdagi nishoncha: telefonda ham hammasi bitta qatorga sig'adi */
.hstats { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); flex: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hs { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px 0 7px; border-radius: 9px; flex: none; font-variant-numeric: tabular-nums; }
.hs:not(.streak) + .hs:not(.streak)::before { content: ""; position: absolute; left: -.5px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.hs i { display: inline-grid; width: 17px; height: 17px; flex: none; }
.hs i svg { width: 17px; height: 17px; display: block; }
.hs b { font-size: 15px; font-weight: 780; letter-spacing: -.01em; line-height: 1; }
.hs.lives i { color: var(--acc-text); }
.hs.lives.low i, .hs.lives.low b { color: var(--life); }
.hs.energy i { color: var(--en); }
.hs.wave i { color: var(--mut); }
.hs.streak { position: absolute; top: -8px; right: -10px; height: 20px; gap: 2px; padding: 0 6px 0 4px; border-radius: 10px; color: var(--amber); pointer-events: auto;
  background: color-mix(in srgb, var(--amber) 16%, var(--bg)); border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); box-shadow: 0 2px 8px var(--shadow, rgba(0,0,0,.25)); }
.hs.streak i, .hs.streak i svg { width: 12px; height: 12px; }
.hs.streak b { font-size: 11.5px; font-weight: 800; }
.hs.streak.pop { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.hs.flash { animation: flash .55s ease; }
.hs.lives.flash { animation: flashR .55s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: color-mix(in srgb, var(--red) 34%, transparent); } }
@keyframes flashR { 0%, 100% { background: transparent; transform: none; } 25% { background: color-mix(in srgb, var(--red) 40%, transparent); transform: translateX(-2px); } 50% { transform: translateX(2px); } }
/* chat tugmasi (faqat hamkorlikda) — boshqa tugmalar bilan bir xil ko'rinish */
.hchat { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 12px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hchat:empty { display: none; }

/* jamoa qatori (hamkorlikda) */
#team { position: absolute; top: calc(54px + env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); z-index: 3; display: flex; gap: 5px; pointer-events: none; overflow: hidden; }
.tm { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px 0 8px; border-radius: 9px; background: var(--glass); border: 1px solid var(--line); min-width: 0; flex: 0 1 auto; font-size: 12.5px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tm i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex: none; }
.tm b { font-weight: 680; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 92px; }
.tm em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-weight: 700; color: var(--mut); font-variant-numeric: tabular-nums; }
.tm em svg { width: 12px; height: 12px; color: var(--en); }
.tm.me { border-color: color-mix(in srgb, var(--pc) 60%, transparent); }
.tm.off { opacity: .5; }

/* banner (to'lqin, seriya) va maslahat */
#banner { position: absolute; left: 50%; top: calc(66px + env(safe-area-inset-top)); z-index: 3; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 18px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow); pointer-events: none; text-align: center; max-width: calc(100% - 32px);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#game.has-team #banner { top: calc(96px + env(safe-area-inset-top)); }
#banner b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
#banner span { font-size: 12.5px; color: var(--mut); font-weight: 600; }
#banner.warn { border-color: color-mix(in srgb, var(--red) 55%, transparent); }
#banner.warn span { color: var(--red); }
#banner.good { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
#banner.good b { color: var(--amber); }
#banner.in { animation: bIn .32s cubic-bezier(.2,1.2,.4,1) both; }
#banner.out { animation: bOut .38s ease both; }
@keyframes bIn { from { opacity: 0; transform: translate(-50%, -10px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bOut { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -8px); } }
#hint { position: absolute; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; margin: 0; padding: 7px 13px; border-radius: 11px; background: var(--glass); color: var(--mut);
  font-size: 13px; font-weight: 600; text-align: center; pointer-events: none; max-width: calc(100% - 32px); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#game.sheet-open #hint { display: none; }
#netPill { position: absolute; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 6; padding: 6px 12px; border-radius: 10px; background: var(--amber); color: #201400; font-size: 12.5px; font-weight: 750; }
#dockBase { position: fixed; left: 0; right: 0; bottom: 0; height: calc(70px + env(safe-area-inset-bottom)); visibility: hidden; pointer-events: none; }

/* «Keyingi to'lqin» */
#gNext { position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; width: min(440px, calc(100% - 20px));
  min-height: 52px; padding: 6px 8px 6px 16px; border: 1px solid var(--line2); border-radius: 16px; background: var(--glass2); color: var(--fg); cursor: pointer; box-shadow: 0 8px 24px var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .08s ease; }
#gNext:active { transform: translateX(-50%) scale(.98); }
#gNext .nx-l { display: inline-flex; align-items: center; gap: 7px; flex: none; }
#gNext .nx-l svg { width: 16px; height: 16px; color: var(--acc-text); }
#gNext .nx-l b { font-size: 15px; font-weight: 760; white-space: nowrap; }
#gNext .nx-pre { display: flex; gap: 7px; flex: 1; min-width: 0; overflow: hidden; justify-content: flex-end; }
#gNext .nx-pre i { display: inline-flex; align-items: center; gap: 2px; font-style: normal; flex: none; }
#gNext .nx-pre .ei { width: 22px; height: 22px; display: block; }
#gNext .nx-pre em { font-style: normal; font-size: 12.5px; font-weight: 720; color: var(--mut); font-variant-numeric: tabular-nums; }
#gNext .nx-t { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 38px; padding: 0 10px; border-radius: 11px; background: var(--sur2); font-size: 13px; font-weight: 720; font-variant-numeric: tabular-nums; color: var(--mut); }
#gNext .nx-t .bn { font-style: normal; color: var(--en); }
#gNext.go { background: var(--acc); border-color: transparent; color: var(--acc-ink); animation: breathe 2.2s ease-in-out infinite; }
#gNext.go .nx-l svg { color: var(--acc-ink); }
#gNext.go .nx-pre em { color: rgba(4,32,30,.7); }
#gNext.go .nx-pre i { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
@keyframes breathe { 0%, 100% { box-shadow: 0 8px 24px var(--shadow), 0 0 0 0 var(--glow); } 50% { box-shadow: 0 8px 24px var(--shadow), 0 0 0 8px var(--glow); } }
#game.sheet-open #gNext { visibility: hidden; }

/* pastdan chiqadigan varaqlar: qurish va minora */
.sheet { position: absolute; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 5; width: min(560px, calc(100% - 16px)); transform: translateX(-50%); padding: 8px; border: 1px solid var(--line2);
  border-radius: 18px; background: var(--glass2); box-shadow: 0 14px 40px var(--shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: shUp .18s ease-out both; }
#game.sheet-top .sheet { bottom: auto; top: var(--sheet-top, calc(60px + env(safe-area-inset-top))); animation-name: shDn; }
@keyframes shUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes shDn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sh-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.tw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 82px; padding: 8px 2px 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--sur); cursor: pointer; min-width: 0; transition: transform .08s ease, opacity .15s; }
.tw:hover { border-color: var(--line2); background: var(--sur2); }
.tw:active { transform: scale(.95); }
.tw .ic { display: grid; place-items: center; width: 38px; height: 38px; }
.ic img.ti { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.28)); -webkit-user-drag: none; }
.tw .nm { font-size: 11.5px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tw .cost { display: inline-flex; align-items: center; gap: 1px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tw .cost svg { width: 12px; height: 12px; color: var(--en); }
.tw kbd { position: absolute; top: 4px; right: 5px; font: 700 10px/1 var(--font); color: var(--mut); opacity: .7; display: none; }
@media (hover: hover) and (pointer: fine) { .tw kbd { display: block; } }
.tw.poor { opacity: .5; }
.tw.poor .cost { color: var(--red); }
.tw.shake, .pb.shake { animation: shake .32s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
#trayInfo { position: absolute; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; margin: 0; padding: 6px 12px; border-radius: 10px; background: var(--glass2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 620; color: var(--fg); white-space: nowrap; pointer-events: none; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
#game.sheet-top #trayInfo { bottom: auto; top: calc(var(--sheet-top, 60px) + 104px); }

.p-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 8px 4px; }
.p-head .ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; }
.p-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.p-t b { font-size: 15.5px; font-weight: 760; line-height: 1.1; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 16px; height: 4px; border-radius: 2px; background: var(--sur3); }
.pips i.on { background: var(--acc); }
.p-own { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mut); white-space: nowrap; }
.p-own i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.p-st { display: flex; gap: 12px; margin-left: auto; }
.p-st span { display: flex; flex-direction: column; align-items: flex-end; }
.p-st small { font-size: 10.5px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.p-st b { font-size: 13.5px; font-weight: 760; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-st b i { font-style: normal; color: var(--acc-text); }
.p-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--mut); cursor: pointer; flex: none; position: relative; }
.p-x::after { content: ""; position: absolute; inset: -2px; }
.p-x:hover { background: var(--sur); color: var(--fg); }
.p-x svg { width: 19px; height: 19px; }
.p-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.pb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--sur); cursor: pointer; min-width: 0; }
.pb:hover { background: var(--sur2); }
.pb:active { transform: scale(.97); }
.pb small { font-size: 11.5px; color: var(--mut); font-weight: 650; white-space: nowrap; }
.pb b { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb b svg { width: 13px; height: 13px; }
.pb.up { background: var(--acc); border-color: transparent; color: var(--acc-ink); }
.pb.up small { color: rgba(4,32,30,.72); }
.pb.up.poor { background: var(--sur); border-color: var(--line); color: var(--fg); opacity: .6; }
.pb.up.poor small { color: var(--mut); }
.pb.up.poor b svg { color: var(--red); }
.pb.up.max { background: var(--sur); border-color: var(--line); color: var(--mut); cursor: default; }
.pb.up.max small { color: var(--mut); }
.pb.sell b { color: var(--en); }

/* oynalar: pauza, natija */
.ov { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--ov); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow-y: auto; animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ov .card { width: min(380px, 100%); padding: 22px 18px 18px; border-radius: 22px; background: var(--sur); border: 1px solid var(--line); box-shadow: 0 24px 60px var(--shadow); text-align: center; animation: cardIn .26s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.ov h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ov h2.won { color: var(--acc-text); }
.ov h2.lost { color: var(--red); }
.ov p { margin: 0 0 14px; color: var(--mut); font-size: 14px; }
.ov .col { display: flex; flex-direction: column; gap: 8px; }
.r-stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 10px; }
.r-stars i svg { width: 42px; height: 42px; display: block; color: var(--sur3); }
.r-stars i.on svg { color: var(--amber); animation: starIn .45s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d); }
@keyframes starIn { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.r-big { font-size: 64px; font-weight: 850; letter-spacing: -.04em; line-height: 1; margin: 6px 0 8px; color: var(--acc-text); font-variant-numeric: tabular-nums; }
.ov .r-sub { margin-bottom: 8px; }
.ov .r-rank { color: var(--acc-text); font-weight: 700; margin-bottom: 14px; min-height: 1.4em; }
.ov .r-rank:empty { min-height: 0; margin: 0 0 6px; }
.ov .r-team { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--fg); font-weight: 680; margin-bottom: 4px; }
.ov .r-team svg { width: 17px; height: 17px; color: var(--acc-text); flex: none; }
.ov .r-wait { margin: 2px 0 4px; font-size: 13.5px; }
.r-ad { margin-top: 12px; }
.r-ad:empty { display: none; }

/* yordam oynasi */
.help p { margin: 0 0 10px; }
.h-tw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.h-tw div { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--sur2); }
.h-tw .ic { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; }
.h-tw b { font-size: 13.5px; }
.h-tw small { font-size: 12px; color: var(--mut); line-height: 1.3; }
.help .keys { font-size: 12.5px; color: var(--mut); }

/* tor telefon */
/* telefon: tezlik tugmasida faqat «2×» yozuvi */
@media (max-width: 480px) { .sp-btn svg { display: none; } }
/* tik telefon: chat tugmasi tepa qatordan jamoa qatorining o'ng chetiga tushadi — Pauza ekrandan chiqib ketmaydi */
@media (max-width: 559px) and (orientation: portrait) {
  .hchat { position: absolute; top: 100%; right: max(8px, env(safe-area-inset-right)); }
  #team { height: 40px; align-items: center; right: calc(max(8px, env(safe-area-inset-right)) + 48px); }
}
@media (max-width: 380px) {
  .hs { padding: 0 6px 0 5px; gap: 4px; }
  .hs b { font-size: 14px; }
  #hud { gap: 4px; }
  .hb { min-width: 38px; padding: 0 7px; }
  #gNext .nx-pre { display: none; }
  .tw .nm { font-size: 10.5px; }
}
@media (max-width: 340px) { .hs.wave i { display: none; } .hs.wave { padding-left: 7px; } }

/* telefon yotiq: tugmalar o'ng ustunda, xarita chapda */
#game.side #gNext { left: auto; right: max(8px, env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); transform: none; width: 124px; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; min-height: 0; }
#game.side #gNext:active { transform: scale(.98); }
#game.side #gNext .nx-l { justify-content: center; }
#game.side #gNext .nx-l b { font-size: 13.5px; white-space: normal; text-align: center; line-height: 1.15; }
#game.side #gNext .nx-pre { justify-content: center; flex-wrap: wrap; row-gap: 2px; }
#game.side #gNext .nx-t { justify-content: center; height: 28px; }
#game.side .sheet, #game.side.sheet-top .sheet { left: auto; right: max(8px, env(safe-area-inset-right)); top: calc(52px + env(safe-area-inset-top)); bottom: calc(8px + env(safe-area-inset-bottom)); width: 128px; transform: none; overflow-y: auto; padding: 6px; animation-name: shSide; }
@keyframes shSide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
#game.side .sh-row { grid-template-columns: 1fr; gap: 4px; }
#game.side .tw { flex-direction: row; min-height: 46px; padding: 4px 8px 4px 5px; gap: 6px; justify-content: flex-start; }
#game.side .tw .ic { width: 34px; height: 34px; }
#game.side .tw .nm { display: none; }
#game.side .tw .cost { margin-left: auto; font-size: 14px; }
#game.side .p-head { flex-wrap: wrap; gap: 6px; padding: 2px 2px 6px; }
#game.side .p-head .ic { width: 38px; height: 38px; }
#game.side .p-t { flex: 1; }
#game.side .p-t b { font-size: 13.5px; }
#game.side .p-own { display: none; }
#game.side .p-st { margin: 0; width: 100%; justify-content: space-between; order: 3; }
#game.side .p-st { flex-direction: column; gap: 2px; } /* tor ustun: har ko'rsatkich alohida qatorda, raqam o'ngda */
#game.side .p-st span { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 6px; }
#game.side .p-st small { font-size: 9.5px; letter-spacing: .02em; }
#game.side .p-st b { font-size: 12.5px; }
#game.side .p-x { width: 34px; height: 34px; }
#game.side .p-acts { grid-auto-flow: row; }
#game.side .pb { min-height: 46px; }
#game.side #trayInfo { display: none; }
#game.side #hint { bottom: calc(10px + env(safe-area-inset-bottom)); left: calc(50% - 66px); }
#game.side #banner { left: calc(50% - 66px); }

/* telefon yotiq: menyuda rasm chapda, kartalar o'ngda — «O'ynash» birinchi ekranda ko'rinadi */
@media (orientation: landscape) and (max-height: 520px) {
  #menu.op-page { max-width: 980px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: 12px; align-items: start; padding-top: 10px; }
  #menu .hero { grid-column: 1; grid-row: 1; max-height: calc(100vh - 84px); }
  #menu .hero-copy { padding: 30px 12px 10px; }
  #menu .hero-copy h2 { font-size: 18px; }
  #menu .hero-copy p { display: none; }
  #menu .cards { grid-column: 2; grid-row: 1; margin-top: 0; }
  #menu .top, #menu #sponsors { grid-column: 1 / -1; }
  #menu .mc { min-height: 54px; padding: 8px 10px; }
  #menu .mc.primary { min-height: 58px; }
  #menu .mc .ci { width: 34px; height: 34px; }
  #levels.op-page, #room.op-page { padding-top: 10px; }
}
