/* =====================================================================
   Parkky — The Cutest Parking App
   Stylesheet for Parky Pig and friends.
   ===================================================================== */

:root {
  /* Pink reserved for the pig and the logo */
  --pink: #FFB7C5;
  --pink-deep: #F590A8;
  --blush: #FFD6E0;
  /* Blue sky palette — primary surface and action color */
  --sky-1: #C7E1FF;
  --sky-2: #E3EEFF;
  --sky-3: #F4F8FF;
  --blue: #6FA0FF;
  --blue-mid: #5B8DEF;
  --blue-deep: #3A6FD1;
  --blue-dark: #2A55B0;
  /* Supporting tones */
  --cream: #FFF8F0;
  --mint: #B8E6D2;
  --mint-deep: #7BCDA9;
  --gold: #FFD56B;
  --gold-deep: #E8B94B;
  --charcoal: #28324A;
  --ink: #1B2238;
  --shadow: 0 10px 30px rgba(91, 141, 239, 0.18);
  --shadow-lg: 0 20px 50px rgba(91, 141, 239, 0.25);
  --radius: 28px;
  --radius-lg: 36px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--charcoal);
  background:
    radial-gradient(1200px 600px at 30% -10%, #FFFFFF 0%, transparent 60%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

button, .key, .preset, .country-pill, .pay-tab, .icon-btn, .brand,
.header-coins, .parky, input, select, .modal, .btn, .btn-text,
.btn-apple-pay, .btn-google-pay, .sso-btn {
  touch-action: manipulation;
}

body {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: stretch;
}

h1, h2, h3 { font-family: 'Fredoka', sans-serif; font-weight: 600; margin: 0; }

/* ----------------------------- Sky ----------------------------------- */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  filter: blur(0.5px) drop-shadow(0 6px 14px rgba(91, 141, 239, 0.18));
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: inherit; border-radius: 50%;
}
.cloud-1 { width: 150px; height: 50px; top: 8%; left: -240px; animation: drift 60s linear infinite; opacity: 0.95; }
.cloud-1::before { width: 78px; height: 78px; top: -38px; left: 24px; }
.cloud-1::after  { width: 62px; height: 62px; top: -26px; left: 76px; }
.cloud-2 { width: 110px; height: 36px; top: 26%; left: -180px; animation: drift 80s linear infinite; animation-delay: -22s; opacity: 0.9; }
.cloud-2::before { width: 60px; height: 60px; top: -30px; left: 18px; }
.cloud-2::after  { width: 48px; height: 48px; top: -20px; left: 56px; }
.cloud-3 { width: 170px; height: 56px; top: 58%; left: -300px; animation: drift 70s linear infinite; animation-delay: -38s; opacity: 0.85; }
.cloud-3::before { width: 86px; height: 86px; top: -42px; left: 30px; }
.cloud-3::after  { width: 68px; height: 68px; top: -28px; left: 90px; }
.cloud-4 { width: 120px; height: 40px; top: 76%; left: -200px; animation: drift 90s linear infinite; animation-delay: -12s; opacity: 0.8; }
.cloud-4::before { width: 66px; height: 66px; top: -33px; left: 22px; }
.cloud-4::after  { width: 52px; height: 52px; top: -22px; left: 64px; }
/* Two more for richer skyscape */
.cloud-5 { width: 90px; height: 30px; top: 42%; left: -140px; animation: drift 100s linear infinite; animation-delay: -65s; opacity: 0.7; }
.cloud-5::before { width: 50px; height: 50px; top: -25px; left: 14px; }
.cloud-5::after  { width: 40px; height: 40px; top: -16px; left: 46px; }
.cloud-6 { width: 130px; height: 42px; top: 90%; left: -220px; animation: drift 75s linear infinite; animation-delay: -50s; opacity: 0.75; }
.cloud-6::before { width: 70px; height: 70px; top: -34px; left: 26px; }
.cloud-6::after  { width: 56px; height: 56px; top: -22px; left: 70px; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 300px)); }
}

.floating-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.5;
  animation: float-up 12s ease-in-out infinite;
  filter: blur(1px);
}
.floating-dot-1 { left: 10%; bottom: -20px; animation-delay: 0s; background: var(--gold); }
.floating-dot-2 { left: 30%; bottom: -20px; animation-delay: 3s; background: #fff; }
.floating-dot-3 { left: 55%; bottom: -20px; animation-delay: 6s; background: var(--blue); }
.floating-dot-4 { left: 75%; bottom: -20px; animation-delay: 9s; background: var(--blue-mid); }
.floating-dot-5 { left: 90%; bottom: -20px; animation-delay: 1.5s; background: var(--gold); }

@keyframes float-up {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  10%  { opacity: 0.6; }
  50%  { transform: translateY(-50vh) scale(1) translateX(20px); opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) scale(0.4); opacity: 0; }
}

/* ----------------------------- App header --------------------------- */
.app-header {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 8px;
  flex: 0 0 auto;
}
.brand {
  appearance: none; border: none; background: transparent;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 16px;
  transition: transform 0.15s var(--ease-spring), background 0.15s ease;
}
.brand:hover { background: rgba(255, 255, 255, 0.5); }
.brand:active { transform: scale(0.94); }
.brand-mark {
  width: 38px; height: 28px;
  display: inline-block;
  animation: brand-bump 6s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(91, 141, 239, 0.3));
}
@keyframes brand-bump {
  0%, 80%, 100% { transform: translateX(0); }
  82% { transform: translateX(-2px) translateY(-1px); }
  86% { transform: translateX(2px); }
  90% { transform: translateX(-1px); }
}
.brand-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(180deg, var(--pink-deep), #D67890);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.header-coins {
  appearance: none; border: none;
  background: white;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 16px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-deep);
  cursor: pointer;
  box-shadow: 0 4px 0 #C9D8EE, 0 6px 14px rgba(58, 46, 57, 0.08);
  transition: transform 0.1s, box-shadow 0.1s;
}
.header-coins:hover { transform: translateY(-1px); }
.header-coins:active { transform: translateY(2px); box-shadow: 0 2px 0 #C9D8EE; }
.coin-dot { font-size: 16px; }
.coin-count { min-width: 18px; text-align: center; }
.coin-count.bump { animation: coin-bump 0.5s var(--ease-spring); }
@keyframes coin-bump {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.4); color: var(--mint-deep); }
}

