/* Trippr Stargazer · a Trippr Travel experiment by Maya Labs. The sky is the interface: chrome is a few pieces of
   dark glass floating over it. The skin is Trippr Travel Radio's: warm near-black panels, fire orange, gold,
   Bebas Neue for display and Inter for everything else, the Trippr Travel wordmark in white.
   Night vision swaps every token for a red one, so the whole UI, not just the sky, protects dark-adapted eyes. */
:root {
  --ink: #04060c;          /* the sky itself stays night-blue; everything laid over it is Trippr */
  --glass: rgba(28, 25, 23, 0.80);
  --glass-solid: #1c1917;
  --line: rgba(214, 200, 190, 0.14);
  --text: #f4f2f1;
  --muted: #a8a29e;
  --signal: #e8640c;       /* Trippr "fire" */
  --gold: #f59f0a;         /* Trippr gold */
  --gold-soft: rgba(245, 159, 10, 0.16);
  --sky: #86b6ff;
  --good: #7fd69b;
  --font-display: "Bebas Neue", "Barlow Condensed", Impact, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
body.red {
  --glass: rgba(20, 2, 2, 0.8); --glass-solid: #140303; --line: rgba(255, 60, 40, 0.2);
  --text: #ff4a38; --muted: #b3261a; --signal: #ff5a44; --gold: #ff5a44; --gold-soft: rgba(255, 70, 50, 0.16); --sky: #ff4a38; --good: #ff4a38;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ink); color: var(--text); font-family: var(--font-body); font-size: 14px; line-height: 1.45;
  overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, input:focus-visible, .scrub:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
svg { width: 20px; height: 20px; display: block; flex: none; }
[hidden] { display: none !important; }

#gl, #ui { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { pointer-events: none; }
#gl { touch-action: none; cursor: grab; }
#gl.is-drag { cursor: grabbing; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(ellipse at 50% 40%, #2a1d12 0%, #0c0a09 65%); transition: opacity .9s ease;
}
.splash.is-gone { opacity: 0; pointer-events: none; }
.splash-sub { color: var(--muted); }
.splash-foot { position: absolute; bottom: calc(var(--safe-b) + 22px); left: 0; right: 0; padding: 0 24px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
/* the Trippr Travel wordmark, drawn as a mask so it takes the text colour (white, or red in night vision) */
.tt-logo { display: block; aspect-ratio: 1294 / 263; background: var(--text); -webkit-mask: url(assets/trippr-travel-logo.png) center / contain no-repeat; mask: url(assets/trippr-travel-logo.png) center / contain no-repeat; }
.splash-logo { width: 240px; max-width: 70vw; }
.star-word { font-family: var(--font-display); font-weight: 400; letter-spacing: .14em; color: var(--gold); line-height: 1; text-transform: uppercase; }
.splash .star-word { font-size: 34px; }
.splash-bar { width: 150px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 6%; background: var(--signal); transition: width .35s ease; }

/* ---------- top ---------- */
.top { position: fixed; z-index: 10; top: calc(var(--safe-t) + 12px); left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand-pill { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px 0 12px; border-radius: 20px; pointer-events: none; }
.brand-pill .tt-logo { height: 19px; }
.brand-pill .star-word { font-size: 19px; padding-top: 2px; }
.place-row { position: fixed; z-index: 9; top: calc(var(--safe-t) + 60px); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.place-row > * { pointer-events: auto; }
.glass, .chip, .icon, .dock, .timebar, .sheet, .toast, .brand-pill {
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
}
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 10px; border-radius: 16px; font-weight: 500; font-size: 12.5px; max-width: 80vw; }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip svg { width: 15px; height: 15px; color: var(--signal); }
.chip.is-travel { border-color: var(--gold); color: var(--gold); }
.top-actions { display: flex; gap: 8px; }
.icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: color .2s, border-color .2s, background .2s; }
.icon[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.icon.solid { background: var(--gold); color: #17110a; border-color: transparent; }
body.red .icon.solid { color: #140303; }

/* ---------- heads-up: what you are facing ---------- */
.hud { position: fixed; z-index: 5; top: calc(var(--safe-t) + 106px); left: 0; right: 0; text-align: center; pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.hud-name { font-family: var(--font-display); font-size: 40px; letter-spacing: .1em; line-height: 1; transition: opacity .5s ease; }
.hud-sub { color: var(--muted); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; transition: opacity .5s ease; }
.hud-dir { margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--gold); font-variant-numeric: tabular-nums; }
.hud.is-swap .hud-name, .hud.is-swap .hud-sub { opacity: 0; }

/* ---------- dock ---------- */
.dock {
  position: fixed; z-index: 12; left: 50%; bottom: calc(var(--safe-b) + 14px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 34px; box-shadow: 0 16px 50px rgba(0, 0, 0, .55);
}
.dock-btn { width: 62px; height: 54px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: .02em; transition: color .2s, background .2s; }
.dock-btn.is-on, .dock-btn[aria-pressed="true"] { color: var(--gold); background: var(--gold-soft); }
.dock-main {
  width: 68px; height: 68px; margin: -14px 6px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 50% 30%, #3a2a1c, #1c1917); border: 1px solid rgba(245, 159, 10, .4); color: var(--text);
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; box-shadow: 0 0 0 5px rgba(4, 6, 12, .7), 0 8px 30px rgba(0, 0, 0, .6); transition: all .25s ease;
}
.dock-main svg { width: 26px; height: 26px; }
.dock-main[aria-pressed="true"] { background: radial-gradient(circle at 50% 30%, var(--gold), var(--signal)); color: #17110a; border-color: transparent; box-shadow: 0 0 0 5px rgba(4, 6, 12, .7), 0 0 34px rgba(232, 100, 12, .6); }
body.red .dock-main { background: #1c0404; border-color: var(--line); }
body.red .dock-main[aria-pressed="true"] { background: var(--gold); color: #140303; box-shadow: 0 0 0 5px rgba(4, 6, 12, .7); }

/* ---------- time travel ---------- */
.timebar { position: fixed; z-index: 11; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 102px); max-width: 520px; margin: 0 auto; border-radius: 22px; padding: 14px 14px 12px; box-shadow: 0 16px 50px rgba(0, 0, 0, .5); }
.time-row { display: flex; justify-content: space-between; align-items: center; }
.time-now span { font-family: var(--font-display); font-size: 34px; letter-spacing: .05em; line-height: 1; font-variant-numeric: tabular-nums; }
.time-now small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.time-ctl { display: flex; gap: 8px; align-items: center; }
.pill { height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill:active { background: var(--gold-soft); }
.scrub { position: relative; height: 46px; margin: 12px -14px 10px; overflow: hidden; touch-action: none; cursor: ew-resize; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.scrub-ticks { position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, var(--text) 0 1.5px, transparent 1.5px 60px); background-size: 10px 12px, 60px 24px; background-repeat: repeat-x; background-position: 50% 50%, 50% 50%; opacity: .55; }
.scrub-needle { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.time-jumps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; touch-action: pan-x; }
.time-jumps::-webkit-scrollbar { display: none; }

/* ---------- sheet ---------- */
.sheet {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: min(74vh, 640px); display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: var(--safe-b); box-shadow: 0 -20px 60px rgba(0, 0, 0, .55);
  transform: translateY(105%); transition: transform .38s cubic-bezier(.2, .8, .2, 1); -webkit-user-select: text; user-select: text;
}
.sheet.is-open { transform: translateY(0); }
.sheet.is-compact { max-height: 46vh; }
.sheet-grab { padding: 8px 0 2px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab i { width: 38px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 4px 16px 10px 20px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 32px; letter-spacing: .06em; line-height: 1.05; }
.sheet-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sheet-body { overflow-y: auto; padding: 0 20px 22px; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-body p { margin: 0 0 12px; color: #c9d2e4; }
body.red .sheet-body p { color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 14px; }
.fact { border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; background: rgba(255, 255, 255, .03); min-width: 0; }
.fact small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.fact b { display: block; font-weight: 600; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.light { border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; margin: 0 0 14px; color: var(--text) !important; }
.light b { color: var(--gold); font-weight: 600; }
.actions { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.btn { height: 42px; padding: 0 18px; border-radius: 21px; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); }
.btn.primary { background: var(--gold); color: #17110a; border-color: transparent; }
body.red .btn.primary { color: #140303; }
.btn svg { width: 18px; height: 18px; }

.search { position: relative; margin-bottom: 10px; }
.search input { width: 100%; height: 46px; border-radius: 23px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 16px; padding: 0 16px 0 44px; outline: none; -webkit-user-select: text; user-select: text; }
.search svg { position: absolute; left: 15px; top: 13px; color: var(--muted); }
.group { margin: 16px 0 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .dot { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 15px; }
.row .dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 10px 2px var(--c, #fff); }
body.red .row .dot i { background: var(--text); box-shadow: none; }
.row .txt { flex: 1; min-width: 0; }
.row .txt b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .txt small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .aside { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.row .aside.up { color: var(--good); }
.moon-ico { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.banner { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 4px 0 6px; background: linear-gradient(135deg, rgba(232, 100, 12, .12), rgba(245, 159, 10, .05)); }
.banner b { display: block; font-size: 15px; }
.banner small { color: var(--muted); }
body.red .banner { background: none; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; }
.toggle span b { display: block; font-weight: 600; }
.toggle span small { color: var(--muted); font-size: 12.5px; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, .12); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle[aria-pressed="true"] .switch { background: var(--gold); }
.toggle[aria-pressed="true"] .switch::after { transform: translateX(18px); }
body.red .switch::after { background: #140303; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; border: 1px solid var(--line); margin: 6px 0 4px; }
.seg button { height: 36px; border-radius: 12px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.promo { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.promo .tt-logo { flex: none; width: 92px; }
.promo img { flex: none; width: 92px; height: auto; display: block; }
body.red .promo img { filter: grayscale(1) brightness(.6) sepia(1) saturate(8) hue-rotate(-30deg); }
.promo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.35; }
.promo-text strong { color: var(--text); font-size: 13px; font-weight: 600; }
.promo-go { flex: none; color: var(--signal); font-weight: 600; font-size: 12px; white-space: nowrap; }
.acct { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); font-size: 13px; color: var(--muted); }
.acct strong { color: var(--text); font-weight: 600; word-break: break-all; }
.link { color: var(--signal); font-weight: 600; font-size: 13px; padding: 8px 0; text-align: left; }
.link.danger { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-top: 4px; text-decoration: underline; text-underline-offset: 3px; }
.btn.wide { width: 100%; justify-content: center; height: 48px; border-radius: 24px; margin-bottom: 10px; font-size: 15px; }
.btn.apple { background: #fff; color: #000; border-color: transparent; }
body.red .btn.apple { background: var(--text); color: #140303; }
body.red .btn.wide svg path { fill: currentColor; }
.btn[data-act="save"][aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.btn:disabled, .field:disabled { opacity: .5; }
.or { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: flex; flex-direction: column; }
.field { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 16px; padding: 0 14px; margin-bottom: 10px; outline: none; -webkit-user-select: text; user-select: text; }
.field:focus { border-color: var(--gold); }
.auth-msg { border-left: 2px solid var(--signal); padding: 2px 0 2px 12px; margin: 4px 0 10px; color: var(--text); font-size: 13.500px; }
.auth-msg.good { border-color: var(--good); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; }
.fine { color: var(--muted) !important; font-size: 12px; margin-top: 10px !important; }
.legal-links { margin: 14px 0 0 !important; font-size: 13px; }
.legal-links a { color: var(--signal); font-weight: 600; text-decoration: none; }
.credits { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 16px; }
.credits a { color: var(--muted); }

/* ?flat=1: glass without the blur, for headless screenshot renders where a full-screen blur takes minutes */
body.flat * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.flat .sheet, body.flat .timebar, body.flat .dock { background: rgba(28, 25, 23, 0.94); }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 40; left: 50%; top: calc(var(--safe-t) + 236px); transform: translate(-50%, -12px); max-width: min(86vw, 420px); padding: 11px 16px; border-radius: 18px; font-size: 13.5px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wide screens: the sheet becomes a side panel ---------- */
@media (min-width: 820px) {
  .sheet { left: 16px; right: auto; bottom: 16px; top: auto; width: 400px; max-height: calc(100vh - 110px); border-radius: 24px; border-bottom: 1px solid var(--line); transform: translateX(-112%); }
  .sheet.is-open { transform: translateX(0); }
  .sheet.is-compact { max-height: calc(100vh - 110px); }
  .sheet-grab { display: none; } .sheet-head { padding-top: 18px; }
  .hud-name { font-size: 54px; }
}
@media (max-width: 380px) { .brand-pill .tt-logo { height: 16px; } .brand-pill .star-word { font-size: 16px; } .brand-pill { padding: 0 12px 0 10px; gap: 6px; } }
@media (max-height: 520px) { .hud { display: none; } .timebar { bottom: calc(var(--safe-b) + 92px); } }
@media (prefers-reduced-motion: reduce) { .sheet, .toast, .splash { transition: none; } }
