@font-face{font-family:Inter;src:url('../travel/inter-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url('../travel/inter-latin-600-normal.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:Inter;src:url('../travel/inter-latin-700-normal.woff2') format('woff2');font-weight:700;font-display:swap}
/* ============================================================
   Histriphy Travel · interface
   Layers: stage 0 · floating tools 2 · route panel & playback 3 · top bar 4 · drawer 5 · toast 6 · popovers 7
   ============================================================ */

body.histriphy-travel-shell { margin: 0 !important; padding: 0 !important; min-width: 320px; background: #1e1f22 !important; }

.ht {
  /* surfaces */
  --bg: #1e1f22;
  --bg-1: #232428;
  --bg-2: #2a2c30;
  --bg-3: #313338;
  --bg-4: #3a3c42;
  --float: rgba(28, 29, 32, .9);
  --float-solid: #26282c;
  /* lines */
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .2);
  /* text */
  --text: #f3f4f6;
  --text-2: #a9adb5;
  --text-3: #767b84;
  /* interaction */
  --accent: #2f7cf6;
  --accent-hi: #4b8ff8;
  --accent-soft: rgba(59, 126, 240, .16);
  --accent-line: rgba(90, 147, 244, .55);
  --warn: #e7a74a;
  --ok: #4fbf87;
  --brand: #ed2348;
  /* shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 60px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .18s;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
.ht *, .ht *::before, .ht *::after { box-sizing: border-box; }
.ht [hidden] { display: none !important; }
:where(.ht) :where(h1, h2, h3, p) { margin: 0; font: inherit; color: inherit; }
:where(.ht) a { color: inherit; text-decoration: none; }
:where(.ht) :where(button, input, select) { font: inherit; color: inherit; letter-spacing: normal; }
:where(.ht) button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; border: 0; background: transparent; cursor: pointer; line-height: 1.2;
  text-transform: none; box-shadow: none; -webkit-tap-highlight-color: transparent;
}
.ht button:disabled { opacity: .4; cursor: not-allowed; }
:where(.ht) fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.ht) legend { padding: 0; }
.ht :focus { outline: none; }
.ht :focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
:where(.ht) svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
:where(.ht) [data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.ht .ht-sr, .ht-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ht ::selection { background: rgba(59, 126, 240, .4); }

/* ---------- Buttons ---------- */
.ht .ht-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px; gap: 8px;
  border-radius: var(--r-sm); background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow-1);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ht .ht-primary:hover { background: var(--accent-hi); }
.ht .ht-primary:active { transform: translateY(1px); }
.ht .ht-primary svg { width: 18px; height: 18px; }
.ht .ht-primary-lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: var(--r-md); }

.ht .ht-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px; gap: 8px;
  border-radius: var(--r-sm); background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ht .ht-secondary:hover { background: var(--bg-4); border-color: var(--line-3); }
.ht .ht-secondary svg { width: 18px; height: 18px; }

.ht .ht-text-button {
  height: 32px; padding: 0 8px; gap: 6px; border-radius: var(--r-xs);
  color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: color var(--dur), background var(--dur);
}
.ht .ht-text-button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.ht .ht-text-button svg { width: 16px; height: 16px; }

.ht .ht-icon {
  width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); color: var(--text-2);
  transition: color var(--dur), background var(--dur);
}
.ht .ht-icon:hover { color: var(--text); background: rgba(255, 255, 255, .07); }

/* Tooltips for icon-only controls */
.ht [data-tip] { position: relative; }
.ht [data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 20; pointer-events: none;
  left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 2px);
  padding: 5px 8px; border-radius: var(--r-xs); background: #000; color: #fff;
  font-size: 11.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  opacity: 0; transition: opacity .12s, transform .12s; box-shadow: var(--shadow-1);
}
.ht [data-tip]:hover::after, .ht [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
.ht [data-tip-pos="left"]::after { left: auto; right: calc(100% + 8px); bottom: 50%; transform: translate(2px, 50%); }
.ht [data-tip-pos="left"]:hover::after, .ht [data-tip-pos="left"]:focus-visible::after { transform: translate(0, 50%); }
.ht [data-tip-pos^="below"]::after { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -2px); }
.ht [data-tip-pos^="below"]:hover::after, .ht [data-tip-pos^="below"]:focus-visible::after { transform: translate(-50%, 0); }
.ht [data-tip-pos="below-start"]::after { left: 0; transform: translate(0, -2px); }
.ht [data-tip-pos="below-start"]:hover::after, .ht [data-tip-pos="below-start"]:focus-visible::after { transform: none; }
.ht [data-tip-pos="below-end"]::after { left: auto; right: 0; transform: translate(0, -2px); }
.ht [data-tip-pos="below-end"]:hover::after, .ht [data-tip-pos="below-end"]:focus-visible::after { transform: none; }
@media (hover: none) { .ht [data-tip]::after { display: none; } }

