/* Плеер квиза (.q-): дейлик, марафон, блиц, рубрика, турнир недели.
   Узкая колонка как у пульта ведущего: сверху панель студии, ниже клетки табло, вопрос на сукне. */

.q-app {
  --q-w: 680px;
  position: relative;
  width: 100%;
  max-width: calc(var(--q-w) + 40px);
  margin: 0 auto;
  padding: 14px 20px calc(56px + var(--safe-b));
}
/* прожектор над вопросом: тёплое пятно сверху колонки */
/* не шире колонки: иначе телефон расширит страницу под пятно и уменьшит масштаб */
.q-app::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;
  z-index: -1;
  height: 520px;
  background:
    radial-gradient(50% 60% at 50% 20%, rgba(255, 214, 140, .10), transparent 70%),
    radial-gradient(60% 70% at 50% 0, rgba(150, 240, 110, .10), transparent 75%);
  pointer-events: none;
}

/* ---------- верхняя панель ---------- */

.q-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.q-top-l { display: flex; gap: 10px; }
.q-ib { width: 44px; height: 44px; }
.q-ib[aria-pressed="false"] { color: var(--muted); }
.q-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
}
.q-brand:hover { color: #fff; }
.q-brand-row { display: inline-flex; align-items: center; gap: 9px; }
.q-brand .logo-mark { width: 34px; height: 34px; }
.q-brand .logo-word { font-size: 23px; }
.q-brand:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.q-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  font: 800 10.5px/1.2 var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-label::before, .q-label::after { content: ''; flex: none; width: 16px; height: 1px; background: rgba(255, 196, 107, .45); }

.q-score { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.q-score-n { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.q-score-n b {
  font: 400 26px/1 var(--font-logo);
  color: var(--orange);
  letter-spacing: -.02em;
  word-spacing: -.35em;
  text-shadow: 0 0 18px rgba(255, 157, 28, .55), 0 2px 0 rgba(0, 0, 0, .35);
}
.q-score-n small { font: 400 12px/1 var(--font-logo); color: var(--muted); word-spacing: -.35em; }
.q-score-u { font: 800 10px/1 var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.q-score.bump .q-score-n { animation: q-bump .45s var(--ease-pop); }
/* промежуток между тысячами для Rubik Mono One */
.q-th { display: inline-block; width: .22em; }

/* ---------- тело и экраны ---------- */

.q-body { display: flex; flex-direction: column; gap: 14px; }
.q-body.q-in > * { animation: q-rise .32s var(--ease-out) both; }
.q-body.q-in > *:nth-child(2) { animation-delay: .04s; }
.q-body.q-in > *:nth-child(3) { animation-delay: .08s; }
.q-body.q-in > *:nth-child(4) { animation-delay: .12s; }
.q-body.q-in > *:nth-child(n+5) { animation-delay: .16s; }

.q-skel { display: flex; flex-direction: column; gap: 14px; }
.q-card.skel { min-height: 240px; border-color: transparent; background: none; box-shadow: none; }
.q-step.skel { box-shadow: none; }
.q-skel-row { height: 54px; border-radius: 16px; }
.q-skel-feed { height: 96px; border-radius: 16px; }

.q-err { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px; text-align: center; }
.q-err .price { width: 1.8em; padding-left: 0; padding-right: 0; }
.q-err .row { justify-content: center; margin-top: 4px; }

/* ---------- клетки-шаги ---------- */

.q-steps {
  display: grid;
  grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  gap: 8px;
}
.q-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 46px;
  border-radius: 12px;
  background: var(--cell-face);
  color: #D7F0D2;
  font: 400 14px/1 var(--font-logo);
  word-spacing: -.3em;
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
  transition: transform .12s var(--ease-out), box-shadow .2s, filter .15s;
}
.q-step small { font: 700 10px/1 var(--font-ui); letter-spacing: .02em; opacity: .85; }
button.q-step:hover { filter: brightness(1.12); }
button.q-step:active { transform: translateY(2px); }
.q-step.is-lock { background: var(--cell-used); color: rgba(215, 240, 210, .32); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); }
.q-step.is-used { background: var(--cell-used); color: rgba(255, 157, 28, .35); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); }
.q-step.is-cur {
  background: var(--lit-face);
  color: var(--orange-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--orange-edge), 0 0 26px rgba(255, 157, 28, .5);
}
.q-step.is-ok { color: #F4FFF1; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.q-step.is-ok1 { background: linear-gradient(180deg, #4FE07C 0%, #2DBA59 55%, #22A04B 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 0 #146B30; }
.q-step.is-ok2 { background: linear-gradient(180deg, #FFE27A 0%, var(--gold) 55%, #E5B521 100%); color: #3A2A00; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 #9C7A0E; }
.q-step.is-ok3 { background: linear-gradient(180deg, #DE8440 0%, #B9581A 55%, #A14A12 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 0 #642C06; }
.q-step-ico { position: absolute; top: 5px; right: 6px; width: 13px; height: 13px; stroke-width: 3; opacity: .9; }
.q-step.is-bad { background: var(--red-face); color: #FFE2D6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 0 var(--red-edge); }
.q-step.is-view { outline: 2px solid #FFF1D6; outline-offset: 2px; }
.q-steps.sm { gap: 5px; }
.q-steps.sm .q-step { height: 34px; border-radius: 9px; font-size: 11px; }

/* ---------- вопрос на сукне ---------- */

.q-card {
  --rc: var(--orange);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 18px 22px 28px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background:
    radial-gradient(90% 160px at 50% 0, rgba(255, 236, 190, .09), transparent 75%),
    radial-gradient(70% 120px at 50% 100%, rgba(0, 0, 0, .22), transparent 80%),
    var(--felt),
    linear-gradient(180deg, #0F5019 0%, #0B4114 60%, #093610 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 0 0 6px rgba(0, 0, 0, .08),
    inset 0 0 0 7px rgba(190, 255, 170, .05),
    0 18px 40px rgba(0, 0, 0, .3);
  overflow: hidden;
}
/* цвет рубрики — тонкая подсветка по верхнему краю */
.q-card::before {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--rc), transparent);
  box-shadow: 0 0 18px var(--rc);
  opacity: .8;
}
.q-card.is-ok { border-color: rgba(61, 220, 106, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(61, 220, 106, .2), 0 0 40px rgba(61, 220, 106, .12), 0 18px 40px rgba(0, 0, 0, .3); }
.q-card.is-bad { border-color: rgba(255, 93, 77, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 93, 77, .18), 0 18px 40px rgba(0, 0, 0, .3); }
.q-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.q-card-price { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.q-card-price .price { min-width: 2.1em; }
.q-was { font: 400 12px/1 var(--font-logo); color: var(--dim); text-decoration-thickness: 2px; text-decoration-color: rgba(255, 93, 77, .8); }
.q-diff { display: inline-flex; align-items: center; margin-left: 4px; }
.q-diff-l { font: 800 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.q-rub {
  --rc: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 3px 12px 3px 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rc) 16%, rgba(0, 0, 0, .3));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent);
  color: #F4FFF1;
  font: 700 13px/1.1 var(--font-ui);
}
.q-rub-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--rc) 55%, #0A3A12);
  font-size: 15px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.q-rub-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-adult {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--red-face);
  color: #fff;
  font: 400 10.5px/1 var(--font-logo);
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 0 var(--red-edge);
}
.q-adult.lg { position: absolute; top: 22px; right: 22px; height: 28px; font-size: 12px; }

.q-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 6px 2px;
  text-align: center;
}
.q-prompt { font: 800 12px/1.3 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--orange-2); }
.q-text {
  max-width: 34ch;
  font: 700 clamp(20px, 2.6vw, 25px)/1.38 var(--font-ui);
  color: #FBFFF8;
  white-space: pre-line;
  text-wrap: pretty;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.q-text.long { max-width: 44ch; font-size: clamp(17px, 2vw, 20px); line-height: 1.45; }
.q-emoji {
  font-size: clamp(46px, 9vw, 74px);
  line-height: 1.15;
  letter-spacing: .08em;
  word-break: break-word;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35));
}
.q-img { margin: 0; max-width: 100%; }
.q-img img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .25);
  box-shadow: 0 0 0 1px var(--line-2), 0 14px 30px rgba(0, 0, 0, .4);
  object-fit: contain;
}
.q-card.compact { min-height: 170px; padding-bottom: 22px; }
.q-card.compact .q-content { padding-top: 14px; }

