/* TripToClip — site styles. Palette from the logo: electric blue and cyan through yellow to orange and hot pink,
   on clean cool whites. Admin → Appearance can override the colour tokens (served as /theme.css). */
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/Caveat.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f4f6fb;
  --bg-2: #e9eef7;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #dfe5ef;
  --accent: #e8306a;
  --accent-ink: #ffffff;
  --accent-soft: #fde4ec;
  --accent-2: #0a6cff;
  --brand-gradient: linear-gradient(90deg, #0a6cff 0%, #00d4f0 32%, #ffd21a 55%, #ff7a1a 74%, #ff2d78 100%);
  --btn-bg: linear-gradient(135deg, #ff7a1a 0%, #ff2d78 100%);
  --btn-ink: #ffffff;
  --btn-border: transparent;
  --hero-bg: radial-gradient(1100px 520px at 88% -10%, rgba(10, 108, 255, .45) 0, transparent 60%), radial-gradient(900px 460px at -10% 115%, rgba(255, 45, 120, .38) 0, transparent 60%), #0b1020;
  --ok: #2f7d55;
  --ok-soft: #dcefe3;
  --warn: #9a6b00;
  --warn-soft: #f8ecc9;
  --err: #b3261e;
  --err-soft: #f9dedc;
  --info-soft: #dfe8f1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 33, 43, .06), 0 8px 24px rgba(23, 33, 43, .08);
  --serif: "Outfit", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: only light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11171c; --bg-2: #161e25; --surface: #1a232b; --surface-2: #202a33; --ink: #edf0f2; --ink-2: #c5cdd3;
    --muted: #8d99a3; --line: #2c3740; --accent: #ff4f86; --accent-soft: #3b1a27; --ok: #6cc596; --ok-soft: #1c3126;
    --warn: #e8bf5c; --warn-soft: #352b14; --err: #f2867d; --err-soft: #3a1d1b; --info-soft: #1d2a36;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11171c; --bg-2: #161e25; --surface: #1a232b; --surface-2: #202a33; --ink: #edf0f2; --ink-2: #c5cdd3;
  --muted: #8d99a3; --line: #2c3740; --accent: #ff4f86; --accent-soft: #3b1a27; --ok: #6cc596; --ok-soft: #1c3126;
  --warn: #e8bf5c; --warn-soft: #352b14; --err: #f2867d; --err-soft: #3a1d1b; --info-soft: #1d2a36; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 28px; padding-bottom: 56px; flex: 1; }
.narrow { max-width: 460px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header & footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 36px; height: 36px; flex: none; border-radius: 10px; box-shadow: 0 3px 10px rgba(23, 33, 43, .22); }
.brand-logo { display: block; height: 34px; width: auto; }
.brand-small .brand-logo { height: 24px; }
.wordmark { font: 800 1.28rem/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; }
.wordmark em { font-style: normal; color: var(--accent); }
.brand:hover .brand-route { animation: rr-drive 1.2s linear infinite; }
@keyframes rr-drive { to { stroke-dashoffset: -11.4; } }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 7px 12px; border-radius: 99px; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-signin, .header-signout button { color: var(--ink-2); font-weight: 600; text-decoration: none; font-size: .95rem; }
.header-signin:hover { color: var(--accent); }
.header-cta { padding: 9px 16px; border-radius: 99px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav-menu { display: none; position: relative; }
.nav-menu summary { list-style: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; background: var(--surface); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary span { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-menu[open] summary span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-menu[open] summary span:nth-child(2) { opacity: 0; }
.nav-menu[open] summary span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-sheet { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; display: flex; flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.nav-sheet a, .nav-sheet button.link { padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; text-align: left; width: 100%; }
.nav-sheet a:hover, .nav-sheet button.link:hover { background: var(--bg-2); color: var(--ink); }
/* The dashed "road" under the header: a quiet nod to the route line. */
.header-road { height: 3px; background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 26px), var(--line); background-size: 26px 3px, auto; opacity: .85; animation: rr-road 1.6s linear infinite; }
@keyframes rr-road { to { background-position: 26px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .header-road, .brand:hover .brand-route { animation: none; } }
@media (max-width: 760px) {
  .nav, .header-signin, .header-signout { display: none; }
  .nav-menu { display: block; }
  .header-inner { gap: 10px; min-height: 58px; }
  .header-actions { gap: 8px; }
  .wordmark { font-size: 1.12rem; }
  .brand-logo { height: 28px; }
  .brand-mark { width: 32px; height: 32px; }
}
@media (max-width: 380px) { .wordmark em { display: none; } }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-inner a { color: var(--muted); }
.brand-small .brand-mark { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.brand-small .wordmark { font-size: 1rem; }

/* Buttons & forms */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--sans); padding: 10px 18px; border-radius: 10px; border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-ink); text-decoration: none; cursor: pointer; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-secondary, button.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-danger, button.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-small { padding: 6px 12px; font-size: .875rem; border-radius: 8px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; }
button.link:hover { color: var(--accent); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: 4px; }

/* Cards, flash, tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--err-soft); color: var(--err); }
.flash-warning { background: var(--warn-soft); color: var(--warn); }
.flash-info { background: var(--info-soft); color: var(--ink-2); }
.alert { padding: 12px 16px; border-radius: 10px; background: var(--err-soft); color: var(--err); margin-bottom: 16px; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; }

/* Home */
.home-main { flex: 1; }
.btn-big { padding: 14px 22px; font-size: 1.02rem; border-radius: 99px; }
.btn-ghost { background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); filter: none; }
.hero-band { position: relative; background: var(--hero-bg); color: #eef1f3; padding: 56px 0 96px; overflow: hidden; }
.hero-band::before { content: ""; position: absolute; inset: 0; background: url("../img/contours.svg") center / 900px auto repeat; opacity: .07; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7fd8ff; margin-bottom: 18px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
.hero-band h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin-bottom: 22px; color: #fff; }
.hero-band .hl { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.12rem; color: #c3ccd3; max-width: 33em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-band .btn-ghost { color: #eef1f3; }
/* "Watch an example": a round play mark before the words (opens the full-size player, pages/demoDialog.js). */
.btn-play { width: 22px; height: 22px; border-radius: 50%; background: #fff; position: relative; flex: none; }
.btn-play::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 9px solid #10161b; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 26px 0 0; color: #9eabb5; font-size: .92rem; }
.hero-points li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 2px solid #00d4f0; margin-right: 8px; vertical-align: 1px; }
.hero-stage { position: relative; min-height: 460px; }
.hero-stage > :nth-child(1) { position: relative; width: 70%; margin-left: auto; margin-right: 8%; }
.hero-stage > :nth-child(2), .hero-stage > :nth-child(3) { position: absolute; width: 36%; z-index: 2; }
.hero-stage > :nth-child(2) { left: 0; top: 10%; transform: rotate(-4deg); }
.hero-stage > :nth-child(3) { right: 0; bottom: -6%; transform: rotate(3deg); width: 32%; }
.hero-road { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 70px; }
.hero-road path { fill: none; stroke: #00d4f0; stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; opacity: .5; }

/* Live demo cards */
.demo-card { background: #fff; border-radius: 18px; padding: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); color: #17212b; }
.demo-screen { position: relative; border-radius: 12px; overflow: hidden; background: #dfe6e9; aspect-ratio: 1; }
.demo-large .demo-screen { aspect-ratio: 4 / 5; }
.demo-map, .demo-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, #e6ebee 30%, #f4f6f7 50%, #e6ebee 70%); background-size: 200% 100%; animation: rr-shimmer 1.4s linear infinite; transition: opacity .5s; pointer-events: none; }
.demo-card.is-ready .demo-screen::after, .demo-card.is-failed .demo-screen::after { opacity: 0; animation: none; }
@keyframes rr-shimmer { to { background-position: -200% 0; } }
.demo-live { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; background: rgba(16, 22, 27, .72); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; z-index: 2; }
.demo-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff5a4f; animation: rr-pulse 1.4s ease-in-out infinite; }
@keyframes rr-pulse { 50% { opacity: .3; } }
.demo-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 6px 4px; }
.demo-meta div { min-width: 0; }
.demo-meta b { display: block; font: 700 .98rem/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-meta span { display: block; font-size: .78rem; color: #6b7781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-open { flex: none; font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: none; padding: 6px 10px; border-radius: 99px; background: var(--accent-soft); }
.demo-open:hover { background: #f7d2c2; }
.hero-stage .demo-small .demo-open, .hero-stage .demo-small .demo-meta span { display: none; }
.hero-stage .demo-small .demo-meta b { font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .demo-live i, .demo-screen::after { animation: none; } }

.section { padding-top: 72px; }
.section:last-of-type { padding-bottom: 80px; }
.section-head { max-width: 640px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 8px; }
.demo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.demo-row .demo-card { box-shadow: var(--shadow); border: 1px solid var(--line); }

/* "Four stops": a route with numbered stops */
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; position: relative; }
.journey::before { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; border-top: 3px dashed var(--accent); opacity: .55; }
.journey li { position: relative; }
.stop-n { position: relative; z-index: 1; display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #fff; font: 800 1.1rem var(--serif); box-shadow: 0 0 0 6px var(--bg); margin-bottom: 14px; }
.journey li:last-child .stop-n { background: var(--ink); color: var(--surface); }
.journey h3 { margin-bottom: 6px; }
.journey p { color: var(--ink-2); font-size: .95rem; }

/* Bento features */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.tile h3 { font-size: 1.25rem; margin-bottom: 8px; }
.tile p { color: var(--ink-2); margin: 0; }
.tile-wide { grid-column: span 2; }
.tile-ink { background: #17212b url("../img/contours.svg") center / 700px auto; color: #eef1f3; border-color: #17212b; }
.tile-ink p { color: #c3ccd3; }
.tile-sun { background: var(--btn-bg); color: var(--btn-ink); border: 0; }
.tile-sun p { color: #3b2410; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.price-card + .price-card { margin-top: 0; }
.price { font: 800 2.4rem/1.1 var(--serif); letter-spacing: -0.02em; margin: 4px 0 8px; }
.price-free { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px; border-radius: 24px; background: #10161b radial-gradient(600px 300px at 100% 0, #3a2318 0, transparent 70%); color: #eef1f3; }
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 4px; color: #fff; }
.cta-band p { margin: 0; color: #c3ccd3; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { min-height: 0; max-width: 520px; width: 100%; margin: 0 auto; }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey::before { display: none; }
}
@media (max-width: 760px) {
  .hero-band { padding: 36px 0 80px; }
  .hero-stage > :nth-child(1) { width: 78%; margin: 0 0 0 auto; }
  .hero-stage > :nth-child(2) { width: 40%; left: 0; top: auto; bottom: -10%; }
  .hero-stage > :nth-child(3) { display: none; }
  .demo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .demo-row > :nth-child(3) { display: none; }
  .demo-row .demo-open { display: none; }
  .journey { grid-template-columns: 1fr; gap: 0; }
  .journey li { padding: 0 0 22px 62px; min-height: 44px; }
  .journey li::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; border-left: 3px dashed var(--accent); opacity: .55; }
  .journey li:last-child::before { display: none; }
  .stop-n { position: absolute; left: 0; top: 0; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .section { padding-top: 52px; }
  .cta-band { padding: 28px; }
}

/* Dashboard */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.trip { display: flex; flex-direction: column; gap: 8px; }
.trip h3 { margin: 0; font-size: 1.15rem; }
.trip h3 a { color: var(--ink); text-decoration: none; }
.trip h3 a:hover { color: var(--accent); }
.trip .meta { color: var(--muted); font-size: .85rem; }
.trip .row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.stat-list { display: grid; gap: 10px; margin: 0; }
.stat-list div { display: flex; justify-content: space-between; gap: 10px; }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; font-weight: 600; }
.big-number { font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Admin portal ---- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 6px 14px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.admin-nav a:hover { background: var(--bg-2); }
.admin-nav a.active { background: var(--ink); color: var(--surface); }
.admin-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.admin-filters .field { margin-bottom: 0; min-width: 150px; }
.admin-bundle { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-bundle .field { margin-bottom: 0; }
.admin-bundle input[type=text], .admin-bundle input[type=number] { width: 130px; }
.admin-wrap { word-break: break-word; max-width: 360px; }
.admin-pre { max-height: 420px; overflow: auto; background: var(--bg-2); padding: 12px; border-radius: 8px; font-size: .8rem; white-space: pre-wrap; word-break: break-word; }
.admin-subrow { padding-top: 0; }
/* Admin → AI history: a row per call that opens to show the prompt and the reply */
.ai-log { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ai-log-head, .ai-log-row > summary { display: grid; grid-template-columns: 150px minmax(90px, 190px) 140px 170px 1fr; gap: 12px; align-items: center; padding: 9px 14px; }
.ai-log-head { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--bg-2); }
.ai-log-row { border-top: 1px solid var(--line); }
.ai-log-row > summary { cursor: pointer; list-style: none; }
.ai-log-row > summary::-webkit-details-marker { display: none; }
.ai-log-row > summary:hover, .ai-log-row[open] > summary { background: var(--bg-2); }
.ai-log-who, .ai-log-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-log-body { padding: 4px 14px 14px; }
.ai-log-body h4 { margin: 12px 0 6px; font-size: .85rem; }
@media (max-width: 760px) {
  .ai-log-head { display: none; }
  .ai-log-row > summary { grid-template-columns: 1fr 1fr; }
  .ai-log-desc { grid-column: 1 / -1; white-space: normal; }
}
.admin-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.admin-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.admin-thumb { margin: 0; width: 96px; font-size: .72rem; color: var(--muted); }
.admin-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; display: block; background: var(--bg-2); }
.admin-thumb-missing { display: inline-flex; align-items: center; justify-content: center; height: 96px; border: 1px dashed var(--line); border-radius: 6px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 18px; }
.admin-grid-3 { grid-template-columns: repeat(3, 1fr); }
.admin-grid > .card + .card { margin-top: 0; }
@media (max-width: 860px) {
  .admin-grid, .admin-grid-3 { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }

/* Pricing extras */
.price-card { position: relative; }
.price-badge { position: absolute; top: -11px; right: 16px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.currency-switch { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.currency-switch a { color: var(--ink-2); text-decoration: none; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); }
.currency-switch a:hover { border-color: var(--accent); color: var(--accent); }
.currency-switch strong { padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--surface); }

/* Admin pricing */
.pricing-fields { display: grid; grid-template-columns: 2fr .8fr repeat(3, 1fr); gap: 0 12px; align-items: end; }
.pricing-fields .pf-badge { grid-column: span 2; }
.pricing-fields .pf-desc { grid-column: span 3; }
.pricing-fields .pf-sort { grid-column: span 1; }
.pricing-fields .pf-active { grid-column: span 4; }
.money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.money span { padding: 0 0 0 10px; color: var(--muted); font-weight: 700; }
.money input { border: 0; background: transparent; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { width: 18px; height: 18px; accent-color: var(--ok); }
.bundle-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bundle-head h2 { margin: 0; }
.bundle-card.is-draft { border-style: dashed; opacity: .92; }
.bundle-new { border: 2px dashed var(--accent); }
.pricing-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pp-item { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pp-item b { flex: 1; }
.pp-item em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--accent); }
@media (max-width: 760px) {
  .pricing-fields { grid-template-columns: 1fr 1fr; }
  .pricing-fields .pf-name, .pricing-fields .pf-desc, .pricing-fields .pf-badge, .pricing-fields .pf-active { grid-column: 1 / -1; }
  .pricing-preview { grid-template-columns: 1fr; }
}

/* Sale prices */
.price .was { font-size: .55em; font-weight: 600; color: var(--muted); text-decoration-thickness: 2px; text-decoration-color: var(--accent); vertical-align: .35em; margin-right: 4px; }
.price.on-sale { color: var(--accent); }
.sale-tag { display: inline-block; margin-bottom: 6px; background: var(--accent-soft); color: var(--accent); font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.sale-ends { color: var(--accent); margin: -4px 0 6px; font-weight: 600; }
.pf-sale { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px 0; margin: 0 0 14px; }
.pf-sale legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.pf-sale-row { display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr 1.2fr; gap: 0 12px; }
.pp-item s { font-size: .85em; }
@media (max-width: 760px) { .pf-sale-row { grid-template-columns: 1fr 1fr; } }
.pf-sale input[type=date] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; }

/* Analytics consent */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 360px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; font-size: .9rem; animation: rr-up .3s ease-out; }
.consent p { margin: 0 0 10px; }
.consent-actions { display: flex; gap: 8px; }
@keyframes rr-up { from { transform: translateY(12px); opacity: 0; } }
@media (max-width: 520px) { .consent { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* Admin analytics */
.seg-links { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 99px; }
.seg-links a { padding: 6px 14px; border-radius: 99px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.seg-links a.on { background: var(--ink); color: var(--surface); }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.an-kpis .card + .card { margin-top: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.kpi span { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font: 800 1.8rem/1.15 var(--serif); letter-spacing: -0.02em; }
.kpi small { color: var(--muted); }
.delta { font-size: .78rem; font-weight: 700; }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.an-chart { width: 100%; height: auto; display: block; }
.an-chart .grid { stroke: var(--line); stroke-width: 1; }
.an-chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.an-chart .bar { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
.an-chart .bar:hover { fill: var(--accent); }
.an-chart .line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.an-chart .su { fill: var(--ok); }
.an-legend { display: flex; gap: 14px; align-items: center; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -8px; }
.lg.bar { background: color-mix(in srgb, var(--accent) 30%, transparent); } .lg.line { background: var(--ink); height: 3px; } .lg.su { background: var(--ok); border-radius: 50%; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 120px; gap: 12px; align-items: center; padding: 6px 0; }
.fb { background: var(--bg-2); border-radius: 99px; height: 14px; overflow: hidden; }
.fb span { display: block; height: 100%; background: var(--brand-gradient); border-radius: 99px; }
.fv { font-weight: 700; text-align: right; } .fv small { color: var(--muted); font-weight: 600; }
.fn-row .fl { font-weight: 600; } .fn-row .fb span { background: var(--accent-2); } .fn-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.fn-row.fn-drop .fb span { background: var(--warn); } .fn-row.fn-drop .fv small { color: var(--warn); font-weight: 700; }
.fn-note { margin: 10px 0 4px; } .fn-splits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.fn-split { width: 100%; border-collapse: collapse; font-size: .88rem; } .fn-split th, .fn-split td { padding: 6px 6px; text-align: right; white-space: nowrap; } .fn-split th:first-child { text-align: left; }
.fn-split thead th { color: var(--muted); font-weight: 600; font-size: .78rem; } .fn-split td small { color: var(--muted); } .fn-split td.fn-drop { background: var(--warn-soft); border-radius: 4px; }
@media (max-width: 860px) { .fn-splits { grid-template-columns: 1fr; } .funnel-row.fn-row { grid-template-columns: 1fr auto; } .fn-row .fv { white-space: nowrap; } }
.an-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.an-grid .card + .card { margin-top: 0; }
.an-list h3 { font-size: 1rem; }
.an-row { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; font-size: .88rem; border-radius: 6px; overflow: hidden; }
.an-bar { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 24%, transparent); z-index: 0; border-radius: 6px; } /* a see-through tint reads on light and dark pages */
.an-k, .an-v { position: relative; z-index: 1; } .an-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .an-v { font-weight: 700; }
.cohort td, .cohort th { text-align: center; white-space: nowrap; } .cohort td:first-child, .cohort th:first-child { text-align: left; }
.cohort .hc { font-weight: 700; font-size: .85rem; border-radius: 4px; }
@media (max-width: 860px) { .an-grid { grid-template-columns: 1fr; } .funnel-row { grid-template-columns: 1fr 90px; } .funnel-row .fb { grid-column: 1 / -1; order: 3; } }

/* In-app modals (replace prompt/confirm) */
.modal-back { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 11, 14, 0); backdrop-filter: blur(0); transition: background .16s, backdrop-filter .16s; }
.modal-back.in { background: rgba(8, 11, 14, .55); backdrop-filter: blur(3px); }
.modal-card { width: 100%; max-width: 440px; background: #1b222a; color: #eef1f3; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45); padding: 22px 22px 18px; transform: translateY(10px) scale(.98); opacity: 0; transition: transform .16s ease-out, opacity .16s; font-family: "Inter", system-ui, sans-serif; }
.modal-back.in .modal-card { transform: none; opacity: 1; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font: 700 1.25rem/1.2 "Outfit", "Inter", system-ui, sans-serif; letter-spacing: -0.01em; color: #fff; }
.modal-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: #f6b44b; font-size: 1.05rem; flex: none; }
.modal-label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #9aa6b0; margin: 4px 0 6px; }
.modal-input { width: 100%; box-sizing: border-box; font: 500 1.08rem "Inter", system-ui, sans-serif; color: #fff; background: #11171c; border: 1.5px solid #34404a; border-radius: 12px; padding: 13px 14px; outline: none; transition: border-color .12s, box-shadow .12s; }
.modal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.modal-hint, .modal-message { color: #b6c0c8; font-size: .92rem; line-height: 1.45; margin: 8px 0 0; }
.modal-message { margin: 0; }
.modal-error { color: #ff8f7d; font-size: .85rem; margin: 6px 0 0; min-height: 0; }
.modal-error:empty { display: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-btn { font: 700 .95rem "Inter", system-ui, sans-serif; border-radius: 12px; padding: 11px 18px; border: 1px solid transparent; cursor: pointer; }
.modal-btn.primary { background: var(--btn-bg, var(--accent)); color: #fff; }
.modal-btn.primary:hover { filter: brightness(1.06); }
.modal-btn.danger { background: #d9463b; color: #fff; }
.modal-btn.ghost { background: transparent; color: #cfd6dc; border-color: #34404a; }
.modal-btn.ghost:hover { border-color: #52606b; color: #fff; }
@media (max-width: 600px) {
  .modal-back { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(40px); }
  .modal-actions { flex-direction: column-reverse; }
  .modal-btn { width: 100%; padding: 14px; font-size: 1rem; }
}

.demo-map { background: #060b18; }

/* Admin roadmap: tasks as stops along a dashed route */
.rm-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--rm, var(--muted)); }
.rm-chip b { color: var(--ink); }
.rm-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rm-todo { --rm: var(--muted); } .rm-doing { --rm: var(--accent); } .rm-done { --rm: var(--ok); } .rm-parked { --rm: var(--line-strong, var(--muted)); }
.rm-stop.rm-parked .rm-title { color: var(--muted); }
.rm-lock { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.rm-seg button:disabled { opacity: .4; cursor: not-allowed; }
.rm-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.rm-add input { flex: 1 1 260px; min-width: 0; }
.rm-section { margin-top: 26px; }
.rm-h { font: 600 .9rem/1 var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.rm-route { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 12px; }
.rm-route::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; border-left: 2px dashed var(--line); }
.rm-stop { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.rm-stop::before { content: ""; position: absolute; left: -26px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--rm); }
.rm-stop.rm-done .rm-title { color: var(--muted); }
.rm-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.rm-num { font: 500 .75rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.rm-title { font: 600 1.1rem/1.3 var(--serif); margin: 0; flex: 1 1 240px; min-width: 0; }
.rm-area { font: 600 .7rem/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.rm-detail { color: var(--ink-2); margin: 0; white-space: pre-wrap; }
.rm-notes { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.rm-notes p { margin: 4px 0 0; white-space: pre-wrap; }
.rm-label { font: 600 .7rem/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rm-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rm-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0; }
.rm-seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; font: 600 .8rem/1 var(--sans); cursor: pointer; }
.rm-seg button + button { border-left: 1px solid var(--line); }
.rm-seg button[aria-pressed="true"] { background: var(--rm); color: var(--surface); }
.rm-ghost { background: none; border: 0; color: var(--muted); font: 600 .8rem/1 var(--sans); padding: 7px 8px; cursor: pointer; text-decoration: none; }
.rm-ghost:hover { color: var(--ink); }
.rm-danger, .rm-danger:hover { color: var(--err); }
.rm-del { display: inline-flex; align-items: center; }
.rm-del summary { list-style: none; }
.rm-del summary::-webkit-details-marker { display: none; }
.rm-del[open] summary { display: none; }
.rm-when { margin-left: auto; }
.rm-edit { display: grid; gap: 4px; }
.rm-edit .field { margin-bottom: 8px; }
.rm-edit textarea { width: 100%; }
.rm-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; margin: 0; }
.rm-stop { scroll-margin-top: 90px; }

/* Credits: choose how to pay when more than one provider is on */
.pay-with { display: grid; gap: 6px; }
.btn-paypal { background: #ffc439; color: #111; border-color: #ffc439; }
.btn-paypal:hover { background: #f2ba36; }

/* Admin payments */
.pay-now { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; align-items: start; }
.pay-grid .card + .card { margin-top: 0; }
.pay-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-head h2 { margin: 0 auto 0 0; }
.pay-steps { list-style: none; counter-reset: step; padding: 0; margin: 14px 0 0; display: grid; gap: 18px; }
.pay-steps > li { counter-increment: step; position: relative; padding-left: 34px; min-width: 0; }
.pay-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 .8rem/24px var(--sans); text-align: center; }
.pay-steps h3 { margin: 0 0 4px; font-size: 1rem; }
.pay-steps input[type=text], .pay-steps input[type=password] { width: 100%; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.pay-copy { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; min-width: 0; }
.pay-copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.pay-events { margin: 6px 0 0; padding-left: 18px; }
.pay-mode { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.pay-mode legend { font-weight: 600; margin-bottom: 4px; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.pay-err { color: var(--err); }
.pay-steps details { margin-bottom: 10px; }

/* Toggle switch (admin) */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.toggle input[type=checkbox] { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle-track { width: 46px; height: 26px; border-radius: 999px; background: var(--line); transition: background .15s; position: relative; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--ok); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle input:disabled + .toggle-track { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .toggle-track, .toggle-thumb { transition: none; } }

/* Admin payments: sandbox/production */
.map-chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 18px; align-items: start; }
.map-chain .card + .card { margin-top: 0; }
.map-group { margin: 34px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.map-card h3 { margin: 0 auto 0 0; font-size: 1.1rem; }
.map-card.in-use { border-color: var(--accent); }
.map-order { display: flex; flex-wrap: wrap; gap: 8px; }
.map-check { gap: 12px; }
.map-ok { color: var(--ok, #1a7f4b); }
.pay-form input.mono { width: 100%; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.pay-switches { display: grid; gap: 10px; margin: 14px 0 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.pay-switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-switch-label { font-weight: 600; color: var(--muted); }
.pay-switch-label.on { color: var(--ink); }
.pay-switch-label.live { color: var(--err); }
.pay-switch-hint { flex-basis: 100%; }
.pay-card.is-live .pay-switches .toggle input[name=mode]:checked + .toggle-track { background: var(--err); }
.pay-card.is-live { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.pay-hooks { margin: 6px 0 14px; }
.pay-hooks h3 { margin: 0 0 4px; font-size: 1rem; }
.pay-set { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin-top: 10px; }
.pay-set[open] { padding-bottom: 14px; }
.pay-set summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; cursor: pointer; list-style: none; }
.pay-set summary::-webkit-details-marker { display: none; }
.pay-set summary::before { content: "▸"; color: var(--muted); }
.pay-set[open] summary::before { content: "▾"; }
.pay-set-title { font-weight: 700; margin-right: auto; }
.pay-set.active { border-color: var(--accent); }
.pay-form input[type=text], .pay-form input[type=password] { width: 100%; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

/* Landing demos: clickable cards, shuffle/browse, full-size player */
.demo-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.demo-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-row { row-gap: 22px; }
.demo-hit { position: absolute; inset: 0; z-index: 3; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.demo-hit-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(16, 22, 27, .62); opacity: 0; transform: scale(.85); transition: opacity .18s, transform .18s; position: relative; }
.demo-hit-icon::after { content: ""; position: absolute; left: 22px; top: 17px; border-left: 16px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.demo-hit:hover .demo-hit-icon, .demo-hit:focus-visible .demo-hit-icon { opacity: 1; transform: scale(1); }
.demo-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 12px; }
@media (hover: none) { .demo-hit-icon { opacity: .85; transform: scale(.8); width: 44px; height: 44px; } .demo-hit-icon::after { left: 17px; top: 12px; border-left-width: 13px; border-top-width: 10px; border-bottom-width: 10px; } }

.demo-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 0; border-radius: 18px; padding: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: auto; }
.demo-dialog::backdrop { background: rgba(10, 14, 18, .72); backdrop-filter: blur(3px); }
.dd-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dd-titles { flex: 1; min-width: 0; }
.dd-titles h2 { margin: 0; font: 700 1.4rem/1.2 var(--serif); }
.dd-sub { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.dd-close { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dd-stage .dd-card { padding: 0; box-shadow: none; background: transparent; }
.dd-card .demo-screen { aspect-ratio: 16 / 9; max-height: calc(100dvh - 260px); margin: 0 auto; }
.dd-card[data-aspect="4:5"] .demo-screen { aspect-ratio: 4 / 5; }
.dd-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.dd-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; position: relative; }
.dd-play::before, .dd-play::after { content: ""; position: absolute; top: 14px; width: 5px; height: 16px; background: #fff; border-radius: 1px; }
.dd-play::before { left: 15px; } .dd-play::after { left: 24px; }
.dd-play.is-paused::after { display: none; }
.dd-play.is-paused::before { left: 17px; top: 13px; width: 0; height: 0; background: none; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-radius: 0; }
.dd-scrub { flex: 1; min-width: 0; accent-color: var(--accent); }
.dd-time { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.dd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.dd-spacer { flex: 1; }
.browse-dialog { width: min(820px, calc(100vw - 32px)); }
.browse-search { width: 100%; margin-bottom: 10px; }
.browse-dialog .chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.browse-dialog .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.browse-dialog .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.browse-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.browse-item { text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.browse-item:hover, .browse-item:focus-visible { border-color: var(--accent); }
.browse-item b { font-family: var(--serif); }
.browse-item span { font-size: .82rem; color: var(--ink-2); }
.browse-item em { font-style: normal; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.browse-count { margin: 6px 0 8px; }
@media (max-width: 700px) {
  .demo-dialog { padding: 12px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dd-card .demo-screen { max-height: calc(100dvh - 300px); }
  .dd-spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) { .demo-hit-icon { transition: none; } }
.dd-actions .btn { padding: 8px 14px; font-size: .9rem; line-height: 1.2; border-radius: 10px; }

/* Demo player: music on/off */
.dd-sound { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2) no-repeat center / 20px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E"); }
.dd-sound.is-off { opacity: .55; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); }

/* Admin > Appearance */
.ap-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.ap-preset { display: grid; gap: 4px; text-align: left; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.ap-preset.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ap-swatch { height: 34px; border-radius: 8px; background: linear-gradient(90deg, var(--d) 0 25%, var(--a) 25% 50%, var(--b) 50% 75%, var(--c) 75%); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.ap-grid .card + .card { margin-top: 0; }
.ap-colour > div { display: flex; align-items: center; gap: 10px; }
.ap-colour input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.ap-preview { --p-accent: #e8306a; --p-accent2: #0a6cff; --p-btn: #e8306a; --p-radius: 14px; background: #ffffff; color: #111827; border-radius: var(--p-radius); }
.ap-preview[data-bg="warm"] { background: #fffdf8; color: #17212b; }
.ap-preview[data-bg="dark"] { background: #18212c; color: #eef1f5; }
.ap-preview a { color: var(--p-accent); }
.ap-hl { font: 800 1.6rem/1.15 var(--serif); margin: 0 0 8px; }
.ap-hl span { background: linear-gradient(90deg, var(--p-accent2), var(--p-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ap-btn { padding: 10px 18px; border-radius: calc(var(--p-radius) - 4px); background: var(--p-btn); color: #fff; font-weight: 700; }
.ap-btn2 { padding: 9px 16px; border-radius: calc(var(--p-radius) - 4px); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-weight: 600; }
.ap-chip { padding: 5px 12px; border-radius: 99px; background: var(--p-accent2); color: #fff; font-size: .85rem; font-weight: 700; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Pricing cards: light up on hover/focus (or when centred on a phone) with a fan of clips, one per video */
@property --pc-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.price-card[data-videos] { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; isolation: isolate; outline: none; }
.price-card[data-videos]::before { content: ""; position: absolute; inset: -2px; border-radius: calc(var(--radius) + 2px); padding: 3px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--pc-ang), #0a6cff, #00d4f0, #ffd21a, #ff7a1a, #ff2d78, #0a6cff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .2s; }
.price-card[data-videos]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .7) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 160% 0; }
.price-card.is-lit { transform: translateY(-6px) scale(1.02); box-shadow: 0 18px 40px rgba(17, 24, 39, .18), 0 0 0 1px transparent; }
.price-card.is-lit::before { opacity: 1; animation: pc-spin 2.6s linear infinite, pc-glow 1.1s ease-out 1; }
.price-card.is-lit::after { animation: pc-sheen .9s ease-out 1; }
@keyframes pc-spin { to { --pc-ang: 360deg; } }
@keyframes pc-glow { 0% { filter: brightness(1.9) drop-shadow(0 0 10px #ff2d78); } 100% { filter: none; } }
@keyframes pc-sheen { 0% { opacity: 1; background-position: 160% 0; } 100% { opacity: 1; background-position: -60% 0; } }
.pc-clips { position: absolute; left: 50%; bottom: calc(100% + 16px); width: 0; height: 0; pointer-events: none; z-index: 4; }
.pc-clip, .pc-more { position: absolute; bottom: 0; opacity: 0; transform: translate(0, 18px) rotate(0) scale(.3);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 45ms), opacity .2s ease calc(var(--i) * 45ms); }
.pc-clip { left: -23px; width: 46px; height: 66px; border-radius: 8px; background: var(--g); border: 2px solid #fff; box-shadow: 0 8px 18px rgba(17, 24, 39, .28); overflow: hidden; }
.pc-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.pc-clip.has-preview img { opacity: 1; }
.pc-clip.has-preview svg path:first-child { display: none; }
.pc-clip svg { position: relative; z-index: 1; }
.pc-clip svg { display: block; width: 100%; height: 100%; }
.pc-more { left: calc(50% + 120px); padding: 4px 9px; border-radius: 99px; background: #111827; color: #fff; font: 800 .8rem/1 var(--sans); white-space: nowrap; }
.price-card.is-lit .pc-clip { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
.price-card.is-lit .pc-more { opacity: 1; transform: translate(0, -18px) scale(1); }
.pricing.pc-ready { padding-top: 92px; margin-top: -56px; }
@media (max-width: 760px) { .pricing.pc-ready { row-gap: 104px; padding-top: 96px; } }
@media (prefers-reduced-motion: reduce) {
  .price-card[data-videos], .pc-clip, .pc-more { transition: opacity .2s; }
  .price-card.is-lit { transform: none; }
  .price-card.is-lit::before { animation: none; }
  .price-card.is-lit::after { animation: none; }
  .price-card.is-lit .pc-clip, .price-card.is-lit .pc-more { transition-delay: 0s; }
}

/* Close buttons: page cards (help, privacy) and the analytics prompt */
.page-card { position: relative; }
.page-close, .consent-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 400 1.5rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.page-close:hover, .consent-close:hover { border-color: var(--accent); color: var(--accent); }
.consent { position: fixed; }
.consent-close { top: 8px; right: 8px; width: 30px; height: 30px; font-size: 1.2rem; }
.consent p { padding-right: 28px; }
.page-card h1 { padding-right: 48px; }
.price-card .price-badge { z-index: 5; }

/* Hero road traveller: plane for the first half, car for the rest */
.hero-traveller { position: absolute; left: 0; top: 0; z-index: 2; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 6px 14px rgba(0, 0, 0, .35); pointer-events: none; will-change: transform; }
.hero-traveller svg { width: 18px; height: 18px; }
.hero-traveller.swap svg { animation: hero-swap .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes hero-swap { from { transform: scale(.2) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-traveller.swap svg { animation: none; } }

/* My trips: a trip's share link */
.trip-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.trip-share-actions { display: flex; gap: 6px; }
.trip-share .trip-video { order: 2; flex-basis: 100%; }
.trip-included { justify-content: flex-start; }

/* Admin rail data */
.rail-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rail-head h2 { margin: 0; }
.rail-now { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.rail-table td { vertical-align: middle; }
.rail-state { min-width: 180px; }
.rail-region { min-width: 150px; }
@media (max-width: 640px) { .rail-covers { display: none; } }
.rail-bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; margin: 8px 0 4px; max-width: 220px; }
.rail-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.rail-actions { white-space: nowrap; text-align: right; }
.rail-num { white-space: nowrap; }
.rail-actions form, .rail-actions details { margin-left: 4px; }
.rail-logrow td { padding-top: 0; border-bottom-color: var(--line); }
.rail-log { max-height: 200px; margin: 6px 0 0; }
.rail-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.rail-fields input { width: 100%; }
.rail-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.rail-result p { margin: 0 0 6px; }
@media (prefers-reduced-motion: reduce) { .rail-bar span { transition: none; } }

/* Admin → Features */
.ft-head h1 .ft-sub { font-weight: 500; color: var(--muted); font-size: .6em; white-space: nowrap; }
.ft-head p { max-width: 70ch; margin: 6px 0 0; }
.ft-admins { padding: 14px 18px; }
.ft-admins .pay-switch-row { flex-wrap: nowrap; align-items: flex-start; }
.ft-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 14px; padding: 10px 0; background: var(--bg); }
.ft-search { flex: 1 1 260px; min-width: 0; }
.ft-count { font-size: .95rem; color: var(--ink-2); white-space: nowrap; }
.ft-count b { color: var(--ink); font-size: 1.1rem; }
.ft-status { color: var(--ok); min-height: 1.2em; }
.ft-status.bad { color: var(--err); }
.ft-bar form { margin-left: auto; }
.ft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.ft-grid .card + .card { margin-top: 0; }
.ft-group { padding: 16px 18px 6px; }
.ft-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ft-group-head h2 { margin: 0; font-size: 1.1rem; }
.ft-group-blurb { margin: 4px 0 8px; }
.ft-list { list-style: none; margin: 0; padding: 0; }
.ft-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.ft-row .toggle { margin-top: 2px; }
.ft-text { min-width: 0; flex: 1; }
.ft-name { display: block; font-weight: 650; cursor: pointer; }
.ft-desc { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }
.ft-where { margin: 3px 0 0; font-size: .78rem; color: var(--muted); }
.ft-needs { margin: 3px 0 0; font-size: .78rem; color: var(--muted); font-style: italic; }
.ft-needs-off { display: none; }
.ft-row.is-off .ft-name, .ft-row.is-off .ft-desc { color: var(--muted); }
.ft-row.is-blocked .ft-needs { color: var(--warn); font-style: normal; }
.ft-row.is-blocked .ft-needs-off { display: inline; }
.ft-row.is-blocked .toggle-track { opacity: .55; }
.ft-save { grid-column: 1 / -1; }
@media (max-width: 600px) { .ft-head h1 .ft-sub { display: block; white-space: normal; margin-top: 4px; } .ft-bar form { margin-left: 0; } }

/* Admin → Place data */
.places-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 16px; margin: 4px 0 12px; }
.places-region { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.places-region input { margin-top: 4px; }

/* Phones first (roadmap 114): the example player and the in-app boxes, 44 × 44 px to a finger (phone.css has the
   bottom sheets they open as). */
@media (max-width: 760px), (pointer: coarse) {
  .dd-close { width: 44px; height: 44px; }
  .dd-scrub { height: 44px; margin: 0; }
  .dd-actions .btn, .browse-dialog .chip, .modal-btn { min-height: 44px; }
}
