/* Dostyq Quiz — оформление доски, телефона и пробной страницы.

   Повторяет Kahoot почти до пикселя — так договорились: сначала точная
   копия, потом переделываем под себя. Montserrat, фиолетовая сцена, белая
   полоса вопроса, фиолетовый круг таймера, плитки в четыре цвета с опорой
   снизу, зелёный и красный экраны итога на телефоне.

   Своё здесь только знак «D» вместо их логотипа и имя Dostyq Quiz.

   Движение уважает «уменьшить анимацию» — в конце файла оно гасится для
   тех, кому мешает. */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/montserrat-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.sayys {
  --q-violet: #46178f;
  --q-violet-2: #6a1fb8;
  --k-purple: #864cbf;
  --k-ink: #333333;
  --k-grey: #f2f2f2;
  --ok: #66bf39;
  --bad: #ff3355;

  /* Цвета ответов — те же, что у Kahoot, с тёмной «опорой» снизу. */
  --t1: #e21b3c; --t1d: #b01130;
  --t2: #1368ce; --t2d: #0e4f9e;
  --t3: #d89e00; --t3d: #a37700;
  --t4: #26890c; --t4d: #1b6608;
  --t5: #8b1fc9; --t5d: #6a1598;

  --kfont: "Montserrat", "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--q-violet);
  color: #fff;
  font-family: var(--kfont);
  font-weight: 700;
  overflow-x: hidden;
  transition: background-color .35s ease;
}
.sayys [hidden] { display: none !important; }
.sayys button { font-family: inherit; }

/* Живой фон: пятна света, фигуры и дрейфующий знак Dostyq. */
.q-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.q-bg::before, .q-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.q-bg::before { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: var(--q-violet-2); }
.q-bg::after { width: 55vw; height: 55vw; right: -16vw; bottom: -24vw; background: #2b1170; }
.q-bg i { position: absolute; display: block; opacity: .09; border: 3px solid #fff; animation: q-float linear infinite; }
.q-bg i.s1 { width: 54px; height: 54px; border-radius: 4px; left: 8%; top: 18%; animation-duration: 19s; }
.q-bg i.s2 { width: 40px; height: 40px; border-radius: 50%; left: 78%; top: 12%; animation-duration: 23s; }
.q-bg i.s3 { width: 64px; height: 64px; border-radius: 6px; left: 64%; top: 72%; animation-duration: 27s; }
.q-bg i.s4 { width: 34px; height: 34px; border-radius: 50%; left: 16%; top: 78%; animation-duration: 21s; }
.q-bg i.mk { border: 0; background: url("icons/mark.png") center / contain no-repeat; opacity: .06; animation-name: q-drift; }
.q-bg i.mk.m1 { width: 120px; height: 120px; left: 12%; top: 46%; animation-duration: 26s; }
.q-bg i.mk.m2 { width: 76px; height: 76px; left: 84%; top: 58%; animation-duration: 31s; animation-delay: -6s; }
.q-bg i.mk.m3 { width: 54px; height: 54px; left: 46%; top: 8%; animation-duration: 22s; animation-delay: -12s; }
@keyframes q-float { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-28px) rotate(180deg); } 100% { transform: translateY(0) rotate(360deg); } }
@keyframes q-drift { 0%, 100% { transform: translate(0, 0) rotate(-5deg); } 50% { transform: translate(14px, -34px) rotate(5deg); } }

/* Скины: меняется только сцена, цвета ответов — никогда. Дети запоминают
   плитку цветом и фигурой; перекрась её — и каждая игра начнётся с путаницы. */