/* ---------- Brand ---------- */
.ht-brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; letter-spacing: -.01em; color: var(--text); }
.ht-brand strong { font-weight: 600; }
.ht-brand-mark {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.ht-brand-divider { width: 1px; height: 16px; background: var(--line-3); }
.ht-brand-product { color: var(--text-2); font-weight: 400; }

/* ---------- Site navigation ---------- */
.ht-nav {
  height: 64px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.ht-nav-links { display: flex; align-items: center; gap: 4px; }
.ht-nav-links > a:not(.ht-secondary) {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-xs);
  color: var(--text-2); font-size: 13px; font-weight: 600; transition: color var(--dur), background var(--dur);
}
.ht-nav-links > a:not(.ht-secondary):hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.ht-nav-links svg { width: 14px; height: 14px; }
.ht-nav-links .ht-secondary { height: 32px; margin-left: 8px; }

.ht-brand-product { color: var(--text-2); font-weight: 500; }
.ht-nav-center { display: flex; align-items: center; gap: 4px; justify-self: center; }
.ht-nav-center a {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--r-xs);
  font-size: 14px; font-weight: 600; color: var(--text); opacity: .86; transition: opacity var(--dur), background var(--dur);
}
.ht-nav-center a:hover, .ht-nav-center a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .08); }
.ht-nav { display: grid; grid-template-columns: 1fr auto 1fr; }
.ht-nav > :last-child { justify-self: end; }
.ht-nav-spacer { width: 1px; }

/* ============================================================
   Landing: the product is the hero
   ============================================================ */
.ht-home { min-height: 100dvh; background: var(--bg); }
.ht-nav-over { position: absolute; z-index: 3; left: 0; right: 0; top: 0; background: linear-gradient(to bottom, rgba(10, 11, 13, .55), rgba(10, 11, 13, 0)); }
.ht-showcase { position: relative; height: min(78vh, 820px); min-height: 460px; overflow: hidden; background: #111315; }
.ht-showcase video, .ht-showcase canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-showcase canvas { background: #17191d; }
.ht-showcase video:not([src]) { display: none; }
.ht-showcase-shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(30, 31, 34, 1) 0%, rgba(30, 31, 34, .55) 30%, rgba(30, 31, 34, 0) 100%); pointer-events: none; }
.ht-showcase-action { position: absolute; left: 0; right: 0; bottom: 36px; display: flex; justify-content: center; }
.ht-hero-cta {
  display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .92); background: rgba(20, 21, 24, .35); color: #fff;
  font-size: 17px; font-weight: 600; letter-spacing: -.005em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background var(--dur), transform var(--dur) var(--ease);
}
.ht-hero-cta:hover { background: rgba(255, 255, 255, .14); }
.ht-hero-cta:active { transform: scale(.98); }
.ht-showcase-play {
  position: absolute; right: 20px; bottom: 36px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15, 16, 18, .6); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.ht-showcase-play svg { width: 14px; height: 14px; }
.ht-intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 20px 56px; }
.ht-intro-title { font-size: 17px; font-weight: 600; }
.ht-intro-sub { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.ht-outline-pill {
  margin-top: 18px; display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .85); font-size: 16px; font-weight: 600; color: var(--text);
  transition: background var(--dur);
}
.ht-outline-pill:hover { background: rgba(255, 255, 255, .08); }
.ht-intro-line { margin-top: 32px; font-size: 15px; color: var(--text-2); max-width: 520px; }
.ht-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px 40px; font-size: 12px; color: var(--text-3); }
.ht-footer nav { display: flex; gap: 20px; }
.ht-footer a { color: var(--text-2); }
.ht-footer a:hover { color: var(--text); }

/* ============================================================
   Projects: one obvious action, then your maps
   ============================================================ */
.ht-projects-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.ht-projects-main { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 20px 20px 72px; }
.ht-create-wide.ht-primary { width: 100%; height: 48px; font-size: 15px; border-radius: var(--r-sm); }
.ht-create-wide svg { width: 18px; height: 18px; }
.ht-projects-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
#projects-storage { font-size: 12.5px; color: var(--text-3); }
.ht-project-toolbar { margin: 24px 0 14px; }
.ht-project-tabs { display: flex; gap: 6px; }
.ht-project-tabs button {
  height: 30px; padding: 0 10px; border-radius: var(--r-xs); gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3);
  transition: color var(--dur), background var(--dur);
}
.ht-project-tabs button svg { width: 15px; height: 15px; }
.ht-project-tabs button:hover { color: var(--text); }
.ht-project-tabs button[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, .07); }
.ht-project-tabs span:not([data-icon]) { min-width: 18px; padding: 0 5px; line-height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .08); font-size: 11px; font-variant-numeric: tabular-nums; }
#project-error { margin-bottom: 16px; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(231, 167, 74, .1); color: #f1c98c; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(231, 167, 74, .25); }
#account-reload { margin-bottom: 20px; }