/* ----------------------------- App shell ----------------------------- */
.app {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4px 16px 16px;
  overflow: hidden;
}
/* Splash gets vertical centering for hero impact */
.app:has(.splash) { align-items: center; padding-top: 8px; }

.screen {
  width: 100%;
  max-width: 460px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  animation: screen-in 0.6s var(--ease-out) both;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  padding: 2px;
}
.screen::-webkit-scrollbar { display: none; }
.screen.leaving {
  position: absolute;
  inset: 0 16px;
  height: auto;
  animation: screen-out 0.35s var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes screen-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-30px) scale(0.95); }
}

/* ----------------------------- Card ---------------------------------- */
.card {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-radius: 28px;
  padding: 18px 18px 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(91, 141, 239, 0.18),
    0 2px 6px rgba(58, 46, 57, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
.card-spacer { display: none; }

.title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  text-align: center;
  line-height: 1.15;
  margin: 0;
}
.title .accent { color: var(--blue-deep); }
.subtitle { font-size: 14px; color: #5C6680; text-align: center; line-height: 1.4; margin: 0; }

/* ----------------------------- Parky --------------------------------- */
.parky {
  width: 220px; height: 220px;
  position: relative;
  filter: drop-shadow(0 14px 18px rgba(245, 144, 168, 0.35));
  animation: parky-bob 3.2s ease-in-out infinite;
  flex: 0 0 auto;
}

/* Medium mount: showcase but not full 220px */
.parky-mount.medium .parky { width: 110px; height: 110px; }

/* Compact mount: Parky on the left, speech bubble on the right.
   Block layout with absolutely-positioned children — Parky never moves when
   the bubble appears/disappears or when the bubble text changes lines. */
.parky-mount.compact {
  position: relative;
  display: block;
  width: 100%;
  height: 86px;
  padding: 0 4px;
  flex: 0 0 auto;
}
.parky-mount.compact .parky {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 78px;
  height: 78px;
  /* Quiet down the idle bob in compact mode so Parky never appears to bounce */
  animation: none;
  transform: none;
  filter: drop-shadow(0 6px 10px rgba(245, 144, 168, 0.3));
}
/* Parky's snout sits at y ≈ 45px in the 86px row (top:4 + 78 * 115/220).
   With top:4 / bottom:8 the bubble's vertical centerline pins to that y
   (mid of remaining 74px = y=4 + 37 = 41~ish actually y=(86-8+4)/2=41 hmm let's just use
   asymmetric top to push center up to the snout). */
/* Top:0 / bottom:24 → bubble center at y = (86-24)/2 = 31 — sits at Parky's
   eye/upper-snout level, which reads visually as his mouth area in the SVG.
   Earlier targets (y=45 = mouth curve, y=51 = below mouth) felt too low. */
.parky-mount.compact .speech-bubble {
  position: absolute;
  left: 84px;
  right: 4px;
  top: 0;
  bottom: 24px;
  margin: auto 0;
  height: fit-content;
  max-height: 56px;
  max-width: none;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 14px;
  text-align: left;
  border-radius: 22px 22px 22px 6px;
  border-width: 2px;
  line-height: 1.3;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(245, 144, 168, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform-origin: 0% 50%;
}
/* Bubble center is pinned to Parky's snout y (45px in the 86px row), so a
   tail at top:50% lands exactly at the snout. */
.parky-mount.compact .speech-bubble::after {
  bottom: auto;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  border-right: none;
  border-top: none;
  border-bottom: 2px solid var(--pink-deep);
  border-left: 2px solid var(--pink-deep);
  border-radius: 4px 0 6px 0;
  width: 12px; height: 12px;
  background: white;
}
/* Cute connector dot between Parky's snout and the bubble */
.parky-mount.compact .speech-bubble::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pink-deep);
  box-shadow: 0 0 0 2px white, 0 1px 2px rgba(245, 144, 168, 0.4);
}
.parky-svg { width: 100%; height: 100%; overflow: visible; }
@keyframes parky-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-6px) rotate(1deg); }
}

/* Tail wag */
.parky-tail { animation: tail-wag 0.9s ease-in-out infinite; transform-origin: 168px 132px; }
@keyframes tail-wag {
  0%, 100% { transform: rotate(-15deg); }
  50%      { transform: rotate(15deg); }
}

/* Ears flop */
.parky-ear-left { transform-origin: 68px 60px; animation: ear-flop-l 4s ease-in-out infinite; }
.parky-ear-right { transform-origin: 152px 60px; animation: ear-flop-r 4s ease-in-out infinite; }
@keyframes ear-flop-l {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-8deg); }
}
@keyframes ear-flop-r {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(8deg); }
}

/* Blink */
.parky-lid-left, .parky-lid-right {
  animation: blink 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes blink {
  0%, 92%, 100% { height: 0; }
  94%, 96%      { height: 22px; }
}

/* Snout breathing */
.parky-snout { animation: snout-breathe 2.6s ease-in-out infinite; transform-origin: 110px 115px; }
@keyframes snout-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04, 1.06); }
}

/* Sleeping Z's hidden by default */
.parky-zzz { opacity: 0; transition: opacity 0.4s; }

/* Expression: happy */
.parky[data-expression="happy"] { animation: parky-happy 0.6s ease-in-out infinite; }
@keyframes parky-happy {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-12px) scale(1.04); }
}
.parky[data-expression="happy"] .parky-mouth {
  d: path("M90 130 q 20 18 40 0");
}

/* Expression: curious — head tilt */
.parky[data-expression="curious"] .parky-head { animation: head-tilt 1.6s ease-in-out infinite; transform-origin: 110px 130px; }
@keyframes head-tilt {
  0%, 100% { transform: rotate(-5deg); }
  50%      { transform: rotate(5deg); }
}

