/* =========================================================================
   Quizzy Live — ko'k-yashil minimalistik uslub
   ========================================================================= */

/* `hidden` atributi har doim ustun bo'lsin — aks holda display: flex/grid
   kabi qoidalar bilan tenglashib, elementlar yashirilmay qolib qoladi. */
[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------- tokenlar */
:root {
  --brand: #0d9488;
  --brand-2: #2b6ca8;
  --brand-soft: #e6f4f2;
  --brand-ink: #0b5f57;

  --bg: #f6faf9;
  --bg-2: #eef5f4;
  --surface: #ffffff;
  --surface-2: #f2f7f7;
  --line: #dde8e7;
  --line-2: #c9dcda;

  --text: #0b1f22;
  --muted: #5f7b7d;
  --faint: #8fa8a9;

  --ok: #12a87a;
  --bad: #d05b57;
  --warn: #c98a2b;

  --opt-0: #0d9488;
  --opt-1: #2f6fb0;
  --opt-2: #3ea36c;
  --opt-3: #1f93b5;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow: 0 1px 2px rgba(11, 31, 34, 0.04), 0 8px 24px -12px rgba(11, 31, 34, 0.14);
  --shadow-lg: 0 2px 6px rgba(11, 31, 34, 0.05), 0 24px 60px -28px rgba(11, 31, 34, 0.28);

  --font: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Clash Display', var(--font);

  --accent: var(--brand);
  --border: var(--line);
  --maxw: 1120px;
}

[data-theme='dark'] {
  --brand: #2dd4bf;
  --brand-2: #5aa9f0;
  --brand-soft: #10312f;
  --brand-ink: #7fe7db;

  --bg: #06141a;
  --bg-2: #081b21;
  --surface: #0b2027;
  --surface-2: #0f2a32;
  --line: #163740;
  --line-2: #1e4b56;

  --text: #e8f4f3;
  --muted: #8fa9ad;
  --faint: #63848a;

  --ok: #34d399;
  --bad: #f0857f;
  --warn: #e8b44a;

  --opt-0: #14b8a6;
  --opt-1: #4b8fd6;
  --opt-2: #4cc38a;
  --opt-3: #38bdf8;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.35), 0 30px 70px -30px rgba(0, 0, 0, 0.75);
}

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body.modal-open {
  overflow: hidden;
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
p {
  margin: 0;
}
ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--r) 0;
  z-index: 200;
}
.skip:focus {
  left: 0;
}

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 4vw, 34px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo {
  width: 32px;
  height: 32px;
  color: var(--brand);
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-live {
  color: var(--brand);
}
.brand-col {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-credit {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.about-modal h3 {
  margin: 16px 0 6px;
  font-size: 14px;
}
.about-modal h3:first-of-type {
  margin-top: 4px;
}
.about-modal p,
.about-modal li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.about-modal ul {
  margin: 0;
  padding-left: 20px;
}
.about-modal li {
  margin-bottom: 4px;
}
.about-modal a {
  color: var(--brand);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: 0.18s;
}
.lang-switch button.is-on {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: 0.18s;
}
.icon-btn:hover {
  color: var(--brand);
  border-color: var(--line-2);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}
.ico-moon {
  display: none;
}
[data-theme='dark'] .ico-sun {
  display: none;
}
[data-theme='dark'] .ico-moon {
  display: block;
}
.host-btn .host-ico {
  width: 18px;
  height: 18px;
}
.host-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 4px;
}
.host-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft) center/cover no-repeat;
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.chip-name {
  font-weight: 600;
  font-size: 13px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-out {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
}
.chip-out:hover {
  color: var(--bad);
}

/* ------------------------------------------------------------- tugmalar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: 0.18s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--brand) 90%, transparent);
}
.btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 88%, #000);
  transform: translateY(-1px);
}
[data-theme='dark'] .btn-primary {
  color: #04211f;
}
.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-quiet {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}
.btn-quiet:hover:not(:disabled) {
  color: var(--brand);
}
.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 14px;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn .plus {
  font-size: 17px;
  line-height: 1;
}
.btn-arrow {
  width: 18px;
  height: 18px;
}

/* -------------------------------------------------------------- ekranlar */
main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 40px) clamp(14px, 4vw, 34px) 60px;
}
.screen {
  display: none;
  animation: fade 0.28s ease;
}
.screen.is-active {
  display: block;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.screen-head {
  margin-bottom: 22px;
}
.screen-title {
  font-size: clamp(24px, 4vw, 34px);
}
.screen-sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pill b {
  color: var(--text);
}
.err-line {
  color: var(--bad);
  font-size: 13.5px;
  min-height: 18px;
  font-weight: 500;
}
.hint,
.stage-hint {
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 5vw, 56px);
  align-items: center;
  padding: clamp(10px, 3vw, 34px) 0 clamp(30px, 6vw, 60px);
}
.hero-title {
  font-size: clamp(34px, 6.4vw, 62px);
  margin: 14px 0 14px;
}
.hero-title em {
  font-style: normal;
  color: var(--brand);
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  max-width: 48ch;
}
.join-box {
  margin-top: 26px;
  max-width: 460px;
}
.join-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.join-row {
  display: flex;
  gap: 10px;
}
.code-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-align: center;
  transition: 0.18s;
}
.code-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.stats {
  display: flex;
  gap: 28px;
  margin: 30px 0 0;
}
.stats div {
  display: flex;
  flex-direction: column;
}
.stats dt {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  color: var(--brand);
}
.stats dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.hero-visual {
  aspect-ratio: 1;
  min-height: 260px;
}
#heroCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.how {
  border-top: 1px solid var(--line);
  padding-top: clamp(26px, 5vw, 44px);
}
.section-title {
  font-size: clamp(20px, 3vw, 26px);
  margin-bottom: 22px;
}
.how-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.how-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
.how-num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.1em;
}
.how-list h3 {
  font-size: 17px;
  margin: 10px 0 6px;
}
.how-list p {
  color: var(--muted);
  font-size: 14px;
}