.ht-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.ht-project-card { position: relative; border-radius: var(--r-md); background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--dur), transform var(--dur) var(--ease), background var(--dur); }
.ht-project-card:hover { background: #303238; box-shadow: 0 0 0 1px var(--line-2), 0 10px 28px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.ht-project-open { width: 100%; display: flex !important; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding: 0; text-align: left; border-radius: var(--r-md); }
.ht-project-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; background: var(--bg-3); }
.ht-project-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ht-project-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.ht-flag-row { display: flex; gap: 3px; height: 13px; margin-bottom: 3px; }
.ht-flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.ht-project-title { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; }
.ht-project-places { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-project-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ht-project-card-actions { position: absolute; right: 6px; bottom: 36px; }
.ht-project-more.ht-icon { width: 28px; height: 28px; border-radius: var(--r-xs); color: var(--text-2); opacity: 0; transition: opacity var(--dur), background var(--dur); }
.ht-project-more.ht-icon:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.ht-project-more svg { width: 18px; height: 18px; }
.ht-project-card:hover .ht-project-more, .ht-project-card.menu-open .ht-project-more, .ht-project-more:focus-visible { opacity: 1; }
@media (hover: none) { .ht-project-more.ht-icon { opacity: 1; } }
.ht-project-menu {
  position: absolute; top: 32px; right: 0; z-index: 7; min-width: 168px; padding: 4px;
  border-radius: var(--r-md); background: var(--float-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-3);
  animation: ht-pop .16s var(--ease);
}
.ht-project-menu button, .ht-stop-menu button {
  width: 100%; height: 34px; padding: 0 10px; justify-content: flex-start; gap: 10px; border-radius: var(--r-xs);
  font-size: 13px; font-weight: 500; color: var(--text); text-align: left;
}
.ht-project-menu button svg, .ht-stop-menu button svg { width: 16px; height: 16px; color: var(--text-2); }
.ht-project-menu button:hover, .ht-project-menu button:focus-visible,
.ht-stop-menu button:hover:not(:disabled), .ht-stop-menu button:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.ht-stop-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line); }
.ht-stop-menu [data-remove], .ht-stop-menu [data-remove] svg { color: #f19a9a; }
.ht-projects-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 16px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.ht-empty-mark { width: 44px; height: 44px; border-radius: var(--r-md); margin-bottom: 14px; color: var(--text-2); background: var(--bg-2); }
.ht-empty-mark svg { width: 22px; height: 22px; }
.ht-projects-empty h2 { font-size: 15px; font-weight: 600; }
.ht-projects-empty p { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.ht-footer-center { padding-bottom: 28px; }

/* ============================================================
   Editor: map first, controls float on it
   ============================================================ */
.ht-editor { --top: 0px; --drawer: 0px; position: fixed; inset: var(--top) 0 0; z-index: 1; overflow: hidden; background: #111315; }
.admin-bar .ht-editor { --top: 32px; }
.ht-editor.settings-open { --drawer: 400px; }
.ht-stage { position: absolute; inset: 0 var(--drawer) 0 0; background: #152832; transition: right .2s var(--ease); }
.ht-stage[data-style="night"] { background: #17191d; }
.ht-stage[data-style="paper"] { background: #dadfe2; }
.ht-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.ht-stage canvas:active { cursor: grabbing; }
.ht-stage canvas:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: -2px; }
.ht-stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(12, 13, 15, .55), rgba(12, 13, 15, 0)); }
.ht-stage::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(12, 13, 15, .35), rgba(12, 13, 15, 0)); }
.ht-stage-credit { position: absolute; right: 16px; bottom: 6px; z-index: 2; pointer-events: none; font-size: 10.5px; color: rgba(255, 255, 255, .5); }

/* Top bar: transparent over the map */
.ht-editor-nav {
  position: absolute; top: 0; left: 0; right: var(--drawer); z-index: 4; height: 64px; padding: 0 16px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: right .2s var(--ease);
}
.ht-editor-left, .ht-editor-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ht-editor-actions { gap: 10px; }
.ht-brand-compact { gap: 8px; margin-right: 6px; font-size: 17px; }
.ht-brand-compact .ht-brand-mark { width: 24px; height: 24px; }
.ht-back-projects { height: 32px; padding: 0 10px 0 6px; gap: 4px !important; border-radius: var(--r-xs); font-size: 14px; font-weight: 600; color: var(--text); }
.ht-back-projects svg { width: 18px; height: 18px; }
.ht-back-projects:hover { background: rgba(255, 255, 255, .08); }
.ht-title-label { display: block; min-width: 0; margin-left: 6px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .18); }
.ht-title-label input {
  width: clamp(110px, 20vw, 260px); height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-xs); background: transparent;
  color: var(--text-2); font-size: 14px; font-weight: 500; text-overflow: ellipsis; transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.ht-title-label input:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.ht-title-label input:focus { background: rgba(0, 0, 0, .35); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); outline: none; }
.ht-save-indicator { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font-size: 12px; color: var(--text-3); white-space: nowrap; cursor: default; }
.ht-save-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.ht-save-indicator[data-state="saving"] i { background: var(--text-3); animation: ht-pulse 1s ease-in-out infinite; }
.ht-save-indicator[data-state="warn"] i { background: var(--warn); }
.ht-save-indicator[data-state="warn"] { color: #e3b574; }
.ht-settings-toggle.ht-icon { width: 40px; height: 40px; border-radius: 50%; color: var(--text); }
.ht-settings-toggle svg { width: 22px; height: 22px; }
.ht-settings-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.ht-export-button.ht-primary { height: 40px; padding: 0 16px 0 20px; border-radius: 999px; font-size: 14px; gap: 6px; }

/* Journey: stops are chips, legs sit between them */
.ht-itinerary { position: absolute; z-index: 3; top: 76px; left: 20px; width: max-content; max-width: min(340px, calc(100% - 40px)); max-height: calc(100% - 76px - 96px); display: flex; flex-direction: column; }
.ht-itinerary-header { order: 3; padding: 10px 0 0 26px; }
.ht-itinerary-header .ht-text-button { height: 28px; padding: 0 8px 0 6px; font-size: 12px; gap: 4px; color: var(--text-2); background: rgba(24, 25, 28, .55); }
.ht-itinerary-header .ht-text-button:hover { background: rgba(24, 25, 28, .85); }
.ht-itinerary-header svg { width: 14px; height: 14px; }
#stop-list { list-style: none; margin: 0; padding: 0 16px 0 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
#stop-list::-webkit-scrollbar { display: none; }
#stop-list:empty { display: none; }
.ht-stop { position: relative; }
.ht-stop-main { position: relative; display: flex; align-items: center; gap: 4px; height: 44px; }
.ht-stop-grip {
  position: relative; width: 22px; height: 30px; flex-shrink: 0; padding: 0; border-radius: 5px; color: rgba(255, 255, 255, .72);
  cursor: grab !important; touch-action: none; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.ht-stop-grip svg { position: absolute; width: 14px; height: 14px; left: 4px; top: 8px; opacity: 0; transition: opacity var(--dur); }
.ht-stop-num { transition: opacity var(--dur); }
.ht-stop-main:hover .ht-stop-grip svg, .ht-stop-grip:focus-visible svg { opacity: 1; }
.ht-stop-main:hover .ht-stop-num, .ht-stop-grip:focus-visible .ht-stop-num { opacity: 0; }
.ht-stop-grip:active { cursor: grabbing !important; }
.ht-stop-name {
  min-width: 0; max-width: 280px; height: 38px; padding: 0 16px 0 12px; gap: 9px !important; justify-content: flex-start !important;
  border-radius: 999px; background: rgba(24, 25, 28, .9); color: var(--text); text-align: left;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 2px 8px rgba(0, 0, 0, .28);
  transition: background var(--dur), box-shadow var(--dur);
}
.ht-stop-name:hover, .ht-stop-name[aria-expanded="true"] { background: rgba(38, 40, 44, .96); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .28); }
.ht-stop-name[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent-hi); }
.ht-stop-flag { display: inline-flex; width: 20px; height: 14px; flex-shrink: 0; align-items: center; justify-content: center; color: var(--text-2); }
.ht-stop-flag img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.ht-stop-flag svg { width: 16px; height: 16px; }
.ht-stop-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.ht-stop-sub { display: none; }

