/* Tezyoz — yangi ko'rinish (loyiha egasi, 19 Nov 2026: «rasmdagi dizayn»): to'q ko'k fon, ko'kdan binafshaga urg'u; chapda katta sarlavha,
   «poyga» kartasi (matn + ko'rinadigan yozish maydoni + taraqqiyot), pastda rejimlar; o'ngda natijalar, reyting va «O'yinni boshlash».
   Telefon birinchi: tugmalar ≥ 44 px, 360–430 px; 900 px dan torda bitta ustun (display: contents + order). Klaviatura ochilganda matn
   ko'rinib turishi uchun ekran oddiy sahifa (fixed emas). Rasmdagi uslub uchun shu sahifada kit ranglari qayta belgilangan. */
:root, :root[data-theme="dark"] {
  --bg: #070b1a; --sur: #0d1430; --sur2: #121a3a; --sur3: #1b2550; --line: rgba(128,146,255,.13); --line2: rgba(140,160,255,.26);
  --fg: #eef1ff; --mut: #8e9ac6; --acc: #4f74ff; --acc-ink: #ffffff; --acc-text: #86a4ff; --head: rgba(7,11,26,.84); --glow: rgba(79,116,255,.18); --shadow: rgba(0,0,0,.5);
  --g1: #3b82f6; --g2: #8b5cf6; --gp: linear-gradient(90deg, var(--g1), var(--g2));
  --ok: #4ade80; --okbg: rgba(74,222,128,.13); --okline: rgba(74,222,128,.42); --bad: #ff6b81; --badbg: rgba(255,107,129,.22); --cur: #4ade80;
  --rest: #c9d0ec; --lane: #121a3a; --card: linear-gradient(180deg, rgba(20,29,66,.92), rgba(12,18,44,.92)); --tile: #121a3c;
}
:root[data-theme="light"] {
  --bg: #f2f4fb; --sur: #ffffff; --sur2: #eef1fa; --sur3: #e0e6f6; --line: rgba(30,42,100,.1); --line2: rgba(30,42,100,.2);
  --fg: #10152e; --mut: #5b6590; --acc: #3d63f0; --acc-ink: #ffffff; --acc-text: #3557d6; --head: rgba(242,244,251,.88); --glow: rgba(61,99,240,.14); --shadow: rgba(30,40,90,.13);
  --g1: #2f6ff0; --g2: #7c4ff0;
  --ok: #16a34a; --okbg: rgba(22,163,74,.11); --okline: rgba(22,163,74,.45); --bad: #dc2f4b; --badbg: rgba(220,47,75,.14); --cur: #16a34a;
  --rest: #2e3656; --lane: #eef1fa; --card: #ffffff; --tile: #f3f5fc;
}
body { background: radial-gradient(900px 520px at 78% -8%, var(--glow), transparent 62%), radial-gradient(700px 420px at 0% 30%, rgba(139,92,246,.07), transparent 60%), var(--bg); background-attachment: fixed; color: var(--fg); }
.txt { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; }

/* ---------- yuqori panel (GU.bar + logo, shior, bo'limlar, avatar) */
.gu-bar { padding-left: max(10px, env(safe-area-inset-left), calc((100vw - 1240px) / 2)); padding-right: max(10px, env(safe-area-inset-right), calc((100vw - 1240px) / 2)); }
.tz-logo { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--gp); box-shadow: 0 6px 18px rgba(79,116,255,.35); }
.tz-logo svg { width: 19px; height: 19px; color: #fff; }
.gu-bar h1 { font-size: 19px; font-weight: 800; flex: none; }
.tz-tag { color: var(--mut); font-size: 13px; white-space: nowrap; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line2); }
.tz-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--sur) 70%, transparent); border: 1px solid var(--line); }
.tz-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--mut); font-weight: 650; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.tz-tabs button svg { width: 17px; height: 17px; }
.tz-tabs button:hover { color: var(--fg); }
.tz-tabs button[aria-current="page"] { color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--g1) 85%, transparent), color-mix(in srgb, var(--g2) 85%, transparent)); box-shadow: 0 4px 16px rgba(79,116,255,.28); }
.tz-ava { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--g2) 60%, transparent); padding: 0; margin-left: 4px; background: var(--gp); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; position: relative; }
.tz-ava::after { content: ""; position: absolute; inset: -4px; }
@media (max-width: 1080px) { .tz-tag { display: none; } }
@media (max-width: 760px) { .tz-tabs, .tz-sp2 { display: none !important; } .tz-logo { width: 28px; height: 28px; border-radius: 9px; } .tz-logo svg { width: 16px; height: 16px; } .tz-ava { width: 36px; height: 36px; font-size: 15px; } }