/* Expression: sleeping */
.parky[data-expression="sleeping"] { animation: parky-sleep 4s ease-in-out infinite; }
@keyframes parky-sleep {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-2px) rotate(-2deg); }
}
.parky[data-expression="sleeping"] .parky-zzz { opacity: 1; animation: zzz-float 2s ease-in-out infinite; }
.parky[data-expression="sleeping"] .parky-eye-left ellipse:first-child,
.parky[data-expression="sleeping"] .parky-eye-right ellipse:first-child {
  transform: scaleY(0.1); transform-origin: center; transform-box: fill-box;
}
.parky[data-expression="sleeping"] .parky-mouth { d: path("M100 130 q 10 4 20 0"); }
@keyframes zzz-float {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(-6px); opacity: 0.6; }
}

/* Expression: shy / blushing */
.parky[data-expression="shy"] .parky-head { animation: head-shy 2.2s ease-in-out infinite; }
@keyframes head-shy {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-3px); }
}

/* Expression: working — wears helmet (ring on cap) */
.parky[data-expression="working"] .parky-cap circle { fill: var(--mint-deep); animation: helmet-pulse 1s ease-in-out infinite; }
@keyframes helmet-pulse {
  0%, 100% { r: 6; }
  50%      { r: 8; }
}

/* Expression: proud */
.parky[data-expression="proud"] { animation: parky-proud 0.8s ease-in-out; }
@keyframes parky-proud {
  0%   { transform: scale(1) rotate(0); }
  30%  { transform: scale(1.15) rotate(-6deg); }
  60%  { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Wink */
.parky[data-wink="true"] .parky-lid-right { height: 22px !important; animation: none; }

/* Cosmetics — show only the equipped hat/accessory */
.parky .parky-hat { display: none; }
.parky:not([data-hat]) .parky-hat-cap,
.parky[data-hat=""] .parky-hat-cap,
.parky[data-hat="cap"] .parky-hat-cap,
.parky[data-hat="top"] .parky-hat-top,
.parky[data-hat="cowboy"] .parky-hat-cowboy,
.parky[data-hat="party"] .parky-hat-party,
.parky[data-hat="racing"] .parky-hat-racing,
.parky[data-hat="crown"] .parky-hat-crown {
  display: block;
}
.parky .parky-acc { display: none; }
.parky[data-acc="glasses"] .parky-acc-glasses {
  display: block;
}
/* Hide built-in eyes when sunglasses are equipped */
.parky[data-acc="glasses"] .parky-eye-left,
.parky[data-acc="glasses"] .parky-eye-right,
.parky[data-acc="glasses"] .parky-lid-left,
.parky[data-acc="glasses"] .parky-lid-right {
  display: none;
}

/* Squish on tap */
.parky.squish { animation: squish 0.5s var(--ease-spring); }
@keyframes squish {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.15, 0.85); }
  60%  { transform: scale(0.92, 1.1); }
  100% { transform: scale(1); }
}

