/* The Postcard look from the apps (App/Capitals/Theme/Postcard.swift and the
   mockup): bright sky, ink outlines, chunky cards with a solid drop shadow.
   It stays light in dark mode, like the apps. */
@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url(fonts/Fredoka-Medium.ttf) format("truetype"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url(fonts/Fredoka-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url(fonts/Fredoka-Bold.ttf) format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url(fonts/Nunito-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(fonts/Nunito-Bold.ttf) format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(fonts/Nunito-ExtraBold.ttf) format("truetype"); }

:root {
  --sky: #dff1ff; --ink: #14214a; --blue: #2d5bff; --sun: #ffc93c;
  --mint: #22c39a; --rose: #ff5d73; --card: #ffffff; --soft: #5a678f;
  --disp: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--sky); }
body {
  margin: 0; min-height: 100dvh; background: var(--sky); color: var(--ink);
  font-family: var(--body); font-weight: 700; font-size: 16px; line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 480px; margin: 0 auto; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.pad { padding: max(16px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }

/* Home */
.hero { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.hero img { width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); flex: 0 0 auto; }
h1 { font-family: var(--disp); font-weight: 600; font-size: 34px; line-height: 1; margin: 0; letter-spacing: -.01em; }
h2 { font-family: var(--disp); font-weight: 600; font-size: 20px; margin: 8px 0 0; }
.sub { color: var(--soft); margin: 4px 0 0; }

.play-card { background: var(--card); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.play-card .row { display: flex; align-items: center; gap: 12px; }
.play-card .fl { font-size: 40px; line-height: 1; }
.play-card b { font-family: var(--disp); font-weight: 600; font-size: 22px; display: block; }
.play-card small { color: var(--soft); font-size: 14px; }

.stamps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 420px) { .stamps { grid-template-columns: repeat(3, 1fr); } }
.stamp {
  position: relative; background: var(--card); padding: 12px; text-decoration: none;
  display: flex; flex-direction: column; gap: 4px; min-height: 96px;
  -webkit-mask: radial-gradient(circle 5px at 50% 0, #0000 98%, #000) top/14px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, #0000 98%, #000) bottom/14px 51% repeat-x;
  mask: radial-gradient(circle 5px at 50% 0, #0000 98%, #000) top/14px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, #0000 98%, #000) bottom/14px 51% repeat-x;
}
.stamp .fl { font-size: 26px; line-height: 1; }
.stamp img { width: 30px; height: 30px; }
.stamp b { font-family: var(--disp); font-weight: 600; font-size: 16px; line-height: 1.1; }
.stamp span { font-size: 12px; color: var(--soft); }
.stamp .lock { position: absolute; right: 8px; top: 10px; font-size: 13px; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 8px; font-family: var(--disp); font-weight: 600; }
.stamp .fl, .stamp img { filter: grayscale(.35); }

/* The App Store call to action */
.get { background: var(--ink); color: #fff; border-radius: 20px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.get .txt { flex: 1; }
.get b { font-family: var(--disp); font-weight: 600; font-size: 19px; display: block; }
.get span { font-size: 14px; opacity: .85; }
.get .qr { display: none; width: 104px; height: 104px; border-radius: 10px; background: #fff; padding: 4px; flex: 0 0 auto; }
.get .qr img { width: 100%; height: 100%; display: block; }
/* Desktops get a QR code to scan with a phone. */
@media (hover: hover) and (pointer: fine) and (min-width: 700px) { .get .qr { display: block; } }
.badge img { height: 48px; display: block; }
.store-btn { display: inline-block; margin-top: 10px; background: var(--sun); color: var(--ink); border: 3px solid #fff; border-radius: 14px; padding: 8px 14px; font-family: var(--disp); font-weight: 600; text-decoration: none; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--soft); font-size: 13px; margin-top: 4px; }

/* Buttons */
.cta { display: block; width: 100%; text-align: center; text-decoration: none; background: var(--blue); color: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 14px; font-family: var(--disp); font-size: 20px; font-weight: 600; box-shadow: 0 4px 0 var(--ink); }
.cta.alt { background: var(--card); color: var(--ink); }
.cta.sun { background: var(--sun); color: var(--ink); }
.cta:active, .opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.linkbtn { background: none; border: none; color: var(--soft); font-size: 14px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; align-self: center; }

/* Play */
.bar { display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 16px 0; }
.back { width: 40px; height: 40px; border-radius: 12px; border: 3px solid var(--ink); background: var(--card); font-weight: 800; font-size: 18px; line-height: 1; flex: 0 0 auto; }
.bar-t { flex: 1; font-family: var(--disp); font-weight: 600; font-size: 16px; }
.pill { font-family: var(--disp); font-weight: 600; background: var(--sun); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 10px; }
.prog { margin: 12px 16px 0; height: 12px; border-radius: 999px; background: #fff; border: 3px solid var(--ink); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--mint); transition: width .3s; }
.qcard { background: var(--card); border-radius: 24px; padding: 22px 18px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; gap: 10px; }
.qtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kick { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
/* The quiet stopwatch: a hint that the app scores speed. */
.clock { font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; opacity: .8; }
.qtext { font-family: var(--disp); font-weight: 600; font-size: 28px; line-height: 1.12; margin: 0; text-wrap: balance; }
.qtext em { font-style: normal; background: linear-gradient(transparent 58%, var(--sun) 58%); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { background: var(--card); border: 3px solid var(--ink); border-radius: 16px; padding: 14px 16px; text-align: left; font-family: var(--disp); font-size: 20px; font-weight: 500; box-shadow: 0 4px 0 var(--ink); display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.opt.right { background: var(--mint); color: #fff; }
.opt.wrong { background: var(--rose); color: #fff; }
.opt.dim { opacity: .45; }
.opt:disabled { cursor: default; }
.fb { border-radius: 16px; padding: 12px 14px; background: #fff; border: 3px dashed var(--ink); display: flex; gap: 12px; align-items: flex-start; }
.fb .txt { flex: 1; }
.fb b { font-family: var(--disp); font-weight: 600; font-size: 18px; display: block; }
.fb .flag { font-size: 34px; line-height: 1; }
.fb .time { color: var(--soft); font-size: 13px; display: block; margin-top: 2px; }

/* Results */
.ribbon { align-self: flex-start; background: var(--sun); border: 3px solid var(--ink); border-radius: 10px; padding: 3px 10px; font-family: var(--disp); font-weight: 600; transform: rotate(-3deg); }
.big { font-family: var(--disp); font-size: 72px; line-height: .9; font-weight: 700; }
.big small { font-size: 28px; color: var(--soft); }
.speed { background: #fff; border: 3px dashed var(--ink); border-radius: 16px; padding: 12px 14px; }
.speed b { font-family: var(--disp); font-weight: 600; }

/* Chooser at play.gbros.us */
.pick { display: flex; gap: 14px; align-items: center; background: var(--card); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); padding: 14px; text-decoration: none; }
.pick img { border-radius: 16px; border: 3px solid var(--ink); }
.pick b { font-family: var(--disp); font-weight: 600; font-size: 22px; display: block; }
.pick small { color: var(--soft); font-size: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
