@font-face { font-family: AlanSans; src: url('/assets/AlanSans-variable.woff2') format('woff2'); font-display: swap; }

:root {
  --cream: #fffcf5;
  --ink: #282830;
  --copy: #464754;
  --muted: #656779;
  --blue: #2855c7;
  --indigo: #2f33a8;
  --violet: #5c59f3;
  --lavender: #8c99fa;
  --teal-50: #ebfaf9;
  --teal: #2aa79c;
  --line: #dbe2f4;
  --green-50: #ecf7e9;
}

* { box-sizing: border-box; }
html { background: #eef2fb; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: #eef2fb; font-family: AlanSans, Arial, sans-serif; }
button, input, a { font: inherit; }
button { border: 0; cursor: pointer; }
h1, p { margin: 0; }
h1 { font-size: clamp(30px, 8.3vw, 39px); line-height: .99; letter-spacing: -1.8px; font-weight: 760; }

.screen { position: relative; isolation: isolate; width: min(100%, 430px); min-height: 100svh; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); overflow: hidden; display: flex; flex-direction: column; background: var(--cream); }
.topbar { position: relative; z-index: 10; min-height: 36px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-size: 29px; line-height: 1; font-weight: 820; letter-spacing: -1.8px; color: var(--indigo); }
.top-meta, .eyeline { color: var(--muted); font-size: 13px; font-weight: 650; }
.content-block { position: relative; z-index: 4; }
.content-block > p { margin-top: 14px; color: var(--copy); font-size: 17px; line-height: 1.35; }
.bottom-action { position: relative; z-index: 20; margin-top: auto; padding-top: 16px; display: grid; gap: 9px; }
.button { width: 100%; min-height: 54px; padding: 0 18px; border-radius: 18px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 17px; font-weight: 720; letter-spacing: -.25px; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 10px 24px rgba(40, 85, 199, .22); }
.button.secondary { color: var(--indigo); background: var(--teal-50); box-shadow: inset 0 0 0 1px rgba(47, 51, 168, .08); }
.text-button { min-height: 36px; color: var(--indigo); background: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; font-weight: 650; }
.demo-flag { color: var(--muted); text-align: center; font-size: 12px; }

