/* mods/packed/public/style.css — Packed!. Menyu — oddiy sahifa (kit.css ranglari); o'yin — butun ekran sahna, ustida ingichka HUD (ball + sog'liq chizig'i),
   telefonda pastda boshqaruv: chapda joystik, o'ngda bosh barmoq yoyi — Musht (eng katta, burchakda), Tepki, Ushlash, Himoya, Sakrash. Kompyuterda — klaviatura
   (birinchi o'yinlarda pastda ixcham tugmalar qatori). Jang: kombo hisobi (chapda), nokaut lentasi (o'ngda yuqorida), bir martalik maslahatlar. */
:root, :root[data-theme="dark"] { --glass: rgba(19,22,30,.74); --glass2: rgba(27,31,42,.9); --ov: rgba(6,8,12,.6); --pad-ring: rgba(255,255,255,.28); --pad-bg: rgba(10,12,18,.22); }
:root[data-theme="light"] { --glass: rgba(255,255,255,.8); --glass2: rgba(255,255,255,.94); --ov: rgba(20,26,38,.36); --pad-ring: rgba(20,26,38,.22); --pad-bg: rgba(255,255,255,.28); }

/* ================= menyu ================= */
.pk-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)); }
.pk-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: 320px; 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: 34px 16px 13px; background: linear-gradient(to top, var(--bg) 10%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent); pointer-events: none; z-index: 2; }
.hero.nogl canvas { display: none; }
.hero-copy h2 { font-size: 23px; letter-spacing: -.02em; }
.hero-copy p { margin: 3px 0 0; color: var(--mut); font-size: 13.5px; max-width: 480px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
/* telefon yotiq: menyu ikki ustun — chapda jonli avtobus, o'ngda tugmalar; «Yakka o'yin» birinchi ekranda (pastga surmasdan) */
@media (orientation: landscape) and (max-height: 500px) {
  #menu:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: 12px; align-items: start; max-width: 1040px; padding-top: 10px; }
  #menu .hero { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; aspect-ratio: auto; max-height: none; min-height: 236px; }
  #menu .cards { grid-column: 2; grid-row: 1; margin-top: 0; gap: 7px; }
  #menu .best { grid-column: 2; grid-row: 2; }
  #menu #sponsors { grid-column: 1 / -1; }
  /* ochiq avtobuslar o'ng ustunda (tugmalar orasida): rasm cho'zilmaydi, aylantirganda chapda turadi */
  #menu.has-open .hero { align-self: start; position: sticky; top: calc(62px + env(safe-area-inset-top)); }
  #menu .mc { min-height: 56px; padding: 8px 11px; }
  #menu .mc.primary { min-height: 62px; }
  #menu .mc.opt { min-height: 54px; }
  #menu .mc .ci { width: 36px; height: 36px; }
  #menu .mc small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
}
/* kichik yotiq telefon (iPhone SE va h.k.): tugmalarga ko'proq joy, rasm ostidagi uzun matn yashiriladi */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px) {
  #menu:not([hidden]) { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 10px; }
  #menu .hero-copy p { display: none; }
  #menu .hero-copy { padding-bottom: 10px; }
  #menu .mc { gap: 9px; padding: 7px 10px; }
  #menu .mc .ci { width: 32px; height: 32px; border-radius: 10px; }
  #menu .mc .ci svg { width: 18px; height: 18px; }
  #menu .mc b { font-size: 14.5px; }
  #menu .mc small { font-size: 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); color: var(--fg); 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; }
.mc small { color: var(--mut); font-size: 12.5px; line-height: 1.3; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.mc.primary { background: var(--acc); border-color: transparent; color: var(--acc-ink); min-height: 72px; }
.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); }
/* tor telefon (≤400 px): yarim kartalarda belgi tepada, matn butun kenglikda — ru 320 px da «поделит…», «интерне…» bo‘lib qirqilardi */
@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; }
}
/* botlar sozlamasi — karta emas, qator: o'ngda «bor / yo'q» */
.mc.opt { cursor: default; min-height: 60px; }
.mc.opt:hover { background: var(--sur); border-color: var(--line); }
.mc.opt:active { transform: none; }
.mc.opt > span { flex: 1; }
.mc.opt .gu-seg { flex: none; }
.mc.opt .gu-seg button { min-width: 52px; }
.best { margin: 12px 2px 0; color: var(--mut); font-size: 13.5px; text-align: center; }
.best b { color: var(--fg); font-variant-numeric: tabular-nums; }
#sponsors { margin-top: 18px; }