/* -------------------------------------------------------------- maydonlar */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.field.grow {
  flex: 1;
}
input[type='text'],
input[type='number'],
input[type='email'],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  transition: 0.16s;
  font-size: 14.5px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  padding: 0;
  border: none;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  box-shadow: var(--shadow);
  cursor: grab;
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  cursor: grab;
}

/* ------------------------------------------------------------- dashboard */
.dash {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(16px, 3vw, 26px);
  box-shadow: var(--shadow);
}
.dash-top {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.time-pick {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}
.time-pick button {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.time-pick button.is-on {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
}
.tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button.is-on {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.tab-panel {
  display: none;
}
.tab-panel.is-on {
  display: block;
}
.dash-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.dash-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.dash-foot .err-line {
  flex: 1;
}

/* ------------------------------------------------------------ savol kartalari */
.q-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.empty-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 42px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  color: var(--muted);
  text-align: center;
}
.empty-ico {
  width: 34px;
  height: 34px;
  color: var(--line-2);
}
.qcard {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: 0.18s;
}
.qcard:hover {
  border-color: var(--line-2);
}
.qcard.is-open {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}
.qcard.is-final {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface));
}
.qcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.qcard-num {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.qtype-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
[data-theme='dark'] .qtype-chip {
  color: var(--brand);
}
.qt-ico {
  width: 15px;
  height: 15px;
}
.qcard-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
}
.final-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-style: normal;
}
[data-theme='dark'] .final-badge {
  color: #04211f;
}
.warn-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
  white-space: nowrap;
}
.qcard-meta {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}
.qcard-tools {
  display: flex;
  gap: 2px;
}
.qcard-tools button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--faint);
  transition: 0.15s;
}
.qcard-tools button svg {
  width: 16px;
  height: 16px;
}
.qcard-tools button:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--brand);
}
.qcard-tools button.is-danger:hover {
  color: var(--bad);
}
.qcard-tools button:disabled {
  opacity: 0.3;
  cursor: default;
}
.qcard-body {
  display: none;
}
.qcard.is-open .qcard-body {
  display: block;
  border-top: 1px solid var(--line);
}
.qedit {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--bg-2);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.opt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  border-left: 4px solid var(--oc, var(--line-2));
}
.opt-0 {
  --oc: var(--opt-0);
}
.opt-1 {
  --oc: var(--opt-1);
}
.opt-2 {
  --oc: var(--opt-2);
}
.opt-3 {
  --oc: var(--opt-3);
}
.opt-row.is-correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}
.opt-row input[type='text'] {
  border: none;
  background: transparent;
  padding: 6px 2px;
}
.opt-row input:focus {
  box-shadow: none;
}
.opt-key {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--oc, var(--surface-2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1.5px solid var(--line-2);
  color: transparent;
}
.mark svg {
  width: 16px;
  height: 16px;
}
.mark.is-on {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.opt-del {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--faint);
}
.opt-del svg {
  width: 15px;
  height: 15px;
}
.opt-del:hover {
  color: var(--bad);
}
.range-edit {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-num {
  max-width: 110px;
}
.map-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
}
.map-box {
  height: 280px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  z-index: 0;
}
.map-box.is-play {
  height: min(52vh, 420px);
}
.map-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.coord {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pin-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
}
.pin-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pin-stage {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line-2);
  cursor: crosshair;
  background: var(--surface-2);
}
.pin-stage img {
  width: 100%;
  display: block;
}
.pin-stage.is-play {
  max-height: min(52vh, 460px);
}
.pin-stage.is-play img {
  max-height: min(52vh, 460px);
  object-fit: contain;
  margin: 0 auto;
}
.pin-empty {
  display: grid;
  place-items: center;
  height: 180px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  color: var(--line-2);
}
.pin-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ok);
  pointer-events: none;
}
.pin-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--pr, 9%) * 2);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--ok) 70%, transparent);
}
.pin-dot.is-me {
  background: var(--brand-2);
  box-shadow: 0 0 0 2px var(--brand-2);
}
.pin-dot.is-me::after {
  display: none;
}
.pair-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pair-head {
  display: grid;
  grid-template-columns: 24px 1fr 24px 1fr;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-left: 32px;
}
.pair-head span:last-child {
  grid-column: 4;
}
.pair-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
}
.pair-link {
  color: var(--brand);
  font-weight: 700;
}
.q-media-prev {
  position: relative;
  max-width: 240px;
}
.q-media-prev img {
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.q-media-prev button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--bad);
}
.q-media-prev button svg {
  width: 15px;
  height: 15px;
}
.qedit-foot {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mini-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.mini-field input {
  width: 76px;
  padding: 6px 8px;
}
.mini-field i {
  font-style: normal;
}
.qedit-foot .btn {
  margin-left: auto;
}

/* ------------------------------------------------------------------- AI */
.ai-warn {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 14px;
}
.src-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.src-tabs button {
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.src-tabs button.is-on {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
}
.ai-src {
  margin-bottom: 14px;
}
.drop {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 30px 20px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  transition: 0.18s;
}
.drop.is-over {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}
.drop.is-filled {
  border-style: solid;
  border-color: var(--ok);
}
.drop-ico {
  width: 34px;
  height: 34px;
  color: var(--brand);
}
.drop-info {
  font-size: 12.5px;
  color: var(--brand-ink);
  font-weight: 600;
}
[data-theme='dark'] .drop-info {
  color: var(--brand);
}
.strict-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--brand);
}
.ai-form {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.ai-form .field {
  min-width: 130px;
}
.type-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.type-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.15s;
}
.type-checks input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
}
.type-checks label:has(input:checked) {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.ai-run {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.ai-provider {
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-status {
  font-size: 13.5px;
  font-weight: 500;
}
.ai-status.is-busy {
  color: var(--brand);
}
.ai-status.is-ok {
  color: var(--ok);
}
.ai-status.is-bad {
  color: var(--bad);
}

/* ------------------------------------------------------------- host lobby */
.lobby-host,
.lobby-player,
.nick-wrap,
.final {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0;
}
.code-big {
  font-family: var(--display);
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--brand);
  line-height: 1.1;
}
.lobby-meta {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0;
}
.player-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  animation: pop 0.3s ease;
}
@keyframes pop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
}
.waiting-note {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
}
#reviewWrap {
  text-align: left;
  max-width: 640px;
  margin: 16px auto 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