.ht-stop-leg { position: relative; display: flex; align-items: center; height: 32px; padding-left: 26px; }
.ht-stop-leg::before { content: ""; position: absolute; left: 10px; top: -8px; bottom: -8px; border-left: 2px dotted rgba(255, 255, 255, .45); }
.ht-stop-leg select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 0; top: 0; }
.ht-leg-button {
  height: 28px; padding: 0 12px 0 9px !important; gap: 7px !important; border-radius: 999px;
  background: rgba(24, 25, 28, .62); color: var(--text) !important; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); transition: background var(--dur), box-shadow var(--dur);
}
.ht-leg-button svg { width: 16px; height: 16px; }
.ht-leg-button:hover { background: rgba(38, 40, 44, .92); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.ht-leg-button[aria-expanded="true"] { background: var(--accent); box-shadow: none; }
.ht-leg-mode { display: none; }

.ht-stop.is-dragging { opacity: .4; }
.ht-stop.is-drop-target .ht-stop-name { box-shadow: 0 0 0 2px var(--accent-hi); }

.ht-itinerary-footer { order: 2; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0 26px; }
.ht-distance { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.ht-distance:empty { display: none; }
.ht-distance::before {
  content: ""; width: 15px; height: 15px; background: currentColor; opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='18' r='2'/%3E%3Ccircle cx='18' cy='6' r='2'/%3E%3Cpath d='M8 18h7.5a3.5 3.5 0 0 0 0-7h-7a3.5 3.5 0 0 1 0-7H16'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='18' r='2'/%3E%3Ccircle cx='18' cy='6' r='2'/%3E%3Cpath d='M8 18h7.5a3.5 3.5 0 0 0 0-7h-7a3.5 3.5 0 0 1 0-7H16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ht-hint { font-size: 11px; color: rgba(255, 255, 255, .55); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ht-empty { display: none; }

/* Search: bottom left, results rise above it */
.ht-search-dock { position: absolute; z-index: 4; left: 20px; bottom: 20px; width: min(560px, calc(100% - 40px - 440px - 12px)); min-width: 320px; }
.ht-place-form {
  display: flex; align-items: center; height: 52px; padding: 0 8px 0 10px; gap: 10px;
  border-radius: var(--r-md); background: rgba(40, 42, 46, .94); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-2);
  transition: box-shadow var(--dur), background var(--dur);
}
.ht-place-form:focus-within { background: rgba(44, 46, 51, .98); box-shadow: 0 0 0 2px var(--accent-hi), var(--shadow-2); }
.ht-place-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: var(--text); }
.ht-place-icon svg { width: 18px; height: 18px; }
#place-search { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 15px; outline: none; }
#place-search::placeholder { color: var(--text-3); }
.ht-search-submit { width: 36px; height: 36px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); color: var(--text-3); transition: background var(--dur), color var(--dur); }
.ht-search-submit svg { width: 18px; height: 18px; }
#place-search:not(:placeholder-shown) ~ .ht-search-submit { background: var(--accent); color: #fff; }
#search-message { font-size: 12px; color: #fff; padding: 0 4px 8px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
#search-message:empty { display: none; }
.ht-results {
  margin-bottom: 8px; max-height: min(360px, 52vh); overflow-y: auto; padding: 6px;
  border-radius: var(--r-md); background: rgba(40, 42, 46, .98); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-3);
  animation: ht-rise .16s var(--ease);
}
.ht-result { width: 100%; min-height: 48px; padding: 6px 10px; gap: 12px !important; justify-content: flex-start !important; border-radius: var(--r-sm); text-align: left; }
.ht-result-icon { width: 22px; height: 16px; flex-shrink: 0; color: var(--text-2); }
.ht-result-icon svg { width: 18px; height: 18px; }
.ht-result-icon img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.ht-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht-result-text > span { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-result-text small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-result .ht-country-code { display: none; }
.ht-result:hover { background: rgba(255, 255, 255, .06); }
.ht-result[aria-selected="true"] { background: var(--accent); }
.ht-result[aria-selected="true"] small, .ht-result[aria-selected="true"] .ht-result-icon { color: rgba(255, 255, 255, .85); }

/* Empty project: calm globe, one prompt, search ready */
.ht-editor.is-empty .ht-itinerary { top: auto; bottom: 88px; max-height: none; }
.ht-editor.is-empty .ht-empty { display: block; padding: 0 4px 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); animation: ht-rise .28s var(--ease); }
.ht-editor.is-empty .ht-itinerary-header, .ht-editor.is-empty .ht-map-tools, .ht-editor.is-empty .ht-stage::after { display: none; }
.ht-empty-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.ht-empty-sub { margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, .72); }
.ht-editor.is-empty .ht-place-form { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 6px rgba(47, 124, 246, .12), var(--shadow-2); }