/* ---------- sahifa */
.tz { max-width: 1240px; margin: 0 auto; padding: 18px 16px 24px; }
.tz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.tz-main, .tz-side { display: grid; gap: 18px; min-width: 0; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 14px 40px var(--shadow); }
.link { border: 0; background: none; padding: 6px 2px; min-height: 36px; color: var(--acc-text); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 8px; min-height: 220px; }
.hero-h { margin: 0; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; font-weight: 850; letter-spacing: -.03em; }
.hero .g1, .hero .g2 { background: linear-gradient(90deg, #3b82f6, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .g2 { background-image: linear-gradient(90deg, #8b5cf6, #c084fc); }
.hero-sub { margin: 14px 0 0; color: var(--mut); font-size: 16px; max-width: 30em; }
.hero-art { width: 100%; height: auto; max-height: 250px; overflow: visible; }
@media (max-width: 1100px) and (min-width: 901px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); } }
@media (max-width: 600px) { .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; } .hero-art { display: none; } .hero-h { font-size: 30px; } .hero-sub { font-size: 14.5px; margin-top: 8px; } }

/* ---------- o'yin kartasi */
.game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; scroll-margin-top: 64px; }
.g-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.g-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gp); color: #fff; flex: none; }
.g-ic svg { width: 22px; height: 22px; }
.g-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--sur2); border: 1px solid var(--line); color: var(--mut); font-size: 13px; font-weight: 650; white-space: nowrap; }
.pill:empty { display: none; }
.ln-on, .ln-off { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); display: inline-block; flex: none; } .ln-off { background: var(--amber); box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 12px; background: var(--sur2); border: 1px solid var(--line); font-weight: 750; font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.chip small { color: var(--mut); font-weight: 650; font-size: 12px; }
.chip svg { width: 18px; height: 18px; color: var(--acc-text); }
.chip.low, .chip.low svg { color: var(--bad); }

.typer { position: relative; border-radius: 16px; background: color-mix(in srgb, var(--bg) 55%, var(--sur)); border: 1.5px solid var(--okline); padding: 16px 18px; min-height: 118px; cursor: text; }
:root[data-theme="light"] .typer { background: #f7f9ff; }
.typer.focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 16%, transparent); }
.txt { font-size: 20px; line-height: 1.75; font-weight: 500; color: var(--rest); overflow-wrap: anywhere; white-space: pre-wrap; user-select: none; -webkit-user-select: none; }
.txt .ok { color: var(--ok); }
.txt .bad { color: var(--bad); background: var(--badbg); border-radius: 3px; }
.txt .word { background: var(--okbg); color: var(--fg); border-radius: 6px; padding: 2px 0; box-shadow: 0 0 0 2px var(--okbg); }
.txt .cur { position: relative; }
.txt .cur::before { content: ""; position: absolute; left: -1px; top: .12em; bottom: .08em; width: 2px; border-radius: 1px; background: var(--cur); animation: blink 1s steps(1) infinite; }
.txt.idle .cur::before { animation: none; opacity: .5; }
.txt.wait { opacity: .45; }
@keyframes blink { 50% { opacity: 0; } }
.count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; pointer-events: none; border-radius: inherit; background: color-mix(in srgb, var(--bg) 45%, transparent); font: 850 64px var(--font); color: #fff; text-shadow: 0 4px 24px rgba(79,116,255,.7); }
:root[data-theme="light"] .count { color: var(--acc-text); text-shadow: none; }
.count small { display: block; font-size: 15px; font-weight: 700; color: var(--mut); text-align: center; text-shadow: none; }