#reviewWrap summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.review-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 10px;
  font-size: 13.5px;
}
.review-list h4 {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.review-list h4:first-child {
  margin-top: 0;
}
.review-list ol {
  margin: 0;
  padding-left: 20px;
}
.review-list li {
  margin-bottom: 8px;
  line-height: 1.4;
  position: relative;
}
.review-del {
  float: right;
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  line-height: 1;
  color: var(--bad, #e35d5d);
  cursor: pointer;
  font-size: 13px;
}
.review-del:hover {
  background: var(--bad, #e35d5d);
  color: #fff;
}
.review-list b {
  color: var(--ok);
}
/* individual testni saqlash paneli (host lobbi) */
.save-indiv {
  text-align: left;
  max-width: 640px;
  margin: 12px auto 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.save-indiv-title {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 14px;
}
.save-indiv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.save-indiv-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.save-indiv .hint {
  margin-top: 8px;
  word-break: break-all;
}
.lobby-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
/* fan bo'yicha saqlangan testlar ro'yxati */
#savedBrowseWrap {
  text-align: left;
  max-width: 720px;
  margin: 0 auto 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
#savedBrowseWrap summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.saved-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 10px;
}
.saved-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.saved-item:hover {
  border-color: var(--accent, var(--line));
}
.saved-item span {
  font-size: 12.5px;
  color: var(--muted);
}
.dots-loader {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 16px 0;
}
.dots-loader i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: bounce 1.1s infinite ease-in-out;
}
.dots-loader i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots-loader i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ profil */
.nick-card {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 18px 0;
  text-align: left;
}
.nick-preview {
  flex: none;
}
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}
.av-pick {
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: var(--r);
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: 0.15s;
}
.av-pick:hover {
  border-color: var(--line-2);
}
.av-pick.is-on {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.av-badge {
  display: grid;
  place-items: center;
  width: var(--av-size, 44px);
  height: var(--av-size, 44px);
  border-radius: 30%;
  background: color-mix(in srgb, var(--av) 14%, transparent);
  color: var(--av);
  flex: none;
}
.av-badge .av-svg {
  width: 72%;
  height: 72%;
}
.you-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
  margin-bottom: 16px;
  text-align: left;
}
.you-label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
.you-card b {
  font-size: 16px;
}

/* -------------------------------------------------------------------- o'yin */
.game-wrap {
  max-width: 900px;
  margin: 0 auto;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.game-top-left,
.game-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer {
  position: relative;
  width: 56px;
  height: 56px;
  flex: none;
}
.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 4;
}
.ring-bg {
  stroke: var(--line);
}
.ring-fg {
  stroke: var(--brand);
  stroke-linecap: round;
  transition: stroke 0.3s;
}
.ring-fg.is-low {
  stroke: var(--bad);
}
.timer-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.live-score {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  min-width: 68px;
  text-align: right;
  transition: color 0.3s;
}
.live-score.is-low {
  color: var(--bad);
}
.live-score.is-frozen {
  color: var(--ok);
}
.live-score.is-gain {
  color: var(--ok);
}
.progress {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 20px;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.q-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.q-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(16px, 3vw, 26px);
  box-shadow: var(--shadow);
}
.q-text {
  font-size: clamp(19px, 3.2vw, 28px);
  margin-bottom: 16px;
}
.q-image:not(:empty) {
  margin-bottom: 16px;
}
.q-image img {
  max-height: 240px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  margin: 0 auto;
}
.stage {
  margin-top: 8px;
}
.stage.is-locked {
  opacity: 0.72;
  pointer-events: none;
}

/* --------------------------------------------------------------- javoblar */
.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.answers.is-multi {
  grid-template-columns: 1fr;
}
.ans {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--oc);
  text-align: left;
  font-size: 15.5px;
  font-weight: 500;
  transition: 0.16s;
  min-height: 62px;
}
.ans-text {
  flex: 1;
  min-width: 0;
}
button.ans:hover:not(:disabled) {
  border-color: var(--oc);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.ans .opt-key {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.ans .box {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 6px;
  border: 2px solid var(--line-2);
  transition: 0.15s;
}
.ans.is-picked .box {
  background: var(--oc);
  border-color: var(--oc);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.ans.is-picked {
  border-color: var(--oc);
  background: color-mix(in srgb, var(--oc) 9%, var(--surface));
}
.ans.is-dim {
  opacity: 0.4;
}
.ans.is-correct {
  border-color: var(--ok) !important;
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
}
.ans.is-wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 8%, var(--surface));
  opacity: 0.72;
}
.tally {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--muted);
}
.host-note {
  color: var(--muted);
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}

