@font-face {
  font-family: "Reenie Beanie";
  src: url("../assets/fonts/ReenieBeanie.ttf") format("truetype");
  font-display: swap;
}

:root {
  --pink: #f34fa2;
  --orange: #ff6a13;
  --aqua: #bfeeed;
  --ink: #171719;
  --paper: #f7f1e7;
  --white: #fffdf8;
  --line: rgba(23, 23, 25, .22);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--pink); color: var(--ink); font-family: var(--mono); }
button, textarea, input { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.opening-splash { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; padding: 6vh 7vw; border: 0; background: var(--pink); color: var(--ink); cursor: pointer; transform-origin: 50% 5%; transition: transform 800ms var(--ease), opacity 650ms ease, clip-path 800ms var(--ease); }
.opening-splash::before { content: ""; position: absolute; inset: 18px; border: 2px solid var(--ink); pointer-events: none; }
.opening-brands { position: absolute; left: 7vw; top: 7vh; display: flex; align-items: center; gap: 24px; }
.opening-brands img:first-child { width: clamp(86px, 8vw, 148px); }
.opening-brands img:last-child { width: clamp(100px, 9vw, 168px); mix-blend-mode: multiply; }
.opening-brands span { width: 1px; height: 70px; background: var(--ink); opacity: .48; }
.opening-title { text-align: center; animation: opening-in 700ms var(--ease) both; }
.opening-title p { margin: 0 0 17px; font-size: clamp(12px, 1vw, 18px); font-weight: 700; letter-spacing: .18em; }
.opening-title h1 { margin: 0; font-size: clamp(82px, 11vw, 210px); line-height: .82; letter-spacing: -.1em; }
.opening-title small { display: inline-block; margin-top: 34px; padding: 10px 14px; border: 2px solid var(--ink); background: var(--orange); font-size: clamp(10px, .8vw, 15px); font-weight: 700; letter-spacing: .1em; }
.opening-splash.is-leaving { clip-path: inset(0 0 89% 0); transform: scale(.96); opacity: 0; pointer-events: none; }
@keyframes opening-in { from { opacity: 0; transform: translateY(32px) scale(.94); } to { opacity: 1; transform: none; } }

.tv-page { height: 100vh; height: 100dvh; overflow: hidden; }
.tv-shell { display: grid; grid-template-rows: clamp(90px, 10vh, 118px) minmax(0, 1fr); width: 100%; height: 100%; overflow: hidden; }
.tv-header { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 24px; padding: 12px clamp(24px, 2.8vw, 54px); border-bottom: 2px solid var(--ink); background: var(--pink); }
.brand-lockup { display: flex; align-items: center; gap: 17px; }
.brand-lockup img:first-child { width: clamp(56px, 4.4vw, 82px); }
.brand-lockup img:last-child { width: clamp(66px, 5.5vw, 102px); }
.brand-lockup span { width: 1px; height: 48px; background: var(--ink); opacity: .45; }
.tv-title { text-align: center; }
.tv-title p { margin: 0 0 4px; font-size: clamp(9px, .66vw, 13px); font-weight: 700; letter-spacing: .14em; }
.tv-title h1 { margin: 0; font-size: clamp(29px, 2.7vw, 52px); line-height: .9; letter-spacing: -.075em; }
.outline-button { justify-self: end; min-height: 50px; padding: 0 18px; border: 1.5px solid var(--ink); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.outline-button:hover { background: var(--paper); }

.gallery-screen { min-height: 0; display: grid; grid-template-columns: minmax(0, 72%) minmax(370px, 28%); background: var(--aqua); }
.gallery-stage { position: relative; min-width: 0; overflow: hidden; background: var(--ink); }
.gallery-image { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.01); transition: opacity 240ms ease, transform 900ms var(--ease); }
.gallery-image.is-changing { opacity: .18; transform: scale(1.08); }
.gallery-wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,23,25,.42), transparent 55%), linear-gradient(0deg, rgba(23,23,25,.68), transparent 37%); pointer-events: none; }
.gallery-copy { position: absolute; z-index: 2; left: clamp(28px, 3vw, 60px); top: clamp(30px, 4vh, 68px); max-width: 70%; color: var(--white); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.gallery-copy p { margin: 0 0 11px; font-size: clamp(10px, .75vw, 14px); font-weight: 700; letter-spacing: .12em; }
.gallery-copy h2 { margin: 0 0 9px; font-size: clamp(58px, 6.4vw, 124px); line-height: .78; letter-spacing: -.09em; overflow-wrap: anywhere; }
.gallery-copy span { display: inline-block; padding: 7px 10px; background: var(--pink); color: var(--ink); font-size: 13px; font-weight: 700; text-shadow: none; }
.country-flag { width: 24px; height: 18px; display: inline-block; vertical-align: middle; object-fit: cover; border: 1px solid rgba(23,23,25,.25); }
.gallery-counter { position: absolute; z-index: 2; right: 25px; top: 22px; padding: 6px 9px; border: 1.5px solid var(--ink); background: var(--pink); font-size: 11px; font-weight: 700; }
.thumbnail-rail { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; overflow-x: auto; padding: 15px 22px 18px; background: rgba(247,241,231,.92); border-top: 2px solid var(--ink); scrollbar-width: thin; scroll-snap-type: x proximity; }
.gallery-thumb { position: relative; flex: 0 0 clamp(112px, 8.2vw, 158px); height: clamp(74px, 7.5vh, 100px); padding: 0; overflow: hidden; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; scroll-snap-align: center; transition: transform 180ms ease, box-shadow 180ms ease; }
.gallery-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.65); }
.gallery-thumb span { position: absolute; left: 0; bottom: 0; padding: 4px 6px; background: var(--paper); font-size: 10px; font-weight: 700; }
.gallery-thumb.is-active { transform: translateY(-5px); box-shadow: 5px 5px 0 var(--pink); }
.gallery-thumb.is-active img { filter: none; }