.field { position: relative; display: flex; align-items: center; border-radius: 14px; padding: 1.5px; background: var(--gp); box-shadow: 0 6px 22px rgba(79,116,255,.16); }
.field::before { content: ""; position: absolute; inset: 1.5px; border-radius: 12.5px; background: color-mix(in srgb, var(--bg) 60%, var(--sur)); }
:root[data-theme="light"] .field::before { background: #fff; }
.inp { position: relative; flex: 1; min-width: 0; height: 54px; padding: 0 52px 0 18px; border: 0; outline: 0; background: transparent; color: var(--fg); caret-color: var(--g1); font: 500 18px ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.inp::placeholder { color: var(--mut); font-family: var(--font); font-size: 16px; opacity: .9; }
.field .kb { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; display: grid; }
.field .kb svg { width: 24px; height: 24px; }
.field.err { background: var(--bad); box-shadow: 0 6px 22px var(--badbg); } .field.err .inp { color: var(--bad); }
.field.off { opacity: .6; }
.field:focus-within { box-shadow: 0 6px 26px rgba(79,116,255,.34); }

.prog { display: flex; align-items: center; gap: 12px; }
.prog .flag { width: 22px; height: 22px; color: var(--acc-text); flex: none; }
.pbar { flex: 1; height: 10px; border-radius: 999px; background: var(--sur3); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #3b82f6 55%, #8b5cf6); transition: width .2s ease; }
.pw { color: var(--mut); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* poyga yo'laklari (ko'p kishi bo'lsa — ichida suriladi, o'zingiz doim tepada) */
.lanes { display: grid; gap: 6px; max-height: 236px; overflow: auto; overscroll-behavior: contain; padding-right: 2px; }
.lane { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr) 64px; align-items: center; gap: 8px; min-height: 34px; }
.lane .who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 700; }
.lane .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane .who small { color: var(--mut); font-weight: 600; flex: none; }
.lane.me .who { color: var(--acc-text); }
.lane.off .who { opacity: .5; }
.road { position: relative; height: 26px; border-radius: 9px; background: var(--lane); border: 1px solid var(--line); overflow: hidden; }
.road::after { content: ""; position: absolute; right: 6px; top: 4px; bottom: 4px; width: 6px; background: repeating-linear-gradient(0deg, var(--fg) 0 4px, transparent 4px 8px); opacity: .35; border-radius: 1px; }
.lane.me .road { border-color: color-mix(in srgb, var(--g1) 60%, transparent); }
.car { position: absolute; top: 2px; left: calc((100% - 46px) * var(--p, 0)); width: 34px; height: 20px; transition: left .3s linear; }
.lane.me .car { transition-duration: .12s; }
.car svg { width: 100%; height: 100%; display: block; }
.lane .sp { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.lane .sp small { display: block; color: var(--mut); font-weight: 600; font-size: 11px; }
.lane .pl { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--sur3); font-size: 12px; font-weight: 800; flex: none; }
.lane .pl.p1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #1b1b1b; }

/* do'st xonasi */
.roominfo { padding: 14px; border-radius: 16px; background: var(--sur2); border: 1px solid var(--line); display: grid; gap: 12px; }
.roominfo .ri-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roominfo .ri-code { margin-left: auto; font-size: 26px; font-weight: 850; letter-spacing: .16em; background: var(--gp); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roominfo p { margin: 0; color: var(--mut); font-size: 14px; }
.ri-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ri-acts .gu-btn { flex: 1 1 150px; min-height: 46px; white-space: nowrap; }
.ri-ppl { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow: auto; }
.ri-ppl span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--sur); border: 1px solid var(--line); font-size: 13px; font-weight: 650; max-width: 170px; }
.ri-ppl span i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--gp); }
.ri-ppl span b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-ppl span.host { border-color: color-mix(in srgb, var(--g2) 60%, transparent); }
.ri-ppl span.off { opacity: .5; }
.sk-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); animation: pulse 1.2s ease-in-out infinite; flex: none; display: inline-block; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

