/* LuxTravel app screens, built on the Nocturne tokens (nocturne.css). Mirrors the Claude Design prototype
   "Luxtravel App.dc.html": a 402px mobile layout, laid out in a centred column on wider screens. */

a { color: var(--color-accent); }
a:hover { color: var(--color-accent-300); }
button { font-family: inherit; }

/* Slides with left/right, not transform: an animated transform would make the screen the containing block
   of its position:fixed overlays (island, sheets, bottom bar), which would then scroll with it. */
@keyframes screenIn { from { opacity: 0; left: 28px; right: -28px; } to { opacity: 1; left: 0; right: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-60px, 50px) scale(1.15); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -18; } }
@keyframes islandOpen { from { width: 126px; height: 37px; opacity: .6; } to { width: 372px; height: 58px; opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rain { 0% { transform: translateY(-60px) rotate(14deg); opacity: 0; } 20% { opacity: .7; } 100% { transform: translateY(320px) rotate(14deg); opacity: 0; } }

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

/* — page — */
body { margin: 0; background: var(--color-bg); }
.stage { min-height: 100dvh; }
.device {
  /* The transform makes position:fixed overlays (sheets, the island, the tab bar) anchor to the page area. */
  position: relative; height: 100dvh; overflow: hidden; transform: translateZ(0);
  background: var(--color-bg); color: var(--color-text); font-family: var(--font-body);
}
.status-spacer { display: none; }

.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: 60px 0 120px; scrollbar-width: none;
  /* Fills backwards only: an animation still applied after it ends would make the screen a stacking
     context, trapping its overlays (sheets, island) under the tab bar. */
  animation: screenIn .55s cubic-bezier(.2, .8, .2, 1) backwards;
}
.screen::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
.screen.tight-top { padding-top: 58px; }
.screen.detail { padding-bottom: 130px; }
.hscroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }

.glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  animation: drift 11s ease-in-out infinite alternate;
}
.rain { position: absolute; left: 0; right: 0; top: 0; height: 340px; overflow: hidden; pointer-events: none; }
.rain i { position: absolute; top: 0; width: 1px; height: 26px; background: linear-gradient(transparent, var(--color-neutral-300)); animation: rain 1s linear infinite; }

.fade-up { animation: fadeUp .6s both; }
.round { border-radius: 50%; }
.muted { color: var(--color-neutral-500); }
.tabular { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.minw0 { min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* — home — */
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent-300); }
.hero-title { font-size: 36px; font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; margin: 10px 0 0; }
.section-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

.nudge {
  position: relative; display: flex; align-items: center; gap: 14px; width: calc(100% - 32px);
  margin: 22px 16px 0; padding: 12px 14px; border: 0; cursor: pointer; text-align: left;
  color: var(--color-text); border-radius: var(--radius-lg); text-decoration: none; transition: box-shadow .5s;
}
.nudge:hover { color: var(--color-text); }
.chip {
  display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: 5px;
  font-size: 11px; font-weight: 600; color: var(--color-bg);
}

.route-card {
  position: relative; margin: 12px 16px 0; padding: 16px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 82%, transparent); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.route-grid { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.route-field { display: block; padding-right: 44px; }
.route-field span { display: block; font-size: 11px; color: var(--color-neutral-500); }
.route-field input {
  width: 100%; border: 0; padding: 0; margin: 0; background: transparent; color: var(--color-text);
  font: inherit; font-size: 16px; font-weight: 500; caret-color: var(--color-accent); text-overflow: ellipsis;
}
.route-field input:focus-visible { outline: none; box-shadow: 0 1px 0 var(--color-accent); }
.swap {
  position: absolute; right: 16px; top: 34px; background: var(--color-bg); font-size: 16px;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.when-chip { position: relative; cursor: pointer; gap: 6px; }
.when-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, var(--color-accent) 30%, transparent); border-top-color: var(--color-accent);
  animation: spin .8s linear infinite;
}

.favs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 16px; user-select: none; -webkit-user-select: none; }
.fav { touch-action: none; cursor: grab; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--color-text); padding: 0; }
.fav-bubble {
  position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: radial-gradient(circle at 30% 25%, var(--color-accent-800), var(--color-surface) 70%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, color .3s;
}
.fav-label { font-size: 12px; font-weight: 500; line-height: 1.1; }
.fav-place { font-size: 10px; color: var(--color-neutral-500); line-height: 1; margin-top: -3px; }
.fav-add .fav-bubble { background: none; border: 1px dashed var(--color-neutral-700); color: var(--color-neutral-500); font-size: 20px; }
.drag-line { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 7; animation: dash .5s linear infinite; filter: drop-shadow(0 0 6px var(--color-accent)); }

.escape {
  flex: none; width: 200px; height: 250px; scroll-snap-align: start; position: relative; overflow: hidden;
  text-align: left; cursor: pointer; color: var(--color-text); padding: 16px; border-radius: var(--radius-lg); border: 0;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .3s, box-shadow .3s; text-decoration: none;
}
.escape:hover { color: var(--color-text); transform: translateY(-3px); box-shadow: 0 0 0 1px var(--color-accent), 0 14px 30px rgba(0, 0, 0, .5); }
.escape .bg-icon { position: absolute; right: -22px; top: -14px; font-size: 150px; color: var(--color-accent-300); opacity: .22; }
.escape .icon-tile {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: var(--color-accent-200);
  background: color-mix(in srgb, var(--color-bg) 45%, transparent); backdrop-filter: blur(6px);
}
.mode-tile { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--color-bg); font-size: 12px; }

