/* ACE, laid out like a newspaper puzzle: a splash screen, a clean board, then results. */
.ace-body { background: var(--white); color: var(--ink); }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 10;
  background: var(--gold); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  text-align: center; overflow-y: auto;
}
.ace-body:not(.is-splash) .splash { display: none; }
.ace-body.is-splash .app { display: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: auto 0; }
.splash-icon { width: 160px; height: 160px; }
.splash-title { font-size: clamp(96px, 22vw, 132px); margin-top: 0; }
.splash-sub { font-size: clamp(21px, 5vw, 26px); line-height: 1.3; font-weight: 700; max-width: 560px; }
.btn-wide { min-width: 240px; min-height: 66px; font-size: 21px; margin-top: 16px; }
.splash .btn-ink:hover { background: #2A2F37; }
.splash-date { display: flex; flex-direction: column; font-size: 15px; line-height: 1.5; margin-top: 10px; }
.splash-date b { font-weight: 700; }
.splash-brand { --lh: 64px; color: var(--ink); flex: none; margin-top: 8px; }

/* ---------- top bar ---------- */
.bar {
  padding: 18px 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--white); border-bottom: 1px solid #E3E3E1;
}
.bar-brand { --lh: 52px; }
.bar-tagline { font-size: 17px; font-weight: 600; color: var(--muted); }
.splash-tagline { font-size: 18px; font-weight: 700; margin-top: 10px; }

/* the game's own title, inside the page */
.game-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.game-head-icon { width: 56px; height: 56px; }
.game-head-name { font-size: 44px; letter-spacing: .03em; }
.game-dots { display: flex; gap: 8px; margin-left: 10px; }
.game-dots i { width: 20px; height: 20px; border-radius: 50%; background: #E3E3E1; display: block; }
.game-dots i.win { background: var(--gold); }
.game-dots i.loss { background: var(--coral); }
.ace-body.is-done .game-head { display: none; }

/* ---------- the board ---------- */
.stage { width: 100%; max-width: 720px; margin: 0 auto; padding: 40px 20px 48px; }
#ace-game { display: flex; flex-direction: column; gap: 20px; }
.round-q { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 7.5vw, 48px); line-height: 1.08; letter-spacing: .01em; text-align: center; }
.round-head { text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: -6px; }