/* ----------------------------- Speech bubble ------------------------- */
.speech-bubble {
  position: relative;
  background: #fff;
  border: 3px solid var(--pink-deep);
  border-radius: 22px;
  padding: 12px 18px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--charcoal);
  max-width: 280px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  /* Hidden by default — toggle with .show. We use opacity/visibility instead
     of display so the surrounding layout never reflows when Parky talks. */
  opacity: 0;
  visibility: hidden;
  transform: scale(0) rotate(-8deg);
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}
.speech-bubble.show {
  opacity: 1;
  visibility: visible;
  animation: bubble-pop 0.5s var(--ease-spring) both;
  transition: opacity 0.18s ease, visibility 0s linear 0s;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -14px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 18px; height: 18px;
  background: #fff;
  border-right: 3px solid var(--pink-deep);
  border-bottom: 3px solid var(--pink-deep);
  border-bottom-right-radius: 4px;
}
@keyframes bubble-pop {
  0%   { transform: scale(0) rotate(-8deg); }
  60%  { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ----------------------------- Buttons ------------------------------- */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 17px;
  padding: 13px 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: white;
  box-shadow: 0 5px 0 var(--blue-dark), 0 10px 20px rgba(91, 141, 239, 0.35);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s ease;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--blue-dark), 0 16px 30px rgba(91, 141, 239, 0.55); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--blue-dark), 0 4px 12px rgba(91, 141, 239, 0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white;
  color: var(--charcoal);
  box-shadow: 0 6px 0 #C9D8EE, 0 12px 24px rgba(91, 141, 239, 0.12);
}
.btn-secondary:hover { box-shadow: 0 8px 0 #C9D8EE, 0 16px 30px rgba(91, 141, 239, 0.2); }
.btn-secondary:active { box-shadow: 0 2px 0 #C9D8EE, 0 4px 8px rgba(91, 141, 239, 0.12); }

.btn-mint {
  background: linear-gradient(180deg, var(--mint) 0%, var(--mint-deep) 100%);
  box-shadow: 0 6px 0 #5DAB87, 0 12px 24px rgba(123, 205, 169, 0.4);
  color: var(--charcoal);
}
.btn-mint:hover { box-shadow: 0 8px 0 #5DAB87, 0 16px 30px rgba(123, 205, 169, 0.5); }
.btn-mint:active { box-shadow: 0 2px 0 #5DAB87, 0 4px 12px rgba(123, 205, 169, 0.3); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 6px 0 #BC9438, 0 12px 24px rgba(232, 185, 75, 0.4);
  color: var(--charcoal);
}

.btn-danger {
  background: linear-gradient(180deg, #FF7A8C 0%, #E04A60 100%);
  box-shadow: 0 6px 0 #B43349, 0 12px 24px rgba(229, 74, 96, 0.45);
  color: white;
  position: relative;
}
.btn-danger::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #B43349, 0 16px 30px rgba(229, 74, 96, 0.55); }
.btn-danger:active { transform: translateY(4px); box-shadow: 0 2px 0 #B43349, 0 4px 12px rgba(229, 74, 96, 0.35); }

/* Danger modal vibe — red border, warning emoji */
.modal.modal-danger { border-color: #E04A60; }
.modal.modal-danger .modal-title { color: #B43349; }

.btn-row { display: flex; gap: 12px; width: 100%; }
.btn-row .btn { flex: 1; }

.btn-text {
  appearance: none; border: none; background: transparent;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #7E8BAA;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.02em;
  margin-top: -4px;
}
.btn-text:hover { color: var(--blue-deep); background: rgba(91, 141, 239, 0.12); }
.btn-text:active { transform: scale(0.97); }

/* ----------------------------- Splash -------------------------------- */
.splash-letters {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 64px;
  display: flex; gap: 1px;
  margin-top: -8px;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.splash-letters span {
  display: inline-block;
  color: #F590A8;
  -webkit-text-stroke: 2px white;
  text-stroke: 2px white;
  paint-order: stroke fill;
  text-shadow:
    3px 4px 0 #BC5F77,
    0 14px 28px rgba(91, 141, 239, 0.3);
  animation: letter-pop 0.6s var(--ease-spring) both;
}
.splash-letters span:nth-child(1) { animation-delay: 0.2s; }
.splash-letters span:nth-child(2) { animation-delay: 0.3s; }
.splash-letters span:nth-child(3) { animation-delay: 0.4s; }
.splash-letters span:nth-child(4) { animation-delay: 0.5s; }
.splash-letters span:nth-child(5) { animation-delay: 0.6s; }
.splash-letters span:nth-child(6) { animation-delay: 0.7s; }
@keyframes letter-pop {
  0%   { transform: translateY(40px) scale(0.3) rotate(-20deg); opacity: 0; }
  60%  { transform: translateY(-8px) scale(1.2) rotate(8deg); opacity: 1; }
  100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
}

.splash .parky { animation: parky-drop 0.9s var(--ease-spring) both, parky-bob 3.2s ease-in-out infinite 0.9s; }
@keyframes parky-drop {
  0%   { transform: translateY(-120vh) rotate(-30deg); }
  60%  { transform: translateY(20px) rotate(8deg); }
  80%  { transform: translateY(-10px) rotate(-4deg); }
  100% { transform: translateY(0) rotate(0); }
}

.splash-tagline {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #B43349;
  background: white;
  padding: 7px 18px;
  border-radius: 16px;
  margin-top: 12px;
  box-shadow: 0 4px 14px rgba(91, 141, 239, 0.18), 0 1px 0 rgba(255,255,255,0.9) inset;
  border: 1px solid rgba(245, 144, 168, 0.3);
  display: inline-flex; align-items: center; gap: 6px;
  animation: fade-up 0.8s var(--ease-out) 1.2s both;
  letter-spacing: 0.01em;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  width: 16px; height: 16px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
  animation: sparkle-pop 1.4s ease-in-out infinite;
}
@keyframes sparkle-pop {
  0%, 100% { transform: scale(0) rotate(0); opacity: 0; }
  50%      { transform: scale(1) rotate(180deg); opacity: 1; }
}

/* ----------------------------- Keypad -------------------------------- */
.zone-display {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 0.15em;
  color: var(--charcoal);
  background: white;
  padding: 10px 20px;
  border-radius: 18px;
  border: 3px dashed var(--blue);
  min-width: 220px;
  text-align: center;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--ease-spring);
}
.zone-display.bump { animation: zone-bump 0.4s var(--ease-spring); }
.zone-display.shake { animation: shake 0.5s; border-color: #FF6B7A; }
@keyframes zone-bump {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}
.zone-display .placeholder { color: #9FAEC8; letter-spacing: 0.15em; }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
.key {
  appearance: none; border: none; cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 26px;
  height: 52px;
  background: white;
  color: var(--charcoal);
  border-radius: 20px;
  box-shadow: 0 4px 0 #C9D8EE, 0 8px 18px rgba(91, 141, 239, 0.12);
  transition: transform 0.1s, box-shadow 0.1s;
}
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9D8EE, 0 2px 6px rgba(91, 141, 239, 0.15); }
.key.delete { background: #E9EFFB; color: var(--blue-deep); }
.key.submit { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); color: var(--charcoal); }
.key.pop { animation: key-pop 0.3s var(--ease-spring); }
@keyframes key-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* ----------------------------- Duration picker ----------------------- */
.duration-display {
  font-family: 'Fredoka', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--blue-deep);
  text-align: center;
  line-height: 1;
}
.duration-display .unit { font-size: 18px; color: var(--charcoal); margin-left: 4px; }

.duration-slider-wrap {
  width: 100%;
  padding: 8px 0;
}
.duration-slider {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--mint) 0%, var(--pink) 50%, var(--gold) 100%);
  outline: none;
}
.duration-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--blue-deep);
  cursor: grab;
  box-shadow: 0 4px 12px rgba(91, 141, 239, 0.5);
  transition: transform 0.1s;
}
.duration-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.2); }
.duration-slider::-moz-range-thumb {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--blue-deep);
  cursor: grab;
  box-shadow: 0 4px 12px rgba(91, 141, 239, 0.5);
}

.preset-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.preset {
  appearance: none; border: 2px solid var(--blue);
  background: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 14px;
  color: var(--blue-deep);
  cursor: pointer;
  transition: all 0.2s;
}
.preset:hover { background: var(--blush); transform: translateY(-2px); }
.preset.active { background: var(--blue-deep); color: white; border-color: var(--blue-deep); }

.price-ticker {
  font-family: 'Fredoka', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--charcoal);
  display: flex; align-items: baseline; gap: 2px;
  height: 36px;
  overflow: hidden;
}
.price-ticker .currency { color: var(--mint-deep); font-size: 20px; margin-right: 2px; }
.digit-cell {
  display: inline-block;
  width: 18px; text-align: center; overflow: hidden;
  height: 36px;
  position: relative;
}
.digit-cell .stack {
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease-spring);
}
.digit-cell .stack span { height: 36px; line-height: 36px; }

