[hidden] { display: none !important; }
:root {
  --bg: #f3f5f2; --panel: #ffffff; --fg: #1d2420; --muted: #66706a;
  --accent: #1f7a4d; --late: #d93a2b; --ad: #fff6dc;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111613; --panel: #1b221e; --fg: #e7ece9; --muted: #95a19a;
          --accent: #3fb07a; --ad: #2a2618; color-scheme: dark; }
}
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); display: flex; flex-direction: column;
       font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

header { background: var(--panel); padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
         display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 1000; }
header h1 { font-size: 17px; margin: 0; flex: 1 1 auto; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats b { color: var(--fg); }

button { font: inherit; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer;
         background: var(--bg); color: var(--fg); }
button.main { background: var(--accent); color: #fff; font-weight: 600; }
button.danger { background: var(--late); color: #fff; }

#hint { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 1000;
        background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; }

/* Reklama joyi: ekranning ~18% qismi */
#elon, #elonPreview, .e-card { min-height: max(18vh, 110px); flex: none; box-sizing: border-box; background: var(--ad);
      padding: 10px 14px; padding-bottom: max(8px, env(safe-area-inset-bottom));
      display: flex; flex-direction: column; justify-content: center; gap: 6px;
      border-top: 2px solid #f2c94c; color: var(--fg); position: relative; isolation: isolate; overflow: hidden; }
.e-row { display: flex; gap: 12px; align-items: center; min-height: 0; }
.e-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.e-small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.e-text b { font-size: 18px; line-height: 1.25; }
.e-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.e-foot span { font-size: 14px; color: var(--muted); min-width: 0; }
/* Fon rasmi: butun reklama joyini egallaydi, matn o'qilishi uchun qoraytiriladi */
.e-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.e-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.2)); }
.e-on-img b, .e-on-img .e-foot span { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.e-on-img .e-small { color: rgba(255,255,255,.8); }
/* Kichik tugma; ::after butun reklamani bosiladigan qiladi */
.e-btn { flex: none; background: #229ED9; color: #fff; text-decoration: none; font-weight: 700;
         font-size: 12px; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.e-btn::after { content: ""; position: absolute; inset: 0; }
/* Faqat rasm turi */
.e-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.e-label { position: absolute; top: 10px; left: 12px; background: rgba(0,0,0,.55); color: #fff;
           font-size: 10px; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; }
.e-chip { position: absolute; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); background: #229ED9; color: #fff;
          font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.e-cover { position: absolute; inset: 0; padding: 0; background: none; }
/* Video turi: 16:9, reklama balandligida */
.e-video { flex: none; height: max(14vh, 90px); width: calc(max(14vh, 90px) * 16 / 9); max-width: 50%; border: 0; border-radius: 10px;
           object-fit: cover; background: #000; }

/* Xarita belgilari */
.van { position: relative; width: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.van img { width: 40px !important; height: auto !important; display: block; }
.van .damas { position: absolute; top: -10px; right: -14px; font-size: 11px; padding: 1px 5px; }
.damas { background: var(--accent); color: #fff; border-radius: 14px; padding: 2px 7px;
         font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.damas.full { background: var(--late); }
.damas.stale { background: #9aa3a0; }
.van-phone { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px;
             background: var(--panel); color: var(--fg); font-size: 11px; font-weight: 700; white-space: nowrap;
             padding: 1px 6px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: copy; }
.toast { position: fixed; left: 50%; bottom: calc(24vh + env(safe-area-inset-bottom)); transform: translateX(-50%);
         z-index: 3000; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.van.me img { filter: drop-shadow(0 0 4px #1a4fd6) drop-shadow(0 0 4px #1a4fd6); }
.van.flip img { transform: scaleX(-1); }   /* orqaga qaytayotgan Damas */
.van.old img { opacity: .5; filter: grayscale(1); }
/* Pitak belgisi: yo'l belgisidek "213 PITAK" */
.pitak { position: relative; width: 52px; background: #1a4fd6; color: #fff; border: 3px solid #fff;
         border-radius: 10px; text-align: center; line-height: 1; padding: 4px 0 5px;
         box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.pitak b { display: block; font-size: 18px; font-weight: 800; }
.pitak small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .08em; margin-top: 2px; }
.pitak-count { position: absolute; top: -9px; right: -11px; min-width: 20px; height: 20px; border-radius: 10px;
               background: #f2c94c; color: #1d2420; font-size: 12px; font-weight: 800; line-height: 20px; }
.pax { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.pax.late { background: var(--late); border-radius: 50%; padding: 2px; }

/* O'rnatish oynasi */
.install { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.55);
           display: flex; align-items: flex-end; justify-content: center; }
.install-box { background: var(--panel); width: 100%; max-width: 480px; border-radius: 18px 18px 0 0;
               padding: 20px 16px; padding-bottom: max(20px, env(safe-area-inset-bottom));
               display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.install-box ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
#video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }

/* Haydovchi: yangi yo'lovchi signali */
.alert { position: fixed; left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 3000;
         background: var(--late); color: #fff; font-size: 22px; font-weight: 700; text-align: center;
         padding: 18px; border-radius: 14px; cursor: pointer; animation: blink .5s 12 alternate; }
@keyframes blink { to { background: #8f1d14; } }
.alert.ok { background: var(--accent); animation: none; }
@media (prefers-reduced-motion: reduce) { .alert { animation: none; } }
.sound-hint { background: var(--ad); text-align: center; padding: 8px; font-size: 13px; }