/* ================= o'yin ================= */
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; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#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 .score { margin-right: auto; } /* o'ng guruh (marshrut, tugmalar) o'ngga suriladi */
.hb { display: inline-flex; align-items: center; justify-content: center; 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; }
.score { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); flex: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-variant-numeric: tabular-nums; }
.score i { display: inline-flex; color: var(--amber); }
.score i svg { width: 17px; height: 17px; }
.score b { font-size: 17px; font-weight: 820; min-width: 1.2em; }
.score small { color: var(--mut); font-size: 12.5px; font-weight: 700; }
.score.bump b { animation: bump .32s cubic-bezier(.2,1.6,.4,1); }
@keyframes bump { 40% { transform: scale(1.3); color: var(--acc-text); } }
/* mening sog'ligim — ball yorlig'i ostida: tekkanda tez kamayadi, och «iz» sekin ergashadi; 50 % / 25 % dan past — sariq / qizil (miltillaydi) */
.score { position: relative; }
#hud .score { padding-bottom: 7px; }
.hp { position: absolute; left: 9px; right: 9px; bottom: 5px; height: 4px; border-radius: 3px; overflow: hidden; pointer-events: none; background: color-mix(in srgb, var(--fg) 15%, transparent); }
.hp > span { position: absolute; inset: 0; border-radius: inherit; transform-origin: left center; }
.hp .hpd { background: color-mix(in srgb, var(--fg) 58%, transparent); transition: transform .6s ease .35s; }
.hp .hpf { background: #19d3c5; transition: transform .18s ease-out, background-color .25s; }
.hp[data-lv="mid"] .hpf { background: #f0b43f; }
.hp[data-lv="lo"] .hpf { background: #ee6a58; animation: hpLo .9s ease-in-out infinite; }
@keyframes hpLo { 50% { opacity: .45; } }
/* Windows yuqori kontrast (forced colors, 3 Dec 2026): sog'liq chizig'i va marshrut (bekatlar, avtobus) o'z rangida qoladi — aks holda fonlar
   olib tashlanib, qancha sog'liq qolgani va qaysi bekatgacha yetilgani ko'rinmasdi */
.hp, .route { forced-color-adjust: none; }
.score.hurt { animation: hurt .42s ease-out; }
@keyframes hurt { 0% { border-color: #ee6a58; box-shadow: 0 0 0 3px rgba(238,106,88,.4); } 30% { transform: translateX(-2px); } 60% { transform: translateX(2px); } }
/* marshrut: bekatlar nuqtalari va avtobus belgisi */
.route { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); flex: 0 1 auto; min-width: 0;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.route .trk { position: relative; display: flex; align-items: center; justify-content: space-between; width: clamp(60px, 19vw, 170px); min-width: 50px; height: 16px; }
.route .trk::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px; background: var(--line2); border-radius: 1px; }
.route .fill { position: absolute; left: 3px; top: 50%; height: 2px; margin-top: -1px; background: var(--acc); border-radius: 1px; transition: width .4s; }
.route .d { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sur3); border: 1.5px solid var(--glass2); }
.route .d.on { background: var(--acc); }
.route .d.end { width: 10px; height: 10px; border-radius: 3px; }
.route .bus { position: absolute; top: -5px; width: 20px; height: 13px; margin-left: -10px; border-radius: 4px 5px 3px 3px; background: #e4573d; box-shadow: 0 1px 0 rgba(0,0,0,.25); transition: left .3s linear; }
.route .bus::after { content: ""; position: absolute; left: 3px; right: 5px; top: 3px; height: 4px; border-radius: 1.5px; background: rgba(255,255,255,.8); }

#banner { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 3; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 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; width: max-content; max-width: calc(100% - 32px);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#banner b { font-size: 18px; font-weight: 850; letter-spacing: -.01em; }
#banner span { font-size: 12.5px; color: var(--mut); font-weight: 650; }
#banner.warn { border-color: color-mix(in srgb, var(--red) 60%, transparent); }
#banner.warn b { color: var(--red); }
#banner.good b { color: var(--acc-text); }
#banner.in { animation: bIn .3s cubic-bezier(.2,1.3,.4,1) both; }
#banner.warn.in { animation: bIn .3s cubic-bezier(.2,1.3,.4,1) both, shake .45s .1s ease 2; }
#banner.out { animation: bOut .35s ease both; }
@keyframes bIn { from { opacity: 0; transform: translate(-50%, -10px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bOut { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes shake { 25% { transform: translate(calc(-50% - 4px), 0); } 75% { transform: translate(calc(-50% + 4px), 0); } }
#hint { position: absolute; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 2; margin: 0; padding: 6px 12px; border-radius: 11px; background: var(--glass); color: var(--fg);
  font-size: 13px; font-weight: 650; text-align: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#banner:not([hidden]) ~ #hint { opacity: 0; }
#game.desk #hint { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); }
#hint kbd { display: inline-block; min-width: 1.5em; padding: 0 4px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--line2); background: var(--sur2); font: 700 11.5px/1.5 system-ui, sans-serif; }

/* ---- sensorli boshqaruv */
#pad { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--padh, 214px) + env(safe-area-inset-bottom)); z-index: 5; pointer-events: none; }
#stickZone { position: absolute; left: 0; bottom: 0; top: 0; width: 46%; pointer-events: auto; touch-action: none; }
#stick { position: absolute; left: calc(max(22px, env(safe-area-inset-left)) + 6px); bottom: calc(26px + env(safe-area-inset-bottom)); width: 124px; height: 124px; margin: 0; border-radius: 50%;
  border: 2px solid var(--pad-ring); background: var(--pad-bg); transition: opacity .2s; opacity: .6; }
#stick::before, #stick::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 6px solid transparent; }
#stick::before { margin: -6px 0 0 -52px; border-right-color: var(--pad-ring); }
#stick::after { margin: -6px 0 0 40px; border-left-color: var(--pad-ring); }
#stick i { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 6px solid transparent; }
#stick i.au { margin: -52px 0 0 -6px; border-bottom-color: var(--pad-ring); }
#stick i.ad { margin: 40px 0 0 -6px; border-top-color: var(--pad-ring); }
#knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--glass2); border: 1px solid var(--line2); box-shadow: 0 4px 14px var(--shadow); }
#stick.act { opacity: 1; }
#stick.crouch #knob { background: color-mix(in srgb, var(--acc) 40%, var(--glass2)); }
.pb { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 60px; height: 60px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--glass); color: var(--fg); pointer-events: auto; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 18px var(--shadow); transition: transform .07s ease-out, background-color .12s, box-shadow .12s, opacity .2s; }
.pb i { display: inline-flex; }
.pb i svg { width: 23px; height: 23px; }
.pb span { font-size: 9.5px; font-weight: 780; letter-spacing: .01em; line-height: 1.1; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* zarba tugmalari (Musht, Tepki): kattaroq, aksent halqa */
.pb.atk { border: 2px solid color-mix(in srgb, var(--acc) 55%, var(--line2)); background: color-mix(in srgb, var(--acc) 12%, var(--glass)); }
.pb.atk i svg { width: 28px; height: 28px; }
.pb.atk span { font-size: 10.5px; }
.pb.big i svg { width: 34px; height: 34px; }
.pb.big span { font-size: 11.5px; font-weight: 820; }
/* bosilgan: kichrayadi va yorishadi; tekkan zarba — halqa to'lqini; ushlab turilgan (qisqa bosish) — yonib turadi */
.pb.on, .pb:active { transform: scale(.92); background: color-mix(in srgb, var(--acc) 34%, var(--glass2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 26%, transparent), 0 3px 10px var(--shadow); }
.pb.lat { background: color-mix(in srgb, var(--acc) 34%, var(--glass2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 30%, transparent), 0 6px 18px var(--shadow); }
.pb.hit { animation: pbHit .3s ease-out; }
@keyframes pbHit { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 75%, transparent), 0 6px 18px var(--shadow); } to { box-shadow: 0 0 0 16px transparent, 0 6px 18px var(--shadow); } }
.pb.hl { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 35%, transparent), 0 6px 18px var(--shadow); }
.pb.hl span { color: var(--acc-text); }
.pb.dim { opacity: .42; }
#pad.ko .pb { opacity: .5; }
/* o'ng bosh barmoq yoyi: Musht — burchakda, Tepki — chapida, Sakrash — tepasida, Ushlash va Himoya — ikkinchi qatorda (joystik zonasidan tashqarida) */
#bPunch { width: 84px; height: 84px; right: max(16px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); }
#bKick { width: 72px; height: 72px; right: calc(max(16px, env(safe-area-inset-right)) + 102px); bottom: calc(12px + env(safe-area-inset-bottom)); }
#bJump { right: max(16px, env(safe-area-inset-right)); bottom: calc(138px + env(safe-area-inset-bottom)); }
#bGrab { right: calc(max(16px, env(safe-area-inset-right)) + 68px); bottom: calc(120px + env(safe-area-inset-bottom)); }
#bCrouch { right: calc(max(16px, env(safe-area-inset-right)) + 134px); bottom: calc(96px + env(safe-area-inset-bottom)); }
.pk-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
/* tor telefon (< 390 px): biroz kichikroq, joystik zonasiga tegmaydi */
@media (max-width: 389px) {
  #game { --padh: 200px; }
  #stick { width: 116px; height: 116px; }
  .pb { width: 56px; height: 56px; }
  #bPunch { width: 76px; height: 76px; }
  #bKick { width: 64px; height: 64px; right: calc(max(16px, env(safe-area-inset-right)) + 92px); bottom: calc(14px + env(safe-area-inset-bottom)); }
  #bJump { bottom: calc(128px + env(safe-area-inset-bottom)); }
  #bGrab { right: calc(max(16px, env(safe-area-inset-right)) + 62px); bottom: calc(110px + env(safe-area-inset-bottom)); }
  #bCrouch { width: 54px; height: 54px; right: calc(max(16px, env(safe-area-inset-right)) + 123px); bottom: calc(87px + env(safe-area-inset-bottom)); }
}
/* telefon yotiq: pastroq yoy */
@media (orientation: landscape) and (max-height: 500px) {
  #game { --padh: 176px; }
  #stick { width: 112px; height: 112px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .pb { width: 56px; height: 56px; }
  #bPunch { width: 78px; height: 78px; bottom: calc(17px + env(safe-area-inset-bottom)); }
  #bKick { width: 66px; height: 66px; right: calc(max(16px, env(safe-area-inset-right)) + 101px); bottom: calc(11px + env(safe-area-inset-bottom)); }
  #bJump { bottom: calc(116px + env(safe-area-inset-bottom)); }
  #bGrab { right: calc(max(16px, env(safe-area-inset-right)) + 68px); bottom: calc(104px + env(safe-area-inset-bottom)); }
  #bCrouch { width: 54px; height: 54px; right: calc(max(16px, env(safe-area-inset-right)) + 153px); bottom: calc(77px + env(safe-area-inset-bottom)); }
}

/* ---- jang: kombo (chapda), nokaut lentasi (o'ngda yuqorida), bir martalik maslahat, kompyuterda tugmalar qatori */
#combo { position: absolute; left: max(12px, env(safe-area-inset-left)); top: calc(128px + env(safe-area-inset-top)); z-index: 3; display: flex; align-items: baseline; gap: 6px;
  padding: 6px 13px 7px 11px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 10px 26px var(--shadow); pointer-events: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transform-origin: left center; }
#combo b { font-size: 28px; font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--acc-text); font-variant-numeric: tabular-nums; }
#combo span { font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
#combo.pop { animation: cPop .3s cubic-bezier(.2,1.6,.4,1); }
#combo.out { animation: cOut .28s ease both; }
@keyframes cPop { from { transform: scale(1.3) rotate(-3deg); } to { transform: none; } }
@keyframes cOut { to { opacity: 0; transform: translateX(-10px) scale(.94); } }
#game.desk #combo { left: 20px; top: calc(84px + env(safe-area-inset-top)); }
#feed { position: absolute; right: max(8px, env(safe-area-inset-right)); top: calc(62px + env(safe-area-inset-top)); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  max-width: min(64vw, 340px); pointer-events: none; transition: top .2s ease; }
#feed .fd { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px 5px 7px; border-radius: 11px; background: var(--glass); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; line-height: 1.25;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fdIn .25s cubic-bezier(.2,1.2,.4,1) both; }
#feed .fd i { display: inline-flex; flex: none; color: var(--mut); }
#feed .fd i svg { width: 14px; height: 14px; }
#feed .fd span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#feed .fd b { font-weight: 800; }
#feed .fd b.me { color: var(--acc-text); }
#feed .fd.mine { border-color: color-mix(in srgb, var(--acc) 50%, var(--line)); }
#feed .fd.mine i { color: var(--acc-text); }
#feed .fd.out { animation: fdOut .4s ease both; }
@keyframes fdIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes fdOut { to { opacity: 0; transform: translateX(8px); } }
/* telefonda maslahat / e'lon tepada markazda — lenta ulardan pastga tushadi. E'lon (#banner) ko'rinsa, lenta doim uning ostida:
   --bnB — e'lonning pastki cheti (app.js banner() o'lchaydi; matn ikki qatorga o'tsa ham to'g'ri). Bu qoida maslahat qoidasidan kuchliroq (4 ta id) */
#game:not(.desk) #hint:not([hidden]) ~ #feed { top: calc(98px + env(safe-area-inset-top)); }
#game #banner:not([hidden]) ~ #hint ~ #feed { top: calc(var(--bnB, calc(122px + env(safe-area-inset-top))) + 8px); }
#tip { position: absolute; left: 50%; bottom: calc(var(--padh, 214px) + 12px + env(safe-area-inset-bottom)); z-index: 3; display: flex; align-items: center; gap: 9px; margin: 0; padding: 7px 14px 7px 8px;
  border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 10px 28px var(--shadow); width: max-content; max-width: min(calc(100% - 28px), 420px);
  font-size: 13px; font-weight: 650; line-height: 1.3; pointer-events: none; transform: translateX(-50%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: tipIn .3s cubic-bezier(.2,1.3,.4,1) both; }
#tip i { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc-text); }
#tip i svg { width: 18px; height: 18px; }
#tip.out { animation: tipOut .3s ease both; }
@keyframes tipIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes tipOut { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 6px); } }
#game.desk #tip { bottom: calc(60px + env(safe-area-inset-bottom)); transition: bottom .3s ease; }
#game.desk #hint { transition: bottom .3s ease; }
#game.desk #keys:not([hidden]) ~ #tip { bottom: calc(104px + env(safe-area-inset-bottom)); }
@media (orientation: landscape) and (max-height: 500px) { #game:not(.desk) #tip { bottom: calc(14px + env(safe-area-inset-bottom)); max-width: min(40vw, 330px); } }
#keys { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; padding: 7px 14px;
  border-radius: 13px; background: var(--glass); border: 1px solid var(--line); color: var(--mut); font-size: 12.5px; font-weight: 650; width: max-content; max-width: calc(100% - 32px);
  pointer-events: none; transform: translateX(-50%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .4s ease; }
#keys span { white-space: nowrap; }
#keys kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; margin-right: 2px; border-radius: 5px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--sur2); color: var(--fg);
  font: 750 11.5px/1.5 system-ui, sans-serif; text-align: center; }
#keys.out { opacity: 0; }
#game:not(.desk) #keys { display: none; }
#game.desk #keys:not([hidden]) ~ #hint { bottom: calc(58px + env(safe-area-inset-bottom)); }
/* kompyuterda chat paneli (320 px, o'ngda) o'yin ustida ochiq: pastki markaziy yozuvlar qolgan maydon o'rtasiga suriladi */
#game.desk.chatovl #keys, #game.desk.chatovl #tip, #game.desk.chatovl #hint { left: calc((100% - 344px) / 2); }
#game.desk.chatovl #keys { max-width: calc(100% - 368px); }
#game.desk.chatovl #tip { max-width: min(calc(100% - 372px), 420px); }

/* ---- natija oynasi */
.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(5px); backdrop-filter: blur(5px); overflow-y: auto; animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ov .card { width: min(400px, 100%); padding: 20px 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 2px; font-size: 21px; font-weight: 820; letter-spacing: -.02em; }
.ov .r-place { margin: 0 0 10px; color: var(--acc-text); font-weight: 750; font-size: 15px; }
.r-big { font-size: 56px; font-weight: 860; letter-spacing: -.04em; line-height: 1; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.r-big small { display: block; margin-top: 2px; font-size: 12.5px; letter-spacing: 0; font-weight: 650; color: var(--mut); }
.r-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 12px 0 12px; }
.r-stats div { padding: 7px 4px; border-radius: 11px; background: var(--sur2); }
.r-stats b { display: block; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-stats small { display: block; color: var(--mut); font-size: 11px; line-height: 1.2; }
.r-stats .ko b { color: var(--acc-text); }
@media (max-width: 400px) { .r-stats { gap: 4px; } .r-stats div { padding: 7px 2px; } .r-stats b { font-size: 14.5px; } .r-stats small { font-size: 10.5px; } }
.r-list { display: flex; flex-direction: column; gap: 3px; margin: 0 0 14px; text-align: left; }
.r-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px; border-radius: 9px; font-size: 14px; }
.r-row.me { background: color-mix(in srgb, var(--acc) 16%, transparent); font-weight: 720; }
.r-row .n { width: 1.4em; color: var(--mut); font-weight: 750; font-variant-numeric: tabular-nums; }
.r-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-row .bt { padding: 0 5px; border-radius: 5px; background: var(--sur3); color: var(--mut); font-size: 10px; font-weight: 800; }
.r-row .p { min-width: 2.2em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; } /* 2 va 3 xonali ballda «BOT» va K.O. ustuni bir chiziqda */
.r-row .k { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; width: 2.6em; flex: none; font-weight: 750; font-variant-numeric: tabular-nums; }
.r-row .k svg { width: 13px; height: 13px; flex: none; }
.r-row .k.z { color: var(--mut); opacity: .55; }
.ov .col { display: flex; flex-direction: column; gap: 8px; }
.ov .r-next { margin: 10px 0 0; color: var(--mut); font-size: 12.5px; }
.r-ad { margin-top: 12px; }
.r-ad:empty { display: none; }

/* yordam oynasi */
.help p { margin: 0 0 9px; line-height: 1.45; }
.help .keys { color: var(--mut); font-size: 13px; }
.help .ic { display: inline-flex; vertical-align: -4px; margin-right: 6px; color: var(--acc-text); }
.help .ic svg { width: 18px; height: 18px; }
.help h3 { margin: 14px 0 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }

/* ---- onlayn */
.hb.room { gap: 5px; padding: 0 11px 0 9px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hb.room b { min-width: .65em; }
.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; }
#net { position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 40px);
  padding: 16px 22px; border-radius: 18px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 14px 40px var(--shadow); text-align: center;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: fadeIn .2s ease both; }
#net b { font-size: 15px; font-weight: 750; }
#net .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
#net .gu-btn svg { width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* avtobus oynasi: kod, odamlar, botlar, ism */
.rm-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 14px; background: var(--sur2); }
.rm-code small, .rm-name small { color: var(--mut); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.rm-code b { font: 850 34px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .18em; padding-left: .18em; user-select: all; }
.rm-crowd { margin: 8px 0 12px; text-align: center; color: var(--mut); font-size: 13.5px; font-weight: 650; }
.rm-bots { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rm-l { display: inline-flex; align-items: center; gap: 8px; }
.rm-l svg { width: 19px; height: 19px; color: var(--acc-text); }
.rm-note { margin: 6px 0 0; color: var(--mut); font-size: 12.5px; line-height: 1.35; }
.rm-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.rm-name span { display: flex; flex-direction: column; min-width: 0; }
.rm-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-name .gu-btn { flex: none; min-height: 38px; padding: 0 12px; font-size: 13.5px; }
/* telefon (tik): HUD bir qatorga sig'adi (12 kishi, 3 xonali ball bilan ham) — ixcham oraliqlar, kichikroq bekat nuqtalari, ortig'ini marshrut chizig'i
   yutadi (qisqaradi); ≤389 px: o'rin «#3» (umumiy son avtobus oynasida); ≤340 px: marshrut chizig'i yashiriladi */
@media (max-width: 440px) {
  #hud { gap: 5px; padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  .hb { min-width: 38px; padding: 0 8px; }
  .hb.room { gap: 4px; padding: 0 9px 0 8px; }
  .score { gap: 5px; padding: 0 10px 0 8px; }
  .route { padding: 0 10px; }
  .route .d { width: 6px; height: 6px; }
  .route .d.end { width: 8px; height: 8px; }
}
@media (max-width: 389px) {
  .score small span { display: none; }
  /* xona + chat tugmasi bilan (va 3 xonali ballda) joy tor: chiziq 24 px gacha qisqaradi, nuqtalar ham kichrayadi — hech narsa chetdan chiqmaydi */
  .route { padding: 0 8px; }
  .route .trk { min-width: 24px; }
  .route .d { flex: 0 1 auto; min-width: 3px; height: auto; aspect-ratio: 1; }
  .route .bus { top: -4px; width: 16px; height: 11px; margin-left: -8px; }
}
/* xona oynasi: tor telefonda «Do'stlarni chaqirish» / «Onlayn o'yinchilar» ikki qatorga bo'linmaydi — har tugma to'liq kenglikda */
@media (max-width: 400px) { .gu-modal:has(.rm) .gu-acts2 > * { flex-basis: 100%; } }
@media (max-width: 340px) { #hud .route { display: none; } }

/* ================= ochiq avtobuslar (menyu) — kit .gu-live qatori: kutayotgani yashil (sherik kutyapti), yo'ldagisi — sariq nuqta.
   O'yin tugmalari («Do'stlar bilan» / «Yakka») va sozlamalar (botlar, qoidalar) orasida — kompyuterda ham birinchi ekranda ko'rinadi ================= */
.cards > .pk-open { grid-column: 1 / -1; margin: 8px 0 4px; }
.pk-open .gu-live-dot { background: var(--green); animation: pkLive 1.8s ease-out infinite; }
@keyframes pkLive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.pk-or { font: inherit; -webkit-tap-highlight-color: transparent; }
.pk-or-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--sur2); color: var(--acc-text); }
.pk-or-ic svg { width: 21px; height: 21px; }
.pk-or.lob .pk-or-ic { background: color-mix(in srgb, var(--green) 16%, var(--sur2)); color: var(--green); }
.pk-or-st { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--mut); font-size: 12.5px; font-weight: 650; }
.pk-or-st span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-or-st i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.pk-or.lob .pk-or-st { color: var(--green); }
.pk-or.lob .pk-or-st i { background: var(--green); animation: pkLive 1.8s ease-out infinite; }
.pk-or .gu-live-meta span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-or .gu-live-meta span:first-child { color: var(--fg); font-weight: 700; }
.pk-or .gu-live-meta svg { width: 14px; height: 14px; flex: none; }
.pk-or .gu-live-go { height: 44px; }
.pk-or.lob .gu-live-go { background: var(--acc); color: var(--acc-ink); }
@media (max-width: 400px) {
  .pk-or { gap: 10px; padding-left: 10px; }
  .pk-or-ic { width: 36px; height: 36px; border-radius: 11px; }
  .pk-or-ic svg { width: 19px; height: 19px; }
}

/* ================= kutish xonasi (do'stlar avtobusi bekatda): HUD ostida ixcham qator; marshrut, o'rin va bekat e'lonlari yo'q ================= */
#lobby { position: absolute; left: 50%; top: calc(58px + env(safe-area-inset-top)); z-index: 4; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  width: max-content; max-width: calc(100% - 16px); padding: 3px; border-radius: 15px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 8px 24px var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: lbIn .3s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes lbIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
#lobby button { -webkit-tap-highlight-color: transparent; }
.lb-info { display: inline-flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 0 10px 0 9px; border: 0; border-radius: 12px; background: transparent; color: var(--fg);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lb-info:hover, .lb-inv:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.lb-info svg { flex: none; width: 18px; height: 18px; color: var(--acc-text); }
.lb-info b { font-size: 15px; font-weight: 820; font-variant-numeric: tabular-nums; }
.lb-info span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); font-weight: 650; }
.lb-start { flex: none; padding: 0 16px; }
.lb-inv { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--acc-text); cursor: pointer; }
.lb-inv svg { width: 19px; height: 19px; }
#game.lobby #hRoute, #game.lobby #hRank { display: none; }
#game.lobby #banner { top: calc(118px + env(safe-area-inset-top)); }
#game.lobby:not(.desk) #hint, #game.lobby:not(.desk) #feed { top: calc(118px + env(safe-area-inset-top)); }
#game.lobby:not(.desk) #hint:not([hidden]) ~ #feed { top: calc(156px + env(safe-area-inset-top)); }
#game.lobby:not(.desk) #combo { top: calc(184px + env(safe-area-inset-top)); }
#game.desk.chatovl #lobby { left: calc((100% - 344px) / 2); max-width: calc(100% - 368px); }