.travel-ticket { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; padding: clamp(23px, 2.2vw, 42px); background: var(--paper); box-shadow: -9px 0 22px rgba(23,23,25,.16); }
.travel-ticket::before { content: ""; position: absolute; left: -16px; top: 52%; width: 32px; height: 32px; border-radius: 50%; background: var(--aqua); }
.ticket-topline { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.ticket-kicker { margin: auto 0 7px; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.travel-ticket h3 { margin: 0 0 13px; font-size: clamp(42px, 4vw, 75px); line-height: .8; letter-spacing: -.09em; overflow-wrap: anywhere; }
.ticket-fact { margin: 0 0 20px; padding-top: 17px; border-top: 2px dashed var(--ink); font-size: clamp(15px, 1.18vw, 22px); line-height: 1.26; font-weight: 700; }
.ticket-route { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; }
.ticket-route i { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: var(--orange); }
.ticket-route b { min-width: 0; overflow: hidden; letter-spacing: .1em; color: var(--orange); }
.ticket-instructions { display: grid; margin-top: 18px; border: 2px solid var(--ink); }
.ticket-instructions > strong { padding: 7px 9px; border-bottom: 2px solid var(--ink); background: var(--pink); font-size: 10px; letter-spacing: .12em; }
.ticket-instructions span { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; min-height: 37px; padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: clamp(9px, .66vw, 12px); font-weight: 700; }
.ticket-instructions span:last-child { border: 0; }
.ticket-instructions b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--orange); font-size: 9px; }
.cta-button { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 0 18px; border: 2px solid var(--ink); background: var(--orange); box-shadow: 6px 6px 0 var(--ink); font-size: clamp(11px, .76vw, 14px); font-weight: 700; cursor: pointer; transition: 160ms ease; }
.cta-button:hover { transform: translate(3px,3px); box-shadow: 3px 3px 0 var(--ink); background: var(--pink); }
.cta-button:disabled { opacity: .65; cursor: wait; }

