:root {
  color-scheme: light;
  --paper: #f7f8fc;
  --panel: #fff;
  --line: #dfe3ef;
  --text: #17213a;
  --muted: #505d76;
  --accent-blue: #254ce4;
  --accent-purple: #4934b5;
  --accent-pink: #9e206d;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.55 var(--font); }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button:not(:disabled), summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 4px; }
:is(main, section, article)[id] { scroll-margin-top: 79px; }
.wrap { width: min(1240px, calc(100% - 88px)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 10px 15px; background: var(--text); color: var(--panel); transform: translateY(-150%); }
.skip:focus { transform: none; }

.top {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 63px; }
.wordmark {
  display: grid; flex: 0 0 auto; place-items: center;
  width: 204px; min-height: 44px; margin-inline-start: -13px; border-radius: 5px;
}
.wordmark img { display: block; width: 100%; height: auto; aspect-ratio: 5.1; object-fit: cover; object-position: center; }
.nav-toggle { display: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 1px 8px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 3px 10px; border-radius: 6px;
  color: var(--muted); font-size: .88rem; font-weight: 650; white-space: nowrap;
}
.nav a:hover { background: #f0f3fa; color: var(--text); }
.nav .nav-wheel { color: var(--accent-blue); font-weight: 750; }

.primary, .outline {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%;
  padding: .64em .98em; border: 1px solid; border-radius: 8px; font-weight: 700;
  line-height: 1.22; text-align: center; overflow-wrap: anywhere;
  transition: background-color .16s, border-color .16s, color .16s;
}
.primary { border-color: var(--accent-blue); background: var(--accent-blue); color: #fff; }
.primary:not(:disabled):hover { border-color: #193dc7; background: #193dc7; }
.primary:disabled { border-color: #dce2f0; background: #e9edf5; color: #56637e; }
.outline { border-color: #8997b1; background: transparent; color: var(--text); }
.outline:not(:disabled):hover { border-color: var(--accent-blue); background: #eff3fe; color: #1b42c7; }
.outline:disabled { border-color: #d8deea; background: #f0f2f7; color: var(--muted); }
.details-link { color: #2146c9; font-size: .9rem; font-weight: 680; text-underline-offset: .25em; }
.details-link:hover { text-decoration: underline; }

.hero {
  --hero-line: #ffffff29;
  --hero-muted: #c1cce1;
  --hero-text: #f4f7ff;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 79% 47%, #263c73 0%, transparent 57%), #0e1628;
  color: var(--hero-text);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(26px, 5vw, 70px); align-items: center;
  min-height: 650px; padding-block: clamp(39px, 5vw, 68px);
}
.eyebrow { margin: 0; color: #4356a0; font-size: .82rem; font-weight: 700; line-height: 1.3; }
.hero .eyebrow { color: #b9c9fa; }
.hero h1 {
  margin: 16px 0 19px; color: var(--hero-text);
  font: 790 clamp(4.3rem, 9vw, 8.3rem)/.88 var(--font);
  letter-spacing: -.072em;
}
.hero h1 span { display: block; }
.hero h1 .emphasis { color: #b2c6ff; }
.lead { max-width: 37ch; margin: 0 0 23px; color: var(--hero-muted); font-size: clamp(.96rem, 1.45vw, 1.07rem); line-height: 1.46; }
.lead strong {
  display: block; margin-bottom: 5px; color: var(--hero-text); font-size: clamp(1.11rem, 2.1vw, 1.45rem);
  font-weight: 700; line-height: 1.25; letter-spacing: -.025em;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero-actions a { min-height: 48px; }
.hero .primary:not(:disabled) { border-color: #5879fa; }
.hero .outline { color: #e7edff; border-color: #8493b6; }
.hero .outline:not(:disabled):hover { color: #fff; border-color: #b9c9fa; background: #ffffff12; }
.hero :focus-visible { outline-color: #e0e9ff; }

.clock { width: min(100%, 340px); margin-top: clamp(23px, 3.6vw, 46px); padding-top: 12px; border-top: 1px solid var(--hero-line); }
.clock-title { margin: 0 0 8px; color: var(--hero-muted); font-size: .76rem; font-weight: 600; }
.clock-face { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.clock-face div { display: grid; place-content: center; justify-items: center; gap: 2px; padding: 1px 4px; border-inline-end: 1px solid var(--hero-line); }
.clock-face div:first-child { justify-items: start; justify-content: start; padding-inline-start: 0; }
.clock-face div:last-child { border: 0; }
.clock-face strong { color: var(--hero-text); font-size: 1.56rem; font-weight: 710; font-variant-numeric: tabular-nums; line-height: 1.05; }
.clock-face span { color: var(--hero-muted); font-size: .705rem; }

.wheel-panel {
  position: relative; min-width: 0; padding: 2px 0 0 clamp(22px, 4vw, 58px);
  border-inline-start: 1px solid var(--hero-line); text-align: center;
}
.wheel-title { margin: 0 auto 16px; color: var(--hero-text); font-size: clamp(1.18rem, 2vw, 1.45rem); font-weight: 730; line-height: 1.2; letter-spacing: -.028em; }
.wheel-stage { position: relative; container-type: inline-size; width: min(100%, 388px); aspect-ratio: 1; margin: 0 auto 15px; }
#wheel-art { display: block; width: 100%; height: 100%; }
#disc { --wheel-angle: 0deg; position: absolute; inset: 0; transform: rotate(var(--wheel-angle)); }
.wheel-labels { position: absolute; inset: 0; pointer-events: none; }
.wheel-label {
  position: absolute; display: grid; justify-items: center; gap: 2px; color: var(--label-ink);
  font-size: .63rem; font-size: 3cqw; font-weight: 630; line-height: 1.05; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(0deg - var(--wheel-angle)));
}
.wheel-label strong { font-size: 1.4rem; font-size: 7.25cqw; font-weight: 770; letter-spacing: -.04em; }
#disc, .wheel-label { transition: transform 3900ms cubic-bezier(.12,.63,.13,1); }
#disc.is-restoring, #disc.is-restoring .wheel-label { transition-property: none; }
.pin {
  position: absolute; top: -1%; left: 50%; width: 6.4%; height: 5.5%; transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 50% 100%); background: #f0f4ff;
}
.hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-content: center; justify-items: center;
  width: 22%; min-width: 44px; aspect-ratio: 1; padding: 0;
  border: 2px solid #d9e4ff; border-radius: 50%; background: #101c3c; color: #fff;
  font-size: clamp(.52rem, 1.35vw, .77rem); font-weight: 700; line-height: 1;
}
.hub span { display: none; }
.hub:disabled #hub-label { font-size: .85em; }
.hub:not(:disabled):hover { background: #233c89; }
.hub:focus-visible { outline-offset: 3px; }
.wheel-controls { width: min(100%, 388px); margin-inline: auto; }
.wheel-controls .primary { width: 100%; min-height: 48px; font-size: .98rem; }
.hero .primary:disabled { border-color: #526489; background: #283653; color: #d8e3fa; }
.wheel-note, .wheel-feedback { margin: 9px 0 0; color: var(--hero-muted); font-size: .85rem; line-height: 1.35; }
.wheel-feedback { color: #ffc8d6; }
.wheel-feedback:empty, .bonus-feedback:empty { display: none; }
.wheel-controls .wheel-rewards, .wheel-controls .bonus-jump {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0;
  padding: 3px 7px; border: 0; border-radius: 4px; background: none; color: #c6d6ff; font-size: .85rem;
  text-decoration: underline; text-decoration-color: #c6d6ff7d; text-underline-offset: .2em;
}
.wheel-controls .wheel-rewards:not(:disabled):hover, .wheel-controls .bonus-jump:hover { background: none; color: #fff; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 48%; width: 7px; height: 11px; border-radius: 2px; background: var(--color); animation: burst 880ms ease-out both; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--angle)); opacity: 0; } }

.section { padding-block: clamp(48px, 6vw, 85px); }
.section h2 { margin: 8px 0 10px; font-size: clamp(1.9rem, 4.3vw, 3.55rem); font-weight: 755; line-height: 1.03; letter-spacing: -.06em; text-wrap: balance; }
.section .intro { max-width: 65ch; margin: 0 0 23px; color: var(--muted); }
.bonus-section { border-bottom: 1px solid var(--line); background: var(--paper); }
.bonus-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 9px 24px; margin-bottom: 12px; }
.bonus-head h2 { margin-bottom: 0; }
.bonus-total {
  display: inline-flex; align-items: baseline; gap: 10px; margin: 0; padding: 3px 0 3px 11px;
  border-inline-start: 2px solid var(--accent-blue); color: var(--muted); font-size: .84rem; font-weight: 630;
}
.bonus-total strong { min-width: 17px; color: #1b3eaf; font-size: 1.15rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.bonus-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.bonus-card {
  min-width: 0; padding: clamp(17px, 2.45vw, 27px);
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.bonus-card:has(.bonus-form) { grid-row: span 2; }
.bonus-card h3 { margin: 5px 0 8px; font-size: clamp(1.14rem, 2vw, 1.33rem); font-weight: 740; line-height: 1.19; letter-spacing: -.033em; }
.bonus-card p { margin: 0 0 14px; color: var(--muted); font-size: .92rem; line-height: 1.48; }
.bonus-card .bonus-badge { margin: 0; color: #2446c1; font-size: .81rem; font-weight: 720; }
.bonus-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bonus-actions :is(.primary, .outline), .bonus-form .primary { font-size: .87rem; }
.bonus-card .bonus-feedback { margin: 9px 0 0; color: #3d4b91; font-size: .86rem; overflow-wrap: anywhere; }
.bonus-form { display: grid; gap: 8px; margin-top: 12px; }
.bonus-field { display: grid; gap: 4px; }
.bonus-form label { color: var(--text); font-size: .83rem; font-weight: 650; }
.bonus-form .primary { justify-self: start; margin-top: 4px; }
.bonus-input, dialog .result-options select {
  min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 1px solid #8291ad; border-radius: 7px; background: var(--panel); color: var(--text);
}
.bonus-input::placeholder { color: #69758b; }
.bonus-input:disabled { border-color: #dfe3ed; background: #f5f6fa; }
.bonus-input:focus-visible { outline-offset: 2px; }
.bonus-share-field { display: block; margin-top: 10px; }

dialog {
  position: fixed; inset: 0 0 0 auto; width: min(100%, 464px); height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 75px clamp(22px, 4vw, 36px) 31px; overflow-y: auto;
  border: 0; border-inline-start: 1px solid var(--line);
  background: var(--panel); box-shadow: -18px 0 58px #0c142549; color: var(--text); text-align: start;
}
dialog[open] { animation: drawer-in .24s cubic-bezier(.18,.75,.27,1) both; }
dialog::backdrop { background: #12182d9c; }
@keyframes drawer-in { from { transform: translateX(35px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
dialog .close { position: absolute; top: 16px; right: 16px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 8px; font-size: 1.35rem; }
dialog h2 { margin: 0 0 14px; font-size: clamp(1.51rem, 5vw, 2rem); font-weight: 755; line-height: 1.14; letter-spacing: -.048em; }
dialog .result-prize { margin: 8px 0; color: #2045c4; font-size: 1.42rem; font-weight: 745; line-height: 1.23; }
dialog .result-note { margin: 8px 0 17px; color: var(--muted); }
dialog .result-code {
  display: block; margin: 0 0 12px; padding: .72em .78em; user-select: all; overflow-wrap: anywhere;
  border: 1px solid #a5b6eb; border-radius: 8px; background: #f0f4ff; color: #183eb8;
  font-size: 1.13rem; font-weight: 700; letter-spacing: .045em;
}
dialog .result-options { display: grid; gap: 7px; margin: 15px 0 19px; }
dialog .result-options label { font-size: .86rem; font-weight: 680; }
dialog .result-options button { justify-self: start; }
dialog .primary { width: 100%; }
#copy:not([hidden]) + #done { margin-top: 10px; }
#copy:not([hidden]) + #done .primary { border-color: #8997b1; background: transparent; color: var(--text); }
#copy:not([hidden]) + #done .primary:hover { border-color: var(--accent-blue); background: #eff3fe; color: #1b42c7; }
dialog .feedback { margin: 9px 0 0; color: var(--muted); font-size: .84rem; }
dialog .feedback:empty, dialog .result-prize:empty { display: none; }

@media (min-width: 801px) {
  .hero-actions > a[href="#jatek"] { display: none; }
}
@media (max-width: 1020px) {
  .wrap { width: calc(100% - 52px); }
  .nav a { padding-inline: 8px; }
  .hero-grid { min-height: 575px; }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 36px); }
  .top .wrap { min-height: 55px; }
  .wordmark { width: 174px; margin-inline-start: -10px; }
  .nav-toggle {
    display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid #a9b5cb; border-radius: 7px; background: var(--panel); color: var(--text);
  }
  .nav-toggle:hover { background: #f0f3fa; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 18px; height: 2px; border-radius: 1px; background: currentColor;
  }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
  .nav {
    position: absolute; inset: 100% 0 auto; display: none; flex-direction: column; align-items: stretch;
    gap: 2px; max-height: calc(100dvh - 56px); overflow-y: auto;
    padding: 8px 18px 12px; border-bottom: 1px solid var(--line); background: var(--panel); box-shadow: 0 9px 24px #18294028;
  }
  .nav-toggle[aria-expanded="true"] + .nav { display: flex; }
  .nav a { padding-inline: 11px; }
  .nav a:focus-visible { outline-offset: -3px; }
  :is(main, section, article)[id] { scroll-margin-top: 70px; }
  .hero { background: radial-gradient(ellipse at 56% 72%, #263c73 0%, transparent 58%), #0e1628; }
  .hero-grid { grid-template-columns: 1fr; gap: 13px; min-height: auto; padding-block: 19px 26px; }
  .hero h1 { margin: 8px 0 11px; font-size: clamp(2.37rem, 10.45vw, 4.9rem); line-height: .94; }
  .hero h1 span { display: inline; }
  .hero h1 .emphasis { margin-inline-start: .09em; }
  .hero .lead { margin-bottom: 13px; line-height: 1.35; }
  .hero .lead strong { margin-bottom: 4px; }
  .hero-actions a { min-height: 44px; }
  .clock { margin-top: 9px; padding-top: 7px; }
  .clock-title { margin-bottom: 5px; }
  .clock-face strong { font-size: 1.27rem; }
  .wheel-panel { width: min(100%, 500px); justify-self: center; padding: 13px 0 0; border: 0; border-top: 1px solid var(--hero-line); }
  .wheel-title { margin-bottom: 12px; }
  .wheel-stage { width: min(88%, 388px); margin-bottom: 12px; }
  .bonus-grid { grid-template-columns: 1fr; }
  .bonus-card:has(.bonus-form) { grid-row: auto; }
}
@media (max-width: 560px) {
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 7px; }
  .hero-actions a { padding-inline: 8px; font-size: .82rem; }
  dialog {
    inset: auto 0 0; width: 100%; height: auto; max-height: calc(100dvh - 14px);
    padding: 57px 19px max(22px, env(safe-area-inset-bottom)); border: 0; border-radius: 15px 15px 0 0;
  }
  dialog[open] { animation-name: sheet-in; }
  dialog .close { top: 8px; right: 12px; }
  @keyframes sheet-in { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 28px); }
  .nav { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