/* ketma-ketlik */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--line);
  cursor: grab;
  transition: 0.15s;
}
.order-list.is-static li {
  cursor: default;
}
.order-list li.is-drag {
  opacity: 0.5;
  border-style: dashed;
}
.order-list li.is-correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
}
.order-list li.is-wrong {
  border-color: var(--bad);
}
.ord-num {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}
[data-theme='dark'] .ord-num {
  color: #04211f;
}
.ord-tools {
  display: flex;
  gap: 2px;
}
.ord-tools button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
}
.ord-tools button:hover {
  background: var(--surface-2);
  color: var(--brand);
}

/* oraliq */
.range-play,
.range-view {
  padding: 20px 6px 6px;
}
.range-out {
  display: block;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}
.range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.range-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.5s ease;
}

/* javobni yozish */
.type-play input {
  padding: 16px 20px;
  font-size: 18px;
  text-align: center;
  border-radius: var(--r);
}

/* ma'lumot slaydi */
.info-slide {
  padding: clamp(16px, 3vw, 28px);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
}

/* moslashtirish */
.match-play {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--line);
  flex-wrap: wrap;
}
.match-left {
  flex: 1;
  min-width: 120px;
  font-weight: 600;
}
.match-row select {
  flex: 1;
  min-width: 140px;
  max-width: 320px;
}
.match-row select.is-dupe {
  border-color: var(--warn);
}
.match-row.is-correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
}
.match-row.is-wrong {
  border-color: var(--bad);
}
.match-fix {
  width: 100%;
  font-size: 12.5px;
  color: var(--ok);
  font-weight: 600;
}
.match-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.match-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-col li {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  font-size: 14.5px;
}
.match-col.is-right li {
  border-left-color: var(--brand-2);
}