.qr-screen { min-height: 0; display: grid; grid-template-columns: minmax(0, 58%) minmax(500px, 42%); background: var(--aqua); }
.qr-scenery { position: relative; overflow: hidden; }
.qr-scenery img { width: 100%; height: 100%; display: block; object-fit: cover; animation: scenic-in 800ms var(--ease) both; }
.qr-scenery::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23,23,25,.56), transparent 55%); }
.qr-scenery-copy { position: absolute; z-index: 2; left: 5vw; bottom: 7vh; color: var(--white); }
.qr-scenery-copy span { font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.qr-scenery-copy h2 { max-width: 9ch; margin: 8px 0 0; font-size: clamp(66px, 7vw, 134px); line-height: .75; letter-spacing: -.09em; }
.qr-ticket { position: relative; display: grid; align-content: center; justify-items: center; padding: 5vh 4vw; background: var(--paper); text-align: center; box-shadow: -10px 0 25px rgba(23,23,25,.18); }
.qr-ticket::before { content: ""; position: absolute; left: -18px; top: 50%; width: 36px; height: 36px; border-radius: 50%; background: var(--aqua); }
.qr-back { position: absolute; left: 28px; top: 24px; border: 0; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.step-label { margin: 0 0 10px; color: var(--pink); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.qr-ticket h2 { margin: 0 0 18px; font-size: clamp(35px, 3vw, 58px); line-height: .88; letter-spacing: -.07em; }
.qr-frame { width: min(38vh, 380px); aspect-ratio: 1; padding: 13px; border: 3px solid var(--ink); background: var(--white); box-shadow: 9px 9px 0 var(--orange); }
.qr-frame img { width: 100%; height: 100%; display: block; }
.qr-status { display: flex; align-items: center; gap: 9px; margin: 25px 0 9px; padding: 9px 12px; border: 2px solid var(--ink); background: var(--pink); font-size: 11px; font-weight: 700; }
.qr-status span { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: pulse 1s ease-in-out infinite alternate; }
.qr-ticket small { font-size: 9px; font-weight: 700; }

.tv-thanks { position: absolute; z-index: 30; inset: clamp(90px, 10vh, 118px) 0 0; display: grid; place-content: center; justify-items: center; padding: 7vw; background: var(--orange); text-align: center; animation: fade-in 450ms ease both; }
.thanks-brands { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.thanks-brands img:first-child { width: 74px; }
.thanks-brands img:last-child { width: 90px; }
.tv-thanks > p { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.tv-thanks h2 { margin: 14px 0 24px; font-size: clamp(100px, 13vw, 240px); line-height: .72; letter-spacing: -.1em; }
.tv-thanks strong { font-size: clamp(15px, 1.25vw, 23px); line-height: 1.35; }
.tv-thanks small { margin-top: 38px; padding: 8px 12px; border: 2px solid var(--ink); background: var(--pink); font-weight: 700; }
.toast { position: fixed; z-index: 1500; left: 50%; bottom: 35px; max-width: calc(100vw - 40px); padding: 14px 18px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 7px 7px 0 var(--orange); font-size: 12px; font-weight: 700; transform: translate(-50%, 150%); opacity: 0; transition: 300ms var(--ease); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@keyframes scenic-in { from { opacity: .25; transform: scale(1.09); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { to { transform: scale(1.6); opacity: .45; } }

/* Mobile experience */
.mobile-page { min-height: 100dvh; overflow-x: hidden; background: var(--aqua); }
.mobile-shell { min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; }
.mobile-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; border-bottom: 2px solid var(--ink); background: var(--pink); }
.mobile-brand { display: flex; align-items: center; gap: 10px; }
.mobile-brand img:first-child { width: 46px; }
.mobile-brand img:last-child { width: 54px; }
.mobile-brand span { width: 1px; height: 34px; background: var(--ink); opacity: .45; }
.mobile-header div:last-child { min-width: 0; text-align: right; }
.mobile-header p { margin: 0 0 3px; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.mobile-header strong { display: block; white-space: nowrap; font-size: 14px; letter-spacing: -.06em; }
.mobile-main { min-width: 0; flex: 1; display: grid; }
.mobile-step { width: 100%; min-width: 0; min-height: calc(100dvh - 74px); animation: mobile-step-in 450ms var(--ease) both; }
.mobile-step--card { display: grid; align-content: center; gap: 18px; padding: 28px 20px 38px; }
.destination-preview { position: relative; min-height: 29vh; overflow: hidden; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--orange); }
.destination-preview img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.destination-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23,23,25,.66), transparent 65%); }
.destination-preview div { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; color: var(--white); }
.destination-preview span { font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.destination-preview h1 { margin: 5px 0 0; font-size: clamp(38px, 12vw, 60px); line-height: .8; letter-spacing: -.08em; }
.mobile-card { min-width: 0; padding: 22px 19px 20px; border: 2px solid var(--ink); background: var(--paper); }
.mobile-kicker { margin: 0 0 7px; color: var(--pink); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.mobile-card h2 { margin: 0 0 10px; font-size: clamp(27px, 8vw, 42px); line-height: .92; letter-spacing: -.07em; overflow-wrap: anywhere; }
.mobile-card > p:not(.mobile-kicker):not(.privacy-copy) { margin: 0 0 17px; font-size: 13px; line-height: 1.42; font-weight: 700; }
.reason-field { display: grid; gap: 6px; }
.reason-field label { font-size: 10px; font-weight: 700; }
.reason-field textarea { width: 100%; min-height: 104px; resize: none; padding: 13px; border: 2px solid var(--ink); border-radius: 0; background: var(--white); font-size: 16px; line-height: 1.35; }
.reason-meta { display: flex; justify-content: space-between; font-size: 9px; font-weight: 700; }
.mobile-button { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding: 0 16px; border: 2px solid var(--ink); background: var(--orange); box-shadow: 5px 5px 0 var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.mobile-button:disabled { opacity: .45; cursor: not-allowed; }
.mobile-button--pink { background: var(--pink); }
.mobile-button--paper { background: var(--paper); }
.privacy-copy { margin: 14px 0 0; font-size: 9px; line-height: 1.35; font-weight: 700; opacity: .7; }
.camera-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 0; }
.camera-guide span { min-height: 68px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 8px 5px; border: 1.5px solid var(--ink); background: var(--white); text-align: center; font-size: 8px; font-weight: 700; }
.camera-guide b { font-size: 18px; color: var(--orange); }
.camera-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera-label { cursor: pointer; }
.loading-step { display: grid; place-content: center; justify-items: center; padding: 30px; background: var(--orange); text-align: center; }
.loading-aperture { width: 92px; height: 92px; margin-bottom: 25px; border: 16px solid var(--pink); border-top-color: var(--ink); border-radius: 50%; animation: spin 900ms linear infinite; }
.loading-step h2 { max-width: 10ch; margin: 0; font-size: 46px; line-height: .85; letter-spacing: -.08em; }
.editor-step { display: flex; flex-direction: column; background: var(--ink); color: var(--white); }
.polaroid-stage { position: relative; min-height: 58dvh; display: grid; place-items: center; padding: 20px 20px 62px; background: var(--aqua); }
.polaroid-stage canvas { display: block; width: min(100%, 420px); max-height: 58dvh; object-fit: contain; box-shadow: 10px 12px 0 rgba(23,23,25,.22); touch-action: none; cursor: grab; }
.polaroid-stage canvas.is-dragging { cursor: grabbing; }
.gesture-hint { position: absolute; left: 20px; right: 20px; bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.gesture-hint button { min-height: 30px; padding: 0 10px; border: 1.5px solid var(--ink); background: var(--paper); font-size: 8px; font-weight: 700; cursor: pointer; }
.editor-panel { flex: 1; padding: 18px 20px 30px; background: var(--ink); }
.editor-panel h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.06em; }
.editor-panel > p { margin: 0 0 14px; font-size: 11px; line-height: 1.35; }
.output-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.social-share-button { min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border: 1.5px solid var(--white); background: transparent; color: var(--white); cursor: pointer; }
.social-share-button strong { font-size: 9px; letter-spacing: .08em; }
.social-icons { display: flex; align-items: center; justify-content: center; gap: 12px; }
.social-icons svg { width: 21px; height: 21px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; }
.social-icons .icon-fill { fill: currentColor; stroke: none; }
.share-button { min-height: 48px; border: 1.5px solid var(--white); background: transparent; color: var(--white); font-size: 10px; font-weight: 700; cursor: pointer; }
.share-button--download { width: 100%; min-height: 62px; margin: 0; background: var(--orange); color: var(--ink); border-color: var(--ink); }
.finish-button { margin-top: 12px; background: var(--pink); }
.mobile-end { min-height: calc(100dvh - 74px); display: grid; place-content: center; justify-items: center; padding: 34px 24px; background: var(--orange); text-align: center; }
.mobile-end p { margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.mobile-end h2 { margin: 0 0 22px; font-size: clamp(58px, 18vw, 90px); line-height: .75; letter-spacing: -.1em; }
.mobile-end strong { max-width: 28ch; font-size: 14px; line-height: 1.45; }
.mobile-end .thanks-brands { margin: 30px 0 0; }
.mobile-error { min-height: calc(100dvh - 74px); display: grid; place-content: center; padding: 35px 24px; background: var(--paper); text-align: center; }
.mobile-error h1 { margin: 0 0 12px; font-size: 42px; line-height: .86; letter-spacing: -.08em; }

@keyframes mobile-step-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .opening-splash::before { inset: 10px; }
  .opening-brands { left: 8vw; top: 6vh; gap: 13px; }
  .opening-brands img:first-child { width: 66px; }
  .opening-brands img:last-child { width: 76px; }
  .opening-brands span { height: 42px; }
  .opening-title { width: 100%; }
  .opening-title p { font-size: 9px; }
  .opening-title h1 { font-size: clamp(58px, 20vw, 96px); line-height: .8; }
  .opening-title small { margin-top: 28px; font-size: 9px; }
}

@media (max-height: 760px) and (min-width: 1000px) {
  .travel-ticket { padding-top: 18px; padding-bottom: 18px; }
  .ticket-fact { margin-bottom: 10px; font-size: 14px; }
  .ticket-instructions { margin-top: 10px; }
  .ticket-instructions span { min-height: 31px; }
  .cta-button { min-height: 54px; margin-top: 11px; }
}