.note-card { margin: 22px 16px 0; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--color-surface); display: flex; gap: 12px; align-items: flex-start; }
.note-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--color-accent-900); color: var(--color-accent-300); font-size: 18px; }

/* — tab bar — */
.tabbar {
  position: fixed; left: 16px; right: 16px; bottom: 30px; height: 62px; z-index: 5; border-radius: 22px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--color-surface) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-md);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px;
  color: var(--color-neutral-500); text-decoration: none; transition: color .25s;
}
.tab i { font-size: 21px; }
.tab:hover { color: var(--color-text); }
.tab[aria-current="page"] { color: var(--color-text); }
.tab .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--color-accent); opacity: 0; box-shadow: 0 0 8px var(--color-accent); transition: opacity .25s; }
.tab[aria-current="page"] .dot { opacity: 1; }

/* — results — */
.tip-card { flex: none; width: 236px; scroll-snap-align: start; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--color-surface); }
.tip-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; }
.tip-text { font-size: 12px; line-height: 1.45; color: var(--color-neutral-300); margin-top: 6px; text-wrap: pretty; }
.panel { margin: 18px 16px 0; padding: 14px 16px 12px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.overline { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-500); }
.scrub { position: relative; height: 34px; margin-top: 6px; touch-action: none; cursor: ew-resize; user-select: none; }
.pill {
  height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px;
  background: transparent; color: var(--color-neutral-400); border: 1px solid var(--color-divider); transition: all .25s;
}
.pill[aria-pressed="true"] { background: color-mix(in srgb, var(--color-accent) 14%, transparent); color: var(--color-accent-300); border-color: var(--color-accent); }
.trip-card {
  position: relative; user-select: none; text-align: left; color: var(--color-text); cursor: pointer; border: 0; padding: 16px;
  border-radius: var(--radius-lg); text-decoration: none; display: block;
  background: linear-gradient(160deg, var(--color-surface), color-mix(in srgb, var(--color-surface) 60%, var(--color-bg)));
}
.trip-card:hover { color: var(--color-text); }
.trip-card:not(.dragging):hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--color-accent), 0 0 28px color-mix(in srgb, var(--color-accent) 25%, transparent) !important; }
.trip-card:active { transform: scale(.985); }
.legbar { position: relative; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.legbar > div { position: absolute; top: 0; bottom: 0; border-radius: inherit; transform-origin: left; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.walk-fill { background: repeating-linear-gradient(90deg, var(--color-neutral-500) 0 2px, transparent 2px 4px); }
.line-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--color-bg); }
.walk-chip { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; color: var(--color-neutral-300); background: var(--color-neutral-800); }
.empty { margin: 18px 16px 0; padding: 18px 16px; border-radius: var(--radius-lg); background: var(--color-surface); font-size: 14px; color: var(--color-neutral-300); }