/* ----------------------------- Forms --------------------------------- */
.field {
  width: 100%;
  min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.field label {
  font-size: 11px; font-weight: 700;
  color: var(--blue-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field input {
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 2px solid #DCE7FA;
  background: white;
  border-radius: 14px;
  padding: 11px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal);
  outline: none;
  transition: all 0.2s;
}
.field input:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(143, 178, 240, 0.3);
}
.field input::placeholder { color: #9FAEC8; font-weight: 500; }

.field.error input,
.field.error select { border-color: #FF6B7A; animation: shake 0.4s; }

/* ----------------------------- Card form (Stripe-ish) ---------------- */
.cc-card {
  width: 100%;
  height: 140px;
  perspective: 1200px;
  margin: 2px 0;
}
.cc-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.7s var(--ease-spring);
  transform-style: preserve-3d;
}
.cc-card.flipped .cc-inner { transform: rotateY(180deg); }
.cc-front, .cc-back {
  position: absolute; inset: 0;
  border-radius: 18px;
  padding: 16px;
  color: white;
  background: linear-gradient(135deg, #5B8DEF 0%, #8B5BEF 50%, #EF5BB7 100%);
  box-shadow: 0 10px 24px rgba(91, 141, 239, 0.4);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: 'Fredoka', sans-serif;
}
.cc-back {
  background: linear-gradient(135deg, #8B5BEF 0%, #EF5BB7 100%);
  transform: rotateY(180deg);
}
.cc-chip {
  width: 44px; height: 32px;
  background: linear-gradient(135deg, #FFD56B, #C49A2B);
  border-radius: 8px;
  position: relative;
}
.cc-chip::after {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px;
}
.cc-brand { font-size: 22px; letter-spacing: 0.08em; opacity: 0.9; }
.cc-number { font-size: 22px; letter-spacing: 0.12em; font-weight: 600; }
.cc-row { display: flex; justify-content: space-between; gap: 16px; }
.cc-meta { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; }
.cc-value { font-size: 16px; font-weight: 600; }
.cc-stripe { height: 36px; background: rgba(0, 0, 0, 0.5); margin: 14px -22px; }
.cc-cvc-strip { background: rgba(255,255,255,0.85); color: var(--charcoal); padding: 8px 14px; border-radius: 6px; font-family: 'Courier New'; font-weight: 700; text-align: right; letter-spacing: 0.2em; }

/* ----------------------------- Confirmation -------------------------- */
.ticket {
  width: 100%;
  background: white;
  border-radius: 18px;
  border: 3px dashed var(--blue);
  padding: 14px 16px;
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  animation: ticket-pop 0.7s var(--ease-spring);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute;
  width: 24px; height: 24px;
  background: linear-gradient(170deg, var(--sky-2), var(--sky-3));
  border-radius: 50%;
  top: 50%; transform: translateY(-50%);
}
.ticket::before { left: -12px; box-shadow: inset -3px 0 0 var(--blue); }
.ticket::after  { right: -12px; box-shadow: inset 3px 0 0 var(--blue); }
@keyframes ticket-pop {
  0%   { transform: translateY(40px) rotate(-4deg); opacity: 0; }
  60%  { transform: translateY(-8px) rotate(2deg); opacity: 1; }
  100% { transform: translateY(0) rotate(0); }
}
.ticket-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ticket-label { font-size: 10px; text-transform: uppercase; color: #7E8BAA; letter-spacing: 0.1em; font-weight: 700; flex: 0 0 auto; }
.ticket-value { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; color: var(--charcoal); text-align: right; }
.ticket-divider { border-top: 1.5px dotted var(--blue); margin: 2px 0; }

/* ----------------------------- Active parking ------------------------ */
.timer-ring {
  position: relative;
  width: 170px; height: 170px;
}
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.timer-ring .track { stroke: rgba(143, 178, 240, 0.22); }
.timer-ring .progress { stroke: url(#timerGrad); transition: stroke-dashoffset 1s linear; }
.timer-ring .timer-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.timer-time {
  font-family: 'Fredoka', sans-serif;
  font-size: 36px; font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.timer-label { font-size: 12px; color: #7E8BAA; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }

.scene-car {
  position: absolute;
  bottom: -40px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 50px;
}

/* ----------------------------- Piggy Bank ---------------------------- */
.piggy-coin-counter {
  font-family: 'Fredoka', sans-serif;
  font-size: 42px; font-weight: 700;
  color: var(--gold-deep);
  display: flex; align-items: center; gap: 8px;
  line-height: 1;
}
.piggy-coin-counter .coin-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), var(--gold-deep));
  border: 4px solid #BC9438;
  box-shadow: 0 6px 12px rgba(232, 185, 75, 0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  animation: coin-spin 3s linear infinite;
}
@keyframes coin-spin {
  0%, 100% { transform: rotateY(0); }
  50%      { transform: rotateY(180deg); }
}

.tier-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--charcoal);
  padding: 6px 14px;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 3px 6px rgba(232, 185, 75, 0.4);
  align-self: center;
  white-space: nowrap;
}

.rewards-head {
  width: 100%;
  display: flex; justify-content: space-around; align-items: center;
  gap: 14px;
}

.progress-wrap {
  width: 100%;
  display: flex; flex-direction: column; gap: 4px;
}
.progress-meta {
  font-size: 11px;
  color: #7E8BAA;
  text-align: center;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 16px;
  background: rgba(143, 178, 240, 0.25);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint-deep), var(--gold));
  border-radius: 10px;
  transition: width 0.8s var(--ease-spring);
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shine 2s linear infinite;
}
@keyframes shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ----------------------------- Coin shower --------------------------- */
.coin-fly {
  position: fixed;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), var(--gold-deep));
  border: 3px solid #BC9438;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(232, 185, 75, 0.5);
  animation: coin-fly 1.4s var(--ease-spring) forwards;
}
@keyframes coin-fly {
  0%   { transform: scale(0) rotate(0); opacity: 0; }
  15%  { transform: scale(1.3) rotate(180deg); opacity: 1; }
  /* Stay fully visible while traveling — only fade right at the end as the
     coin lands inside Parky's belly */
  85%  { transform: var(--final-transform, translate(0, 200px) scale(0.4)) rotate(720deg); opacity: 1; }
  100% { transform: var(--final-transform, translate(0, 200px) scale(0.3)) rotate(720deg); opacity: 0; }
}

/* Single coin drop animation for the 50-tap claim */
.coin-tap-drop {
  position: fixed;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), var(--gold-deep));
  border: 3px solid #BC9438;
  box-shadow: 0 4px 8px rgba(232, 185, 75, 0.55);
  z-index: 200;
  pointer-events: none;
  animation: coin-tap-drop 0.7s cubic-bezier(.34, .8, .64, 1) forwards;
}
@keyframes coin-tap-drop {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  70%  { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 1; }
  90%  { transform: translate(var(--dx), calc(var(--dy) + 6px)) rotate(var(--rot)) scale(0.9, 0.6); opacity: 0.8; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 4px)) rotate(var(--rot)) scale(0.4); opacity: 0; }
}
/* Tiny coin "splash" sparkle when a coin lands */
.coin-splash {
  position: fixed;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--gold-deep);
  z-index: 199;
  pointer-events: none;
  animation: coin-splash 0.45s ease-out forwards;
}
@keyframes coin-splash {
  0%   { transform: scale(0.2); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Tap-to-claim progress bar on rewards */
.tap-progress {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.tap-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(91, 141, 239, 0.15);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 2px rgba(58, 46, 57, 0.06) inset;
}
.tap-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 8px;
  transition: width 0.18s ease-out;
  box-shadow: 0 0 8px rgba(232, 185, 75, 0.6);
}
.tap-progress-meta {
  font-family: 'Fredoka', sans-serif;
  font-size: 12px; font-weight: 700;
  color: #5C6680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tap-progress-meta strong { color: var(--gold-deep); font-size: 14px; }

/* Make Parky on the rewards screen feel tappable */
.parky-mount.medium .parky.tappable {
  cursor: pointer;
  transition: transform 0.1s ease-out;
}
.parky-mount.medium .parky.tappable:active {
  transform: scale(0.94);
}

.coin-rain {
  position: absolute;
  top: -20px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), var(--gold-deep));
  border: 3px solid #BC9438;
  pointer-events: none;
  animation: coin-rain 2s var(--ease-out) forwards;
  z-index: 5;
}
@keyframes coin-rain {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ----------------------------- Confetti canvas ----------------------- */
#confetti-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* ----------------------------- Heart ---------------------------------- */
.heart-float {
  position: fixed;
  font-size: 26px;
  pointer-events: none;
  animation: heart-float 1.6s ease-out forwards;
  z-index: 90;
}
@keyframes heart-float {
  0%   { transform: translateY(0) scale(0.5); opacity: 0; }
  20%  { opacity: 1; transform: translateY(-30px) scale(1.2); }
  100% { transform: translateY(-160px) scale(0.6); opacity: 0; }
}

/* ----------------------------- Top bar / nav ------------------------- */
.topbar {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 4px 12px;
}
.icon-btn {
  appearance: none; border: none; background: white;
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 0 #C9D8EE, 0 8px 18px rgba(58, 46, 57, 0.08);
  transition: transform 0.1s, box-shadow 0.1s;
  color: var(--blue-deep);
}
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #C9D8EE, 0 4px 8px rgba(58, 46, 57, 0.1); }
.icon-btn.coins {
  width: auto; padding: 0 14px; gap: 6px;
  display: flex; align-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 16px;
  color: var(--gold-deep);
}

/* ----------------------------- Misc ---------------------------------- */
.row-info {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
}
.row-info .label { font-size: 13px; color: #7E8BAA; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.row-info .value { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 16px; color: var(--charcoal); }

.active-meta {
  width: 100%;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 12px;
}
.active-meta-line {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--charcoal);
}

.stat-row {
  width: 100%;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.6);
  border-radius: 14px;
  padding: 8px 0;
}
.stat {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-label {
  font-size: 11px; font-weight: 700;
  color: #7E8BAA;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-value {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--charcoal);
}
.stat-divider {
  width: 1px; height: 28px;
  background: rgba(91, 141, 239, 0.18);
}

.daily-row {
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, #FFF6E5 0%, #FFEFC9 100%);
  border: 1px solid rgba(232, 185, 75, 0.4);
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center;
}
.daily-main { font-size: 13px; font-weight: 600; color: var(--charcoal); line-height: 1.2; }
.daily-bonus { font-size: 11px; font-weight: 600; color: #8B6F1F; }
.tap-progress-fill.maxed {
  background: linear-gradient(90deg, var(--mint-deep), var(--gold-deep));
}

.zone-card {
  width: 100%;
  background: linear-gradient(135deg, var(--mint), var(--mint-deep));
  border-radius: 16px;
  padding: 11px 16px;
  color: var(--charcoal);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 6px 14px rgba(123, 205, 169, 0.4);
  animation: zone-flip 0.8s var(--ease-spring) both;
}
.zone-card .zone-info { display: flex; flex-direction: column; gap: 1px; }
.zone-card .zone-code { font-family: 'Fredoka', sans-serif; font-size: 18px; font-weight: 700; }
.zone-card .zone-name { font-size: 12px; opacity: 0.85; }
.zone-card .zone-icon { font-size: 24px; }
@keyframes zone-flip {
  0%   { transform: perspective(800px) rotateY(-90deg) scale(0.8); opacity: 0; }
  60%  { transform: perspective(800px) rotateY(20deg) scale(1.02); opacity: 1; }
  100% { transform: perspective(800px) rotateY(0) scale(1); }
}

/* ----------------------------- Modal --------------------------------- */
.modal-layer {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(58, 46, 57, 0.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
  padding: 20px;
}
.modal-layer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  transform: scale(0.6) translateY(20px);
  opacity: 0;
  transition: transform 0.4s var(--ease-spring), opacity 0.25s ease;
  border: 3px solid var(--blue);
}
.modal-layer.open .modal { transform: scale(1) translateY(0); opacity: 1; }
.modal-emoji { font-size: 56px; animation: parky-bob 2.4s ease-in-out infinite; }
.modal-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px; color: var(--charcoal); text-align: center; }
.modal-body { font-size: 15px; color: #5C6680; text-align: center; line-height: 1.45; }

.addtime-body {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%;
  text-align: center;
}
.addtime-summary {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(180deg, #F4F8FF 0%, #E5F0FF 100%);
  border: 1px solid rgba(91,141,239,0.15);
  border-radius: 14px;
  padding: 10px 14px;
}
.addtime-amount {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px; font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}
.addtime-meta { font-size: 12px; color: #5C6680; font-weight: 600; }
.addtime-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.addtime-presets .preset {
  width: 100%;
  font-size: 14px;
  padding: 9px 6px;
}
.addtime-method {
  font-size: 12px;
  color: #5C6680;
  font-family: 'Fredoka', sans-serif;
}

/* ----------------------------- Wizard step --------------------------- */
.wizard-step {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  animation: wizard-slide 0.5s var(--ease-spring) both;
}
@keyframes wizard-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard-pill {
  background: white;
  border-radius: 18px;
  padding: 5px 12px 5px 6px;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Fredoka', sans-serif;
  box-shadow: 0 3px 10px rgba(91, 141, 239, 0.16), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(91, 141, 239, 0.15);
}
.wizard-pill-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 3px 6px rgba(91, 141, 239, 0.45);
  animation: wizard-icon-pulse 2.2s ease-in-out infinite;
}
@keyframes wizard-icon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 8px rgba(91, 141, 239, 0.45); }
  50%      { transform: scale(1.06); box-shadow: 0 6px 14px rgba(91, 141, 239, 0.65); }
}
.wizard-pill-text { display: flex; flex-direction: column; gap: 1px; padding-right: 4px; }
.wizard-pill-meta {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #7E8BAA;
  line-height: 1;
}
.wizard-pill-label { font-size: 14px; font-weight: 600; color: var(--charcoal); line-height: 1.15; }
.wizard-progress {
  height: 6px;
  width: 100%;
  max-width: 280px;
  background: rgba(143, 178, 240, 0.22);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(58, 46, 57, 0.05) inset;
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint-deep), var(--pink), var(--gold));
  border-radius: 4px;
  transition: width 0.7s var(--ease-spring);
  position: relative;
  overflow: hidden;
}
.wizard-progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shine 2.4s linear infinite;
}