/* natija va tugmalar */
.result { padding: 16px; border-radius: 16px; background: var(--sur2); border: 1px solid color-mix(in srgb, var(--g1) 45%, var(--line)); display: grid; gap: 12px; }
.result h3 { margin: 0; font-size: 22px; text-align: center; }
.result .big { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.result .big div { text-align: center; } .result .big b { display: block; font-size: 34px; font-variant-numeric: tabular-nums; } .result .big small { color: var(--mut); }
.result .note { margin: 0; text-align: center; color: var(--mut); font-size: 14px; } .result .note.pb { color: var(--ok); font-weight: 700; } .result .note.err { color: var(--bad); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tools:empty { display: none; }
.tools .gu-btn { min-height: 46px; }
.weak { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .weak kbd { min-width: 30px; padding: 4px 8px; border-radius: 8px; background: var(--sur3); font: 700 15px ui-monospace, Menlo, monospace; text-align: center; }
.gu-table tr.me td { color: var(--acc-text); font-weight: 700; }
.gu-table td.n, .gu-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.gu-btn.primary { background: var(--gp); color: #fff; border-color: transparent; }

/* ---------- rejimlar */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mode { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--fg); text-align: left; cursor: pointer; box-shadow: 0 10px 28px var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.mode:hover { transform: translateY(-2px); border-color: var(--line2); }
.mode .mi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; }
.mode .mi svg { width: 22px; height: 22px; }
.mode .m1 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.mode .m2 { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.mode .m3 { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.mode .mt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mode .mt b { font-size: 15.5px; font-weight: 750; }
.mode .mt small { color: var(--mut); font-size: 13px; line-height: 1.35; }
.mode .mc { flex: none; color: var(--mut); display: grid; }
.mode .mc svg { width: 18px; height: 18px; }
.mode.pulse { animation: mpulse 1.2s ease 2; }
@keyframes mpulse { 50% { border-color: var(--g1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g1) 35%, transparent); } }

/* ---------- o'ng ustun */
.c-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.c-head h2 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; min-width: 0; }
.h-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.h-ic svg { width: 18px; height: 18px; }
.h-ic.st { background: color-mix(in srgb, var(--g1) 20%, transparent); color: var(--acc-text); }
.h-ic.gold { background: rgba(245,158,11,.16); color: #f5b03b; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { padding: 12px; border-radius: 14px; background: var(--tile); border: 1px solid var(--line); display: grid; grid-template-rows: 1fr auto; gap: 4px; min-width: 0; }
.tile .tl { display: flex; align-items: center; gap: 7px; color: var(--mut); font-size: 12.5px; font-weight: 650; min-width: 0; }
/* telefonda «Средняя скорость», «O‘rtacha tezlik» «…» bo'lib qolardi — ikki qatorga o'tadi, qiymatlar bir chiziqda pastda */
.tile .tl span { overflow: hidden; line-height: 1.2; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.tile .tl i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.tile .tl i svg { width: 14px; height: 14px; }
.tile b { font-size: 24px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b small { font-size: 13px; color: var(--mut); font-weight: 650; margin-left: 2px; }
.t1 i { background: rgba(59,130,246,.18); color: #60a5fa; } .t2 i { background: rgba(34,197,94,.16); color: #4ade80; }
.t3 i { background: rgba(245,158,11,.16); color: #f5b03b; } .t4 i { background: rgba(139,92,246,.18); color: #a78bfa; }
:root[data-theme="light"] .t1 i { color: #2563eb; } :root[data-theme="light"] .t2 i { color: #16a34a; } :root[data-theme="light"] .t3 i { color: #c27c0e; } :root[data-theme="light"] .t4 i { color: #7c3aed; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb li { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent; }
.lb li .n { font-weight: 800; color: var(--mut); text-align: center; font-variant-numeric: tabular-nums; }
.lb li .a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sur3); color: var(--mut); }
.lb li .a svg { width: 16px; height: 16px; }
.lb li.p1 .a { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3a2400; }
.lb li .nm { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb li .v { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb li .v small { color: var(--mut); font-weight: 600; font-size: 12px; margin-left: 3px; }
.lb li.me { background: linear-gradient(90deg, color-mix(in srgb, var(--g1) 22%, transparent), color-mix(in srgb, var(--g2) 16%, transparent)); border-color: color-mix(in srgb, var(--g1) 40%, transparent); }
.lb li.gap { min-height: 14px; padding: 0; display: flex; justify-content: center; color: var(--mut); line-height: 1; }
.lb .empty { color: var(--mut); font-size: 14px; padding: 10px 4px; display: block; min-height: 0; }
.start { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; border: 0; border-radius: 18px; background: var(--gp); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 14px 34px rgba(79,116,255,.38); transition: transform .15s ease, box-shadow .15s ease; }
.start:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(79,116,255,.48); }
.start:active { transform: none; }
.start svg { width: 22px; height: 22px; }
.tz-side .gu-sponsors { margin-top: 0; }

/* o'rganish va pastki qism */
.learn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 22px; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.guides { display: flex; flex-wrap: wrap; gap: 0 18px; }
.guides a { color: var(--acc-text); text-decoration: none; padding: 10px 0; font-size: 14px; }
.guides a:hover { text-decoration: underline; }

/* oynalar (sozlamalar, o'z matningiz, do'stlar, reyting, natijalar) */
.tz-form { display: grid; gap: 12px; }
.tz-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.tz-row:last-child { border-bottom: 0; }
.tz-row > span { font-weight: 650; }
.tz-seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--sur2); border: 1px solid var(--line); }
.tz-seg button { min-height: 38px; min-width: 52px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--mut); font-weight: 700; cursor: pointer; }
.tz-seg button[aria-pressed="true"] { background: var(--gp); color: #fff; }
.tz-area { width: 100%; min-height: 140px; resize: vertical; padding: 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--sur2); color: var(--fg); font: 15px/1.5 ui-monospace, Menlo, Consolas, monospace; user-select: text; -webkit-user-select: text; }
.tz-hint { margin: 0; color: var(--mut); font-size: 13px; }
.tz-code { display: flex; gap: 8px; }
.tz-code input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--sur2); color: var(--fg); font: 700 20px var(--font); letter-spacing: .18em; text-transform: uppercase; user-select: text; -webkit-user-select: text; }
.tz-or { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 13px; } .tz-or::before, .tz-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tz-tabs2 { display: flex; gap: 4px; margin-bottom: 10px; }
.tz-tabs2 button { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--mut); font-weight: 700; cursor: pointer; }
.tz-tabs2 button[aria-pressed="true"] { background: var(--sur2); color: var(--fg); border-color: var(--line2); }
.tz-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tz-big div { padding: 10px 12px; border-radius: 12px; background: var(--sur2); border: 1px solid var(--line); min-width: 0; }
.tz-big small { display: block; color: var(--mut); font-size: 12px; } .tz-big b { font-size: 20px; font-variant-numeric: tabular-nums; }
.lvl { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--gp); color: #fff; font-size: 12px; font-weight: 700; margin-left: 4px; vertical-align: 2px; }

/* ---------- holatlar: o'yin (poyga, kunlik, o'z matn) — sarlavha, rejimlar va «boshlash» yashiriladi */
body[data-view="play"]:not([data-mode="practice"]) .hero,
body[data-view="play"]:not([data-mode="practice"]) .modes,
body[data-view="play"]:not([data-mode="practice"]) .start { display: none; }
body[data-room="wait"] #typer, body[data-room="wait"] #field, body[data-room="wait"] .prog { display: none; }

/* ---------- telefon va planshet: bitta ustun */
@media (max-width: 900px) {
  .tz-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .tz-main, .tz-side { display: contents; }
  .hero { order: 1; } .game { order: 2; } .start { order: 3; } .modes { order: 4; } .stats { order: 5; } .board { order: 6; } .tz-side .gu-sponsors, .tz-side .gu-about-btn { order: 7; }
  .tz-side .gu-about-btn { align-self: center; }
  body[data-view="play"]:not([data-mode="practice"]) .stats, body[data-view="play"]:not([data-mode="practice"]) .board { display: none; }
  .modes { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mode { min-height: 68px; padding: 12px 14px; }
}
@media (max-width: 560px) {
  .tz { padding: 12px 12px 20px; }
  .card { padding: 14px; border-radius: 18px; }
  .game { gap: 12px; }
  .g-head { gap: 8px; } .g-head h2 { font-size: 17px; flex: 1; } .g-sp { display: none; } .g-ic { width: 34px; height: 34px; } .g-ic svg { width: 20px; height: 20px; }
  /* yozish paytida sarlavha bir qatorda: onlayn soni va belgi yashiriladi, tezlik va soat joyida qoladi */
  body[data-view="play"] .g-head { flex-wrap: nowrap; } body[data-view="play"] #liveNote, body[data-view="play"] .g-ic { display: none; }
  .chip { padding: 0 10px; font-size: 14px; }
  /* 360 px: bezak belgisi o'rniga rejim nomi to'liq sig'adi («Тренир…» bo'lib qolardi) */
  @media (max-width: 380px) { .g-ic { display: none; } }
  .chip { min-height: 32px; padding: 0 9px; font-size: 14px; }
  /* 320 px: «Тренировка» onlayn soni va soat yonida to'liq sig'adi */
  @media (max-width: 359px) { .g-head { gap: 6px; } .g-head h2 { font-size: 16px; } #liveNote { padding: 5px 9px; gap: 5px; } .chip { padding: 0 8px; gap: 5px; } }
  .typer { padding: 12px 14px; min-height: 104px; }
  .txt { font-size: 17.5px; line-height: 1.7; }
  .inp { height: 52px; font-size: 17px; padding-left: 14px; }
  .lane { grid-template-columns: minmax(0, 92px) minmax(0, 1fr) 52px; gap: 6px; min-height: 30px; }
  .road { height: 24px; } .car { width: 30px; height: 18px; }
  .tile b { font-size: 21px; }
  .start { min-height: 56px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .mode, .start, .pbar i, .car { transition: none; } .txt .cur::before { animation: none; } }

/* skrinshot rejimi (?shot=…) — muqovalar (tools/seo/shot-tezyoz.mjs): faqat o'yin kartasi */
.shot .gu-bar, .shot .gu-toast, .shot .hero, .shot .modes, .shot .tz-side, .shot .learn, .shot .gu-foot, .shot .tools { display: none !important; }
.shot .tz { padding: 14px 0 0; }
.shot .tz-grid { display: block; }
.shot-main .tz { max-width: 420px; }
.shot-main .card.game { padding: 12px; gap: 9px; box-shadow: none; }
.shot-main .typer { order: -1; padding: 10px 12px; min-height: 0; } .shot-main .txt { font-size: 15.5px; line-height: 1.55; }
.shot-main .g-head, .shot-main .field, .shot-main .lane .who, .shot-main .lane .sp { display: none; }
.shot-main .lane { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.shot-race .tz, .shot-type .tz, .shot-result .tz { zoom: 1.3; max-width: 820px; min-height: calc(100vh / 1.3); display: grid; align-content: center; padding: 0 14px; }