/* kutish oynasi: kim bor (xona egasi birinchi), botlar (faqat xona egasi almashtiradi), «Yo'lga chiqish» yoki kutish, chaqirish */
.lb-top { display: flex; align-items: center; gap: 8px; margin: -8px -10px 0 0; }
.lb-top h2 { flex: 1; min-width: 0; margin: 0; }
.lb-x { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--mut); cursor: pointer; }
.lb-x:hover { background: var(--sur2); color: var(--fg); }
.lb-x svg { width: 20px; height: 20px; }
.gu-modal .lb-sub { margin: 0 0 16px; font-size: 13.5px; line-height: 1.4; }
.lb-head { display: flex; align-items: center; justify-content: space-between; color: var(--mut); font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.lb-head b { color: var(--fg); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lb-ps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 8px 0 16px; padding: 0; list-style: none; }
.lb-ps li { min-width: 0; }
.lb-p { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0 10px; border-radius: 11px; background: var(--sur2); color: var(--fg); font-size: 14px; font-weight: 650; }
button.lb-p { width: 100%; border: 0; font: inherit; font-size: 14px; font-weight: 650; text-align: left; cursor: pointer; }
.lb-p i { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--fg) 10%, transparent); }
.lb-p span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-p em { flex: none; display: inline-flex; align-items: center; gap: 3px; color: var(--mut); font-size: 11.5px; font-style: normal; font-weight: 700; }
.lb-p em.h { color: var(--amber); }
.lb-p em svg { width: 13px; height: 13px; }
.lb-p .ed { flex: none; width: 14px; height: 14px; color: var(--mut); }
.lb-p.me { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 60%, transparent); }
button.lb-p:hover { background: var(--sur3); }
.lb .gu-seg button:disabled { opacity: .6; cursor: default; }
.lb .rm-note { margin: 8px 0 0; }
.lb-acts { display: grid; gap: 8px; margin-top: 18px; }
.lb-go { min-height: 52px; font-size: 16px; }
.lb-go svg { width: 20px; height: 20px; }
.gu-modal .lb-wait { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin: 0; padding: 0 14px; border-radius: 12px; background: var(--sur2); color: var(--fg);
  font-size: 14px; font-weight: 700; text-align: center; }
