@font-face {
  font-family: Fredoka;
  src: url('/fonts/fredoka-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  src: url('/fonts/fredoka-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  src: url('/fonts/fredoka-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  src: url('/fonts/fredoka-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #243044;
  --muted: #5c6b80;
  --blue: #3d7ea6;
  --blue-deep: #21597a;
  --pink: #ff8fb8;
  --pink-deep: #e86b98;
  --sky: #d7f3ff;
  --blush: #ffe3ef;
  --card: #ffffff;
  --line: #f3d5e4;
  --good: #1f9d78;
  --heart: #ff5a7a;
  --shadow: 0 16px 40px rgba(61, 126, 166, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Fredoka, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #fff 0 8%, transparent 9%),
    radial-gradient(circle at 88% 0%, #ffe3ef 0 18%, transparent 19%),
    linear-gradient(180deg, var(--sky), #fff 42%, var(--blush));
}
a { color: var(--blue-deep); }
button, input { font: inherit; }
button, .key, .btn { touch-action: manipulation; }
.top, .site-footer, .sheet, .hero, .steps, .band {
  width: min(1040px, calc(100% - 32px));
  margin-inline: auto;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 8px;
}
.brand { font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.top nav, .site-footer nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: center; padding: 24px 0 8px; }
.eyebrow { letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); font-weight: 600; margin-bottom: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; margin: 8px 0; }
h2 { font-size: 1.7rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.offer {
  background: #fff;
  border: 2px solid var(--pink);
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--blue-deep);
}
.vat { color: var(--muted); }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pink);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 0 #e36b96;
}
.btn:hover, button.btn:hover { transform: translateY(-1px); }
.btn.big { padding: 16px 22px; font-size: 1.15rem; }
.btn.ghost, button.ghost {
  background: #fff;
  color: var(--blue-deep);
  box-shadow: 0 8px 0 #d5ebf6;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.hero-card, .card, .level {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-card { min-height: 280px; padding: 24px; position: relative; overflow: hidden; }
.bubble {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 700; color: #fff;
  position: absolute;
}
.bubble.a { background: #7ec8ea; left: 18%; top: 18%; }
.bubble.b { background: var(--pink); right: 16%; top: 28%; }
.bubble.c { background: #f6c56b; left: 34%; bottom: 16%; color: var(--ink); }
.steps, .band { padding-bottom: 12px; }
.steps ol, .plain { padding-left: 1.1rem; }
.steps li, .plain li { margin: 10px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.band article { background: rgba(255,255,255,0.8); border-radius: 22px; padding: 16px 18px; }
.sheet { padding: 12px 0 32px; }
.card { padding: 22px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  border: 2px solid #d7e8f2;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 14px 0; }
.check input { margin-top: 4px; width: 1.1rem; height: 1.1rem; }
.note, .error { min-height: 1.2em; }
.error { color: #b4234a; font-weight: 600; }
.site-footer { padding: 28px 0 40px; color: var(--muted); }
.site-footer .offer { margin-top: 12px; }
.receipt { border-top: 1px solid var(--line); padding: 12px 0; }
.receipt pre {
  white-space: pre-wrap;
  font-family: Fredoka, system-ui, sans-serif;
  background: #f7fbff;
  border-radius: 16px;
  padding: 12px;
}
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#live { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }

body.game {
  min-height: 100dvh;
  background: linear-gradient(180deg, #c5ecff, #ffe7f1);
}
.stage {
  width: min(880px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  gap: 8px;
}
.hud, .links { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.links { font-size: 0.95rem; }
.hud strong { font-size: 1.15rem; }
.panel, #field, .keys, #overlay {
  background: rgba(255,255,255,0.86);
  border-radius: 24px;
}
.panel { padding: 22px; }
#field {
  position: relative;
  flex: 1 1 280px;
  min-height: 240px;
  max-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.65)),
    linear-gradient(180deg, #e7f6ff, #fff);
}
.letter {
  position: absolute;
  left: 0; top: 0;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 700; color: #fff;
  background: var(--bubble, #7ec8ea);
  box-shadow: 0 8px 0 rgba(61, 126, 166, 0.18);
}
.letter.is-target {
  background: var(--pink);
  outline: 4px solid #fff;
  box-shadow: 0 8px 0 #e36b96;
}
.keys { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.key-row { display: flex; gap: 6px; justify-content: center; }
.key {
  flex: 1 1 0;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 0 #d5ebf6;
  cursor: pointer;
}
.key.hot { background: var(--pink); color: #fff; box-shadow: 0 4px 0 #e36b96; }
.hearts { color: var(--heart); letter-spacing: 2px; font-size: 1.3rem; }
#overlay {
  position: fixed;
  inset: 12px;
  margin: auto;
  width: min(520px, calc(100% - 24px));
  height: fit-content;
  padding: 22px;
  text-align: center;
  z-index: 3;
  box-shadow: var(--shadow);
}
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level {
  border: 0;
  padding: 12px 8px;
  cursor: pointer;
  font-weight: 650;
}
.level[disabled] { opacity: 0.45; cursor: not-allowed; }
.toast { min-height: 1.4em; font-weight: 650; color: var(--blue-deep); text-align: center; }
@media (max-width: 800px) {
  .hero, .grid-3 { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
  .hero-card { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}
