:root {
  color-scheme: dark;
  --ink: #101c2e;
  --ink-deep: #0b1422;
  --ink-soft: #18283d;
  --paper: #f6f2e8;
  --paper-dim: #b8c3cd;
  --muted: #8996a4;
  --line: rgba(212, 228, 232, .17);
  --teal: #57e3d4;
  --teal-dark: #092c31;
  --amber: #ffbf69;
  --coral: #ff7c75;
  --green: #8be0a8;
  --body-font: Arial, Helvetica, sans-serif;
  --mono-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--body-font);
  background: var(--ink);
  color: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--ink); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 78% 13%, rgba(35, 73, 91, .22), transparent 35%), var(--ink); }
button { color: inherit; font: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
[hidden] { display: none !important; }
.app-shell { width: min(100%, 1600px); min-height: 100vh; padding: 0 clamp(24px, 5vw, 82px); margin: 0 auto; display: flex; flex-direction: column; }
.topbar { height: 92px; flex: 0 0 92px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.brand-mark { width: 39px; height: 39px; color: var(--teal); }
.brand-word { display: flex; flex-direction: column; font-size: 17px; letter-spacing: .18em; font-weight: 800; line-height: 1.04; }
.brand-sub { margin-top: 6px; color: var(--muted); font-family: var(--mono-font); font-size: 9px; letter-spacing: .2em; font-weight: 500; }
.topbar-tools { display: flex; align-items: center; gap: 20px; }
.topic-chip, .duration-chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); color: var(--paper-dim); font-family: var(--mono-font); font-size: 10px; letter-spacing: .08em; }
.live-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 14px rgba(87, 227, 212, .45); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--paper-dim); background: transparent; cursor: pointer; font-size: 22px; }
.screen { flex: 1 0 auto; min-height: min(690px, calc(100vh - 150px)); position: relative; }
.home-screen { min-height: min(750px, calc(100vh - 145px)); display: grid; grid-template-columns: 1.08fr .92fr; grid-template-rows: 1fr auto; align-items: center; column-gap: 5%; }
.home-copy { padding: 50px 0 40px; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--teal); font-family: var(--mono-font); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.eyebrow-line { width: 28px; height: 1px; background: var(--teal); }
h1, h2, p { margin-top: 0; }
.home-copy h1, .setup-heading h1, .results-screen h1 { margin: 28px 0 22px; color: var(--paper); font-size: clamp(48px, 6.1vw, 92px); font-weight: 760; line-height: .99; letter-spacing: -.055em; }
h1 span { color: var(--teal); }
.home-intro { max-width: 590px; color: var(--paper-dim); font-size: clamp(18px, 1.75vw, 24px); line-height: 1.55; }
.home-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 37px 0 38px; }
.button { min-height: 50px; padding: 0 17px; display: inline-flex; gap: 16px; align-items: center; justify-content: center; border: 1px solid transparent; background: none; cursor: pointer; text-decoration: none; font-size: 15px; font-weight: 700; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink-deep); background: var(--teal); }
.button-primary:hover { background: #83eee2; }
.button-large { min-height: 62px; padding: 0 23px; font-size: 17px; }
.button-quiet { color: var(--paper-dim); border-color: var(--line); }
.button-quiet:hover, .button-outline:hover { color: var(--paper); border-color: var(--teal); background: rgba(87, 227, 212, .05); }
.button-outline { color: var(--paper-dim); border-color: var(--line); }
.lesson-meta { display: flex; align-items: center; gap: 19px; color: var(--muted); font-family: var(--mono-font); font-size: 11px; letter-spacing: .04em; }
.lesson-meta strong { color: var(--paper); font-size: 15px; }
.lesson-meta i { height: 4px; width: 4px; border-radius: 50%; background: var(--amber); }
.home-visual { width: min(100%, 510px); aspect-ratio: 1; justify-self: center; position: relative; display: grid; place-items: center; margin: 0 auto; }
.home-visual::before { content: ""; position: absolute; inset: 10%; border: 1px solid rgba(87, 227, 212, .12); border-radius: 50%; }
.visual-orbit { position: absolute; width: 70%; height: 39%; border: 1px solid rgba(87, 227, 212, .33); border-radius: 50%; }
.orbit-one { transform: rotate(35deg); }
.orbit-two { transform: rotate(-35deg); border-color: rgba(255, 191, 105, .38); }
.visual-core { width: 34%; aspect-ratio: 1; border: 1px solid rgba(87, 227, 212, .65); border-radius: 50%; background: radial-gradient(circle, rgba(87, 227, 212, .14), rgba(16, 28, 46, .95) 68%); display: grid; place-content: center; text-align: center; box-shadow: 0 0 70px rgba(87, 227, 212, .12); }
.core-spark { color: var(--amber); font-size: clamp(38px, 6vw, 70px); line-height: .85; }
.core-caption { margin-top: 11px; color: var(--paper-dim); font-family: var(--mono-font); font-size: clamp(8px, 1vw, 11px); line-height: 1.7; letter-spacing: .16em; }
.particle { position: absolute; width: clamp(72px, 11vw, 112px); height: clamp(72px, 11vw, 112px); display: grid; place-content: center; text-align: center; border-radius: 50%; }
.particle b { font-size: clamp(34px, 4.4vw, 52px); line-height: 1; }
.particle small { margin-top: 6px; font-family: var(--mono-font); font-size: 9px; letter-spacing: .12em; }
.particle-plus { top: 16%; left: 16%; color: var(--amber); background: rgba(255, 191, 105, .09); border: 1px solid rgba(255, 191, 105, .45); }
.particle-minus { right: 9%; bottom: 19%; color: var(--teal); background: rgba(87, 227, 212, .08); border: 1px solid rgba(87, 227, 212, .45); }
.visual-note, .visual-axis, .visual-coordinate { position: absolute; font-family: var(--mono-font); font-size: 11px; letter-spacing: .1em; }
.note-top { top: 12%; right: 21%; color: var(--paper-dim); }
.note-bottom { left: 17%; bottom: 19%; color: var(--amber); }
.visual-axis { top: 50%; color: var(--muted); font-size: 9px; writing-mode: vertical-rl; }
.axis-left { left: 3%; transform: rotate(180deg); }
.axis-right { right: 0; }
.visual-coordinate { right: 6%; top: 11%; color: var(--muted); }
.home-footer { grid-column: 1 / -1; min-height: 83px; display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--line); }
.home-footer > span:first-child { color: var(--amber); font-family: var(--mono-font); font-size: 9px; letter-spacing: .16em; }
.home-footer p { margin: 0; color: var(--paper-dim); font-size: 14px; }
.footer-mark { margin-left: auto; color: var(--teal); font-size: 27px; font-weight: 800; }
.site-footer { min-height: 58px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono-font); font-size: 9px; letter-spacing: .07em; }
.site-footer b { color: var(--teal); }

