:root {
  --bg: #0b0b1e;
  --bg-2: #15153a;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f5ff;
  --muted: #a4a7cc;
  --gold: #ffd166;
  --green: #2ee59d;
  --sky: #4cc9f0;
  --violet: #b388ff;
  --pink: #ff6b9a;
  --radius: 20px;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; } /* author display rules must not resurrect hidden elements */
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
/* The brand wallpaper on its own fixed layer: iOS ignores background-attachment: fixed and would
   stretch the image over the whole page height instead. Darkened a little so cards stay readable. */
.app-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(rgba(11, 11, 30, 0.35), rgba(11, 11, 30, 0.55)),
    url("brand/wallpaper.webp") center top / cover no-repeat,
    var(--bg);
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
h2, h3, strong, .btn, .result-score { font-family: var(--display); }

.hero {
  margin: 0 0 14px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 960 / 543;
  border: 1px solid rgba(255, 209, 102, 0.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(179, 136, 255, 0.18);
}
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hub {
  position: relative; z-index: 1; max-width: 520px; margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
}

.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  font: 700 20px var(--display); color: #1a1033;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 6px 20px rgba(255, 107, 154, 0.35);
}
.hello { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hello small { color: var(--muted); font-size: 12px; }
.hello strong { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { margin-left: auto; display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  background: var(--card-strong); border: 1px solid var(--line); font-size: 14px;
}
.chip b { font-family: var(--display); font-size: 16px; }
.chip.streak.hot { background: linear-gradient(135deg, rgba(255, 140, 0, 0.35), rgba(255, 60, 90, 0.35)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.energy { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.energy-ring { position: relative; width: 44px; height: 44px; flex: none; }
.energy-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.energy-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 4; }
.ring-fg {
  fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset 0.6s ease;
}
.energy-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.energy-text strong { font-size: 16px; }
.energy-text small { color: var(--muted); }
.energy-text small b { color: var(--text); font-variant-numeric: tabular-nums; }
.energy .btn { margin-left: auto; }

.section-title {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin: 22px 4px 10px; font-weight: 600;
}

.games { display: grid; gap: 12px; }
.game-card {
  --accent: var(--green);
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  /* frosted glass over the wallpaper, with a thin light edge on top */
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.game-card:active { transform: scale(0.98); }
.game-card.ucantop { --accent: var(--sky); }
.game-card.kosu { --accent: var(--violet); }
.game-card.kasa { --accent: var(--gold); }
.game-card.soon { --accent: var(--muted); opacity: 0.7; }
.tile {
  width: 62px; height: 62px; flex: none; border-radius: 18px; display: grid; place-items: center;
  font-size: 32px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 55%, #fff 0%), color-mix(in srgb, var(--accent) 25%, #000 30%));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.info { min-width: 0; flex: 1; }
.info h3 { margin: 0 0 2px; font-size: 18px; font-weight: 600; }
.info p { margin: 0; color: var(--muted); font-size: 13px; }
.info .best { margin-top: 6px; font-size: 12px; color: var(--text); }
.info .best b { color: var(--accent); font-family: var(--display); font-size: 14px; }
.badge {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; background: var(--card-strong);
  border: 1px solid var(--line); color: var(--muted);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.96); }
.btn.play {
  --accent: var(--green);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, #fff 15%), color-mix(in srgb, var(--accent) 85%, #000 15%));
  color: #0b0b1e; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.game-card.penalti .btn.play { --accent: var(--green); }
.game-card.ucantop .btn.play { --accent: var(--sky); }
.game-card.kosu .btn.play { --accent: var(--violet); }
.game-card.kasa .btn.play { --accent: var(--gold); }
.btn.ghost { background: var(--card-strong); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 12px; }
.btn.wide { width: 100%; }

.board { padding: 12px; }
.tabs { display: flex; gap: 6px; padding: 4px; background: rgba(0, 0, 0, 0.25); border-radius: 14px; }
.tabs button {
  flex: 1; padding: 8px 4px; border-radius: 11px; background: transparent; color: var(--muted);
  font-size: 18px; transition: background 0.2s;
}
.tabs button[aria-selected="true"] { background: var(--card-strong); color: var(--text); }
.board-list { list-style: none; margin: 10px 0 0; padding: 0; min-height: 60px; }
.board-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
}
.board-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.board-list li.me { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.board-list .pos { width: 28px; text-align: center; font: 600 15px var(--display); color: var(--muted); }
.board-list .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-list .pts { font: 600 16px var(--display); }
.board-list .pts small { color: var(--muted); font: 12px system-ui; margin-left: 3px; }
.board-list .empty { justify-content: center; color: var(--muted); background: none; }
.board-me { margin: 8px 6px 2px; color: var(--muted); font-size: 13px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; opacity: 0.6; }

/* game screen */
.game-screen {
  position: fixed; inset: 0; z-index: 10; background: #05050f;
  display: flex; justify-content: center;
}
.game-screen[hidden] { display: none; }
#game-canvas { width: 100%; max-width: 480px; height: 100%; display: block; touch-action: none; }
.close-btn {
  position: absolute; top: calc(12px + var(--safe-top)); left: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 14px; font-size: 16px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tg .close-btn { display: none; } /* Telegram's own back button takes over */

.result {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 5, 15, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}
.result[hidden] { display: none; }
.result-card {
  width: min(360px, 100%); text-align: center; padding: 22px 18px 18px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(40, 40, 90, 0.92), rgba(18, 18, 45, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.result-game { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.result-score {
  font-size: 72px; font-weight: 700; line-height: 1; margin-top: 8px;
  background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-unit { margin: 2px 0 8px; color: var(--muted); }
.result-badge {
  display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 13px;
  background: linear-gradient(135deg, var(--gold), var(--pink)); color: #1a1033;
}
.result-badge.muted { background: var(--card-strong); color: var(--muted); }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 16px; }
.result-stats div { background: rgba(255, 255, 255, 0.06); border-radius: 14px; padding: 8px; }
.result-stats dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.result-stats dd { margin: 2px 0 0; font: 600 20px var(--display); }
.result-actions { display: grid; gap: 8px; }
.result-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.modal {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 5, 15, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(340px, 100%); text-align: center; padding: 22px 18px 18px; border-radius: 24px;
  background: linear-gradient(180deg, #23235a, #14143a); border: 1px solid var(--line);
  animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.modal-icon { font-size: 44px; }
.modal-card h3 { margin: 6px 0 4px; font-size: 21px; }
.modal-card p { margin: 0 0 16px; color: var(--muted); }
.modal-actions { display: grid; gap: 8px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); z-index: 30;
  padding: 10px 16px; border-radius: 14px; background: rgba(20, 20, 50, 0.95); border: 1px solid var(--line);
  font-size: 14px; max-width: calc(100% - 32px); animation: fade 0.2s ease;
}
.toast[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .result-card, .modal-card { animation: none; }
}

/* Kasa Kırma screen */
.kasa-screen {
  /* board and keypad shrink with the screen height so the keypad never falls off the bottom */
  --cell: clamp(40px, 6.1vh, 58px);
  --key: clamp(42px, 6.2vh, 56px);
  position: fixed; inset: 0; z-index: 10; overflow-y: auto;
  background: radial-gradient(120% 70% at 50% 0%, #3a2a10 0%, #14102a 55%, var(--bg) 100%);
}
.kasa-wrap {
  max-width: 440px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column;
  padding: calc(14px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
}
.kasa-head { display: grid; gap: 12px; margin-bottom: 14px; }
.kasa-title { display: flex; align-items: center; gap: 12px; padding-left: 52px; min-height: 42px; }
.tg .kasa-title { padding-left: 0; }
.kasa-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(145deg, #ffd166, #c98a1c); box-shadow: 0 6px 18px rgba(255, 209, 102, 0.35);
}
.kasa-title h2 { margin: 0; font-size: 21px; }
.kasa-title small { color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); }
.seg button { padding: 9px; border-radius: 11px; background: transparent; color: var(--muted); font: 600 14px var(--display); }
.seg button[aria-selected="true"] { background: var(--card-strong); color: var(--text); }

.kasa-board { display: grid; gap: 6px; justify-content: center; margin: 2px 0 4px; }
.kasa-row { display: grid; grid-template-columns: repeat(4, var(--cell)); gap: 8px; }
.kasa-row.shake { animation: shake 0.4s; }
.cell {
  height: var(--cell); border-radius: 14px; display: grid; place-items: center;
  font: 700 calc(var(--cell) * 0.48) var(--display); color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s, transform 0.15s;
}
.cell.typed { border-color: rgba(255, 209, 102, 0.7); animation: pop-in 0.15s ease; }
.cell.active-row { border-color: rgba(255, 255, 255, 0.18); }
.cell.g, .cell.y, .cell.b { border-color: transparent; }
.cell.g { background: linear-gradient(180deg, #3ff0a8, #19b874); color: #06251a; box-shadow: 0 4px 14px rgba(46, 229, 157, 0.35); }
.cell.y { background: linear-gradient(180deg, #ffd978, #f0b429); color: #2a1d00; box-shadow: 0 4px 14px rgba(255, 209, 102, 0.3); }
.cell.b { background: #34365a; color: rgba(255, 255, 255, 0.55); }
.cell.flip { animation: flip 0.45s ease both; }

.kasa-hint { text-align: center; min-height: 22px; margin: 6px 0 2px; color: var(--muted); font-size: 14px; }
.kasa-hint.err { color: #ff8fa3; }
.kasa-legend { text-align: center; color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.kasa-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; }
.dot.g { background: #2ee59d; } .dot.y { background: #ffd166; } .dot.b { background: #4a4d75; }

.keypad { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key {
  height: var(--key); border-radius: 16px; font: 700 24px var(--display);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.08s, filter 0.15s;
}
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.key:disabled { opacity: 0.35; }
.key.g { background: linear-gradient(180deg, #3ff0a8, #19b874); color: #06251a; }
.key.y { background: linear-gradient(180deg, #ffd978, #f0b429); color: #2a1d00; }
.key.b { background: #2a2c4a; color: rgba(255, 255, 255, 0.4); }
.key.action { font-size: 18px; }
.key.enter { background: linear-gradient(180deg, #ffd978, #f0b429); color: #2a1d00; font-size: 16px; }

.kasa-result { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 20px; background: rgba(5, 5, 15, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.kasa-result-card {
  width: min(340px, 100%); text-align: center; padding: 22px 18px 18px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(60, 45, 20, 0.95), rgba(20, 16, 40, 0.97));
  border: 1px solid rgba(255, 209, 102, 0.25); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.kasa-result-icon { font-size: 52px; }
.kasa-result-card h3 { margin: 4px 0 6px; font-size: 24px; }
.kasa-result-card p { margin: 0 0 16px; color: var(--muted); }
.kasa-result-card p b { color: var(--text); }
.kasa-result-actions { display: grid; gap: 8px; }
.code-reveal { display: inline-flex; gap: 6px; margin-top: 8px; }
.code-reveal span { width: 34px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 22px var(--display); background: rgba(255, 255, 255, 0.1); }

@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes pop-in { from { transform: scale(0.8); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-height: 700px) { .kasa-legend { display: none; } .kasa-head { gap: 8px; margin-bottom: 8px; } }

/* Splash: two seconds of logo animation while the first data loads */
.splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(70% 50% at 50% 42%, #14114a 0%, #050424 70%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.splash-stage { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.splash-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(from 0deg, #b388ff, #4cc9f0, #ffd166, #ff6b9a, #b388ff);
  /* only a thin glowing band of the conic gradient shows */
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%, #000 67%, transparent 69%);
  mask: radial-gradient(circle, transparent 62%, #000 64%, #000 67%, transparent 69%);
  filter: drop-shadow(0 0 12px rgba(179, 136, 255, 0.9));
  animation: ring-in 0.5s ease-out both, spin 1.6s linear infinite;
}
.splash-logo {
  position: relative; width: 220px; height: 220px; overflow: hidden;
  /* the logo's own dark square melts into the splash background */
  -webkit-mask: radial-gradient(circle, #000 52%, transparent 70%);
  mask: radial-gradient(circle, #000 52%, transparent 70%);
  animation: logo-in 0.65s cubic-bezier(0.2, 1.5, 0.4, 1) both, glow 1.4s ease-in-out 0.6s infinite alternate;
}
.splash-logo img { width: 100%; height: 100%; display: block; }
.splash-logo::after {
  content: ""; position: absolute; inset: -40%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
  transform: translateX(-120%); animation: shine 0.9s ease-in-out 0.45s both;
}
.splash-sparks i {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: #ffd166; box-shadow: 0 0 10px #ffd166; opacity: 0;
  animation: spark 1s ease-out 0.35s both;
}
.splash-sparks i:nth-child(1) { --dx: -120px; --dy: -70px; }
.splash-sparks i:nth-child(2) { --dx: 115px; --dy: -85px; background: #4cc9f0; box-shadow: 0 0 10px #4cc9f0; }
.splash-sparks i:nth-child(3) { --dx: -105px; --dy: 90px; background: #ff6b9a; box-shadow: 0 0 10px #ff6b9a; }
.splash-sparks i:nth-child(4) { --dx: 125px; --dy: 70px; }
.splash-sparks i:nth-child(5) { --dx: 0; --dy: -135px; background: #b388ff; box-shadow: 0 0 10px #b388ff; }
.splash-sparks i:nth-child(6) { --dx: 10px; --dy: 135px; background: #4cc9f0; box-shadow: 0 0 10px #4cc9f0; }
.splash-title { display: flex; font: 700 34px var(--display); letter-spacing: 0.04em; }
.splash-title span {
  background: linear-gradient(180deg, #fff6c8, #ffd166 45%, #f08a24); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(120, 50, 0, 0.6)); animation: letter 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.splash-title .gap { width: 12px; }
.splash-title span:nth-child(1) { animation-delay: 0.30s; } .splash-title span:nth-child(2) { animation-delay: 0.35s; }
.splash-title span:nth-child(3) { animation-delay: 0.40s; } .splash-title span:nth-child(4) { animation-delay: 0.45s; }
.splash-title span:nth-child(6) { animation-delay: 0.52s; } .splash-title span:nth-child(7) { animation-delay: 0.57s; }
.splash-title span:nth-child(8) { animation-delay: 0.62s; } .splash-title span:nth-child(9) { animation-delay: 0.67s; }
.splash-title span:nth-child(10) { animation-delay: 0.72s; }
.splash-bar { width: 180px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.splash-bar i {
  display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, #b388ff, #4cc9f0, #ffd166); box-shadow: 0 0 12px rgba(76, 201, 240, 0.8);
  animation: fill 2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes ring-in { from { opacity: 0; transform: scale(0.6); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes logo-in { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } }
@keyframes glow { to { filter: drop-shadow(0 0 22px rgba(179, 136, 255, 0.85)) brightness(1.12); } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes spark { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); } }
@keyframes letter { from { opacity: 0; transform: translateY(-18px) scale(0.6); } }
@keyframes fill { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .splash *, .splash *::after { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
}
