@font-face { font-family: MTSWide; src: url('/assets/fonts/MTSWide-Medium.woff2'); }
@font-face { font-family: MTSWide; src: url('/assets/fonts/MTSWide-Bold.woff2'); font-weight: 700; }
@font-face { font-family: MTSCompact; src: url('/assets/fonts/MTSCompact-Regular.woff2'); }
@font-face { font-family: MTSCompact; src: url('/assets/fonts/MTSCompact-Bold.woff2'); font-weight: 700; }

:root {
  --bg: #101014;
  --panel: #17171d;
  --card: #1b1b22;
  --text: #f2f3f7;
  --muted: #b6b7c2;
  --red: #e30611;
  --line: rgba(242, 243, 247, .18);
  --good: #3fbf63;
}
html.light {
  --bg: #f4f4f7;
  --panel: #fff;
  --card: #f0f0f3;
  --text: #17171d;
  --muted: #666873;
  --line: rgba(23, 23, 29, .16);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: MTSCompact, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { display: flex; justify-content: center; }
.app {
  position: relative;
  width: min(390px, 100vw);
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}
button { font: inherit; }
button,
a,
summary,
[role="button"] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: fade .25s ease;
}
.center {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.description { font-size: 15px; line-height: 1.42; }
.brand-logo {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
  width: 80px;
  height: 80px;
  object-fit: cover;
  pointer-events: none;
}
.hero {
  position: relative;
  flex: 1;
  min-height: 250px;
  background: url('/assets/images/hero-bg.jpg?v=16') center top / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,16,20,.12), rgba(16,16,20,0) 45%, rgba(23,23,29,.9));
}
.panel {
  position: relative;
  margin-top: -34px;
  padding: 26px 24px calc(26px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-width: 1px 0 0;
  border-radius: 28px 28px 0 0;
  background: var(--panel);
}
h1, h2 {
  margin: 0;
  font-family: MTSWide, sans-serif;
  line-height: 1.13;
  text-align: center;
}
h1,
h2,
p,
.question,
.faq-card summary,
.prize {
  text-wrap: pretty;
}
h1 { font-size: 28px; }
h2 { font-size: 26px; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.btn {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn.primary { border-color: var(--red); background: var(--red); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.buttons { display: grid; gap: 10px; margin-top: 22px; }

.main-screen { overflow-y: auto; }
.main-panel { flex: 0 0 auto; }
.main-description { margin: 12px 0 0; text-align: center; }
.prizes { display: grid; gap: 10px; margin-top: 20px; }
.prizes-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prize { color: var(--muted); font-size: 14px; line-height: 1.3; text-align: center; }
.prize-img {
  height: 84px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff center / contain no-repeat;
}

.loader {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) var(--pct, 0%), rgba(242,243,247,.2) 0);
  font: 700 18px MTSWide;
}
.loader::before {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--panel);
}
.loader span { position: relative; }
.eyebrow {
  margin-top: 28px;
  color: var(--muted);
  font: 700 13px MTSWide;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.top {
  position: relative;
  height: 36%;
  min-height: 230px;
  background: url('/assets/images/hero-bg.jpg?v=16') center top / cover no-repeat;
}
.close {
  position: absolute;
  z-index: 2;
  top: calc(18px + env(safe-area-inset-top));
  left: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(16,16,20,.7);
  color: #fff;
  font-size: 20px;
}
.progress { display: flex; gap: 4px; }
.progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress i.done { background: var(--red); }
.progress i.current { background: #ff6b71; }
.counter { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.question {
  min-height: 106px;
  margin: 14px 0 20px;
  font: 700 20px/1.32 MTSWide;
  text-align: center;
}
.answer {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  letter-spacing: .04em;
}
.answer + .answer { margin-top: 9px; }
.answer .mark {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.answer.correct { border-color: var(--good); background: rgba(63,191,99,.14); }
.answer.correct .mark { border-color: var(--good); background: var(--good); color: #fff; }
.answer.wrong { border-color: var(--red); background: rgba(227,6,17,.16); }
.answer.wrong .mark { border-color: var(--red); background: var(--red); color: #fff; }

.scroll {
  overflow: auto;
  padding: calc(22px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom));
}
.back { align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 15px; }
.rules-screen h2 { margin-top: 18px; }
.rules-description { margin: 14px 0 0; text-align: center; }
.rules-prizes .prize-img { height: 108px; }
.faq-heading { margin-top: 30px !important; }
.faq-list { margin-top: 14px; }
.faq-card {
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.faq-card summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary i { font-style: normal; font-size: 26px; transition: transform .2s ease; }
.faq-card[open] summary i { transform: rotate(45deg); }
.faq-card p { margin: 0 0 16px; }
.rules-buttons { margin-bottom: 12px; }

.result-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  color: #1d2023;
}
.result-card p { margin: 0; font-size: 14px; line-height: 1.35; }
.result-card .btn { min-height: 44px; margin-top: 10px; }
.error { color: #ff5961; }
.theme {
  position: absolute;
  z-index: 7;
  top: calc(16px + env(safe-area-inset-top));
  left: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(16,16,20,.65);
  color: #fff;
}
.closed-icon { width: 54px; height: 54px; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 50%; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-height: 700px) {
  .hero { min-height: 180px; }
  .main-panel { padding-top: 20px; }
  .main-description { font-size: 14px; line-height: 1.32; }
  .prize-img { height: 64px; }
  .question { min-height: 76px; }
}