/* Katta sinf ekrani uchun slaydlar */
.presentation-screen { min-height: min(750px, calc(100vh - 150px)); display: flex; flex-direction: column; padding: 28px 0 18px; }
.presentation-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.presentation-meta .eyebrow { margin-bottom: 0; }
.duration-chip { padding: 8px 10px; font-size: 9px; }
.duration-chip strong { color: var(--paper); }
.clock-icon { color: var(--amber); font-size: 16px; }
.slide-progress { height: 2px; width: 100%; overflow: hidden; background: rgba(255, 255, 255, .09); }
.slide-progress span { display: block; height: 100%; width: 10%; background: var(--teal); transition: width 250ms ease; }
.slide-stage { flex: 1; min-height: 450px; display: grid; grid-template-columns: 1fr 52px; gap: 24px; align-items: center; padding: 5vh 0 3vh; }
.slide-content { width: min(100%, 1130px); animation: rise-in 240ms ease both; }
.slide-title { max-width: 1040px; margin: 19px 0 22px; font-size: clamp(43px, 6.4vw, 94px); letter-spacing: -.055em; line-height: 1.02; font-weight: 760; }
.slide-lead { max-width: 980px; margin: 0 0 24px; color: var(--paper-dim); font-size: clamp(18px, 2.2vw, 28px); line-height: 1.48; }
.slide-figure { margin-top: 25px; }
.formula-banner { display: inline-flex; flex-direction: column; gap: 13px; padding: clamp(15px, 2vw, 25px) clamp(19px, 3vw, 38px); border-left: 3px solid var(--teal); background: linear-gradient(90deg, rgba(87, 227, 212, .1), rgba(87, 227, 212, .015)); }
.formula-main { color: var(--paper); font-family: var(--mono-font); font-size: clamp(32px, 5.2vw, 69px); font-weight: 600; letter-spacing: -.045em; line-height: 1.25; }
.formula-sub { color: var(--paper-dim); font-size: clamp(15px, 1.7vw, 21px); line-height: 1.5; }
.formula-sub strong { color: var(--teal); font-weight: 700; }
.concept-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 25px; }
.concept-tag { padding: 10px 14px; border: 1px solid var(--line); color: var(--paper-dim); font-size: clamp(14px, 1.5vw, 18px); }
.concept-tag strong { color: var(--amber); }
.redox-flow { display: flex; align-items: stretch; gap: 13px; width: min(100%, 920px); margin-top: 28px; }
.redox-electrode { flex: 1; min-height: 120px; display: grid; align-content: center; gap: 8px; padding: 16px 19px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.redox-electrode span { color: var(--muted); font-family: var(--mono-font); font-size: 10px; letter-spacing: .13em; }
.redox-electrode b { font-size: clamp(21px, 2.8vw, 34px); }
.redox-electrode em { color: var(--paper-dim); font-size: clamp(13px, 1.5vw, 17px); font-style: normal; }
.redox-electrode.anode b { color: var(--amber); }
.redox-electrode.cathode b { color: var(--teal); }
.electron-flow { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; min-width: 100px; color: var(--teal); font-family: var(--mono-font); font-size: 12px; }
.electron-flow b { font-size: 29px; }
.ion-theater { max-width: 910px; min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 27px; padding: 20px 26px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.ion-pole { color: var(--muted); font-family: var(--mono-font); font-size: 10px; text-align: center; letter-spacing: .1em; }
.ion-pole b { display: block; margin-bottom: 8px; color: var(--paper); font-size: 25px; }
.ion-stream { flex: 1; display: flex; justify-content: space-evenly; gap: 13px; font-size: clamp(16px, 2vw, 25px); }
.ion-stream .plus { color: var(--amber); }
.ion-stream .minus { color: var(--teal); }
.strength-compare { max-width: 850px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 25px; }
.compare-card { padding: 18px 22px; border-top: 2px solid var(--teal); background: rgba(87, 227, 212, .045); }
.compare-card.weak { border-color: var(--amber); background: rgba(255, 191, 105, .04); }
.compare-card b { display: block; margin-bottom: 10px; color: var(--teal); font-family: var(--mono-font); font-size: 12px; letter-spacing: .12em; }
.compare-card.weak b { color: var(--amber); }
.compare-card p { margin: 0; color: var(--paper-dim); font-size: clamp(14px, 1.55vw, 18px); line-height: 1.55; }
.conduct-meter { max-width: 860px; display: flex; align-items: center; gap: 22px; margin-top: 27px; }
.meter-lines { width: 155px; display: grid; gap: 10px; }
.meter-lines i { height: 2px; background: var(--teal); }
.meter-lines i:nth-child(2) { width: 70%; background: rgba(87, 227, 212, .66); }
.meter-lines i:nth-child(3) { width: 40%; background: rgba(87, 227, 212, .35); }
.meter-copy { color: var(--paper-dim); font-size: clamp(15px, 1.8vw, 21px); line-height: 1.5; }
.meter-copy strong { color: var(--paper); }
.slide-note { max-width: 740px; min-height: 20px; margin: 0; padding: 9px 0 9px 15px; border-left: 2px solid var(--amber); color: var(--paper-dim); font-size: clamp(14px, 1.25vw, 17px); line-height: 1.45; }
.slide-note::before { content: "TUSHUNTIRISH · ANIQLASHTIRISH"; display: block; margin-bottom: 5px; color: var(--amber); font-family: var(--mono-font); font-size: 9px; letter-spacing: .11em; }
.slide-index { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-family: var(--mono-font); font-size: 11px; }
.slide-index span:first-child { color: var(--teal); font-size: 15px; }
.index-rule { height: 40px; width: 1px; background: var(--line); }
.presentation-footer { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.slide-controls { min-width: min(100%, 390px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.slide-controls > .button { min-height: 44px; padding-left: 0; }
.arrow-controls { display: flex; align-items: center; gap: 13px; color: var(--muted); font-family: var(--mono-font); font-size: 11px; }
.arrow-controls b { color: var(--paper); }
.arrow-button { width: 44px; height: 44px; border: 1px solid var(--line); color: var(--paper); background: transparent; cursor: pointer; font-size: 21px; }
.arrow-button:hover { border-color: var(--teal); color: var(--teal); }
.arrow-next { color: var(--ink); border-color: var(--teal); background: var(--teal); }
.arrow-next:hover { color: var(--ink); background: #83eee2; }
.keyboard-hint { margin-top: 12px; color: var(--muted); font-family: var(--mono-font); font-size: 9px; text-align: right; }
kbd { display: inline-block; min-width: 19px; margin: 0 2px; padding: 3px 5px; border: 1px solid var(--line); color: var(--paper-dim); font-family: inherit; font-size: 9px; text-align: center; }

/* O‘qituvchi doskada boshqaradigan viktorina */
.setup-screen { min-height: min(750px, calc(100vh - 150px)); display: grid; grid-template-columns: 1fr .95fr; align-content: center; column-gap: 8%; padding: 40px 0; }
.setup-heading { align-self: center; }
.setup-heading h1 { margin-top: 23px; font-size: clamp(42px, 5.3vw, 76px); }
.setup-heading > p:last-child { max-width: 500px; color: var(--paper-dim); font-size: 20px; line-height: 1.5; }
.setup-panel { align-self: center; padding: clamp(21px, 3vw, 34px); border: 1px solid var(--line); background: rgba(255, 255, 255, .027); }
.team-count-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.field-label { color: var(--muted); font-family: var(--mono-font); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.count-options { display: flex; gap: 7px; }
.count-option { width: 51px; height: 45px; border: 1px solid var(--line); color: var(--paper-dim); background: transparent; font-family: var(--mono-font); cursor: pointer; }
.count-option.is-active { border-color: var(--teal); color: var(--teal); background: rgba(87, 227, 212, .08); }
.team-fields { display: grid; gap: 13px; padding: 19px 0 25px; }
.team-field { display: flex; align-items: center; gap: 12px; }
.team-field-index { width: 27px; color: var(--teal); font-family: var(--mono-font); font-size: 12px; }
.team-field input { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; outline-offset: 0; color: var(--paper); background: rgba(11, 20, 34, .6); font-size: 17px; }
.team-field input::placeholder { color: #738294; }
.start-game-button { width: 100%; justify-content: space-between; }
.setup-footnote { grid-column: 1 / -1; align-self: end; display: flex; align-items: center; gap: 10px; margin-top: 42px; color: var(--paper-dim); font-size: 13px; }
.back-link { position: absolute; left: 0; bottom: 0; min-height: 38px; padding: 0; border: 0; }
.quiz-screen { min-height: min(750px, calc(100vh - 150px)); display: flex; flex-direction: column; padding: 26px 0 20px; }
.quiz-topline { display: flex; justify-content: space-between; align-items: center; }
.quiz-topline .eyebrow { margin: 0; }
.quiz-topline > .button { min-height: 40px; }
.quiz-layout { flex: 1; display: grid; grid-template-columns: minmax(235px, .68fr) 1.6fr; gap: clamp(25px, 6vw, 86px); align-items: center; padding: 28px 0; }
.scoreboard { align-self: stretch; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.scoreboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scoreboard-heading h2 { margin: 8px 0 0; font-size: 23px; }
.small-text-button { border: 0; color: var(--teal); background: none; cursor: pointer; font-size: 12px; }
.score-help { margin: 13px 0 17px; color: var(--muted); font-size: 12px; }
.scoreboard-teams { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px; }
.team-score { min-height: 68px; width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--line); color: var(--paper); background: transparent; cursor: pointer; text-align: left; }
.team-score.is-selected { border-color: var(--teal); background: rgba(87, 227, 212, .09); }
.team-token { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 33px; border: 1px solid rgba(87, 227, 212, .35); border-radius: 50%; color: var(--teal); font-size: 12px; }
.score-row:nth-child(2) .team-token { color: var(--amber); border-color: rgba(255, 191, 105, .4); }
.score-row:nth-child(3) .team-token { color: #d5a5ff; border-color: rgba(213, 165, 255, .4); }
.score-row:nth-child(4) .team-token { color: var(--coral); border-color: rgba(255, 124, 117, .4); }
.team-name { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.team-points { color: var(--paper-dim); font-family: var(--mono-font); font-size: 16px; }
.score-stepper { display: flex; align-items: center; gap: 4px; }
.score-step { width: 34px; height: 38px; border: 1px solid var(--line); color: var(--paper-dim); background: rgba(255, 255, 255, .025); cursor: pointer; font-size: 20px; line-height: 1; }
.score-step:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); background: rgba(87, 227, 212, .07); }
.score-step:disabled { cursor: not-allowed; opacity: .35; }
.score-step-plus { color: var(--teal); }
.scoreboard-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.scoreboard-actions span { color: var(--muted); font-family: var(--mono-font); font-size: 9px; letter-spacing: .04em; }
.score-reset-button { padding: 7px 0 7px 8px; border: 0; color: var(--amber); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.score-reset-button:hover { color: var(--paper); }
.score-reset-confirm { margin-top: 10px; padding: 11px; border: 1px solid rgba(255, 191, 105, .36); background: rgba(255, 191, 105, .055); }
.score-reset-confirm p { margin: 0 0 9px; color: var(--paper-dim); font-size: 12px; line-height: 1.35; }
.score-reset-confirm-buttons { display: flex; gap: 7px; }
.score-reset-confirm-buttons button { min-height: 34px; flex: 1; padding: 0 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.score-reset-confirm-yes { border-color: var(--amber) !important; color: var(--amber); }
.score-reset-confirm-no { color: var(--paper-dim); }
.turn-indicator { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 12px; }
.question-panel { min-width: 0; }
.question-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.question-category { color: var(--amber); font-family: var(--mono-font); font-size: 10px; letter-spacing: .12em; }
.question-number { color: var(--muted); font-family: var(--mono-font); font-size: 12px; }
.question-number b { color: var(--teal); }
.question-text { max-width: 850px; margin: 21px 0 27px; font-size: clamp(30px, 4.2vw, 59px); letter-spacing: -.04em; line-height: 1.15; }
.answer-panel { margin-bottom: 22px; padding: 18px 22px; border-left: 2px solid var(--teal); background: rgba(87, 227, 212, .065); animation: rise-in 180ms ease both; }
.answer-label { color: var(--teal); font-family: var(--mono-font); font-size: 9px; letter-spacing: .12em; }
.answer-panel p { margin: 8px 0 0; color: var(--paper); font-size: clamp(17px, 1.8vw, 22px); line-height: 1.48; }
.game-feedback { min-height: 20px; margin: 0 0 10px; color: var(--amber); font-size: 14px; }
.teacher-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.teacher-controls > .button-quiet { padding: 0 14px; }
.judge-controls { display: flex; align-items: center; gap: 8px; }
.judge-controls .button { min-height: 48px; gap: 10px; }
.judge-controls .button strong { font-family: var(--mono-font); }
.next-question-button { width: 100%; justify-content: space-between; }
.quiz-bottom { display: flex; align-items: center; gap: 18px; color: var(--muted); font-family: var(--mono-font); font-size: 9px; letter-spacing: .1em; }
.quiz-bottom > span:last-child { white-space: nowrap; }
.quiz-bottom b { color: var(--teal); }
.quiz-progress { height: 2px; flex: 1; background: var(--line); }
.quiz-progress span { display: block; height: 100%; width: 12.5%; background: var(--amber); transition: width 200ms ease; }
.results-screen { min-height: min(750px, calc(100vh - 150px)); padding: clamp(35px, 6vh, 75px) 0; overflow: hidden; }
.results-screen h1 { position: relative; z-index: 1; margin-top: 22px; font-size: clamp(45px, 6vw, 82px); }
.results-subtitle { position: relative; z-index: 1; color: var(--paper-dim); font-size: 19px; }
.results-orbit { position: absolute; top: 12%; right: 11%; width: 170px; height: 170px; display: grid; place-items: center; border: 1px solid rgba(87, 227, 212, .28); border-radius: 50%; color: var(--amber); font-size: 75px; opacity: .6; }
.final-scoreboard { position: relative; z-index: 1; width: min(100%, 660px); display: grid; gap: 9px; margin: 30px 0; }
.final-team { display: flex; align-items: center; gap: 18px; min-height: 61px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.final-team.is-winner { border-color: rgba(87, 227, 212, .43); background: rgba(87, 227, 212, .07); }
.final-place { width: 36px; color: var(--amber); font-family: var(--mono-font); font-size: 16px; }
.final-name { flex: 1; font-size: 19px; font-weight: 700; }
.final-points { color: var(--teal); font-family: var(--mono-font); font-size: 17px; }
.results-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }

@keyframes rise-in { from { opacity: .25; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1450px) { .slide-title { font-size: 98px; } .question-text { font-size: 61px; } }
@media (max-width: 900px) {
  .app-shell { padding: 0 30px; }
  .home-screen { grid-template-columns: 1fr .82fr; column-gap: 1%; }
  .home-visual { width: min(100%, 390px); }
  .setup-screen { column-gap: 4%; }
  .quiz-layout { grid-template-columns: minmax(210px, .7fr) 1.3fr; gap: 28px; }
  .scoreboard { padding: 15px; }
}
@media (max-width: 680px) {
  .app-shell { padding: 0 19px; }
  .topbar { height: 72px; flex-basis: 72px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-word { font-size: 15px; }
  .topbar-tools { gap: 10px; }
  .topic-chip { padding: 8px; font-size: 8px; }
  .icon-button { width: 37px; height: 37px; }
  .screen { min-height: calc(100vh - 134px); }
  .home-screen { min-height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding-top: 27px; }
  .home-copy { padding: 24px 0 10px; }
  .home-copy h1 { margin: 20px 0 15px; font-size: clamp(49px, 12vw, 72px); }
  .home-intro { font-size: 17px; }
  .home-actions { gap: 9px; margin: 25px 0; }
  .home-actions .button-primary { min-height: 54px; }
  .home-actions .button-quiet { min-height: 46px; padding-left: 0; border: 0; font-size: 13px; }
  .lesson-meta { margin-bottom: 6px; }
  .home-visual { width: min(80vw, 320px); margin: -3px auto 8px; }
  .home-footer { min-height: 70px; gap: 12px; }
  .home-footer > span:first-child { font-size: 8px; }
  .home-footer p { font-size: 12px; }
  .site-footer { min-height: 47px; gap: 8px; font-size: 8px; }
  .site-footer span:last-child { text-align: right; }
  .presentation-screen { min-height: calc(100vh - 130px); padding-top: 20px; }
  .presentation-meta { align-items: flex-start; flex-wrap: wrap; }
  .presentation-meta .eyebrow { font-size: 9px; }
  .duration-chip { font-size: 8px; }
  .slide-stage { grid-template-columns: 1fr 28px; gap: 8px; min-height: 400px; padding: 33px 0; }
  .slide-title { font-size: clamp(40px, 10.5vw, 62px); }
  .slide-lead { font-size: 17px; }
  .formula-main { font-size: clamp(24px, 7vw, 40px); }
  .formula-sub { font-size: 14px; }
  .redox-flow { gap: 6px; }
  .redox-electrode { min-height: 100px; padding: 12px 8px; }
  .redox-electrode b { font-size: 18px; }
  .redox-electrode em { font-size: 12px; }
  .electron-flow { min-width: 54px; font-size: 9px; }
  .electron-flow b { font-size: 20px; }
  .ion-theater { min-height: 100px; padding: 13px 9px; gap: 8px; }
  .ion-pole { font-size: 8px; }
  .ion-pole b { font-size: 19px; }
  .ion-stream { gap: 6px; font-size: 15px; }
  .strength-compare { gap: 7px; }
  .compare-card { padding: 13px 11px; }
  .compare-card p { font-size: 12px; }
  .conduct-meter { gap: 14px; }
  .meter-lines { width: 85px; flex: 0 0 85px; }
  .meter-copy { font-size: 15px; }
  .slide-index { font-size: 9px; }
  .presentation-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .slide-note { max-width: 100%; font-size: 14px; }
  .slide-controls { width: 100%; min-width: 0; }
  .keyboard-hint { text-align: center; }
  .setup-screen { min-height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding: 34px 0 42px; }
  .setup-heading h1 { margin: 20px 0 13px; font-size: 47px; }
  .setup-heading > p:last-child { font-size: 16px; }
  .setup-panel { padding: 19px; }
  .team-count-row { padding-bottom: 15px; }
  .count-option { width: 44px; height: 40px; }
  .setup-footnote { margin: 0; font-size: 11px; }
  .back-link { position: static; align-self: flex-start; }
  .quiz-screen { min-height: calc(100vh - 127px); padding-top: 15px; }
  .quiz-topline .eyebrow { font-size: 8px; }
  .quiz-layout { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 18px; padding: 18px 0; }
  .question-text { margin: 17px 0 19px; font-size: clamp(29px, 8vw, 44px); }
  .scoreboard { padding: 13px; }
  .scoreboard-heading h2 { font-size: 19px; }
  .score-help { margin: 8px 0 10px; }
  .scoreboard-teams { grid-template-columns: 1fr; }
  .team-score { min-height: 53px; gap: 7px; padding: 7px; }
  .team-token { width: 27px; height: 27px; flex-basis: 27px; font-size: 10px; }
  .team-name { font-size: 12px; }
  .team-points { font-size: 13px; }
  .score-step { width: 32px; height: 34px; }
  .scoreboard-actions span { font-size: 8px; }
  .score-reset-button { font-size: 10px; }
  .score-reset-confirm { padding: 9px; }
  .score-reset-confirm p { font-size: 11px; }
  .turn-indicator { padding-top: 12px; font-size: 11px; }
  .teacher-controls { gap: 8px; }
  .teacher-controls > .button-quiet { min-height: 46px; }
  .judge-controls { flex: 1; }
  .judge-controls .button { flex: 1; min-height: 45px; padding: 0 9px; font-size: 13px; }
  .answer-panel { padding: 14px; }
  .answer-panel p { font-size: 16px; }
  .quiz-bottom { gap: 10px; font-size: 8px; }
  .quiz-bottom > span:last-child { display: none; }
  .results-screen { min-height: calc(100vh - 130px); padding-top: 35px; }
  .results-screen h1 { font-size: 51px; }
  .results-orbit { top: 9%; right: 5%; width: 85px; height: 85px; font-size: 43px; }
  .final-name { font-size: 16px; }
  .results-actions { gap: 9px; }
  .results-actions .button-quiet { padding-left: 0; border: 0; }
}
@media (max-width: 390px) {
  .app-shell { padding: 0 15px; }
  .topic-chip { display: none; }
  .home-actions { align-items: stretch; flex-direction: column; }
  .home-actions .button-quiet { align-self: flex-start; }
  .slide-controls { gap: 8px; }
  .slide-controls > .button { font-size: 12px; }
  .arrow-controls { gap: 7px; }
  .arrow-button { width: 38px; height: 38px; }
  .question-category { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Qisqa balandlikdagi proyektor ekranida butun slayd bir oynaga sig‘adi. */
@media (min-width: 681px) and (max-height: 850px) {
  .app-shell { height: 100svh; min-height: 0; }
  .topbar { height: 64px; flex: 0 0 64px; }
  .site-footer { min-height: 32px; flex: 0 0 32px; }
  .presentation-screen { height: calc(100svh - 96px); min-height: 0; flex: 0 0 auto; padding: 12px 0 7px; }
  .presentation-meta { margin-bottom: 8px; }
  .duration-chip { padding: 6px 9px; }
  .slide-stage { min-height: 0; grid-template-rows: minmax(0, 1fr); gap: 14px; padding: 10px 0; }
  .slide-title { margin: 8px 0 10px; font-size: clamp(36px, 5vw, 64px); line-height: 1; }
  .slide-lead { margin-bottom: 12px; font-size: clamp(16px, 1.9vw, 24px); line-height: 1.35; }
  .slide-figure { margin-top: 10px; }
  .formula-banner { gap: 8px; padding: 12px 20px; }
  .formula-main { font-size: clamp(28px, 4.5vw, 58px); line-height: 1.15; }
  .formula-sub { font-size: clamp(14px, 1.4vw, 18px); line-height: 1.35; }
  .concept-row { gap: 8px; margin-top: 14px; }
  .concept-tag { padding: 7px 10px; font-size: clamp(12px, 1.15vw, 16px); }
  .redox-flow { gap: 10px; margin-top: 12px; }
  .redox-electrode { min-height: 92px; padding: 12px 15px; }
  .ion-theater { min-height: 88px; margin-top: 12px; padding: 12px 16px; }
  .strength-compare { gap: 10px; margin-top: 12px; }
  .compare-card { padding: 12px 14px; }
  .compare-card b { margin-bottom: 6px; font-size: 10px; }
  .compare-card p { font-size: clamp(13px, 1.25vw, 16px); line-height: 1.35; }
  .conduct-meter { gap: 14px; margin-top: 12px; }
  .meter-lines { width: 110px; }
  .meter-copy { font-size: clamp(14px, 1.45vw, 18px); line-height: 1.35; }
  .presentation-footer { gap: 10px; padding-top: 6px; }
  .slide-note { max-width: min(760px, 62%); padding: 6px 0 6px 11px; font-size: clamp(12px, 1.15vw, 15px); line-height: 1.35; }
  .slide-note::before { margin-bottom: 2px; font-size: 8px; }
  .slide-controls > .button { min-height: 40px; }
  .arrow-button { width: 40px; height: 40px; }
  .keyboard-hint { margin-top: 5px; font-size: 8px; }
}


/* Desktop doskada slayd oynasini sarlavha va sayt footerining oralig‘iga aniq sig‘dirish. */
@media (min-width: 681px) and (min-height: 851px) {
  .app-shell { height: 100svh; min-height: 0; }
  .presentation-screen { height: calc(100svh - 150px); min-height: 0; flex: 0 0 auto; }
  .slide-stage { min-height: 0; grid-template-rows: minmax(0, 1fr); padding: 4vh 0 2vh; }
}


/* Manbadagi ketma-ket slaydlardagi ko‘p bandli nazariya va amaliy bosqichlar. */
.arrhenius-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  max-width: 1040px;
  margin-top: 14px;
}
.arrhenius-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .035);
  color: #c2ccda;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.35;
}
.arrhenius-rule b {
  flex: 0 0 28px;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: .1em;
}
.arrhenius-rule span { flex: 1; }
.arrhenius-rule:last-child:nth-child(odd) { grid-column: 1 / -1; }
.measurement-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1040px;
  margin-top: 20px;
}
.measurement-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 118px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-top: 2px solid var(--teal);
  background: rgba(255, 255, 255, .035);
  color: #c2ccda;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.4;
}
.measurement-step b {
  color: var(--teal);
  font-size: 10px;
  letter-spacing: .12em;
}
@media (min-width: 681px) and (max-height: 850px) {
  .arrhenius-rules { gap: 6px; margin-top: 10px; }
  .arrhenius-rule { min-height: 0; gap: 8px; padding: 8px 10px; font-size: clamp(12px, 1.15vw, 15px); }
  .measurement-flow { gap: 8px; margin-top: 12px; }
  .measurement-step { min-height: 88px; gap: 7px; padding: 10px; font-size: clamp(12px, 1.15vw, 15px); }
}
@media (max-width: 680px) {
  .arrhenius-rules, .measurement-flow { grid-template-columns: 1fr; gap: 8px; }
  .arrhenius-rule { min-height: 0; }
  .measurement-step { min-height: 0; }
}