.splash-screen { padding: 0; background: #fff3e4; }
.native-splash { position: absolute; inset: 0; width: 100%; background: transparent; display: grid; place-items: center; }
.koala-face { position: relative; display: block; width: 114px; height: 78px; transform: scale(.72); }
.koala-face i, .koala-face b { position: absolute; top: 12px; width: 32px; height: 32px; border-radius: 52% 52% 58% 45%; background: #25262e; }
.koala-face i { left: 0; transform: rotate(18deg); }
.koala-face b { right: 0; transform: rotate(-18deg); }
.koala-face em { position: absolute; left: 34px; top: 5px; width: 48px; height: 43px; border-radius: 48% 48% 52% 52%; background: #25262e; }
.koala-face strong { position: absolute; left: 38px; top: 55px; width: 43px; height: 18px; border-radius: 0 0 28px 28px; background: #25262e; }

.email-screen { background: linear-gradient(165deg, var(--cream) 0%, #fff3e4 62%, var(--teal-50) 100%); }
.email-art { position: relative; height: 315px; margin: 8px -16px 10px; }
.email-art img { position: absolute; z-index: 2; width: 280px; right: -18px; bottom: -18px; }
.route-line { position: absolute; z-index: 1; width: 260px; height: 120px; left: -55px; bottom: 55px; border: 7px solid var(--blue); border-left: 0; border-bottom: 0; border-radius: 0 90px 0 0; transform: rotate(-12deg); }
.berry { position: absolute; z-index: 4; width: 35px; height: 35px; border-radius: 50%; background: radial-gradient(circle at 32% 25%, #d6dbff 0 8%, var(--lavender) 16%, var(--violet) 52%, var(--indigo) 100%); box-shadow: 0 0 0 4px rgba(255,252,245,.92); }
.berry::before, .berry::after { content: ''; position: absolute; width: 23px; height: 23px; border-radius: 50%; background: inherit; box-shadow: 0 0 0 4px rgba(255,252,245,.92); }
.berry::before { left: -17px; top: 13px; }
.berry::after { right: -14px; top: 11px; }
.berry-a { left: 65px; bottom: 70px; transform: scale(.72); }
.email-form { margin-top: 22px; display: grid; gap: 9px; }
.email-form label { color: var(--copy); font-size: 14px; font-weight: 650; }
.email-form input { width: 100%; height: 55px; padding: 0 15px; border: 1px solid #cdd5e7; border-radius: 14px; outline: none; color: var(--ink); background: white; font-size: 17px; }
.email-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,85,199,.12); }
.fine-print { margin-top: 10px !important; color: var(--muted) !important; font-size: 12px !important; }

.choose-screen { background: linear-gradient(155deg, var(--cream), #fff4e7 60%, var(--teal-50)); }
.choose-copy { margin-top: 42px; max-width: 370px; }
.activation-list { position: relative; z-index: 5; margin-top: 26px; display: grid; gap: 12px; }
.activation-option { min-height: 142px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; text-align: left; color: var(--ink); background: rgba(255,255,255,.84); box-shadow: 0 8px 30px rgba(47,51,168,.07); }
.activation-option.featured { color: white; border-color: transparent; background: var(--blue); }
.activation-option .option-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; }
.activation-option.featured .option-top, .activation-option.featured small { color: rgba(255,255,255,.75); }
.activation-option strong { display: block; margin-top: 13px; font-size: 22px; line-height: 1.05; letter-spacing: -.7px; }
.activation-option small { display: block; margin-top: 6px; color: var(--copy); font-size: 14px; }
.mini-progress { display: flex; align-items: center; margin-top: 13px; }
.mini-progress i { width: 12px; height: 12px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(140,153,250,.28); }
.featured .mini-progress i { background: white; box-shadow: 0 0 0 3px rgba(255,255,255,.22); }
.mini-progress b { width: 42px; height: 2px; background: var(--lavender); }
.choice-art { position: absolute; width: 180px; height: 180px; right: -48px; bottom: -45px; opacity: .24; }
.choice-art img { width: 100%; }

.progress-hud { position: relative; z-index: 12; margin-top: 17px; min-height: 49px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.82); backdrop-filter: blur(10px); }
.progress-hud > span { color: var(--copy); font-size: 14px; font-weight: 650; }
.progress-hud > div { display: flex; gap: 10px; }
.progress-hud i { position: relative; width: 21px; height: 21px; border: 2px solid var(--lavender); border-radius: 50%; }
.progress-hud i::after { content: ''; position: absolute; width: 8px; height: 8px; right: -4px; bottom: -4px; border-radius: 50%; background: white; }
.progress-hud i.done { border: 0; background: radial-gradient(circle at 32% 25%, #d6dbff 0 10%, var(--lavender) 17%, var(--violet) 55%, var(--indigo)); box-shadow: 0 3px 7px rgba(47,51,168,.3); }

.clue-screen { background: linear-gradient(160deg, var(--cream), #fff6ec 48%, var(--teal-50)); }
.clue-stage { position: relative; height: 270px; margin: 7px -16px 2px; overflow: hidden; }
.clue-stage img { position: absolute; z-index: 3; width: 225px; right: -8px; bottom: -23px; }
.route-clue { bottom: 37px; }
.berry-clue { left: 92px; bottom: 52px; transform: scale(.7); }
.pixel-invader { position: absolute; z-index: 5; left: 50px; top: 48px; color: var(--blue); font-size: 52px; transform: rotate(-4deg); }
.clue-copy h1 { margin-top: 8px; font-size: clamp(27px, 7.4vw, 34px); line-height: 1.04; }
.clue-copy .place { color: var(--blue); font-size: 15px; font-weight: 680; }

.drawer-backdrop { position: absolute; z-index: 20; inset: 0; background: rgba(22,28,52,.26); backdrop-filter: blur(1.5px); animation: scrim-in 180ms ease-out; }
.drawer { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; text-align: center; background: var(--blue); color: white; box-shadow: 0 -18px 60px rgba(40,40,48,.2); animation: slide-up 280ms cubic-bezier(.2,.75,.25,1); }
.drawer-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: rgba(255,255,255,.42); }
.location-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 30px; }
.drawer h1 { font-size: 30px; }
.drawer p { margin: 12px auto 20px; max-width: 340px; color: rgba(255,255,255,.82); font-size: 16px; line-height: 1.35; }
.drawer .primary { color: var(--blue); background: white; box-shadow: none; }
.drawer .text-button { margin-top: 5px; color: white; }

.checking-screen { background: var(--teal-50); }
.checking-stage { position: relative; flex: 1; min-height: 350px; }
.checking-stage img { position: absolute; z-index: 3; width: 285px; right: 8px; bottom: 10px; }
.location-rings { position: absolute; width: 210px; height: 210px; left: 28px; bottom: 68px; border: 2px solid rgba(42,167,156,.28); border-radius: 50%; box-shadow: 0 0 0 28px rgba(42,167,156,.1), 0 0 0 62px rgba(42,167,156,.055); animation: pulse 1.5s ease-out infinite; }
.location-rings span { position: absolute; width: 43px; height: 43px; left: 83px; top: 83px; border-radius: 50% 50% 50% 0; background: var(--blue); transform: rotate(-45deg); }
.location-rings span::after { content: ''; position: absolute; width: 13px; height: 13px; left: 15px; top: 15px; border-radius: 50%; background: white; }
.checking-copy { margin-bottom: 8px; }
.checking-copy p { min-height: 55px; }
.checking-copy strong { color: var(--indigo); }

.found-screen { background: linear-gradient(160deg, var(--cream), var(--green-50)); }
.reward-stage { position: relative; flex: 1; min-height: 315px; }
.reward-stage img { position: absolute; z-index: 3; width: 278px; right: 12px; bottom: -4px; }
.reward-halo { position: absolute; width: 210px; height: 210px; left: 8px; top: 58px; border-radius: 50%; background: radial-gradient(circle, rgba(140,153,250,.28), transparent 66%); }
.berry-reward { width: 58px; height: 58px; left: 65px; top: 125px; animation: berry-pop 500ms cubic-bezier(.18,.9,.28,1.35); }
.berry-reward::before, .berry-reward::after { width: 37px; height: 37px; }
.berry-reward::before { left: -27px; top: 20px; }
.berry-reward::after { right: -23px; top: 18px; }
.reward-copy h1, .complete-copy h1 { margin-top: 8px; }
.found-screen .progress-hud, .complete-screen .progress-hud { margin-top: 15px; }

.complete-screen { background: linear-gradient(155deg, var(--cream), #fff3e5 55%, var(--teal-50)); }
.complete-stage { position: relative; flex: 1; min-height: 305px; }
.complete-stage img { position: absolute; z-index: 3; width: 330px; right: -44px; bottom: -38px; }
.route-complete { bottom: 70px; }
.complete-berry { bottom: 105px; transform: scale(.62); }
.complete-stage .berry-0 { left: 55px; }
.complete-stage .berry-1 { left: 143px; bottom: 62px; }

.journey-progress { position: relative; z-index: 12; margin-top: 17px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; }
.journey-progress .step-node { padding: 0; display: grid; justify-items: center; gap: 5px; min-width: 74px; color: var(--muted); background: transparent; }
.journey-progress .step-node i { width: 30px; height: 30px; border: 2px solid var(--lavender); border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); font-style: normal; font-size: 13px; font-weight: 750; }
.journey-progress .step-node b { font-size: 11px; font-weight: 650; }
.journey-progress .step-node.done { color: var(--indigo); }
.journey-progress .step-node.done i { border-color: var(--violet); color: white; background: var(--violet); box-shadow: 0 4px 10px rgba(92,89,243,.24); }
.journey-progress em { height: 3px; margin-top: 14px; border-radius: 99px; background: #d8def0; overflow: hidden; }
.journey-progress em::after { content: ""; display: block; width: 0; height: 100%; background: var(--violet); transition: width 450ms ease; }
.journey-progress em.drawn::after { width: 100%; }

.arrival-screen { background: linear-gradient(160deg, var(--cream), #fff3e4 62%, var(--teal-50)); }
.arrival-photo { position: relative; height: 238px; margin: 10px 0 4px; border-radius: 22px; overflow: hidden; background: #dce8f4; box-shadow: 0 14px 32px rgba(29,37,74,.16); }
.arrival-photo > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.arrival-photo-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(10,14,36,.72)); }
.arrival-photo figcaption { position: absolute; z-index: 2; left: 16px; bottom: 16px; display: grid; grid-template-columns: 27px auto; grid-template-rows: auto auto; column-gap: 9px; color: white; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.arrival-photo figcaption strong { align-self: end; font-size: 16px; line-height: 1.1; }
.arrival-photo figcaption small { grid-column: 2; color: rgba(255,255,255,.78); font-size: 11px; }
.photo-pin { grid-row: 1 / 3; align-self: center; width: 24px; height: 24px; border: 6px solid white; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.photo-pin::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }
.arrival-photo > a { position: absolute; z-index: 2; right: 10px; bottom: 8px; color: rgba(255,255,255,.58); font-size: 8px; text-decoration: none; }
.arrival-copy h1 { margin-top: 8px; font-size: clamp(29px, 7.8vw, 36px); }
.continuity-note { position: relative; z-index: 5; margin-top: 15px; padding: 11px 12px; border-radius: 13px; display: flex; align-items: center; gap: 9px; color: var(--copy); background: rgba(255,255,255,.72); font-size: 13px; font-weight: 600; }
.instagram-dot { width: 17px; height: 17px; flex: 0 0 auto; border-radius: 5px; background: radial-gradient(circle at 68% 68%, #ffdc80 0 14%, #fcaf45 16% 29%, #f77737 31% 43%, #e1306c 45% 60%, #c13584 62% 74%, #833ab4 76%); }

.optional-email { position: relative; z-index: 16; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 12px 28px rgba(40,40,48,.08); }
.email-heading { display: flex; align-items: center; justify-content: space-between; }
.email-heading strong { font-size: 15px; }
.email-heading button { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); background: #f1f4fa; font-size: 20px; }
.optional-email label { display: block; margin-top: 9px; color: var(--copy); font-size: 12px; font-weight: 650; }
.email-row { margin-top: 5px; display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.email-row input { min-width: 0; height: 46px; padding: 0 12px; border: 1px solid #cdd5e7; border-radius: 12px; outline: none; color: var(--ink); background: white; font-size: 15px; }
.email-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,85,199,.1); }
.email-row input[aria-invalid="true"] { border-color: #d9485f; background: #fff6f7; }
.email-row button { min-width: 86px; padding: 0 13px; border-radius: 12px; color: white; background: var(--blue); font-size: 14px; font-weight: 700; }
.optional-email > small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.email-error { min-height: 0; margin-top: 6px; color: #b3263d; font-size: 12px; font-weight: 600; }
.email-error:not(:empty) { min-height: 16px; }
.email-saved { position: relative; z-index: 12; margin-top: 12px; padding: 12px 14px; border: 1px solid #b9dec1; border-radius: 14px; display: flex; align-items: center; gap: 10px; background: var(--green-50); }
.email-saved > span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: white; background: #367940; font-weight: 800; }
.email-saved div { display: grid; gap: 2px; }
.email-saved strong { font-size: 14px; }
.email-saved small { color: var(--muted); font-size: 12px; }

.first-success-screen { background: linear-gradient(160deg, var(--cream), var(--green-50)); }
.route-unlock { position: relative; height: 278px; margin: 8px -16px 0; }
.route-unlock img { position: absolute; z-index: 2; width: 225px; right: -5px; bottom: -12px; }
.unlock-line { position: absolute; z-index: 1; left: 55px; right: 80px; top: 142px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--blue)); transform: rotate(-8deg) scaleX(0); transform-origin: left; animation: route-draw 520ms 180ms ease-out forwards; }
.unlock-point { position: absolute; z-index: 4; display: grid; justify-items: center; gap: 5px; color: var(--indigo); }
.unlock-point i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--violet); box-shadow: 0 0 0 7px rgba(92,89,243,.13); font-style: normal; font-weight: 800; }
.unlock-point b { font-size: 12px; }
.unlock-point.done { left: 40px; top: 108px; }
.unlock-point.next { right: 62px; top: 72px; animation: point-reveal 420ms 580ms ease-out both; }
.unlock-point.next i { background: var(--blue); }
.first-success-copy { margin-top: clamp(64px, 15svh, 140px); }
.first-success-copy h1 { margin-top: 8px; }
.destination-reveal { margin-top: 16px; padding: 13px 14px; border-radius: 15px; display: grid; gap: 3px; color: white; background: var(--blue); box-shadow: 0 10px 22px rgba(40,85,199,.18); }
.destination-reveal span { color: rgba(255,255,255,.72); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.destination-reveal strong { font-size: 21px; line-height: 1.1; }
.destination-reveal small { color: rgba(255,255,255,.78); font-size: 12px; }
.instagram-unlock { gap: 7px; }
.unlock-code { width: fit-content; padding: 7px 12px; border: 1px dashed rgba(255,255,255,.7); border-radius: 10px; color: var(--blue); background: white; font-size: 22px; font-weight: 850; letter-spacing: .08em; }

.second-screen { background: linear-gradient(160deg, var(--cream), #edf7f7); }
.second-stage { position: relative; height: 290px; margin: 5px -16px 0; overflow: hidden; }
.second-stage img { position: absolute; z-index: 5; width: 218px; right: -18px; bottom: -20px; }
.canal { position: absolute; inset: 135px -40px -80px 95px; border-radius: 55% 0 0 0; background: linear-gradient(145deg, #a9dcda, #dff4f2); transform: rotate(-9deg); }
.route-second { left: -60px; bottom: 58px; width: 285px; transform: rotate(-10deg); }
.alan-building { position: absolute; z-index: 4; left: 46px; top: 38px; width: 132px; height: 118px; padding: 13px; border-radius: 4px 4px 0 0; display: flex; flex-direction: column; justify-content: space-between; color: var(--indigo); background: #f4e4d1; box-shadow: inset 0 -18px rgba(214,188,157,.35), 0 10px 22px rgba(40,40,48,.09); }
.alan-building::before, .alan-building::after { content: ""; position: absolute; top: 43px; width: 25px; height: 34px; background: #91b9c4; box-shadow: inset 0 0 0 4px #e6d2ba; }
.alan-building::before { left: 17px; }
.alan-building::after { right: 17px; }
.alan-building span { font-size: 12px; font-weight: 700; }
.alan-building strong { align-self: center; margin-bottom: 5px; font-size: 20px; letter-spacing: -1px; }
.second-copy h1 { margin-top: 8px; }
.second-copy strong { color: var(--indigo); }

.complete-screen .complete-stage { min-height: 260px; }
.voucher { position: relative; z-index: 10; margin-top: 13px; padding: 15px; border: 1px solid rgba(47,51,168,.22); border-radius: 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: 0 10px 26px rgba(47,51,168,.1); }
.voucher div { display: grid; gap: 3px; }
.voucher span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.voucher strong { color: var(--indigo); font-size: 19px; }
.voucher > b { align-self: center; padding: 9px 10px; border: 1px dashed var(--lavender); border-radius: 9px; color: var(--indigo); background: #f2f1ff; font-size: 13px; }
.voucher small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }

@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { transform: scale(.93); opacity: .55; } 72% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1.1); opacity: .25; } }
@keyframes berry-pop { 0% { transform: scale(.25); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes route-draw { to { transform: rotate(-8deg) scaleX(1); } }
@keyframes point-reveal { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (min-width: 700px) {
  body { padding: 20px; }
  .screen { min-height: calc(100svh - 40px); border-radius: 30px; box-shadow: 0 28px 80px rgba(40,40,48,.16); }
  .drawer { border-radius: 28px; bottom: 20px; left: 20px; right: 20px; }
}

@media (max-height: 720px) {
  .splash-visual { height: 45svh; }
  .email-art, .clue-stage { height: 220px; }
  .checking-stage, .reward-stage, .complete-stage { min-height: 235px; }
  .arrival-photo, .second-stage, .route-unlock { height: 205px; }
  .arrival-copy h1, .first-success-copy h1, .second-copy h1, .complete-copy h1 { font-size: 28px; }
  .continuity-note { margin-top: 9px; }
  .voucher { padding: 11px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