/* --------------------------------------------------------------- yuborish */
.submit-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
}
.play-status {
  margin-top: 14px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  min-height: 24px;
}
.play-status.is-locked {
  color: var(--brand);
}
.play-status.is-good {
  color: var(--ok);
}
.play-status.is-part {
  color: var(--warn);
}
.play-status.is-bad {
  color: var(--bad);
}
.play-status.is-late {
  color: var(--muted);
}

/* ------------------------------------------------------------------ reveal */
.reveal-box {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
  animation: fade 0.3s ease;
}
.reveal-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.pill-streak {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}
.correct-line {
  font-size: 15px;
  margin-bottom: 6px;
}
.correct-line .lbl {
  color: var(--muted);
  font-size: 13px;
}
.correct-line b {
  color: var(--ok);
}
.explain-line {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--line-2);
}
.mini-title {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0 10px;
  font-family: var(--font);
  font-weight: 600;
}
.mini-board,
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.mini-board li,
.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 14px;
}
.mini-board li.is-you,
.rank-list li.is-you {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}
.rank-num {
  width: 24px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rank-nick {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.rank-gain {
  font-size: 12.5px;
  color: var(--ok);
  font-weight: 700;
}
.mini-board b,
.rank-list b {
  font-variant-numeric: tabular-nums;
}
.empty-note {
  color: var(--faint);
  text-align: center;
  font-size: 13.5px;
}
.player-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  max-height: 320px;
  overflow-y: auto;
}
.player-details li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 13.5px;
}
.player-details li.is-correct {
  border-color: var(--ok);
}
.player-details li.is-wrong {
  border-color: var(--bad, #e05252);
}
.pd-nick {
  font-weight: 600;
  white-space: nowrap;
}
.pd-q {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.pd-mark {
  font-weight: 700;
}
/* yozma javob — kim nima yozdi */
.pd-ans {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-ans.is-muted {
  font-weight: 500;
  color: var(--faint);
  background: transparent;
  border-style: dashed;
}
.typed-live {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.typed-live li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 14px;
}
.typed-live li.is-typed {
  border-color: var(--brand);
}
.typed-live li.is-empty {
  opacity: 0.65;
}
.typed-live .pd-nick {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.play-status.is-sent {
  color: var(--brand-2, #3b82c4);
}
.host-foot {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* ------------------------------------------------------------------ final */
#screen-final {
  position: relative;
}
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.final {
  position: relative;
  z-index: 6;
}
.final-msg {
  font-size: clamp(22px, 4vw, 34px);
  margin: 12px 0 30px;
}
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 34px;
}
.pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 190px;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.pod-1 {
  animation-delay: 0.25s;
}
.pod-2 {
  animation-delay: 0.1s;
}
.pod-3 {
  animation-delay: 0.4s;
}
@keyframes rise {
  from {
    transform: translateY(26px);
    opacity: 0;
  }
}
.pod-nick {
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pod-score {
  font-size: 12.5px;
  color: var(--muted);
}
.pod-block {
  width: 100%;
  display: grid;
  place-items: center;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom: none;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
}
.pod-1 .pod-block {
  height: 130px;
  background: linear-gradient(180deg, color-mix(in srgb, #f5b100 32%, var(--surface)), var(--surface));
  border-color: #f5b100;
  color: #b87b00;
}
.pod-2 .pod-block {
  height: 100px;
  background: linear-gradient(180deg, color-mix(in srgb, #9aa5b1 32%, var(--surface)), var(--surface));
  border-color: #9aa5b1;
  color: #64707c;
}
.pod-3 .pod-block {
  height: 76px;
  background: linear-gradient(180deg, color-mix(in srgb, #c98a4b 32%, var(--surface)), var(--surface));
  border-color: #c98a4b;
  color: #8a5a2b;
}
.pod-1 .pod-av {
  filter: drop-shadow(0 0 10px color-mix(in srgb, #f5b100 55%, transparent));
}
.pod.is-you .pod-nick {
  color: var(--brand);
}
.final-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ----------------------------------------------------------------- footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  font-size: 12.5px;
  color: var(--faint);
  border-top: 1px solid var(--line);
}
.foot-dot {
  opacity: 0.4;
}
.conn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  transition: 0.3s;
}
.conn.is-on {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}

/* ------------------------------------------------------------------ modal */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--text) 42%, transparent);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease;
}
.modal-back[hidden] {
  display: none;
}
.modal {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-height: 90dvh;
  overflow: auto;
}
.modal-wide {
  width: min(880px, 100%);
  text-align: left;
}
.modal-title {
  font-size: 21px;
  margin-bottom: 6px;
}
.modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.google-box {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 14px;
}
.modal-note {
  font-size: 12.5px;
  color: var(--faint);
}
.modal-warn {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  font-size: 13px;
}
.dev-login {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  text-align: left;
}
.dev-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
  margin-bottom: 10px;
}
.dev-fields {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: 0.16s;
}
.type-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.type-ico {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  margin-bottom: 6px;
}
[data-theme='dark'] .type-ico {
  color: var(--brand);
}
.type-ico .qt-ico {
  width: 20px;
  height: 20px;
}
.type-card b {
  font-size: 14.5px;
}
.type-card span:last-of-type {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.type-card .final-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: 0.24s ease;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.is-bad {
  background: var(--bad);
  color: #fff;
}
.toast.is-ok {
  background: var(--ok);
  color: #fff;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
    min-height: 200px;
    max-height: 240px;
  }
  .map-edit,
  .pin-edit {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 10px 14px;
  }
  .brand-name {
    display: none;
  }
  .host-btn span:not(.host-ico) {
    display: none;
  }
  #topCreateBtn,
  #topSavedBtn {
    display: none;
  }
  .answers {
    grid-template-columns: 1fr;
  }
  .ans {
    min-height: 56px;
    padding: 13px 15px;
    font-size: 15px;
  }
  .stats {
    gap: 18px;
  }
  .qcard-meta,
  .qcard-title {
    display: none;
  }
  .match-view {
    grid-template-columns: 1fr;
  }
  .dev-fields {
    flex-direction: column;
  }
  .podium {
    gap: 6px;
  }
  .pod-block {
    font-size: 22px;
  }
  .game-top {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Leaflet moslashuvi */
.leaflet-container {
  font-family: var(--font);
  background: var(--surface-2);
}