/* — journey detail — */
.timeline-row { display: grid; grid-template-columns: 44px 30px minmax(0, 1fr); column-gap: 12px; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px 34px; background: linear-gradient(transparent, var(--color-bg) 30%); z-index: 5; }
.island {
  position: fixed; top: 11px; left: 50%; transform: translateX(-50%); z-index: 70; width: min(372px, calc(100% - 30px)); height: 58px;
  border-radius: 29px; background: #000; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 11px; overflow: hidden;
  animation: islandOpen .6s cubic-bezier(.2, .9, .25, 1.12) both; box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.island > * { animation: fadeIn .3s .3s both; }

/* — overlays — */
.scrim { position: fixed; inset: 0; z-index: 75; background: color-mix(in srgb, var(--color-bg) 60%, transparent); backdrop-filter: blur(6px); animation: fadeIn .25s both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 76; padding: 10px 16px 38px; border-radius: 26px 26px 0 0;
  background: var(--color-surface); box-shadow: var(--shadow-lg); animation: sheetUp .45s cubic-bezier(.2, .9, .25, 1) both;
}
.cmp-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
.fade-rule { background: linear-gradient(to right, transparent, var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px; }
.spin-overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: center; padding: 0 20px;
  background: color-mix(in srgb, var(--color-bg) 80%, transparent); backdrop-filter: blur(14px); animation: fadeIn .3s both;
}

/* — map — */
.map-screen { position: absolute; inset: 0; animation: screenIn .5s cubic-bezier(.2, .8, .2, 1) backwards; }
/* Isolated so Leaflet's pane z-indexes (400+) stay inside the map, under the tab bar. */
.map-canvas { position: absolute; inset: 0; background: var(--color-bg); isolation: isolate; }
.map-canvas .leaflet-container { background: var(--color-bg); font-family: var(--font-body); }
.map-canvas .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) saturate(.35) brightness(.82) contrast(.92); }
.map-canvas .leaflet-bottom { bottom: 96px; }
.map-canvas .leaflet-control-attribution { background: color-mix(in srgb, var(--color-bg) 75%, transparent) !important; color: var(--color-neutral-500) !important; font-size: 9px; border-radius: 6px 0 0 6px; }
.map-canvas .leaflet-control-attribution a { color: var(--color-neutral-300) !important; }
.map-pin { display: flex; align-items: center; gap: 6px; white-space: nowrap; touch-action: none; cursor: grab; transform: translate(-9px, -9px); user-select: none; }
.map-pin.is-fav { transform: translate(-12px, -12px); }
.map-pin .pin-dot { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--color-neutral-400); transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s; }
.map-pin.is-fav .pin-dot { width: 24px; height: 24px; border-color: var(--color-accent); background: var(--color-accent-900); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 18%, transparent), 0 0 18px color-mix(in srgb, var(--color-accent) 60%, transparent); }
.map-pin .pin-label { font-size: 11px; line-height: 1.2; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--color-surface) 88%, transparent); color: var(--color-text); box-shadow: var(--shadow-sm); }
.map-pin .pin-label small { display: block; font-size: 9px; color: var(--color-neutral-400); }
.map-pin.is-fav .pin-label { font-weight: 500; padding: 4px 9px; }
.map-pin.hot .pin-dot { transform: scale(1.4); border-color: var(--color-accent-300); box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-accent) 25%, transparent), 0 0 26px var(--color-accent); }
.map-overlay { position: absolute; inset: 0; z-index: 650; pointer-events: none; width: 100%; height: 100%; }
.map-overlay path { fill: none; stroke: var(--color-accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 8; animation: dash .5s linear infinite; filter: drop-shadow(0 0 6px var(--color-accent)); }
.map-route { filter: drop-shadow(0 0 8px var(--color-accent)); }
.map-hold { position: absolute; z-index: 640; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none; border: 2px solid var(--color-accent); background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 25%, transparent), transparent 70%); animation: holdGrow .5s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes holdGrow { from { transform: scale(0); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.map-core { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--color-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 40%, transparent), 0 0 20px var(--color-accent); }
.map-ring-label { transform: translate(-50%, -50%); font-size: 10px; font-weight: 500; white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: var(--color-bg); color: var(--color-accent-300); box-shadow: 0 0 0 1px var(--color-accent-700); opacity: 0; animation: fadeIn .4s forwards; }
.map-reach-pin { transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 10px; padding: 2px 7px 2px 3px; border-radius: 999px; background: color-mix(in srgb, var(--color-surface) 90%, transparent); color: var(--color-text); box-shadow: 0 0 0 1px var(--color-accent-700); animation: fadeIn .4s both; }
.map-reach-pin b { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 999px; background: var(--color-accent-800); color: var(--color-accent-100); }
.map-head { position: absolute; left: 16px; right: 16px; top: 58px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--color-surface) 78%, transparent); backdrop-filter: blur(16px); box-shadow: var(--shadow-md); z-index: 700; }
.map-toast { position: absolute; left: 16px; right: 16px; bottom: 108px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; z-index: 700; background: color-mix(in srgb, var(--color-surface) 88%, transparent); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--color-accent), 0 0 28px color-mix(in srgb, var(--color-accent) 30%, transparent); animation: fadeUp .4s both; }
.confetti { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 60%; border-radius: 2px; transition: transform 1.8s cubic-bezier(.12, .7, .3, 1), opacity 1.8s ease-in; }

/* — desktop — */
/* Full window, no device frame; last in the file so it overrides the mobile rules. Content sits in a centred column; the map stays full-bleed. */
@media (min-width: 760px) {
  :root { --column: 720px; }
  .screen { padding-top: 36px; padding-inline: max(0px, calc((100% - var(--column)) / 2)); }
  .screen.tight-top { padding-top: 32px; }
  .tabbar { width: 360px; margin-inline: auto; bottom: 24px; }
  .bottom-bar, .sheet { left: max(0px, calc((100% - var(--column)) / 2)); right: max(0px, calc((100% - var(--column)) / 2)); }
  .sheet { bottom: 24px; border-radius: 26px; padding-bottom: 22px; }
  .bottom-bar { padding-bottom: 24px; }
  .spin-overlay { padding-inline: max(20px, calc((100% - 480px) / 2)); }
  /* Centred with margins, since their fade-up animation owns transform. */
  .map-head, .map-toast { width: min(560px, calc(100% - 32px)); margin-inline: auto; }
  .map-head { top: 24px; }
  .map-canvas .leaflet-bottom { bottom: 0; }
}
