/* Timeline Visualizer 1.4.0
 * Navy accent (#003049), red highlight (#d62828) and a gray-blue slate (#4b6277) on a white canvas.
 * Dark mode: deep navy canvas built from the accent hue, ALL text white.
 * Weights 400/500/600 only. Spacing on a 4/8 grid. Body 16px. */

:root {
  --tv-accent: #003049;
  --tv-hi: #d62828;
  --tv-slate: #4b6277;
  --tv-slate-dark: #3b5064;
  --tv-slate-soft: #e9eff4;
  --tv-bg: #ffffff;
  --tv-surface: #f1f5f8;
  --tv-text: #1b2d37;
  --tv-head: #003049;
  --tv-muted: #4a5d68;
  --tv-line: rgba(0, 48, 73, 0.14);
  --tv-line-strong: rgba(0, 48, 73, 0.28);
  --tv-shadow: 0 1px 3px rgba(0, 48, 73, 0.06);
  --tv-on-accent: #ffffff;
  --tv-btn-bg: var(--tv-slate-dark);
  --tv-link: #b4232a;
  --tv-focus: var(--tv-hi);
  --tv-radius: 12px;
  --tv-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --tv-wide: 1200px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --tv-bg: #00141f;
  --tv-surface: #00263a;
  --tv-text: #ffffff;
  --tv-head: #ffffff;
  --tv-muted: #ffffff;
  --tv-line: rgba(255, 255, 255, 0.2);
  --tv-line-strong: rgba(255, 255, 255, 0.4);
  --tv-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --tv-btn-bg: var(--tv-hi);
  --tv-link: #ffffff;
  --tv-focus: #ffffff;
  color-scheme: dark;
}

