/* ვიცი — ფერადი და მხიარული: მზიანი ყვითელი ფონი, სქელი კონტურები, „სტიკერის“ ჩრდილები */

:root {
  --sun: #FFD23F;
  --sun-bg: #FFE27A;
  --paper: #FFFFFF;
  --cream: #FFF8DC;
  --ink: #211C3D;
  --ink-soft: #5A5375;
  --rule: #E9E2C8;

  /* სახელები ემთხვევა კატეგორიების ფერებს მონაცემებში */
  --cobalt: #5585FF;   /* ოდნავ ღია, რომ მუქ ტექსტთან კონტრასტი 4.5:1-ზე მეტი იყოს */
  --ruby: #FF5C8A;
  --teal: #1BB8C9;
  --saffron: #FF9F1C;
  --emerald: #1FBF8F;
  --plum: #A06CFF;
  --gold: #FFD23F;

  --cobalt-soft: #D6E3FF;
  --ruby-soft: #FFD6E4;
  --teal-soft: #CCF2F6;
  --saffron-soft: #FFE5C2;
  --emerald-soft: #B8F2D8;
  --plum-soft: #E4D6FF;
  --orange-soft: #FFD9B8;
  --gold-soft: #FFE08A;
  --pink-soft: #FFB3C8;
  --silver: #DDE3EE;
  --bronze: #F7B98C;

  /* თემის ტოკენები: --ink კონტურია და მუქი ტექსტი კაშკაშა ფონზე, --text — ჩვეულებრივი ტექსტი */
  --text: #211C3D;
  --btn-bg: #211C3D;
  --btn-fg: #FFFFFF;
  --field-edge: #211C3D;
  --me-row: #FFF1B8;
  --stat-sun: #FFD23F;
  --hl: #FFD23F;
  --pip-done: #C9C2E8;
  --ok-text: #0E8A64;
  --bad-text: #C2185B;
  --dots: rgba(33, 28, 61, .09);
  --dash: rgba(33, 28, 61, .25);
  color-scheme: light;

  --ok: #1FBF8F;
  --bad: #FF5C8A;

  --line: 3px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --pop-sm: 3px 3px 0 var(--ink);

  --sans: 'Noto Sans Georgian', system-ui, sans-serif;
  --page: 1180px;
  --home-page: 1760px; /* მთავარი გვერდი ფართო ეკრანზე მთელ სიგანეს იყენებს */
  --gutter: 24px;
}

* { box-sizing: border-box; }
/* hidden ატრიბუტი ყოველთვის მალავს (კლასის display მას არ უნდა გადაფაროს) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--sun-bg);
  background-image: radial-gradient(var(--dots) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 10px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--paper); padding: 8px 12px; border: var(--line); border-radius: 10px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */

.display { font-weight: 900; line-height: 1.12; letter-spacing: -0.01em; }
.h1 { font-size: clamp(38px, 5.6vw, 64px); }
.h2 { font-size: clamp(30px, 3.8vw, 44px); }
.h3 { font-size: 28px; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 58ch; font-weight: 500; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* ---------- surfaces ---------- */

.card, .panel, .board-mini {
  background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: var(--pop);
}
.sticker {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  font-size: 24px; background: var(--paper); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm);
}
.sticker.big { width: 64px; height: 64px; font-size: 32px; transform: rotate(-8deg); }

/* ---------- header: მარცხენა კიდის ისარი (მენიუ), ლოგო, მოთამაშის ციფრები და თემა ---------- */

.top { position: sticky; top: 0; z-index: 20; background: var(--sun-bg); transition: box-shadow .2s ease; --handle-room: 80px; }
.top.scrolled { box-shadow: 0 3px 0 var(--ink); }
.top-inner {
  max-width: var(--page); margin: 0 auto; min-height: 78px; display: flex; align-items: center; gap: 14px;
  padding: 12px var(--gutter);
  /* ისარი ეკრანის კიდეზეა — ლოგო მას არ უნდა დაეფაროს */
  padding-left: max(var(--gutter), calc(var(--handle-room) - max(0px, (var(--vw, 100vw) - var(--page)) / 2)));
}
.menu-handle {
  position: absolute; left: 0; top: 50%; translate: 0 -50%; z-index: 1;
  width: 54px; height: 48px; display: grid; place-items: center; padding: 0 0 0 2px; cursor: pointer;
  color: #FFFFFF; background: var(--cobalt); border: var(--line); border-left: 0; border-radius: 0 16px 16px 0;
  box-shadow: var(--pop-sm); transition: width .15s ease;
}
.menu-handle:hover { width: 60px; }
.menu-handle svg { transition: transform .2s ease; }
.menu-handle[aria-expanded="true"] svg { transform: rotate(180deg); }
.brand { display: flex; align-items: center; margin-right: auto; text-decoration: none; }
.top .account { margin-left: auto; }
/* კომპიუტერზე ზოლი მთელ სიგანეზეა: ისარი მარცხენა კიდეზე, ლოგო ზუსტად შუაში, ღილაკები მარჯვნივ */
@media (min-width: 721px) {
  .top-inner {
    max-width: none; padding-left: var(--handle-room);
    padding-right: max(var(--gutter), calc((var(--vw, 100vw) - var(--home-page)) / 2 + var(--gutter)));
  }
  .top .brand { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; }
}
.brand-name { display: inline-block; font-weight: 900; font-size: 38px; line-height: 1; letter-spacing: -.02em; transform: rotate(-4deg); transition: transform .2s ease; }
.brand:hover .brand-name { transform: rotate(2deg) scale(1.05); }
.account { display: flex; align-items: center; gap: 12px; }
.account .who { text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.account .who b { font-weight: 800; font-size: 15px; }
.account .who small { color: var(--ink-soft); font-size: 13px; font-weight: 600; }

/* სერია და ქულები: ფერადი ხატულა და რიცხვი (მუქ თემაში რიცხვიც ფერადია) */
.hud-stat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 12px; font-weight: 900; font-size: 21px; line-height: 1; text-decoration: none; white-space: nowrap; }
.hud-stat svg { width: 28px; height: 28px; flex: none; overflow: visible; }
.hud-stat:hover { background: var(--cream); }
.hud-stat.streak svg { color: var(--ruby); }
.hud-stat.streak.off svg { color: var(--pip-done); }
.hud-stat.points svg { color: var(--saffron); }
:root[data-theme="dark"] .hud-stat.streak:not(.off) { color: var(--ruby); }
:root[data-theme="dark"] .hud-stat.points { color: var(--saffron); }
.hud-btn {
  position: relative; width: 48px; height: 48px; display: grid; place-items: center; flex: none; padding: 0; cursor: pointer;
  color: var(--text); background: var(--paper); border: var(--line); border-radius: 14px; box-shadow: var(--pop-sm);
  transition: transform .08s ease, box-shadow .08s ease;
}
.hud-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.hud-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.hud-btn svg { width: 24px; height: 24px; }
.theme-btn .i-sun { color: var(--saffron); }
.theme-btn .i-moon { color: var(--plum); }

.bell { position: relative; }
.bell .count {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--ruby); color: var(--ink); border: 2px solid var(--ink); border-radius: 11px; font-size: 12px; font-weight: 900;
  display: grid; place-items: center;
}
.popover {
  position: absolute; right: 0; top: calc(100% + 12px); width: min(340px, calc(100vw - 32px));
  background: var(--paper); border: var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--pop); z-index: 30;
}
.popover p.empty { padding: 12px; color: var(--ink-soft); font-size: 15px; }
.pop-item { padding: 10px 12px; display: grid; gap: 8px; }
.pop-item + .pop-item { border-top: 2px dashed var(--rule); }
.pop-item .row { display: flex; gap: 8px; }

/* ---------- buttons & inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: var(--line);
  font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--pop-sm);
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--pop-sm); }
.btn.gold { background: var(--ruby); color: var(--ink); }
.btn.white, .btn.ghost { background: var(--paper); color: var(--text); }
.btn.ghost { box-shadow: none; border-width: 2px; }
.btn.ghost:hover { box-shadow: var(--pop-sm); }
.btn.big { min-height: 58px; padding: 0 26px; font-size: 19px; border-radius: 18px; box-shadow: var(--pop); }
.btn.big:hover { box-shadow: 7px 7px 0 var(--ink); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn.icon { width: 46px; padding: 0; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink-soft); }

.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-soft); }
.input, .select {
  min-height: 48px; padding: 0 14px; border: var(--line); border-color: var(--field-edge); border-radius: 14px; background: var(--paper); width: 100%; font-weight: 600;
}
.input:focus, .select:focus { outline: none; box-shadow: 0 0 0 4px var(--sun); }
.form-error { color: var(--bad-text); font-weight: 700; font-size: 15px; min-height: 1.4em; }

/* ---------- answers ---------- */

.enamel { display: grid; gap: 14px; }
.answers { grid-template-columns: 1fr 1fr; }
.cell {
  --c: var(--cobalt); --soft: var(--cobalt-soft);
  position: relative; border: var(--line); border-radius: 18px; color: var(--text); text-align: left; cursor: pointer;
  background: var(--soft); box-shadow: var(--pop-sm);
  transition: transform .1s ease, box-shadow .1s ease, opacity .2s ease, background-color .2s ease;
}
.cell[data-c="cobalt"] { --c: var(--cobalt); --soft: var(--cobalt-soft); }
.cell[data-c="ruby"] { --c: var(--ruby); --soft: var(--ruby-soft); }
.cell[data-c="teal"] { --c: var(--teal); --soft: var(--teal-soft); }
.cell[data-c="saffron"] { --c: var(--saffron); --soft: var(--saffron-soft); }

.answer {
  min-height: 80px; padding: 14px 18px 14px 70px; font-size: 18px; font-weight: 700; line-height: 1.3;
  display: flex; align-items: center;
}
.answer .key {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c); border: var(--line); font-weight: 900; font-size: 18px;
}
.answer:hover:not([disabled]) { transform: translate(-2px, -2px); box-shadow: var(--pop); background: var(--paper); }
.answer:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.answer[disabled] { cursor: default; }
.answers.done .answer:not(.is-right):not(.is-picked) { opacity: .45; }
.answer.is-right { background: var(--ok); }
.answer.is-right .key { background: var(--paper); }
.answer.is-picked:not(.is-right) { background: var(--bad); }
.answer.is-picked:not(.is-right) .key { background: var(--paper); }
.answer .mark {
  margin-left: auto; padding: 2px 10px; font-weight: 800; font-size: 13px; white-space: nowrap;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; margin-right: -4px;
}
.answer.is-picked:not(.is-right) .mark { text-decoration: line-through; }

@keyframes bounce { 0% { transform: scale(.95); } 50% { transform: scale(1.04) rotate(-1deg); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.answer.is-right { animation: bounce .4s ease-out; }
.answer.is-picked:not(.is-right) { animation: shake .3s ease-in-out; }

/* ---------- home ---------- */

.hero { padding: 48px 0 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-title { font-size: clamp(36px, 4.4vw, 54px); text-wrap: balance; }
.hero-copy .lede { margin: 18px 0 28px; color: var(--text); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.daily-card { padding: 26px; transform: rotate(.6deg); }
.daily-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.daily-head .display { font-size: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800;
  padding: 3px 12px; border-radius: 999px; background: var(--c, var(--cobalt)); border: 2px solid var(--ink);
}
.chip .dot { display: none; }
.question-text { font-weight: 800; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.25; margin-bottom: 22px; text-wrap: balance; }
.feedback { margin-top: 16px; min-height: 28px; font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feedback b { padding: 2px 12px; border: 2px solid var(--ink); border-radius: 999px; }
.feedback b.ok { background: var(--ok); }
.feedback b.bad { background: var(--bad); }

.section { padding-top: 48px; padding-bottom: 48px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { max-width: 52ch; font-weight: 500; }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tile {
  text-decoration: none; padding: 22px; display: flex; flex-direction: column; gap: 8px;
  background: var(--c); border: var(--line); border-radius: 24px; box-shadow: var(--pop);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:nth-child(odd) { transform: rotate(-1.2deg); }
.tile:nth-child(even) { transform: rotate(1deg); }
.tile:hover { transform: translate(-3px, -3px) rotate(0); box-shadow: 9px 9px 0 var(--ink); }
.tile .emoji {
  width: 72px; height: 72px; display: grid; place-items: center; font-size: 40px; margin-bottom: 8px;
  background: var(--paper); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm);
  transition: transform .25s ease;
}
.tile:hover .emoji { transform: rotate(-12deg) scale(1.08); }
.tile .name { font-weight: 900; font-size: 28px; line-height: 1.1; }
.tile .desc { font-size: 15px; font-weight: 600; }
.tile .meta {
  margin-top: auto; align-self: start; font-size: 13px; font-weight: 800;
  padding: 3px 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
}

.home-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; padding-bottom: 72px; }
.duel-card { background: var(--plum); padding: 30px; }
.duel-card h2 { margin: 14px 0 10px; }
.duel-card > p { font-weight: 600; max-width: 52ch; }
.steps { margin: 20px 0 24px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; font-weight: 500; }
.steps li::before {
  content: counter(s); flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--sun); border: var(--line); border-radius: 50%; font-weight: 900;
}
.duel-card .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.join-inline { display: flex; gap: 8px; }
.join-inline .input { width: 140px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.join-inline .input::placeholder { letter-spacing: 0; text-transform: none; font-weight: 600; }

.board-mini { padding: 24px; }
.board-title { display: flex; align-items: center; gap: 12px; }
.board-mini h2 { font-size: 28px; }
.board-mini .sub { font-size: 14px; color: var(--ink-soft); margin: 6px 0 12px; font-weight: 600; }
.board-mini ol { list-style: none; margin: 0 0 16px; padding: 0; }
.board-mini li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 2px dashed var(--rule); }
.board-mini li a { text-decoration: none; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-mini li a:hover { text-decoration: underline; }
.empty-mini { padding: 12px 0 18px; color: var(--ink-soft); font-weight: 600; }
.medal {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px;
  background: var(--cream); border: 2px solid var(--ink);
}
.medal.m1 { background: var(--sun); }
.medal.m2 { background: var(--silver); }
.medal.m3 { background: var(--bronze); }
.place { font-weight: 900; font-size: 20px; }
.place.p1 { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--sun); border: 2px solid var(--ink); border-radius: 50%; font-size: 16px; }
.pts { font-variant-numeric: tabular-nums; font-weight: 800; }

/* ---------- page heads ---------- */

.page-head { padding: 44px 0 28px; }
.page-head .lede { margin-top: 14px; }
.crumbs { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.crumbs a { color: inherit; }

/* ---------- quiz lists ---------- */

.cat-block { padding: 28px 0; display: grid; grid-template-columns: 300px 1fr; gap: 32px; }
.cat-block + .cat-block { border-top: 3px dashed var(--dash); }
.cat-title { display: flex; gap: 14px; align-items: start; }
.cat-title .swatch {
  width: 58px; height: 58px; flex: none; display: grid; place-items: center; font-size: 30px;
  background: var(--c); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-6deg);
}
.cat-title h2 { font-size: 30px; }
.cat-title p { margin-top: 6px; font-size: 15px; font-weight: 500; }
.quiz-rows { display: grid; gap: 16px; }
.quiz-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 18px 20px; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm);
  position: relative; overflow: hidden;
}
.quiz-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--c); border-right: var(--line); }
.quiz-row > div { padding-left: 14px; }
.quiz-row h3 { font-size: 20px; font-weight: 900; }
.quiz-row p { font-size: 15px; color: var(--ink-soft); margin-top: 2px; font-weight: 500; }
.quiz-row .best { display: inline-block; font-size: 13px; margin-top: 8px; color: var(--ink); font-weight: 800; padding: 2px 10px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }

/* ---------- play ---------- */

.play { max-width: 880px; margin: 32px auto 64px; padding: 30px; background: var(--paper); border: var(--line); border-radius: 28px; box-shadow: var(--pop); }
.play-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.play-top .title { font-weight: 900; font-size: 20px; }
.pips { display: flex; gap: 6px; flex-wrap: wrap; }
.pip { width: 26px; height: 14px; border-radius: 7px; background: var(--cream); border: 2px solid var(--ink); }
.pip.now { background: var(--sun); }
.pip.ok { background: var(--ok); }
.pip.bad { background: var(--bad); }
.next-row { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 48px; }
.kbd-hint { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

.result .score { font-size: clamp(88px, 14vw, 140px); line-height: 1; margin-top: 8px; }
.result .score small { font-size: .4em; color: var(--ink-soft); }
.result .verdict { font-size: 26px; font-weight: 900; margin: 10px 0 18px; }
.result .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.callout { margin-top: 24px; padding: 20px 22px; border-radius: 20px; background: var(--cream); border: var(--line); display: grid; gap: 12px; max-width: 60ch; }
.callout .row { display: flex; gap: 10px; flex-wrap: wrap; }
.earned { font-size: 19px; font-weight: 600; }
.earned b { background: var(--ok); padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; }

/* ---------- auth ---------- */

.auth { max-width: 480px; margin: 48px auto 72px; padding: 32px; background: var(--paper); border: var(--line); border-radius: 28px; box-shadow: var(--pop); }
.auth .h1 { font-size: 44px; }
.auth form { display: grid; gap: 18px; margin-top: 24px; }
.auth .switch { margin-top: 20px; font-size: 15px; color: var(--ink-soft); font-weight: 600; }

/* ---------- leaderboard ---------- */

.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--pop-sm); }
.seg button { border: 2px solid transparent; background: none; padding: 7px 14px; border-radius: 11px; cursor: pointer; font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--sun); border-color: var(--ink); }
.controls .select { width: auto; min-width: 220px; box-shadow: var(--pop-sm); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--pop); }
.table th { text-align: left; font-weight: 800; font-size: 14px; padding: 14px 16px; background: var(--cream); border-bottom: var(--line); }
.table td { padding: 12px 16px; border-bottom: 2px dashed var(--rule); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.me td { background: var(--me-row); }
.table a { text-decoration: none; font-weight: 800; }
.table a:hover { text-decoration: underline; }
.table .handle { color: var(--ink-soft); font-size: 14px; margin-left: 6px; font-weight: 500; }
.empty-state { padding: 40px 24px; text-align: center; background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: var(--pop); }
.empty-state p { margin: 8px auto 18px; max-width: 46ch; color: var(--ink-soft); font-weight: 500; }

/* ---------- duels / panels ---------- */

.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: start; padding-bottom: 64px; }
.panel { padding: 24px; }
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 28px; margin-bottom: 6px; }
.panel > p { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; font-weight: 500; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.picker label { cursor: pointer; }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker span {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); font-weight: 700; font-size: 15px;
}
.picker span::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--ink)); border: 2px solid var(--ink); }
.picker input:checked + span { background: var(--sun); box-shadow: var(--pop-sm); }
.picker input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.picker.plain span::before { display: none; }
.stack { display: grid; gap: 18px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 2px dashed var(--rule); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow a { text-decoration: none; font-weight: 800; }
.list .grow a:hover { text-decoration: underline; }
.list .sub { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-weight: 900; font-size: 18px; background: var(--c, var(--cobalt)); border: var(--line);
}
.online { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--ink); display: inline-block; margin-left: 6px; vertical-align: middle; }
.badge { font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--cream); border: 2px solid var(--ink); white-space: nowrap; }
.badge.win { background: var(--sun); }