.choices { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 136px; padding: 24px 24px;
  border: 0; border-radius: 18px; background: #EFEFE6; color: var(--ink);
  text-align: center; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .1s ease;
}
@media (hover: hover) { .choice:hover:not(:disabled) { background: #E4E4D9; } }
.choice:active:not(:disabled) { transform: scale(.985); }
.choice:disabled { cursor: default; }
.pw { font-family: var(--display); font-size: clamp(32px, 8vw, 44px); line-height: 1.15; letter-spacing: .04em; overflow-wrap: anywhere; text-wrap: balance; }

/* after you pick: gold is the ace, coral is the one that got cracked */
.choice-tag { font-size: 13px; font-weight: 800; line-height: 1; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 5px; border-bottom: 3px solid currentColor; }
.choice-tag[hidden], .crack[hidden] { display: none; }
.crack { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 2px; }
.crack-label { font-size: clamp(15px, 3.6vw, 17px); line-height: 1.3; font-weight: 600; }
.crack-time { font-family: var(--display); font-size: clamp(32px, 7.6vw, 44px); line-height: 1.05; letter-spacing: .03em; text-transform: uppercase; }
.choice.is-strong { background: var(--gold); color: var(--ink); animation: pop .35s ease; }
.choice.is-weak { background: var(--coral); color: var(--ink); }
.choice.is-weak.is-picked { animation: shake .45s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.round-note { text-align: center; font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: -6px; }
.round-note[hidden] { display: none; }

/* the answer box: did you get it, why, and what to press next */
.verdict {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  background: var(--ink); color: var(--white); border-radius: 22px; padding: 24px 28px 26px;
  animation: rise .3s ease;
}
.verdict[hidden] { display: none; }
.verdict-title { font-family: var(--display); font-size: clamp(40px, 9vw, 56px); line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
.verdict.is-win .verdict-title { color: var(--gold); }
.verdict.is-loss .verdict-title { color: var(--coral); }
.lesson { font-size: clamp(17px, 4vw, 20px); line-height: 1.45; font-weight: 500; max-width: 540px; color: #EDEDEA; text-wrap: balance; }
.verdict-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.verdict-actions .btn, .end-actions .btn { min-height: 64px; min-width: 240px; font-size: 20px; padding: 0 30px; }
.btn-next { background: var(--white); color: var(--ink); }
.btn-next:hover { background: #E9E9E4; }
.verdict .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .55); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .choice.is-strong, .choice.is-weak.is-picked, .verdict { animation: none; } }

/* ---------- results ---------- */
.end-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.end-icon { width: 120px; height: 120px; margin-bottom: 6px; }
.end-headline { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 11vw, 66px); line-height: 1.02; letter-spacing: .01em; }
.end-msg { text-wrap: balance; font-size: clamp(18px, 4.2vw, 21px); line-height: 1.45; max-width: 560px; color: var(--muted); font-weight: 500; }
.end-grid { display: flex; justify-content: center; gap: 12px; margin: 10px 0 2px; }
.end-grid i { width: 68px; height: 68px; border-radius: 12px; display: block; }
.end-grid i.win { background: var(--gold); }
.end-grid i.loss { background: var(--coral); }
.end-score { text-align: center; font-weight: 800; font-size: 20px; color: var(--muted); }
.end-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.toast { font-weight: 700; font-size: 18px; color: var(--teal); min-height: 1.4em; }
.end-next { text-align: center; color: var(--muted); font-size: 19px; font-weight: 600; }
.end-next b { display: block; font-family: var(--display); font-weight: 400; font-size: 44px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------- after you've played ---------- */
.after { display: none; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 20px 64px; flex-direction: column; gap: 18px; }
.ace-body.is-done .after { display: flex; }
.after-block { background: var(--paper); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.after-block h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 6.6vw, 42px); line-height: 1.06; letter-spacing: .01em; }
.after-block .muted { color: var(--muted); font-size: 18px; }
.after-block .eyebrow { font-size: 15px; }
.after .form input[type=email] { min-height: 64px; font-size: 19px; padding: 0 24px; }
.after .form .btn { min-height: 64px; font-size: 19px; padding: 0 28px; }
.after .form-msg { font-size: 17px; }
.soon { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.soon li { display: flex; flex-direction: column; gap: 6px; }
.soon img { width: 80px; height: 80px; }
.soon b { font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: .02em; line-height: 1; margin-top: 6px; }
.soon span { font-size: 16px; color: var(--muted); line-height: 1.35; }
.after .ticks li { font-size: 18px; }
.after .ticks li::before { width: 16px; height: 16px; margin-top: 8px; box-shadow: none; }
.after-foot { padding: 32px 4px 0; display: flex; flex-direction: column; gap: 14px; color: var(--muted); }
.after-foot .tagline { color: var(--ink); font-weight: 800; font-size: 22px; }
.after-foot .fine { font-size: 15px; }
.after-foot .fine b { color: var(--ink); }

@media (max-width: 560px) {
  .bar { padding: 14px 14px 12px; gap: 8px; }
  .bar-brand { --lh: 44px; }
  .bar-tagline { font-size: 15px; }
  .splash-brand { --lh: 54px; }
  .splash-icon { width: 136px; height: 136px; }
  .game-head { margin-bottom: 16px; }
  .game-head-icon { width: 48px; height: 48px; }
  .game-head-name { font-size: 38px; }
  .game-dots i { width: 16px; height: 16px; }
  .stage { padding-top: 28px; }
  .choice { min-height: 120px; padding: 18px 16px; gap: 8px; }
  .verdict { padding: 20px 18px 20px; border-radius: 20px; gap: 8px; }
  .verdict-actions .btn { min-height: 60px; }
  .soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .after-block { padding: 24px; }
  .verdict-actions .btn, .end-actions .btn { width: 100%; }
}