/* ---------- Base ---------- */
.tv-body { margin: 0; background: var(--tv-bg); color: var(--tv-text); font-family: var(--tv-font); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.tv-body *, .tv-body *::before, .tv-body *::after { box-sizing: border-box; }
.tv-body img { max-width: 100%; height: auto; }
.tv-body a { color: var(--tv-link); text-underline-offset: 3px; }
.tv-body h1, .tv-body h2, .tv-body h3, .tv-body h4 { color: var(--tv-head); font-weight: 600; margin: 0 0 8px; }
.tv-body h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.15; letter-spacing: -0.01em; }
.tv-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.25; margin-top: 48px; }
.tv-body h3 { font-size: 1.125rem; line-height: 1.3; }
.tv-body p { margin: 0 0 16px; max-width: 72ch; }
.tv-body :focus-visible { outline: 2px solid var(--tv-focus); outline-offset: 2px; }
.tv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-skip { position: absolute; left: 16px; top: -64px; z-index: 1000; background: var(--tv-accent); color: #fff !important; padding: 12px 16px; border-radius: 8px; }
.tv-skip:focus { top: 16px; }
.tv-wrap { width: 100%; max-width: var(--tv-wide); margin: 0 auto; padding: 0 24px; }
.tv-wrap-narrow { max-width: 860px; }
html[data-theme="dark"] .tv-body, html[data-theme="dark"] .tv-body * { color: #fff; }
html[data-theme="dark"] .tv-body a { text-decoration: underline; }

/* ---------- Header ---------- */
.tv-header { position: sticky; top: 0; z-index: 500; background: var(--tv-bg); border-bottom: 1px solid var(--tv-line); }
.tv-header-in { max-width: var(--tv-wide); margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; gap: 24px; }
.tv-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; font-weight: 600; font-size: 1.125rem; color: var(--tv-head) !important; min-height: 44px; }
.tv-brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--tv-accent); position: relative; flex: none; border: 1px solid var(--tv-line-strong); }
.tv-brand-mark::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 7px; height: 3px; background: #fff; border-radius: 2px; transform: skewY(-22deg); transform-origin: left; }
.tv-brand-mark::after { content: ""; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--tv-hi); border: 2px solid #fff; }
.tv-nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.tv-nav-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tv-nav-link, .tv-dd-btn, .tv-theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--tv-text) !important; font: 500 0.9375rem/1 var(--tv-font); text-decoration: none !important; cursor: pointer; }
.tv-nav-link:hover, .tv-dd-btn:hover, .tv-theme-toggle:hover { background: var(--tv-surface); border-color: var(--tv-line); }
.tv-nav-link.tv-current { border-bottom: 2px solid var(--tv-hi); border-radius: 8px 8px 0 0; }
.tv-lang-btn, .tv-theme-toggle { border-color: var(--tv-line); }
.tv-theme-toggle { width: 44px; padding: 0; justify-content: center; }
.tv-caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.tv-dd { position: relative; }
.tv-dd-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; margin: 0; padding: 8px; list-style: none; background: var(--tv-bg); border: 1px solid var(--tv-line-strong); border-radius: var(--tv-radius); box-shadow: 0 8px 24px rgba(0, 48, 73, 0.12); z-index: 600; }
.tv-lang-menu { left: auto; right: 0; min-width: 200px; }
.tv-dd.is-open > .tv-dd-menu { display: block; }
.tv-dd-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none !important; color: var(--tv-text) !important; font-weight: 500; }
.tv-dd-menu a:hover { background: var(--tv-surface); }
.tv-dd-menu a[aria-current] { box-shadow: inset 3px 0 0 var(--tv-hi); font-weight: 600; }
html[data-theme="dark"] .tv-dd-menu { background: var(--tv-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.tv-ico { width: 20px; height: 20px; background: currentColor; display: inline-block; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tv-ico-globe { --m: 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'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3 3 15 0 18M12 3c-3 3-3 15 0 18'/%3E%3C/svg%3E"); }
.tv-ico-theme { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
html[data-theme="dark"] .tv-ico-theme { --m: 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'%3E%3Ccircle cx='12' cy='12' r='4' fill='black'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.tv-nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--tv-line); border-radius: 8px; background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.tv-burger, .tv-burger::before, .tv-burger::after { display: block; width: 20px; height: 2px; background: var(--tv-head); position: relative; content: ""; }
.tv-burger::before { position: absolute; top: -6px; } .tv-burger::after { position: absolute; top: 6px; }
html[data-theme="dark"] .tv-burger, html[data-theme="dark"] .tv-burger::before, html[data-theme="dark"] .tv-burger::after { background: #fff; }

@media (max-width: 860px) {
  .tv-header-in { gap: 8px; }
  .tv-nav-toggle { display: inline-flex; }
  .tv-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 24px 24px; background: var(--tv-bg); border-bottom: 1px solid var(--tv-line-strong); max-height: calc(100vh - 64px); overflow-y: auto; }
  .tv-nav.is-open { display: flex; }
  .tv-nav-tools { margin-left: 0; padding-top: 8px; border-top: 1px solid var(--tv-line); justify-content: space-between; }
  .tv-dd-menu { position: static; box-shadow: none; margin-top: 4px; min-width: 0; }
  .tv-lang-menu { position: absolute; right: auto; left: 0; }
}

/* ---------- Hero ---------- */
.tv-hero { padding: 48px 0 24px; }
.tv-hero-slim { padding: 32px 0 8px; }
.tv-lede { font-size: 1.125rem; color: var(--tv-muted); max-width: 62ch; }
.tv-proof-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; font-size: 0.9375rem; font-weight: 500; }
.tv-proof-list li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tv-hi); margin-right: 8px; }
.tv-dates { font-size: 0.875rem; color: var(--tv-muted); margin: 8px 0 0; }
.tv-main { padding-bottom: 64px; }

/* ---------- Tool ---------- */
.tv-tool-section { margin: 24px 0 32px; }
.tv-tool { background: var(--tv-surface); border: 1px solid var(--tv-line); border-radius: 16px; padding: 24px; box-shadow: var(--tv-shadow); }
.tv-tool-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tv-tool-heading { margin: 0 !important; font-size: 1.25rem !important; }
.tv-proof { font-size: 0.875rem; font-weight: 500; }
.tv-tool-desc { margin: 8px 0 24px; font-size: 0.9375rem; }
.tv-tool-workspace { display: grid; gap: 24px; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: start; }
.tv-tool-inputs { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tv-tool-visuals { position: relative; min-width: 0; }
.tv-dropzone { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; background: var(--tv-bg); border: 2px dashed var(--tv-line-strong); border-radius: var(--tv-radius); cursor: pointer; }
.tv-dropzone.is-drag, .tv-dropzone:focus-visible { border-color: var(--tv-hi); }
.tv-upload-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--tv-accent); display: grid; place-items: center; font-size: 1.5rem; line-height: 1; }
.tv-upload-mark span { color: #fff !important; }
.tv-dropzone-copy { display: flex; flex-direction: column; gap: 4px; }
.tv-dropzone-copy span { font-size: 0.875rem; color: var(--tv-muted); }
.tv-file-button, .tv-btn, .tv-play { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--tv-line-strong); background: var(--tv-bg); color: var(--tv-text); font: 500 0.9375rem/1.2 var(--tv-font); cursor: pointer; text-decoration: none !important; position: relative; }
.tv-file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tv-btn:hover, .tv-file-button:hover { border-color: var(--tv-accent); }
html[data-theme="dark"] .tv-btn:hover, html[data-theme="dark"] .tv-file-button:hover { border-color: #fff; }
.tv-btn-primary, .tv-play, .tv-btn.is-selected, .tv-btn.is-active { background: var(--tv-btn-bg); border-color: var(--tv-btn-bg); color: #fff !important; }
.tv-btn-primary { font-weight: 600; }
.tv-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.tv-btn[hidden], .tv-gmaps[hidden] { display: none; }
.tv-sample { align-self: stretch; }
.tv-mode-extra { display: flex; flex-direction: column; gap: 12px; }
.tv-mode-note { font-size: 0.875rem; color: var(--tv-muted); }
.tv-mode-extra input[type="text"], .tv-mode-extra input[type="search"], .tv-mode-extra select, .tv-settings input[type="text"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--tv-line-strong); border-radius: 8px; background: var(--tv-bg); color: var(--tv-text); font: inherit; }
html[data-theme="dark"] .tv-body input, html[data-theme="dark"] .tv-body select { background: var(--tv-bg); }
.tv-body ::placeholder { color: var(--tv-muted); opacity: 0.7; }
html[data-theme="dark"] .tv-body ::placeholder { color: #fff; opacity: 0.7; }

.tv-map { width: 100%; height: 520px; border-radius: var(--tv-radius); border: 1px solid var(--tv-line-strong); overflow: hidden; background: var(--tv-surface); z-index: 1; }
.tv-map.is-placing { cursor: crosshair; outline: 3px solid var(--tv-hi); outline-offset: -3px; }
.tv-map-fallback { padding: 24px; }
.tv-progress { position: relative; height: 6px; margin: -6px 1px 0; background: rgba(0, 48, 73, 0.2); z-index: 5; border-radius: 0 0 var(--tv-radius) var(--tv-radius); overflow: hidden; pointer-events: none; }
.tv-progress-fill { display: block; height: 100%; width: 0; background: var(--tv-hi); }
.tv-photo-popup { display: none; position: absolute; left: 16px; bottom: 32px; width: min(220px, 40%); padding: 6px; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 48, 73, 0.25); z-index: 800; }
.tv-photo-popup img { display: block; width: 100%; border-radius: 8px; }
.tv-video-wrap { display: none; position: relative; margin-top: 16px; }
.tv-tool-visuals.has-preview .tv-video-wrap { display: block; }
.tv-video-canvas { width: 100%; height: auto; border-radius: var(--tv-radius); border: 1px solid var(--tv-line-strong); background: var(--tv-bg); max-height: 70vh; object-fit: contain; }
.tv-caption-overlay { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; pointer-events: none; }

.tv-quick-controls { margin-top: 24px; }
.tv-playback-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.tv-speed-options { display: inline-flex; gap: 4px; }
.tv-readout { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 0.9375rem; max-width: none; }
.tv-readout strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.tv-readout-distance { color: var(--tv-hi); }
html[data-theme="dark"] .tv-body .tv-readout-distance { color: #fff; }

.tv-settings { margin-top: 16px; border: 1px solid var(--tv-line); border-radius: var(--tv-radius); background: var(--tv-bg); }
.tv-settings summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; cursor: pointer; }
.tv-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 8px 16px 16px; }
.tv-setting-group { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.tv-setting-group legend { font-weight: 600; font-size: 0.875rem; padding: 0; margin-bottom: 8px; }
.tv-setting-group label { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 0.9375rem; }
.tv-setting-group small { font-size: 0.75rem; flex-basis: 100%; }
.tv-privacy-settings { flex-direction: column; align-items: flex-start; }
.tv-radius-options { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tv-export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tv-export-row .tv-btn-primary { min-width: 180px; background: var(--tv-hi); border-color: var(--tv-hi); }
.tv-status { margin: 16px 0 0; font-weight: 500; max-width: none; }
.tv-status-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tv-trips { font-size: 0.875rem; margin: 4px 0 0; }
.tv-privacy { font-size: 0.875rem; margin: 16px 0 0; max-width: none; }
.tv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 16px; }
.tv-stat { background: var(--tv-bg); border: 1px solid var(--tv-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tv-stat-num { font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--tv-head); }
.tv-stat-label { font-size: 0.875rem; }
.tv-results { margin-top: 16px; }
.tv-result video, .tv-result img { width: 100%; max-width: 720px; border-radius: var(--tv-radius); border: 1px solid var(--tv-line-strong); display: block; margin-bottom: 8px; }

/* Photos */
.tv-photo-box { background: var(--tv-bg); border: 1px solid var(--tv-line); border-radius: var(--tv-radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tv-photo-title { margin: 0 !important; }
.tv-photo-unplaced { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; }
.tv-photo-place { width: 100%; justify-content: flex-start; font-size: 0.875rem; }
.tv-photo-place img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.tv-photo-count, .tv-photo-hint { font-size: 0.875rem; margin: 0; }
.tv-pm-options { display: flex; flex-direction: column; gap: 12px; }
.tv-pm-options label { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; font-weight: 500; }
.tv-pm-options .tv-check { flex-direction: row; align-items: center; min-height: 32px; }
.tv-pin { background: transparent !important; border: 0 !important; }
.tv-pin-in { position: relative; width: 48px; height: 48px; }
.tv-pin-in img, .tv-pin-dot { display: block; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; box-shadow: 0 1px 6px rgba(0, 48, 73, 0.4); background: var(--tv-accent); }
.tv-pin-in b { position: absolute; right: -6px; top: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--tv-hi); color: #fff !important; font-size: 0.75rem; font-weight: 600; line-height: 22px; text-align: center; border: 2px solid #fff; }
.leaflet-container { font-family: var(--tv-font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #fff; color: #1b2d37; }
.leaflet-popup-content { margin: 12px 16px; font-size: 0.875rem; }
.leaflet-container a.leaflet-popup-close-button { color: #1b2d37; }
.tv-pop { display: flex; flex-direction: column; gap: 4px; }
.tv-pop-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 4px; }
.tv-pop-photo { width: 100%; border-radius: 6px; display: block; }
html[data-theme="dark"] .tv-body .leaflet-popup-content-wrapper, html[data-theme="dark"] .tv-body .leaflet-popup-tip { background: var(--tv-surface); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .tv-body .leaflet-container a.leaflet-popup-close-button { color: #fff; }
.tv-body .tv-pop a, .tv-body .tv-pop-link { font-weight: 600; }
.tv-body .leaflet-control-attribution { background: rgba(255, 255, 255, 0.85); }
html[data-theme="dark"] .tv-body .leaflet-control-attribution { background: rgba(0, 20, 31, 0.85); }
html[data-theme="dark"] .tv-body .leaflet-control-attribution a { color: #fff; }
html[data-theme="dark"] .tv-body .leaflet-bar a { background: var(--tv-surface); border-color: var(--tv-line-strong); }

/* Lists, calendar, visited marks */
.tv-mark-list, .tv-visit-list, .tv-days-list { display: flex; flex-direction: column; border: 1px solid var(--tv-line); border-radius: var(--tv-radius); background: var(--tv-bg); max-height: 360px; overflow: auto; }
.tv-mark-item, .tv-visit-row, .tv-days-row, .tv-year-row { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--tv-line); min-height: 44px; }
.tv-mark-item:last-child, .tv-visit-row:last-child { border-bottom: 0; }
.tv-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tv-cal-day { border: 1px solid var(--tv-line); border-radius: 8px; padding: 4px; min-height: 40px; font-size: 0.875rem; background: var(--tv-bg); }
.tv-big-number { font-size: 2rem; font-weight: 600; }
.tv-diagnosis, .tv-fix { font-weight: 500; }

/* ---------- Content (mt-*) ---------- */
.tv-article { margin-top: 24px; }
.tv-article > .mt-answer, .tv-editorial-content > .mt-answer { font-size: 1.1875rem; line-height: 1.55; padding-left: 16px; border-left: 4px solid var(--tv-hi); }
.mt-byline { font-size: 0.875rem; color: var(--tv-muted); }
.mt-card, .tv-card, .mt-trust, .tv-trust { background: var(--tv-surface); border: 1px solid var(--tv-line); border-radius: var(--tv-radius); padding: 24px; margin: 24px 0; box-shadow: var(--tv-shadow); }
.mt-card h2, .tv-card h2, .mt-trust h2 { margin-top: 0; font-size: 1.25rem; }
.mt-tablewrap { overflow-x: auto; border: 1px solid var(--tv-line-strong); border-radius: var(--tv-radius); background: var(--tv-bg); margin: 16px 0 24px; }
.mt-tablewrap table, .tv-article table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.mt-tablewrap th, .mt-tablewrap td, .tv-article td, .tv-article th { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--tv-line); vertical-align: top; }
.mt-tablewrap th, .tv-article th { background: var(--tv-surface); font-weight: 600; }
.mt-tablewrap tr:last-child td { border-bottom: 0; }
.mt-faqs { border: 1px solid var(--tv-line); border-radius: var(--tv-radius); background: var(--tv-bg); }
.mt-faqs p { margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--tv-line); max-width: none; }
.mt-faqs p:last-child { border-bottom: 0; }
.mt-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mt-related a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--tv-line-strong); border-radius: 8px; text-decoration: none; font-weight: 500; }
.mt-related a:hover { border-color: var(--tv-accent); }
.tv-article ul, .tv-article ol { max-width: 72ch; padding-left: 24px; }
.tv-article li { margin-bottom: 8px; }

/* ---------- Home sections ---------- */
.tv-section { margin-top: 48px; }
.tv-section > h2 { margin-top: 0; }
.tv-steps-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.tv-steps-list li { counter-increment: step; background: var(--tv-surface); border: 1px solid var(--tv-line); border-radius: var(--tv-radius); padding: 24px; }
.tv-steps-list li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tv-accent); color: #fff !important; font-weight: 600; margin-bottom: 16px; }
html[data-theme="dark"] .tv-steps-list li::before { background: var(--tv-hi); }
.tv-tool-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tv-tool-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px; background: var(--tv-bg); border: 1px solid var(--tv-line-strong); border-radius: var(--tv-radius); text-decoration: none !important; color: var(--tv-text) !important; }
.tv-tool-card strong { color: var(--tv-head); font-size: 1.0625rem; font-weight: 600; }
.tv-tool-card span { font-size: 0.9375rem; }
.tv-tool-card:hover { border-color: var(--tv-accent); box-shadow: var(--tv-shadow); }
html[data-theme="dark"] .tv-tool-card:hover { border-color: #fff; }
.tv-reviews, .tv-review-form { margin-top: 32px; }

/* ---------- Footer ---------- */
.tv-footer { background: var(--tv-accent); margin-top: 48px; }
html[data-theme="dark"] .tv-footer { background: var(--tv-surface); border-top: 1px solid var(--tv-line); }
.tv-footer, .tv-footer * { color: #fff !important; }
.tv-footer-in { max-width: var(--tv-wide); margin: 0 auto; padding: 48px 24px 32px; }
.tv-footer-top { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 48px; }
.tv-footer-brand p { font-size: 0.875rem; margin-top: 16px; }
.tv-footer .tv-brand-mark { background: #fff; border-color: #fff; }
.tv-footer .tv-brand-mark::before { background: var(--tv-accent); }
.tv-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px 24px; }
.tv-footer-col h2 { font-size: 0.9375rem; margin: 0 0 16px !important; font-weight: 600; }
.tv-footer-col ul { list-style: none; margin: 0; padding: 0; }
.tv-footer-col li { margin: 0; }
.tv-footer-col a { display: inline-block; padding: 6px 0; font-size: 0.875rem; text-decoration: none; }
.tv-footer-col a:hover, .tv-footer-col a[aria-current] { text-decoration: underline; }
.tv-footer-note { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.75rem; max-width: none; }
@media (max-width: 860px) { .tv-footer-top { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Responsive tool ---------- */
@media (max-width: 960px) {
  .tv-tool-workspace { grid-template-columns: minmax(0, 1fr); }
  .tv-map { height: 400px; }
  .tv-tool { padding: 16px; }
}
@media (max-width: 480px) {
  .tv-wrap, .tv-header-in, .tv-footer-in { padding-left: 16px; padding-right: 16px; }
  .tv-hero { padding-top: 32px; }
  .tv-map { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { .tv-body * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }


/* =====================================================================
   1.3.0 — gray-blue + red look, compact one-screen tool, settings panel
   ===================================================================== */

/* ---------- Header: gray-blue bar with a red rule (light) ---------- */
html:not([data-theme="dark"]) .tv-header { background: var(--tv-slate-dark); border-bottom: 3px solid var(--tv-hi); }
html:not([data-theme="dark"]) .tv-header .tv-brand,
html:not([data-theme="dark"]) .tv-header .tv-nav-link,
html:not([data-theme="dark"]) .tv-header .tv-dd-btn,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle,
html:not([data-theme="dark"]) .tv-header .tv-lang-btn { color: #ffffff !important; }
html:not([data-theme="dark"]) .tv-header .tv-lang-btn,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle,
html:not([data-theme="dark"]) .tv-header .tv-nav-toggle { border-color: rgba(255, 255, 255, 0.35); }
html:not([data-theme="dark"]) .tv-header .tv-nav-link:hover,
html:not([data-theme="dark"]) .tv-header .tv-dd-btn:hover,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }
html:not([data-theme="dark"]) .tv-header .tv-nav-link.tv-current { border-bottom-color: #ff8a8a; }
html:not([data-theme="dark"]) .tv-header .tv-burger,
html:not([data-theme="dark"]) .tv-header .tv-burger::before,
html:not([data-theme="dark"]) .tv-header .tv-burger::after { background: #ffffff; }
html:not([data-theme="dark"]) .tv-header .tv-brand-mark { background: #ffffff; border-color: #ffffff; }
html:not([data-theme="dark"]) .tv-header .tv-brand-mark::before { background: var(--tv-slate-dark); }
.tv-header-in { min-height: 56px; }
.tv-brand, .tv-nav-link, .tv-dd-btn, .tv-theme-toggle { min-height: 40px; }
html[data-theme="dark"] .tv-header { background: var(--tv-surface); border-bottom: 3px solid var(--tv-hi); }
/* menus keep a light panel with dark text, whatever the header colour */
html:not([data-theme="dark"]) .tv-header .tv-dd-menu { background: #ffffff; border-color: var(--tv-slate); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a { color: var(--tv-text) !important; }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a:hover { background: var(--tv-slate-soft); }
@media (max-width: 860px) {
  html:not([data-theme="dark"]) .tv-nav { background: var(--tv-slate-dark); border-bottom: 3px solid var(--tv-hi); }
}

/* ---------- Compact hero ---------- */
.tv-hero { padding: 16px 0 6px; background: linear-gradient(180deg, var(--tv-slate-soft), var(--tv-bg)); }
html[data-theme="dark"] .tv-hero { background: linear-gradient(180deg, var(--tv-surface), var(--tv-bg)); }
.tv-hero-slim { padding: 16px 0 4px; }
.tv-body .tv-h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 2px; padding-left: 12px; border-left: 5px solid var(--tv-hi); }
.tv-lede { font-size: 0.9375rem; margin: 0 0 6px !important; max-width: none !important; }
.tv-proof-list { font-size: 0.8125rem; gap: 2px 18px; }
.tv-hero .tv-dates { margin: 2px 0 0; }

/* ---------- Red + gray-blue touches ---------- */
.tv-body h2:not(.tv-tool-heading)::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--tv-hi); margin-top: 8px; }
.tv-footer-col h2::after, .tv-card h2::after, .mt-card h2::after, .mt-trust h2::after { display: none !important; }
.tv-footer { background: var(--tv-slate-dark); border-top: 4px solid var(--tv-hi); }
.tv-steps-list li, .tv-card, .mt-card { border-top: 3px solid var(--tv-slate); }
.tv-tool-card { border-left: 4px solid var(--tv-hi); }
.mt-tablewrap th, .tv-article th { background: var(--tv-slate-soft); }
html[data-theme="dark"] .mt-tablewrap th, html[data-theme="dark"] .tv-article th { background: var(--tv-surface); }
html[data-theme="dark"] .tv-steps-list li, html[data-theme="dark"] .tv-card, html[data-theme="dark"] .mt-card { border-top-color: var(--tv-hi); }
html[data-theme="dark"] .tv-tool-card { border-left-color: var(--tv-hi); }
html[data-theme="dark"] .tv-body h2:not(.tv-tool-heading)::after { background: var(--tv-hi); }
.tv-stat-num { color: var(--tv-hi); }
html[data-theme="dark"] .tv-body .tv-stat-num { color: #ff6b6b; }
html[data-theme="dark"] .tv-body .tv-readout-distance { color: #ff6b6b; }
html[data-theme="dark"] .tv-body .tv-h1 { border-left-color: var(--tv-hi); }
html[data-theme="dark"] .tv-tool { border-top: 3px solid var(--tv-hi); }
html[data-theme="dark"] .tv-body .tv-proof-list li::before { background: var(--tv-hi); }

/* ---------- Tool: compact two-column layout that fits the first screen ---------- */
.tv-tool-section { margin: 10px 0 20px; }
.tv-tool { background: var(--tv-slate-soft); border: 1px solid var(--tv-slate); border-top: 3px solid var(--tv-hi); border-radius: 14px; padding: 12px 14px 14px; }
html[data-theme="dark"] .tv-tool { background: var(--tv-surface); border-color: var(--tv-line-strong); }
.tv-tool-top { margin-bottom: 2px; }
.tv-tool-heading { font-size: 1.0625rem !important; }
.tv-proof { font-size: 0.8125rem; }
.tv-tool-desc { margin: 0 0 8px; font-size: 0.8125rem; line-height: 1.35; max-width: none !important; }
.tv-tool-workspace { grid-template-columns: minmax(330px, 410px) minmax(0, 1fr); gap: 14px; }
.tv-tool-inputs { gap: 8px; }
.tv-dropzone { flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border-width: 2px; border-color: var(--tv-slate); background: var(--tv-bg); }
.tv-dropzone.is-drag, .tv-dropzone:hover { border-color: var(--tv-hi); }
.tv-upload-mark { width: 32px; height: 32px; flex: none; font-size: 1.25rem; background: var(--tv-hi); }
.tv-dropzone-copy { flex: 1; min-width: 0; gap: 0; }
.tv-dropzone-copy strong { font-size: 0.875rem; }
.tv-dropzone-copy span { font-size: 0.6875rem; line-height: 1.25; }
.tv-file-button, .tv-btn, .tv-play { min-height: 34px; padding: 0 12px; font-size: 0.8125rem; }
.tv-file-button { position: relative; flex: none; }
.tv-sample { align-self: stretch; }
.tv-mode-extra { gap: 6px; }
.tv-mode-extra .tv-mode-note, .tv-mode-note { margin: 0; font-size: 0.8125rem; max-width: none; display: flex; align-items: center; gap: 8px; }
.tv-mode-extra input[type="text"], .tv-mode-extra input[type="search"], .tv-mode-extra select, .tv-settings input[type="text"], .tv-select { min-height: 34px !important; padding: 0 10px; font-size: 0.8125rem; border: 1px solid var(--tv-slate); border-radius: 8px; background: var(--tv-bg); color: var(--tv-text); }
.tv-body .tv-mode-extra p { margin-bottom: 0; }

/* Settings card with tabs */
.tv-settings { margin: 0; border: 1px solid var(--tv-slate); border-radius: 12px; background: var(--tv-bg); overflow: hidden; }
.tv-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; background: var(--tv-slate-dark); }
html[data-theme="dark"] .tv-settings-head { background: var(--tv-bg); border-bottom: 1px solid var(--tv-line); }
.tv-settings-title { font-weight: 600; font-size: 0.8125rem; color: #fff !important; padding: 8px 0; }
.tv-tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; }
.tv-tab { min-height: 34px; padding: 0 9px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: rgba(255, 255, 255, 0.85) !important; font: 500 0.8125rem/1 var(--tv-font); cursor: pointer; white-space: nowrap; }
.tv-tab:hover { color: #fff !important; background: rgba(255, 255, 255, 0.1); }
.tv-tab.is-active { color: #fff !important; border-bottom-color: #ff6b6b; font-weight: 600; }
.tv-tabpanel { padding: 8px 10px 10px; min-height: 214px; display: flex; flex-direction: column; gap: 6px; }
.tv-tabpanel[hidden] { display: none; }
.tv-row { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 8px; }
.tv-lab { font-size: 0.75rem; font-weight: 600; color: var(--tv-head); }
.tv-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.tv-seg .tv-btn { flex: 1 1 auto; min-height: 30px; padding: 0 8px; font-size: 0.75rem; border-radius: 7px; background: var(--tv-slate-soft); border-color: var(--tv-slate-soft); color: var(--tv-text); }
html[data-theme="dark"] .tv-seg .tv-btn { background: var(--tv-surface); border-color: var(--tv-line-strong); }
.tv-seg .tv-btn:hover { border-color: var(--tv-slate); }
.tv-body .tv-seg .tv-btn.is-selected, .tv-body .tv-track.is-selected { background: var(--tv-btn-bg); border-color: var(--tv-btn-bg); color: #fff !important; }
.tv-swatch { gap: 6px; }
.tv-swatch i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.tv-select { width: 100%; }
.tv-select-sm { width: auto; flex: none; min-height: 30px !important; }
.tv-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tv-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; cursor: pointer; min-height: 26px; }
.tv-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tv-slider { position: relative; width: 34px; height: 20px; border-radius: 10px; background: #a7b4c0; flex: none; transition: background 0.15s; }
.tv-slider::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.tv-switch input:checked + .tv-slider { background: var(--tv-hi); }
.tv-switch input:checked + .tv-slider::after { transform: translateX(14px); }
.tv-switch input:focus-visible + .tv-slider { outline: 2px solid var(--tv-focus); outline-offset: 2px; }
.tv-switch-top { font-weight: 600; justify-content: space-between; width: 100%; flex-direction: row-reverse; }
.tv-music-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tv-music-list.is-off { opacity: 0.45; }
.tv-music-list li { display: flex; align-items: center; gap: 6px; }
.tv-play-mini { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--tv-slate); background: var(--tv-bg); color: var(--tv-hi) !important; font-size: 0.6875rem; cursor: pointer; }
.tv-play-mini:hover { background: var(--tv-hi); color: #fff !important; border-color: var(--tv-hi); }
.tv-track { flex: 1; justify-content: flex-start; min-height: 30px; font-size: 0.8125rem; background: var(--tv-slate-soft); border-color: var(--tv-slate-soft); position: relative; cursor: pointer; }
html[data-theme="dark"] .tv-track { background: var(--tv-surface); border-color: var(--tv-line-strong); }
.tv-music-upload { padding-left: 36px; }
.tv-music-upload .tv-track input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tv-music-file-name { font-size: 0.6875rem; opacity: 0.75; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-hint { font-size: 0.6875rem; line-height: 1.3; }
.tv-radius-options { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8125rem; }
.tv-radius-options label { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; }
.tv-tabpanel .tv-photo-box { padding: 8px 10px; border: 0; background: transparent; gap: 6px; }
.tv-tabpanel .tv-photo-box .tv-mode-note { display: block; font-size: 0.75rem; line-height: 1.35; }

/* Export + status */
.tv-export-row { margin-top: 0; gap: 6px; }
.tv-export-row .tv-btn-primary { flex: 1; min-height: 40px; font-size: 0.9375rem; }
.tv-export-row .tv-gmaps { flex: none; }
.tv-status { margin: 0; font-size: 0.8125rem; line-height: 1.3; min-height: 1.3em; }

/* Map column: height follows the window so everything stays in the first view */
.tv-map { height: clamp(300px, calc(100vh - 290px), 560px); border-color: var(--tv-slate); }
.tv-quick-controls { margin-top: 10px; }
.tv-playback-controls { gap: 8px 12px; }
.tv-play { background: var(--tv-hi); border-color: var(--tv-hi); color: #fff !important; min-width: 84px; font-weight: 600; }
.tv-play:hover { filter: brightness(0.92); }
.tv-readout { font-size: 0.8125rem; gap: 2px 14px; }
.tv-video-wrap { margin-top: 8px; }
.tv-progress-fill { background: var(--tv-hi); }
.tv-body .tv-tool-visuals .tv-map[data-mapstyle="dark"] .leaflet-tile-pane { filter: invert(1) grayscale(0.65) brightness(0.8); }
.tv-body .tv-tool-visuals .tv-map[data-mapstyle="black"] .leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(0.6); }
.tv-body .tv-tool-visuals .tv-map[data-mapstyle="grayscale"] .leaflet-tile-pane { filter: grayscale(1); }
.tv-body .tv-tool-visuals .tv-map[data-mapstyle="voyager"] .leaflet-tile-pane { filter: saturate(0.85) brightness(0.98) hue-rotate(-4deg); }
.tv-privacy { margin: 6px 0 0; font-size: 0.75rem; }

@media (max-width: 960px) {
  .tv-tool-workspace { grid-template-columns: minmax(0, 1fr); }
  .tv-map { height: 340px; }
  .tv-tabpanel { min-height: 0; }
}
@media (max-width: 480px) {
  .tv-row { grid-template-columns: 1fr; gap: 4px; }
  .tv-map { height: 300px; }
}

/* ---- 1.3.0 tightening pass: first-screen fit ---- */
.tv-header-in { min-height: 52px; }
.tv-hero { padding: 10px 0 4px; }
.tv-hero .tv-wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 20px; row-gap: 0; }
.tv-hero .tv-h1 { grid-row: 1 / span 2; margin: 0; }
.tv-hero .tv-lede { margin: 0 !important; }
.tv-hero .tv-proof-list { margin: 0; }
.tv-hero .tv-dates { grid-column: 2; }
@media (max-width: 900px) { .tv-hero .tv-wrap { display: block; } .tv-hero .tv-h1 { margin-bottom: 4px; } }
.tv-tool-section { margin: 8px 0 16px; }
.tv-tool { padding: 8px 12px 12px; }
.tv-tool-top { flex-wrap: nowrap; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.tv-tool-top .tv-tool-heading { white-space: nowrap; }
.tv-tool-top .tv-tool-desc { flex: 1; margin: 0; font-size: 0.75rem; line-height: 1.3; color: var(--tv-muted); }
.tv-tool-top .tv-proof { white-space: nowrap; }
@media (max-width: 760px) { .tv-tool-top { flex-wrap: wrap; } .tv-tool-top .tv-tool-desc { flex-basis: 100%; order: 3; } }
.tv-dropzone { padding: 6px 10px; }
.tv-dropzone-copy span { font-size: 0.6875rem; }
.tv-mode-note { white-space: nowrap; }
.tv-mode-note input { flex: 1; min-width: 0; }
.tv-tabpanel { height: 188px; min-height: 0; overflow-y: auto; padding: 8px 10px; gap: 5px; }
.tv-row-pair { grid-template-columns: auto auto auto minmax(0, 1fr); gap: 6px 8px; }
.tv-row-pair .tv-lab { white-space: nowrap; }
.tv-row-pair .tv-lab-r { margin-left: 6px; }
.tv-row-pair .tv-seg .tv-btn { flex: none; }
.tv-tabpanel .tv-photo-box .tv-mode-note { white-space: normal; display: block; }
.tv-map { height: clamp(300px, calc(100vh - 346px), 600px); }
@media (max-width: 960px) { .tv-tabpanel { height: auto; max-height: none; } .tv-map { height: 340px; } .tv-mode-note { white-space: normal; } }
.tv-tool-inputs { gap: 6px; }
.tv-tabpanel { height: 204px; gap: 4px; }
.tv-seg-wrap { flex-wrap: nowrap; }
.tv-seg-wrap .tv-btn { flex: 1 1 0; min-width: 0; padding: 0 4px; }
.tv-row { gap: 6px; }
.tv-music-list { gap: 3px; }
.tv-music-list .tv-track, .tv-play-mini { min-height: 28px; height: 28px; }
.tv-play-mini { width: 28px; }
.tv-switch-top { min-height: 24px; }
.tv-checks { gap: 2px 12px; }
.tv-switch { min-height: 24px; }
.tv-music-upload, .tv-music-none { padding-left: 34px; }


/* ---------- 1.4.0: new settings, estimates, route designs, photo styles ---------- */
.tv-settings-head { flex-wrap: wrap; padding-top: 4px; }
.tv-tabs { flex-wrap: wrap; margin-left: 0; overflow: visible; width: 100%; }
.tv-tab { min-height: 30px; padding: 0 6px; font-size: 0.75rem; }
.tv-settings-title { padding: 6px 0 0; }
.tv-row[hidden], .tv-checks[hidden] { display: none; }
.tv-tabpanel { height: 236px; }
.tv-rangebox { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tv-rangebox input[type="range"] { flex: 1; min-width: 0; accent-color: var(--tv-hi); }
.tv-rangebox output { min-width: 58px; text-align: right; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tv-subhead { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tv-muted); border-top: 1px solid var(--tv-line); padding-top: 6px; margin-top: 4px; }
.tv-row.is-off, .tv-checks.is-off { opacity: 0.45; }
.tv-daterange { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; }
.tv-daterange input { flex: 1; min-width: 0; }
.tv-clean-report { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--tv-hi); min-height: 1.2em; max-width: none; }
html[data-theme="dark"] .tv-body .tv-clean-report { color: #ff6b6b; }
.tv-settings-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--tv-line); background: var(--tv-slate-soft); }
html[data-theme="dark"] .tv-settings-foot { background: var(--tv-surface); }
.tv-linkbtn { border: 0; background: none; padding: 4px 6px; font: 600 0.75rem/1 var(--tv-font); color: var(--tv-link) !important; text-decoration: underline; cursor: pointer; min-height: 28px; }
.tv-estimate { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; line-height: 1.35; max-width: none; }
.tv-estimate-warn { color: #8a4b00; font-weight: 600; }
html[data-theme="dark"] .tv-body .tv-estimate-warn { color: #ffd27a; }
.tv-format-note { margin: 0; padding: 6px 10px; border-radius: 8px; font-size: 0.75rem; line-height: 1.35; max-width: none; }
.tv-format-note.is-warning { background: #fff4d6; border: 1px solid #e0b64a; color: #4d3a00; }
html[data-theme="dark"] .tv-body .tv-format-note.is-warning { background: #3a2f0a; border-color: #b98f1f; color: #ffe9a8; }
.tv-format-note[hidden] { display: none; }
.tv-export-row-2 { flex-wrap: wrap; }
.tv-export-row-2 .tv-btn { flex: 1 1 auto; }
.tv-export-row-2 .tv-select-sm { width: auto; flex: none; }
.tv-btn:disabled, .tv-select:disabled, input:disabled { cursor: not-allowed; }
.tv-result img { max-width: 100%; border-radius: var(--tv-radius); border: 1px solid var(--tv-line-strong); }
.tv-result small { margin-left: 8px; }
@media (max-width: 960px) { .tv-tabpanel { height: auto; } }

/* Live map: route animations (the exported video draws its own) */
@keyframes tv-flow { to { stroke-dashoffset: -40; } }
@keyframes tv-pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.4; } }
@keyframes tv-glow { 0%, 100% { filter: drop-shadow(0 0 3px var(--tv-route-color, #d62828)); } 50% { filter: drop-shadow(0 0 12px var(--tv-route-color, #d62828)); } }
@keyframes tv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.tv-map path.tv-anim-flow { animation: tv-flow 1.2s linear infinite; }
.tv-map path.tv-anim-pulse { animation: tv-pulse 1.4s ease-in-out infinite; }
.tv-map path.tv-line-neon { filter: drop-shadow(0 0 6px var(--tv-route-color, #d62828)); }
.tv-map path.tv-line-neon.tv-anim-pulse { animation: tv-glow 1.4s ease-in-out infinite; }

/* Live map: photo marker styles */
.tv-pin-in { width: var(--tv-pin, 48px); height: var(--tv-pin, 48px); }
.tv-pin-in img, .tv-pin-dot { width: var(--tv-pin, 48px); height: var(--tv-pin, 48px); }
.tv-pin--pin .tv-pin-in img, .tv-pin--pin .tv-pin-in .tv-pin-dot { border: 0; box-shadow: none; }
.tv-pin-shape { position: absolute; inset: 0; background: var(--tv-hi); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0, 48, 73, 0.45); overflow: hidden; }
.tv-pin-img { position: absolute; inset: 3px; border-radius: 50%; overflow: hidden; transform: rotate(45deg); }
.tv-pin-img img, .tv-pin-img .tv-pin-dot { width: 140%; height: 140%; margin: -20% 0 0 -20%; border-radius: 0; }
.tv-pin--float .tv-pin-in { height: calc(var(--tv-pin, 48px) * 1.9); }
.tv-pin-float { position: relative; width: var(--tv-pin, 48px); height: var(--tv-pin, 48px); animation: tv-bob 2.2s ease-in-out infinite; }
.tv-pin--still .tv-pin-float { animation: none; }
.tv-pin--float .tv-pin-float img, .tv-pin--float .tv-pin-float .tv-pin-dot { box-shadow: 0 8px 14px rgba(0, 20, 31, 0.4); }
.tv-pin-stem { position: absolute; left: 50%; top: calc(var(--tv-pin, 48px) + 2px); bottom: 6px; width: 2px; margin-left: -1px; background: var(--tv-hi); opacity: 0.75; }
.tv-pin-ground { position: absolute; left: 50%; bottom: 0; width: 14px; height: 6px; margin-left: -7px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: reduce) { .tv-map path.tv-anim-flow, .tv-map path.tv-anim-pulse, .tv-map path.tv-line-neon, .tv-pin-float { animation: none !important; } }


/* ---------- 1.5.0: start step (hero with live preview) -> settings step ---------- */
.tv-tool[data-tv-step="start"] { background: transparent; border: 0; box-shadow: none; padding: 0; }
.tv-tool[data-tv-step="start"] .tv-tool-workspace { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: clamp(24px, 6vw, 72px); align-items: center; padding: 16px 0 8px; }
.tv-tool[data-tv-step="start"] .tv-tool-inputs > :not(.tv-start-copy) { display: none !important; }
.tv-tool:not([data-tv-step="start"]) .tv-start-copy { display: none; }
.tv-tool[data-tv-step="start"] .tv-edit-bar, .tv-tool:not([data-tv-step]) .tv-edit-bar { display: none; }
.tv-start-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tv-start-title { font-size: clamp(2rem, 4.8vw, 3.4rem); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
.tv-start-sub { display: block; }
.tv-start-copy .tv-lede { margin: 0; max-width: 46ch; }
.tv-cta { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; width: min(100%, 420px); }
.tv-hero-file { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.tv-start-hint { margin: -6px 0 0; font-size: 0.8125rem; color: var(--tv-muted); }
.tv-start-sample { padding-left: 0; }
.tv-start-status { margin: 0; min-height: 1.2em; font-size: 0.875rem; font-weight: 600; color: var(--tv-hi); max-width: none; }
html[data-theme="dark"] .tv-body .tv-start-status { color: #ff6b6b; }
.tv-tool.is-drag[data-tv-step="start"] .tv-tool-visuals { outline: 3px dashed var(--tv-hi); outline-offset: 6px; }
/* The live preview sits in a phone-shaped frame */
.tv-tool[data-tv-step="start"] .tv-tool-visuals { width: 100%; max-width: 360px; margin-left: auto; padding: 10px; border-radius: 30px; background: var(--tv-surface); border: 1px solid var(--tv-line-strong); box-shadow: var(--tv-shadow); }
.tv-tool[data-tv-step="start"] .tv-map { height: auto; aspect-ratio: 9 / 16; max-height: 640px; border-radius: 22px; }
.tv-tool[data-tv-step="start"] .tv-quick-controls, .tv-tool[data-tv-step="start"] .tv-video-wrap, .tv-tool[data-tv-step="start"] .tv-progress { display: none !important; }
.tv-tool[data-tv-step="start"] .tv-status-live { position: static; width: auto; height: auto; clip: auto; }
/* Settings step: one column of settings on the left, preview pinned on the right */
.tv-tool[data-tv-step="edit"] .tv-tool-visuals { position: sticky; top: 16px; }
.tv-edit-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.tv-edit-title { font-weight: 700; font-size: 1.0625rem; }
.tv-tool[data-tv-step="edit"] .tv-dropzone { flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; border-width: 1px; }
.tv-tool[data-tv-step="edit"] .tv-dropzone-copy span { display: none; }
.tv-tool[data-tv-step="edit"] .tv-upload-mark { width: 30px; height: 30px; font-size: 1.1rem; flex: none; }
.tv-tool[data-tv-step="edit"] .tv-sample { display: none; }
@media (max-width: 960px) {
  .tv-tool[data-tv-step="start"] .tv-tool-workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tv-tool[data-tv-step="start"] .tv-tool-visuals { margin: 0 auto; max-width: 300px; }
  .tv-tool[data-tv-step="edit"] .tv-tool-visuals { position: static; }
}


/* =====================================================================
   1.6.x THEME — cream #FFFFF0 + bright red #FF000D (merged into the main file)
   ===================================================================== */

/* Timeline Visualizer 1.6.4 — two colours only.
 * Cream  #FFFFF0  page background and cards
 * Red    #FF000D  header, footer, borders, headings, buttons, selected controls, switches, progress
 * Text is near-black (#1a1a1a). Loads after timeline-visualizer.css. */

/* ---------- Palette ---------- */
html:not([data-theme="dark"]) {
  --tv-red: #FF000D;
  --tv-red-dark: #FF000D;
  --tv-red: #FF000D;
  --tv-red-dark: #FF000D;
  --tv-cream: #FFFFF0;
  --tv-card: #FFFFF0;            /* slightly lighter cream for cards */
  --tv-tint: #FFFFF0;            /* darker cream for tracks / tinted panels */
  --tv-accent: #FF000D;
  --tv-hi: #FF000D;
  --tv-slate: #FF000D;
  --tv-slate-dark: #FF000D;
  --tv-slate-soft: #FFFFF0;
  --tv-bg: #FFFFF0;
  --tv-surface: #FFFFF0;
  --tv-text: #1a1a1a;
  --tv-head: #FF000D;
  --tv-muted: #4d4d4d;
  --tv-line: #FF000D;
  --tv-line-strong: #FF000D;
  --tv-shadow: none;
  --tv-btn-bg: #FF000D;
  --tv-link: #FF000D;
  --tv-focus: #FF000D;
  --tv-radius: 14px;
}
html[data-theme="dark"] {
  --tv-bg: #1a0d0e;
  --tv-surface: #2a1214;
  --tv-hi: #ff4d58;
  --tv-btn-bg: #FF000D;
}
.tv-body { background: var(--tv-bg); }
html:not([data-theme="dark"]) .tv-body ::placeholder { color: var(--tv-muted); opacity: 0.8; }

/* ---------- Header: green bar, cream text, pill buttons ---------- */
html:not([data-theme="dark"]) .tv-header { background: var(--tv-red); border-bottom: 0; }
html:not([data-theme="dark"]) .tv-header .tv-brand,
html:not([data-theme="dark"]) .tv-header .tv-nav-link,
html:not([data-theme="dark"]) .tv-header .tv-dd-btn,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle,
html:not([data-theme="dark"]) .tv-header .tv-lang-btn { color: var(--tv-cream) !important; }
html:not([data-theme="dark"]) .tv-header .tv-nav-link:hover,
html:not([data-theme="dark"]) .tv-header .tv-dd-btn:hover,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle:hover { background: rgba(255, 255, 240, 0.14); border-color: transparent; }
html:not([data-theme="dark"]) .tv-header .tv-nav-link.tv-current { border-bottom: 2px solid var(--tv-cream); }
html:not([data-theme="dark"]) .tv-header .tv-lang-btn,
html:not([data-theme="dark"]) .tv-header .tv-theme-toggle,
html:not([data-theme="dark"]) .tv-header .tv-nav-toggle { border-color: rgba(255, 255, 240, 0.4); background: transparent; border-radius: 999px; }
html:not([data-theme="dark"]) .tv-header .tv-burger,
html:not([data-theme="dark"]) .tv-header .tv-burger::before,
html:not([data-theme="dark"]) .tv-header .tv-burger::after { background: var(--tv-cream); }
html:not([data-theme="dark"]) .tv-header .tv-brand-mark { background: var(--tv-cream); border-color: var(--tv-cream); border-radius: 50%; }
html:not([data-theme="dark"]) .tv-header .tv-brand-mark::before { background: var(--tv-red); }
html:not([data-theme="dark"]) .tv-header .tv-brand-mark::after { background: var(--tv-red); border-color: var(--tv-cream); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu { background: var(--tv-card); border: 1px solid var(--tv-line-strong); border-radius: 16px; box-shadow: 0 12px 32px rgba(255, 0, 13, 0.22); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a { color: var(--tv-text) !important; }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a:hover { background: var(--tv-tint); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a[aria-current] { box-shadow: inset 3px 0 0 var(--tv-red); color: var(--tv-red) !important; }
.tv-header-in { min-height: 60px; max-width: 1120px; }
.tv-brand { font-weight: 700; letter-spacing: -0.01em; }
.tv-nav-tools { gap: 8px; }
.tv-lang-btn { padding: 0 14px; }
@media (max-width: 860px) {
  html:not([data-theme="dark"]) .tv-nav { background: var(--tv-red); border-bottom: 3px solid var(--tv-cream); }
}

/* ---------- Buttons ---------- */
.tv-body .tv-btn, .tv-body .tv-file-button { border-radius: 999px; background: var(--tv-card); border-color: var(--tv-line-strong); color: var(--tv-text); }
.tv-body .tv-btn:hover, .tv-body .tv-file-button:hover { border-color: var(--tv-accent); color: var(--tv-accent); }
.tv-body .tv-btn-primary, .tv-body .tv-play, .tv-body .tv-export-row .tv-btn-primary {
  font-weight: 700;
  background: var(--tv-btn-bg); border-color: var(--tv-btn-bg); color: #fff !important; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(255, 0, 13, 0.35);
}
.tv-body .tv-btn-primary:hover, .tv-body .tv-play:hover { background: var(--tv-red-dark); border-color: var(--tv-red-dark); color: #fff !important; filter: none; }
.tv-body .tv-btn.is-active { color: var(--tv-cream) !important; background: var(--tv-red); }
.tv-body .tv-linkbtn { color: var(--tv-accent) !important; }

/* ---------- Home: hero (copy left, phone-shaped live preview right) ---------- */
.tv-main-front .tv-wrap { max-width: 1120px; }
.tv-tool[data-tv-step="start"] .tv-tool-workspace { grid-template-columns: minmax(0, 1.05fr) minmax(260px, 400px); gap: clamp(32px, 7vw, 96px); padding: clamp(24px, 6vw, 64px) 0 24px; align-items: center; }
.tv-start-copy { gap: 18px; }
.tv-start-copy::before { content: "TIMELINE VISUALIZER"; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--tv-red); }
.tv-body .tv-start-title { border: 0; padding: 0; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -0.03em; color: var(--tv-head); }
.tv-body .tv-start-sub { display: block; margin-top: 12px; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.5; letter-spacing: 0; font-weight: 400; color: var(--tv-muted); }
.tv-body .tv-start-copy .tv-lede { color: var(--tv-muted); font-size: 1rem; }
.tv-body .tv-cta { width: auto; min-width: 220px; min-height: 52px; padding: 0 28px; font-size: 1rem; }
.tv-start-hint { color: var(--tv-muted); }
.tv-body .tv-start-status { color: var(--tv-red-dark); }
.tv-body .tv-proof-list { color: var(--tv-muted); }
.tv-proof-list li::before { background: var(--tv-red); }
.tv-tool[data-tv-step="start"] .tv-tool-visuals { background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 32px; padding: 10px; box-shadow: var(--tv-shadow); }
.tv-tool[data-tv-step="start"] .tv-map { border-radius: 24px; border: 0; background: #FFFFF0; }

/* ---------- Settings step: settings card left, preview right (sticky) ---------- */
.tv-tool[data-tv-step="edit"] { background: transparent; border: 0; box-shadow: none; padding: 0; }
.tv-tool[data-tv-step="edit"] .tv-tool-workspace { grid-template-columns: minmax(0, 560px) minmax(280px, 400px); justify-content: center; gap: clamp(24px, 4vw, 56px); padding: 24px 0 8px; align-items: start; }
.tv-tool[data-tv-step="edit"] .tv-tool-visuals { position: sticky; top: 76px; padding: 10px; background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 28px; box-shadow: var(--tv-shadow); }
.tv-tool[data-tv-step="edit"] .tv-map { height: auto; aspect-ratio: 9 / 16; max-height: calc(100vh - 190px); border: 0; border-radius: 20px; background: #FFFFF0; }
.tv-edit-bar { padding: 0 0 8px; }
.tv-edit-title { font-size: 1.125rem; font-weight: 700; color: var(--tv-head); }
/* the loaded-file card */
.tv-tool[data-tv-step="edit"] .tv-dropzone { background: var(--tv-tint); border: 1px solid #FF000D; border-radius: 16px; }
.tv-tool[data-tv-step="edit"] .tv-upload-mark { background: var(--tv-accent); }
.tv-dropzone { background: var(--tv-tint); border-color: #FF000D; }
.tv-upload-mark { background: var(--tv-red) !important; }
.tv-upload-mark span { color: var(--tv-cream) !important; }

/* settings card */
.tv-settings { background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 22px; box-shadow: var(--tv-shadow); }
.tv-settings-head { background: transparent; border-bottom: 1px solid var(--tv-line); padding: 12px 16px 8px; }
.tv-body .tv-settings-title { color: var(--tv-head) !important; font-size: 0.9375rem; padding: 0; }
.tv-tabs { gap: 6px; padding-top: 8px; }
.tv-tab { min-height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; color: var(--tv-muted) !important; font-size: 0.8125rem; }
.tv-tab:hover { background: var(--tv-tint); color: var(--tv-accent) !important; }
.tv-tab.is-active { background: var(--tv-accent); color: var(--tv-cream) !important; border-color: var(--tv-accent); font-weight: 600; }
.tv-tabpanel { height: auto !important; max-height: none; padding: 16px 18px 18px; gap: 16px; }
.tv-row { grid-template-columns: 1fr; gap: 8px; }
.tv-row-pair { grid-template-columns: 1fr; }
.tv-row-pair .tv-lab-r { margin-left: 0; }
.tv-lab { font-size: 0.8125rem; font-weight: 600; color: var(--tv-head); }
.tv-hint { color: var(--tv-muted); font-size: 0.75rem; }
.tv-subhead { color: var(--tv-muted); border-top-color: var(--tv-line); padding-top: 12px; margin-top: 4px; }

/* segmented controls: soft track, white chip for the selected option */
.tv-seg { background: #FFFFF0; border-radius: 14px; padding: 4px; gap: 2px; flex-wrap: nowrap; }
.tv-seg-wrap { flex-wrap: wrap; }
.tv-body .tv-seg .tv-btn { background: transparent; border-color: transparent; color: var(--tv-muted); box-shadow: none; border-radius: 11px; min-height: 36px; font-weight: 500; }
.tv-body .tv-seg .tv-btn:hover { color: var(--tv-accent); border-color: transparent; }
html:not([data-theme="dark"]) .tv-body .tv-seg .tv-btn.is-selected,
html:not([data-theme="dark"]) .tv-body .tv-track.is-selected { background: var(--tv-red); border-color: transparent; color: var(--tv-cream) !important; font-weight: 600; box-shadow: none; }

/* inputs, selects, switches, sliders */
.tv-select, .tv-settings input[type="text"], .tv-settings input[type="date"], .tv-mode-extra select, .tv-mode-extra input[type="text"] { min-height: 44px !important; border: 1px solid var(--tv-line-strong) !important; border-radius: 12px !important; background: var(--tv-card); padding: 0 14px; font-size: 0.9375rem !important; }
.tv-select:focus, .tv-settings input:focus { border-color: var(--tv-accent) !important; outline: 0; box-shadow: 0 0 0 3px rgba(255, 0, 13, 0.18); }
.tv-slider { background: #B8B07E; width: 42px; height: 24px; border-radius: 12px; }
.tv-slider::after { width: 20px; height: 20px; }
.tv-switch input:checked + .tv-slider { background: var(--tv-accent); }
.tv-switch input:checked + .tv-slider::after { transform: translateX(18px); }
.tv-switch { font-size: 0.9375rem; gap: 12px; }
.tv-rangebox input[type="range"] { accent-color: var(--tv-accent); }
.tv-rangebox output { color: var(--tv-accent); }
.tv-music-list { border: 1px solid var(--tv-line); border-radius: 14px; overflow: hidden; gap: 0; }
.tv-music-list li { padding: 4px 8px; border-bottom: 1px solid var(--tv-line); }
.tv-music-list li:last-child { border-bottom: 0; }
.tv-body .tv-music-list .tv-track { background: transparent; border-color: transparent; border-radius: 10px; }
.tv-play-mini { border-color: var(--tv-line-strong); color: var(--tv-accent) !important; background: var(--tv-card); width: 34px; height: 34px; }
.tv-play-mini:hover { background: var(--tv-accent); color: var(--tv-cream) !important; border-color: var(--tv-accent); }
.tv-settings-foot { background: var(--tv-tint); border-top: 1px solid var(--tv-line); }

/* action row: Preview + Create video */
.tv-export-row { justify-content: center; gap: 12px; margin-top: 8px; }
.tv-export-row .tv-btn { min-height: 48px; padding: 0 28px; font-size: 1rem; }
.tv-export-row .tv-btn-primary { flex: none; min-width: 180px; }
.tv-status { color: var(--tv-muted); }
.tv-clean-report, .tv-readout-distance { color: var(--tv-red-dark) !important; }
.tv-stat-num { color: var(--tv-red) !important; }
.tv-progress { background: rgba(255, 0, 13, 0.15); }
.tv-progress-fill { background: var(--tv-red); }
.tv-body .tv-map { border-color: var(--tv-line); }

/* ---------- Other tool pages: same palette, calmer chrome ---------- */
.tv-hero { background: transparent; }
.tv-body .tv-h1 { border-left-color: var(--tv-red); }
.tv-tool { background: var(--tv-card); border: 1px solid var(--tv-line); border-top: 1px solid var(--tv-line); border-radius: 22px; box-shadow: var(--tv-shadow); }
.tv-tool[data-tv-step="start"], .tv-tool[data-tv-step="edit"] { background: transparent; border: 0; box-shadow: none; }

/* ---------- Home sections, cards ---------- */
.tv-steps-list li, .tv-card, .mt-card, .mt-trust, .tv-trust { border: 1px solid var(--tv-line); border-top: 1px solid var(--tv-line); background: var(--tv-card); border-radius: 18px; box-shadow: var(--tv-shadow); }
.tv-steps-list li::before { background: var(--tv-red); color: var(--tv-cream) !important; }
.tv-tool-card { border: 1px solid var(--tv-line); border-left: 1px solid var(--tv-line); border-radius: 18px; background: var(--tv-card); box-shadow: var(--tv-shadow); }
.tv-tool-card:hover { border-color: var(--tv-accent); transform: translateY(-2px); transition: transform 0.15s, border-color 0.15s; }
.tv-tool-card strong { color: var(--tv-accent); }
html:not([data-theme="dark"]) .tv-body h2:not(.tv-tool-heading)::after { background: var(--tv-red); }
.mt-tablewrap, .mt-faqs { background: var(--tv-card); border-radius: 16px; }
.mt-tablewrap th, .tv-article th { background: var(--tv-tint); }
.mt-related a { border-radius: 999px; background: var(--tv-card); }
.tv-article > .mt-answer, .tv-editorial-content > .mt-answer { border-left-color: var(--tv-red); }

/* ---------- Footer: green, cream text, tomato rule ---------- */
html:not([data-theme="dark"]) .tv-footer { background: var(--tv-red); border-top: 4px solid var(--tv-cream); }
html:not([data-theme="dark"]) .tv-footer, html:not([data-theme="dark"]) .tv-footer * { color: rgba(255, 255, 240, 0.82) !important; }
html:not([data-theme="dark"]) .tv-footer a { color: var(--tv-cream) !important; }
html:not([data-theme="dark"]) .tv-footer .tv-brand, html:not([data-theme="dark"]) .tv-footer .tv-brand *,
html:not([data-theme="dark"]) .tv-footer .tv-footer-col h2 { color: var(--tv-cream) !important; }
html:not([data-theme="dark"]) .tv-footer .tv-brand-mark { background: var(--tv-cream); border-color: var(--tv-cream); border-radius: 50%; }
html:not([data-theme="dark"]) .tv-footer .tv-brand-mark::before { background: var(--tv-red); }
html:not([data-theme="dark"]) .tv-footer-note { border-top-color: rgba(255, 255, 240, 0.25); }
.tv-footer-in { max-width: 1120px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tv-tool[data-tv-step="edit"] .tv-tool-workspace { grid-template-columns: minmax(0, 1fr); }
  .tv-tool[data-tv-step="edit"] .tv-tool-visuals { position: static; max-width: 340px; margin: 0 auto; order: -1; }
  .tv-tool[data-tv-step="edit"] .tv-map { max-height: 70vh; }
  .tv-tool[data-tv-step="start"] .tv-tool-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .tv-row-pair { grid-template-columns: 1fr; }
  .tv-seg { flex-wrap: wrap; }
  .tv-body .tv-cta { width: 100%; }
}

/* ---------- One cream only: separation comes from green / tomato lines and fills ---------- */
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a:hover,
html:not([data-theme="dark"]) .tv-tab:hover { background: var(--tv-red); color: var(--tv-cream) !important; }
.tv-body .tv-btn:hover, .tv-body .tv-file-button:hover { background: var(--tv-red); color: var(--tv-cream); border-color: var(--tv-red); }
.tv-body .tv-seg .tv-btn:hover { color: var(--tv-red); text-decoration: underline; background: transparent; }
.tv-body .tv-btn, .tv-body .tv-file-button { border-width: 1.5px; }
.tv-tool, .tv-settings, .tv-card, .mt-card, .mt-trust, .tv-trust, .tv-steps-list li, .tv-tool-card, .tv-stat, .mt-tablewrap, .mt-faqs,
.tv-tool[data-tv-step="start"] .tv-tool-visuals, .tv-tool[data-tv-step="edit"] .tv-tool-visuals { border: 1.5px solid var(--tv-red); box-shadow: none; }
.tv-tool-card:hover { border-color: var(--tv-red); transform: none; }
.tv-tool-card:hover strong { color: var(--tv-red-dark); }
.tv-tool[data-tv-step="start"], .tv-tool[data-tv-step="edit"] { border: 0; }
.tv-settings-head { border-bottom: 1.5px solid var(--tv-red); }
.tv-settings-foot { background: transparent; border-top: 1.5px solid var(--tv-red); }
.tv-subhead { border-top: 1.5px dashed var(--tv-red); }
/* segmented controls: green outline, green chip when selected */
.tv-seg { background: transparent; border: 1.5px solid var(--tv-red); }
/* loaded-file card and drop zone: green dashed outline, no tint */
.tv-dropzone, .tv-tool[data-tv-step="edit"] .tv-dropzone { background: transparent; border: 1.5px dashed var(--tv-red); }
/* maps / preview frames */
.tv-tool[data-tv-step="start"] .tv-map, .tv-tool[data-tv-step="edit"] .tv-map, .tv-body .tv-map { background: var(--tv-cream); border: 1.5px solid var(--tv-red); }
/* switches: off = green outline, on = green fill */
.tv-slider { background: transparent; border: 2px solid var(--tv-red); }
.tv-slider::after { background: var(--tv-red); box-shadow: none; left: 1px; top: 1px; width: 18px; height: 18px; }
.tv-switch input:checked + .tv-slider { background: var(--tv-red); }
.tv-switch input:checked + .tv-slider::after { background: var(--tv-cream); transform: translateX(18px); }
/* progress: green track, tomato fill */
.tv-progress { background: var(--tv-red); }
.tv-progress-fill { background: var(--tv-red); }
/* tables: green header row */
.mt-tablewrap th, .tv-article th { background: var(--tv-red); color: var(--tv-cream); }
.mt-tablewrap th, .mt-tablewrap td, .tv-article td, .tv-article th { border-bottom: 1px solid var(--tv-red); }
/* music list */
.tv-music-list { border: 1.5px solid var(--tv-red); }
.tv-music-list li { border-bottom: 1px solid var(--tv-red); }
.tv-play-mini { background: transparent; border: 1.5px solid var(--tv-red); }
/* form fields */
.tv-select, .tv-settings input[type="text"], .tv-settings input[type="date"], .tv-mode-extra select, .tv-mode-extra input[type="text"] { background: transparent; border: 1.5px solid var(--tv-red) !important; }
.tv-select:focus, .tv-settings input:focus { border-color: var(--tv-red) !important; box-shadow: 0 0 0 2px var(--tv-red); }
.mt-related a { background: transparent; border: 1.5px solid var(--tv-red); }
.mt-related a:hover { background: var(--tv-red); color: var(--tv-cream); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu { border: 1.5px solid var(--tv-cream); background: var(--tv-red); }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a { color: var(--tv-cream) !important; }
html:not([data-theme="dark"]) .tv-header .tv-dd-menu a:hover { background: var(--tv-cream); color: var(--tv-red) !important; }

/* ---------- Red-only hover / focus (no darker red): invert cream <-> red ---------- */
.tv-body .tv-btn-primary:hover, .tv-body .tv-play:hover, .tv-body .tv-export-row .tv-btn-primary:hover { background: var(--tv-cream); color: var(--tv-red) !important; border-color: var(--tv-red); }
.tv-body .tv-btn-primary, .tv-body .tv-play { border: 1.5px solid var(--tv-red); }
.tv-tool-card:hover { background: var(--tv-red); }
.tv-tool-card:hover, .tv-tool-card:hover strong, .tv-tool-card:hover span { color: var(--tv-cream) !important; }
.tv-body .tv-start-status, .tv-clean-report, .tv-readout-distance { color: var(--tv-red) !important; }
.tv-progress { background: var(--tv-red); }
.tv-progress-fill { background: var(--tv-cream); }


/* ---------- Full-page background: pure ivory #FFFFF0 (hard-set, wins over the WordPress theme) ---------- */
html:not([data-theme="dark"]),
html:not([data-theme="dark"]) body,
html:not([data-theme="dark"]) .tv-body,
html:not([data-theme="dark"]) .tv-main,
html:not([data-theme="dark"]) .tv-hero,
html:not([data-theme="dark"]) .tv-tool-section,
html:not([data-theme="dark"]) .tv-tool,
html:not([data-theme="dark"]) .tv-tool[data-tv-step="start"],
html:not([data-theme="dark"]) .tv-tool[data-tv-step="edit"],
html:not([data-theme="dark"]) .tv-settings,
html:not([data-theme="dark"]) .tv-tabpanel,
html:not([data-theme="dark"]) .tv-card,
html:not([data-theme="dark"]) .mt-card,
html:not([data-theme="dark"]) .tv-tool-card,
html:not([data-theme="dark"]) .tv-steps-list li,
html:not([data-theme="dark"]) .tv-tool[data-tv-step="start"] .tv-tool-visuals,
html:not([data-theme="dark"]) .tv-tool[data-tv-step="edit"] .tv-tool-visuals { background: #FFFFF0 !important; background-image: none !important; }

/* =====================================================================
   1.7.0 — one preview window, smaller start preview, no second upload box
   ===================================================================== */
/* Preview / exported video / GIF replace the map inside the same frame (no extra player under the results) */
.tv-tool-visuals.has-preview .tv-map,
.tv-tool-visuals.has-preview .tv-progress,
.tv-tool-visuals.has-preview .tv-photo-popup { display: none !important; }
.tv-tool-visuals.has-preview .tv-video-wrap { display: block; margin-top: 0; }
.tv-export-video, .tv-export-gif { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: 20px; background: #000; object-fit: contain; }
.tv-export-video[hidden], .tv-export-gif[hidden] { display: none !important; }
.tv-tool-visuals.has-export-video .tv-video-canvas,
.tv-tool-visuals.has-export-gif .tv-video-canvas { display: none; }
.tv-video-canvas, .tv-export-video, .tv-export-gif { max-height: calc(100vh - 200px); margin-left: auto; margin-right: auto; }
.tv-results .tv-result { margin-top: 4px; }

/* Home: the phone preview is shorter so the whole hero fits the first screen */
.tv-tool[data-tv-step="start"] .tv-tool-visuals { max-width: min(330px, calc((100vh - 230px) * 0.5625 + 20px)); min-width: 200px; }
.tv-tool[data-tv-step="start"] .tv-map { max-height: calc(100vh - 230px); }
.tv-tool[data-tv-step="start"] .tv-tool-workspace { padding-top: 8px; padding-bottom: 0; }
/* Settings step: no second upload box; Back returns to the first screen */
.tv-tool[data-tv-step="edit"] .tv-dropzone, .tv-tool[data-tv-step="edit"] .tv-sample { display: none !important; }
.tv-tool[data-tv-step="edit"] .tv-tool-visuals { max-width: min(400px, calc((100vh - 190px) * 0.5625 + 20px)); min-width: 240px; }
@media (max-width: 960px) {
  .tv-tool[data-tv-step="start"] .tv-tool-visuals { max-width: min(240px, calc((100vh - 330px) * 0.5625 + 20px)); min-width: 180px; }
  .tv-tool[data-tv-step="edit"] .tv-tool-visuals { max-width: 320px; }
  .tv-tool[data-tv-step="start"] .tv-map { max-height: 52vh; }
}


/* =====================================================================
   1.8.0 — no number circles, second screen = tool + results only, ad slot, still phone map
   ===================================================================== */
/* No numbering on the step cards */
.tv-steps-list li::before, html[data-theme="dark"] .tv-steps-list li::before { content: none !important; display: none !important; }
.tv-steps-list li { padding-top: 20px; }

/* First screen: no stats, no results, no ads, no status line */
.tv-tool[data-tv-step="start"] .tv-trips,
.tv-tool[data-tv-step="start"] .tv-stats,
.tv-tool[data-tv-step="start"] .tv-results,
.tv-tool[data-tv-step="start"] .tv-status-live,
.tv-tool[data-tv-step="start"] .tv-ad-slot,
.tv-tool[data-tv-step="start"] .tv-privacy { display: none !important; }
.tv-tool:not([data-tv-step="edit"]) .tv-ad-slot { display: none !important; }
.tv-status-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tv-tool[data-tv-step="edit"] .tv-status-live { display: none; }
.tv-tool[data-tv-step="edit"] .tv-trips:empty, .tv-tool[data-tv-step="edit"] .tv-stats:empty, .tv-tool[data-tv-step="edit"] .tv-results:empty { display: none; }

/* Second screen: only the tool, its results and stats (and the ad slot). The rest of the home page is hidden. */
html.tv-step-edit .tv-tool-article > *:not(.tv-tool-section),
html.tv-step-edit .tv-main-front .tv-wrap > *:not(.tv-tool-article),
html.tv-step-edit .tv-footer,
html.tv-step-edit .tv-hero { display: none !important; }
html.tv-step-edit .tv-main { padding-bottom: 24px; }

/* Ad slot: nothing is drawn unless ad code was saved in the dashboard (no border, no label, no placeholder) */
.tv-ad-slot { display: block; max-width: 100%; margin: 16px auto 0; text-align: center; overflow: hidden; }
.tv-ad-slot:empty { display: none; }

/* Logo from the dashboard */
.tv-brand-logo { display: block; width: auto; max-width: 240px; object-fit: contain; }

/* Phones: the home preview is a still picture */
.tv-static-map { display: none; }
@media (max-width: 960px) {
  .tv-tool[data-tv-step="start"] .tv-tool-visuals:has(.tv-static-map) .tv-map { display: none; }
  .tv-tool[data-tv-step="start"] .tv-static-map { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: 52vh; object-fit: cover; border-radius: 22px; }
  .tv-tool[data-tv-step="start"] .tv-map { pointer-events: none; }
}

/* 1.9.1 — longer music list scrolls inside its panel */
.tv-music-list { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }

/* 1.9.1 — six camera choices wrap onto two lines */
.tv-row .tv-seg:has([data-tv-camera]) { flex-wrap: wrap; }

/* ===== 1.10 Studio: basemap cards, camera and overlay controls, preview editor ===== */
.tv-seg-wrap .tv-btn { flex: 1 1 auto; min-width: 74px; padding: 0 8px; white-space: nowrap; }
.tv-basemaps { display: flex; flex-direction: column; gap: 8px; }
.tv-bm-group { margin: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tv-muted); }
.tv-bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.tv-bm { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 4px; border: 1.5px solid var(--tv-line-strong, #cbd5e1); border-radius: 10px; background: var(--tv-surface, #fff); color: inherit; font: 600 0.6875rem/1.2 var(--tv-font, inherit); cursor: pointer; text-align: center; }
.tv-bm i { display: block; height: 38px; border-radius: 7px; background: var(--bm, #ddd); }
.tv-bm:hover { border-color: var(--tv-accent, #2563eb); }
.tv-bm.is-selected, .tv-bm[aria-pressed="true"] { border-color: var(--tv-accent, #2563eb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tv-accent, #2563eb) 30%, transparent); }
.tv-tool-visuals.has-stage .tv-video-wrap { display: block; margin-top: 0; }
.tv-tool-visuals.has-stage .tv-video-canvas { width: 100%; height: auto; display: block; border-radius: 12px; cursor: crosshair; }
.tv-editor { display: none; margin-top: 10px; padding: 10px; border: 1px solid var(--tv-line, #e2e8f0); border-radius: 12px; background: var(--tv-surface, #fff); font-size: 0.8125rem; }
.tv-tool-visuals.has-stage .tv-editor { display: block; }
.tv-tool[data-tv-step="start"] .tv-editor { display: none !important; }
.tv-ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.tv-ed-btn { min-height: 32px; padding: 0 10px; font-size: 0.75rem; }
.tv-ed-time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.tv-ed-loop { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; }
.tv-scrub { width: 100%; margin: 4px 0; accent-color: var(--tv-accent, #2563eb); }
.tv-tl-track { position: relative; height: 38px; border-radius: 8px; background: var(--tv-line, #e2e8f0); overflow: hidden; cursor: pointer; touch-action: none; }
.tv-tl-fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.3), transparent var(--fi, 0%), transparent calc(100% - var(--fo, 0%)), rgba(0,0,0,.3)); }
.tv-tl-holds { position: absolute; inset: 0; pointer-events: none; }
.tv-tl-hold { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #f59e0b; border-radius: 2px; }
.tv-tl-clips { position: absolute; left: 0; right: 0; top: 4px; height: 24px; }
.tv-tl-clip { position: absolute; top: 0; height: 24px; padding: 0 6px; border: 0; border-radius: 6px; background: var(--tv-accent, #2563eb); color: #fff; font: 600 0.6875rem/24px var(--tv-font, inherit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; }
.tv-tl-clip.is-sel { outline: 2px solid #fff; box-shadow: 0 0 0 2px var(--tv-accent, #2563eb); }
.tv-tl-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ef4444; pointer-events: none; left: 0; }
.tv-clip-list { list-style: none; margin: 4px 0; padding: 0; }
.tv-clip-list li { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.tv-clip-form .tv-input { width: 100%; box-sizing: border-box; }
.tv-num { width: 64px; }
.tv-bm-group { display: flex; flex-direction: column; gap: 4px; }
.tv-bm-gl { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tv-muted); }

/* Reviews, comments, suggestions */
.tv-rv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tv-rv-summary { margin: 6px 0; }
.tv-review-list { list-style: none; margin: 0 0 12px; padding: 0; }
.tv-rv-item { padding: 10px 0; border-bottom: 1px solid var(--tv-line, #e2e8f0); }
.tv-rv-item.is-featured { background: color-mix(in srgb, var(--tv-accent, #2563eb) 7%, transparent); padding-left: 8px; border-radius: 8px; }
.tv-rv-head { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 0.875rem; }
.tv-rv-avatar { border-radius: 50%; margin-right: 6px; }
.tv-rv-stars { color: #f59e0b; letter-spacing: 1px; }
.tv-rv-badge, .tv-rv-when, .tv-rv-kind { color: var(--tv-muted, #64748b); }
.tv-rv-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tv-rv-reply { margin: 6px 0 0 12px; padding-left: 10px; border-left: 3px solid var(--tv-line-strong, #cbd5e1); font-size: 0.875rem; }
.tv-rv-google { font-size: 0.75rem; color: var(--tv-muted, #64748b); }
.tv-review-form select, .tv-review-form input[type=text], .tv-review-form textarea { max-width: 100%; }
.tv-tl-track { background: rgba(0,0,0,.12); }
.tv-tl-clip { background: #111827; color: #fff; }
.tv-tl-clip.is-sel { background: #111827; outline: 2px solid #fff; box-shadow: 0 0 0 2px #111827; }

/* Floating action bar on phones and tablets: always visible, never scrolls (the bar is moved onto <body> by JS) */
.tv-sticky { display: none; }
@media (max-width: 960px) {
  .tv-sticky.is-on { display: flex; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; top: auto; transform: none; z-index: 2147483000; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--tv-surface, #fff); border-top: 2px solid var(--tv-line-strong, #111); box-shadow: 0 -6px 18px rgba(0,0,0,.14); }
  .tv-sticky .tv-btn { flex: 1 1 0; min-height: 46px; padding: 0 6px; font-size: 0.8125rem; white-space: nowrap; }
  .tv-sticky .tv-btn-primary { flex: 1.4 1 0; }
  .tv-sticky .tv-btn.is-active { outline: 2px solid var(--tv-accent, #FF000D); outline-offset: -2px; }
  html.tv-has-mbar body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* Settings view: all settings, no preview */
  .tv-tool[data-tv-step="edit"][data-tv-mview="settings"] .tv-tool-visuals { display: none; }
  /* Preview view: preview only, every settings control hidden */
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-settings,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-dropzone,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-sample,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-mode-extra,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-estimate,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-format-note,
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-export-row { display: none !important; }
  .tv-tool[data-tv-step="edit"][data-tv-mview="preview"] .tv-tool-visuals { display: block; order: 0; }
  /* the in-page Export button is replaced by the bar (Poster, GIF options and the Google Maps link stay in the settings view) */
  .tv-tool[data-tv-step="edit"] .tv-export-row .tv-export { display: none; }
}

/* Reviewer photo scroller: moves right to left */
.tv-rv-marquee { overflow: hidden; margin: 10px 0 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tv-rv-track { display: flex; width: max-content; animation: tv-rv-scroll var(--rv-dur, 40s) linear infinite; }
.tv-rv-marquee:hover .tv-rv-track { animation-play-state: paused; }
.tv-rv-half { display: flex; flex: none; gap: 14px; padding-right: 14px; }
.tv-rv-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tv-rv-chip .tv-rv-avatar { border: 2px solid var(--tv-accent, #2563eb); }
.tv-rv-chip-stars { font-size: 0.6875rem; color: #f59e0b; letter-spacing: 1px; }
.tv-rv-initial { display: inline-block; text-align: center; background: var(--tv-accent, #2563eb); color: #fff; font-weight: 700; border-radius: 50%; }
.tv-rv-me { display: flex; align-items: center; gap: 6px; font-weight: 600; }
@keyframes tv-rv-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tv-rv-marquee { overflow-x: auto; } .tv-rv-track { animation: none; } }

/* ---------- Reviews 1.10.1: score header, rating bars, swipeable cards ---------- */
.tv-reviews { --rv-star: #f5a623; --rv-star-off: #d5d5d5; --rv-card: var(--tv-surface, #fff); --rv-line: var(--tv-line, #e2e8f0); }
html[data-theme="dark"] .tv-reviews { --rv-star-off: #5a5a5a; --rv-card: rgba(255,255,255,.06); }
.tv-rv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tv-rv-top h2 { margin: 0; }
.tv-rv-cta { white-space: nowrap; text-decoration: none; }
.tv-stars { --p: 100%; display: inline-block; line-height: 1; letter-spacing: 2px; font-size: 1.1rem; background: linear-gradient(90deg, var(--rv-star) var(--p), var(--rv-star-off) var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.tv-stars-sm { font-size: 1rem; margin: 2px 0 8px; }
.tv-stars-lg { font-size: 1.5rem; }
.tv-rv-summary:empty { display: none; }
.tv-rv-sumrow { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; padding: 14px 0 18px; }
.tv-rv-score { display: flex; flex-direction: column; gap: 4px; }
.tv-rv-score-top { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.tv-rv-score-line { display: flex; align-items: center; gap: 12px; }
.tv-rv-num { font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.tv-rv-count { font-size: .8125rem; color: var(--tv-muted, #64748b); }
.tv-rv-bars { flex: 1 1 220px; max-width: 360px; display: flex; flex-direction: column; gap: 5px; }
.tv-rv-bar { display: grid; grid-template-columns: 30px 1fr 24px; align-items: center; gap: 8px; font-size: .75rem; color: var(--tv-muted, #64748b); }
.tv-rv-bt { height: 8px; border-radius: 99px; background: var(--rv-star-off); overflow: hidden; display: block; }
.tv-rv-bf { display: block; height: 100%; background: var(--rv-star); border-radius: 99px; }
.tv-rv-bc { text-align: right; }
.tv-rv-glogo { display: inline-flex; line-height: 0; }
.tv-rv-carousel { position: relative; }
.tv-review-list.tv-rv-scroll { display: flex; gap: 16px; overflow-x: auto; margin: 0 0 12px; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.tv-review-list.tv-rv-scroll::-webkit-scrollbar { display: none; }
.tv-rv-card { flex: 0 0 calc((100% - 32px) / 3); min-width: 260px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--rv-card); border: 1px solid var(--rv-line); border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); box-sizing: border-box; border-bottom: 1px solid var(--rv-line); }
.tv-rv-card.is-featured { border-color: var(--tv-accent, #ff000d); }
.tv-review-list.is-few .tv-rv-card { flex-basis: min(100%, 420px); }
.tv-rv-chead { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tv-rv-chead .tv-rv-avatar { margin: 0; flex: none; object-fit: cover; }
.tv-rv-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tv-rv-name { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
a.tv-rv-name:hover { text-decoration: underline; }
.tv-rv-when { font-size: .75rem; color: var(--tv-muted, #64748b); }
.tv-rv-card .tv-rv-text { font-size: .9rem; line-height: 1.55; }
.tv-rv-card .tv-rv-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tv-rv-more { align-self: flex-start; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--tv-accent, #ff000d); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.tv-rv-card .tv-rv-reply { margin: 10px 0 0; padding: 8px 12px; border: 0; border-left: 3px solid var(--tv-accent, #ff000d); background: rgba(128,128,128,.1); border-radius: 0 8px 8px 0; font-size: .8125rem; }
.tv-rv-card .tv-rv-reply p { margin: 2px 0 0; }
.tv-no-reviews { flex: 1 1 100%; list-style: none; text-align: center; padding: 22px 12px; color: var(--tv-muted, #64748b); }
.tv-no-reviews p { margin: 4px 0 0; }
.tv-rv-sub { font-size: .875rem; }
.tv-rv-nav { position: absolute; top: calc(50% - 18px); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rv-line); background: var(--rv-card); color: var(--tv-text, #111); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); display: grid; place-items: center; padding: 0 0 3px; }
.tv-rv-nav[hidden] { display: none; }
.tv-rv-prev { left: -14px; } .tv-rv-next { right: -14px; }
.tv-rv-nav:focus-visible, .tv-rv-more:focus-visible, .tv-rv-scroll:focus-visible { outline: 2px solid var(--tv-accent, #ff000d); outline-offset: 2px; }
.tv-rv-form { border-top: 1px solid var(--rv-line); padding-top: 16px; margin-top: 20px; }
.tv-rv-form h3 { margin-top: 0; }
.tv-rv-rate { border: 0; padding: 0; margin: 0 0 10px; }
.tv-rv-rate legend { padding: 0; font-weight: 600; margin-bottom: 4px; }
.tv-rv-stars-in { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.tv-rv-stars-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tv-rv-stars-in label { font-size: 2rem; line-height: 1; cursor: pointer; color: var(--rv-star-off); transition: color .12s; }
.tv-rv-stars-in label:hover, .tv-rv-stars-in label:hover ~ label, .tv-rv-stars-in input:checked ~ label { color: var(--rv-star); }
.tv-rv-stars-in input:focus-visible + label { outline: 2px solid var(--tv-accent, #ff000d); border-radius: 4px; }
.tv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-rv-form textarea { width: 100%; box-sizing: border-box; border-radius: 12px; padding: 10px 12px; }
.tv-rv-admin { padding: 8px 12px; border: 1px dashed var(--rv-line); border-radius: 10px; }
@media (max-width: 960px) { .tv-rv-card { flex-basis: calc((100% - 16px) / 2); } .tv-rv-prev { left: -6px; } .tv-rv-next { right: -6px; } }
@media (max-width: 600px) { .tv-rv-card { flex-basis: 86%; } .tv-rv-sumrow { gap: 14px; } .tv-rv-num { font-size: 2.25rem; } .tv-rv-nav { display: none; } .tv-review-list.is-few .tv-rv-card { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .tv-rv-stars-in label { transition: none; } .tv-review-list.tv-rv-scroll { scroll-behavior: auto; } }

/* Home screen: carry on with the file that is still loaded */
.tv-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; width: 100%; max-width: 520px; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--tv-accent, #ff000d); border-radius: 14px; background: var(--tv-surface, #fff); }
.tv-resume[hidden] { display: none; }
.tv-resume-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tv-resume-info strong { font-size: .95rem; }
.tv-resume-meta { font-size: .8125rem; color: var(--tv-muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tv-resume-btns { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-tool:not([data-tv-step="start"]) .tv-resume { display: none; }


/* ---------- 1.10.2: home hero — PHONES ONLY: title, then the preview frame, then the button.
   Tablet and desktop keep the original layout (text and button left, live preview frame right). ---------- */
@media (min-width: 701px) and (max-width: 960px) {
  .tv-tool[data-tv-step="start"] .tv-tool-workspace { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 28px; align-items: center; }
  .tv-tool[data-tv-step="start"] .tv-tool-visuals { margin: 0 0 0 auto; max-width: 300px; }
}
@media (max-width: 700px) {
  .tv-tool[data-tv-step="start"] .tv-tool-workspace { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; text-align: center; }
  .tv-tool[data-tv-step="start"] .tv-tool-inputs,
  .tv-tool[data-tv-step="start"] .tv-start-copy { display: contents; }
  .tv-tool[data-tv-step="start"] .tv-start-copy::before { order: 0; }
  .tv-tool[data-tv-step="start"] .tv-start-title { order: 1; text-align: center; font-size: clamp(1.6rem, 8vw, 2.1rem); }
  .tv-tool[data-tv-step="start"] .tv-start-sub { margin-top: 4px; font-size: 0.95rem; }
  .tv-tool[data-tv-step="start"] .tv-tool-visuals { order: 2; width: clamp(112px, 22vh, 160px); max-width: none; margin: 0 auto; padding: 5px; border-radius: 20px; }
  .tv-tool[data-tv-step="start"] .tv-start-copy > :not(.tv-start-title) { order: 3; }
  .tv-tool[data-tv-step="start"] .tv-start-copy .tv-lede { margin: 0 auto; text-align: center; font-size: 0.875rem; }
  .tv-tool[data-tv-step="start"] .tv-start-copy .tv-cta { align-self: center; }
  .tv-tool[data-tv-step="start"] .tv-start-copy .tv-proof-list { justify-content: center; }
}


/* =====================================================================
   1.10.3 — borderless page, zig-zag How-to-use, one dark header band
   ===================================================================== */

/* 1. No outlines around text, buttons, cards or sections. Separation comes from soft tints and spacing.
      The phone preview frame and the map keep their frame. */
.tv-body, .tvx-tool { --tv-line: transparent; --tv-line-strong: transparent; --tvx-line: transparent; }
html .tv-body .tv-btn, html .tv-body .tv-file-button, html .tv-body .tv-linkbtn, html .tv-body .tv-tab,
html .tv-body .tv-tool, html .tv-body .tv-settings, html .tv-body .tv-tabpanel, html .tv-body .tv-card, html .tv-body .mt-card,
html .tv-body .mt-trust, html .tv-body .tv-trust, html .tv-body .tv-steps-list li, html .tv-body .tv-tool-card, html .tv-body .tv-stat,
html .tv-body .mt-tablewrap, html .tv-body .mt-faqs, html .tv-body .tv-seg, html .tv-body .tv-dropzone, html .tv-body .tv-select,
html .tv-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html .tv-body select, html .tv-body textarea,
html .tv-body .tv-slider, html .tv-body .tv-tool-top, html .tv-body .tv-tool-section,
html .tv-body [class*="tvx-"]:not(.tvx-mapwrap):not(.tvx-tool):not([class*="leaflet"]):not(.tvx-canvas) {
  border-color: transparent !important; box-shadow: none !important;
}
html .tv-body .tv-settings-head, html .tv-body .tv-settings-foot, html .tv-body .tv-subhead { border-color: transparent !important; }
html .tv-body .tv-settings, html .tv-body .tv-card, html .tv-body .tv-tool-card, html .tv-body .tv-steps-list li, html .tv-body .tv-stat,
html .tv-body .tv-trust, html .tv-body .tvx-source, html .tv-body .tvx-image, html .tv-body .tvx-share, html .tv-body .tvx-examples, html .tv-body .tvx-cal {
  background: rgba(127, 127, 127, 0.07) !important; background-image: none !important;
}
html .tv-body .tv-btn:not(.tv-btn-primary):not(.is-selected):not(.is-active), html .tv-body .tv-file-button:not(.tv-btn-primary),
html .tv-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html .tv-body select, html .tv-body .tv-select {
  background-color: rgba(127, 127, 127, 0.12) !important;
}
html .tv-body .tv-dropzone { background: rgba(127, 127, 127, 0.07) !important; }
html .tv-body .tv-seg { background: rgba(127, 127, 127, 0.1) !important; }
html .tv-body .tv-slider { background: rgba(127, 127, 127, 0.3) !important; }
html .tv-body input:checked + .tv-slider { background: var(--tv-red, #ff000d) !important; }

/* 2. Features list and How to use: no lines, text and picture alternate left / right */
.tv-features, .tv-guide { margin: 56px 0; }
.tv-feature-list { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 10px 36px; grid-template-columns: repeat(2, minmax(0, 1fr)); line-height: 1.5; }
.tv-guide-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "text media"; gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(24px, 4vw, 44px) 0; border: 0; }
.tv-guide-step:nth-of-type(even) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "media text"; }
.tv-guide-text { grid-area: text; }
.tv-guide-media { grid-area: media; min-width: 0; }
.tv-guide-text h3 { margin: 0 0 12px; border: 0; }
.tv-guide-text p { margin: 0 0 12px; line-height: 1.65; }
.tv-guide-img { display: block; width: 100%; height: auto; border: 0; border-radius: 22px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16); }
.tv-guide-step:nth-of-type(even) .tv-guide-img { border-radius: 22px 6px 22px 6px; }
.tv-guide-step:nth-of-type(odd) .tv-guide-img { border-radius: 6px 22px 6px 22px; }
.tv-guide-ph { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; min-height: 230px; padding: 20px; border: 0; border-radius: 22px; background: rgba(127, 127, 127, 0.12); font-size: .9rem; }
.tv-guide-ph code { word-break: break-all; }
.tv-guide-ph small { opacity: .75; }
@media (max-width: 800px) {
  .tv-feature-list { grid-template-columns: minmax(0, 1fr); }
  /* phones: heading, then its picture, then the text */
  .tv-guide-step, .tv-guide-step:nth-of-type(even) { display: flex; flex-direction: column; gap: 0; padding: 22px 0; }
  .tv-guide-text { display: contents; }
  .tv-guide-text h3 { order: 1; margin: 0 0 12px; }
  .tv-guide-media { order: 2; margin: 0 0 14px; }
  .tv-guide-text p { order: 3; margin: 0 0 10px; }
  .tv-guide-img, .tv-guide-step:nth-of-type(even) .tv-guide-img, .tv-guide-step:nth-of-type(odd) .tv-guide-img { border-radius: 18px; }
}

/* 3. Dark mode: header and page are one dark band, with real inner padding */
html[data-theme="dark"] .tv-header { background: var(--tv-bg); border-bottom: 0; box-shadow: none; }
html[data-theme="dark"] .tv-hero, html[data-theme="dark"] .tv-main { background: var(--tv-bg) !important; background-image: none !important; }
html[data-theme="dark"] .tv-hero { padding: 28px 0 12px; }
html[data-theme="dark"] .tv-hero-slim { padding: 24px 0 8px; }
html[data-theme="dark"] .tv-header-in { padding: 8px clamp(16px, 4vw, 32px); }
.tv-wrap { padding-left: clamp(16px, 4vw, 32px); padding-right: clamp(16px, 4vw, 32px); }
html[data-theme="dark"] .tv-body .tv-h1 { padding-left: 14px; }
html[data-theme="dark"] .tv-body .tv-settings, html[data-theme="dark"] .tv-body .tv-card, html[data-theme="dark"] .tv-body .tv-tool-card,
html[data-theme="dark"] .tv-body .tv-steps-list li, html[data-theme="dark"] .tv-body .tv-stat, html[data-theme="dark"] .tv-body .tv-trust {
  background: rgba(255, 255, 255, 0.06) !important; padding: 16px 18px;
}
/* dark: the tool panel is no longer a second, lighter box inside the page */
html[data-theme="dark"] .tv-body .tv-tool, html[data-theme="dark"] .tv-body .tv-tool-section { background: transparent !important; padding-left: 0; padding-right: 0; }
@media (max-width: 800px) { .tv-guide-step { text-align: left; align-items: stretch; } .tv-guide-text h3 { text-align: left; } }