/* duel room */
.room { padding-top: 32px; padding-bottom: 64px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.room-grid > div:first-child:has(.question-text) { background: var(--paper); border: var(--line); border-radius: 28px; box-shadow: var(--pop); padding: 28px; }
.code-cells { display: inline-grid; grid-auto-flow: column; gap: 10px; }
.code-cells .cell { width: 60px; height: 72px; display: grid; place-items: center; font-weight: 900; font-size: 38px; cursor: default; background: var(--c); }
.code-cells .cell:nth-child(odd) { transform: rotate(-4deg); }
.code-cells .cell:nth-child(even) { transform: rotate(3deg); }
.room-head { display: flex; gap: 24px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.timer { height: 18px; border-radius: 9px; background: var(--cream); border: var(--line); overflow: hidden; margin: 6px 0 22px; }
.timer i { display: block; height: 100%; background: var(--emerald); transform-origin: left; border-right: 3px solid var(--ink); }
.timer.low i { background: var(--ruby); }
.scores { list-style: none; margin: 0; padding: 0; }
.scores li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed var(--rule); }
.scores li:first-child { border-top: 0; }
.scores .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores .st { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.scores .st.ok { color: var(--ok-text); font-weight: 800; }
.scores .st.bad { color: var(--bad-text); font-weight: 800; }
.scores .off { opacity: .5; }
.podium { display: grid; gap: 14px; margin: 24px 0 28px; }
.podium .row {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 20px; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm);
}
.podium .row.first { background: var(--sun); box-shadow: var(--pop); transform: rotate(-.6deg); }
.podium .place { font-size: 36px; }
.podium .place.p1 { width: 52px; height: 52px; font-size: 26px; background: var(--paper); }
.podium .who b { font-size: 19px; display: block; }

/* ---------- profile ---------- */

.profile-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-head .avatar { width: 92px; height: 92px; border-radius: 28px; font-size: 42px; box-shadow: var(--pop); transform: rotate(-5deg); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 28px 0; }
.stat { padding: 18px; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm); }
.stat:nth-child(1) { background: var(--stat-sun); }
.stat:nth-child(2) { background: var(--teal-soft); }
.stat:nth-child(3) { background: var(--ruby-soft); }
.stat:nth-child(4) { background: var(--cobalt-soft); }
.stat .v { font-weight: 900; font-size: 40px; line-height: 1; }
.stat .k { font-size: 14px; color: var(--text); margin-top: 8px; font-weight: 600; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 130px 1fr 56px; gap: 12px; align-items: center; font-size: 15px; font-weight: 600; }
.bar .track { height: 16px; border-radius: 8px; background: var(--cream); border: 2px solid var(--ink); overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--c); }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }

/* ---------- toasts, confetti ---------- */

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 10px; z-index: 95; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--paper); border: var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--pop); display: grid; gap: 10px; font-weight: 600; border-left-width: 12px; border-left-color: var(--emerald); }
.toast.error { border-left-color: var(--ruby); }
.toast .row { display: flex; gap: 8px; }
.toast .btn.ghost { color: var(--text) !important; }
@keyframes toast-in { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { animation: toast-in .25s cubic-bezier(.3, 1.5, .6, 1); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border: 1.5px solid var(--ink); animation: fall linear forwards; }
@keyframes fall {
  to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}

/* ---------- footer ---------- */

.foot { background: var(--ink); color: #D9D4F0; }
.foot-inner { max-width: var(--page); margin: 0 auto; padding: 26px var(--gutter); font-size: 14px; font-weight: 500; }
.foot p { max-width: 80ch; }

.loading { padding: 80px var(--gutter); text-align: center; font-weight: 700; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid, .two-col, .room-grid, .home-bottom { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-block { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-card { transform: none; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .account .who { display: none; }
  .hero { padding-top: 28px; }
  .answers { grid-template-columns: 1fr; }
  .answer { min-height: 64px; font-size: 17px; }
  .cat-grid { grid-template-columns: 1fr; gap: 20px; }
  .tile { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; }
  .tile .emoji { width: 60px; height: 60px; font-size: 32px; margin: 0; }
  .tile .name { flex: 1; }
  .tile .desc { flex-basis: 100%; }
  .table .hide-sm { display: none; }
  .code-cells .cell { width: 48px; height: 60px; font-size: 30px; }
  .bar { grid-template-columns: 100px 1fr 44px; }
  .quiz-row { grid-template-columns: 1fr; }
  .quiz-row .btn { margin-left: 14px; justify-self: start; }
  .play, .auth { margin: 16px var(--gutter) 48px; padding: 20px; }
  .daily-card { padding: 20px; }
  .btn.big { width: 100%; }
  .stat .v { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- difficulty, quiz cards, timed play ---------- */

.diff {
  display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px;
  border: 2px solid var(--ink); vertical-align: middle; white-space: nowrap;
}
.diff.easy { background: var(--emerald-soft); }
.diff.medium { background: var(--gold-soft); }
.diff.hard { background: var(--pink-soft); }

.cat-section { padding: 8px 0 36px; }
.cat-section .cat-title { margin-bottom: 18px; align-items: center; }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.quiz-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 18px 26px; position: relative; overflow: hidden;
  background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.quiz-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--c); border-right: var(--line); }
.quiz-card:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.quiz-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.quiz-card h3 { font-size: 19px; font-weight: 900; line-height: 1.25; }
.quiz-card p { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.quiz-card .btn { margin-top: auto; align-self: start; }
.best-bar { display: flex; align-items: center; gap: 10px; }
.best-bar .track { flex: 1; height: 12px; border-radius: 6px; background: var(--cream); border: 2px solid var(--ink); overflow: hidden; }
.best-bar .track i { display: block; height: 100%; background: var(--emerald); }

.score-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--sun);
  border: var(--line); border-radius: 999px; box-shadow: var(--pop-sm); font-weight: 700;
}
.score-pill b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.play .pips { margin: -8px 0 20px; }
.q-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.potential { font-size: 14px; font-weight: 600; }
.potential b { font-variant-numeric: tabular-nums; font-size: 16px; }

.rules { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 16px; }
.rules > div { padding: 8px 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; font-weight: 600; }
.rules > div:first-child { padding: 6px 8px; background: none; border: 0; display: flex; align-items: center; }

.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 20px; }
.result-stats > div { padding: 14px 16px; border: var(--line); border-radius: 18px; background: var(--cream); display: grid; gap: 2px; }
.result-stats b { font-size: 24px; font-weight: 900; }
.result-stats span { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

@media (max-width: 720px) {
  .result-stats { grid-template-columns: 1fr; }
  .score-pill b { font-size: 17px; }
}

/* ---------- user quizzes, editor, admin ---------- */

.author-line { font-weight: 700; color: var(--ink-soft); }
.author-line a { color: var(--text); }
.quiz-card .author-line { margin-top: -4px; }
/* „ვიცის“ საკუთარი ქვიზები AI-მ შექმნა */
.ai-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--teal-soft); color: inherit; font-size: .92em; font-weight: 800; white-space: nowrap; vertical-align: middle;
}
.ai-note { font-weight: 600; }
.play-top .author-line { margin: 2px 0 0; }
.note-box { margin-top: 14px; padding: 10px 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; font-weight: 600; font-size: 15px; }
.note-box.bad { background: var(--ruby-soft); }
.head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }

.status { display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); white-space: nowrap; }
.status.pending { background: var(--sun); }
.status.published { background: var(--emerald); }
.status.rejected { background: var(--ruby); }

.my-list { display: grid; gap: 18px; }
.my-quiz {
  display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; padding: 20px 22px 20px 30px; position: relative; overflow: hidden;
  background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--pop-sm);
}
.my-quiz::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--c); border-right: var(--line); }
.my-quiz h3 { font-size: 21px; font-weight: 900; margin: 8px 0 2px; }
.my-quiz-code { display: grid; gap: 4px; justify-items: end; text-align: right; }
.code-text { font-size: 26px; font-weight: 900; letter-spacing: .14em; padding: 2px 12px; background: var(--sun); border: var(--line); border-radius: 12px; }
.my-quiz-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.invite-box { grid-column: 1 / -1; border-top: 2px dashed var(--rule); padding-top: 10px; }

.editor { max-width: 900px; padding-bottom: 72px; }
.q-edit { margin: 0; padding: 20px; background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--pop-sm); display: grid; gap: 12px; }
.q-edit legend { font-weight: 900; padding: 2px 12px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
.q-edit textarea, .aq-form textarea, .report-form textarea { min-height: 64px; padding: 10px 14px; resize: vertical; line-height: 1.4; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { display: flex; align-items: center; gap: 8px; }
.opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.opt .key {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; font-weight: 900;
  background: var(--cream); border: var(--line); border-radius: 12px;
}
.opt input[type="radio"]:focus-visible + .key { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.opt.right .key { background: var(--emerald); }
.opt.right .input { border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.q-edit-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.editor-foot { display: flex; align-items: center; gap: 14px; }
.submit-panel { display: grid; gap: 12px; background: var(--cream); }

.report-form { display: grid; gap: 10px; margin-top: 14px; padding: 16px; background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; }
.report-form label { font-size: 15px; }
.report-form .row { display: flex; gap: 8px; }

.admin-section { margin-bottom: 40px; }
.admin-section > h2 { margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.count-pill { font-size: 18px; padding: 2px 14px; background: var(--sun); border: var(--line); border-radius: 999px; }
.admin-item { margin-bottom: 18px; display: grid; gap: 10px; }
.admin-title { font-size: 24px; font-weight: 900; }
.aq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aq { padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
.aq-text { font-weight: 700; margin-bottom: 6px; }
.aq-opts { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 15px; }
.aq-opts li.right { font-weight: 800; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-actions .input { flex: 1; min-width: 220px; }
.report-msg { margin: 0; padding: 10px 14px; background: var(--ruby-soft); border: 2px solid var(--ink); border-radius: 14px; font-weight: 600; }

.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.stats-3 .stat:nth-child(1) { background: var(--saffron-soft); }
.stats-3 .stat:nth-child(2) { background: var(--emerald-soft); }
.stats-3 .stat:nth-child(3) { background: var(--ruby-soft); }

@media (max-width: 720px) {
  .my-quiz { grid-template-columns: 1fr; }
  .my-quiz-code { justify-items: start; text-align: left; }
  .opts, .aq-opts { grid-template-columns: 1fr; }
  .stats-3 { grid-template-columns: 1fr; }
}
.list.panel { padding: 8px 20px; }

/* ---------- livelier: transitions, tilt, floaters ---------- */

@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#view.page-in { animation: pageIn .35s cubic-bezier(.2, .8, .2, 1) both; }

.tile, .quiz-card { --rx: 0deg; --ry: 0deg; position: relative; }
.tile { transition: transform .18s ease-out, box-shadow .18s ease-out; }
.tile:nth-child(odd) { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) rotate(-1.2deg); }
.tile:nth-child(even) { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) rotate(1deg); }
.tile:hover { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translate(-3px, -3px) scale(1.02); }
.quiz-card:hover { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translate(-2px, -2px); }
.tile::after, .quiz-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .45), transparent 55%);
}
.tile:hover::after, .quiz-card:hover::after { opacity: 1; }

.hero { position: relative; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.floaters span {
  position: absolute; font-size: var(--size); opacity: .32;
  translate: calc(var(--px, 0) * var(--depth) * -36px) calc(var(--py, 0) * var(--depth) * -36px);
  transition: translate .4s ease-out;
  animation: bob var(--dur) ease-in-out infinite alternate;
}
@keyframes bob { from { transform: translateY(-12px) rotate(-10deg); } to { transform: translateY(14px) rotate(10deg); } }

/* ---------- live activity ---------- */

.online-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 6px 14px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 15px;
}
.pulse-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--emerald); border: 2px solid var(--ink); }
.pulse-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--emerald); animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.35); } }
.online-pill.bump b { display: inline-block; animation: bump .4s ease-out; }

.side-stack { display: grid; gap: 32px; }
.live-card { padding: 24px; }
.live-card .sub { font-size: 14px; color: var(--ink-soft); margin: 6px 0 10px; font-weight: 600; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 9px 6px; border-top: 2px dashed var(--rule); font-size: 14px; font-weight: 600; border-radius: 10px; }
.feed-item:first-child { border-top: 0; }
.feed-item .fi { font-size: 18px; }
.feed-item .fa { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.feed-item.new { animation: feedIn .7s ease-out; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-12px) scale(.97); background: var(--hl); } 60% { background: var(--hl); } to { opacity: 1; transform: none; background: transparent; } }
.feed-empty { color: var(--ink-soft); font-weight: 600; font-size: 14px; padding: 8px 0; }

/* ---------- streak ---------- */

.streak-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; text-decoration: none;
  background: var(--orange-soft); border: 2px solid var(--ink); border-radius: 999px; font-weight: 900; font-size: 15px;
}
.streak-pill span, .streak-box.on .flame { display: inline-block; animation: flicker 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.12); } }

/* ---------- achievements ---------- */