.sayys.skin-sky    { --q-violet: #0b3c91; --q-violet-2: #1668d8; }
.sayys.skin-steppe { --q-violet: #12492c; --q-violet-2: #1d7a46; }
.sayys.skin-sunset { --q-violet: #7a1f3d; --q-violet-2: #c2410c; }
.sayys.skin-night  { --q-violet: #0f172a; --q-violet-2: #334155; }
.sayys.skin-berry  { --q-violet: #4a0d52; --q-violet-2: #a21caf; }

/* ═══════════════════════ общие детали ═══════════════════════ */

.mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: #fff; color: var(--q-violet);
  display: grid; place-items: center; font-weight: 900; font-size: 19px;
}

.dq-btn {
  border: 0; border-radius: 4px; cursor: pointer;
  padding: 12px 24px; font-weight: 800; font-size: 17px;
  background: #fff; color: var(--k-ink);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15);
  transition: transform .06s ease, filter .15s ease;
}
.dq-btn:hover { filter: brightness(.95); }
.dq-btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.dq-btn:disabled { opacity: .55; cursor: default; }
.dq-btn.dark { background: var(--k-ink); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); }
.dq-btn.ghost { background: rgba(0, 0, 0, .25); color: #fff; box-shadow: none; }
.dq-btn.ghost-dark { background: var(--k-grey); color: var(--k-ink); }
.dq-btn.wide { width: 100%; margin-top: 10px; padding: 14px; }

.dq-chip {
  background: rgba(0, 0, 0, .25); color: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.dq-chip.pin { background: #fff; color: var(--k-ink); }

.dq-exit {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 14px;
  padding: 8px 14px; border-radius: 4px; background: rgba(0, 0, 0, .25);
}
.dq-exit:hover { background: rgba(0, 0, 0, .4); }

.dq-gear { position: relative; }
.dq-gear-btn {
  width: 38px; height: 38px; border-radius: 4px; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .25); color: #fff; display: grid; place-items: center;
}
.dq-gear-btn svg { width: 22px; height: 22px; }
.dq-menu {
  position: absolute; right: 0; top: 46px; z-index: 30; min-width: 250px;
  background: #fff; color: var(--k-ink); border-radius: 8px; padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35); display: flex; flex-direction: column;
}
.dq-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; background: none; font-weight: 800; font-size: 15px; color: inherit;
  text-align: left; padding: 12px 14px; border-radius: 6px; cursor: pointer;
}
.dq-menu button:hover { background: var(--k-grey); }
.dq-menu button.danger { color: #c0201f; }
.dq-menu i { font-style: normal; font-size: 12px; font-weight: 800; color: #6b6b6b; background: #e9e9ee; border-radius: 999px; padding: 3px 10px; }
.dq-menu i.on { background: var(--t4); color: #fff; }

/* Дроби столбиком: «{2/9}» из банка. */
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .16em; line-height: 1.05; font-size: .82em; }
.frac b { font-weight: 800; padding: 0 .2em; }
.frac i { font-style: normal; font-weight: 800; padding: 0 .2em; border-top: 2px solid currentColor; }

/* Загрузчик из четырёх фигур — как у Kahoot между экранами. */
.dq-loader { display: flex; gap: 12px; justify-content: center; margin: 22px 0; }
.dq-loader i { width: 22px; height: 22px; display: block; animation: dq-hop 1.1s ease-in-out infinite; }
.dq-loader i:nth-child(1) { background: var(--t1); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.dq-loader i:nth-child(2) { background: var(--t2); transform: rotate(45deg); animation-delay: .12s; width: 18px; height: 18px; margin: 2px; }
.dq-loader i:nth-child(3) { background: var(--t3); border-radius: 50%; animation-delay: .24s; }
.dq-loader i:nth-child(4) { background: var(--t4); animation-delay: .36s; }
.dq-loader.big i { width: 44px; height: 44px; }
.dq-loader.big i:nth-child(2) { width: 36px; height: 36px; margin: 4px; }
@keyframes dq-hop { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -14px; } }

.dq-bar-line { position: fixed; left: 0; right: 0; bottom: 0; height: 10px; background: rgba(0, 0, 0, .25); z-index: 2; }
.dq-bar-line i { display: block; height: 100%; width: 0; background: #fff; }
.dq-bar-line.read i { background: var(--k-purple); }

.dq-confetti { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.dq-confetti i { position: absolute; top: -24px; display: block; animation: dq-fall linear forwards; }
@keyframes dq-fall { to { transform: translateY(106vh) rotate(760deg); } }

.q-face { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; object-fit: cover; }
.pic { display: inline-block; }

/* ═══════════════════════ доска ═══════════════════════ */

.dq-host { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.dq-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; position: relative; z-index: 5; }
.dq-top .brand { font-weight: 900; font-size: 18px; }
.dq-top .spacer { flex: 1; }
.dq-stage { flex: 1; display: flex; flex-direction: column; position: relative; }
.dq-screen { flex: 1; display: flex; flex-direction: column; animation: dq-in .3s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes dq-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── лобби ── */
.s-lobby { padding: 8px 16px 20px; }
.dq-joinbar {
  align-self: center; display: flex; align-items: stretch; gap: 0;
  background: #fff; color: var(--k-ink); border-radius: 8px; overflow: hidden;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18); max-width: 100%;
}
.dq-joinbar > div { padding: 12px 26px; display: flex; flex-direction: column; justify-content: center; }
.join-site { border-right: 2px solid #e6e6e6; }
.join-site small, .join-pin small { font-size: 15px; color: #555; font-weight: 700; }
.join-site b { font-size: clamp(15px, 1.7vw, 22px); font-weight: 900; white-space: nowrap; }
.join-pin b { font-size: clamp(44px, 7vw, 80px); font-weight: 900; letter-spacing: .04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.join-qr { flex: 0 0 auto; border: 0; background: #fff; padding: 10px 14px 10px 4px; cursor: zoom-in; display: grid; place-items: center; }
.join-qr svg { width: 104px; height: 104px; display: block; }

.dq-lobbybar { display: flex; align-items: center; gap: 12px; margin: 18px auto 12px; width: min(1100px, 100%); }
.dq-count { display: inline-flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .3); padding: 8px 14px; border-radius: 4px; font-size: 20px; }
.dq-count svg { width: 22px; height: 22px; }
.dq-lobbytitle { flex: 1; text-align: center; font-size: 18px; opacity: .9; }
.dq-iconbtn { width: 44px; height: 44px; border: 0; border-radius: 4px; cursor: pointer; background: rgba(0, 0, 0, .3); color: #fff; display: grid; place-items: center; }
.dq-iconbtn svg { width: 22px; height: 22px; }
.dq-iconbtn.on { background: #fff; color: var(--k-ink); }
.dq-lobbybar .dq-btn { font-size: 20px; padding: 12px 30px; }

.dq-players { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: flex-start; width: min(1100px, 100%); margin: 0 auto; }
.dq-lchip {
  border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  background: rgba(0, 0, 0, .28); color: #fff; font-weight: 800; font-size: 20px;
  padding: 8px 18px 8px 8px; border-radius: 999px; transition: opacity .2s, transform .2s;
}
.dq-lchip .pic { width: 36px; height: 36px; }
.dq-lchip .nm { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.dq-lchip .nm small { font-size: 12px; opacity: .75; font-weight: 700; }
.dq-lchip:hover .nm { text-decoration: line-through; }
.dq-lchip.new { animation: dq-pop .4s cubic-bezier(.2, 1.5, .4, 1) both; }
.dq-lchip.gone { opacity: 0; transform: scale(.6); }
@keyframes dq-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.dq-waiting { margin: 30px auto; }
.dq-waiting span { background: rgba(0, 0, 0, .28); padding: 12px 22px; border-radius: 4px; font-size: 22px; }

/* ── номер вопроса и заставка ── */
.s-ready { align-items: center; justify-content: center; text-align: center; }
.dq-qno b { display: block; font-size: clamp(48px, 9vw, 96px); font-weight: 900; line-height: 1; animation: dq-zoom .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.dq-qno small { display: block; margin-top: 12px; font-size: 20px; opacity: .8; }
.dq-qno.late b { animation-delay: 1.3s; }
.dq-qno.late small { animation: dq-in .4s 1.5s both; }
@keyframes dq-zoom { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.dq-intro { margin-bottom: 22px; }
.dq-intro .logo {
  width: 128px; height: 128px; margin: 0 auto 14px; border-radius: 30px;
  background: #fff; color: var(--q-violet); display: grid; place-items: center;
  font-size: 74px; font-weight: 900; animation: dq-mark 1.1s cubic-bezier(.2, 1.4, .35, 1) both;
}
.dq-intro .name { font-size: clamp(34px, 6vw, 64px); font-weight: 900; animation: dq-in .5s .35s both; }
@keyframes dq-mark { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.08) rotate(4deg); opacity: 1; } 100% { transform: none; opacity: 1; } }

/* ── чтение ── */
.s-read { align-items: center; justify-content: center; padding: 20px; }
.dq-readcard {
  background: #fff; color: var(--k-ink); border-radius: 8px; padding: 34px 40px;
  font-size: clamp(26px, 4.2vw, 52px); font-weight: 800; text-align: center; line-height: 1.25;
  max-width: 1100px; box-shadow: 0 8px 0 rgba(0, 0, 0, .18); animation: dq-zoom .5s cubic-bezier(.2, 1.2, .4, 1) both;
}
.dq-readcard .expr { font-size: .8em; margin-top: 14px; }
.dq-readcard.small { font-size: 22px; padding: 22px; }

/* ── вопрос с ответами ── */
.s-answer { padding: 0 14px 14px; gap: 12px; }
.dq-qbar {
  background: #fff; color: var(--k-ink); border-radius: 4px;
  padding: 16px 24px; text-align: center; font-weight: 800;
  font-size: clamp(20px, 2.8vw, 36px); line-height: 1.25; box-shadow: 0 4px 0 rgba(0, 0, 0, .15);
}
.dq-mid { flex: 1; display: grid; grid-template-columns: 1fr minmax(0, 2.2fr) 1fr; align-items: center; min-height: 150px; }
.dq-timer {
  justify-self: start; width: clamp(80px, 9vw, 120px); height: clamp(80px, 9vw, 120px); border-radius: 50%;
  background: var(--k-purple); display: grid; place-items: center;
  font-size: clamp(34px, 4vw, 52px); font-weight: 900; font-variant-numeric: tabular-nums;
}
.dq-timer.hot { background: #e21b3c; animation: dq-beat .5s ease-in-out infinite; }
@keyframes dq-beat { 50% { transform: scale(1.08); } }
.dq-media { justify-self: center; display: grid; place-items: center; }
.dq-media .expr { background: #fff; color: var(--k-ink); padding: 18px 28px; border-radius: 8px; font-size: clamp(24px, 3vw, 40px); }
.dq-answers { justify-self: end; text-align: center; }
.dq-answers b { display: block; font-size: clamp(38px, 4.5vw, 60px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.dq-answers small { font-size: 18px; }
.dq-foot { display: flex; justify-content: space-between; font-size: 16px; opacity: .85; padding: 0 4px; }

.dq-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dq-tiles.five > :last-child { grid-column: 1 / -1; }
.dq-tile {
  position: relative; display: flex; align-items: center; gap: 16px; border: 0; border-radius: 4px;
  color: #fff; text-align: left; font-weight: 800; padding: 14px 18px;
  animation: dq-tile .35s cubic-bezier(.2, 1.3, .4, 1) both;
}
.dq-tile .shape { width: 42px; height: 42px; flex: 0 0 auto; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.dq-tile .txt { flex: 1; font-size: clamp(18px, 2.2vw, 30px); line-height: 1.2; }
.dq-tile .tick, .dq-tile .cross { width: 42px; height: 42px; flex: 0 0 auto; }
.dq-tile.c1 { background: var(--t1); box-shadow: inset 0 -5px 0 var(--t1d); }
.dq-tile.c2 { background: var(--t2); box-shadow: inset 0 -5px 0 var(--t2d); }
.dq-tile.c3 { background: var(--t3); box-shadow: inset 0 -5px 0 var(--t3d); }
.dq-tile.c4 { background: var(--t4); box-shadow: inset 0 -5px 0 var(--t4d); }
.dq-tile.c5 { background: var(--t5); box-shadow: inset 0 -5px 0 var(--t5d); }
.dq-tile:nth-child(2) { animation-delay: .06s; }
.dq-tile:nth-child(3) { animation-delay: .12s; }
.dq-tile:nth-child(4) { animation-delay: .18s; }
.dq-tile:nth-child(5) { animation-delay: .24s; }
@keyframes dq-tile { from { transform: translateY(24px) scale(.95); opacity: 0; } to { transform: none; } }
.dq-tiles.host .dq-tile { min-height: clamp(76px, 12vh, 130px); }
.dq-tile.wrong { opacity: .28; }
.dq-tiles.locked { filter: saturate(.4) brightness(.8); }

.dq-talk {
  position: absolute; left: 50%; bottom: 40%; transform: translateX(-50%); z-index: 3;
  background: #fff; color: var(--k-ink); padding: 16px 28px; border-radius: 8px; text-align: center;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .2);
}
.dq-talk b { display: block; font-size: 24px; font-weight: 900; }
.dq-talk span { font-size: 48px; font-weight: 900; color: var(--k-purple); }

/* ── раскрытие ── */
.s-reveal { padding: 0 14px 14px; gap: 12px; }
.dq-bars { height: clamp(170px, 32vh, 320px); display: flex; align-items: flex-end; justify-content: center; gap: clamp(10px, 2vw, 26px); padding-top: 10px; }
.dq-bar { width: clamp(70px, 10vw, 130px); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.dq-bar .cnt { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.dq-bar .cnt .tick { width: 26px; height: 26px; }
.dq-bar .col { transform-origin: bottom; animation: dq-grow .7s cubic-bezier(.2, .9, .25, 1) both; min-height: 6px; }
.dq-bar .base { height: 42px; display: grid; place-items: center; }
.dq-bar .base .shape { width: 26px; height: 26px; color: #fff; }
.dq-bar.c1 .col, .dq-bar.c1 .base { background: var(--t1); }
.dq-bar.c2 .col, .dq-bar.c2 .base { background: var(--t2); }
.dq-bar.c3 .col, .dq-bar.c3 .base { background: var(--t3); }
.dq-bar.c4 .col, .dq-bar.c4 .base { background: var(--t4); }
.dq-bar.c5 .col, .dq-bar.c5 .base { background: var(--t5); }
.dq-bar.miss { opacity: .35; }
@keyframes dq-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.dq-note { text-align: center; margin: 0; font-size: 17px; opacity: .9; }
.dq-btn.next { position: fixed; right: 18px; bottom: 18px; z-index: 6; font-size: 18px; padding: 12px 28px; }
.dq-demo .dq-btn.next { position: absolute; }

/* ── таблица ── */
.s-scores { align-items: center; padding: 6px 16px 20px; }
.dq-pilltitle {
  background: #fff; color: var(--k-ink); padding: 12px 34px; border-radius: 4px;
  font-size: clamp(24px, 3.4vw, 40px); font-weight: 900; margin: 4px auto 22px; text-align: center;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18);
}
.dq-board { width: min(900px, 100%); display: flex; flex-direction: column; gap: 10px; }
.dq-row {
  display: flex; align-items: center; gap: 14px; background: #fff; color: var(--k-ink);
  border-radius: 4px; padding: 12px 20px; font-size: clamp(18px, 2.4vw, 28px); font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); will-change: transform;
}
.dq-row.enter { animation: dq-in .45s cubic-bezier(.2, .9, .25, 1) both; }
.dq-row .pos { width: 34px; color: #8d8d8d; font-weight: 900; }
.dq-row .pic { width: 42px; height: 42px; }
.dq-row .who { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.dq-row .who small { font-size: 13px; font-weight: 800; }
.dq-row .who .streak { color: #d4570f; }
.dq-row .who .team { color: #777; }
.dq-row .flame { font-size: .8em; }
.dq-row .pts { font-weight: 900; font-variant-numeric: tabular-nums; }
.dq-row.me { background: #ffd83d; }

/* ── подиум ── */
.s-podium { align-items: center; padding: 4px 16px 18px; }
.dq-pods { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 14px; align-items: end; justify-content: center; width: 100%; }
.pod { display: flex; flex-direction: column; align-items: center; }
.pod .who { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 10px; opacity: 0; transition: opacity .4s .5s; }
.pod .who .pic { width: 74px; height: 74px; }
.pod .who b { background: #fff; color: var(--k-ink); padding: 6px 16px; border-radius: 4px; font-size: 22px; font-weight: 900; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .block {
  width: 100%; background: linear-gradient(180deg, var(--k-purple), #5b2c9e); border-radius: 6px 6px 0 0;
  display: flex; flex-direction: column; align-items: center; padding-top: 16px;
  transform: scaleY(0); transform-origin: bottom; transition: transform .8s cubic-bezier(.2, .9, .25, 1);
}
.pod .block b { font-size: clamp(56px, 8vw, 96px); font-weight: 900; line-height: 1; }
.pod .block .pts { font-size: 20px; margin-top: 6px; opacity: .9; }
.pod.p1 .block { height: 320px; background: linear-gradient(180deg, #ffd83d, #d89e00); color: var(--k-ink); }
.pod.p2 .block { height: 240px; }
.pod.p3 .block { height: 180px; }
.pod.up .block { transform: scaleY(1); }
.pod.up .who { opacity: 1; }
.pod.empty { visibility: hidden; }
.dq-podbtns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

/* ── разбор ── */
.s-summary { align-items: center; padding: 6px 16px 20px; }
.dq-sum { width: min(980px, 100%); display: flex; flex-direction: column; gap: 8px; }
.dq-sumrow { display: grid; grid-template-columns: 34px 1fr 160px 56px; gap: 14px; align-items: center; background: #fff; color: var(--k-ink); padding: 12px 16px; border-radius: 4px; font-size: 16px; }
.dq-sumrow .n { font-weight: 900; color: #888; }
.dq-sumrow .q { font-weight: 700; }
.dq-sumrow .meter { height: 12px; background: #eee; border-radius: 999px; overflow: hidden; }
.dq-sumrow .meter i { display: block; height: 100%; }
.dq-sumrow .meter.ok i { background: var(--t4); }
.dq-sumrow .meter.mid i { background: var(--t3); }
.dq-sumrow .meter.low i { background: var(--t1); }
.dq-sumrow .pct { text-align: right; }

/* ── QR во весь экран ── */
.dq-qrbig { position: fixed; inset: 0; z-index: 50; background: rgba(10, 6, 24, .92); display: grid; place-items: center; align-content: center; gap: 18px; cursor: zoom-out; padding: 24px; }
.dq-qrbig .sheet { background: #fff; border-radius: 16px; padding: 24px 24px 18px; display: grid; place-items: center; gap: 12px; box-shadow: 0 12px 0 rgba(0, 0, 0, .3); animation: dq-pop .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.dq-qrbig .cap { color: #555; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.dq-qrbig .pic { width: min(56vh, 74vw); height: min(56vh, 74vw); }
.dq-qrbig .pic svg { width: 100%; height: 100%; display: block; }
.dq-qrbig .code { color: var(--k-ink); font-size: clamp(30px, 6vw, 60px); font-weight: 900; letter-spacing: .08em; line-height: 1; }
.dq-qrbig .site { color: #888; font-weight: 800; }
.dq-qrbig .hint { color: rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .3); padding: 8px 16px; border-radius: 999px; }

/* ═══════════════════════ режимы (создание игры) ═══════════════════════ */

.dq-opts { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.dq-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #eee; color: var(--k-ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.dq-opt input { position: absolute; opacity: 0; pointer-events: none; }
.dq-opt .sw { display: block; width: 44px; height: 26px; border-radius: 999px; background: #c9c9c9; position: relative; flex: 0 0 auto; transition: background .2s; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15); }
.dq-opt .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, .25); transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), width .15s; }
.dq-opt:active .sw::after { width: 24px; }
.dq-opt input:checked + .sw { background: var(--t4); }
.dq-opt input:checked + .sw::after { transform: translateX(18px); }
.dq-opt:active input:checked + .sw::after { transform: translateX(14px); }
.dq-opt input:focus-visible + .sw { outline: 3px solid var(--t2); outline-offset: 2px; }
.dq-opt select { border: 1px solid #ccc; border-radius: 4px; padding: 6px 8px; font-weight: 700; font-family: inherit; }

/* ═══════════════════════ телефон ═══════════════════════ */

.dq-player { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.dq-ptop { display: flex; align-items: center; justify-content: space-between; background: #fff; color: var(--k-ink); padding: 10px 14px; font-weight: 900; }
.dq-ptop .n { background: var(--k-ink); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.dq-ptop .dq-chip { background: var(--k-grey); color: var(--k-ink); }
.dq-pstage { flex: 1; display: flex; flex-direction: column; padding: 16px; }
.dq-pstage .dq-screen { align-items: center; justify-content: center; text-align: center; }

.dq-plogo { display: flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 900; margin-bottom: 22px; }
.dq-plogo .mark { width: 46px; height: 46px; font-size: 26px; border-radius: 12px; }
.dq-card { background: #fff; color: var(--k-ink); border-radius: 8px; padding: 16px; width: min(360px, 100%); box-shadow: 0 6px 0 rgba(0, 0, 0, .18); text-align: left; }
.dq-card label { display: block; font-size: 13px; color: #666; margin: 8px 0 6px; }
.dq-input { width: 100%; box-sizing: border-box; border: 2px solid #ccc; border-radius: 4px; padding: 12px; font-family: inherit; font-size: 18px; font-weight: 800; text-align: center; color: var(--k-ink); }
.dq-input:focus { outline: none; border-color: var(--k-ink); }
.dq-input.big { font-size: 24px; letter-spacing: .12em; }
.dq-input.slim { font-size: 15px; padding: 9px; margin-bottom: 6px; text-align: left; }
.dq-link { border: 0; background: none; color: var(--t2); font-weight: 800; cursor: pointer; padding: 4px 0; }
.dq-namegen { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dq-namegen b { font-size: 24px; font-weight: 900; }
.dq-err { margin-top: 14px; background: #fff; color: #c0201f; padding: 10px 16px; border-radius: 4px; font-weight: 800; }

.dq-h { font-size: 28px; font-weight: 900; margin: 0 0 8px; }
.dq-h.big { font-size: 40px; }
.dq-sub { margin: 0 0 12px; font-size: 17px; opacity: .9; font-weight: 700; }
.dq-me { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 16px; }
.dq-me .pic { width: 96px; height: 96px; }
.dq-me b { background: rgba(0, 0, 0, .25); padding: 6px 16px; border-radius: 999px; font-size: 20px; }
.dq-custom { width: min(420px, 100%); }

.q-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.q-pick button { border: 3px solid transparent; border-radius: 8px; background: var(--k-grey); cursor: pointer; color: var(--k-ink); padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.q-pick button .pic { width: 40px; height: 40px; }
.q-pick button small { font-size: 10px; font-weight: 800; }
.q-pick button[aria-pressed="true"] { border-color: var(--k-purple); background: #fff; }

.p-answer { padding: 0 !important; justify-content: stretch !important; align-items: stretch !important; gap: 10px; position: relative; }
.dq-ptext { background: #fff; color: var(--k-ink); border-radius: 4px; padding: 12px; font-size: 17px; font-weight: 800; }
.dq-tiles.phone { flex: 1; grid-auto-rows: 1fr; gap: 10px; }
.dq-tiles.phone .dq-tile { justify-content: center; cursor: pointer; min-height: 120px; flex-direction: column; }
.dq-tiles.phone .dq-tile .shape { width: 64px; height: 64px; }
.dq-tiles.phone.texts .dq-tile { flex-direction: row; justify-content: flex-start; min-height: 80px; }
.dq-tiles.phone.texts .dq-tile .shape { width: 34px; height: 34px; }
.dq-tiles.phone .dq-tile .txt { font-size: 18px; }
.dq-tiles.phone .dq-tile:active { transform: scale(.97); }
.dq-tiles.phone .dq-tile.picked { outline: 4px solid #fff; outline-offset: -4px; }
.dq-tiles.phone .dq-tile.dim { opacity: .3; }
.dq-player .dq-talk { bottom: auto; top: 40%; }

.dq-boost { position: absolute; inset: 0; z-index: 5; background: rgba(20, 8, 40, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; border-radius: 6px; }
.dq-boost p { font-size: 22px; font-weight: 900; margin: 0 0 8px; }
.dq-btn.boost, .dq-btn.safe { width: min(320px, 100%); font-size: 22px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dq-btn.boost { background: #ff7a00; color: #fff; }
.dq-btn.safe { background: #fff; color: var(--k-ink); }
.dq-btn.boost small, .dq-btn.safe small { font-size: 13px; opacity: .9; }

.dq-player { transition: background-color .35s ease; }
.dq-player.ok { background: var(--ok); }
.dq-player.no { background: var(--bad); }
.dq-player.late { background: #7a3dbf; }
.dq-resicon { width: 110px; height: 110px; border-radius: 50%; background: rgba(0, 0, 0, .18); display: grid; place-items: center; font-size: 56px; margin: 8px 0 14px; animation: dq-pop .45s cubic-bezier(.2, 1.5, .4, 1) both; }
.dq-resicon svg { width: 66px; height: 66px; }
.dq-streakpill { background: rgba(0, 0, 0, .2); padding: 8px 18px; border-radius: 999px; font-size: 16px; margin-bottom: 10px; }
.dq-pointspill { background: rgba(0, 0, 0, .35); padding: 12px 28px; border-radius: 4px; font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.dq-rank { margin-top: 18px; font-size: 16px; font-weight: 700; opacity: .95; }
.dq-place b { font-size: 110px; font-weight: 900; line-height: 1; }
.dq-place small { font-size: 32px; font-weight: 900; }
.dq-medal { font-size: 110px; line-height: 1; animation: dq-pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }

.dq-pbar { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--k-ink); padding: 10px 14px; font-size: 18px; font-weight: 900; position: relative; z-index: 3; }
.dq-pbar .pic { width: 34px; height: 34px; }
.dq-pbar .spacer { flex: 1; }
.dq-pbar .score { background: var(--k-ink); color: #fff; padding: 6px 16px; border-radius: 4px; font-variant-numeric: tabular-nums; }

/* ═══════════════════════ пробная страница ═══════════════════════ */

.dq-demo { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 12px; min-height: 100vh; min-height: 100dvh; box-sizing: border-box; }
.dq-demo .frame-board { border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .12); position: relative; }
.dq-demo .frame-board .dq-host { min-height: 100%; }
.dq-demo .frame-phone { border-radius: 30px; border: 10px solid #111; background: var(--q-violet); overflow: hidden; position: relative; height: calc(100vh - 24px); height: calc(100dvh - 24px); max-height: 820px; align-self: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.dq-demo .frame-phone .dq-player { min-height: 100%; height: 100%; }
.dq-demo .dq-bar-line { position: absolute; }
.dq-demotabs { display: none; }

.dq-start { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 24px 16px; }
.dq-start .dq-card { width: auto; }
.dq-start h1 { font-size: 34px; font-weight: 900; margin: 0 0 6px; }
.dq-start p { margin: 0 0 18px; opacity: .9; font-weight: 600; }
.dq-row2 { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; align-items: flex-end; }
.dq-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.dq-field label { font-size: 13px; color: #666; font-weight: 700; }
.dq-field select, .dq-field input { border: 2px solid #ccc; border-radius: 4px; padding: 10px; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--k-ink); background: #fff; }
.s-skins { display: flex; gap: 8px; flex-wrap: wrap; }
.s-skin { border: 3px solid transparent; border-radius: 10px; padding: 5px; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--k-ink); }
.s-skin .dot { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .25); }
.s-skin small { font-size: 11px; font-weight: 800; }
.s-skin[aria-pressed="true"] { border-color: var(--k-purple); background: var(--k-grey); }

/* ═══════════════════════ узкие экраны ═══════════════════════ */

@media (max-width: 900px) {
  .dq-demo { grid-template-columns: 1fr; }
  .dq-demotabs { display: flex; gap: 8px; justify-content: center; }
  .dq-demotabs button { border: 0; border-radius: 4px; padding: 8px 18px; font-weight: 800; cursor: pointer; background: rgba(0, 0, 0, .25); color: #fff; }
  .dq-demotabs button[aria-pressed="true"] { background: #fff; color: var(--k-ink); }
  .dq-demo[data-view="board"] .frame-phone { display: none; }
  .dq-demo[data-view="phone"] .frame-board { display: none; }
  .dq-demo .frame-phone { height: 78vh; max-width: 400px; width: 100%; justify-self: center; }
}
@media (max-width: 720px) {
  .dq-opts { grid-template-columns: 1fr; }
  .dq-joinbar { flex-direction: column; }
  .join-site { border-right: 0; border-bottom: 2px solid #e6e6e6; }
  .join-qr { display: none; }
  .dq-mid { grid-template-columns: auto 1fr auto; min-height: 110px; }
  .dq-tiles.host { grid-template-columns: 1fr; }
  .dq-tiles.host.five > :last-child { grid-column: auto; }
  .dq-pods { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pod.p1 .block { height: 220px; } .pod.p2 .block { height: 170px; } .pod.p3 .block { height: 130px; }
  .pod .who b { font-size: 15px; }
  .pod .who .pic { width: 52px; height: 52px; }
  .dq-sumrow { grid-template-columns: 28px 1fr 60px; }
  .dq-sumrow .meter { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sayys *, .sayys *::before, .sayys *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.dq-pexit { border: 0; background: var(--k-grey); color: var(--k-ink); font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 4px; cursor: pointer; }

.dq-pstage .dq-qno b { font-size: clamp(38px, 12vw, 56px); }
.dq-pstage .dq-qno small { font-size: 16px; }

/* На раскрытии над плитками стоят столбики — плитки ужимаем, чтобы всё
   влезло в экран проектора без прокрутки. */
.s-reveal .dq-tiles.host .dq-tile { min-height: clamp(52px, 8vh, 84px); padding: 10px 16px; }
.s-reveal .dq-tiles.host .dq-tile .shape, .s-reveal .dq-tiles.host .dq-tile .tick, .s-reveal .dq-tiles.host .dq-tile .cross { width: 32px; height: 32px; }
.s-reveal .dq-tile .txt { font-size: clamp(16px, 1.9vw, 24px); }
.s-reveal .dq-bars { height: clamp(140px, 26vh, 260px); }

/* ═══════════════════════ выбор режима — как экран Kahoot ═══════════════════════
   Две большие карточки классики, под ними карусель экспериментов. Превью
   живые, но играют только под курсором и у выбранной карточки — как у
   Kahoot: иначе десять анимаций разом рябят в глазах. */

.dq-mtop { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dq-mcard {
  position: relative; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-align: left;
  background: #fff; color: var(--k-ink); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 2px #e3e3e3, 0 4px 0 #d4d4d4;
  transition: transform .22s cubic-bezier(.2, .9, .25, 1), box-shadow .22s;
}
.dq-mcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px #cfcfcf, 0 8px 0 #cfcfcf, 0 14px 24px rgba(0, 0, 0, .12); }
.dq-mcard:active { transform: translateY(1px); box-shadow: 0 0 0 2px #cfcfcf, 0 2px 0 #cfcfcf; }
.dq-mcard:focus-visible { outline: 3px solid var(--t2); outline-offset: 3px; }
.dq-mcard[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--t2), 0 6px 0 #0e4f9e; }
.dq-mcard[aria-pressed="true"]:hover { box-shadow: 0 0 0 4px var(--t2), 0 9px 0 #0e4f9e, 0 14px 24px rgba(19, 104, 206, .25); }
.dq-mcard.just { animation: dq-mjust .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes dq-mjust { 0% { transform: scale(.93); } 55% { transform: scale(1.05); } 100% { transform: none; } }

.dq-mcard .chk { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; z-index: 3; transform: scale(0) rotate(-90deg); transition: transform .35s cubic-bezier(.2, 1.7, .4, 1); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.dq-mcard .chk svg { width: 100%; height: 100%; display: block; }
.dq-mcard[aria-pressed="true"] .chk { transform: none; }
.dq-mcard .inf { position: absolute; right: 8px; top: 8px; z-index: 3; width: 26px; height: 26px; display: grid; place-items: center; color: rgba(0, 0, 0, .45); border-radius: 50%; cursor: help; transition: transform .15s, color .15s; }
.dq-mcard .inf svg { width: 22px; height: 22px; }
.dq-mcard .inf:hover { transform: scale(1.18); color: var(--k-ink); }
.dq-mcard[style*="--bg"] .inf { color: rgba(255, 255, 255, .75); }
.dq-mcard[style*="--bg"] .inf:hover { color: #fff; }

.dq-mcard .pv { position: relative; display: block; height: 104px; background: var(--bg, #f0f0f0); overflow: hidden; }
.dq-mcard.big .pv { height: 150px; }
.dq-mcard .pv * { animation-play-state: paused !important; }
.dq-mcard:hover .pv *, .dq-mcard[aria-pressed="true"] .pv *, .dq-mcard:focus-visible .pv * { animation-play-state: running !important; }
.dq-mcard .pv-word { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; }
.dq-mcard .txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.dq-mcard .txt b { font-size: 17px; font-weight: 900; }
.dq-mcard.big .txt b { font-size: 21px; }
.dq-mcard .txt em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6d6d6d; }
.dq-mcard .txt small { font-size: 12px; font-weight: 700; color: #8a8a8a; display: inline-flex; align-items: center; gap: 5px; }
.dq-mcard .txt small::before { content: ""; width: 12px; height: 16px; border: 2px solid currentColor; border-radius: 3px; box-sizing: border-box; }

.dq-mhead { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 6px; color: var(--k-ink); }
.dq-mhead b { font-size: 17px; font-weight: 900; }
.dq-mhead small { font-size: 13px; color: #7a7a7a; font-weight: 700; }
.dq-mrow { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; padding: 8px 6px 14px; margin: 0 -6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dq-mrow .dq-mcard { scroll-snap-align: start; animation: dq-cardin .45s cubic-bezier(.2, .9, .25, 1) both; }
.dq-mrow .dq-mcard:nth-child(2) { animation-delay: .04s; } .dq-mrow .dq-mcard:nth-child(3) { animation-delay: .08s; }
.dq-mrow .dq-mcard:nth-child(4) { animation-delay: .12s; } .dq-mrow .dq-mcard:nth-child(5) { animation-delay: .16s; }
.dq-mrow .dq-mcard:nth-child(6) { animation-delay: .2s; }  .dq-mrow .dq-mcard:nth-child(7) { animation-delay: .24s; }
@keyframes dq-cardin { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.dq-mnote { margin: 6px 0 0; color: #555; font-size: 14px; font-weight: 700; min-height: 1.4em; animation: dq-in .35s both; }
.dq-optshead { margin-top: 18px; color: var(--k-ink); font-size: 15px; font-weight: 900; }
.dq-opts .dq-opt { animation: dq-in .3s both; }
/* Карточка создания игры — .dq-card, и её «label { display: block }»
   ставил переключатель под текст. */
.dq-opts > .dq-opt { display: flex; margin: 0; font-size: 14px; color: var(--k-ink); }
.dq-opt .inf { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; vertical-align: -4px; color: #a5a5a5; cursor: help; transition: color .15s, transform .15s; }
.dq-opt .inf svg { width: 17px; height: 17px; }
.dq-opt .inf:hover { color: var(--k-ink); transform: scale(1.15); }
.dq-opt.sel { cursor: default; }

/* Подсказка — тёмная плашка со стрелкой, выскакивает под «i». */
.dq-tip {
  position: fixed; z-index: 80; box-sizing: border-box; pointer-events: none;
  background: #2b2b2b; color: #fff; font: 700 13px/1.45 var(--kfont, system-ui); padding: 10px 13px; border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.dq-tip::before { content: ""; position: absolute; top: -6px; left: calc(var(--ax, 50%) - 6px); border: 6px solid transparent; border-top: 0; border-bottom-color: #2b2b2b; }
.dq-tip.in { animation: dq-tip .2s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes dq-tip { from { opacity: 0; transform: translateY(-5px) scale(.96); } to { opacity: 1; transform: none; } }

/* Иллюстрации классики: двое с телефонами / команды у одного экрана. */
.il-classic, .il-team { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 22px; background: linear-gradient(135deg, #1368ce, #46178f); }
.il-team { background: linear-gradient(135deg, #26890c, #0f5c4a); }
.il-classic .vs, .il-team .vs { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--k-ink); display: grid; place-items: center; font-size: 13px; font-weight: 900; z-index: 1; animation: il-vs 1.4s ease-in-out infinite; }
@keyframes il-vs { 50% { transform: scale(1.15) rotate(-8deg); } }
.il-classic .p { position: relative; width: 46px; height: 46px; border-radius: 50%; background: #ffd83d; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15); animation: il-bob 1s ease-in-out infinite alternate; }
.il-classic .p.b { background: #ff8a3d; animation-delay: .5s; }
.il-classic .p::before, .il-classic .p::after { content: ""; position: absolute; top: 17px; width: 6px; height: 7px; border-radius: 50%; background: #333; }
.il-classic .p::before { left: 13px; } .il-classic .p::after { right: 13px; }
.il-classic .ph { position: absolute; bottom: 18px; width: 20px; height: 32px; border-radius: 4px; background: #fff; border: 3px solid #222; box-sizing: border-box; animation: il-tap .5s ease-in-out infinite alternate; }
.il-classic .ph.a { left: calc(50% - 88px); } .il-classic .ph.b { right: calc(50% - 88px); animation-delay: .25s; }
@keyframes il-bob { to { transform: translateY(-8px); } }
@keyframes il-tap { to { transform: translateY(-4px) rotate(-6deg); } }
.il-team .g { display: flex; gap: 4px; }
.il-team .g i { width: 26px; height: 26px; border-radius: 50%; background: #ffd83d; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); animation: il-bob .9s ease-in-out infinite alternate; }
.il-team .g i:nth-child(2) { background: #8fd3ff; animation-delay: .2s; margin-top: -14px; }
.il-team .g i:nth-child(3) { background: #ff8a3d; animation-delay: .4s; }
.il-team .g.b i { background: #ff7ab8; } .il-team .g.b i:nth-child(2) { background: #c7a4ff; } .il-team .g.b i:nth-child(3) { background: #b6ff5c; }

/* Превью экспериментов. */
.pv-robot, .pv-sub, .pv-tower, .pv-map, .pv-gems, .pv-acc, .pv-conf { position: absolute; inset: 0; }
.pv-robot { background: radial-gradient(circle at 70% 20%, #3b2a8a, transparent 60%); }
.pv-robot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #2d2566 0 24px, #3a3180 24px 48px); animation: w-floor .6s linear infinite; background-size: 48px 100%; }
.pv-robot .bot { position: absolute; bottom: 16px; left: 8%; font-size: 34px; font-style: normal; animation: pv-chase 3s ease-in-out infinite; }
.pv-robot .crew { position: absolute; bottom: 18px; left: 44%; display: flex; gap: 2px; animation: pv-flee 3s ease-in-out infinite; }
.pv-robot .crew i { font-style: normal; font-size: 22px; animation: w-run .3s ease-in-out infinite alternate; }
.pv-robot .crew i:nth-child(2) { animation-delay: .1s; } .pv-robot .crew i:nth-child(3) { animation-delay: .2s; }
.pv-robot .door { position: absolute; right: 8px; bottom: 20px; width: 20px; height: 38px; border-radius: 4px 4px 0 0; background: #66bf39; box-shadow: 0 0 14px #66bf39; animation: pv-glow 1s ease-in-out infinite alternate; }
@keyframes pv-chase { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(34px); } }
@keyframes pv-flee { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(22px); } }
@keyframes pv-glow { to { opacity: .55; box-shadow: 0 0 4px #66bf39; } }
.pv-sub { background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent); }
.pv-sub .fish { position: absolute; left: 6%; top: 40%; font-size: 40px; font-style: normal; transform: scaleX(-1); animation: pv-fish 2.6s ease-in-out infinite; }
.pv-sub .sub { position: absolute; left: 56%; top: 36%; font-size: 32px; font-style: normal; animation: pv-sub 2.6s ease-in-out infinite; }
.pv-sub .b { position: absolute; bottom: -12px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); animation: pv-bubble 2.4s linear infinite; }
.pv-sub .b1 { left: 20%; } .pv-sub .b2 { left: 50%; animation-delay: .8s; } .pv-sub .b3 { left: 80%; animation-delay: 1.6s; }
@keyframes pv-fish { 0%, 100% { transform: scaleX(-1) translate(0, 0); } 50% { transform: scaleX(-1) translate(-30px, 6px); } }
@keyframes pv-sub { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(18px, -6px) rotate(3deg); } }
@keyframes pv-bubble { to { transform: translateY(-130px); opacity: 0; } }
.pv-tower { display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding-bottom: 10px; box-sizing: border-box; background: linear-gradient(180deg, #7ec8f5, #bfe6ff); }
.pv-tower .t { display: flex; flex-direction: column-reverse; width: 30px; gap: 2px; }
.pv-tower .t i { height: 12px; border-radius: 2px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.pv-tower .t1 { --c: #e21b3c; } .pv-tower .t2 { --c: #1368ce; } .pv-tower .t3 { --c: #26890c; }
.pv-tower .t i:last-child { animation: pv-drop 1.8s cubic-bezier(.3, 1.4, .5, 1) infinite; }
.pv-tower .t2 i:last-child { animation-delay: .6s; } .pv-tower .t3 i:last-child { animation-delay: 1.2s; }
@keyframes pv-drop { 0% { transform: translateY(-80px); opacity: 0; } 30% { transform: none; opacity: 1; } 100% { transform: none; } }
.pv-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; padding: 10px; box-sizing: border-box; }
.pv-map i { border-radius: 3px; background: rgba(255, 255, 255, .15); animation: pv-paint 4s steps(1) infinite; }
.pv-map i:nth-child(3n) { animation-delay: -1s; } .pv-map i:nth-child(4n+1) { animation-delay: -2.2s; } .pv-map i:nth-child(5n+2) { animation-delay: -3.1s; } .pv-map i:nth-child(7n) { animation-delay: -.4s; }
@keyframes pv-paint { 0% { background: #e21b3c; } 25% { background: #1368ce; } 50% { background: #d89e00; } 75% { background: #26890c; } }
.pv-gems { overflow: hidden; }
.pv-gems i { position: absolute; font-style: normal; font-size: 26px; top: 50%; animation: pv-gem 2.4s linear infinite; }
.pv-gems i:nth-child(1) { top: 20%; } .pv-gems i:nth-child(2) { top: 55%; animation-delay: .5s; } .pv-gems i:nth-child(3) { top: 34%; animation-delay: 1s; }
.pv-gems i:nth-child(4) { top: 64%; animation-delay: 1.5s; } .pv-gems i:nth-child(5) { top: 12%; animation-delay: 1.9s; }
@keyframes pv-gem { from { left: -30px; transform: rotate(0); } to { left: 110%; transform: rotate(300deg); } }
.pv-acc { display: grid; place-items: center; background: linear-gradient(135deg, #d89e00, #a37700); }
.pv-acc .ring { position: absolute; border-radius: 50%; border: 8px solid #fff; }
.pv-acc .r1 { width: 74px; height: 74px; } .pv-acc .r2 { width: 44px; height: 44px; border-color: #e21b3c; } .pv-acc .r3 { width: 14px; height: 14px; background: #e21b3c; border: 0; }
.pv-acc .dart { position: absolute; width: 40px; height: 4px; background: #333; border-radius: 2px; left: 50%; top: 50%; transform-origin: left center; animation: pv-dart 1.6s cubic-bezier(.5, 0, .2, 1) infinite; }
@keyframes pv-dart { 0% { transform: translate(90px, -40px) rotate(-25deg); opacity: 0; } 40% { transform: translate(0, 0) rotate(-25deg); opacity: 1; } 45% { transform: translate(-3px, 1px) rotate(-22deg); } 100% { transform: translate(0, 0) rotate(-25deg); opacity: 1; } }
.pv-conf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, #e21b3c, #8b1fc9); color: #fff; }
.pv-conf .meter { width: 70%; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.pv-conf .meter i { display: block; height: 100%; width: 20%; background: #ffd83d; border-radius: 999px; animation: pv-meter 2s cubic-bezier(.4, 0, .2, 1) infinite; }
.pv-conf b { font-size: 16px; font-weight: 900; letter-spacing: .1em; animation: il-vs 1s ease-in-out infinite; }
@keyframes pv-meter { 0% { width: 10%; } 70% { width: 100%; } 100% { width: 100%; } }

/* ═══════════════════════ доска: раунд эксперимента ═══════════════════════ */

.s-play { padding: 0 14px 14px; gap: 10px; position: relative; }
.dq-playbar { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--k-ink); border-radius: 6px; padding: 8px 12px; font-size: 20px; font-weight: 900; animation: dq-in .4s both; }
.dq-clock { display: inline-flex; align-items: center; gap: 8px; background: var(--k-purple); color: #fff; border-radius: 999px; padding: 6px 16px 6px 12px; font-variant-numeric: tabular-nums; transition: background .3s; }
.dq-clock svg { width: 22px; height: 22px; }
.dq-clock.hot { background: #e21b3c; animation: dq-beat .5s ease-in-out infinite; }
.dq-playname { flex: 1; text-align: center; font-size: 22px; }
.dq-playstat { background: var(--k-grey); border-radius: 999px; padding: 6px 14px; font-variant-numeric: tabular-nums; }
.dq-world { flex: 1; position: relative; display: flex; min-height: 380px; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.dq-world > * { flex: 1; }
.dq-countdown { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; align-content: center; gap: 16px; background: rgba(20, 8, 40, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dq-countdown b { width: 210px; height: 210px; border-radius: 50%; background: var(--k-purple); display: grid; place-items: center; font-size: 120px; font-weight: 900; box-shadow: 0 0 0 14px rgba(255, 255, 255, .14), 0 10px 0 rgba(0, 0, 0, .3); overflow: hidden; }
.dq-countdown b span { display: block; animation: dq-cd 1s cubic-bezier(.2, 1.2, .4, 1) both; }
.dq-countdown small { font-size: 26px; animation: dq-beat 1s ease-in-out infinite; }
@keyframes dq-cd { 0% { transform: scale(2.4); opacity: 0; } 22% { transform: scale(1); opacity: 1; } 80% { opacity: 1; transform: scale(1); } 100% { transform: scale(.5); opacity: 0; } }

.dq-lchip.teamed { background: var(--tc); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.teamflag { position: relative; display: block; width: 74px; height: 74px; }
.teamflag::before { content: ""; position: absolute; left: 16px; top: 2px; bottom: 0; width: 6px; border-radius: 3px; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.teamflag::after { content: ""; position: absolute; left: 22px; top: 6px; width: 46px; height: 32px; background: var(--c); clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%); transform-origin: left center; animation: w-wave 1s ease-in-out infinite alternate; }
@keyframes w-wave { from { transform: skewY(-6deg) scaleX(.96); } to { transform: skewY(6deg); } }

/* ── погоня: космос и океан ── */
.w-chase { position: relative; display: flex; flex-direction: column; overflow: hidden; --danger: 0; }
.w-space { background: radial-gradient(ellipse at 70% 15%, #3b2a8a 0, #1b1440 55%, #0b0720 100%); }
.w-ocean { background: linear-gradient(180deg, #0f7fb8 0%, #075089 50%, #032544 100%); }
.w-chase::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4; box-shadow: inset 0 0 calc(30px + 140px * var(--danger)) rgba(226, 27, 60, calc(var(--danger) * .8)); transition: box-shadow .5s; }
.w-chase.shake { animation: w-shake .55s cubic-bezier(.36, .07, .19, .97); }
@keyframes w-shake { 10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(6px); } 30%, 50%, 70% { transform: translateX(-10px); } 40%, 60% { transform: translateX(10px); } }
.w-sky { position: absolute; inset: 0; pointer-events: none; }
.w-space .w-sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: w-twinkle 3s ease-in-out infinite; }
.w-space .w-sky i:nth-child(5n) { width: 5px; height: 5px; }
@keyframes w-twinkle { 50% { opacity: .15; transform: scale(.5); } }
.w-ocean .w-sky i { position: absolute; bottom: -24px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); animation: w-bubble linear infinite; }
.w-ocean .w-sky i:nth-child(3n) { width: 8px; height: 8px; }
@keyframes w-bubble { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(24px, -720px); opacity: 0; } }
.w-ocean::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 80px, rgba(255, 255, 255, .05) 80px 120px); animation: w-rays 8s linear infinite; pointer-events: none; }
@keyframes w-rays { to { background-position: 400px 0; } }

.w-hud { position: relative; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.w-stage { background: #fff; color: var(--k-ink); border-radius: 8px; padding: 6px 14px; text-align: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.w-stage small { display: block; font-size: 12px; color: #777; }
.w-stage b { display: block; font-size: 30px; font-weight: 900; line-height: 1; }
.w-goal { flex: 1; }
.w-goalbar { height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25); }
.w-goalbar i { position: relative; display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4fae23, #b6ff5c); transition: width .7s cubic-bezier(.2, .9, .25, 1); overflow: hidden; }
.w-goalbar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%); animation: w-shine 1.6s linear infinite; }
@keyframes w-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.w-goal small { display: block; margin-top: 6px; font-size: 15px; opacity: .9; }
.w-stars { display: flex; gap: 8px; }
.w-stars span { background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 6px 14px; font-size: 18px; font-variant-numeric: tabular-nums; }

.w-track { position: relative; z-index: 2; flex: 1; min-height: 230px; }
.w-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; }
.w-space .w-floor { background: repeating-linear-gradient(90deg, #2d2566 0 60px, #251f58 60px 120px); background-size: 120px 100%; border-top: 5px solid #6a5fd0; box-shadow: 0 -10px 30px rgba(106, 95, 208, .35); animation: w-floor 1s linear infinite; }
.w-ocean .w-floor { background: radial-gradient(ellipse at 30% 0, #e0c48a, #b8925a 70%); border-top-left-radius: 50% 30px; border-top-right-radius: 50% 30px; }
@keyframes w-floor { to { background-position: -120px 0; } }
.w-exit { position: absolute; right: 2%; bottom: 26%; font-size: 70px; line-height: 1; text-align: center; animation: w-exit 1.6s ease-in-out infinite; }
.w-exit small { display: block; margin-top: 4px; font-size: 13px; font-weight: 900; letter-spacing: .12em; background: #66bf39; color: #fff; border-radius: 4px; padding: 3px 8px; box-shadow: 0 0 16px rgba(102, 191, 57, .8); }
@keyframes w-exit { 50% { transform: translateY(-5px); filter: drop-shadow(0 0 14px rgba(182, 255, 92, .8)); } }
.w-crew { position: absolute; bottom: 26%; left: 35%; width: 0; height: 120px; transition: left .9s cubic-bezier(.2, .9, .25, 1); }
.w-mate { position: absolute; bottom: var(--y, 0); left: calc(var(--x, 0px) - 28px); width: 56px; height: 56px; animation: w-run .34s ease-in-out infinite alternate; animation-delay: var(--d, 0s); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .3)); }
.w-mate > * { width: 100%; height: 100%; }
.w-ocean .w-mate { animation-name: w-swim; animation-duration: 1.1s; }
@keyframes w-run { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-9px) rotate(5deg); } }
@keyframes w-swim { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-14px) rotate(3deg); } }
.w-crew::before { content: ""; position: absolute; left: -120px; bottom: 4px; width: 110px; height: 8px; border-radius: 4px; opacity: 0; background: linear-gradient(90deg, transparent, #ffd83d); }
.w-crew.boost::before { animation: w-trail .9s ease-out; }
.w-crew.boost .w-mate { animation: w-boost .9s ease-out; }
@keyframes w-trail { 0% { opacity: 0; transform: scaleX(.2); } 20% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(40px); } }
@keyframes w-boost { 0% { transform: none; } 30% { transform: translateX(26px) scale(1.15); filter: drop-shadow(0 0 16px #ffd83d); } 100% { transform: none; } }
.w-enemy { position: absolute; bottom: 26%; left: 10%; width: 130px; transform: translateX(-70%); transition: left .12s linear; z-index: 1; }
.w-robot { display: block; width: 100%; animation: w-stomp .45s ease-in-out infinite alternate; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.w-robot .eye { animation: w-eye 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.w-robot .arm { transform-box: fill-box; transform-origin: top center; animation: w-arm .45s ease-in-out infinite alternate; }
.w-robot .arm.r, .w-robot .leg.r { animation-direction: alternate-reverse; }
.w-robot .leg { transform-box: fill-box; transform-origin: top center; animation: w-arm .45s ease-in-out infinite alternate; }
@keyframes w-stomp { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-6px) rotate(2deg); } }
@keyframes w-arm { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes w-eye { 0%, 100% { fill: #ff3355; } 50% { fill: #ffb3c0; } 90% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.w-ocean .w-enemy { width: 180px; bottom: 34%; transform: translateX(-80%); }
.w-fish { display: block; width: 100%; animation: w-swim 1s ease-in-out infinite alternate; }
.w-fish .jaw { transform-box: fill-box; transform-origin: left top; animation: w-chomp .5s ease-in-out infinite alternate; }
@keyframes w-chomp { from { transform: rotate(0); } to { transform: rotate(22deg); } }
.w-banner { position: absolute; left: 50%; top: 46%; z-index: 6; background: #fff; color: var(--k-ink); border-radius: 10px; padding: 18px 34px; font-size: clamp(22px, 3vw, 40px); font-weight: 900; white-space: nowrap; animation: w-banner 2.6s cubic-bezier(.2, 1.2, .4, 1) both; }
.w-banner.good { box-shadow: 0 8px 0 #4fae23; }
.w-banner.bad { box-shadow: 0 8px 0 #b01130; }
@keyframes w-banner {
  0% { transform: translate(-50%, -50%) scale(.3) rotate(-8deg); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.1) rotate(2deg); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  85% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -70%) scale(.9); opacity: 0; }
}
.w-empty { margin: auto; font-size: 22px; opacity: .8; }

/* ── башни ── */
.w-towers { position: relative; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, #5fb6ef 0%, #a8dcff 55%, #e2f5ff 100%); }
.w-clouds i { position: absolute; width: 150px; height: 44px; border-radius: 50px; background: #fff; opacity: .85; animation: w-cloud linear infinite; }
.w-clouds i::before { content: ""; position: absolute; width: 70px; height: 60px; border-radius: 50%; background: #fff; left: 26px; top: -28px; }
.w-clouds i:nth-child(1) { top: 10%; animation-duration: 46s; animation-delay: -12s; }
.w-clouds i:nth-child(2) { top: 26%; animation-duration: 60s; animation-delay: -40s; transform: scale(.7); }
.w-clouds i:nth-child(3) { top: 6%; animation-duration: 38s; animation-delay: -25s; transform: scale(.55); }
@keyframes w-cloud { from { left: -200px; } to { left: 110%; } }
.w-cols { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: clamp(18px, 5vw, 70px); padding: 16px 20px 0; }
.w-col { display: flex; flex-direction: column; align-items: center; flex: 0 1 160px; min-width: 0; }
.w-crown { font-size: 42px; margin-bottom: 4px; animation: w-crown 1.4s ease-in-out infinite; }
.w-crown.in { animation: dq-pop .5s cubic-bezier(.2, 1.6, .4, 1), w-crown 1.4s .5s ease-in-out infinite; }
@keyframes w-crown { 50% { transform: translateY(-6px) rotate(-6deg); } }
.w-stack { display: flex; flex-direction: column-reverse; align-items: center; width: 100%; }
.w-stack i { display: block; width: 86%; height: var(--h, 20px); margin-top: 2px; border-radius: 3px; background: var(--c); box-shadow: inset 0 -4px 0 var(--s), inset 0 2px 0 rgba(255, 255, 255, .3); transition: height .4s; }
.w-stack i:nth-child(odd) { transform: translateX(3px); }
.w-stack i:nth-child(even) { transform: translateX(-3px); }
.w-stack i.drop { animation: w-drop .6s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes w-drop { 0% { transform: translateY(-460px) rotate(-10deg); opacity: 0; } 55% { opacity: 1; transform: translateY(6px) rotate(0); } 75% { transform: translateY(-3px); } 100% { transform: none; } }
.w-base { width: 100%; background: var(--c); color: #fff; border-radius: 6px 6px 0 0; text-align: center; padding: 8px 4px; box-shadow: inset 0 -5px 0 var(--s); }
.w-base b { display: block; font-size: 18px; font-weight: 900; }
.w-base span { font-size: 15px; font-variant-numeric: tabular-nums; }
.w-base small { display: block; font-size: 12px; opacity: .85; }
.w-ground { position: relative; z-index: 1; height: 26px; background: linear-gradient(#5dbb3a, #3e8e22); box-shadow: inset 0 4px 0 #7fd65a; }

/* ── карта королевств ── */
.w-kingdom { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 18px; background: radial-gradient(circle at 50% 30%, #4b2a78, #22103d); }
.w-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; width: min(100%, 860px); aspect-ratio: 12 / 7; perspective: 900px; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08); box-sizing: border-box; }
.w-map i { border-radius: 5px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.w-map i.own { background: var(--c); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .25); }
.w-map i.flip { animation: w-flip .65s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes w-flip { 0% { transform: rotateY(180deg) scale(.5); filter: brightness(1.8); } 100% { transform: none; filter: none; } }
.w-legend { display: flex; flex-direction: column; gap: 10px; width: 230px; }
.w-leg { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; background: #fff; color: var(--k-ink); border-radius: 8px; padding: 8px 12px; border-left: 8px solid var(--c); animation: dq-in .3s both; }
.w-leg b { font-size: 16px; }
.w-leg small { font-weight: 900; grid-row: 1; grid-column: 2; }
.w-leg .m { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: #eee; overflow: hidden; }
.w-leg .m i { display: block; height: 100%; background: var(--c); border-radius: 999px; }

/* ── сокровища ── */
.w-treasure { position: relative; display: flex; overflow: hidden; background: radial-gradient(ellipse at 50% 110%, #b07a2c 0, #5a3414 50%, #26140a 100%); }
.w-sparkles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffe98a; box-shadow: 0 0 12px #ffd83d; animation: w-twinkle 2.2s ease-in-out infinite; }
.w-chest { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); font-size: 160px; opacity: .14; pointer-events: none; }
.w-meters { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 1.8vw, 24px); padding: 26px 20px 16px; }
.w-meter { display: flex; flex-direction: column; align-items: center; gap: 6px; width: clamp(58px, 7vw, 92px); animation: dq-in .4s both; }
.w-meter .v { font-size: 18px; font-weight: 900; color: #ffe98a; font-variant-numeric: tabular-nums; }
.w-meter .tube { position: relative; width: 64%; height: clamp(150px, 36vh, 340px); border-radius: 999px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .15); }
.w-meter .tube i { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 3%; max-height: calc(100% - 6px); border-radius: 999px; background: linear-gradient(180deg, #a4f4ff, #1ea7d6 55%, #1368ce); box-shadow: 0 0 18px rgba(143, 240, 255, .55); transition: height .9s cubic-bezier(.2, .9, .25, 1); }
.w-meter.lead .tube i { background: linear-gradient(180deg, #fff3a8, #ffd83d 50%, #d89e00); box-shadow: 0 0 22px rgba(255, 216, 61, .7); }
.w-meter.lead .v::before { content: "👑 "; }
.w-meter .pop { position: absolute; left: 50%; bottom: 60%; font-style: normal; font-size: 28px; animation: w-pop 1.2s cubic-bezier(.2, .9, .25, 1) forwards; }
@keyframes w-pop { 0% { transform: translate(-50%, 30px) scale(.3); opacity: 0; } 30% { transform: translate(-50%, -20px) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -80px) scale(.8); opacity: 0; } }
.w-meter .pic { width: 46px; height: 46px; }
.w-meter small { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════ телефон: эксперимент ═══════════════════════ */

.p-xplay { padding: 0 !important; justify-content: stretch !important; align-items: stretch !important; gap: 10px; position: relative; }
.dq-xhud { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dq-xtime { background: var(--k-purple); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.dq-xtime.hot { background: #e21b3c; animation: dq-beat .5s ease-in-out infinite; }
.dq-xres { background: #fff; color: var(--k-ink); border-radius: 999px; padding: 6px 14px; font-weight: 900; box-shadow: inset 6px 0 0 var(--tc, transparent); }
.p-xplay .dq-tile { animation: dq-tile .35s cubic-bezier(.2, .9, .25, 1) both; }
.p-xplay .dq-tile.right { opacity: 1; outline: 4px solid #fff; outline-offset: -4px; animation: dq-right .5s cubic-bezier(.2, 1.5, .4, 1); }
.p-xplay .dq-tile.wrong-pick { animation: dq-no .45s; }
@keyframes dq-right { 50% { transform: scale(1.05); } }
@keyframes dq-no { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.dq-xfeed { position: absolute; left: 50%; top: 42%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 34px; border-radius: 12px; font-size: 32px; font-weight: 900; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); animation: dq-feed .5s cubic-bezier(.2, 1.5, .4, 1) both; pointer-events: none; }
.dq-xfeed.ok { background: var(--ok); }
.dq-xfeed.no { background: var(--bad); }
.dq-xfeed span { font-size: 15px; background: rgba(0, 0, 0, .2); border-radius: 999px; padding: 4px 12px; }
@keyframes dq-feed { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.dq-teambadge { color: #fff; padding: 6px 16px; border-radius: 999px; font-size: 16px; font-weight: 900; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); animation: dq-pop .45s cubic-bezier(.2, 1.5, .4, 1) both; }

.p-xmini { padding: 0 !important; align-items: stretch !important; justify-content: stretch !important; }
.dq-xmini { flex: 1; display: flex; flex-direction: column; }
.dq-xmini > * { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: dq-in .3s both; }
.dq-xmini p { margin: 0; font-size: 20px; font-weight: 900; }
.dq-xmini small { opacity: .85; }

/* Рывок: круглая кнопка, кольцо заполняется, пока держишь. */
.m-boostbtn { position: relative; width: 230px; height: 230px; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffa640, #ff7a00 60%, #d85f00); color: #fff; cursor: pointer; box-shadow: 0 10px 0 #a44800, 0 0 0 10px rgba(255, 255, 255, .12); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .12s, box-shadow .12s; }
.m-boostbtn svg { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); pointer-events: none; }
.m-boostbtn circle { fill: none; stroke-width: 6; }
.m-boostbtn .bg { stroke: rgba(255, 255, 255, .18); }
.m-boostbtn .fg { stroke: #ffd83d; stroke-linecap: round; filter: drop-shadow(0 0 6px #ffd83d); }
.m-boostbtn b { position: relative; font-size: 28px; font-weight: 900; letter-spacing: .04em; }
.m-boostbtn.hold { transform: translateY(6px) scale(.97); box-shadow: 0 4px 0 #a44800, 0 0 0 10px rgba(255, 255, 255, .12); animation: m-rumble .08s linear infinite; }
.m-boostbtn.full { box-shadow: 0 4px 0 #a44800, 0 0 0 10px rgba(255, 216, 61, .5), 0 0 40px #ffd83d; }
.m-boostbtn.go { animation: m-launch .45s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes m-rumble { 25% { translate: 1px 0; } 75% { translate: -1px 0; } }
@keyframes m-launch { 0% { transform: scale(1); } 30% { transform: scale(1.12); } 100% { transform: translateY(-120vh) scale(.6); opacity: 0; } }

/* Блок: качается над башней, по нажатию падает. */
.m-drop { width: 100%; }
.m-droparea { position: relative; width: 100%; max-width: 340px; height: 320px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #5fb6ef, #cdeeff); cursor: pointer; }
.m-swing { position: absolute; left: calc(50% - 50px); top: 22px; width: 100px; height: 34px; border-radius: 4px; background: var(--c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .3); transition: translate .42s cubic-bezier(.55, 0, 1, .45), rotate .42s; }
.m-swing::before { content: ""; position: absolute; left: 50%; top: -30px; width: 2px; height: 30px; background: rgba(0, 0, 0, .35); }
.m-swing.fall::before { display: none; }
.m-swing.fall { translate: 0 216px; }
.m-swing.miss { rotate: 14deg; }
.m-swing.perfect { animation: m-perfect .5s .42s; }
@keyframes m-perfect { 50% { filter: brightness(1.5) drop-shadow(0 0 12px #fff); } }
.m-top { position: absolute; left: calc(50% - 50px); bottom: 0; width: 100px; display: flex; flex-direction: column-reverse; }
.m-top i { display: block; height: 34px; margin-top: 2px; border-radius: 4px; background: var(--c); opacity: .85; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25); }
.m-target { position: absolute; left: 50%; top: -6px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px dashed #fff; animation: w-twinkle 1s ease-in-out infinite; }
.m-drop .dq-btn { max-width: 340px; }

/* Карта: тапни клетку — плюх краски. */
.m-paint { width: 100%; }
.m-paint p b { font-size: 26px; color: #ffd83d; }
.m-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; width: 100%; max-width: 360px; aspect-ratio: 12 / 7; }
.m-map button { border: 0; padding: 0; border-radius: 3px; background: rgba(255, 255, 255, .18); cursor: pointer; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.m-map button:active { transform: scale(.85); }
.m-map button.splat { animation: m-splat .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes m-splat { 0% { transform: scale(.3); box-shadow: 0 0 0 0 var(--c); } 60% { transform: scale(1.35); box-shadow: 0 0 0 6px transparent; } 100% { transform: none; } }
.m-paint .dq-btn { max-width: 360px; }

/* Сундук: камни летят, лови пальцем. */
.m-catch { width: 100%; justify-content: stretch !important; }
.m-score { display: flex; gap: 10px; justify-content: center; width: 100%; }
.m-score span { background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 6px 14px; font-size: 18px; font-variant-numeric: tabular-nums; }
.m-score [data-m="t"] { background: var(--k-purple); min-width: 26px; text-align: center; }
.m-field { position: relative; flex: 1; width: 100%; min-height: 320px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, #b07a2c, #4a2a12 60%, #26140a); touch-action: manipulation; }
.m-item { position: absolute; border: 0; background: none; padding: 6px; font-size: 42px; line-height: 1; cursor: pointer; animation-timing-function: linear; animation-fill-mode: forwards; user-select: none; -webkit-user-select: none; transition: transform .25s, opacity .25s; }
.m-item.got { transform: scale(1.9); opacity: 0; }
@keyframes m-fly-r { from { left: -60px; rotate: 0deg; } to { left: calc(100% + 10px); rotate: 320deg; } }
@keyframes m-fly-l { from { left: calc(100% + 10px); rotate: 0deg; } to { left: -60px; rotate: -320deg; } }

.p-xend .dq-btn { margin-top: 18px; }

@media (max-width: 720px) {
  .dq-mtop { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dq-mcard.big .pv { height: 110px; }
  .dq-mrow { grid-auto-columns: 148px; }
  .dq-world { min-height: 300px; }
  .w-hud { flex-wrap: wrap; gap: 10px; }
  .w-legend { width: 100%; }
  .dq-countdown b { width: 150px; height: 150px; font-size: 84px; }
  .dq-playbar { font-size: 16px; gap: 8px; }
  .dq-playname { font-size: 16px; }
  .w-cols { gap: 8px; padding: 12px 8px 0; }
  .w-base b { font-size: 14px; } .w-base span { font-size: 12px; }
  .w-meters { justify-content: flex-start; overflow-x: auto; gap: 8px; padding: 20px 10px 12px; }
  .w-meter { flex: 0 0 56px; }
  .w-mate { width: 40px; height: 40px; }
  .w-enemy { width: 96px; }
  .w-ocean .w-enemy { width: 130px; }
}