/* ---------- попытки ---------- */

.q-rows { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.q-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 16px 8px 10px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 600 16px/1.3 var(--font-ui);
}
.q-row-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  font: 400 12px/1 var(--font-logo);
  color: var(--dim);
}
.q-row-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.q-row-n { flex: none; font: 800 10.5px/1 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.q-row.slot { color: var(--dim); box-shadow: inset 0 0 0 1px rgba(190, 255, 170, .07); background: rgba(0, 0, 0, .16); }
.q-row.slot.next { color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .28); background: rgba(255, 157, 28, .05); }
.q-row.slot.next .q-row-ico { background: rgba(255, 157, 28, .16); color: var(--orange); }
.q-row.wrong {
  color: #FFE1DB;
  background: linear-gradient(90deg, rgba(224, 48, 30, .34), rgba(224, 48, 30, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 93, 77, .55);
}
.q-row.wrong .q-row-ico { background: var(--red-face); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.q-row.wrong .q-row-n { color: #FFB0A6; }
.q-row.hint {
  color: #FFF0B8;
  background: linear-gradient(90deg, rgba(255, 210, 63, .22), rgba(255, 210, 63, .08));
  box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .5);
}
.q-row.hint .q-row-ico { background: linear-gradient(180deg, #FFE27A, var(--gold)); color: #4A3300; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.q-row.hint .q-row-n { color: var(--gold); }
.q-row.ok {
  color: #DFFFE6;
  background: linear-gradient(90deg, rgba(61, 220, 106, .26), rgba(61, 220, 106, .08));
  box-shadow: inset 0 0 0 1px rgba(61, 220, 106, .5);
}
.q-row.ok .q-row-ico { background: linear-gradient(180deg, #6BF08F, var(--good)); color: #04250E; }
.q-row.fresh { animation: q-row-in .45s var(--ease-pop) both; }
.q-row.wrong.fresh { animation: q-row-in .45s var(--ease-pop) both, q-shake .4s .1s ease-in-out; }

/* ---------- ответ ---------- */

.q-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 4px; }
.q-input { font-size: 19px; }
.q-input:read-only { opacity: .7; }
.q-send { position: relative; min-width: 168px; }
.q-send .spin { display: none; width: 20px; height: 20px; border-color: rgba(42, 22, 0, .25); border-top-color: var(--orange-ink); }
.q-app.is-busy .q-send > span { opacity: 0; }
.q-app.is-busy .q-send .spin { display: inline-block; position: absolute; left: calc(50% - 10px); top: calc(50% - 12px); animation: spin .8s linear infinite, fade-in .2s .15s both; }
.q-form-sub { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.q-form-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.q-giveup { color: var(--muted); }
.q-giveup:hover { color: #FFB0A6; }
.q-kbd { font-size: 12.5px; color: var(--dim); font-weight: 600; }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--cell-face);
  color: var(--text);
  font: 700 11px/1.3 var(--font-ui);
  text-align: center;
  box-shadow: var(--cell-bevel), 0 2px 0 var(--cell-edge);
}
.q-hint { gap: 7px; }
.q-hint-cost { padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .3); color: var(--gold); font: 400 10px/1.2 var(--font-logo); }
/* кошелёк рядом с подсказкой за монеты: не хватает — краснеет */
.q-wallet { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 210, 63, .08); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .28); color: var(--gold); font-size: 13px; line-height: 1; white-space: nowrap; }
.q-wallet b { font: 400 12px/1 var(--font-logo); letter-spacing: -.02em; }
.q-wallet.poor { color: #FFB0A6; background: rgba(224, 48, 30, .1); box-shadow: inset 0 0 0 1px rgba(255, 93, 77, .35); }
.q-shake { animation: q-shake .4s ease-in-out; border-color: var(--bad) !important; }

/* панель правильного ответа */
.q-reveal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: radial-gradient(100% 140px at 50% 0, rgba(255, 255, 255, .05), transparent), var(--felt), var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .28);
  animation: q-pop .4s var(--ease-pop) both;
}
.q-reveal.ok { border-color: rgba(61, 220, 106, .5); background: radial-gradient(110% 150px at 50% 0, rgba(61, 220, 106, .16), transparent), var(--felt), var(--card); }
.q-reveal.bad { border-color: rgba(255, 93, 77, .45); background: radial-gradient(110% 150px at 50% 0, rgba(224, 48, 30, .16), transparent), var(--felt), var(--card); }
.q-verdict { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.q-verdict b { flex: 1; font: 900 clamp(19px, 2.6vw, 23px)/1.15 var(--font-ui); text-transform: uppercase; letter-spacing: .02em; }
.q-verdict-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.q-reveal.ok .q-verdict-ico { background: linear-gradient(180deg, #6BF08F, var(--good)); color: #04250E; box-shadow: 0 3px 0 #17803A, 0 0 22px rgba(61, 220, 106, .45); }
.q-reveal.bad .q-verdict-ico { background: var(--red-face); color: #fff; box-shadow: 0 3px 0 var(--red-edge); }
.q-reveal.ok .q-verdict b { color: #B6FFC9; }
.q-reveal.bad .q-verdict b { color: #FFC7BD; }
.q-gain { flex: none; }
.q-answer {
  font: 400 clamp(22px, 3.4vw, 30px)/1.15 var(--font-logo);
  color: var(--orange);
  text-transform: uppercase;
  word-spacing: -.3em;
  overflow-wrap: anywhere;
  text-shadow: 0 0 22px rgba(255, 157, 28, .45), 0 2px 0 rgba(0, 0, 0, .35);
}
.q-fact { display: flex; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.q-fact svg { flex: none; margin-top: 3px; color: var(--orange-2); }
.q-reveal-note { font-size: 13px; color: var(--dim); font-weight: 600; }
.q-reveal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.q-reveal-chips .chip svg { width: 13px; height: 13px; }
.q-next { margin-top: 8px; }

/* ---------- вступление ---------- */

.q-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 32px 34px;
  text-align: center;
  overflow: hidden;
}
.q-intro .lead { margin: 0 auto; max-width: 46ch; font-size: 16.5px; }
.q-intro .display.xl { font-size: clamp(34px, 6.5vw, 54px); }
.q-intro .display.xl.long { font-size: clamp(26px, 5vw, 44px); }
.q-intro-ico {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: var(--lit-face);
  color: var(--orange-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--orange-edge), 0 0 34px rgba(255, 157, 28, .45);
}
.q-intro-emo { font-size: 36px; line-height: 1; }
.q-cover { opacity: .55; }
.q-cover.fallback { opacity: .8; }
/* эмодзи рубрики — в нижний угол, чтобы не спорить с названием */
.q-cover .emo { top: auto; bottom: 7%; right: 5%; font-size: var(--emo, 120px); opacity: .45; transform: rotate(-12deg); }
.q-rules { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.q-rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 112px;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 0 0 1px var(--line);
}
.q-rule > span:last-child { max-width: 15ch; font-size: 12.5px; line-height: 1.3; font-weight: 700; color: var(--text); }
.q-rule > span:last-child small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.q-rule .price { min-width: 2.6em; }
.q-rule .price svg { width: .8em; height: .8em; color: #FF6B57; fill: currentColor; filter: drop-shadow(0 0 6px rgba(255, 93, 77, .6)); }
.q-rule .price small { font-size: .5em; }
.q-prices { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.q-prices .price { font-size: 20px; min-width: 3.4em; }
.q-lineup { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 560px; }
.q-lu {
  --rc: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 11px 3px 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rc) 13%, rgba(0, 0, 0, .3));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 38%, transparent);
  font: 600 12.5px/1.1 var(--font-ui);
  color: #E6F7E2;
}
.q-lu b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--cell-face); color: var(--orange); font: 400 10px/1 var(--font-logo); box-shadow: var(--cell-bevel); }
.q-lu-ico { font-size: 14px; }
.q-go { margin: 12px 0 6px; }
.q-intro-note { max-width: 44ch; font-size: 13.5px; color: var(--muted); }
.q-intro-note b { color: var(--text); }
.q-intro .pill b { color: var(--orange-2); }

/* ---------- марафон, турнир: полоска времени, жизни ---------- */

.q-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.q-qn { font: 800 11.5px/1.2 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.q-qn b { font: 400 15px/1 var(--font-logo); color: var(--text); letter-spacing: 0; }
.q-hearts { display: flex; gap: 6px; }
.q-heart { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); color: #FF4D3A; }
.q-heart svg { filter: drop-shadow(0 0 8px rgba(255, 77, 58, .65)); }
.q-heart.off { color: var(--dim); }
.q-heart.off svg { filter: none; }
.q-heart.lost { animation: q-heart-lost .7s ease-out both; }
.q-streak b { color: var(--orange-2); font-variant-numeric: tabular-nums; }
.q-streak.lit { animation: q-glow 1.6s ease-in-out infinite; }

.q-timer { display: flex; align-items: center; gap: 12px; }
.q-track {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .38);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}
.q-track i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: left center;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #FFC66E, var(--orange) 60%, #E8830A);
  box-shadow: 0 0 14px rgba(255, 157, 28, .55);
  will-change: transform;
}
.q-timer > b {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--cell-face);
  color: var(--orange);
  font: 400 16px/1 var(--font-logo);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255, 157, 28, .55);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
}
.q-timer.warn .q-track i { background: linear-gradient(180deg, #FFE27A, var(--gold) 60%, #E5B521); box-shadow: 0 0 14px rgba(255, 210, 63, .55); }
.q-timer.warn > b { color: var(--gold); }
.q-timer.crit .q-track i { background: linear-gradient(180deg, #FF7B66, var(--red)); box-shadow: 0 0 16px rgba(224, 48, 30, .7); }
.q-timer.crit > b { background: var(--red-face); color: #fff; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 0 var(--red-edge), 0 0 18px rgba(224, 48, 30, .5); animation: q-pulse 1s ease-in-out infinite; }


.q-bonus { display: inline-flex; align-items: center; gap: 6px; }
.q-bonus-b { display: inline-flex; align-items: center; gap: 4px; min-width: 70px; height: 32px; padding: 0 10px 0 8px; border-radius: 10px; background: rgba(255, 210, 63, .12); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .4); color: var(--gold); }
.q-bonus-b b { font: 400 14px/1 var(--font-logo); text-shadow: 0 0 12px rgba(255, 210, 63, .5); font-variant-numeric: tabular-nums; }

/* ---------- блиц ---------- */

.q-blitz-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.q-blitz-hud > :last-child { justify-self: end; }
.q-clock {
  --p: 1;
  --c: var(--orange);
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--card) 0 57%, transparent 58%),
    conic-gradient(var(--c) calc(var(--p) * 360deg), rgba(0, 0, 0, .4) 0);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, .25), 0 0 36px rgba(255, 157, 28, .25), inset 0 0 0 1px var(--line);
}
.q-clock::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
  z-index: 0;
}
.q-clock > b, .q-clock > small { position: relative; z-index: 1; }
.q-clock > b { font: 400 38px/1 var(--font-logo); color: var(--orange); text-shadow: 0 0 18px rgba(255, 157, 28, .6); font-variant-numeric: tabular-nums; }
.q-clock > small { font: 800 10px/1 var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.q-clock.crit { --c: var(--red); box-shadow: 0 0 0 5px rgba(0, 0, 0, .25), 0 0 40px rgba(224, 48, 30, .45), inset 0 0 0 1px var(--line); }
.q-clock.crit > b { color: #FF8B78; text-shadow: 0 0 18px rgba(255, 93, 77, .7); animation: q-pulse 1s ease-in-out infinite; }
.q-clock.hit { animation: q-shake .4s ease-in-out; }
.q-pen {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: -26px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--red-face);
  color: #fff;
  font: 900 15px/1 var(--font-ui);
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--red-edge), 0 0 18px rgba(224, 48, 30, .6);
  animation: q-pen 1.1s ease-out forwards;
  pointer-events: none;
}

.q-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.q-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--cell-face);
  color: var(--text);
  font: 700 16.5px/1.3 var(--font-ui);
  text-align: left;
  box-shadow: var(--cell-bevel), 0 4px 0 var(--cell-edge), 0 10px 20px rgba(0, 0, 0, .2);
  transition: transform .08s, box-shadow .08s, background .15s, opacity .2s, filter .2s;
}
.q-opt:hover:not(:disabled) { background: linear-gradient(180deg, #179A31 0%, var(--cell-hi) 55%, #0F7022 100%); }
.q-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: var(--cell-bevel), 0 1px 0 var(--cell-edge); }
.q-opt:disabled { cursor: default; }
.q-opt-t { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.q-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .28);
  color: var(--orange);
  font: 400 13px/1 var(--font-logo);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
.q-opt.is-pick { background: var(--lit-face); color: var(--orange-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--orange-edge), 0 0 24px rgba(255, 157, 28, .45); }
.q-opt.is-pick .q-key { color: var(--orange-ink); background: rgba(255, 255, 255, .3); }
.q-opt.is-ok { background: linear-gradient(180deg, #6BF08F 0%, var(--good) 55%, #2CC257 100%); color: #04250E; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 #17803A, 0 0 30px rgba(61, 220, 106, .55); animation: q-pop .3s var(--ease-pop); }
.q-opt.is-ok .q-key { background: rgba(255, 255, 255, .35); color: #04250E; }
.q-opt.is-bad { background: var(--red-face); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 var(--red-edge), 0 0 30px rgba(224, 48, 30, .5); animation: q-shake .4s ease-in-out; }
.q-opt.is-bad .q-key { background: rgba(0, 0, 0, .25); color: #FFD7CF; }
.q-opt.is-dim { opacity: .45; filter: saturate(.6); }
.q-blitz-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- итоги ---------- */

.q-res { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 38px 30px 32px; text-align: center; }
.q-big { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 4px 0 -4px; }
.q-big b {
  font: 400 clamp(72px, 15vw, 116px)/.95 var(--font-logo);
  color: var(--orange);
  letter-spacing: -.03em;
  word-spacing: -.4em;
  text-shadow: 0 0 40px rgba(255, 157, 28, .55), 0 5px 0 rgba(0, 0, 0, .35);
  animation: q-pop .55s var(--ease-pop) both;
}
.q-big small { font: 400 clamp(22px, 4vw, 30px)/1 var(--font-logo); color: var(--muted); word-spacing: -.35em; }
.q-res-unit { font: 800 12px/1.3 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.q-res-line { font: 800 clamp(18px, 2.6vw, 22px)/1.25 var(--font-ui); color: var(--text); }
.q-res.perfect .q-big b { color: var(--gold); text-shadow: 0 0 46px rgba(255, 210, 63, .7), 0 5px 0 rgba(0, 0, 0, .35); }
.q-res-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.q-reward { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.q-reward .q-coin { color: var(--gold); background: rgba(255, 210, 63, .12); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .42); }
.q-res-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.q-next-day { margin-top: 4px; max-width: 100%; white-space: normal; justify-content: center; text-align: center; line-height: 1.3; }
.q-next-day b { color: var(--orange-2); font-weight: 800; }
.q-res-note { font-size: 13.5px; color: var(--muted); }

.q-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.q-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 58px;
  height: 58px;
  padding: 0 8px;
  border-radius: 14px;
  font: 400 15px/1 var(--font-logo);
  word-spacing: -.3em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
  animation: q-pop .4s var(--ease-pop) both;
}
.q-grid .q-cell:nth-child(2) { animation-delay: .06s; }
.q-grid .q-cell:nth-child(3) { animation-delay: .12s; }
.q-grid .q-cell:nth-child(4) { animation-delay: .18s; }
.q-grid .q-cell:nth-child(n+5) { animation-delay: .24s; }
.q-cell small { font: 800 11px/1 var(--font-ui); opacity: .9; }
.q-cell.c1 { background: linear-gradient(180deg, #4FE07C, #22A04B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 0 #146B30, 0 0 18px rgba(61, 220, 106, .35); }
.q-cell.c2 { background: linear-gradient(180deg, #FFE27A, #E5B521); color: #3A2A00; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 #9C7A0E; }
.q-cell.c3 { background: linear-gradient(180deg, #DE8440, #A14A12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 0 #642C06; }
.q-cell.cx { background: var(--red-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 0 var(--red-edge); }
.q-cell.c0 { background: var(--cell-used); color: rgba(215, 240, 210, .35); text-shadow: none; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); }
.q-grid.sm { gap: 5px; max-width: 420px; }
.q-grid.sm .q-cell { min-width: 44px; height: 44px; border-radius: 11px; font-size: 12px; }
.q-grid.sm .q-cell small { font-size: 9.5px; }
.q-cell.sm { min-width: 34px; width: 34px; height: 34px; padding: 0; border-radius: 10px; font-size: 11px; animation: none; }

.q-cta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-color: rgba(42, 171, 238, .35); background: linear-gradient(90deg, rgba(42, 171, 238, .12), rgba(42, 171, 238, .03)), var(--card); }
.q-cta-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(180deg, #4CC0F7, var(--tg)); color: #fff; box-shadow: 0 3px 0 var(--tg-edge); }
.q-cta b { font-weight: 800; }

.q-sec { padding: 20px; }
.q-feed { padding-top: 6px; padding-bottom: 8px; }
.feed-ava.is-me .fa-nm { color: var(--orange-2); }
.q-top-list .li { min-height: 56px; }
.q-top-list .name { color: inherit; text-decoration: none; display: block; }
.q-top-list .name:hover { color: var(--orange-2); }

.q-review { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.q-rv { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line); }
.q-rv-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-rv-top .q-rub { min-height: 26px; padding: 2px 10px 2px 3px; font-size: 12px; }
.q-rv-top .q-rub-ico { width: 21px; height: 21px; font-size: 13px; }
.q-rv-q { color: var(--muted); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.q-rv-q.emo { font-size: 22px; letter-spacing: .06em; color: var(--text); }
.q-rv-a { display: flex; align-items: center; gap: 7px; font-size: 15.5px; }
.q-rv-a svg { flex: none; color: var(--good); }
.q-rv-a b { color: var(--orange-2); font-weight: 800; }
.q-rv-a.wait { font-size: 13.5px; color: var(--dim); font-weight: 600; }
.q-rv-a.wait svg { color: var(--dim); }
.q-rv-f { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.q-review-more { margin-top: 12px; width: 100%; }
.q-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.q-more { margin-top: 6px; }
.q-champ { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.q-champ-nm { display: block; color: var(--text); font-weight: 800; font-size: 17px; text-decoration: none; }
.q-champ-nm:hover { color: var(--orange-2); }

/* ---------- анимации ---------- */

@keyframes q-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes q-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes q-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes q-row-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes q-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes q-blink { 50% { opacity: .35; } }
@keyframes q-pulse { 50% { transform: scale(1.08); } }
@keyframes q-glow { 50% { box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .7), 0 0 18px rgba(255, 157, 28, .35); } }
@keyframes q-pen { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px); } }
@keyframes q-heart-lost { 0% { transform: scale(1); color: #FF4D3A; } 30% { transform: scale(1.35) rotate(-12deg); color: #FF4D3A; } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .q-streak.lit, .q-clock.crit > b, .q-timer.crit b { animation: none !important; }
}

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

@media (max-width: 640px) {
  .q-app { padding: 8px 16px calc(40px + var(--safe-b)); }
  .q-top { gap: 8px; padding-bottom: 12px; margin-bottom: 14px; }
  .q-top-l { gap: 6px; }
  .q-ib { width: 40px; height: 40px; }
  .q-ib svg { width: 18px; height: 18px; }
  .q-brand .logo-mark { width: 26px; height: 26px; }
  .q-brand .logo-word { font-size: 17px; }
  .q-brand-row { gap: 6px; }
  .q-label { max-width: 150px; font-size: 9px; letter-spacing: .14em; gap: 5px; }
  .q-label::before, .q-label::after { width: 8px; }
  .q-score-n b { font-size: 21px; }
  .q-score-n small { font-size: 10px; }
  .q-score-u { font-size: 9px; letter-spacing: .16em; }

  .q-body { gap: 12px; }
  .q-steps { gap: 6px; }
  .q-step { height: 42px; font-size: 13px; }
  .q-steps.sm { gap: 3px; }
  .q-steps.sm .q-step { height: 28px; border-radius: 7px; font-size: 9px; }
  .q-card { min-height: 200px; padding: 14px 16px 22px; border-radius: 20px; }
  .q-content { padding-top: 16px; }
  .q-text { font-size: 19px; }
  .q-text.long { font-size: 16.5px; }
  .q-img img { max-height: 260px; }
  .q-row { min-height: 48px; font-size: 15px; padding: 6px 12px 6px 8px; border-radius: 14px; }
  .q-row-ico { width: 28px; height: 28px; border-radius: 9px; }
  .q-form { grid-template-columns: minmax(0, 1fr); }
  .q-send { min-width: 0; width: 100%; }
  .q-kbd { display: none; }
  .q-form-sub { justify-content: center; }
  .q-reveal { padding: 18px 16px 18px; border-radius: 20px; }
  .q-intro { padding: 32px 18px 28px; }
  .q-rules { gap: 8px; }
  .q-rule { min-width: 0; flex: 1 1 0; padding: 12px 6px 10px; }
  .q-rule .price.lg { font-size: 20px; }
  .q-rule > span:last-child small { display: none; }
  .q-prices .price { font-size: 15px; min-width: 0; padding-left: .5em; padding-right: .5em; }
  .q-adult.lg { top: 16px; right: 16px; }
  .q-heart { width: 36px; height: 36px; }
  .q-clock { width: 104px; height: 104px; }
  .q-clock::before { inset: 14px; }
  .q-clock > b { font-size: 32px; }
  .q-opts { gap: 8px; }
  .q-opt { min-height: 68px; padding: 10px 12px 10px 10px; font-size: 15px; border-radius: 16px; gap: 10px; }
  .q-key { width: 28px; height: 28px; font-size: 11px; }
  .q-blitz-hud .q-streak-l { display: none; }
  .q-m-rubric .q-score-n small { display: none; }
  .q-intro .display.xl.long { font-size: clamp(22px, 7vw, 30px); }
  .q-opt-t { font-size: 14.5px; }
  .q-res { padding: 32px 18px 28px; }
  .q-res-act { width: 100%; }
  .q-res-act .btn { flex: 1 1 0; padding: 0 16px; }
  .q-cell { min-width: 50px; height: 50px; }
  .q-grid.sm .q-cell { min-width: 38px; height: 38px; font-size: 11px; }
  .q-tiles { grid-template-columns: minmax(0, 1fr); }
  .q-cta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .q-cta .btn { grid-column: 1 / -1; width: 100%; min-height: 42px; }
  .q-sec { padding: 16px; }
  /* печатаешь — таймер марафона и турнира липнет к верху: отсчёт виден над клавиатурой
     (поля и отступы гасят друг друга — раскладка не прыгает, тап по «Ответить» не промахивается) */
  .q-app:has(.q-input:focus) .q-timer {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -8px 0;
    padding: 8px 0;
    background: linear-gradient(180deg, var(--bg) 80%, rgba(4, 25, 10, 0));
  }
}

/* низкий экран (маленький телефон или клавиатура ужала окно): пустые будущие попытки не показываем —
   вопрос остаётся в кадре над полем. Не по :focus — иначе тап по полю или кнопке сдвигал бы её из-под пальца */
@media (max-width: 640px) and (max-height: 720px) {
  .q-row.slot:not(.next) { display: none; }
}

@media (max-width: 380px) {
  .q-brand .logo-word { display: none; }
  .q-label { max-width: 120px; }
}