/* Old stepper styles kept for backward compat (no longer used) */
.stepper { display: none; }

/* ----------------------------- Total / payment ----------------------- */
.total-row {
  width: 100%;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 9px 14px;
  background: linear-gradient(180deg, #F4F8FF 0%, #E5F0FF 100%);
  border-radius: 14px;
  border: 1px solid rgba(91, 141, 239, 0.15);
}
.total-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 12px; font-weight: 700;
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.total-amount {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.pay-tabs {
  display: flex; gap: 4px; width: 100%;
  background: rgba(91, 141, 239, 0.1);
  padding: 3px;
  border-radius: 14px;
}
.pay-tab {
  appearance: none; border: none; cursor: pointer;
  flex: 1;
  padding: 8px 4px;
  background: transparent;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #5C6680;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.2s ease;
  min-width: 0;
}
.pay-tab.active {
  background: white;
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(91, 141, 239, 0.18), 0 1px 0 rgba(255,255,255,0.9) inset;
}
.pay-tab-glyph { font-size: 14px; }
.pay-tab-glyph-apple { font-family: -apple-system, sans-serif; font-size: 15px; line-height: 1; }
.pay-tab-glyph-google {
  font-family: 'Roboto', 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 25%, #EA4335 50%, #FBBC04 75%, #34A853 100%);
  color: white;
  letter-spacing: -0.05em;
}

.pay-sheet-wrap {
  width: 100%;
  display: flex; flex-direction: column;
}
.pay-sheet {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 8px;
  animation: sheet-in 0.4s var(--ease-out) both;
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pay-sheet-foot {
  font-size: 12px;
  color: #7E8BAA;
  text-align: center;
}

.ap-rows {
  background: white;
  border-radius: 16px;
  padding: 4px 16px;
  border: 1px solid #E1E8F5;
}
.ap-row {
  padding: 7px 0;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #EFF2F8;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
}
.ap-row:last-child { border-bottom: none; }
.ap-row-label { font-size: 13px; color: #5C6680; font-weight: 500; }
.ap-row-value { font-size: 14px; color: var(--ink); font-weight: 600; }

/* Apple Pay button */
.btn-apple-pay {
  appearance: none; border: none; cursor: pointer;
  background: #000;
  color: white;
  border-radius: 14px;
  height: 48px;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform 0.1s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-apple-pay svg { width: 22px; height: 26px; }
.btn-apple-pay:active { transform: scale(0.98); }
.btn-apple-pay:disabled { opacity: 0.85; cursor: default; }
.btn-apple-pay.authenticating { font-size: 16px; letter-spacing: 0; }

/* Google Pay button */
.btn-google-pay {
  appearance: none; border: none; cursor: pointer;
  background: #000;
  color: white;
  border-radius: 14px;
  height: 48px;
  width: 100%;
  font-family: 'Roboto', 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.1s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-google-pay .gpay-logo {
  width: 24px; height: 24px;
  background: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px;
}
.btn-google-pay .gpay-logo svg { width: 100%; height: 100%; }
.btn-google-pay:active { transform: scale(0.98); }
.btn-google-pay:disabled { opacity: 0.85; cursor: default; }
.btn-google-pay.authenticating { font-size: 16px; }

/* Field row for exp+cvc — uses gap with min-width:0 children */
.field-row {
  display: flex; gap: 12px; width: 100%;
}
.field-row .field { flex: 1 1 0; }

/* SSO buttons */
.sso-row {
  display: flex; flex-direction: column;
  gap: 10px;
  width: 100%;
}
.sso-divider {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  margin: 4px 0;
}
.sso-divider::before, .sso-divider::after {
  content: ""; flex: 1; height: 1px;
  background: rgba(91, 141, 239, 0.2);
}
.sso-divider span {
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  color: #7E8BAA;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.sso-btn {
  appearance: none; border: none; cursor: pointer;
  height: 46px;
  width: 100%;
  border-radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.1s, box-shadow 0.15s;
}
.sso-apple {
  background: #000; color: white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.22);
}
.sso-apple:active { transform: scale(0.98); }
.sso-apple svg { width: 18px; height: 22px; color: white; }
.sso-google {
  background: white;
  color: #1F1F1F;
  border: 1px solid #DADCE0;
  font-family: 'Roboto', 'Inter', system-ui, sans-serif;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(60,64,67,0.1);
}
.sso-google:hover { box-shadow: 0 2px 6px rgba(60,64,67,0.15); }
.sso-google:active { transform: scale(0.98); }
.sso-google svg { width: 20px; height: 20px; }

/* ----------------------------- License plate ------------------------ */
.plate-visual {
  width: 100%;
  background: white;
  border-radius: 10px;
  padding: 6px 14px 8px;
  border: 3px solid #2A2A2A;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-spring);
}
.plate-visual.theme-US {
  background: linear-gradient(180deg, #fff 0%, #F0F0F0 100%);
}
.plate-visual.theme-CA {
  background: linear-gradient(180deg, #fff 0%, #F4F8FF 100%);
}
.plate-visual.theme-UK-rear {
  background: linear-gradient(180deg, #FFD837 0%, #F2C400 100%);
}
.plate-visual.theme-MX {
  background: linear-gradient(180deg, #fff 0%, #FFF8F0 100%);
}
.plate-visual.theme-AU {
  background: linear-gradient(180deg, #fff 0%, #FFF6E5 100%);
}
.plate-visual .plate-region {
  font-family: 'Fredoka', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #2A2A2A;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}
.plate-visual .plate-number {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  color: #1A1A1A;
  line-height: 1;
  padding: 2px 0;
  min-height: 24px;
}
.plate-visual .plate-number .placeholder { color: #C8C8C8; }
.plate-visual .plate-flag {
  position: absolute;
  top: 5px; right: 10px;
  font-size: 14px;
}
.plate-visual .plate-bottom { display: none; }
.plate-visual.bump { animation: zone-bump 0.4s var(--ease-spring); }

.country-row {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}
.country-pill {
  appearance: none; border: 2px solid #DCE7FA;
  background: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 14px;
  color: var(--charcoal);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 0.2s;
}
.country-pill:hover { background: var(--blush); transform: translateY(-2px); }
.country-pill.active {
  background: var(--blue-deep); color: white; border-color: var(--blue-deep);
  box-shadow: 0 4px 10px rgba(91, 141, 239, 0.4);
}
.country-pill .flag { font-size: 18px; }

.field select {
  appearance: none;
  border: 2px solid #DCE7FA;
  background: white;
  border-radius: 14px;
  padding: 11px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal);
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23F590A8' d='M3 5l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 38px;
}
.field select:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(143, 178, 240, 0.3);
}

/* ----------------------------- Hints --------------------------------- */
.hint {
  display: inline-flex;
  align-items: center; gap: 6px;
  background: linear-gradient(180deg, rgba(255, 213, 107, 0.5), rgba(255, 213, 107, 0.25));
  border: 2px dashed var(--gold-deep);
  color: #8B6F1F;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 13px;
  padding: 6px 14px;
  border-radius: 14px;
  animation: hint-bob 2.6s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ----------------------------- Store --------------------------------- */
.store-card { gap: 10px; padding-bottom: 14px; }

.store-tabs {
  display: flex;
  width: 100%;
  gap: 4px;
  background: rgba(91, 141, 239, 0.08);
  padding: 4px;
  border-radius: 14px;
}
.store-tab {
  appearance: none; border: none; background: transparent;
  flex: 1;
  padding: 7px 4px;
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #5C6680;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.18s ease;
  min-width: 0;
}
.store-tab.active {
  background: white;
  color: var(--charcoal);
  box-shadow: 0 2px 6px rgba(91, 141, 239, 0.18);
}
.store-tab-icon { font-size: 14px; }

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}
.store-grid.wheel-mode {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 4px 0;
}

.store-tile {
  background: white;
  border-radius: 14px;
  padding: 12px 10px 10px;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  text-align: center;
  border: 1px solid rgba(91, 141, 239, 0.12);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(91, 141, 239, 0.18); }
.store-tile-icon {
  font-size: 28px;
  height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.store-tile-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.2;
}
.store-tile-desc {
  font-size: 10px;
  color: #7E8BAA;
  line-height: 1.25;
}
.store-tile-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--mint-deep);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.04em;
}
.store-tile-footer { width: 100%; margin-top: auto; padding-top: 6px; }
.store-tile-btn {
  appearance: none; border: none; cursor: pointer;
  width: 100%;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: white;
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 0.02em;
}
.store-tile-btn.equip { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); color: var(--charcoal); }
.store-tile-btn.equipped { background: #E8EFFA; color: var(--blue-deep); cursor: default; }
.store-tile-btn:active:not(:disabled) { transform: translateY(1px); }

.store-inventory-row {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  color: #5C6680;
  text-align: center;
}
.store-inv-meta strong { color: var(--gold-deep); font-size: 14px; }

/* Piggy Wheel */
.wheel-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
}
.wheel {
  position: relative;
  width: 220px; height: 220px;
}
.wheel-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 8px 16px rgba(91, 141, 239, 0.25));
}
.wheel-pointer {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: var(--pink-deep);
  text-shadow: 0 2px 0 white, 0 0 8px rgba(245, 144, 168, 0.5);
  z-index: 2;
}
.wheel-cost {
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  color: #5C6680;
}
.wheel-cost strong { color: var(--gold-deep); font-size: 15px; }

/* Voucher chip on payment */
.voucher-row {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%;
}
.voucher-chip {
  appearance: none; border: 2px solid var(--mint-deep);
  background: linear-gradient(180deg, #ECFAF3, #D5F2E5);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  text-align: left;
  font-size: 12px;
  color: var(--charcoal);
  transition: transform 0.1s;
}
.voucher-chip:hover { transform: translateY(-1px); }
.voucher-chip.applied {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, #FFF6E5, #FFE9B5);
  box-shadow: 0 0 0 3px rgba(255, 213, 107, 0.35);
}
.voucher-chip-emoji { font-size: 18px; }
.voucher-chip-text { flex: 1; line-height: 1.25; }
.voucher-chip-text strong { font-weight: 700; color: var(--mint-deep); }
.voucher-chip.applied .voucher-chip-text strong { color: var(--gold-deep); }
.voucher-chip-status { font-size: 11px; font-weight: 700; color: var(--gold-deep); letter-spacing: 0.06em; text-transform: uppercase; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
}

/* Tiny screens */
@media (max-height: 700px) {
  .parky { width: 160px; height: 160px; }
  .splash-letters { font-size: 48px; }
  .timer-ring { width: 200px; height: 200px; }
  .timer-time { font-size: 36px; }
}
@media (max-height: 600px) {
  .parky { width: 130px; height: 130px; }
  .splash-letters { font-size: 40px; }
}
@media (max-width: 380px) {
  .stepper .label { font-size: 9px; }
  .stepper .dot { width: 28px; height: 28px; font-size: 12px; }
  .stepper-line { top: 17px; }
  .country-pill { padding: 6px 10px; font-size: 13px; }
}