.lb-wait span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-wait .spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
.lb-row { display: flex; gap: 8px; }
.lb-row .gu-btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
.lb-row .gu-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .lb-row { flex-direction: column; } }
/* past va keng ekran (telefon yotiq): oyna kengroq, ikki ustun — chapda kim bor, o'ngda botlar va tugmalar; «Boshlash»/«Chaqirish» aylantirmasdan ko'rinadi */
@media (max-height: 500px) and (min-width: 600px) {
  .gu-modal > .lb-box { width: min(700px, 100%); padding: 16px 20px; }
  .lb-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .gu-modal .lb-sub { margin-bottom: 10px; }
  .lb-ps { margin-bottom: 0; }
  .lb-acts { margin-top: 12px; }
  .lb-go, .gu-modal .lb-wait { min-height: 48px; }
}

/* Kit'dagi tanlangan segment tugmasi (oq fon + to'q yozuv: «Botlar — bor / yo'q») telefon/brauzerning tun rejimida qorayib, qaysi biri
   tanlangani ko'rinmay qolardi (3 Dec 2026). Bu yerda teskari ranglar + filter: invert(1): oddiy rejimda aynan o'sha ko'rinish, tun rejimi va
   yuqori kontrastda ham tanlangani oq «tabletka» bo'lib qoladi. */
.gu-seg button[aria-pressed="true"] { background: #110f0a; color: #f4f2ed; filter: invert(1); } /* = --fg #eef0f5 / --bg #0b0d12 */
:root[data-theme="light"] .gu-seg button[aria-pressed="true"] { background: #eeebe6; color: #0b0a07; } /* = #111419 / #f4f5f8 */