.ach-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(33, 28, 61, .55); animation: fadeIn .2s ease-out; }
.ach-overlay.out { animation: fadeOut .25s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.ach-card {
  width: min(360px, 100%); padding: 28px 26px; text-align: center; display: grid; gap: 10px; justify-items: center;
  background: var(--paper); border: var(--line); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink);
  animation: achIn .55s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes achIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ach-kicker { font-weight: 900; padding: 2px 14px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
.ach-emoji {
  font-size: 84px; line-height: 1; width: 132px; height: 132px; display: grid; place-items: center;
  background: radial-gradient(circle, #FFF3B0, var(--sun)); border: var(--line); border-radius: 50%;
  animation: spinIn .9s cubic-bezier(.2, 1.3, .4, 1) .1s both;
}
@keyframes spinIn { from { transform: rotate(-200deg) scale(0); } to { transform: none; } }
.ach-card h2 { font-size: 30px; }
.ach-card p { font-weight: 600; color: var(--ink-soft); }

.badges-panel { margin-bottom: 28px; }
.badges-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.badges-head h2 { display: flex; align-items: center; gap: 10px; }
.streak-box { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; font-weight: 600; }
.streak-box.on { background: var(--orange-soft); }
.streak-box .flame { font-size: 22px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-tile {
  display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 18px; opacity: .55; filter: grayscale(1);
}
.badge-tile b { font-size: 15px; }
.badge-tile .small { color: var(--ink-soft); line-height: 1.35; }
.badge-tile .be { font-size: 36px; line-height: 1.1; }
.badge-tile.got { opacity: 1; filter: none; background: var(--paper); box-shadow: var(--pop-sm); }
.badge-tile.got:hover .be { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(14deg) scale(1.15); } }

/* ---------- duel show ---------- */

.react-dock {
  position: fixed; left: 50%; bottom: 16px; translate: -50% 0; z-index: 55; display: flex; gap: 2px; padding: 6px;
  background: var(--paper); border: var(--line); border-radius: 999px; box-shadow: var(--pop-sm);
}
.react-dock button { width: 44px; height: 44px; font-size: 24px; border: 0; background: none; border-radius: 50%; cursor: pointer; transition: transform .1s; }
.react-dock button:hover { transform: scale(1.25); background: var(--cream); }
.react-dock button:active { transform: scale(.9); }
.float-react { position: fixed; bottom: 80px; z-index: 56; display: grid; justify-items: center; gap: 2px; pointer-events: none; animation: rise 2.5s ease-out forwards; }
.float-react .e { font-size: 46px; line-height: 1; }
.float-react .n { font-size: 12px; font-weight: 800; padding: 1px 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; }
.float-react.mine .n { background: var(--sun); }
@keyframes rise {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  15% { transform: translateY(-30px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-55vh) scale(1) rotate(12deg); opacity: 0; }
}

.countdown-stage { text-align: center; padding-top: 70px; padding-bottom: 120px; }
.countdown-stage > p { font-weight: 700; font-size: 18px; }
.countdown-num { font-size: clamp(110px, 24vw, 230px); font-weight: 900; line-height: 1.1; margin: 20px 0; text-shadow: 8px 8px 0 var(--sun); }
.countdown-num.pulse { animation: cdPop .9s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cdPop { 0% { transform: scale(2.4); opacity: 0; } 35% { transform: scale(.92); opacity: 1; } 65% { transform: scale(1.05); } 100% { transform: scale(1); } }
.countdown-players { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.countdown-players .avatar { animation: bob 1.2s ease-in-out infinite alternate; }
.countdown-players .avatar:nth-child(2n) { animation-delay: -.6s; }

.podium-stage { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 30px 0 18px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; }
.pod .avatar { width: 54px; height: 54px; font-size: 22px; }
.pod-1 .avatar { width: 72px; height: 72px; font-size: 30px; box-shadow: var(--pop-sm); }
.pod-name { font-size: 16px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pod-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.pod-block {
  width: 100%; display: grid; justify-items: center; padding-top: 12px; font-size: 34px; font-weight: 900;
  border: var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; transform-origin: bottom;
}
.pod-1 .pod-block { height: 170px; background: var(--sun); }
.pod-2 .pod-block { height: 120px; background: var(--silver); }
.pod-3 .pod-block { height: 90px; background: var(--bronze); }
.podium-stage.animate .pod-block { animation: grow .8s cubic-bezier(.2, 1.3, .4, 1) both; }
.podium-stage.animate .pod > :not(.pod-block) { animation: fadeUp .45s ease-out both; }
.podium-stage.animate .pod-3 .pod-block { animation-delay: .1s; }
.podium-stage.animate .pod-2 .pod-block { animation-delay: .4s; }
.podium-stage.animate .pod-1 .pod-block { animation-delay: .7s; }
.podium-stage.animate .pod-3 > :not(.pod-block) { animation-delay: .6s; }
.podium-stage.animate .pod-2 > :not(.pod-block) { animation-delay: .9s; }
.podium-stage.animate .pod-1 > :not(.pod-block) { animation-delay: 1.2s; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.room { padding-bottom: 110px; }

@media (max-width: 720px) {
  .pod { width: 31%; }
  .pod-1 .pod-block { height: 130px; }
  .pod-2 .pod-block { height: 95px; }
  .pod-3 .pod-block { height: 70px; }
  .react-dock button { width: 38px; height: 38px; font-size: 21px; }
}

.account .who { white-space: nowrap; }

/* ---------- game effects: fly-up points, combo, timer pulse, result count-up ---------- */

.fly-points {
  position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, -50%);
  font-size: 30px; font-weight: 900; padding: 2px 16px; white-space: nowrap;
  background: var(--ok); border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--pop-sm);
  animation: flyUp 1.2s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes flyUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -95%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -280%) scale(.95); }
}

.score-pill.bump b { display: inline-block; animation: bump .45s ease-out; }

.combo {
  display: inline-block; padding: 2px 12px; font-weight: 900; font-size: 15px;
  background: var(--orange-soft); border: 2px solid var(--ink); border-radius: 999px;
  animation: comboPop .55s cubic-bezier(.2, 1.6, .4, 1);
}
.combo.hot { background: var(--ruby); animation: comboPop .55s cubic-bezier(.2, 1.6, .4, 1), comboGlow 1s ease-in-out .55s infinite alternate; }
@keyframes comboPop { from { transform: scale(0) rotate(-25deg); } to { transform: none; } }
@keyframes comboGlow { to { box-shadow: 0 0 0 5px rgba(255, 92, 138, .35); transform: scale(1.06); } }

.timer.low { animation: timerPulse .45s ease-in-out infinite alternate; }
@keyframes timerPulse { from { transform: scaleY(1); } to { transform: scaleY(1.35); box-shadow: 0 0 0 4px rgba(255, 92, 138, .35); } }

.result .score { font-variant-numeric: tabular-nums; }
.result-stats.stagger > div { animation: fadeUp .45s ease-out both; }
.result-stats.stagger > div:nth-child(1) { animation-delay: 1.3s; }
.result-stats.stagger > div:nth-child(2) { animation-delay: 1.45s; }
.result-stats.stagger > div:nth-child(3) { animation-delay: 1.6s; }

/* ---------- responsive fixes (phones & small screens) ---------- */

fieldset { min-width: 0; }
.answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer { min-width: 0; overflow-wrap: anywhere; }
.answer .mark { flex: none; }
.seg { flex-wrap: wrap; max-width: 100%; }
.question-text, .tile .name, .quiz-card h3, .h1, .h2 { overflow-wrap: break-word; }
.picker label { max-width: 100%; }
.picker span { max-width: 100%; }

@media (max-width: 720px) {
  .answers { grid-template-columns: minmax(0, 1fr); }
  .answer { padding-right: 12px; flex-wrap: wrap; row-gap: 6px; }
  .answer .mark { margin-left: 0; margin-right: 0; }
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
  .btn.icon { padding: 0; }
  .popover { position: fixed; left: var(--gutter); right: var(--gutter); width: auto; }
  .seg button { padding: 7px 10px; font-size: 15px; }
  .controls .select { min-width: 0; width: 100%; }
  .profile-head > div:last-child { width: 100%; }
  .join-inline { flex-wrap: wrap; }
  .join-inline .input { flex: 1; min-width: 0; }
  .head-actions { gap: 10px; }
  .countdown-num { font-size: clamp(72px, 26vw, 140px); }
}

@media (max-width: 400px) {
  :root { --gutter: 12px; }
  .h1 { font-size: 34px; }
  .play, .auth { padding: 16px; }
  .answer { padding-left: 62px; font-size: 16px; }
  .react-dock button { width: 34px; height: 34px; font-size: 19px; }
  .pod-name { font-size: 13px; }
  .code-cells .cell { width: 40px; height: 52px; font-size: 26px; }
}

/* ანიმაციები (კონფეტი, რეაქციები, ათვლა) გვერდს ჰორიზონტალურად არ უნდა აგორებდეს */
body { overflow-x: clip; }
.countdown-stage { overflow: hidden; }
.admin-section > h2 { flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero-grid, .two-col, .room-grid, .home-bottom { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .table th, .table td { padding: 10px 8px; }
  .table th:first-child { width: auto !important; }
  .table .handle { display: none; }
  .duel-card, .board-mini, .live-card, .panel, .daily-card { padding: 18px; }
  .join-inline .input { width: auto; }
}

.side-stack { grid-template-columns: minmax(0, 1fr); }
.board-mini li > *, .feed-item > *, .scores li > *, .list li > * { min-width: 0; }
.feed-item .ft { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stats-3 .stat { padding: 12px; }
  .stats-3 .stat .v { font-size: 26px; }
  .stats-3 .stat .k { font-size: 12px; }
}

.stat { min-width: 0; }
.stat .k { overflow-wrap: break-word; }
@media (max-width: 420px) {
  .stats, .stats-3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stats .stat, .stats-3 .stat { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
  .stats .stat .v, .stats-3 .stat .v { font-size: 28px; min-width: 64px; }
  .stats .stat .k, .stats-3 .stat .k { margin-top: 0; font-size: 14px; }
}

/* ---------- question media: ერთი სტანდარტული 16:9 ჩარჩო ---------- */

.media-box {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; margin: 0 auto 22px;
  border: var(--line); border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: var(--pop-sm);
}
.media-box img, .media-box video, .media-box iframe { display: block; width: 100%; height: 100%; border: 0; }
.media-box img { object-fit: cover; background: var(--cream); }
.media-box video { object-fit: contain; cursor: pointer; }
.media-play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: var(--line); background: var(--sun); color: var(--ink); font-size: 32px; font-weight: 900; cursor: pointer; box-shadow: var(--pop-sm);
  transition: transform .1s;
}
.media-play:hover { transform: scale(1.08); }
.media-play[hidden] { display: none; }
.media-len {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; font-size: 13px; font-weight: 800;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; pointer-events: none;
}
.timer.paused i { background: var(--cobalt); }

.q-media { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-media.has { display: grid; gap: 10px; }
.q-media .media-box { margin: 0; max-width: 100%; }
.aq .media-box { max-width: 380px; margin: 6px 0 10px; }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(33, 28, 61, .6); animation: fadeIn .15s ease-out; }
.modal-card {
  width: min(760px, 100%); display: grid; gap: 14px; padding: 22px;
  background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 26px; }
.modal-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-actions .grow { flex: 1; }
.modal .media-box { margin: 0; max-width: 100%; }

.crop-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  border: var(--line); border-radius: 14px; background: repeating-conic-gradient(#ECE7D6 0 25%, #FFFFFF 0 50%) 0 0 / 22px 22px;
}
.crop-frame.dragging { cursor: grabbing; }
/* პროფილის ფოტოს ჭრა: კვადრატი, კუთხეები ავატარივით მომრგვალებული (გარეთა ნაწილი მუქდება) */
.crop-frame.crop-avatar { width: min(360px, 100%); justify-self: center; }
.crop-mask { position: absolute; inset: 0; border-radius: 29%; box-shadow: 0 0 0 999px rgba(33, 28, 61, .55); pointer-events: none; outline: 3px solid rgba(255, 255, 255, .85); outline-offset: -3px; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - 1px), rgba(255, 255, 255, .7) calc(33.33% - 1px), rgba(255, 255, 255, .7) 33.33%, transparent 33.33%, transparent calc(66.66% - 1px), rgba(255, 255, 255, .7) calc(66.66% - 1px), rgba(255, 255, 255, .7) 66.66%, transparent 66.66%),
    linear-gradient(to bottom, transparent calc(33.33% - 1px), rgba(255, 255, 255, .7) calc(33.33% - 1px), rgba(255, 255, 255, .7) 33.33%, transparent 33.33%, transparent calc(66.66% - 1px), rgba(255, 255, 255, .7) calc(66.66% - 1px), rgba(255, 255, 255, .7) 66.66%, transparent 66.66%);
}
.crop-zoom { display: flex; align-items: center; gap: 10px; }
.crop-zoom input, .excerpt-controls input[type="range"], .excerpt-row input[type="range"] { flex: 1; accent-color: var(--ruby); width: 100%; }
.excerpt-controls { display: grid; gap: 12px; }
.excerpt-controls label { display: grid; gap: 4px; font-weight: 700; }
.excerpt-row { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: end; }

@media (max-width: 720px) {
  .media-box { border-radius: 14px; margin-bottom: 16px; }
  .media-play { width: 64px; height: 64px; font-size: 26px; }
  .modal { padding: 8px; }
  .modal-card { padding: 16px; }
  .excerpt-row { grid-template-columns: 1fr; }
}

/* რეაქციები: კუთხის ღილაკი, რომელიც იშლება (პასუხებს არ ფარავს) */
.react-dock { left: 16px; bottom: 16px; translate: none; padding: 4px; gap: 4px; align-items: center; }
.react-dock .react-toggle { width: 48px; height: 48px; font-size: 26px; flex: none; background: var(--sun); border: 2px solid var(--ink); }
.react-dock .react-toggle:hover { background: var(--sun); }
.react-dock .react-list { display: none; gap: 2px; }
.react-dock.open .react-list { display: flex; }
.react-dock:not(.open) { padding: 4px; border-radius: 50%; }
@media (max-width: 400px) {
  .react-dock { left: 10px; bottom: 10px; }
  .react-dock .react-toggle { width: 42px; height: 42px; font-size: 22px; }
}

.trim-progress { display: grid; gap: 6px; }
.trim-progress[hidden] { display: none; }
.trim-progress i { display: block; height: 14px; width: 0; background: var(--emerald); border: 2px solid var(--ink); border-radius: 8px; transition: width .1s linear; }
.trim-progress span { font-size: 14px; font-weight: 700; }

/* მთავარი გვერდის ქვედა ნაწილი: ლიდერბორდი და ცოცხალი ლენტი გვერდიგვერდ */
.home-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hero-copy .hero-actions { margin-top: 28px; }
.hero .online-pill { margin-top: 22px; }
@media (max-width: 960px) {
  .home-bottom { grid-template-columns: minmax(0, 1fr); }
}

#dailyFeedback:empty { display: none; }

/* ავტომატური გადასვლა: ღილაკზე ივსება ზოლი */
.btn.auto { position: relative; overflow: hidden; }
.btn.auto::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 5px; background: var(--sun);
  transform-origin: left; animation: autoFill var(--auto, 1s) linear forwards;
}
@keyframes autoFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- „იცოდით?“ — ახსნა პასუხის შემდეგ ---------- */

.explain {
  margin-top: 18px; padding: 14px 18px; display: grid; gap: 6px;
  background: var(--teal-soft); border: var(--line); border-radius: 18px; box-shadow: var(--pop-sm);
  animation: fadeUp .35s ease-out both;
}
.explain-k {
  justify-self: start; padding: 1px 12px; font-size: 14px; font-weight: 900;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
}
.explain p { font-weight: 600; font-size: 16px; line-height: 1.5; }
.explain.held::after { content: "⏸ ავტომატური გადასვლა შეჩერდა. გადადი ღილაკით."; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.daily-card .explain { margin-top: 12px; }
.explain-field label { font-size: 14px; }
.explain-field textarea { min-height: 56px; padding: 10px 14px; resize: vertical; line-height: 1.4; }
.aq-explain { margin: 4px 0 6px; padding: 6px 10px; font-size: 14px; font-weight: 600; background: var(--teal-soft); border: 2px solid var(--ink); border-radius: 12px; }
.aq-form textarea[data-x] { min-height: 52px; padding: 10px 14px; }

/* ---------- რეჟიმები: ფილები მთავარზე და ჰაბი ---------- */

.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mode-tile {
  text-decoration: none; padding: 18px; display: flex; flex-direction: column; gap: 6px; position: relative;
  background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--pop-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mode-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--c); border-bottom: var(--line); border-radius: 19px 19px 0 0; }
.mode-tile:hover { transform: translate(-3px, -3px); box-shadow: var(--pop); }
.mode-tile .mode-emoji {
  margin-top: 10px; width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px;
  background: var(--c); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-6deg);
}
.mode-tile .name { font-weight: 900; font-size: 22px; line-height: 1.15; margin-top: 4px; }
.mode-tile .desc { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.mode-tile .meta {
  margin-top: auto; align-self: start; font-size: 13px; font-weight: 800; padding: 3px 10px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
}

.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.mode-cards .panel + .panel { margin-top: 0; }
.mode-card { display: grid; gap: 14px; position: relative; overflow: hidden; padding-top: 34px; }
.mode-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--c); border-bottom: var(--line); }
.mode-card-head { display: flex; gap: 14px; align-items: center; }
.mode-card-head .sticker { background: var(--c); }
.mode-card h2 { margin-bottom: 0; }
.rule-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rule-list li { position: relative; padding-left: 26px; font-weight: 600; font-size: 15px; }
.rule-list li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--sun)); border: 2px solid var(--ink); }
.mode-record { font-weight: 600; }
.mode-record b { padding: 0 8px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
.mini-top { list-style: none; margin: 0; padding: 0; }
.mini-top li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 2px dashed var(--rule); }
.mini-top li:first-child { border-top: 0; }
.mini-top a { text-decoration: none; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-top a:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel .countdown-line { color: var(--text); font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.mini-h { font-size: 17px; font-weight: 900; margin: 22px 0 10px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; text-decoration: none; font-weight: 700; font-size: 15px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
}
.cat-chip b { min-width: 24px; text-align: center; padding: 0 6px; background: var(--c); border: 2px solid var(--ink); border-radius: 999px; font-size: 13px; }
.cat-chip:hover { background: var(--cream); transform: translate(-1px, -1px); }

/* ---------- რეჟიმები: თამაში და შედეგი ---------- */

.run-intro-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.run-intro-head .sticker { background: var(--c); }
.run-intro .rule-list { margin-bottom: 16px; }
.run-pills { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.run-count {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px; font-weight: 700;
  background: var(--paper); border: var(--line); border-radius: 999px; box-shadow: var(--pop-sm);
}
.run-count b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pip.done { background: var(--pip-done); }
.blitz-clock { display: flex; align-items: center; gap: 14px; margin: -6px 0 18px; }
.blitz-clock .timer { flex: 1; height: 26px; margin: 0; border-radius: 13px; }
.blitz-clock .timer i { background: var(--saffron); }
.blitz-clock .timer.low i { background: var(--ruby); }
.blitz-clock b { min-width: 72px; text-align: right; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.penalty { padding: 2px 10px; font-weight: 900; background: var(--ruby-soft); border: 2px solid var(--ink); border-radius: 999px; }
.fly-points.penalty { background: var(--bad); font-size: 26px; }
.run-blitz .answer { min-height: 66px; }

.run-result .score small { font-size: .26em; font-weight: 800; }
.missed { margin-top: 32px; border-top: 3px dashed var(--rule); padding-top: 22px; }
.missed h2 { margin-bottom: 12px; }
.missed ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.missed li { padding: 14px 16px; background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; display: grid; gap: 6px; }
.m-q { font-weight: 800; }
.m-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-ok, .chip-bad { padding: 1px 10px; font-weight: 700; font-size: 14px; border: 2px solid var(--ink); border-radius: 999px; }
.chip-ok { background: var(--emerald-soft); }
.chip-bad { background: var(--ruby-soft); text-decoration: line-through; }
.m-e { font-size: 15px; font-weight: 600; color: var(--ink-soft); }

/* ---------- გაზიარება, პროფილი ---------- */

.share-preview { width: min(420px, 100%); height: auto; margin: 0 auto; border: var(--line); border-radius: 18px; box-shadow: var(--pop-sm); }

.stats-modes { margin-top: -10px; }
.stats-modes .stat:nth-child(1) { background: var(--emerald-soft); }
.stats-modes .stat:nth-child(2) { background: var(--saffron-soft); }
.stats-modes .stat:nth-child(3) { background: var(--plum-soft); }

@media (max-width: 1100px) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .mode-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .mode-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mode-tile { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; }
  .mode-tile .mode-emoji { margin-top: 8px; }
  .mode-tile .name { margin-top: 8px; }
  .mode-tile .desc, .mode-tile .meta { grid-column: 1 / -1; }
  .mode-tile .meta { justify-self: start; }
  .blitz-clock b { font-size: 20px; min-width: 60px; }
  .run-count b { font-size: 17px; }
}

/* ---------- პროფილი: ავატარის შეცვლა, დამატებითი მაჩვენებლები ---------- */

.avatar-wrap { position: relative; flex: none; }
.avatar-edit {
  position: absolute; right: -10px; bottom: -8px; width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 17px; cursor: pointer; background: var(--paper); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm);
}
.avatar-edit:hover { transform: translate(-1px, -1px) rotate(-8deg); }
.profile-head .avatar.has-emoji { font-size: 54px; }
.stats-extra { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: -10px; }
.stats-extra .stat:nth-child(1) { background: var(--emerald-soft); }
.stats-extra .stat:nth-child(2) { background: var(--saffron-soft); }
.stats-extra .stat:nth-child(3) { background: var(--plum-soft); }
.stats-extra .stat:nth-child(4) { background: var(--teal-soft); }
.stats-extra .stat:nth-child(5) { background: var(--ruby-soft); }

.avatar-picker { display: grid; gap: 14px; }
.ap-preview { justify-self: center; }
.ap-preview .avatar { width: 96px; height: 96px; border-radius: 28px; font-size: 42px; box-shadow: var(--pop); }
.ap-preview .avatar.has-emoji { font-size: 56px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.ap-emoji {
  height: 48px; display: grid; place-items: center; font-size: 26px; font-weight: 900; cursor: pointer;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px;
}
.ap-emoji[aria-pressed="true"] { background: var(--sun); box-shadow: var(--pop-sm); transform: translate(-1px, -1px); }
.ap-colors { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ap-color { width: 44px; height: 44px; border-radius: 50%; cursor: pointer; background: var(--c); border: 3px solid var(--ink); }
.ap-color[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--text); }

/* ---------- ლიდერბორდი: პოდიუმი, ავატარები, ადგილის ცვლილება ---------- */

.lb-podium { margin: 8px 0 26px; }
a.pod { text-decoration: none; color: inherit; }
a.pod:hover .pod-name { text-decoration: underline; }
.lb-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-who .grow { min-width: 0; }
.lb-who .avatar { width: 36px; height: 36px; font-size: 15px; border-radius: 12px; border-width: 2px; }
.lb-note { margin-top: 4px; font-weight: 600; }
.chg { display: inline-block; min-width: 44px; padding: 1px 8px; font-size: 13px; font-weight: 900; text-align: center; border: 2px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.chg.up { background: var(--emerald-soft); }
.chg.down { background: var(--ruby-soft); }
.chg.same { background: var(--cream); }
.chg.new { background: var(--sun); font-size: 12px; }
.table tr.gap td { padding: 4px 16px; text-align: center; color: var(--ink-soft); font-weight: 900; letter-spacing: .3em; }

/* ემოჯი-ავატარი: ემოჯი ასოზე დიდია */
.avatar.has-emoji { font-size: 24px; line-height: 1; }
.lb-who .avatar.has-emoji { font-size: 20px; }
.pod .avatar.has-emoji { font-size: 30px; }
.pod-1 .avatar.has-emoji { font-size: 40px; }

@media (max-width: 720px) {
  .lb-who .avatar { width: 30px; height: 30px; font-size: 13px; }
  .chg { min-width: 36px; padding: 1px 6px; font-size: 12px; }
}

/* ---------- ტელეფონის ქვედა მენიუ და „მეტი“ პანელი ---------- */

.tabbar { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 85; display: grid; align-items: end; background: rgba(33, 28, 61, .5); animation: fadeIn .15s ease-out; }
.sheet {
  display: grid; gap: 8px; padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: var(--line); border-radius: 26px 26px 0 0; animation: sheetUp .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet-handle { justify-self: center; width: 46px; height: 5px; margin-bottom: 6px; border-radius: 3px; background: var(--rule); }
.sheet a, .sheet button {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; text-align: left;
  font: inherit; font-weight: 800; color: inherit; text-decoration: none; cursor: pointer;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 16px;
}
.sheet .si { font-size: 22px; width: 28px; text-align: center; }
@keyframes sheetUp { from { transform: translateY(100%); } }

@media (max-width: 720px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: var(--line);
  }
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 54px; padding: 4px 2px;
    font: inherit; font-size: 11px; font-weight: 800; color: inherit; text-decoration: none; cursor: pointer;
    background: none; border: 2px solid transparent; border-radius: 14px;
  }
  .tabbar .ti { font-size: 22px; line-height: 1.15; }
  .tabbar [aria-current] { background: var(--sun); border-color: var(--ink); }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.in-game { padding-bottom: 0; }
  body.in-game .tabbar { display: none; }
  #logoutBtn { display: none; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.in-game .toasts { bottom: 16px; }
}

/* ---------- მთავარი: „შენი დღე“ შესული მოთამაშისთვის ---------- */

.dash-hello { font-weight: 800; font-size: 19px; color: var(--ink-soft); }
.dash-title { font-size: clamp(32px, 3.8vw, 48px); margin: 2px 0 18px; overflow-wrap: anywhere; }
.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.dash-stat {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; text-align: left;
  padding: 10px 14px; background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: var(--pop-sm);
  text-decoration: none; color: inherit; font: inherit; cursor: pointer; transition: transform .1s ease, box-shadow .1s ease;
}
.dash-stat:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.dash-stat .ic {
  grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px;
  background: var(--c, var(--cream)); border: 2px solid var(--ink); border-radius: 14px;
}
.dash-stat b { font-size: 22px; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-stat .k { font-size: 13px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }
.dash-stat.warn { background: var(--saffron-soft); }
.dash-stat.warn .k { color: var(--text); }
.cta-continue { white-space: normal; text-align: left; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
.next-hint { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.hero .dash .online-pill { margin-top: 16px; }
@media (max-width: 720px) {
  .dash-stats { gap: 10px; }
  .dash-stat { padding: 9px 10px; column-gap: 9px; }
  .dash-stat .ic { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; }
  .dash-stat b { font-size: 19px; }
  .dash-stat .k { font-size: 12px; }
}

/* ---------- ქვიზების სია: კატეგორიის ჩანართები, ფილტრები, ყდა ---------- */

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.quiz-toolbar {
  position: sticky; top: var(--header-h, 72px); z-index: 15; display: grid; gap: 10px;
  margin: 0 calc(var(--gutter) * -1) 22px; padding: 10px var(--gutter) 12px;
  background: var(--sun-bg); border-bottom: 2px dashed var(--dash);
}
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 5px 2px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; min-height: 40px;
  border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 15px; white-space: nowrap;
  background: var(--paper); border: 2px solid var(--ink);
}
.cat-tabs a:hover { background: var(--cream); }
.cat-tabs a[aria-current] { background: var(--c, var(--sun)); box-shadow: var(--pop-sm); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.quiz-sections { padding-bottom: 64px; }
.cat-title .grow { flex: 1; min-width: 0; }
.cat-title h2 a { text-decoration: none; }
.cat-title h2 a:hover { text-decoration: underline; }
.cat-title .see-all { align-self: center; flex: none; }
.quiz-card h3 a { text-decoration: none; }
.quiz-card h3 a:hover { text-decoration: underline; }
.quiz-cover { display: block; margin: -18px -18px 6px -16px; aspect-ratio: 2 / 1; overflow: hidden; border-bottom: var(--line); background: var(--cream); }
.quiz-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.quiz-card:hover .quiz-cover img { transform: scale(1.05); }

@media (max-width: 720px) {
  /* ტელეფონზე ზოლი არ ეკვრის, რომ პატარა ეკრანი არ დაიკავოს */
  .quiz-toolbar { position: static; padding-top: 4px; padding-bottom: 12px; margin-bottom: 16px; }
  .filters .seg { flex: 1 1 100%; flex-wrap: nowrap; }
  .filters .seg button { flex: 1 1 0; padding: 7px 4px; font-size: 14px; white-space: nowrap; }
  .cat-section .cat-title .grow { flex: 1 1 200px; }
  .cat-section .cat-title .see-all { margin-left: 72px; }
  .quiz-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .quiz-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px 12px 12px 22px; }
  .quiz-card .quiz-cover, .quiz-card .quiz-desc, .quiz-card .quiz-max { display: none; }
  .quiz-card-top, .quiz-card .author-line { grid-column: 1 / -1; }
  .quiz-card h3 { grid-column: 1; font-size: 17px; }
  .quiz-card .best-bar { grid-column: 1; }
  .quiz-card .btn { grid-column: 2; grid-row: 2 / span 2; margin: 0; align-self: center; }
  .cat-section .cat-title { flex-wrap: wrap; }
}

/* ---------- მუქი თემა ---------- */

/* კაშკაშა ფერად ზედაპირებზე ტექსტი ორივე თემაში მუქია */
.tabbar [aria-current], .drawer-nav a[aria-current="page"], .seg button[aria-pressed="true"], .picker input:checked + span,
.cat-tabs a[aria-current], .ap-emoji[aria-pressed="true"], .answer .key, .chip, .feedback b.ok, .feedback b.bad,
.medal.m1, .medal.m2, .medal.m3, .place.p1, .earned b, .avatar, .badge.win, .code-cells .cell, .score-pill,
.status.pending, .status.published, .status.rejected, .code-text, .q-edit legend, .opt.right .key, .count-pill,
.ach-kicker, .float-react.mine .n, .pod-block, .fly-points, .combo.hot, .mode-record b, .cat-chip b, .chg.new,
.steps li::before, .bell .count, .media-play { color: var(--ink); }

:root[data-theme="dark"] {
  color-scheme: dark;
  --sun-bg: #1B1733;
  --paper: #282242;
  --cream: #342C55;
  --rule: #443B66;
  --ink: #0C0A1A;
  --ink-soft: #BDB5DC;
  --text: #F4F1FF;
  --btn-bg: #FFD23F;
  --btn-fg: #0C0A1A;
  --field-edge: #766CAA;

  --cobalt-soft: #25356B;
  --ruby-soft: #5A2242;
  --teal-soft: #16495A;
  --saffron-soft: #583814;
  --emerald-soft: #174D3E;
  --plum-soft: #3B2C6B;
  --orange-soft: #5A331B;
  --gold-soft: #574713;
  --pink-soft: #60253F;

  --me-row: #4A3F18;
  --stat-sun: #574713;
  --hl: #574713;
  --pip-done: #4C4474;
  --ok-text: #5BE3B4;
  --bad-text: #FF8FB1;
  --dots: rgba(255, 255, 255, .05);
  --dash: rgba(255, 255, 255, .16);
}

/* დიდი ფერადი ბარათები მუქ თემაშიც ღია „სტიკერებად“ რჩება: შიგნით ღია თემის ფერებია */
:root[data-theme="dark"] :is(.tile, .duel-card, .podium .row.first, .answer.is-right, .answer.is-picked:not(.is-right)) {
  --paper: #FFFFFF;
  --cream: #FFF8DC;
  --rule: #E9E2C8;
  --text: #211C3D;
  --ink-soft: #5A5375;
  --btn-bg: #211C3D;
  --btn-fg: #FFFFFF;
  --field-edge: #211C3D;
  color: var(--text);
}
:root[data-theme="dark"] .foot { background: #0C0A1A; border-top: 2px solid var(--rule); }
:root[data-theme="dark"] .tile::after, :root[data-theme="dark"] .quiz-card::after { mix-blend-mode: soft-light; }


/* ---------- დონეები და წოდებები ---------- */

.level-track { display: block; height: 14px; border-radius: 8px; background: var(--cream); border: 2px solid var(--ink); overflow: hidden; }
.level-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--teal)); border-right: 2px solid var(--ink); }

.level-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 22px; align-items: center; margin-bottom: 28px; }
.level-badge {
  width: 92px; height: 92px; display: grid; place-items: center; font-size: 50px; line-height: 1;
  background: radial-gradient(circle, #FFF3B0, var(--sun)); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-6deg);
}
.level-k { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.panel .level-title { font-size: 34px; margin: 0 0 8px; }
.level-card .level-track { height: 16px; max-width: 560px; }
.level-next { margin-top: 8px; font-weight: 700; font-size: 15px; }
.level-ladder { grid-column: 1 / -1; list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 52px)); gap: 8px; }
.level-ladder li {
  aspect-ratio: 1; display: grid; place-items: center; font-size: 22px; position: relative;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; opacity: .4; filter: grayscale(1);
}
.level-ladder li.got { opacity: 1; filter: none; background: var(--paper); }
.level-ladder li.now { background: var(--sun); box-shadow: var(--pop-sm); transform: translate(-1px, -1px) scale(1.08); }

.dash-level { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 5px; align-items: center; max-width: 560px; margin: -4px 0 18px; text-decoration: none; color: inherit; }
.dash-level .lv-emoji {
  grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px;
  background: var(--sun); border: 2px solid var(--ink); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-6deg);
}
.dash-level .lv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.dash-level b { font-weight: 900; font-size: 16px; }
.dash-level small { font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.dash-level:hover b { text-decoration: underline; }

.lvl-chip {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 0 7px; vertical-align: 1px;
  font-size: 12px; font-weight: 900; line-height: 1.5; white-space: nowrap;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
}
.pod-lvl { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

@media (max-width: 720px) {
  .level-card { column-gap: 14px; align-items: start; }
  .level-badge { width: 62px; height: 62px; font-size: 32px; margin-top: 4px; }
  .panel .level-title { font-size: 26px; margin-bottom: 6px; }
  .level-card .level-track { width: 100%; }
  .level-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
  .pod-lvl { font-size: 11px; }
}

/* ---------- ჩატვირთვის მონახაზი ---------- */

:root { --sk: rgba(33, 28, 61, .09); --sk-shine: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] { --sk: rgba(255, 255, 255, .07); --sk-shine: rgba(255, 255, 255, .07); }
/* სწრაფ ჩატვირთვაზე მონახაზი არ უნდა „აციმციმდეს“: ჩნდება მცირე დაყოვნებით */
.loading-sk { animation: fadeIn .25s ease-out .15s both; }
.sk { display: block; position: relative; overflow: hidden; background: var(--sk); border-radius: 12px; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--sk-shine), transparent); animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 16px; margin: 12px 0; border-radius: 8px; }
.sk-h1 { height: 54px; margin-bottom: 20px; border-radius: 14px; }
.sk-title { height: 36px; margin: 20px 0 26px; }
.sk-btn { height: 58px; margin-top: 22px; border-radius: 18px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding-bottom: 64px; }
.sk-card { height: 180px; border-radius: 20px; }
.sk-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sk-answer { height: 80px; border-radius: 18px; }
.sk-tile { height: 68px; border-radius: 18px; }
.sk-panel { min-height: 420px; border-radius: 24px; }
@media (max-width: 720px) {
  .play .sk-answers { grid-template-columns: minmax(0, 1fr); }
  .sk-tile { height: 56px; }
  .sk-panel { min-height: 300px; }
}

/* ---------- ტელეფონი: თითისთვის საკმარისი ზომის ღილაკები ---------- */
@media (max-width: 720px) {
  .btn.sm { min-height: 44px; }
  .seg button { min-height: 40px; }
  .picker span { min-height: 40px; }
}
@media (max-width: 400px) {
  .account .btn.sm { min-height: 40px; }
}



/* პასუხის ტექსტი ვიწრო სვეტად არ უნდა დაიკუმშოს, როცა გვერდით „სწორი პასუხი“ წერია: წარწერა საჭიროებისას ქვემოთ გადადის */
.answer { flex-wrap: wrap; column-gap: 8px; row-gap: 6px; }
.answer > span:not(.key):not(.mark) { flex: 1 1 8em; min-width: 0; }

/* ---------- ავატარის ჩარჩოები (იხსნება დონეებით) ---------- */

@property --ring { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.avatar.frame-bronze, .avatar.frame-silver, .avatar.frame-gold, .avatar.frame-diamond, .avatar.frame-rainbow { border-width: 5px; }
.avatar.frame-bronze { border-color: #8C4A1A; box-shadow: 0 0 0 3px #D9894A; }
.avatar.frame-silver { border-color: #5F6B7C; box-shadow: 0 0 0 3px #DDE3EE; }
.avatar.frame-gold { border-color: #9A6B00; box-shadow: 0 0 0 3px #FFD23F, 0 0 14px rgba(255, 210, 63, .8); }
.avatar.frame-diamond, .avatar.frame-rainbow { border-color: transparent; }
.avatar.frame-diamond {
  background: linear-gradient(var(--c), var(--c)) padding-box, conic-gradient(from var(--ring), #9BE7FF, #FFFFFF, #7FB8FF, #E5D4FF, #9BE7FF) border-box;
  box-shadow: 0 0 0 3px #CFF3FF, 0 0 12px rgba(127, 184, 255, .6); animation: ringSpin 4s linear infinite;
}
.avatar.frame-rainbow {
  background: linear-gradient(var(--c), var(--c)) padding-box, conic-gradient(from var(--ring), #FF5C8A, #FF9F1C, #FFD23F, #1FBF8F, #4C7DFF, #A06CFF, #FF5C8A) border-box;
  box-shadow: 0 0 12px rgba(160, 108, 255, .55); animation: ringSpin 3s linear infinite;
}
@keyframes ringSpin { to { --ring: 360deg; } }

.ap-h { margin: 6px 0 -4px; font-size: 15px; font-weight: 900; display: flex; gap: 8px; align-items: baseline; }
.ap-h .muted { font-size: 13px; font-weight: 700; }
.ap-emoji.locked { cursor: not-allowed; opacity: .55; position: relative; }
.ap-emoji.locked span { filter: grayscale(1); }
.ap-emoji.locked::after { content: "🔒"; position: absolute; right: -4px; bottom: -6px; font-size: 13px; }
.ap-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ap-frame {
  display: flex; align-items: center; gap: 8px; padding: 8px; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: inherit; text-align: left;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px;
}
.ap-frame small { display: block; font-size: 11px; color: var(--ink-soft); }
.ap-frame[aria-pressed="true"] { background: var(--sun); color: var(--ink); box-shadow: var(--pop-sm); }
.ap-frame.locked { cursor: not-allowed; opacity: .6; }
.ap-frame .ap-sample { width: 30px; height: 30px; border-radius: 9px; }
.ach-gift { margin-top: 2px; padding: 6px 12px; font-weight: 800; font-size: 14px; color: var(--ink); background: var(--sun); border: 2px solid var(--ink); border-radius: 12px; }

/* ---------- ლიგები ---------- */

.league-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 22px; align-items: center; margin-bottom: 18px; position: relative; overflow: hidden; }
.league-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--c); border-right: var(--line); }
.league-badge {
  margin-left: 10px; width: 84px; height: 84px; display: grid; place-items: center; font-size: 46px;
  background: var(--c); border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-6deg);
}
.league-main h2 { font-size: 32px; margin: 0; }
.league-main .countdown-line { margin: 6px 0 0; }
.league-ladder { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.league-ladder li {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; opacity: .45; filter: grayscale(1);
}
.league-ladder li.got { opacity: 1; filter: none; background: var(--paper); }
.league-ladder li.now { opacity: 1; filter: none; background: var(--sun); box-shadow: var(--pop-sm); transform: scale(1.1); }
.league-rules { margin: 0 0 22px; }
.league-table tr.z-up td:first-child { box-shadow: inset 6px 0 0 var(--emerald); }
.league-table tr.z-down td:first-child { box-shadow: inset 6px 0 0 var(--ruby); }
.zone { display: inline-block; padding: 1px 10px; font-size: 13px; font-weight: 900; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.zone.up { background: var(--emerald-soft); color: var(--text); }
.zone.down { background: var(--ruby-soft); color: var(--text); }
.dash-league {
  display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 5px 14px; text-decoration: none; font-weight: 800; font-size: 14px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: var(--pop-sm);
}
.dash-league .muted { font-weight: 700; font-size: 13px; }
.dash-league:hover { transform: translate(-1px, -1px); }
.league-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 2px 12px; text-decoration: none; font-weight: 800; font-size: 14px;
  color: var(--ink); background: var(--c); border: 2px solid var(--ink); border-radius: 999px;
}
@media (max-width: 720px) {
  .league-head { grid-template-columns: auto minmax(0, 1fr); }
  .league-ladder { grid-column: 1 / -1; }
  .league-badge { width: 64px; height: 64px; font-size: 34px; }
  .league-main h2 { font-size: 26px; }
}

/* ---------- რეჟიმი „გადიდებული სურათი“ ---------- */

.mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zoom-box .zoom-layer { position: relative; width: 100%; height: 100%; will-change: transform; }
.zoom-box.revealed .zoom-layer { transition: transform .7s cubic-bezier(.2, .8, .2, 1); }

/* ---------- ფოტოს სილუეტი: პასუხის შემდეგ ორიგინალი კადრი ---------- */

.photo-reveal .reveal-img { position: absolute; inset: 0; animation: photoReveal .9s ease .15s both; }
.reveal-tag {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 11px; border: var(--line); border-radius: 999px;
  background: var(--sun); color: var(--ink); font-size: 13px; font-weight: 800; box-shadow: var(--pop-sm);
  animation: revealTag .35s ease .8s both;
}
@keyframes photoReveal { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
@keyframes revealTag { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .photo-reveal .reveal-img, .reveal-tag { animation: none; }
}

/* ---------- რეჟიმი „სად არის?“ ---------- */

.map-box { background: #BFE3F2; }
.map-box img { object-fit: contain; cursor: crosshair; user-select: none; }
.map-box.done img { cursor: default; }
.map-pin {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 3px solid var(--ink); box-shadow: 0 2px 0 var(--ink); pointer-events: none; animation: pinDrop .35s cubic-bezier(.2, 1.6, .4, 1);
}
.map-pin.guess { background: var(--ruby); }
.map-pin.target { background: var(--emerald); width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.map-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-line line { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 10 8; }
.map-label {
  position: absolute; transform: translate(-50%, -150%); padding: 2px 10px; white-space: nowrap; pointer-events: none;
  font-size: 14px; font-weight: 900; color: var(--ink); background: #FFFFFF; border: 2px solid var(--ink); border-radius: 999px;
}
@keyframes pinDrop { from { transform: translateY(-14px) scale(.6); opacity: 0; } }

@media (max-width: 1100px) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mode-grid { grid-template-columns: minmax(0, 1fr); }
  .map-label { font-size: 12px; }
}

/* ---------- პროფილის ფოტო ---------- */

.avatar.has-photo { overflow: hidden; }
.avatar.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ap-upload { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; text-align: center; }
.ap-photo-slot { display: contents; }
.ap-photo-slot[hidden], .ap-colors[hidden] { display: none; }
.ap-photo-tile { padding: 0; overflow: hidden; }
.ap-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit.danger { left: -10px; right: auto; background: var(--ruby-soft); }

/* ---------- ხმოვანი კითხვა (ჩანაწერი) ---------- */

.audio-box {
  display: grid; place-items: center; align-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 38%, #3D3170, #211C3D 72%);
}
.audio-play {
  position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 2px;
  width: 116px; height: 116px; border-radius: 50%; border: var(--line); background: var(--sun); color: #211C3D;
  font: inherit; font-weight: 900; cursor: pointer; box-shadow: 4px 4px 0 #0C0A1A; transition: transform .1s;
}
.audio-play:hover { transform: scale(1.06); }
.audio-play .ap-icon { font-size: 34px; line-height: 1; }
.audio-play .ap-text { font-size: 13px; }
.audio-box.playing .audio-play { box-shadow: 0 0 0 8px rgba(255, 210, 63, .25), 4px 4px 0 #0C0A1A; }
.audio-eq { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 46px; pointer-events: none; }
.audio-eq i { width: 9px; height: 18%; border-radius: 5px; background: #FFD23F; opacity: .9; transition: height .3s; }
.audio-eq i:nth-child(3n + 2) { background: #4FD1C5; }
.audio-eq i:nth-child(3n) { background: #FF7AA2; }
.audio-box.playing .audio-eq i { animation: eqBar .8s ease-in-out infinite alternate; }
.audio-eq i:nth-child(2n) { animation-delay: -.35s; }
.audio-eq i:nth-child(3n) { animation-delay: -.6s; animation-duration: .65s; }
.audio-eq i:nth-child(5n) { animation-delay: -.15s; animation-duration: .95s; }
@keyframes eqBar { from { height: 14%; } to { height: 100%; } }
.audio-note { margin-top: 12px; }
@media (max-width: 720px) {
  .audio-box { gap: 8px; }
  .audio-play { width: 84px; height: 84px; }
  .audio-play .ap-icon { font-size: 26px; }
  .audio-eq { height: 30px; gap: 4px; }
  .audio-eq i { width: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .audio-box.playing .audio-eq i { animation: none; height: 60%; }
}

/* ---------- კატეგორიის ლიდერბორდები ---------- */

.lb-cat-tabs { margin: -6px 0 22px; }
.lb-cat-name {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; padding: 4px 16px; vertical-align: middle;
  font-size: .45em; border: var(--line); border-radius: 999px; background: var(--c); box-shadow: var(--pop-sm); color: #211C3D;
}
.cat-leaders {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; padding: 10px 14px;
  background: var(--paper); border: var(--line); border-left: 10px solid var(--c); border-radius: 16px; box-shadow: var(--pop-sm);
}
.cl-title { font-weight: 900; }
.cl-list { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; flex: 1; }
.cl-list li { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cl-list a { color: var(--text); text-decoration: none; }
.cl-list a:hover { text-decoration: underline; }
.cl-list b { color: var(--ink-soft); font-size: 14px; }
.cl-list .avatar { width: 30px; height: 30px; font-size: 13px; border-radius: 10px; border-width: 2px; }
.cl-list .avatar.has-emoji { font-size: 17px; }
@media (max-width: 720px) {
  .lb-cat-name { margin: 8px 0 0; font-size: .5em; display: flex; width: fit-content; }
  .cat-leaders .btn { width: 100%; }
}

/* ---------- „გამოიცანი სიტყვა“ (ქართული ვორდლი) ---------- */

.wordle { max-width: 640px; }
.wd-head { text-align: center; }
.wd-head .lede { margin-inline: auto; }
.wd-num { font-size: .55em; color: var(--ink-soft); }
.wd-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin-top: 6px; }
.wd-board { --tile: min(60px, calc((100vw - 2 * var(--gutter) - (var(--n, 5) - 1) * 7px) / var(--n, 5))); display: grid; gap: 7px; justify-content: center; margin: 4px auto 22px; }
.wd-row { display: grid; grid-template-columns: repeat(var(--n, 5), var(--tile)); gap: 7px; }
.wd-tile {
  display: grid; place-items: center; width: var(--tile, 60px); height: var(--tile, 60px); font-size: calc(var(--tile, 60px) * .5); font-weight: 900; color: var(--text);
  background: var(--paper); border: 3px solid var(--rule); border-radius: 12px; user-select: none;
}
.wd-tile.filled { border-color: var(--ink); animation: wdPop .12s ease-out; }
.wd-tile.s2, .wd-tile.s1, .wd-tile.s0 { border-color: var(--ink); color: #211C3D; }
.wd-tile.s2 { background: #1FBF8F; }
.wd-tile.s1 { background: #FFD23F; }
.wd-tile.s0 { background: #B9B3CF; }
.wd-tile.mini { display: inline-grid; width: 26px; height: 26px; font-size: 14px !important; font-size: 14px; border-width: 2px; border-radius: 7px; }
.wd-row.flip .wd-tile { animation: wdFlip .5s ease both; animation-delay: calc(var(--i) * .22s); }
.wd-row.shake { animation: wdShake .4s ease; }
@keyframes wdPop { 50% { transform: scale(1.1); } }
@keyframes wdFlip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes wdShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.wd-kb { display: grid; gap: 7px; max-width: 620px; margin: 0 auto; }
.wd-kb-row { display: flex; justify-content: center; gap: 5px; }
.wd-key {
  flex: 1 1 0; min-width: 0; max-width: 46px; height: 54px; padding: 0; font: inherit; font-size: 19px; font-weight: 800; cursor: pointer;
  color: var(--text); background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink);
}
.wd-key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.wd-key.wide { flex: 1.8 1 0; max-width: 92px; font-size: 13px; }
.wd-key.s2, .wd-key.s1, .wd-key.s0 { color: #211C3D; }
.wd-key.s2 { background: #1FBF8F; }
.wd-key.s1 { background: #FFD23F; }
.wd-key.s0 { background: #8F88A8; color: #FFFFFF; }
.wd-hint { text-align: center; margin-top: 14px; }
.wd-result { display: grid; gap: 12px; text-align: center; }
.wd-result .lede { margin-inline: auto; }
.wd-result .actions { justify-content: center; }
.wd-stats { display: grid; gap: 10px; }
.wd-stats .result-stats { grid-template-columns: repeat(4, 1fr); }
.wd-dist { display: grid; gap: 5px; text-align: left; }
.wd-bar { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; font-weight: 800; }
.wd-bar i {
  display: block; min-width: 26px; padding: 2px 8px; text-align: right; font-style: normal; color: #211C3D;
  background: #B9B3CF; border: 2px solid var(--ink); border-radius: 8px;
}
.wd-bar.me i { background: #1FBF8F; }
@media (max-width: 720px) {
  .wd-kb-row { gap: 3px; }
  .wd-key { height: 48px; font-size: 16px; border-radius: 8px; }
  .wd-key.wide { font-size: 11px; }
  .wd-stats .result-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .wd-row.flip .wd-tile, .wd-row.shake, .wd-tile.filled, .wd-row.win .wd-tile { animation: none; }
}

/* ---------- ქრონოლოგია ---------- */

.chrono-play, .chrono-result { display: grid; gap: 10px; margin-bottom: 18px; }
.chrono-edge { margin: 0; font-size: 13px; font-weight: 800; color: var(--ink-soft); text-align: center; }
.chrono-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; touch-action: none; }
.chrono-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: grab; user-select: none;
  background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--pop-sm);
}
.chrono-item.dragging { cursor: grabbing; opacity: .85; transform: scale(1.02); box-shadow: var(--pop); z-index: 1; }
.chrono-grip { font-size: 20px; color: var(--ink-soft); }
.chrono-text { flex: 1; display: grid; gap: 2px; }
.chrono-text small { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.chrono-btns { display: flex; gap: 4px; }
.chrono-btns .btn { padding: 4px 9px; min-height: 0; }
.chrono-list.done .chrono-item { cursor: default; }
.chrono-year {
  flex: none; min-width: 74px; padding: 4px 10px; text-align: center; font-weight: 900; color: #211C3D;
  background: var(--sun); border: 2px solid var(--ink); border-radius: 999px;
}
.chrono-marks { margin: 0; font-weight: 800; }
.chrono-play .actions { justify-content: center; }

/* ---------- მეტი თუ ნაკლები? ---------- */

.hl-stage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 14px; margin-bottom: 16px; }
.hl-card {
  display: grid; place-items: center; align-content: center; gap: 6px; min-height: 180px; padding: 18px; text-align: center;
  background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm);
}
.hl-emoji { font-size: 44px; line-height: 1; }
.hl-name { font-size: 20px; }
.hl-value { font-size: 26px; font-weight: 900; color: #211C3D; padding: 2px 14px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
.hl-value.unknown { background: var(--cream); color: var(--text); }
.hl-vs { align-self: center; display: grid; place-items: center; width: 54px; height: 54px; font-weight: 900; color: #FFFFFF; background: #211C3D; border-radius: 50%; }
.hl-stage.ok .hl-b { border-color: var(--ok); box-shadow: 0 0 0 4px var(--ok); }
.hl-stage.bad .hl-b { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad); }
.hl-stage.ok .hl-b .hl-value, .hl-stage.bad .hl-b .hl-value { animation: wdPop .3s ease; }
.hl-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hl-btn { min-width: 170px; }
.hl-btn.up { background: var(--emerald); }
.hl-btn.down { background: var(--ruby); }
.hl-theme-name { display: block; margin-top: 6px; font-size: .5em; color: var(--ink-soft); }
.hl-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hl-theme {
  display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); text-decoration: none;
  background: var(--paper); border: var(--line); border-left: 10px solid var(--c); border-radius: 18px; box-shadow: var(--pop-sm);
}
.hl-theme:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.hl-theme-emoji { font-size: 36px; }
.hl-theme .grow { display: grid; gap: 2px; }
.hl-theme small { color: var(--ink-soft); font-weight: 600; }
.hl-theme-best { font-size: 13px; font-weight: 700; color: var(--ink-soft); text-align: right; }
@media (max-width: 720px) {
  .hl-stage { grid-template-columns: 1fr; gap: 8px; }
  .hl-card { min-height: 0; padding: 12px; }
  .hl-vs { justify-self: center; width: 42px; height: 42px; }
  .hl-btn { min-width: 0; flex: 1; }
  .chrono-item { padding: 10px; gap: 8px; }
  .chrono-year { min-width: 60px; font-size: 13px; }
}

/* ---------- „ვიცი ლაივი“: ჯგუფური თამაში დიდ ეკრანზე ---------- */

.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.live-card { display: grid; gap: 14px; align-content: start; }
.live-card .field { display: grid; gap: 6px; font-weight: 700; }
.live-card .field[hidden] { display: none; }
.live-join { display: flex; gap: 10px; flex-wrap: wrap; }
.live-code-input { flex: 1; min-width: 160px; font-size: 30px; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; text-align: center; }

/* ოთახის ოთხი ფერი და ფორმა */
.lo-0 { --lo: #E5484D; }
.lo-1 { --lo: #3E63DD; }
.lo-2 { --lo: #FFB224; }
.lo-3 { --lo: #30A46C; }

/* დიდი ეკრანი: საიტის მენიუ იმალება */
body.live-stage .top, body.live-stage .foot, body.live-stage .tabbar { display: none; }
body.live-stage { background: #211C3D; }
.live-host { min-height: 100vh; padding: 18px clamp(16px, 3vw, 40px) 32px; color: #FFFFFF; display: grid; align-content: start; gap: 18px; }
.live-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.live-brand { font-size: 22px; font-weight: 900; }
.live-brand b { color: #FFD23F; }
.live-room { font-weight: 700; opacity: .85; }
.live-room b { letter-spacing: .12em; color: #FFD23F; }
.live-host .btn.ghost { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.live-host .btn.ghost:hover { background: rgba(255, 255, 255, .12); }

.live-lobby { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(18px, 3vw, 40px); align-items: start; }
.live-join-box { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 22px; color: #211C3D; background: #FFFFFF; border-radius: 24px; box-shadow: 8px 8px 0 #0C0A1A; }
.live-step { margin: 0; font-weight: 700; color: #5B547A; }
.live-url { margin: 0; font-size: clamp(18px, 2vw, 26px); font-weight: 900; word-break: break-all; }
.live-qr { width: min(260px, 70vw); }
.live-qr svg { display: block; width: 100%; height: auto; }
.live-bigcode { margin: 0; font-size: clamp(48px, 7vw, 86px); font-weight: 900; letter-spacing: .15em; line-height: 1; }
.live-wait { display: grid; gap: 14px; align-content: start; }
.live-wait h1 { font-size: clamp(30px, 4vw, 54px); color: #FFFFFF; }
.live-wait .lede { color: #DDD8F0; }
.live-players { display: flex; flex-wrap: wrap; gap: 10px; }
.live-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; font: inherit; font-size: 20px; font-weight: 800; cursor: pointer;
  color: #211C3D; background: #FFF6D2; border: 3px solid #0C0A1A; border-radius: 999px; animation: wdPop .25s ease;
}
.live-chip.off { opacity: .45; }
.live-wait .btn.big { justify-self: start; font-size: 22px; }

.live-q { display: grid; gap: 16px; }
.live-qhead { display: flex; align-items: center; gap: 16px; font-weight: 800; }
.live-qnum { padding: 4px 14px; color: #211C3D; background: #FFD23F; border-radius: 999px; }
.live-timer { flex: 1; height: 14px; background: rgba(255, 255, 255, .15); border-radius: 999px; overflow: hidden; }
.live-timer i { display: block; height: 100%; background: #FFD23F; transform-origin: left; }
.live-secs { min-width: 54px; font-size: 34px; font-weight: 900; text-align: right; }
.live-answered { opacity: .85; }
/* კითხვა დიდ ეკრანზე: ოთახის ბოლოდანაც უნდა იკითხებოდეს */
.live-qtext { margin: 0; padding: 8px 0; font-size: clamp(36px, 5.4vw, 84px); line-height: 1.15; text-align: center; color: #FFFFFF; text-wrap: balance; }
.live-q.reveal .live-qtext { font-size: clamp(28px, 3.8vw, 56px); }
.live-media { margin: 0 auto; max-width: min(720px, 90vw); }
.live-media img { display: block; width: 100%; max-height: 38vh; object-fit: contain; border-radius: 18px; background: #FFFFFF; }
.live-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.live-opt {
  position: relative; display: flex; align-items: center; gap: 16px; min-height: clamp(70px, 11vh, 120px); padding: 14px 20px;
  font-size: clamp(24px, 3vw, 44px); font-weight: 800; color: #FFFFFF; background: var(--lo); border-radius: 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
  transition: opacity .3s, transform .3s;
}
.lo-2.live-opt, .lo-2.live-pbtn { color: #211C3D; }
.live-opt.dim { opacity: .3; }
.live-opt.right { transform: scale(1.02); box-shadow: 0 0 0 6px #FFFFFF, 0 6px 0 rgba(0, 0, 0, .3); }
.lo-shape { font-size: 1.3em; line-height: 1; }
.lo-text { flex: 1; }
.lo-count { display: flex; align-items: flex-end; gap: 8px; height: 60px; }
.lo-count i { display: block; width: 18px; min-height: 4px; background: rgba(255, 255, 255, .8); border-radius: 4px 4px 0 0; }
.lo-check { font-size: 1.4em; }
.live-after { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 18px; align-items: start; }
.live-after .btn.big { grid-column: 1 / -1; justify-self: center; font-size: 22px; }
.live-explain { margin: 0; padding: 16px 18px; font-size: clamp(16px, 1.6vw, 22px); color: #211C3D; background: #FFF6D2; border-radius: 18px; }
.live-side { padding: 14px 16px; color: #211C3D; background: #FFFFFF; border-radius: 18px; }
.live-side h2 { font-size: 20px; margin-bottom: 6px; }
.live-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.live-board li { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.live-board .lb-pts { margin-left: auto; font-weight: 900; }
.live-board small { color: #30A46C; font-weight: 800; }
.live-board .lb-av { font-size: 22px; }
.live-board.all { max-width: 640px; margin: 0 auto; padding: 16px; color: #211C3D; background: #FFFFFF; border-radius: 18px; }
.live-controls { display: flex; justify-content: center; }
.live-next-in { display: inline-grid; place-items: center; min-width: 1.8em; margin-left: 6px; padding: 0 6px; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .7); border-radius: 999px; }

.live-final { display: grid; gap: 20px; text-align: center; }
.live-final h1 { color: #FFFFFF; font-size: clamp(28px, 3.6vw, 50px); }
.live-podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; }
.live-pod { display: grid; justify-items: center; gap: 4px; width: clamp(110px, 16vw, 200px); font-size: 20px; }
.lp-av { font-size: 54px; }
.lp-block { width: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: #211C3D; border-radius: 14px 14px 0 0; }
.live-pod-1 .lp-block { height: 190px; background: #FFD23F; }
.live-pod-2 .lp-block { height: 140px; background: #DDE3EE; }
.live-pod-3 .lp-block { height: 100px; background: #F7B98C; }
.live-final .actions { justify-content: center; }

/* ტელეფონი */
.live-phone { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; display: grid; gap: 14px; }
.live-me { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--pop-sm); font-size: 18px; }
.lm-av { font-size: 26px; }
.lm-score { font-weight: 900; padding: 2px 12px; color: #211C3D; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
.live-ptext { margin: 0; font-size: clamp(22px, 6vw, 30px); font-weight: 800; line-height: 1.25; text-align: center; }
.live-pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-pbtn {
  display: grid; place-items: center; gap: 6px; min-height: 30vh; padding: 12px; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
  color: #FFFFFF; background: var(--lo); border: 0; border-radius: 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
}
.live-pbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.live-pbtn .lo-shape { font-size: 46px; }
.live-msg { display: grid; gap: 8px; place-items: center; text-align: center; padding: 34px 18px; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm); }
.live-msg p { margin: 0; }
.lm-big { font-size: 30px; font-weight: 900; }
.lm-gain { font-size: 26px; font-weight: 900; color: var(--ok); }
.live-msg.ok { background: #D7F7E8; color: #211C3D; }
.live-msg.bad { background: #FFE0E6; color: #211C3D; }
.live-join-form { display: grid; gap: 14px; }
.live-join-form .field { display: grid; gap: 6px; font-weight: 700; }

@media (max-width: 900px) {
  .live-lobby, .live-after { grid-template-columns: 1fr; }
  .live-opts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .live-chip { animation: none; }
  .live-opt { transition: none; }
}

/* ---------- კვირის მისიები, სეზონი ---------- */

.missions { display: grid; gap: 12px; }
.missions-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.missions-head h2 { font-size: 24px; }
.mission-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.mission { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; }
.mission.done { background: var(--emerald-soft); }
.mission-emoji { font-size: 28px; }
.mission .grow { display: grid; gap: 4px; min-width: 0; }
.mission small { color: var(--ink-soft); font-weight: 700; }
.mission-bar { display: block; height: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.mission-bar i { display: block; height: 100%; background: var(--emerald); }
.mission-reward, .mission-claimed { font-weight: 900; white-space: nowrap; color: var(--ink-soft); }
.mission-claimed { color: var(--ok); }
.mission-bonus { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; font-weight: 700; border: 2px dashed var(--ink); border-radius: 16px; }
.mission-bonus.ready { background: var(--sun); border-style: solid; color: #211C3D; }
.season-line { margin-top: 10px; padding: 10px 14px; font-weight: 600; background: var(--paper); border: var(--line); border-radius: 14px; }
.dash-stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.trophy-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trophy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-weight: 800; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; color: #211C3D; }

/* ---------- პროფილის სტატისტიკა ---------- */

.profile-stats { display: grid; gap: 16px; }
.ps-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ps-tile { display: grid; gap: 2px; padding: 12px 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; }
.ps-tile b { font-size: 26px; font-weight: 900; }
.ps-tile span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 24px; }
.ps-block { display: grid; gap: 8px; align-content: start; }
.ps-bars { display: grid; gap: 7px; }
.ps-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 44px; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.ps-track { height: 12px; background: var(--cream); border-radius: 999px; overflow: hidden; }
.ps-track i { display: block; height: 100%; background: var(--cobalt); border-radius: 0 4px 4px 0; }
.ps-val { text-align: right; color: var(--text); }
.ps-cols { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 170px; }
.ps-col { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.ps-colbar { position: relative; display: flex; align-items: flex-end; background: var(--cream); border-radius: 6px; }
.ps-colbar i { display: block; width: 100%; background: var(--cobalt); border-radius: 4px 4px 0 0; }
.ps-colv { color: var(--text); }
.ps-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-template-columns: repeat(12, 1fr); gap: 3px; max-width: 340px; }
.ps-heat i { display: block; aspect-ratio: 1; background: var(--cream); border-radius: 3px; }
.ps-heat i.on { background: var(--emerald); }
.ps-heat i.future { visibility: hidden; }
.ps-fast { margin: 4px 0 0; font-weight: 600; }
.ps-fast small { color: var(--ink-soft); }
.ps-records { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ps-records li { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 0; border-bottom: 2px dashed var(--rule); }
.ps-records b { margin-left: auto; white-space: nowrap; }

/* ---------- ქვიზის მონახაზი AI-ს დახმარებით ---------- */

.ai-panel { display: grid; gap: 10px; margin-bottom: 18px; border-left: 10px solid var(--teal); }
.ai-panel h2 { font-size: 22px; }
.ai-panel.off { border-left-color: var(--rule); }
.ai-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ai-row .input { flex: 1; min-width: 220px; }
.ai-count { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* ---------- აპლიკაციად დაყენება ---------- */

.foot-install { margin-top: 6px; }
.foot-install[hidden] { display: none; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-weight: 600; }

/* ---------- რეჟიმების გვერდი: ჯგუფები ---------- */

.mode-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mode-group { scroll-margin-top: 96px; }
.mode-group + .mode-group { margin-top: 44px; }
.mode-group-head { margin-bottom: 18px; }
.mode-group-title { font-size: 30px; margin: 0 0 4px; }
.mode-group-head p { margin: 0; max-width: 70ch; }
.mode-card h3 { font-size: 28px; margin: 0; }
.hl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.hl-chip:hover { background: var(--c, var(--sun)); }
.hl-chip b { padding: 0 6px; border-radius: 999px; background: var(--cream); }
@media (max-width: 640px) { .mode-group-title { font-size: 24px; } .mode-card h3 { font-size: 24px; } }
.mode-jump .chip { background: var(--paper); color: var(--text); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 800; padding: 6px 14px; min-height: 38px; }
.mode-jump .chip:hover { background: var(--sun); color: var(--ink); }
@media (max-width: 640px) {
  .mode-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); padding-bottom: 4px; }
  .mode-jump::-webkit-scrollbar { display: none; }
  .mode-jump .chip { flex: none; }
}
@media (max-width: 640px) {
  .ps-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-tile b { font-size: 22px; }
}

/* დუელების გვერდზე: ბმული ჯგუფურ თამაშზე */
.live-callout { display: flex; align-items: center; gap: 12px; margin-top: 16px; max-width: 720px; padding: 12px 16px; background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--pop-sm); color: var(--text); text-decoration: none; font-weight: 600; }
.live-callout > span:first-child { font-size: 28px; }
.live-callout > span:nth-child(2) { flex: 1; }
.live-callout:hover { background: var(--cobalt-soft); }

/* კვირის მისიები პროფილზე */
.profile-missions:not(:empty) { margin-bottom: 28px; }

/* „გამოიცანი სიტყვა“ v3: პარამეტრები, მინიშნებები, სიტყვის ბარათი, გამოწვევა, საუკეთესოები */
.wd-settings { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin: -6px 0 18px; }
.wd-len button { min-width: 68px; }
.wd-len button:disabled { opacity: .55; cursor: not-allowed; }
.wd-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; cursor: pointer; }
.wd-switch input { width: 20px; height: 20px; accent-color: var(--emerald); }
.wd-switch small { color: var(--ink-soft); font-weight: 800; }
.wd-switch.off { opacity: .55; cursor: not-allowed; }
.wd-locked { flex-basis: 100%; text-align: center; margin: 0; }
.wd-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; background: var(--cobalt-soft); border: var(--line); border-radius: 16px; font-weight: 600; }
.wd-banner > span:first-child { font-size: 26px; }
.wd-hints { display: grid; gap: 8px; justify-items: center; margin: -8px 0 16px; text-align: center; }
.wd-hint-line { margin: 0; max-width: 52ch; }
.wd-hint-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.wd-hint-row small { color: var(--ink-soft); font-weight: 600; }
.wd-pot { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.wd-pot b { color: var(--text); }
.wd-cat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; font-size: 14px; font-weight: 800; background: var(--sun); color: #211C3D; border: 2px solid var(--ink); border-radius: 999px; }
.wd-word-card { display: grid; justify-items: center; gap: 10px; padding: 16px; background: var(--cream); border: var(--line); border-radius: 18px; }
.wd-word { display: flex; gap: 6px; }
.wd-word span { display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px; font-weight: 900; color: #211C3D; background: #1FBF8F; border: 2px solid var(--ink); border-radius: 10px; }
.wd-word-card:not(.won) .wd-word span { background: var(--paper); color: var(--text); }
.wd-def { margin: 0; max-width: 52ch; font-weight: 600; }
.wd-ch-results, .wd-top > div { display: grid; gap: 8px; text-align: left; }
.wd-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; margin-top: 24px; }
.mini-top li.me { background: var(--sun-bg); border-radius: 10px; }
.wd-own { display: grid; gap: 10px; margin-bottom: 18px; border-left: 10px solid var(--cobalt); }
.wd-own h2 { font-size: 22px; }
.share-link .input { width: 100%; font-size: 14px; }
.wd-row.win .wd-tile { animation: wdFlip .5s ease both, wdBounce .5s ease both; animation-delay: calc(var(--i) * .22s), calc(1.3s + var(--i) * .08s); }
@keyframes wdBounce { 40% { transform: translateY(-14px); } 70% { transform: translateY(3px); } }
/* კონტრასტული ფერები (ფერთა აღქმის სირთულისთვის): მწვანე → ნარინჯისფერი, ყვითელი → ცისფერი */
body.wd-cb .wd-tile.s2, body.wd-cb .wd-key.s2, body.wd-cb .wd-bar.me i, body.wd-cb .wd-word span { background: #F5793A; }
body.wd-cb .wd-tile.s1, body.wd-cb .wd-key.s1 { background: #85C0F9; }
@media (max-width: 720px) {
  .wd-word span { width: 36px; height: 36px; font-size: 20px; }
  .wd-stats .result-stats { grid-template-columns: repeat(2, 1fr); }
}

/* „გამოიცანი სიტყვა“ — ტელეფონზე დაფა და კლავიატურა ერთად ეტევა; ინლაინ შეტყობინება; 5 სტატისტიკა */
.wd-board { --tile: min(60px, calc((100vw - 2 * var(--gutter) - (var(--n, 5) - 1) * 7px) / var(--n, 5)), max(34px, calc((100dvh - 330px) / 6.6))); }
.wd-msg { min-height: 1.5em; margin: -12px 0 8px; text-align: center; font-weight: 700; color: var(--ruby); }
.wd-banner-actions { margin-top: 8px; gap: 8px; }
.wd-enter-ico { display: none; }
.wd-stats .result-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .wd-head { margin-bottom: 8px; }
  .wd-head .h1 { font-size: 30px; }
  .wd-head .lede { font-size: 14px; }
  .wordle .crumbs { display: none; }
  .wd-settings { margin: -4px 0 12px; gap: 8px 12px; }
  .wd-board { gap: 5px; margin-bottom: 14px; }
  .wd-row { gap: 5px; }
  .wd-enter-txt { display: none; }
  .wd-enter-ico { display: inline; font-size: 20px; }
  .wd-stats .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-stats .result-stats > div:last-child { grid-column: 1 / -1; }
}

/* ტელეფონი: თავი, პარამეტრები და მინიშნება ერთ-ორ ხაზზე; უჯრის ზომა ეკრანის სიმაღლესაც ერგება */
.wd-cb-ico { display: none; }
@media (max-width: 720px) {
  .wd-head.page-head { padding: 12px 0 8px; }
  .wd-head .h1 { font-size: 26px; }
  .wd-head .lede { margin-top: 4px; }
  .wd-lede-txt, .wd-long { display: none; }
  .wd-legend { margin-top: 0; font-size: 12px; }
  .wd-settings { flex-wrap: nowrap; gap: 8px; margin: 0 0 10px; }
  .wd-len button { min-width: 0; padding: 0 10px; font-size: 13px; min-height: 34px; }
  .wd-switch { font-size: 13px; gap: 5px; }
  .wd-switch input { width: 18px; height: 18px; }
  .wd-cb-ico { display: inline; font-size: 18px; }
  .wd-cb-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .wd-locked { display: none; }
  .wd-board { --tile: min(60px, calc((100vw - 2 * var(--gutter) - (var(--n, 5) - 1) * 5px) / var(--n, 5)), max(34px, calc((100dvh - 470px) / 6.2))); }
  .wd-hints { margin: -6px 0 10px; gap: 6px; }
  .wd-hint-row .btn { min-height: 34px; font-size: 13px; }
  .wd-hint-row .wd-pot { font-size: 12px; }
}

@media (max-width: 720px) {
  .wd-len.seg { flex-wrap: nowrap; padding: 3px; gap: 2px; box-shadow: none; }
  .wd-len button { min-width: 36px; padding: 0 8px; }
  .wd-legend { flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
  .wd-legend .wd-tile.mini { width: 20px; height: 20px; font-size: 11px !important; }
  .wd-hint-row { flex-wrap: nowrap; gap: 8px; }
  .wd-board { --tile: min(60px, calc((100vw - 2 * var(--gutter) - (var(--n, 5) - 1) * 5px) / var(--n, 5)), max(34px, calc((100dvh - 480px) / 6.2))); }
}
@media (max-width: 720px) { .wd-hint-row small { font-size: 11px; white-space: nowrap; } }
.wd-short { display: none; }
@media (max-width: 720px) { .wd-short { display: inline; } }

.confirm-text { margin: 0 0 4px; font-weight: 600; }

/* ---------- სურათების ნაკრები (2–3 სურათი კითხვაში) ---------- */

.media-box.gallery { display: grid; grid-template-columns: repeat(var(--k, 3), minmax(0, 1fr)); gap: 10px; aspect-ratio: auto; max-width: 720px; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.media-box.gallery.n2 { --k: 2; max-width: 560px; }
.media-box.gallery.n3 { --k: 3; }
.gal-item { position: relative; display: block; padding: 0; aspect-ratio: 1; border: var(--line); border-radius: 16px; overflow: hidden; background: var(--cream); box-shadow: var(--pop-sm); cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; }
.gal-num { position: absolute; left: 6px; top: 6px; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; font-size: 14px; font-weight: 900; color: #211C3D; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; }
@media (max-width: 720px) { .media-box.gallery { gap: 6px; } .gal-item { border-radius: 12px; } .gal-num { min-width: 22px; height: 22px; font-size: 12px; left: 4px; top: 4px; } }
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(15, 12, 32, .9); }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; cursor: zoom-out; }
.lightbox img { max-width: min(92vw, 900px); max-height: 80vh; object-fit: contain; border: 3px solid #FFFFFF; border-radius: 16px; background: #FFFFFF; }
.lightbox figcaption { color: #FFFFFF; font-weight: 800; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; font-size: 30px; font-weight: 900; color: #211C3D; background: #FFFFFF; border: 3px solid #211C3D; border-radius: 50%; cursor: pointer; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: 12px; width: 44px; height: 44px; font-size: 20px; }
.gal-builder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.gal-slot { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1; padding: 6px; font: inherit; font-weight: 800; font-size: 14px; color: var(--text); background: var(--cream); border: 3px dashed var(--rule); border-radius: 14px; cursor: pointer; overflow: hidden; }
.gal-slot small { font-weight: 600; color: var(--ink-soft); font-size: 12px; }
.gal-slot.filled { border-style: solid; border-color: var(--ink); cursor: default; padding: 0; }
.gal-slot.filled img { width: 100%; height: 100%; object-fit: cover; }
.gal-slot .btn { position: absolute; right: 4px; top: 4px; }
.live-gallery { display: flex; justify-content: center; gap: 16px; }
.live-gallery span { position: relative; flex: 0 1 30%; }
.live-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; max-height: 36vh; }
.live-gallery b { position: absolute; left: 8px; top: 8px; display: grid; place-items: center; width: 34px; height: 34px; font-size: 18px; color: #211C3D; background: #FFD23F; border: 2px solid #211C3D; border-radius: 50%; }
.lightbox img { width: min(92vw, 80vh, 720px); height: auto; image-rendering: auto; }

/* კითხვის დრო: რედაქტორში და „დროის გარეშე“ თამაშში */
.q-edit-foot { flex-wrap: wrap; gap: 8px 14px; }
.q-time { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-soft); }
.q-time .select { min-height: 34px; padding: 4px 30px 4px 10px; font-size: 14px; width: auto; }
.timer.untimed { visibility: hidden; }

/* ---------- დაბალი ეკრანი (ლეპტოპი): სურათიანი კითხვა ჩამოსქროლვის გარეშე ----------
   სიგანე საკმარისია, სიმაღლე — არა: სურათი მარცხნივ, პასუხები მარჯვნივ ერთ სვეტად; სურათი ეკრანის სიმაღლეს ერგება */
@media (min-width: 900px) and (max-height: 1000px) {
  .play:has(> .media-box):has(> .answers) {
    max-width: 1160px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 26px; align-items: start;
  }
  .play:has(> .media-box):has(> .answers) > * { grid-column: 1 / -1; }
  .play:has(> .media-box):has(> .answers) > .media-box {
    grid-column: 1; margin: 0; justify-self: center;
    width: min(100%, calc((100dvh - 350px) * 16 / 9)); min-width: 320px; max-width: none;
  }
  .play:has(> .media-box.gallery):has(> .answers) > .media-box.gallery { width: 100%; min-width: 0; }
  .play:has(> .media-box):has(> .answers) > .answers { grid-column: 2; grid-template-columns: 1fr; align-self: center; gap: 10px; }
  .play:has(> .media-box):has(> .answers) > .answers .answer { min-height: 54px; padding-top: 10px; padding-bottom: 10px; }
}
/* დუელი დაბალ ეკრანზე: სურათი და პასუხები გვერდიგვერდ (900 პიქსელზე მაღალ ეკრანზე ჩვეულებრივი განლაგებაც ეტევა) */
@media (min-width: 900px) and (max-height: 900px) {
  .room:has(.room-grid > div > .question-text) { padding-top: 16px; }
  .room-grid > div:has(> .media-box):has(> .answers) {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 22px; align-items: start; padding: 20px 24px;
  }
  .room-grid > div:has(> .media-box):has(> .answers) > * { grid-column: 1 / -1; }
  .room-grid > div:has(> .media-box):has(> .answers) > .media-box {
    grid-column: 1; margin: 0; justify-self: center;
    width: min(100%, calc((100dvh - 290px) * 16 / 9)); min-width: 280px; max-width: none;
  }
  .room-grid > div:has(> .media-box.gallery):has(> .answers) > .media-box.gallery { width: 100%; min-width: 0; }
  .room-grid > div:has(> .media-box):has(> .answers) > .answers { grid-column: 2; grid-template-columns: 1fr; align-self: center; gap: 10px; }
  .room-grid > div:has(> .media-box):has(> .answers) > .answers .answer { min-height: 54px; padding-top: 10px; padding-bottom: 10px; }
}
/* ფართო და დაბალ ეკრანზე ანგარიშის სვეტი ვიწროვდება, რომ სურათს მეტი ადგილი დარჩეს */
@media (min-width: 961px) and (max-height: 900px) {
  .room-grid:has(> div > .media-box + .answers) { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
}
/* დაბალ ეკრანზე ყველა კითხვისთვის: ნაკლები დაშორება */
@media (max-height: 800px) and (min-width: 721px) {
  .play { margin: 14px auto 28px; padding: 20px 26px; }
  .play-top { margin-bottom: 12px; }
  .play .pips { margin: -4px 0 10px; }
  .timer { margin: 4px 0 14px; }
  .question-text { font-size: clamp(20px, 2.3vw, 28px); margin-bottom: 14px; }
  .next-row { margin-top: 14px; }
}

/* ---------- ზედა ზოლი ტელეფონზე ---------- */
@media (max-width: 720px) {
  .top { --handle-room: 56px; }
  .top-inner { min-height: 64px; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .menu-handle, .menu-handle:hover { width: 44px; height: 42px; border-radius: 0 13px 13px 0; }
  .menu-handle svg { width: 20px; height: 20px; }
  .brand-name { font-size: 29px; }
  .account { gap: 6px; }
  .hud-stat { gap: 4px; padding: 4px 3px; font-size: 16px; }
  .hud-stat svg { width: 21px; height: 21px; }
  .hud-btn { width: 40px; height: 40px; border-radius: 12px; }
  .hud-btn svg { width: 20px; height: 20px; }
  .account .btn.sm { min-height: 40px; padding: 0 12px; }
}
@media (max-width: 360px) {
  .hud-stat.streak { display: none; }
}

/* ---------- გვერდითა მენიუ (მარცხენა ისრიდან) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(12, 10, 26, .5); animation: fadeIn .18s ease-out; }
.drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px; padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
  background: var(--paper); border-right: var(--line); border-radius: 0 26px 26px 0; box-shadow: var(--pop);
  animation: drawerIn .26s cubic-bezier(.2, .8, .2, 1);
}
.drawer-backdrop.closing { animation: fadeOut .18s ease-in forwards; }
.drawer-backdrop.closing .drawer { animation: drawerOut .18s ease-in forwards; }
@keyframes drawerIn { from { transform: translateX(-104%); } }
@keyframes drawerOut { to { transform: translateX(-104%); } }
@keyframes fadeOut { to { opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0 2px 8px; }
.drawer-head .brand-name { font-size: 32px; }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none; background: var(--cream); border: 2px solid var(--ink); border-radius: 18px; }
.drawer-user:hover { box-shadow: var(--pop-sm); }
.drawer-user .avatar { width: 48px; height: 48px; flex: none; font-size: 19px; border-radius: 14px; border-width: 2px; }
.drawer-user .avatar.has-emoji { font-size: 26px; }
.drawer-user > span:last-child { display: grid; min-width: 0; line-height: 1.3; }
.drawer-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.drawer-user small { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.drawer-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.drawer-nav a, .drawer-extra button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 12px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 17px; color: inherit; text-align: left; text-decoration: none;
  background: none; border: 2px solid transparent; border-radius: 14px;
}
.drawer-nav a:hover, .drawer-extra button:hover { background: var(--cream); border-color: var(--ink); }
.drawer-nav a[aria-current="page"] { background: var(--sun); border-color: var(--ink); box-shadow: var(--pop-sm); }
.drawer .si { width: 28px; flex: none; text-align: center; font-size: 21px; }
.drawer-nav .badge-n {
  margin-left: auto; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: var(--ink); background: var(--ruby); border: 2px solid var(--ink); border-radius: 12px;
}
.drawer-extra { display: grid; gap: 4px; margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--rule); }
html.menu-open { overflow: hidden; }

/* ---------- მთავარი: რეჟიმების გასაქაჩი ლენტა ---------- */
/* ზემოთ ადგილი „მენიუს“ დახატული მინიშნებისთვის, რომ სათაურს არ ეხებოდეს */
.home-shelf { padding-top: 80px; }
.wrap.wide { max-width: var(--home-page); }
.shelf-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.shelf-title { margin: 0; font-size: clamp(26px, 3vw, 38px); }
.shelf-all { flex: none; min-height: 50px; white-space: nowrap; }
.shelf-actions { display: flex; align-items: center; gap: 10px; }
.shelf-arrow svg { width: 22px; height: 22px; }
.shelf-arrow[disabled] { opacity: .35; cursor: default; transform: none; box-shadow: var(--pop-sm); }
/* ტელეფონზე ლენტა თითით იქაჩება — ისრები საჭირო არ არის */
@media (max-width: 720px), (pointer: coarse) { .shelf-arrow { display: none; } }
.ribbon {
  --edge: max(var(--gutter), calc((var(--vw, 100vw) - var(--home-page)) / 2 + var(--gutter)));
  /* ბარათის სიგანე: ფართო ეკრანზე 6 კატეგორია ერთად ეტევა, ვიწროზე ლენტა იქაჩება */
  --card-w: clamp(250px, calc((100% - 150px) / 6), 300px);
  display: flex; gap: 30px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 34px var(--edge) 44px; scroll-padding-inline: var(--edge); cursor: grab;
}
.ribbon::-webkit-scrollbar { display: none; }
.ribbon.dragging { cursor: grabbing; user-select: none; }
.ribbon.dragging > * { pointer-events: none; }
.ribbon > .rb-card {
  --tilt: -2deg; flex: 0 0 var(--card-w); min-width: 0; min-height: 250px; padding: 20px 20px 18px; gap: 6px;
  flex-direction: column; flex-wrap: nowrap; align-items: stretch;
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) rotate(var(--tilt));
}
.ribbon > .rb-card:nth-child(4n+2) { --tilt: -1deg; }
.ribbon > .rb-card:nth-child(4n+3) { --tilt: 1.4deg; }
.ribbon > .rb-card:nth-child(4n+4) { --tilt: -2.6deg; }
.ribbon > .rb-card:hover, .ribbon > .rb-card:focus-visible {
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translate(-3px, -3px) scale(1.02); box-shadow: 9px 9px 0 var(--ink);
}
.rb-card .emoji { width: 52px; height: 52px; margin: 0 0 8px; font-size: 26px; }
.rb-card .name { flex: none; font-size: 22px; }
.rb-card .desc { flex-basis: auto; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rb-card .meta { margin-top: auto; }
.ribbon.swap > .rb-card { animation: rbIn .38s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rbIn { from { opacity: 0; translate: 28px 0; } }
@media (pointer: coarse) {
  .ribbon { scroll-snap-type: x mandatory; cursor: auto; }
  .ribbon > .rb-card { scroll-snap-align: start; }
}
.home-shelf + .home-bottom { padding-top: 16px; }
.sk-tabs { width: 250px; height: 62px; border-radius: 18px; }
.sk-btn-sm { width: 130px; height: 50px; border-radius: 14px; }
.sk-rb { flex: 0 0 auto; width: 300px; height: 250px; border-radius: 24px; }
@media (max-width: 720px) {
  .home-shelf { padding-top: 48px; }
  .shelf-title { font-size: 24px; }
  .shelf-all { min-height: 44px; padding: 0 12px; font-size: 15px; white-space: nowrap; }
  .ribbon { --card-w: min(76vw, 290px); gap: 20px; padding-top: 26px; padding-bottom: 34px; }
  .ribbon > .rb-card { min-height: 230px; }
  .sk-tabs { width: 200px; height: 54px; }
  .sk-rb { width: min(76vw, 290px); height: 230px; }
}

/* ---------- მთავარი: ფანქრით დახატული მინიშნება მენიუზე ---------- */
.menu-sketch { display: none; position: absolute; top: 34px; left: 60px; width: 210px; height: 118px; color: var(--text); pointer-events: none; opacity: .36; }
.is-home .menu-sketch { display: block; }
.menu-sketch .pencil-lines { stroke-width: 1.8; }
.menu-sketch .pencil-echo { stroke-width: .85; opacity: .32; }
.menu-sketch .sketch-word { font-family: 'DM Grigol Robakidze', var(--sans); font-size: 30px; fill: currentColor; stroke: none; }
.top.scrolled .menu-sketch { visibility: hidden; }

/* ---------- ლოგო: ნათურა და „ვიცი“ ხელნაწერი შრიფტით (ზედა ზოლში და გვერდით მენიუში) ---------- */
@font-face {
  font-family: 'DM Grigol Robakidze';
  src: url('/fonts/dm-grigol-robakidze.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.brand { gap: 10px; }
.brand-mark { display: block; width: 48px; height: 48px; flex: none; transform: rotate(-5deg); }
.top .brand-name, .drawer-head .brand-name { font-family: 'DM Grigol Robakidze', var(--sans); font-weight: 400; }
.top .brand-name { font-size: 48px; }
.drawer-head .brand { gap: 8px; }
.drawer-head .brand-mark { width: 40px; height: 40px; }
.drawer-head .brand-name { font-size: 38px; }

/* ---------- მთავარი: კვირის სამეულის პოდიუმი (საიტის „სტიკერის“ სტილში) და ცოცხალი ლენტი ქვემოთ ---------- */
.home-bottom { grid-template-columns: minmax(0, 1fr); gap: 48px; }
.home-bottom > .live-card { width: 100%; }
.home-podium { width: 100%; padding-top: 28px; }
.home-podium-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; max-width: 920px; margin: 0 auto 30px; }
.home-podium-title { font-size: clamp(26px, 2.6vw, 34px); }
.home-podium-heading .btn { gap: 14px; }
.home-podium-stage {
  --floor: 22px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; column-gap: 16px;
  max-width: 860px; margin: 0 auto; padding: 0; list-style: none;
}
/* სცენის იატაკი: სამივე ბლოკი მასზე დგას და ბლოკების ჩრდილის ქვედა ნაწილს ფარავს */
.home-podium-stage::after {
  content: ''; grid-column: 1 / -1; grid-row: 2; height: var(--floor); margin: 0 -30px; position: relative; z-index: 1;
  background: var(--paper); border: var(--line); border-radius: 14px; box-shadow: var(--pop);
}
/* --pc — ბლოკის ფერი, --ph — სიმაღლე */
.home-podium-place { --pc: var(--sun); --ph: 230px; grid-row: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.home-podium-place-1 { grid-column: 2; }
.home-podium-place-2 { grid-column: 1; --pc: var(--silver); --ph: 172px; }
.home-podium-place-3 { grid-column: 3; --pc: var(--bronze); --ph: 136px; }
.home-podium-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 100%; padding: 0 4px 16px; color: var(--text); text-decoration: none; }
.home-podium-player:hover .home-podium-name { text-decoration: underline; }
.home-podium-crown { position: absolute; top: -36px; font-size: 40px; line-height: 1; transform: rotate(-12deg); animation: crownBob 2.6s ease-in-out infinite; }
@keyframes crownBob { 50% { translate: 0 -6px; } }
/* ავატარი — დახრილი სტიკერი; პირველ ადგილზე უფრო დიდი და სწორი */
.home-podium-player .home-podium-avatar { width: 84px; height: 84px; font-size: 34px; border-radius: 24px; box-shadow: var(--pop-sm); transform: rotate(-4deg); }
.home-podium-player .home-podium-avatar.has-emoji { font-size: 44px; }
.home-podium-place-1 .home-podium-avatar { width: 104px; height: 104px; font-size: 42px; border-radius: 28px; box-shadow: var(--pop); transform: none; }
.home-podium-place-1 .home-podium-avatar.has-emoji { font-size: 56px; }
.home-podium-place-3 .home-podium-avatar { transform: rotate(4deg); }
.home-podium-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(16px, 1.6vw, 20px); font-weight: 800; }
.home-podium-me { margin-top: -2px; padding: 1px 10px; font-size: 12px; font-weight: 900; color: var(--ink); background: var(--cobalt); border: 2px solid var(--ink); border-radius: 999px; }
.home-podium-block {
  position: relative; width: 100%; height: var(--ph); padding-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink); background-color: var(--pc);
  /* ბზინვარე ზოლი მარცხნივ — ბლოკს სიღრმეს აძლევს */
  background-image: linear-gradient(90deg, transparent 11%, rgba(255, 255, 255, .45) 11% 19%, transparent 19%);
  border: var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: var(--pop); transform-origin: bottom;
}
.home-podium-rank {
  width: 64px; height: 64px; flex: none; display: grid; place-items: center;
  font-size: 34px; font-weight: 900; line-height: 1; color: #211C3D; background: #FFFFFF;
  border: var(--line); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(-8deg);
}
.home-podium-place-1 .home-podium-rank { width: 76px; height: 76px; font-size: 42px; }
.home-podium-points { padding: 3px 12px; font-size: 14px; font-weight: 800; white-space: nowrap; color: #211C3D; background: #FFFFFF; border: 2px solid var(--ink); border-radius: 999px; }
/* ცარიელი ადგილი (კვირაში სამზე ნაკლები მოთამაშე) */
.home-podium-place.is-empty .home-podium-block { background: none; border-style: dashed; box-shadow: none; }
.home-podium-place.is-empty .home-podium-avatar { color: var(--ink-soft); background: none; border-style: dashed; box-shadow: none; }
.home-podium-place.is-empty .home-podium-rank { opacity: .55; box-shadow: none; }
.home-podium-place.is-empty .home-podium-name { color: var(--ink-soft); font-weight: 700; }
.home-podium-place.is-empty .home-podium-points { max-width: 90%; white-space: normal; text-align: center; color: var(--ink-soft); background: none; border-style: dashed; }
:root[data-theme="dark"] .home-podium-place.is-empty :is(.home-podium-block, .home-podium-avatar, .home-podium-points) { border-color: var(--rule); }
.home-podium-empty { margin-top: 18px; text-align: center; }
/* ამოზრდა: ჯერ მესამე, მერე მეორე, ბოლოს პირველი; მოთამაშეები ბლოკის შემდეგ ჩნდებიან */
.home-podium-stage.pending .home-podium-block { transform: scaleY(0); }
.home-podium-stage.pending .home-podium-player { opacity: 0; }
.home-podium-stage.animate .home-podium-block { animation: grow .8s cubic-bezier(.2, 1.3, .4, 1) both; }
.home-podium-stage.animate .home-podium-player { animation: fadeUp .45s ease-out both; }
.home-podium-stage.animate .home-podium-place-3 .home-podium-block { animation-delay: .1s; }
.home-podium-stage.animate .home-podium-place-2 .home-podium-block { animation-delay: .35s; }
.home-podium-stage.animate .home-podium-place-1 .home-podium-block { animation-delay: .6s; }
.home-podium-stage.animate .home-podium-place-3 .home-podium-player { animation-delay: .55s; }
.home-podium-stage.animate .home-podium-place-2 .home-podium-player { animation-delay: .8s; }
.home-podium-stage.animate .home-podium-place-1 .home-podium-player { animation-delay: 1.05s; }

@media (max-width: 720px) {
  .menu-sketch { left: 47px; top: 29px; width: 107px; height: 69px; }
  /* ლოგო პატარაა, რომ შესული მოთამაშის ზოლი (სერია, ქულა, 🔔, თემა) ტელეფონზეც ჩაეტიოს */
  .brand { gap: 4px; }
  .brand-mark { width: 28px; height: 28px; }
  .top .brand-name { font-size: 28px; }
  .account { gap: 4px; }
  .home-podium { padding-top: 12px; }
  .home-podium-heading { margin-bottom: 34px; }
  .home-podium-title { font-size: 24px; }
  .home-podium-heading .btn { font-size: 16px; }
  .home-podium-stage { --floor: 16px; column-gap: 8px; }
  .home-podium-stage::after { margin: 0 -6px; border-radius: 10px; box-shadow: var(--pop-sm); }
  .home-podium-place { --ph: 150px; }
  .home-podium-place-2 { --ph: 112px; }
  .home-podium-place-3 { --ph: 92px; }
  .home-podium-player { gap: 6px; padding-bottom: 10px; }
  .home-podium-crown { top: -26px; font-size: 28px; }
  .home-podium-player .home-podium-avatar { width: 54px; height: 54px; font-size: 22px; border-radius: 16px; }
  .home-podium-player .home-podium-avatar.has-emoji { font-size: 28px; }
  .home-podium-place-1 .home-podium-avatar { width: 66px; height: 66px; font-size: 26px; border-radius: 18px; }
  .home-podium-place-1 .home-podium-avatar.has-emoji { font-size: 34px; }
  .home-podium-name { font-size: 14px; }
  .home-podium-block { padding-top: 10px; gap: 6px; border-radius: 14px 14px 0 0; box-shadow: var(--pop-sm); }
  .home-podium-rank { width: 40px; height: 40px; font-size: 22px; }
  .home-podium-place-1 .home-podium-rank { width: 48px; height: 48px; font-size: 26px; }
  .home-podium-points { padding: 1px 6px; font-size: 11px; }
}

/* ---------- „გამოიცანი სიტყვა“: ასოს ნებისმიერ უჯრაში ჩაწერა (გაუგზავნელ რიგებშიც) ---------- */
button.wd-tile { font-family: inherit; padding: 0; cursor: pointer; }
.wd-tile.selected { border-color: var(--cobalt); outline: 3px solid var(--cobalt); outline-offset: 2px; }
button.wd-tile:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* ---------- ბარათების ქვიზი: კითხვა და დამალული პასუხი ---------- */
.cards-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; font-size: 13px; font-weight: 800; line-height: 1.5; color: var(--ink); background: var(--teal); border: 2px solid var(--ink); border-radius: 999px; vertical-align: middle; }
.flashcard { display: grid; justify-items: center; gap: 10px; margin-top: 10px; text-align: center; }
.fc-reveal { min-width: min(280px, 100%); }
.fc-answer {
  width: 100%; display: grid; justify-items: center; gap: 4px; padding: 22px 24px;
  background: var(--emerald-soft); border: var(--line); border-radius: 22px; box-shadow: var(--pop);
  animation: cardFlip .45s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top;
}
.fc-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.fc-answer b { font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
@keyframes cardFlip { from { opacity: 0; transform: perspective(700px) rotateX(-70deg); } }
.fc-mark { display: grid; justify-items: center; gap: 8px; margin-top: 20px; text-align: center; }
.fc-ask { font-weight: 800; }
.fc-mark .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.fc-yes { background: var(--emerald); color: var(--ink); }
.card-answer .input { font-weight: 800; background: var(--emerald-soft); }
.aq-card { margin: 6px 0; font-size: 15px; }

/* ---------- დალაგება და „ყველაზე ახლოს“ ---------- */
.answers.order-list { grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
.order-list .answer { min-height: 64px; }
/* ჯერ დაუნომრავი ელემენტი ნეიტრალურია, დანომრილი — ფერადი */
.order-list .answer:not(.is-set):not(.is-right):not(.is-picked),
.order-list .answer:not(.is-set):not(.is-right):not(.is-picked) .key { background: var(--paper); }
.order-list.done .answer.is-picked .mark { text-decoration: none; }
.order-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.num-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.num-in {
  flex: 1 1 10em; min-width: 0; padding: 14px 18px; font: inherit; font-size: 28px; font-weight: 800;
  color: var(--text); background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: var(--pop-sm);
}
.num-in.shake { animation: shake .3s ease-in-out; }
.num-unit { font-size: 20px; font-weight: 800; }
.num-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.num-result p { margin: 0; display: grid; gap: 4px; padding: 14px 18px; background: var(--paper); border: var(--line); border-radius: 18px; }
.num-result b { font-size: 26px; overflow-wrap: anywhere; }
.num-result p:first-child, .num-result p.ok { background: var(--ok); }
.num-result p.near { background: var(--saffron-soft); }
.num-result p.far { background: var(--bad); }
:root[data-theme="dark"] .num-result p:is(:first-child, .ok, .near, .far) { --text: #211C3D; color: var(--text); }

/* ქვიზების გვერდი: გამოწვევები (ტურნირი, გადარჩენა, ბლიცი) კატეგორიების თავზე */
.quiz-challenges { margin-bottom: 28px; }
.quiz-challenges h2, .quiz-cats-h { margin: 0 0 14px; }
.quiz-challenges .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* ტელეფონზე კომპაქტურად, რომ კატეგორიები ქვემოთ არ გადაიწიოს */
@media (max-width: 820px) {
  .quiz-challenges .mode-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .quiz-challenges .mode-tile .desc { display: none; }
}

/* „გადიდებული სურათი“: ფოტოს ავტორი და ლიცენზია (ჩანს პასუხის შემდეგ) */
.zoom-credit { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 2px 8px; font-size: 11px; font-weight: 600; line-height: 1.4; color: #FFFFFF; background: rgba(0, 0, 0, .55); border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- ტელეფონი: თამაშის ეკრანი ერთ ეკრანზე (კითხვა და პასუხები სქროლის გარეშე) ---------- */
@media (pointer: coarse), (max-width: 720px) { .kbd-only { display: none; } }
@media (max-width: 720px) {
  .play { margin: 6px auto 10px; padding: 12px 14px 14px; border-radius: 22px; }
  /* თავში მხოლოდ სათაური და ქულა ერთ ხაზზე; კატეგორიის ბმული და ავტორი თამაშისას არ გვჭირდება */
  .play:not(.intro):not(.result) .play-top { margin-bottom: 8px; gap: 8px; flex-wrap: nowrap; }
  .play:not(.intro):not(.result) .play-top > div:first-child { min-width: 0; }
  .play:not(.intro):not(.result) .play-top .crumbs,
  .play:not(.intro):not(.result) .play-top .author-line { display: none; }
  .play:not(.intro):not(.result) .play-top .title { font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .play-top .title .diff, .play-top .title .cards-chip { font-size: 11px; padding: 1px 7px; }
  .play-top .score-pill, .run-pills .score-pill { padding: 3px 10px; gap: 6px; font-size: 13px; }
  .run-pills { gap: 6px; flex-wrap: nowrap; }
  .run-count { padding: 3px 9px; font-size: 13px; white-space: nowrap; }
  .play .pips { margin: 0 0 6px; gap: 4px; flex-wrap: nowrap; }
  .play .pip { flex: 1 1 0; width: auto; min-width: 0; max-width: 26px; height: 10px; }
  .play .q-meta p { font-size: 12px; margin: 0; }
  .play .potential b { font-size: 13px; }
  .play .timer { height: 12px; margin: 4px 0 10px; }
  .play .question-text { font-size: 20px; line-height: 1.25; margin-bottom: 10px; }
  .play .media-box:not(.map-box) { max-height: 32vh; }
  .play .media-box { margin-bottom: 10px; border-radius: 14px; }
  .play .answers { gap: 8px; }
  .play .answer { min-height: 50px; padding: 8px 12px 8px 54px; font-size: 16px; border-radius: 16px; }
  .play .answer .key { left: 10px; width: 32px; height: 32px; font-size: 15px; border-radius: 10px; }
  .play .next-row { margin-top: 10px; min-height: 0; gap: 8px; }
  .play .feedback { margin-top: 0; min-height: 0; font-size: 14px; }
  .play .kbd-hint { font-size: 13px; }
  .play .explain { margin-top: 10px; padding: 10px 12px; gap: 4px; border-radius: 14px; }
  .play .explain p { font-size: 14px; line-height: 1.4; }
  .play .explain-k { font-size: 12px; }
}
/* დაბალი ტელეფონი (მაგ. iPhone SE): კიდევ უფრო მჭიდროდ */
@media (max-width: 720px) and (max-height: 700px) {
  .play .question-text { font-size: 18px; }
  .play .media-box:not(.map-box) { max-height: 26vh; }
  .play .answer { min-height: 44px; font-size: 15px; }
}

/* ---------- „სად არის?“: რუკის გადიდება (ორი თითი, ბორბალი, +/−) ---------- */
.map-box { touch-action: none; }
.map-zoom { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.map-zoom img { width: 100%; height: 100%; }
.map-box.zoomed:not(.done) .map-zoom { cursor: grab; }
.map-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; gap: 6px; }
.map-tools button {
  width: 38px; height: 38px; display: grid; place-items: center; padding: 0; cursor: pointer;
  font: inherit; font-size: 22px; font-weight: 900; line-height: 1; color: var(--ink);
  background: var(--paper); border: var(--line); border-radius: 12px; box-shadow: var(--pop-sm);
}
.map-tools button:active { transform: translate(1px, 1px); box-shadow: none; }

/* ტელეფონზე რუკა მთელ სიგანეზე (16:9 უნდა დარჩეს — დაჭერის კოორდინატები ამაზეა დამოკიდებული), ქრონოლოგია უფრო მჭიდრო */
@media (max-width: 720px) {
  .play .map-box { width: calc(100% + 28px); max-width: none; margin-left: -14px; margin-right: -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .chrono-play, .chrono-result { gap: 6px; margin-bottom: 8px; }
  .chrono-edge { font-size: 12px; }
  .chrono-list { gap: 6px; }
  .chrono-item { padding: 7px 8px; gap: 6px; border-radius: 12px; font-size: 15px; line-height: 1.25; }
  .chrono-grip { font-size: 16px; }
  .chrono-btns .btn { padding: 2px 7px; min-height: 30px; }
  .chrono-play .actions { margin: 0; }
}
/* ტელეფონზე: „მეტი თუ ნაკლები?“ ბარათები გვერდიგვერდ, ქრონოლოგიის ღილაკები ერთმანეთის ქვეშ (ტექსტს მეტი ადგილი რჩება) */
@media (max-width: 720px) {
  .run-chrono .question-text, .run-hl .question-text { font-size: 17px; }
  .chrono-grip { display: none; }
  .chrono-btns { flex-direction: column; gap: 3px; }
  .chrono-btns .btn { min-height: 26px; padding: 0 9px; font-size: 12px; }
  .hl-stage { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; margin-bottom: 10px; }
  .hl-card { padding: 10px 8px; gap: 6px; }
  .hl-emoji { font-size: 30px; }
  .hl-name { font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
  .hl-value { font-size: 17px; padding: 2px 8px; }
  .hl-vs { width: 34px; height: 34px; font-size: 13px; }
  .hl-actions { gap: 8px; margin-bottom: 8px; flex-wrap: nowrap; }
  .hl-actions .btn.big { min-height: 52px; font-size: 16px; padding: 8px 10px; }
}
@media (max-width: 720px) and (max-height: 700px) {
  /* კითხვაშივე წერია, რომ ზემოთ ძველია — დაბალ ეკრანზე „ზემოთ/ქვემოთ“ წარწერები აღარ გვჭირდება */
  .chrono-edge { display: none; }
  .chrono-item { padding: 6px 8px; font-size: 14px; }
}
/* „გამოიცანი სიტყვა“ ტელეფონზე: დაფა და კლავიატურა ერთ ეკრანზე */
@media (max-width: 720px) {
  .wd-head.page-head { padding-top: 10px; padding-bottom: 4px; }
  .wd-head h1 { font-size: 24px; }
  .wd-legend { font-size: 12px; margin-top: 2px; }
  .wd-settings { margin: 0 0 8px; gap: 6px 12px; }
  .wd-board { margin-bottom: 10px; gap: 5px; }
  .wd-kb { gap: 5px; }
  .wd-key { height: 44px; }
}
@media (max-width: 720px) and (max-height: 700px) {
  .wd-board { --tile: min(46px, calc((100vw - 2 * var(--gutter) - (var(--n, 5) - 1) * 5px) / var(--n, 5)), calc((100dvh - 430px) / 6)); }
  .wd-key { height: 40px; }
}

/* ---------- ტელეფონი: სიის გვერდებზე ზედმეტი ახსნები იმალება (წესები თამაშის შესავალ ეკრანზეც წერია) ---------- */
@media (max-width: 720px) {
  .page-head:has(.mode-jump) .lede,
  .wrap > .page-head:has(~ .quiz-toolbar) > .lede { display: none; }
  .mode-group-head p, .mode-card .rule-list, .mode-card .mini-top { display: none; }
  .mode-group { margin-top: 22px; }
  .mode-group-head { margin-bottom: 10px; }
  .mode-cards { gap: 12px; }
  .mode-card { gap: 8px; padding: 26px 16px 14px; }
  .mode-card-head .sticker { width: 44px; height: 44px; font-size: 22px; }
  .mode-card .mode-record { font-size: 14px; margin: 0; }
  .mode-card .hl-chips { max-height: 84px; overflow: hidden; }
  /* საიტის ყველა ქვიზი AI-მ შექმნა — ბარათზე ამის გამეორება ტელეფონზე ზედმეტია */
  .quiz-card .author-line.ai-made { display: none; }
}
/* მთავარი გვერდის ლენტა ტელეფონზე: აღწერის გარეშე, ეკრანზე ორი ბარათი ერთად ჩანს */
@media (max-width: 720px) {
  .ribbon { --card-w: min(44vw, 190px); gap: 12px; padding-top: 14px; padding-bottom: 22px; align-items: flex-start; }
  .ribbon > .rb-card { min-height: 0; flex-direction: column; align-items: flex-start; padding: 14px; }
  .rb-card .desc { display: none; }
  .rb-card .emoji { width: 44px; height: 44px; font-size: 22px; margin: 0 0 6px; }
  .rb-card .name { font-size: 18px; line-height: 1.2; }
  .rb-card .meta { margin-top: 8px; font-size: 12px; white-space: normal; }
}
/* შედეგის გვერდი ტელეფონზე: სამი მაჩვენებელი ერთ რიგში */
@media (max-width: 720px) {
  .result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .result-stats > div { padding: 10px 8px; border-radius: 14px; }
  .result-stats b { font-size: 18px; overflow-wrap: anywhere; }
  .result-stats span { font-size: 12px; line-height: 1.25; }
  .play.result .display.score { font-size: 44px; }
}
/* ტელეფონზე ბარათებზე მხოლოდ სახელი ჩანს: აღწერა და რეკორდი/მთვლელი სახელის ქვეშ იმალება */
@media (max-width: 720px) {
  .rb-card .meta,
  .quiz-card .best-bar,
  .cat-section .cat-title p,
  .quiz-challenges .mode-tile .meta,
  .mode-card-head p,
  .mode-card .mode-record { display: none; }
  .quiz-card .btn { grid-row: 2; }
}
/* მთავარი გვერდი ტელეფონზე: ლიდერბორდის გარეშე, რეჟიმები ერთი ზოლის ნაცვლად ბადედ (სამ სვეტად) */
@media (max-width: 720px) {
  .home-podium { display: none; }
  .ribbon {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; align-items: stretch;
    overflow: visible; padding: 14px var(--gutter) 24px; cursor: default; scroll-snap-type: none;
  }
  .ribbon > .rb-card {
    --tilt: 0deg; flex: none; width: auto; min-height: 0; padding: 12px 5px 10px; gap: 6px;
    align-items: center; justify-content: flex-start; text-align: center; border-radius: 18px;
  }
  .ribbon > .rb-card:nth-child(n) { --tilt: 0deg; }
  .rb-card .emoji { width: 40px; height: 40px; font-size: 20px; margin: 0; }
  .rb-card .name { font-size: 13px; line-height: 1.2; overflow-wrap: normal; word-break: normal; }
}
/* რეჟიმების გვერდი: იგივე ბარათები, რაც მთავარზე — ზოლის ნაცვლად ბადე */
@media (min-width: 721px) {
  .ribbon.mode-hub {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px;
    overflow: visible; padding: 10px 0 30px; cursor: default; scroll-snap-type: none;
  }
  .ribbon.mode-hub > .rb-card { flex: none; width: auto; }
}
@media (max-width: 720px) {
  .modes-page .page-head { padding-bottom: 4px; }
  .ribbon.mode-hub { padding: 6px 0 24px; }
}
/* მთავარი გვერდი დიდ და საშუალო ეკრანზე: რეჟიმები ერთი გასაქაჩი ზოლის ნაცვლად ცენტრში მოთავსებულ ბადედ —
   ფართო მონიტორზე ზოლი მარცხნიდან იწყებოდა და მარჯვნივ ეკრანს სცდებოდა */
@media (min-width: 721px) {
  .home-shelf .ribbon {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
    max-width: var(--home-page); margin: 0 auto; padding: 24px var(--gutter) 34px;
    overflow: visible; cursor: default; scroll-snap-type: none;
  }
  .home-shelf .ribbon > .rb-card { flex: none; width: auto; min-height: 230px; }
  .home-shelf .rb-card .name { font-size: clamp(15px, 1.8vw, 26px); }
  /* გრძელი წარწერა (მაგ. „12 თემა: …“) ორ ხაზზე გადადის და ბარათს არ სცდება */
  .rb-card .meta { max-width: 100%; white-space: normal; line-height: 1.3; border-radius: 12px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
/* 1200 პიქსელიდან: 6 სვეტი — 11 ბარათი ორ რიგად ეტევა */
@media (min-width: 1200px) {
  .home-shelf .ribbon { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* სახელი ბარათის სიგანეს მიჰყვება, რომ სიტყვა შუაში არ გაწყდეს */
  .home-shelf .rb-card .name { font-size: clamp(17px, 1.3vw, 26px); }
  .home-shelf .ribbon > .rb-card { padding: 18px 16px 16px; }
}
/* ვიწრო პლანშეტზე 3 სვეტი, რომ სახელები სიტყვის შუაში არ გაწყდეს */
@media (min-width: 721px) and (max-width: 899px) {
  .home-shelf .ribbon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* „ქვიზები“ (მთავარი რეჟიმი) ორ სვეტს იკავებს: 11 ბარათი ბადეს ცარიელი უჯრის გარეშე ავსებს
   (6 სვეტზე 6+6, 4-ზე 4+4+4, 3-ზე 3×4). რეჟიმების გვერდზეც იგივე ბადეა */
/* 12 რეჟიმი ბადეს ზუსტად ავსებს (6+6, 4×3, 3×4) — „ქვიზების“ ორმაგი ბარათი აღარ გვჭირდება */
@media (min-width: 721px) {
  .ribbon.mode-hub { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .ribbon.mode-hub .rb-card .name { font-size: clamp(15px, 1.8vw, 26px); }
}
@media (min-width: 721px) and (max-width: 899px) {
  .ribbon.mode-hub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .ribbon.mode-hub { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ribbon.mode-hub .rb-card .name { font-size: clamp(17px, 1.3vw, 26px); }
  .ribbon.mode-hub > .rb-card { padding: 18px 16px 16px; }
}
/* ძალიან ფართო მონიტორი: მთავარი გვერდი (და ზედა ზოლის ღილაკები) მთელ სიგანეს იყენებს, რომ გვერდებზე
   ცარიელი ზოლები არ დარჩეს; 3000 პიქსელიდან 11 რეჟიმი ერთ რიგად ჩანს (12 სვეტი, „ქვიზები“ — ორი) */
@media (min-width: 2200px) {
  :root { --home-page: calc(var(--vw, 100vw) - 120px); }
}
@media (min-width: 3000px) {
  .home-shelf .ribbon, .ribbon.mode-hub { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .home-shelf .rb-card .name, .ribbon.mode-hub .rb-card .name { font-size: clamp(17px, 0.66vw, 30px); }
  .home-shelf .rb-card .desc, .ribbon.mode-hub .rb-card .desc { font-size: clamp(13px, 0.5vw, 17px); }
}
/* კატეგორიების ჩანართები კომპიუტერზე რამდენიმე ხაზზე გადადის — მაუსით გვერდზე გადაწევა საჭირო აღარ არის
   (ტელეფონზე ზოლი თითით იქაჩება) */
@media (min-width: 721px) {
  .cat-tabs { flex-wrap: wrap; overflow-x: visible; }
}
/* კატეგორიების ჩანართები: თითოეულს თავისი ფერი (ღია ტონით), არჩეულს — სრული ფერი */
.cat-tabs a { background: var(--soft, var(--paper)); }
.cat-tabs a:hover { background: var(--soft, var(--paper)); box-shadow: var(--pop-sm); translate: -1px -1px; }
/* ქვიზების ფილტრი ავტორით */
.author-filter .select { width: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; font-weight: 800; box-shadow: var(--pop-sm); }
@media (max-width: 720px) { .author-filter { flex: 1 1 100%; } .author-filter .select { width: 100%; } }

/* ---------- „გამოიცანი ლოგო“ ---------- */
.logo-box { background: #FFFFFF; }
.logo-box img { object-fit: contain; }
.logo-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.logo-slot {
  width: 38px; height: 46px; display: grid; place-items: center; font-size: 22px; font-weight: 900;
  background: var(--paper); border: var(--line); border-radius: 10px; box-shadow: var(--pop-sm);
}
.logo-slot.filled { background: var(--cream); }
.logo-gap { width: 14px; }
.logo-sep { align-self: center; font-size: 24px; font-weight: 900; }
.logo-slots.ok .logo-slot { background: var(--ok); }
.logo-slots.bad .logo-slot { background: var(--bad); }
.logo-form { display: flex; gap: 10px; align-items: center; }
.logo-form .num-in { flex: 1 1 auto; font-size: 22px; text-transform: uppercase; }
.logo-form .num-in.shake { animation: shake .3s ease-in-out; }
/* ასოების რაოდენობა და მინიშნების ღილაკი ერთ ხაზზე; გახსნილი ასო ყვითლად, მასთან შეუსაბამო ჩაწერილი — წითლად */
.logo-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin: 8px 0 0; }
.logo-meta small { color: var(--ink-soft); font-weight: 600; }
.logo-meta .hint-left {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px;
  background: var(--sun); color: #211C3D; font-size: 13px; font-weight: 900;
}
.logo-slot.hint { background: var(--sun); color: #211C3D; }
.logo-slot.clash { background: var(--ruby-soft); color: var(--text); }
/* დარჩენილი დრო: ზოლის გვერდით დიდი საათი; ბოლო 10 წამი — წითლად */
.logo-clock { margin: 2px 0 14px; }
.logo-clock .timer { margin: 0; }
.logo-clock b { font-size: 28px; }
.logo-clock b.low { color: var(--bad-text); }
:root[data-theme="dark"] :is(.logo-slots.ok, .logo-slots.bad) .logo-slot { color: #211C3D; }
@media (max-width: 720px) {
  .logo-slots { gap: 4px; margin-bottom: 8px; }
  .logo-slot { width: 28px; height: 36px; font-size: 17px; border-radius: 8px; }
  .logo-form .num-in { font-size: 18px; padding: 10px 12px; }
  .logo-meta { margin-top: 6px; }
  .logo-meta .btn { min-height: 36px; font-size: 14px; }
  .logo-clock { margin: 0 0 10px; gap: 10px; }
  .logo-clock b { font-size: 24px; min-width: 64px; }
}
@media (max-width: 720px) {
  .logo-slots.long { gap: 3px; }
  .logo-slots.long .logo-slot { width: 22px; height: 32px; font-size: 14px; border-radius: 6px; }
  .logo-slots.long .logo-gap { width: 8px; }
}