/* Map tools */
.ht-map-tools {
  position: absolute; right: 16px; bottom: 84px; z-index: 2; display: flex; flex-direction: column; padding: 3px; gap: 2px;
  border-radius: var(--r-md); background: rgba(40, 42, 46, .9); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-2);
}
.ht-map-tools .ht-icon { width: 34px; height: 34px; border-radius: 7px; color: var(--text); }
.ht-map-tools .ht-icon:hover { background: rgba(255, 255, 255, .1); }
.ht-map-tools svg { width: 18px; height: 18px; }

/* Playback: bottom right, same height as search */
.ht-playback {
  position: absolute; z-index: 3; right: calc(var(--drawer) + 16px); bottom: 20px; width: min(420px, calc(100% - 32px)); height: 52px; padding: 0 12px 0 8px;
  display: flex; align-items: center; gap: 12px; border-radius: var(--r-md);
  background: rgba(40, 42, 46, .94); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-2);
  transition: right .2s var(--ease); animation: ht-rise .22s var(--ease);
}
.ht-play-button { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; transition: transform var(--dur) var(--ease), background var(--dur); }
.ht-play-button:hover:not(:disabled) { background: var(--accent-hi); }
.ht-play-button:active:not(:disabled) { transform: scale(.95); }
.ht-play-button svg { width: 15px; height: 15px; }
.ht-play-button[aria-label^="Play"] svg { margin-left: 2px; }
#journey-progress { --p: 100%; flex: 1; min-width: 60px; height: 20px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
#journey-progress::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent-hi) var(--p), rgba(255, 255, 255, .16) var(--p)); }
#journey-progress::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
#journey-progress::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent-hi); }
#journey-progress::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transform: scale(0); transition: transform .14s var(--ease); }
#journey-progress::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 0; background: #fff; transform: scale(0); transition: transform .14s var(--ease); }
#journey-progress:hover::-webkit-slider-thumb, #journey-progress:active::-webkit-slider-thumb, #journey-progress:focus-visible::-webkit-slider-thumb { transform: scale(1); }
#journey-progress:hover::-moz-range-thumb, #journey-progress:active::-moz-range-thumb, #journey-progress:focus-visible::-moz-range-thumb { transform: scale(1); }
#journey-progress:focus-visible { outline: none; }
#journey-time { font-size: 12.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.ht-playback-format { height: 22px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 5px; background: rgba(255, 255, 255, .08); font-size: 11px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Tune styles drawer */
.ht-settings { position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; width: 400px; display: flex; flex-direction: column; background: var(--float-solid); box-shadow: -1px 0 0 var(--line-2); animation: ht-drawer .2s var(--ease); }
.ht-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 12px 0 24px; }
.ht-drawer-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ht-drawer-heading .ht-icon { color: var(--text); }
.ht-settings-body { flex: 1; overflow-y: auto; padding: 4px 24px 32px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.ht-panel + .ht-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.ht-panel-title { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.ht-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.ht-row-stack { flex-direction: column; align-items: stretch; gap: 10px; padding: 6px 0 10px; }
.ht-row-label { font-size: 14px; font-weight: 500; color: var(--text); }

.ht-style-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ht-style-options button { position: relative; height: 60px; padding: 0; overflow: hidden; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow var(--dur); }
.ht-style-thumb { position: absolute; inset: 0; }
.ht-style-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ht-style-name {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 7px; padding: 18px 9px 7px;
  font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}
.ht-radio { width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); transition: background var(--dur), border-color var(--dur); }
.ht-style-options button:hover { box-shadow: 0 0 0 1px var(--line-3); }
.ht-style-options button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff; }
.ht-style-options button[aria-pressed="true"] .ht-radio { border-color: #fff; background: #fff radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px); }

.ht-segments { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .25); }
.ht-segments button { height: 30px; padding: 0 12px; border-radius: 6px; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: color var(--dur), background var(--dur); }
.ht-segments button svg { width: 15px; height: 15px; }
.ht-segments button:hover { color: var(--text); }
.ht-segments button[aria-pressed="true"] { color: #fff; background: var(--accent); }
.ht-segments-compact button { padding: 0 9px; font-variant-numeric: tabular-nums; }
.ht-native-select { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.ht-checkbox { cursor: pointer; }
.ht-checkbox input {
  -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 36px; height: 20px; margin: 0;
  border-radius: 10px; background: var(--bg-4); cursor: pointer; transition: background var(--dur);
}
.ht-checkbox input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #d7dade; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); transition: transform var(--dur) var(--ease); }
.ht-checkbox input:checked { background: var(--accent); }
.ht-checkbox input:checked::after { transform: translateX(16px); background: #fff; }

.ht-route-colors > div { display: flex; gap: 8px; }
.ht-route-colors button { width: 24px; height: 24px; padding: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); transition: box-shadow var(--dur), transform var(--dur); }
.ht-route-colors button:hover { transform: scale(1.08); }
.ht-route-colors [data-route-color="blue"] { background: #58adff; }
.ht-route-colors [data-route-color="orange"] { background: #ffac69; }
.ht-route-colors [data-route-color="pink"] { background: #ee8ec1; }
.ht-route-colors [data-route-color="white"] { background: #ffffff; }
.ht-route-colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--float-solid), 0 0 0 4px #fff; }

.ht-format-options { display: flex; align-items: center; gap: 6px; }
.ht-format-options button { width: 44px; height: 40px; padding: 0; border-radius: var(--r-sm); background: rgba(0, 0, 0, .22); color: var(--text-2); transition: background var(--dur), color var(--dur), box-shadow var(--dur); }
.ht-format-options button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.ht-format-options button[aria-pressed="true"] { color: var(--accent-hi); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.ht-frame { display: block; border: 2px solid currentColor; border-radius: 3px; }
.ht-frame-square { width: 20px; height: 20px; }
.ht-frame-landscape { width: 26px; height: 16px; }
.ht-frame-portrait { width: 14px; height: 24px; }
.ht-format-options button[aria-pressed="true"] .ht-frame { background: rgba(75, 143, 248, .22); }
.ht-format-size { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
#panel-output .ht-format-options { min-height: 48px; }
.ht-project-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(0, 0, 0, .18); }
.ht-subhead { font-size: 13.5px; font-weight: 600; }
.ht-project-actions p:not(.ht-subhead) { font-size: 12px; color: var(--text-3); }
.ht-data-credit { margin-top: 28px; font-size: 11px; color: var(--text-3); }
.ht-data-credit a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-3); }

/* Stop menu and transport list */
.ht-stop-menu { position: absolute; z-index: 7; width: 212px; padding: 4px; border-radius: var(--r-md); background: var(--float-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-3); animation: ht-pop .16s var(--ease); }
.ht-transport-picker {
  position: absolute; z-index: 7; width: 280px; max-height: min(520px, calc(100% - 96px)); display: flex; flex-direction: column;
  border-radius: var(--r-md); background: var(--float-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-3);
  animation: ht-pop .16s var(--ease); overflow: hidden;
}
.ht-picker-head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ht-picker-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-picker-title small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.ht-picker-head .ht-icon { width: 32px; height: 32px; color: var(--text-2); }
.ht-picker-head .ht-icon svg { width: 18px; height: 18px; }
.ht-picker-list { overflow-y: auto; padding: 6px; }
.ht-picker-label { display: flex; align-items: center; gap: 10px; margin: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.ht-picker-label::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.ht-picker-list button {
  width: 100%; height: 40px; padding: 0 12px; justify-content: flex-start; gap: 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--text); transition: background var(--dur);
}
.ht-picker-list button svg { width: 22px; height: 22px; }
.ht-picker-list button:hover, .ht-picker-list button:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.ht-picker-list button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ht-picker-list button[aria-pressed="true"]::after { content: ""; margin-left: auto; width: 12px; height: 7px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-2px) rotate(-45deg); }

/* Toast */
.ht-toast { position: absolute; z-index: 6; left: 50%; top: 76px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: var(--r-md); background: #f3f4f6; color: #111; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-3); animation: ht-fade .2s var(--ease); }

/* Rename */
.ht dialog { color: var(--text); }
.ht-rename-dialog { width: min(380px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--float-solid); color: var(--text); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-3); }
.ht-rename-dialog[open] { animation: ht-dialog .2s var(--ease); }
.ht-rename-dialog::backdrop, .ht-export-dialog::backdrop { background: rgba(8, 9, 10, .5); }
.ht-rename-dialog form { padding: 20px; }
.ht-rename-dialog h2 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.ht-rename-dialog input { width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: rgba(0, 0, 0, .3); color: var(--text); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-2); }
.ht-rename-dialog input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-hi); }
.ht-rename-dialog form > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Export: a right-hand "Create your video" panel */
.ht-export-dialog {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100%); height: 100%; max-height: none; max-width: none; padding: 0; border: 0;
  background: var(--float-solid); color: var(--text); box-shadow: -1px 0 0 var(--line-2), var(--shadow-3); overflow-y: auto;
}
.ht-export-dialog[open] { display: flex; flex-direction: column; animation: ht-drawer .22s var(--ease); }
.ht-export-dialog.no-anim[open] { animation: none; }
.ht-export-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 24px 28px; }
.ht-export-title { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); }
.ht-export-title span { font-size: 11.5px; color: var(--text-3); }
.ht-export-title strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-export-format { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#export-details { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.ht-export-dialog.is-recording .ht-format-inline { pointer-events: none; opacity: .5; }
.ht-export-preview { --ph: min(400px, 48vh); height: var(--ph); display: grid; place-items: center; border-radius: var(--r-md); background: #121315; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
#export-canvas { display: block; max-width: calc(100% - 24px); max-height: calc(var(--ph) - 24px); width: auto; height: auto; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.ht-export-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; display: none; }
.ht-export-progress i { display: block; height: 100%; width: 0; background: var(--accent-hi); transition: width .2s linear; }
.ht-export-dialog.is-recording .ht-export-progress { display: block; }
#export-status { font-size: 12.5px; color: var(--text-2); }
#export-status:empty { display: none; }
.ht-export-dialog.is-done #export-status { color: #8fd9b3; }
.ht-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ht-export-actions > div { display: flex; flex-direction: column; gap: 6px; }
.ht-export-actions button { width: 100%; height: 44px; }
.ht-export-actions .ht-secondary { background: transparent; border: 1px solid rgba(255, 255, 255, .5); }
.ht-export-actions .ht-secondary:hover { background: rgba(255, 255, 255, .06); border-color: #fff; }
.ht-export-actions .ht-primary { font-size: 14px; }
.ht-export-actions p { font-size: 12px; color: var(--text-3); }
.ht-cancel-record { align-self: center; }
.ht-nojs { padding: 32px; color: var(--text-2); }

/* Motion */
@keyframes ht-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ht-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ht-drawer { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ht-dialog { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ht-pulse { 50% { opacity: .35; } }
@keyframes ht-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ht-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ht *, .ht *::before, .ht *::after { animation: none !important; transition: none !important; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) and (min-width: 768px) {
  .ht-search-dock { width: calc(100% - 40px - var(--drawer) - 340px); }
  .ht-playback { width: 320px; }
  .ht-editor.settings-open .ht-title-label, .ht-editor.settings-open .ht-save-indicator { display: none; }
}
@media (max-width: 767px) {
  .ht-nav { height: 56px; padding: 0 12px; grid-template-columns: auto 1fr; }
  .ht-nav-center { justify-self: end; }
  .ht-nav-center a { padding: 0 8px; font-size: 13px; }
  .ht-nav-center .ht-back-site, .ht-nav-spacer, .ht-projects-page .ht-nav-links { display: none; }
  .ht-brand strong { display: none; }
  .ht-showcase { height: 72vh; min-height: 420px; }
  .ht-hero-cta { height: 46px; font-size: 16px; }
  .ht-showcase-play { bottom: 40px; right: 14px; }
  .ht-projects-main { padding: 16px 14px 56px; }
  .ht-project-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .admin-bar .ht-editor { --top: 46px; }
  .ht-editor.settings-open { --drawer: 0px; }
  .ht-editor-nav { height: 56px; padding: 0 8px 0 10px; }
  .ht-brand-compact strong, .ht-back-projects span:last-child, .ht-save-indicator span { display: none; }
  .ht-brand-compact { margin-right: 0; }
  .ht-back-projects { padding: 0 6px; }
  .ht-title-label { flex: 1; margin-left: 2px; padding-left: 8px; }
  .ht-title-label input { width: 100%; }
  .ht-editor-actions { gap: 4px; }
  .ht-export-button.ht-primary { height: 36px; padding: 0 14px; }
  .ht-export-button [data-icon] { display: none; }
  .ht-settings-toggle.ht-icon { width: 36px; height: 36px; }

  .ht-itinerary { top: 60px; left: 10px; max-width: calc(100% - 64px); max-height: calc(100% - 60px - 150px); }
  .ht-stop-main { height: 40px; }
  .ht-stop-name { height: 34px; padding: 0 14px 0 10px; }
  .ht-stop-title { font-size: 14px; }
  .ht-stop-leg { height: 28px; }
  .ht-leg-button { height: 26px; }
  .ht-hint { display: none; }
  .ht-search-dock { left: 10px; right: 10px; bottom: 10px; width: auto; min-width: 0; }
  .ht-place-form { height: 50px; }
  #place-search { font-size: 16px; }
  .ht-playback { left: 10px; right: 10px; bottom: 70px; width: auto; height: 48px; }
  .ht-editor:not(.has-route) .ht-search-dock ~ .ht-playback { display: none; }
  .ht-map-tools { top: 64px; bottom: auto; right: 8px; }
  .ht-stage-credit { display: none; }
  .ht-editor.is-empty .ht-itinerary { top: auto; bottom: 70px; max-width: calc(100% - 20px); }
  .ht-editor.settings-open .ht-itinerary, .ht-editor.settings-open .ht-search-dock, .ht-editor.settings-open .ht-playback { display: none; }

  .ht-settings { top: auto; left: 0; width: 100%; height: min(66dvh, 600px); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -1px 0 var(--line-2), var(--shadow-3); animation-name: ht-sheet; }
  .ht-settings::before { content: ""; position: absolute; top: 6px; left: 50%; width: 32px; height: 3px; margin-left: -16px; border-radius: 2px; background: var(--line-3); }
  .ht-settings-body { padding: 0 18px calc(24px + env(safe-area-inset-bottom)); }
  .ht-drawer-heading { padding-left: 18px; }
  .ht-transport-picker { width: min(300px, calc(100% - 16px)); }
  .ht-stop-menu { left: auto !important; right: 12px; }
  .ht-export-dialog { width: 100%; }
  .ht-export-body { padding: 4px 16px 24px; }
  .ht-export-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   Story extras: emoji, photos, music
   ============================================================ */
.ht-stop-emoji { font-size: 16px; line-height: 1; margin-left: -2px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ht-stop-photo { width: 22px; height: 22px; flex-shrink: 0; margin-right: -8px; border-radius: 50%; background: center / cover no-repeat; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.ht-emoji-picker { width: 300px; padding-bottom: 12px; }
.ht-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 10px 10px 4px; }
.ht-emoji-grid button {
  height: 32px; padding: 0; border-radius: var(--r-xs); font-size: 20px; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; transition: background var(--dur), transform var(--dur) var(--ease);
}
.ht-emoji-grid button:hover, .ht-emoji-grid button:focus-visible { background: rgba(255, 255, 255, .1); transform: scale(1.12); outline: none; }
.ht-emoji-grid button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.ht-emoji-custom { display: flex; gap: 6px; padding: 6px 12px 0; }
.ht-emoji-custom input {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: rgba(0, 0, 0, .3);
  color: var(--text); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-2);
}
.ht-emoji-custom input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-hi); }
.ht-emoji-custom .ht-secondary { height: 36px; }
.ht-emoji-clear { margin: 8px 8px 0; color: #f19a9a !important; }
.ht-picker-note { padding: 8px 14px 0; font-size: 11.5px; color: var(--text-3); }
.ht-music-row .ht-secondary { height: 32px; font-size: 12.5px; padding: 0 12px; }
.ht-music-row .ht-secondary svg { width: 16px; height: 16px; }
.ht-music-detail { display: flex; align-items: center; gap: 10px; margin: -4px 0 4px; padding: 8px 6px 8px 12px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .2); }
.ht-music-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-music-volume input { width: 96px; accent-color: var(--accent); }
.ht-music-detail .ht-icon { width: 30px; height: 30px; }
.ht-music-detail .ht-icon svg { width: 16px; height: 16px; }
.ht-music-note { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.ht-music-note.is-error { color: #f1c98c; }

.ht-plan-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 0 7px;font-size:13px;color:var(--text-2)}
.ht-plan-strip a{color:var(--accent-hi);font-weight:600}.ht-plan-strip a span{font-weight:400;color:var(--text-2);margin-left:8px}
.ht-map-status{position:absolute;left:50%;top:76px;transform:translateX(-50%);max-width:min(420px,80%);padding:8px 12px;border-radius:8px;background:var(--float-solid);color:var(--text);font-size:12px;z-index:3;pointer-events:none}.ht-map-status:empty{display:none}
.ht-style-options{grid-template-columns:repeat(3,minmax(0,1fr))}.ht-imagery-thumb{background:radial-gradient(ellipse at 65% 40%,#748765 0 22%,#d5bb96 23% 42%,#326379 43% 100%)}.ht-relief-thumb{background:repeating-linear-gradient(145deg,#b8b1a3 0 5px,#ded7c9 6px 14px,#b5b2a8 18px)}
.ht-danger{color:#f3a5a5!important}.ht-danger-button{background:#ae343d!important;color:#fff!important}.ht-delete-body{padding:24px}.ht-delete-body h2{font-size:18px;font-weight:600}.ht-delete-body p{font-size:14px;color:var(--text-2);margin:12px 0 24px}.ht-delete-body>div{display:flex;justify-content:flex-end;gap:8px}
.ht-project-open:disabled{opacity:.7;cursor:default}.ht-plan-note{font-size:13px;color:var(--text-2)}
.ht-pricing-page{min-height:100dvh;background:var(--bg);color:var(--text)}.ht-pricing-main{width:min(880px,calc(100% - 40px));margin:72px auto 80px;text-align:center}.ht-pricing-main h1{font-size:clamp(30px,5vw,46px);font-weight:600;letter-spacing:-.035em;margin:0 0 10px}.ht-pricing-main>p{color:var(--text-2);font-size:16px}.ht-plans{display:grid;grid-template-columns:1fr 1fr;gap:20px;text-align:left;margin-top:42px}.ht-plans article{padding:30px;border:1px solid var(--line-2);background:var(--bg-2);border-radius:16px}.ht-plans .ht-plan-pro{border-color:var(--accent)}.ht-plans h2{font-size:16px;font-weight:600}.ht-plans .ht-price{font-size:40px;line-height:1.3;letter-spacing:-.03em;color:var(--text);margin:18px 0 4px;font-weight:600}.ht-price span{font-size:13px;letter-spacing:0;color:var(--text-2);font-weight:400}.ht-plans article>p:not(.ht-price){font-size:13px;color:var(--text-2)}.ht-plans ul{list-style:none;padding:0;margin:28px 0;font-size:14px;line-height:2.1;color:var(--text-2)}.ht-plans ul li::before{content:'✓';color:var(--accent-hi);padding-right:10px}.ht-plans a{width:100%;text-align:center}.ht-plans a:not([href]){opacity:.65;cursor:default}.ht-pricing-main .ht-pricing-note{font-size:12px;margin-top:24px}.ht-export-dialog a.ht-primary{display:flex;align-items:center;justify-content:center;min-height:42px}
.ht-stage-credit{max-width:calc(100% - 30px);font-size:10px!important;pointer-events:none}
@media(max-width:767px){.ht-plan-strip{align-items:flex-start;font-size:12px}.ht-plan-strip a span{display:block;margin:3px 0}.ht-plans{grid-template-columns:1fr}.ht-pricing-main{margin-top:40px}.ht-stage-credit{display:block!important;bottom:132px!important;right:10px!important;max-width:calc(100% - 20px);text-align:right}.ht-map-status{top:62px}.ht-plans article{padding:24px}.ht-style-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ht{--accent:#246ad8;--accent-button-hover:#2263cc}
.ht .ht-primary:hover,.ht-play-button:hover:not(:disabled){background:var(--accent-button-hover)}
.ht[data-skin="ocean"]{--bg:#101b25;--bg-1:#14222e;--bg-2:#172632;--bg-3:#203342;--bg-4:#2b4050;--float:rgba(23,38,50,.94);--float-solid:#172632;--accent:#246b80;--accent-button-hover:#28667b;--accent-hi:#77d2e5;--accent-soft:rgba(70,174,199,.16)}

#places-credit{display:block;font-family:inherit;font-size:10px;line-height:1.4;font-weight:400;color:var(--muted,#a5abb2);padding:2px 12px 6px}#places-credit[hidden]{display:none}#places-credit a{color:inherit}
