/* Anim8MyTrip Production Stylesheet */

/* --- base.css --- */
:root {
      --bg: #f4f5f7;
      --panel: #fff;
      --text: #1b1f27;
      --muted: #677084;
      --line: #dfe3ea;
      --accent: #e4572e;
      --accent-t: #fff;
      --chip: rgba(255, 255, 255, .88);
      box-sizing: border-box;
      padding-top: env(safe-area-inset-top, 0px);
      padding-bottom: env(safe-area-inset-bottom, 0px)
    }

    @media (prefers-color-scheme:dark) {
      :root:not([data-theme="light"]) {
        --bg: #12151b;
        --panel: #1b2029;
        --text: #e8ebf0;
        --muted: #9aa4b5;
        --line: #2c3340;
        --chip: rgba(27, 32, 41, .88)
      }
    }

    :root[data-theme="dark"] {
      --bg: #12151b;
      --panel: #1b2029;
      --text: #e8ebf0;
      --muted: #9aa4b5;
      --line: #2c3340;
      --chip: rgba(27, 32, 41, .88)
    }

    html {
      height: 100%;
      scroll-behavior: smooth;
      scroll-padding-top: calc(56px + env(safe-area-inset-top, 0px))
    }

    body {
      height: 100%;
      margin: 0;
      display: flex;
      flex-direction: column;
      background: var(--bg);
      color: var(--text);
      font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif
    }

/* --- landing.css --- */
#nav {
      height: 56px;
      flex: 0 0 56px;
      background: var(--panel);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      z-index: 20;
      box-sizing: border-box;
      gap: 16px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--text);
      font-weight: 800;
      font-size: 18px;
      letter-spacing: -.02em;
      cursor: pointer;
      flex: 1 1 0;
      min-width: max-content;
    }

    .brand img {
      width: 30px;
      height: 30px;
      border-radius: 7px;
      object-fit: cover;
      display: block;
      flex-shrink: 0;
    }

    .brand span b {
      color: var(--accent)
    }

    .nav-links {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      flex: 0 0 auto;
    }

    .nav-links a {
      text-decoration: none;
      color: var(--muted);
      font-weight: 600;
      font-size: 13px;
      padding: 7px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: color .15s, background .15s;
      white-space: nowrap;
    }

    .nav-links a:hover {
      color: var(--text);
      background: var(--bg)
    }

    .nav-links a.active {
      color: var(--text)
    }

    .nav-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex: 1 1 0;
      min-width: max-content;
    }

    .nav-actions button,
    .nav-actions .admin-btn {
      margin: 0;
    }

    .nav-actions .cta,
    .nav-links a.cta {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      font-weight: 700;
      font-size: 13px;
      background: var(--accent);
      color: var(--accent-t);
      padding: 7px 16px;
      border-radius: 8px;
      cursor: pointer;
      white-space: nowrap;
      transition: filter .15s, transform .15s, box-shadow .15s;
    }

    .nav-actions .cta:hover,
    .nav-links a.cta:hover {
      filter: brightness(1.08);
      color: var(--accent-t);
      background: var(--accent);
    }

    .nav-actions .cta.active,
    .nav-links a.cta.active {
      box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent);
    }

    #themeBtn {
      margin: 0;
      padding: 6px 10px;
      font-size: 14px;
      line-height: 1;
      border-radius: 8px;
    }

    @media (max-width: 768px) {
      .nav-links {
        display: none;
      }
    }

    #landing {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      position: relative;
      isolation: isolate;
    }

    #landing > footer {
      position: relative;
      z-index: 2;
    }

    .wrap {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 24px;
      box-sizing: border-box;
      width: 100%
    }

    .hero {
      padding: 56px 0 48px;
      display: grid;
      grid-template-columns: .95fr 1.05fr;
      gap: 36px;
      align-items: center;
      position: relative;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--accent);
      background: rgba(228, 87, 46, .12);
      padding: 5px 11px;
      border-radius: 999px;
      margin-bottom: 14px
    }

    .hero h1 {
      font-size: clamp(30px, 4.2vw, 46px);
      line-height: 1.1;
      letter-spacing: -.025em;
      margin: 0 0 14px
    }

    .hero h1 em {
      font-style: normal;
      color: var(--accent);
      white-space: nowrap;
    }

    .hero p.lead {
      font-size: 16px;
      line-height: 1.6;
      color: var(--muted);
      margin: 0 0 24px;
      max-width: 520px
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center
    }

    .hero-actions button {
      padding: 11px 18px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 10px;
      margin: 0
    }

    .hero-actions button.s {
      background: var(--panel);
      color: var(--text);
      border: 1px solid var(--line);
      cursor: pointer;
      transition: background .15s, border-color .15s;
    }

    .hero-actions button.s:hover {
      background: var(--bg);
      border-color: var(--muted);
    }

    .hero-meta {
      display: flex;
      gap: 18px;
      flex-wrap: wrap;
      margin-top: 22px;
      font-size: 12px;
      color: var(--muted)
    }

    .hero-meta span {
      display: inline-flex;
      align-items: center;
      gap: 5px
    }

    .preview-card {
      position: relative;
      border-radius: 18px;
      background: var(--panel);
      padding: 10px;
      box-shadow: 0 22px 50px rgba(0, 0, 0, .18);
      border: 1px solid var(--line);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    #heroStage {
      width: 100%;
      aspect-ratio: 16/9;
      min-height: 260px;
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      background: #9cc9ef
    }

    #heroStage #stage {
      position: absolute;
      inset: 0;
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      aspect-ratio: auto !important;
      border: 0;
      border-radius: 12px;
      box-shadow: none
    }

    #heroStage #chip {
      display: none
    }

    .hero-preview-controls {
      position: absolute;
      right: 18px;
      bottom: 18px;
      z-index: 6;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.16);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    }

    .hero-ctrl-btn {
      width: 32px;
      height: 32px;
      padding: 0;
      margin: 0;
      border: 0;
      border-radius: 50%;
      background: transparent;
      color: #f8fafc;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background-color 160ms ease, transform 160ms ease, color 160ms ease;
    }

    .hero-ctrl-btn:hover {
      background: rgba(255, 255, 255, 0.16);
    }

    .hero-ctrl-btn:active {
      transform: scale(0.94);
    }

    .hero-ctrl-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .hero-ctrl-btn.is-toggled {
      background: rgba(228, 87, 46, 0.88);
      color: #ffffff;
    }

    .hero-ctrl-btn.is-toggled:hover {
      background: var(--accent);
    }

    .preview-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      background: var(--bg);
      padding: 8px 12px;
      border-radius: 10px;
      font-size: 12px;
      font-weight: 600
    }

    .preview-badges {
      display: flex;
      gap: 5px
    }

    .preview-badges i {
      font-style: normal;
      background: var(--accent);
      color: #fff;
      padding: 2px 7px;
      border-radius: 5px;
      font-size: 11px
    }

    .preview-actions {
      display: flex;
      justify-content: center;
      margin-top: 12px
    }

    .preview-actions button {
      padding: 10px 18px;
      font-size: 13.5px;
      font-weight: 600;
      border-radius: 10px;
      margin: 0;
      background: var(--panel);
      transition: border-color .15s, transform .15s
    }

    .preview-actions button:hover {
      border-color: var(--accent);
      transform: translateY(-1px)
    }

    #features {
      padding: 48px 0 68px;
      border-top: 1px solid var(--line)
    }

    .trust-privacy-card {
      margin-top: 48px;
      display: flex;
      gap: 24px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 26px 30px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
      align-items: flex-start;
    }

    .trust-privacy-icon-badge {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: rgba(34, 197, 94, 0.12);
      color: #22c55e;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .trust-privacy-content {
      flex: 1;
    }

    .trust-privacy-head {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

    .trust-privacy-head h3 {
      margin: 0;
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
    }

    .trust-privacy-badge {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 3px 9px;
      border-radius: 999px;
      background: rgba(34, 197, 94, 0.15);
      color: #16a34a;
    }

    :root[data-theme="dark"] .trust-privacy-badge {
      color: #4ade80;
    }

    .trust-privacy-sub {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
      max-width: 820px;
    }

    .trust-privacy-points {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px 20px;
    }

    .trust-point {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--text);
    }

    .trust-point-icon {
      font-size: 15px;
      line-height: 1;
    }

    .trust-point strong {
      font-weight: 600;
    }

    @media (max-width: 680px) {
      .trust-privacy-card {
        flex-direction: column;
        padding: 22px 20px;
        gap: 16px;
      }
    }

    .sec-head {
      text-align: center;
      max-width: 600px;
      margin: 0 auto 36px
    }

    .sec-head h2 {
      font-size: 26px;
      text-transform: none;
      letter-spacing: -.015em;
      color: var(--text);
      margin: 0 0 8px
    }

    .sec-head p {
      margin: 0;
      color: var(--muted);
      font-size: 15px
    }

    /* --- 4-Stage Creative Pipeline --- */
    .pipeline {
      display: flex;
      flex-direction: column;
      gap: 32px;
      margin-top: 10px;
    }

    .stage-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 32px;
      display: grid;
      grid-template-columns: 1.05fr .95fr;
      gap: 36px;
      align-items: center;
      transition: border-color .2s, box-shadow .2s;
    }

    .stage-card:hover {
      border-color: rgba(228, 87, 46, .4);
    }

    .stage-card.stage-reverse {
      grid-template-columns: .95fr 1.05fr;
    }

    .stage-card.stage-reverse .stage-info {
      order: 2;
    }

    .stage-card.stage-reverse .stage-visual {
      order: 1;
    }

    .stage-step {
      font-size: 11.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--accent);
      margin-bottom: 8px;
    }

    .stage-info h3 {
      font-size: 22px;
      letter-spacing: -.015em;
      margin: 0 0 10px;
      color: var(--text);
    }

    .stage-info p {
      font-size: 14px;
      line-height: 1.6;
      color: var(--muted);
      margin: 0 0 18px;
    }

    .stage-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .stage-tag {
      font-size: 11.5px;
      font-weight: 600;
      padding: 4px 10px;
      background: rgba(128, 128, 128, .08);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--text);
    }

    .stage-visual {
      background: rgba(128, 128, 128, .04);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-sizing: border-box;
      position: relative;
      overflow: hidden;
    }

    /* Stage 1: Mapping & Relief */
    .mock-search-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 10px 14px;
      font-size: 13px;
    }

    .mock-search-bar .mock-query {
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .mock-search-bar .mock-badge {
      margin-left: auto;
      font-size: 11px;
      font-weight: 600;
      color: var(--accent);
      background: rgba(228, 87, 46, .1);
      padding: 3px 8px;
      border-radius: 5px;
    }

    .mock-tiles-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .mock-tile-chip {
      font-size: 12px;
      font-weight: 600;
      padding: 6px 12px;
      border-radius: 8px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .mock-tile-chip.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .mock-elevation-box {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px 14px;
    }

    .mock-elevation-header {
      display: flex;
      justify-content: space-between;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .mock-elevation-header b {
      color: var(--text);
    }

    .mock-elevation-svg {
      width: 100%;
      height: 48px;
      display: block;
    }

    /* Stage 2: Fleet Showcase */
    .fleet-mini-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .fleet-mini-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 8px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      transition: transform .15s, border-color .15s;
    }

    .fleet-mini-card:hover {
      transform: translateY(-2px);
      border-color: var(--accent);
    }

    .fleet-mini-img {
      width: 64px;
      height: 48px;
      object-fit: contain;
      display: block;
    }

    .fleet-mini-name {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }

    .fleet-mini-badge {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 4px;
    }

    .badge-road { background: rgba(59, 130, 246, .18); color: #60a5fa; }
    .badge-rail { background: rgba(249, 115, 22, .18); color: #fb923c; }
    .badge-trail { background: rgba(34, 197, 94, .18); color: #4ade80; }
    .badge-air { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
    .badge-sea { background: rgba(6, 182, 212, .18); color: #38bdf8; }

    :root:not([data-theme="dark"]) .badge-road { color: #1d4ed8; background: #eff6ff; }
    :root:not([data-theme="dark"]) .badge-rail { color: #c2410c; background: #fff7ed; }
    :root:not([data-theme="dark"]) .badge-trail { color: #15803d; background: #f0fdf4; }
    :root:not([data-theme="dark"]) .badge-air { color: #334155; background: #f1f5f9; }
    :root:not([data-theme="dark"]) .badge-sea { color: #0e7490; background: #ecfeff; }

    .mock-marker-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .mock-marker-chip {
      font-size: 12px;
      font-weight: 600;
      padding: 6px 10px;
      border-radius: 7px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--text);
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    /* Stage 3: Memories & Media */
    .media-duo {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 16px;
      align-items: center;
    }

    .mock-polaroid {
      background: #ffffff;
      color: #1a1f2c;
      border-radius: 8px;
      padding: 10px 10px 14px;
      box-shadow: 0 10px 25px rgba(0,0,0,.18);
      transform: rotate(-3deg);
      width: 125px;
      flex-shrink: 0;
      position: relative;
    }

    .polaroid-pin {
      position: absolute;
      top: -8px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 15px;
    }

    .polaroid-photo {
      background: #1e2532;
      border-radius: 4px;
      height: 85px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      color: #f1f5f9;
      font-size: 11px;
      font-weight: 600;
      text-align: center;
      padding: 6px;
      box-sizing: border-box;
      border: 1px solid rgba(255,255,255,.08);
    }

    .polaroid-photo-sun {
      font-size: 20px;
    }

    .polaroid-cap {
      font-size: 11px;
      font-weight: 700;
      color: #0f172a;
      margin-top: 8px;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .polaroid-date {
      font-size: 11px;
      font-weight: 600;
      color: #64748b;
      text-align: center;
      margin-top: 2px;
    }

    .media-showcase-stack {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
    }

    .mock-spotlight-stage {
      position: relative;
      height: 126px;
      border-radius: 10px;
      background: linear-gradient(155deg, #172133 0%, #0f172a 60%, #1e293b 100%);
      border: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: 0 10px 26px rgba(4, 9, 20, 0.28);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .mock-spotlight-badge {
      position: absolute;
      top: 9px;
      left: 9px;
      display: inline-flex;
      align-items: baseline;
      gap: 8px;
      padding: 4px 9px;
      border-radius: 7px;
      background: rgba(12, 18, 30, 0.82);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: #f8fafc;
    }

    .mock-spotlight-title {
      font-size: 11px;
      font-weight: 700;
      color: #f8fafc;
    }

    .mock-spotlight-cnt {
      font-size: 10px;
      font-weight: 600;
      color: #cbd5e1;
      font-variant-numeric: tabular-nums;
    }

    .mock-spotlight-scene {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      color: #e2e8f0;
      font-size: 11.5px;
      font-weight: 600;
      text-align: center;
      padding-right: 48px;
    }

    .mock-spotlight-pip {
      position: absolute;
      right: 9px;
      bottom: 9px;
      width: 92px;
      height: 54px;
      border-radius: 7px;
      background: #0b1322;
      border: 1.5px solid rgba(255, 255, 255, 0.86);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.48);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .mock-spotlight-pip svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .mock-pip-tag {
      position: absolute;
      bottom: 3px;
      left: 5px;
      font-size: 8.5px;
      font-weight: 700;
      color: #f8fafc;
      letter-spacing: 0.02em;
    }

    .mock-media-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .mock-media-pill {
      font-size: 11px;
      font-weight: 600;
      padding: 4px 9px;
      border-radius: 999px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--muted);
    }

    .mock-media-pill.active {
      border-color: var(--accent);
      color: var(--text);
    }

    .mock-trimmer-wrap {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .mock-trimmer-head {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
    }

    .mock-trimmer-track {
      height: 28px;
      background: rgba(128,128,128,.15);
      border-radius: 6px;
      position: relative;
      overflow: hidden;
    }

    .mock-trimmer-window {
      position: absolute;
      left: 15%;
      width: 60%;
      top: 0;
      bottom: 0;
      background: rgba(228, 87, 46, .2);
      border-left: 3px solid var(--accent);
      border-right: 3px solid var(--accent);
    }

    .mock-trimmer-playhead {
      position: absolute;
      left: 45%;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #fff;
      box-shadow: 0 0 4px rgba(0,0,0,.5);
    }

    .mock-trimmer-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      color: var(--muted);
    }

    .ducking-tag {
      background: rgba(228, 87, 46, .1);
      color: var(--accent);
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
    }

    /* Stage 4: Camera & Export */
    .mock-cam-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .mock-cam-pill {
      font-size: 11.5px;
      font-weight: 600;
      padding: 5px 10px;
      border-radius: 7px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--muted);
    }

    .mock-cam-pill.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .mock-export-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    @media (max-width: 600px) {
      .mock-export-grid {
        grid-template-columns: 1fr;
      }
    }

    .mock-export-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .mock-export-card.active {
      border-color: var(--accent);
      background: rgba(228, 87, 46, .04);
    }

    .aspect-badge {
      font-size: 12px;
      font-weight: 800;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .aspect-badge.ratio-16-9 {
      width: 44px;
      height: 28px;
    }

    .aspect-badge.ratio-9-16 {
      width: 24px;
      height: 38px;
    }

    .aspect-badge.ratio-1-1 {
      width: 32px;
      height: 32px;
    }

    /* Mock Telemetry HUD Card (Pipeline Stage 02) */
    .mock-telemetry-hud-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    }

    .mock-telem-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
    }

    .mock-telem-badges {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }

    .mock-telem-hr-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 700;
      color: #fb923c;
      background: rgba(249, 115, 22, 0.12);
      border: 1px solid rgba(249, 115, 22, 0.28);
      border-radius: 999px;
      padding: 2px 8px;
    }

    .mock-hr-grad {
      display: inline-block;
      width: 18px;
      height: 6px;
      border-radius: 999px;
      background: linear-gradient(90deg, #fdba74 0%, #f97316 50%, #9a3412 100%);
    }

    .mock-telem-activity-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .mock-telem-chip {
      font-size: 11px;
      font-weight: 700;
      color: #10b981;
      background: rgba(16, 185, 129, 0.12);
      border: 1px solid rgba(16, 185, 129, 0.25);
      border-radius: 999px;
      padding: 2px 8px;
    }

    .mock-telem-cards-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    @media (max-width: 500px) {
      .mock-telem-cards-row {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    .mock-hud-box {
      background: rgba(15, 23, 42, 0.88);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 8px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .mock-hud-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.5px;
      color: rgba(255, 255, 255, 0.65);
    }

    .mock-hud-val {
      font-size: 15px;
      font-weight: 800;
      color: #ffffff;
      display: flex;
      align-items: baseline;
      gap: 3px;
    }

    .mock-hud-val small {
      font-size: 10px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.6);
    }

    .mock-hud-hr-bar {
      position: relative;
      display: block;
      width: 100%;
      height: 3.5px;
      margin-top: 3px;
      border-radius: 999px;
      background: linear-gradient(90deg, #fdba74 0%, #f97316 50%, #9a3412 100%);
    }

    .mock-hud-hr-dot {
      position: absolute;
      top: 50%;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 0 5px #f97316;
      transform: translate(-50%, -50%);
    }

    .mock-telem-profile-track {
      height: 32px;
      background: linear-gradient(180deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.04) 100%);
      border-bottom: 2px solid #10b981;
      border-radius: 6px;
      position: relative;
    }

    .mock-telem-needle {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #ffffff;
      box-shadow: 0 0 8px #10b981;
    }

    .mock-telem-needle::after {
      content: '';
      position: absolute;
      top: 2px;
      left: -4px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #10b981;
      border: 2px solid #ffffff;
    }

    .export-desc {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .export-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
    }

    .export-sub {
      font-size: 11px;
      color: var(--muted);
    }

    /* Hero Sample Chips */
    .hero-sample-chips-row {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-top: 16px;
      flex-wrap: wrap;
    }

    .hero-chips-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-right: 2px;
    }

    .hero-sample-chip {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 11px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      cursor: pointer;
      transition: all .18s ease;
    }

    .hero-sample-chip:hover {
      border-color: var(--accent);
      color: var(--accent);
      transform: translateY(-1px);
    }

    .hero-sample-chip.chip-active {
      background: var(--accent);
      color: var(--accent-t, #fff);
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(228, 87, 46, 0.28);
    }

    /* --- Interactive Starter Templates Showcase Section --- */
    #templates {
      padding: 56px 0 76px;
      border-top: 1px solid var(--line);
    }

    .templates-showcase {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 32px;
      align-items: start;
      margin-top: 16px;
    }

    .templates-showcase.full-layout {
      display: flex;
      flex-direction: column;
      gap: 24px;
      width: 100%;
    }

    .templates-showcase.full-layout .template-stage-panel {
      position: static;
      width: 100%;
    }

    .templates-showcase.full-layout #templateStage {
      width: 100%;
      aspect-ratio: 21 / 9;
      max-height: 480px;
      min-height: 320px;
    }

    @media (max-width: 768px) {
      .templates-showcase.full-layout #templateStage {
        aspect-ratio: 16 / 10;
        min-height: 240px;
      }
    }

    /* Template Carousel Container */
    .templates-carousel-wrapper {
      position: relative;
      width: 100%;
      display: flex;
      align-items: center;
      padding: 4px 0 12px;
    }

    .templates-carousel-track {
      display: flex;
      gap: 18px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      padding: 8px 4px 16px;
      width: 100%;
      scrollbar-width: thin;
      scrollbar-color: var(--line) transparent;
    }

    .templates-carousel-track::-webkit-scrollbar {
      height: 6px;
    }

    .templates-carousel-track::-webkit-scrollbar-track {
      background: transparent;
    }

    .templates-carousel-track::-webkit-scrollbar-thumb {
      background: var(--line);
      border-radius: 999px;
    }

    .templates-carousel-wrapper .template-card {
      flex: 0 0 340px;
      max-width: 340px;
      scroll-snap-align: center;
      user-select: none;
    }

    .templates-carousel-wrapper .template-card:hover {
      transform: translateY(-4px);
    }

    @media (max-width: 640px) {
      .templates-carousel-wrapper .template-card {
        flex: 0 0 290px;
        max-width: 290px;
      }
    }

    .tpl-carousel-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--panel);
      border: 1.5px solid var(--line);
      color: var(--text);
      font-size: 24px;
      line-height: 1;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 10;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
      transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .tpl-carousel-nav:hover {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
      transform: translateY(-50%) scale(1.08);
      box-shadow: 0 10px 28px rgba(228, 87, 46, 0.4);
    }

    .tpl-carousel-nav.prev {
      left: -18px;
    }

    .tpl-carousel-nav.next {
      right: -18px;
    }

    @media (max-width: 1024px) {
      .tpl-carousel-nav.prev {
        left: 4px;
      }
      .tpl-carousel-nav.next {
        right: 4px;
      }
    }

    .template-stage-panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
      box-shadow: 0 20px 48px rgba(0, 0, 0, .14);
      display: flex;
      flex-direction: column;
      gap: 10px;
      position: sticky;
      top: 76px;
    }

    #templateStage {
      width: 100%;
      aspect-ratio: 16/9;
      min-height: 280px;
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      background: #121620;
    }

    #templateStage #stage {
      position: absolute;
      inset: 0;
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      aspect-ratio: auto !important;
      border: 0;
      border-radius: 12px;
      box-shadow: none;
    }

    #templateStage #chip {
      display: none;
    }

    .template-stage-overlay {
      position: absolute;
      top: 12px;
      left: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      z-index: 3;
      pointer-events: none;
    }

    .template-stage-badge {
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: rgba(15, 23, 42, 0.88);
      color: #fff;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .template-stage-title {
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(0, 0, 0, 0.65);
      color: rgba(255, 255, 255, 0.88);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    .template-stage-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      background: var(--bg);
      padding: 8px 12px;
      border-radius: 10px;
      border: 1px solid var(--line);
      flex-wrap: wrap;
    }

    .tpl-bar-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tpl-cam-label {
      font-size: 11px;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .tpl-cam-label select {
      background: var(--panel);
      color: var(--text);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 11.5px;
      cursor: pointer;
    }

    .templates-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .template-card {
      background: var(--panel);
      border: 1.5px solid var(--line);
      border-radius: 14px;
      padding: 16px 18px;
      cursor: pointer;
      transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .template-card:hover {
      transform: translateX(4px);
      border-color: var(--accent);
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    }

    .template-card.active {
      border-color: var(--accent);
      background: linear-gradient(135deg, var(--panel) 0%, rgba(228, 87, 46, 0.06) 100%);
      box-shadow: 0 0 0 1px var(--accent), 0 12px 28px rgba(0, 0, 0, 0.1);
    }

    .template-card-main {
      display: flex;
      gap: 14px;
      align-items: flex-start;
    }

    .template-card-icon {
      font-size: 26px;
      line-height: 1;
      padding: 10px;
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .template-card-details {
      flex-grow: 1;
      min-width: 0;
    }

    .template-card-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 2px;
    }

    .template-card-title-row h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
    }

    .tpl-mini-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .tpl-badge-topo {
      background: rgba(34, 197, 94, 0.12);
      color: #16a34a;
      border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .tpl-badge-sat {
      background: rgba(59, 130, 246, 0.12);
      color: #2563eb;
      border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .tpl-badge-dark {
      background: rgba(168, 85, 247, 0.12);
      color: #9333ea;
      border: 1px solid rgba(168, 85, 247, 0.3);
    }

    .tpl-badge-street {
      background: rgba(245, 158, 11, 0.12);
      color: #d97706;
      border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .template-card-sub {
      margin: 0 0 6px;
      font-size: 11.5px;
      color: var(--muted);
      font-weight: 500;
    }

    .template-desc {
      margin: 0 0 10px;
      font-size: 12.5px;
      line-height: 1.45;
      color: var(--muted);
    }

    .template-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .tpl-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 5px;
      font-size: 11px;
      font-weight: 600;
      background: var(--bg);
      color: var(--text);
      border: 1px solid var(--line);
    }

    .tpl-tag.tpl-topo {
      border-color: rgba(34, 197, 94, 0.35);
      background: rgba(34, 197, 94, 0.08);
    }

    .tpl-tag.tpl-sat {
      border-color: rgba(59, 130, 246, 0.35);
      background: rgba(59, 130, 246, 0.08);
    }

    .tpl-tag.tpl-dark {
      border-color: rgba(168, 85, 247, 0.35);
      background: rgba(168, 85, 247, 0.08);
    }

    .tpl-tag.tpl-street {
      border-color: rgba(245, 158, 11, 0.35);
      background: rgba(245, 158, 11, 0.08);
    }

    .tpl-tag.tpl-vid {
      border-color: rgba(239, 68, 68, 0.35);
      background: rgba(239, 68, 68, 0.08);
      color: #ef4444;
    }

    .template-actions {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }

    .template-preview-hint {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      font-weight: 500;
      color: var(--muted);
    }

    .template-preview-hint::after {
      content: 'Click card to preview';
    }

    .template-card.active .template-preview-hint {
      color: var(--accent);
      font-weight: 600;
    }

    .template-card.active .template-preview-hint::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent);
      flex-shrink: 0;
    }

    .template-card.active .template-preview-hint::after {
      content: 'Now previewing';
    }

    /* Template Toast Notification */
    .template-toast {
      position: fixed;
      bottom: 84px;
      left: 50%;
      transform: translateX(-50%) translateY(24px);
      background: rgba(18, 24, 36, 0.94);
      color: #fff;
      border: 1px solid var(--accent, #e4572e);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
      padding: 11px 22px;
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      transition: opacity .28s cubic-bezier(0.16, 1, 0.3, 1),
                  transform .28s cubic-bezier(0.16, 1, 0.3, 1);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .template-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }

    @media (max-width: 960px) {
      .templates-showcase {
        grid-template-columns: 1fr;
        gap: 24px;
      }

      .template-stage-panel {
        position: static;
      }
    }

    #faq {
      padding: 48px 0 68px;
      border-top: 1px solid var(--line)
    }

    .faq-list {
      max-width: 820px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 10px
    }

    details.faq-item {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0;
      transition: border-color .15s
    }

    details.faq-item:hover,
    details.faq-item[open] {
      border-color: var(--accent)
    }

    details.faq-item summary {
      list-style: none;
      cursor: pointer;
      padding: 16px 20px;
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      user-select: none
    }

    details.faq-item summary::-webkit-details-marker {
      display: none
    }

    details.faq-item summary::after {
      content: "+";
      font-size: 20px;
      font-weight: 500;
      color: var(--accent);
      line-height: 1;
      flex-shrink: 0;
      transition: transform .15s
    }

    details.faq-item[open] summary::after {
      content: "−"
    }

    .faq-ans {
      padding: 0 20px 16px;
      color: var(--muted);
      font-size: 13.5px;
      line-height: 1.6;
      border-top: 1px solid var(--line);
      padding-top: 12px;
      margin-top: -2px
    }

    .faq-ans p {
      margin: 0 0 8px
    }

    .faq-ans p:last-child {
      margin-bottom: 0
    }

    .faq-ans ol,
    .faq-ans ul {
      margin: 6px 0;
      padding-left: 20px
    }

    .faq-ans li {
      margin: 4px 0
    }

    .faq-ans a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 600
    }

    .faq-ans a:hover {
      text-decoration: underline
    }

    .faq-ans code {
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 5px;
      padding: 1px 5px;
      font-size: 12px;
      color: var(--text)
    }

    .cta-band {
      margin-top: 40px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 26px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap
    }

    .cta-band h3 {
      margin: 0 0 4px;
      font-size: 18px
    }

    .cta-band p {
      margin: 0;
      color: var(--muted);
      font-size: 13px
    }

    footer {
      margin-top: auto;
      border-top: 1px solid var(--line);
      background: var(--panel);
      padding: 42px 0 26px;
      font-size: 13px;
      color: var(--muted);
    }

    .foot-wrap {
      max-width: 860px;
      margin: 0 auto;
      padding: 0 24px;
      box-sizing: border-box;
      width: 100%;
    }

    .foot-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 36px;
      margin-bottom: 32px;
    }

    .foot-col h4 {
      font-size: 11.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--text);
      margin: 0 0 14px;
    }

    .foot-col ul {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .foot-col a {
      color: var(--muted);
      text-decoration: none;
      cursor: pointer;
      font-size: 13.5px;
      transition: color .15s ease;
      display: inline-block;
    }

    .foot-col a:hover {
      color: var(--text);
    }

    .foot-bottom {
      border-top: 1px solid var(--line);
      padding-top: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      font-size: 12.5px;
      color: var(--muted);
      text-align: center;
    }

    @media (max-width: 680px) {
      .foot-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
      }
      .foot-col ul {
        align-items: center;
      }
    }

    @media (max-width:819px) {
      .hero {
        grid-template-columns: 1fr;
        padding: 36px 0
      }

      .stage-card, .stage-card.stage-reverse {
        grid-template-columns: 1fr;
        padding: 22px 18px;
        gap: 22px;
      }

      .stage-card.stage-reverse .stage-info {
        order: 1;
      }

      .stage-card.stage-reverse .stage-visual {
        order: 2;
      }

      .media-duo {
        grid-template-columns: 1fr;
        justify-items: center;
      }

      .nav-links a {
        padding: 6px 8px;
        font-size: 12px
      }
    }

    /* --- Legal & Static Subpage Styling --- */
    .page-scroll {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      min-height: 0;
      background: var(--bg);
    }

    .legal-wrap {
      max-width: 820px;
      width: 100%;
      margin: 48px auto 96px;
      padding: 0 32px;
      color: var(--text);
      line-height: 1.75;
      box-sizing: border-box;
      flex: 1 0 auto;
    }

    .legal-crumb {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 24px;
    }

    .legal-crumb a {
      color: var(--muted);
      text-decoration: none;
      font-weight: 500;
      transition: color .15s;
    }

    .legal-crumb a:hover {
      color: var(--accent);
    }

    .legal-header {
      margin-bottom: 32px;
    }

    .legal-header h1 {
      font-size: 36px;
      font-weight: 800;
      letter-spacing: -.03em;
      color: var(--text);
      margin: 0 0 10px;
      line-height: 1.2;
    }

    .legal-header .updated {
      font-size: 13px;
      color: var(--muted);
      font-weight: 500;
    }

    .highlight-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-left: 4px solid var(--accent);
      border-radius: 12px;
      padding: 22px 26px;
      margin: 28px 0 36px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
      font-size: 15px;
      line-height: 1.65;
    }

    .highlight-card strong {
      color: var(--accent);
      font-weight: 700;
    }

    .legal-section {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 28px 32px;
      margin-bottom: 24px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, .03);
    }

    .legal-wrap h2 {
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
      margin-top: 36px;
      margin-bottom: 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--line);
      letter-spacing: -.01em;
    }

    .legal-wrap p {
      font-size: 15px;
      color: var(--text);
      opacity: .92;
      margin-bottom: 16px;
      line-height: 1.75;
    }

    .legal-wrap ul {
      padding-left: 22px;
      margin-bottom: 20px;
    }

    .legal-wrap li {
      font-size: 15px;
      color: var(--text);
      opacity: .92;
      margin-bottom: 10px;
      line-height: 1.65;
    }

    .legal-wrap a {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 3px;
      font-weight: 600;
      transition: opacity .15s;
    }

    .legal-wrap a:hover {
      opacity: .8;
    }

    .legal-wrap code {
      background: var(--bg);
      border: 1px solid var(--line);
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 13px;
      color: var(--accent);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-weight: 600;
    }

    .not-found-box {
      min-height: 60vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 60px 24px;
      flex: 1 0 auto;
    }

    .not-found-code {
      font-size: 76px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1;
      margin-bottom: 12px;
      letter-spacing: -.03em;
    }

    .not-found-title {
      font-size: 26px;
      font-weight: 700;
      margin-bottom: 12px;
      color: var(--text);
    }

    .not-found-desc {
      font-size: 15px;
      color: var(--muted);
      max-width: 480px;
      margin-bottom: 28px;
      line-height: 1.65;
    }

    .not-found-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      justify-content: center;
    }

    @media (max-width: 819px) {
      .legal-wrap {
        margin: 28px auto 64px;
        padding: 0 20px;
      }
      .legal-header h1 {
        font-size: 28px;
      }
      .highlight-card {
        padding: 18px 20px;
      }
    }

/* --- landing-motion.css --- */
/* ==========================================================================
   Anim8MyTrip Home Page Motion Graphics
   1. "In Motion." Signature Hero Choreography
   2. "The Page as a Journey" Scroll-Driven Route & Fleet
   ========================================================================== */

:root {
  --lm-orange: var(--accent, #e4572e);
  --lm-orange-bright: #ff7a45;
  --lm-green: #06d6a0;
  --lm-green-ink: #0ea47a;
  --lm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --lm-ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lm-route-base: rgba(103, 112, 132, 0.28);
  --lm-landmark: rgba(103, 112, 132, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lm-route-base: rgba(154, 164, 181, 0.22);
    --lm-landmark: rgba(154, 164, 181, 0.36);
  }
}

:root[data-theme="dark"] {
  --lm-route-base: rgba(154, 164, 181, 0.22);
  --lm-landmark: rgba(154, 164, 181, 0.36);
}

/* Stacking context: cards sit above the decorative route (z-index: 1),
   allowing the S-curve to weave behind solid panels and emerge in gaps */
#landing .hero-copy-col,
#landing .preview-card,
#landing .preview-actions,
#landing .sec-head,
#landing .stage-card,
#landing .trust-privacy-card,
#landing .template-stage-panel,
#landing .templates-carousel-wrapper,
#landing .plan-card,
#landing details.faq-item,
#landing .cta-band {
  position: relative;
  z-index: 2;
}

#landing .templates-showcase.full-layout .template-stage-panel {
  top: auto;
  box-sizing: border-box;
}

/* ==========================================================================
   1. "In Motion." Signature Hero Reveal
   ========================================================================== */

.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.08;
  margin: 0 0 18px;
}

.hero-line {
  display: block;
}

html.lm-js .hero-line {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--lm-ease-out), transform 460ms var(--lm-ease-out);
}

html.lm-js .hero-headline.lm-lines-in .hero-line-1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0ms;
}

html.lm-js .hero-headline.lm-lines-in .hero-line-2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 110ms;
}

.in-motion-wrap {
  position: relative;
  display: inline-block;
  font-style: normal;
  white-space: nowrap;
  cursor: pointer;
  padding-bottom: 10px;
  margin-bottom: -4px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.in-motion-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.in-motion-visual {
  position: relative;
  display: inline-grid;
  align-items: baseline;
}

.in-motion-ghost,
.in-motion-ink {
  grid-area: 1 / 1;
  white-space: nowrap;
}

/* Early-readability warm ghost layer: appears by ~0.3s so headline is legible <0.5s */
.in-motion-ghost {
  color: rgba(228, 87, 46, 0.24);
  opacity: 1;
  transition: opacity 280ms var(--lm-ease-out);
}

:root[data-theme="dark"] .in-motion-ghost {
  color: rgba(255, 122, 69, 0.30);
}

html.lm-js .in-motion-wrap:not(.lm-ghost-in) .in-motion-ghost {
  opacity: 0;
}

/* Vibrant ink layer revealed progressively behind the moving route head */
.in-motion-ink {
  color: var(--lm-orange);
  clip-path: inset(0 calc(100% - var(--in-motion-wipe, 100%)) 0 0);
  will-change: clip-path;
}

.in-motion-wrap.lm-settled .in-motion-ink {
  will-change: auto;
}

/* Keep the period crisp and readable now that the Start Flag sits cleanly to its right */
.in-motion-period,
.in-motion-period-ghost {
  display: inline-block;
}

/* Inline SVG overlay anchored to "In Motion." */
.in-motion-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.lm-start-pin-anim {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: opacity 320ms var(--lm-ease-out);
}

.in-motion-wrap.lm-pin-dropped .lm-start-pin-anim {
  animation: lmPinDrop 420ms var(--lm-ease-pop) forwards;
}

/* Fade launch pin smoothly away once the route settles so the headline stays ultra-clean */
.in-motion-wrap.lm-settled .lm-start-pin-anim {
  animation: none;
  opacity: 0;
}

.lm-start-ripple {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.in-motion-wrap.lm-pin-dropped .lm-start-ripple {
  animation: lmPinRipple 680ms var(--lm-ease-out) 120ms forwards;
}

.lm-sweep-tail {
  stroke-linecap: round;
  opacity: 0;
}

.lm-sweep-head {
  opacity: 0;
}

.lm-end-pin-base {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 200ms var(--lm-ease-out), transform 260ms var(--lm-ease-pop);
  transform: scale(0.3);
}

.in-motion-wrap.lm-period-morphed .lm-end-pin-base {
  opacity: 1;
  transform: scale(1);
}

.lm-end-pin-pulse {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.in-motion-wrap.lm-settled .lm-end-pin-pulse {
  animation: lmPinBreathe 3.2s ease-in-out infinite;
}

.lm-flag-anim {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 18% 95%;
}

.in-motion-wrap.lm-flag-planted .lm-flag-anim {
  opacity: 1;
  animation: lmFlagWobble 620ms var(--lm-ease-out) forwards;
}

.in-motion-wrap.lm-settled:hover .lm-flag-anim {
  filter: brightness(1.08);
}

.lm-sparkle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.in-motion-wrap.lm-sparkle-fire .lm-sparkle {
  animation: lmSparkleBurst 580ms var(--lm-ease-out) forwards;
}

/* Continuous route trail from "In Motion." -> behind .preview-card -> Right-Side Journey Start
   z-index: 1 sits cleanly behind .hero-copy-col & .preview-card (z-index: 2) */
.hero-handoff-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.hero-handoff-path {
  stroke: var(--lm-orange);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 360ms var(--lm-ease-out);
}

.hero-handoff-path.lm-visible {
  opacity: 0.72;
}

:root[data-theme="dark"] .hero-handoff-path.lm-visible {
  stroke: var(--lm-orange-bright);
  opacity: 0.82;
}

.hero-handoff-dot {
  fill: var(--lm-orange);
  stroke: var(--panel);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 280ms var(--lm-ease-out);
}

.hero-handoff-dot.lm-visible {
  opacity: 1;
}

.hero-handoff-pulse {
  fill: none;
  stroke: var(--lm-orange);
  stroke-width: 1.8;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.hero-handoff-pulse.lm-visible {
  animation: lmPinBreathe 2.8s ease-in-out infinite;
}

/* Hero keyframes */
@keyframes lmPinDrop {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(0.7);
  }
  55% {
    opacity: 1;
    transform: translateY(2px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lmPinRipple {
  0% {
    opacity: 0.55;
    transform: scale(0.45);
  }
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes lmFlagWobble {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.55) rotate(-18deg);
  }
  38% {
    opacity: 1;
    transform: translateY(-1px) scale(1.06) rotate(9deg);
  }
  65% {
    transform: translateY(0) scale(1) rotate(-4deg);
  }
  84% {
    transform: rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes lmPinBreathe {
  0%, 100% {
    opacity: 0.42;
    transform: scale(1);
  }
  50% {
    opacity: 0.08;
    transform: scale(2.15);
  }
}

@keyframes lmSparkleBurst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--sx, 14px), var(--sy, -14px)) scale(0.2);
  }
}

/* ==========================================================================
   2. "The Page as a Journey" Scroll Route, Fleet & Checkpoints
   ========================================================================== */

.journey-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.journey-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Two-layer dotted route: faint grey full-length base + vibrant orange dotted progress (color-only reveal via SVG mask) */
.journey-path-base {
  stroke: var(--lm-route-base);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.journey-path-glow {
  stroke: var(--lm-orange-bright);
  stroke-width: 7;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 300ms ease;
}

.journey-path-progress {
  stroke: var(--lm-orange);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  opacity: 0.78;
}

/* Dark mode: luminous night-drive road glow */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .journey-path-glow {
    opacity: 0.24;
  }
  :root:not([data-theme="light"]) .journey-path-progress {
    stroke: var(--lm-orange-bright);
  }
}

:root[data-theme="dark"] .journey-path-glow {
  opacity: 0.24;
}

:root[data-theme="dark"] .journey-path-progress {
  stroke: var(--lm-orange-bright);
}

/* Traveler icon & headlight cone */
.journey-traveler-wrap {
  will-change: transform;
}

.journey-traveler-inner {
  transform-box: fill-box;
  transform-origin: center;
}

.journey-traveler-wrap.is-idle .journey-traveler-inner {
  animation: lmTravelerIdle 1.8s ease-in-out infinite;
}

.journey-traveler-wrap.is-swapping .journey-traveler-inner {
  animation: lmVehicleSwap 320ms var(--lm-ease-pop);
}

.journey-swap-puff {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.journey-traveler-wrap.is-swapping .journey-swap-puff {
  animation: lmSwapPuff 360ms var(--lm-ease-out);
}

.journey-swap-puff-ring {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.journey-swap-puff-ring.is-bursting {
  animation: lmSwapPuff 380ms var(--lm-ease-out);
}

/* Bare 3D Vehicle Mini-Canvas Host (Desktop >= 820px, z-index inside #journeyLayer) */
.journey-3d-host {
  position: absolute;
  top: 0;
  left: 0;
  width: 96px;
  height: 96px;
  pointer-events: none;
  display: none;
  will-change: transform;
  transform: translate3d(-999px, -999px, 0);
}

.journey-3d-host.is-active {
  display: block;
}

.journey-3d-canvas {
  display: block;
  width: 96px;
  height: 96px;
  pointer-events: none;
}

.journey-3d-host.is-idle .journey-3d-canvas {
  animation: lmTravelerIdle 2.1s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .journey-3d-host {
    filter: drop-shadow(0 6px 12px rgba(255, 122, 69, 0.35));
  }
}

:root[data-theme="dark"] .journey-3d-host {
  filter: drop-shadow(0 6px 12px rgba(255, 122, 69, 0.35));
}

body.lm-studio-active .journey-3d-host {
  display: none !important;
}

.journey-headlight {
  opacity: 0;
  transition: opacity 250ms ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .journey-headlight {
    opacity: 0.85;
  }
  :root:not([data-theme="light"]) .journey-traveler-wrap {
    filter: drop-shadow(0 0 6px rgba(255, 122, 69, 0.55));
  }
}

:root[data-theme="dark"] .journey-headlight {
  opacity: 0.85;
}

:root[data-theme="dark"] .journey-traveler-wrap {
  filter: drop-shadow(0 0 6px rgba(255, 122, 69, 0.55));
}

.journey-dust-dot {
  fill: var(--lm-orange-bright);
  opacity: 0;
}

/* Roadside line-art landmarks */
.journey-landmark-art {
  color: var(--lm-landmark);
  opacity: 0.14;
  transform: translateY(6px);
  transition: opacity 520ms var(--lm-ease-out), transform 520ms var(--lm-ease-out);
}

.journey-landmark.is-near .journey-landmark-art {
  opacity: 0.56;
  transform: translateY(0);
}

@keyframes lmTravelerIdle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2.5px);
  }
}

@keyframes lmVehicleSwap {
  0% {
    transform: scale(0.45) rotate(-180deg);
    opacity: 0.4;
  }
  65% {
    transform: scale(1.18) rotate(12deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes lmSwapPuff {
  0% {
    opacity: 0.72;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

/* ==========================================================================
   Clickable Checkpoints Layer (sits at z-index: 4 above sections for clicks)
   ========================================================================== */

.journey-pins {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.journey-pin {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  transform: translate3d(0, 0, 0);
  transition: filter 180ms ease;
}

.journey-pin-node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition: transform 320ms var(--lm-ease-pop),
              background-color 220ms ease,
              border-color 220ms ease,
              box-shadow 260ms ease;
}

.journey-pin-check {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 200ms ease, transform 260ms var(--lm-ease-pop);
}

.journey-pin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  transition: background-color 200ms ease, transform 200ms ease;
}

.journey-pin-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: color 200ms ease, border-color 200ms ease, transform 240ms var(--lm-ease-out), opacity 200ms ease;
}

.journey-pin:hover .journey-pin-node {
  transform: scale(1.12);
  border-color: var(--lm-orange);
}

.journey-pin:hover .journey-pin-label {
  color: var(--text);
  border-color: rgba(228, 87, 46, 0.45);
}

/* Active arrival state */
.journey-pin.is-active .journey-pin-node {
  border-color: var(--lm-orange);
  background: var(--panel);
  transform: scale(1.18);
  box-shadow: 0 5px 16px rgba(228, 87, 46, 0.34);
}

.journey-pin.is-active .journey-pin-dot {
  background: var(--lm-orange);
  transform: scale(1.25);
}

.journey-pin.is-active .journey-pin-label {
  color: var(--text);
  border-color: var(--lm-orange);
}

/* Visited state: solid orange with crisp white check mark */
.journey-pin.is-visited .journey-pin-node {
  background: var(--lm-orange);
  border-color: var(--lm-orange);
  box-shadow: 0 4px 12px rgba(228, 87, 46, 0.25);
}

.journey-pin.is-visited .journey-pin-dot {
  display: none;
}

.journey-pin.is-visited .journey-pin-check {
  opacity: 1;
  transform: scale(1);
}

/* Finale checkpoint pin turns green with flag */
.journey-pin.is-finale.is-active .journey-pin-node,
.journey-pin.is-finale.is-visited .journey-pin-node {
  background: var(--lm-green);
  border-color: var(--lm-green);
  box-shadow: 0 6px 18px rgba(6, 214, 160, 0.36);
}

.journey-pin.is-finale.is-active .journey-pin-label,
.journey-pin.is-finale.is-visited .journey-pin-label {
  border-color: var(--lm-green);
  color: var(--text);
}

/* Pin label alignment inside the Right Scenic Lane (desktop >= 1024px):
   compact pill sits cleanly above each inward waypoint node, pointing toward its card */
.journey-pins.mode-right-lane .journey-pin {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 5px;
}

.journey-pins.mode-right-lane .journey-pin-label {
  font-size: 10px;
  padding: 2.5px 7px;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journey-pins.mode-right-lane .journey-pin-node::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--line);
  transform: translateY(-50%);
  pointer-events: none;
  transition: background-color 220ms ease;
}

.journey-pins.mode-right-lane .journey-pin.is-active .journey-pin-node::before,
.journey-pins.mode-right-lane .journey-pin.is-visited .journey-pin-node::before {
  background: var(--lm-orange);
}

.journey-pins.mode-right-lane .journey-pin.is-finale.is-active .journey-pin-node::before,
.journey-pins.mode-right-lane .journey-pin.is-finale.is-visited .journey-pin-node::before {
  background: var(--lm-green);
}

.journey-pins.mode-right-lane .journey-pin-node {
  position: relative;
}

/* On narrow tablet / mobile (< 1024px) left-edge track, keep pins compact */
.journey-pins.mode-mobile .journey-pin-label {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
}

.journey-pins.mode-mobile .journey-pin:hover .journey-pin-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.journey-pins.mode-mobile .journey-pin-node {
  width: 15px;
  height: 15px;
  border-width: 1.8px;
}

.journey-pins.mode-mobile .journey-pin-dot {
  width: 4.5px;
  height: 4.5px;
}

.journey-pins.mode-mobile .journey-pin-check {
  width: 8px;
  height: 8px;
}

/* ==========================================================================
   Section Card Arrival & Calm Resting Departure
   (Never hides content at opacity 0 — always readable by default)
   ========================================================================== */

#landing .stage-card,
#landing .cta-band {
  transition: transform 380ms var(--lm-ease-out),
              border-color 320ms ease,
              box-shadow 380ms var(--lm-ease-out);
}

#landing .stage-card.journey-arrived {
  transform: translateY(-3px);
  border-color: rgba(228, 87, 46, 0.48);
  box-shadow: 0 18px 40px rgba(228, 87, 46, 0.10), 0 6px 16px rgba(0, 0, 0, 0.06);
}

:root[data-theme="dark"] #landing .stage-card.journey-arrived {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 8px 20px rgba(228, 87, 46, 0.12);
}

#templates.journey-arrived .template-stage-panel {
  border-color: rgba(228, 87, 46, 0.45);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.18);
}

#pricing.journey-arrived .plan-card.featured {
  transform: translateY(-3px);
}

/* One-time crisp staggered micro-entrance on arrival (always visible) */
.stage-card.journey-content-enter .stage-step,
.stage-card.journey-content-enter .stage-info h3 {
  animation: lmMicroArrive 380ms var(--lm-ease-out) both;
}

.stage-card.journey-content-enter .stage-tags {
  animation: lmMicroArrive 400ms var(--lm-ease-out) 65ms both;
}

.stage-card.journey-content-enter .stage-visual {
  animation: lmMicroArrive 440ms var(--lm-ease-out) 130ms both;
}

@keyframes lmMicroArrive {
  0% {
    transform: translateY(7px);
    opacity: 0.86;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Finale CTA Flag & Button Pulse
   ========================================================================== */

.cta-band.journey-finale-reached {
  border-color: rgba(6, 214, 160, 0.55);
  box-shadow: 0 16px 38px rgba(6, 214, 160, 0.12), 0 6px 18px rgba(0, 0, 0, 0.06);
}

.cta-finale-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 8px;
  opacity: 0;
  transform: translateY(5px) scale(0.6) rotate(-14deg);
  transition: opacity 280ms var(--lm-ease-out);
}

.cta-band.journey-finale-reached .cta-finale-flag {
  opacity: 1;
  animation: lmFlagWobble 640ms var(--lm-ease-out) forwards;
}

.cta-band.journey-finale-reached #bandOpen {
  animation: lmCtaPulse 2.4s ease-in-out 2;
}

@keyframes lmCtaPulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(228, 87, 46, 0.28);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 10px 26px rgba(228, 87, 46, 0.48);
    transform: translateY(-1.5px);
  }
}

/* ==========================================================================
   Floating Travel HUD Pill (Stage Progress + km Counter)
   ========================================================================== */

.journey-hud {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--chip);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 260ms var(--lm-ease-out),
              transform 300ms var(--lm-ease-out),
              border-color 220ms ease;
}

.journey-hud.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.journey-hud.is-finale {
  pointer-events: auto;
  cursor: pointer;
  border-color: rgba(6, 214, 160, 0.55);
}

.journey-hud.is-finale:hover {
  border-color: var(--lm-green);
}

.journey-hud-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.journey-hud-label {
  color: var(--text);
  white-space: nowrap;
}

.journey-hud-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
  flex-shrink: 0;
}

.journey-hud-km {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--lm-orange);
  white-space: nowrap;
}

.journey-hud.is-finale .journey-hud-km {
  color: var(--lm-green-ink);
}

:root[data-theme="dark"] .journey-hud.is-finale .journey-hud-km {
  color: var(--lm-green);
}

.journey-hud-cta {
  color: var(--lm-orange);
  font-weight: 700;
  margin-left: 2px;
}

/* Hide HUD completely while Studio is active */
#app.active ~ .journey-hud,
body.lm-studio-active .journey-hud {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Responsive Breakpoints
   - >= 1420px: .wrap stays 100% centered (190px+ natural left & right margins)
   - 1200–1419px: true left/right symmetry (144px equal margins both sides)
   - 1024–1199px: balanced 64px left margin + 148px right scenic corridor
   - < 1024px: slim left-edge vertical track + compact SVG traveler
   ========================================================================== */

@media (min-width: 1200px) and (max-width: 1419px) {
  #landing .wrap {
    max-width: 1388px;
    padding-left: 144px;
    padding-right: 144px;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  #landing .wrap {
    max-width: 1199px;
    padding-left: 64px;
    padding-right: 148px;
  }
}

@media (max-width: 1023px) {
  #landing .wrap {
    padding-left: 34px;
    padding-right: 20px;
  }
}

@media (max-width: 819px) {
  #landing .wrap {
    padding-left: 28px;
    padding-right: 18px;
  }

  .hero-headline {
    margin-bottom: 16px;
  }

  .in-motion-wrap {
    padding-bottom: 8px;
  }

  .journey-path-base {
    stroke-width: 1.8;
    stroke-dasharray: 4 5;
  }

  .journey-path-progress {
    stroke-width: 1.8;
    stroke-dasharray: 4 5;
  }

  .journey-hud {
    left: auto;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    font-size: 11px;
    gap: 7px;
    max-width: calc(100vw - 44px);
  }

  .journey-hud-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }
}

/* ==========================================================================
   Reduced Motion (prefers-reduced-motion: reduce)
   Instant final hero state + static journey route with checkpoints
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html.lm-js .hero-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .in-motion-ghost {
    opacity: 0 !important;
  }

  .in-motion-ink {
    clip-path: none !important;
    will-change: auto !important;
  }

  .lm-end-pin-base,
  .lm-flag-anim,
  .hero-handoff-path,
  .hero-handoff-dot {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .hero-handoff-path {
    opacity: 0.65 !important;
  }

  .lm-start-pin-anim,
  .lm-start-ripple,
  .lm-end-pin-pulse,
  .hero-handoff-pulse,
  .lm-sparkle,
  .lm-sweep-head,
  .lm-sweep-tail,
  .journey-traveler-wrap,
  .journey-3d-host,
  .journey-swap-puff-ring,
  .journey-dust-dot {
    display: none !important;
    animation: none !important;
  }

  .journey-landmark-art {
    opacity: 0.34 !important;
    transform: none !important;
    transition: none !important;
  }

  .journey-pin-node,
  .journey-pin-check,
  #landing .stage-card,
  #landing .cta-band,
  .cta-finale-flag,
  #bandOpen,
  .journey-hud {
    animation: none !important;
    transition: none !important;
  }

  .cta-finale-flag {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- tool.css --- */
#app {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0
}

#app.active {
  display: flex
}

#main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg)
}

#stage-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px 0;
  flex-shrink: 0;
  min-height: 36px
}

.stage-left-bar {
  position: absolute;
  left: 20px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
}

.stage-actions {
  position: absolute;
  right: 20px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 6px
}

.stage-actions > button,
.stage-actions > label.btn {
  margin: 0;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.stage-actions > button:hover,
.stage-actions > label.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stage-actions > button.p {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.stage-actions > button.p:hover {
  background: var(--accent-hover, #ff533d);
  border-color: var(--accent-hover, #ff533d);
  color: #fff;
}

.stage-more-wrap {
  position: relative;
  display: none;
}

.stage-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-more-btn:hover,
.stage-more-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg);
}

.stage-more-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 155px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stage-more-popover .stage-more-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 9px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  margin: 0;
  box-sizing: border-box;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.stage-more-popover .stage-more-item svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s ease;
}

.stage-more-popover .stage-more-item:hover,
.stage-more-popover .stage-more-item:active {
  background: var(--bg);
  color: var(--accent);
}

.stage-more-popover .stage-more-item:hover svg,
.stage-more-popover .stage-more-item:active svg {
  color: var(--accent);
}

@media (max-width: 767px) {
  #stage-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 0;
    gap: 4px;
    min-height: 40px;
    box-sizing: border-box;
  }

  .stage-left-bar {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: auto !important;
    flex-shrink: 0;
  }

  .stage-left-bar .stage-icon-btn {
    width: 30px;
    height: 30px;
  }

  .ar-group {
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
    margin: 0 auto;
  }

  .ar-btn {
    width: 28px;
    height: 26px;
  }

  .stage-actions {
    position: static !important;
    right: auto !important;
    top: auto !important;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .stage-action-desktop {
    display: none !important;
  }

  .stage-more-wrap {
    display: block;
  }

  .stage-actions > button.p {
    padding: 6px 12px;
    font-size: 12px;
  }
}

.ar-group {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 3px
}

.ar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s
}

.ar-btn:hover {
  color: var(--text);
  background: var(--bg)
}

.ar-btn.active {
  background: var(--accent);
  color: var(--accent-t)
}

.ar-btn svg {
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8
}

#stage-wrap {
  flex: 1;
  min-height: 180px;
  padding: 8px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden
}

#stage {
  width: min(100%, calc((100vh - var(--stage-chrome-h, 262px)) * 16 / 9));
  max-width: 980px;
  aspect-ratio: 16/9;
  max-height: 100%;
  position: relative;
  overflow: hidden;
  touch-action: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  background: #9cc9ef;
  transition: width .2s ease
}

#stage.portrait {
  width: min(100%, calc((100vh - var(--stage-chrome-h, 262px)) * 9 / 16));
  aspect-ratio: 9/16
}

#stage.square {
  width: min(100%, calc(100vh - var(--stage-chrome-h, 262px)));
  max-width: calc(100vh - var(--stage-chrome-h, 262px));
  aspect-ratio: 1/1;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%
}

#stage .stage-webgl-canvas {
  position: relative;
  z-index: 2;
  transform-origin: 0% 0%;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.42s ease, box-shadow 0.42s ease;
  will-change: transform;
}

#stage.pip-layer .stage-webgl-canvas {
  z-index: 8;
}

#stage.pip-active .stage-webgl-canvas {
  transform: translate(var(--pip-left, 16px), var(--pip-top, 16px)) scale(var(--pip-scale, 0.28));
  border-radius: calc(10px / var(--pip-scale, 0.28));
  outline: calc(2px / var(--pip-scale, 0.28)) solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 calc(10px / var(--pip-scale, 0.28)) calc(28px / var(--pip-scale, 0.28)) rgba(4, 9, 20, 0.62);
}

#chip {
  display: none !important;
}

#dock {
  --tl-text-sub: #4b5565;
  --tl-seg-bg: #ffffff;
  --tl-seg-hover: #f8f9fb;
  --tl-track-bg: #eef1f5;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #dock {
    --tl-text-sub: #a8b3c4;
    --tl-seg-bg: #232a36;
    --tl-seg-hover: #2a3342;
    --tl-track-bg: #141820;
  }
}

:root[data-theme="dark"] #dock {
  --tl-text-sub: #a8b3c4;
  --tl-seg-bg: #232a36;
  --tl-seg-hover: #2a3342;
  --tl-track-bg: #141820;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.dock-play {
  justify-content: space-between;
  flex-wrap: nowrap;
  min-height: 32px;
}

.dock-play-left,
.dock-play-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-row button {
  margin: 0
}

.dock-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.dock-icon-btn:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.dock-icon-btn:focus-visible,
.dock-reset-btn:focus-visible,
.tl-leg-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dock-icon-btn.p {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.dock-icon-btn.p:hover {
  background: var(--accent-hover, #ff533d);
  border-color: var(--accent-hover, #ff533d);
}

.dock-icon-btn svg {
  display: block;
  pointer-events: none;
}

.dock-time-readout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.dock-time-cur {
  font-weight: 700;
  color: var(--text);
}

.dock-time-sep,
.dock-time-tot {
  font-weight: 500;
  color: var(--tl-text-sub);
}

.dock-hold-pill {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(228, 87, 46, 0.14);
  color: var(--text);
  border: 1px solid rgba(228, 87, 46, 0.35);
}

.dock-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--tl-text-sub);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.dock-reset-btn.has-custom {
  color: var(--text);
}

.dock-reset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--panel);
}

/* Segmented Leg Timeline */
.leg-timeline-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  background: var(--tl-track-bg);
  border: 1px solid var(--line);
  box-sizing: border-box;
  user-select: none;
}

.leg-timeline-wrap.is-exporting {
  pointer-events: none;
  opacity: 0.52;
}

.leg-timeline-empty {
  min-height: 52px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--tl-text-sub);
  text-align: center;
}

.leg-timeline-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 9px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.leg-timeline-viewport::-webkit-scrollbar {
  height: 5px;
}

.leg-timeline-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.leg-timeline-viewport::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.leg-timeline-canvas {
  position: relative;
  min-width: 100%;
  box-sizing: border-box;
}

.leg-timeline-scrub-rail {
  position: relative;
  height: 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  touch-action: none;
  overflow: hidden;
}

.tl-ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 5px;
  background: var(--line);
  pointer-events: none;
}

.tl-ruler-lbl {
  position: absolute;
  bottom: 4px;
  left: 3px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--tl-text-sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.leg-timeline-track {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 60px;
  padding: 6px 20px 6px 12px;
  box-sizing: border-box;
}

.tl-stop-node {
  position: relative;
  width: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
}

.tl-stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--tl-text-sub);
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.tl-stop-node.is-start .tl-stop-dot {
  background: #10b981;
  border-color: #ffffff;
  width: 9px;
  height: 9px;
}

.tl-stop-node.is-end .tl-stop-dot {
  background: #ef4444;
  border-color: #ffffff;
  width: 9px;
  height: 9px;
}

.tl-stop-node:hover .tl-stop-dot,
.tl-stop-node.is-holding .tl-stop-dot {
  transform: scale(1.3);
  border-color: var(--accent);
}

.tl-stop-media-badge {
  position: absolute;
  top: -1px;
  transform: translateY(-35%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.tl-stop-node.is-holding .tl-stop-media-badge {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.tl-leg-segment {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  margin: 0 1px;
  border-radius: 6px;
  background: var(--tl-seg-bg);
  border: 1px solid var(--line);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: visible;
  cursor: pointer;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease;
}

.leg-timeline-wrap.is-dragging .tl-leg-segment {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tl-leg-segment:hover {
  background: var(--tl-seg-hover);
}

.tl-leg-segment.is-playing {
  border-color: rgba(228, 87, 46, 0.55);
}

.tl-leg-segment.is-selected,
.tl-leg-segment.is-resizing {
  border-color: var(--accent);
  z-index: 3;
}

.tl-leg-body {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 10px 2px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.tl-leg-veh {
  width: 26px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tl-text-sub);
}

.tl-leg-veh-img {
  width: 26px;
  height: 20px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.tl-leg-label {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
}

.tl-leg-arrow {
  flex-shrink: 0;
  color: var(--tl-text-sub);
}

.tl-leg-dest {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-leg-dur {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--tl-text-sub);
  font-variant-numeric: tabular-nums;
}

.tl-leg-segment.is-selected .tl-leg-dur,
.tl-leg-segment.is-resizing .tl-leg-dur {
  color: var(--text);
}

.tl-leg-segment.is-compact .tl-leg-label {
  display: none;
}

.tl-leg-segment.is-compact .tl-leg-body {
  justify-content: center;
  gap: 6px;
}

.tl-leg-segment.is-compact .tl-leg-dur {
  margin-left: 0;
}

/* Two-line layout for wide legs: vehicle + destination on top, duration below (centered) */
.tl-leg-segment.is-roomy .tl-leg-body {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  grid-template-rows: auto auto;
  justify-content: center;
  align-content: center;
  align-items: center;
  column-gap: 6px;
  row-gap: 1px;
  padding: 0 14px 4px 10px;
}

.tl-leg-segment.is-roomy .tl-leg-veh,
.tl-leg-segment.is-roomy .tl-leg-veh-img {
  width: 30px;
  height: 22px;
}

.tl-leg-segment.is-roomy .tl-leg-label {
  font-size: 12px;
}

.tl-leg-segment.is-roomy .tl-leg-dur {
  grid-column: 1 / -1;
  justify-self: center;
  margin-left: 0;
  font-size: 13px;
  line-height: 1.1;
  color: var(--text);
}

.tl-leg-segment.is-tiny .tl-leg-label,
.tl-leg-segment.is-tiny .tl-leg-veh {
  display: none;
}

.tl-leg-segment.is-tiny .tl-leg-body {
  padding: 0 8px 2px 5px;
  justify-content: center;
}

.tl-leg-segment.is-tiny .tl-leg-dur {
  margin-left: 0;
  font-size: 10.5px;
}

.tl-leg-color-bar {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--leg-col, #ffd166);
  opacity: 0.9;
  pointer-events: none;
}

.tl-leg-color-bar.is-hr-ramp {
  background: linear-gradient(90deg, #fdba74 0%, #f97316 55%, #c2410c 100%);
}

/* Right-Edge Resize Grip Handle */
.tl-leg-handle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  right: -8px;
  width: 16px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  touch-action: none;
}

.tl-leg-handle::after {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--tl-text-sub);
  opacity: 0.55;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, background-color 0.12s ease, opacity 0.12s ease;
}

.tl-leg-segment:hover .tl-leg-handle::after,
.tl-leg-segment.is-selected .tl-leg-handle::after,
.tl-leg-handle:hover::after,
.tl-leg-segment.is-resizing .tl-leg-handle::after {
  opacity: 1;
  background: var(--accent);
  transform: scaleY(1.18);
}

/* Integrated Playhead Needle */
.tl-playhead {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 14px;
  margin-left: -7px;
  z-index: 8;
  cursor: ew-resize;
  touch-action: none;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-playhead-head {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.tl-playhead-line {
  width: 2px;
  flex: 1;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Live Ripple Drag Tooltip */
.tl-drag-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--text);
  color: var(--panel);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 20;
}

.dock-export-trigger {
  margin-left: auto;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

@media (pointer: coarse) {
  .tl-leg-handle {
    right: -12px;
    width: 24px;
  }
}

@media (max-width: 680px) {
  #dock {
    padding: 8px 12px 10px;
    gap: 8px;
  }

  .dock-reset-btn span {
    display: none;
  }

  .dock-reset-btn {
    padding: 5px 8px;
  }

  .leg-timeline-track {
    height: 50px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .tl-leg-handle::after {
    height: 18px;
  }

  .dock-export-trigger {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

#panel {
  order: 2;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  max-height: 46%;
  overflow: hidden
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 6px;
  gap: 6px;
  flex-shrink: 0
}

.tab {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  transition: all 0.15s ease
}

.tab:hover {
  color: var(--text)
}

.tab.active {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08)
}

.tpane {
  display: none;
  padding: 14px;
  overflow-y: auto;
  flex: 1
}

.tpane.active {
  display: block
}

#tList.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

#tList #msg {
  flex-shrink: 0;
  margin: 8px 14px 0;
}

#tList #listEmpty {
  flex: 1;
  overflow-y: auto;
}

.itinerary-add-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  z-index: 20;
}

.itinerary-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 16px;
  min-height: 0;
}

.inline-search-card.pinned-search-card {
  display: block;
  margin: 0;
  width: 100%;
}

.inline-search-card.pinned-search-card .inline-search-card-body {
  border: 1.5px solid var(--line);
  box-shadow: none;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.inline-search-card.pinned-search-card .inline-search-card-body:focus-within {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(228, 87, 46, 0.12);
}

.pinned-add-media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 7px 10px;
  margin: 0;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pinned-add-media-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--panel);
}

.sfield {
  margin-bottom: 12px
}

.sfield label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500
}

.sfield select,
.sfield input[type=number],
.sfield input[type=text] {
  min-width: 140px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 6px;
  box-sizing: border-box
}

.sfield input[type=color] {
  width: 56px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer
}

.switch-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  user-select: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.switch-control .sw-opt {
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.switch-control .sw-opt:hover {
  color: var(--text);
}

.switch-control .sw-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.switch-control.sw-3opt .sw-opt {
  padding: 4px 10px;
  font-size: 11px;
}

.switch-control .sw-opt.active,
.switch-control .sw-opt.active[data-val="1"],
.switch-control .sw-opt.active[data-val="always"],
.switch-control .sw-opt.active[data-val="arrival"],
.switch-control .sw-opt.active[data-val="upfront"],
.switch-control .sw-opt.active[data-val="trail"],
.switch-control .sw-opt.active[data-val="comet"],
.switch-control .sw-opt.active[data-val="custom"] {
  background: var(--accent, #e4572e);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(228, 87, 46, 0.4);
}

.switch-control .sw-opt.active[data-val="0"],
.switch-control .sw-opt.active[data-val="off"],
.switch-control .sw-opt.active[data-val="default"] {
  background: var(--panel, #202634);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Route Style & Color Swatches */
.route-color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.route-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.route-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.route-swatch:hover {
  transform: scale(1.15);
}

.route-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--accent, #e4572e);
  transform: scale(1.1);
}

.leg-route-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.leg-route-pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  vertical-align: middle;
}

.search-wrap {
  position: relative;
  margin-bottom: 8px;
  z-index: 30;
}

.search-row {
  display: flex;
  gap: 6px
}

/* Stage Spotlight PiP & Fullscreen Media Mode */
.stage-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
}

.stage-video-wrap.active {
  opacity: 1;
}

.stage-video-blur {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  pointer-events: none;
  filter: blur(28px) brightness(0.42) saturate(1.12);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.stage-video-wrap[data-fit="cover"] .stage-video-blur {
  opacity: 0;
}

.stage-spotlight-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-spotlight-img,
.stage-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  transform-origin: center center;
}

.stage-video-wrap[data-fit="cover"] .stage-spotlight-img,
.stage-video-wrap[data-fit="cover"] .stage-video-element {
  object-fit: cover;
}

.stage-video-wrap[data-fit="contain"] .stage-spotlight-img,
.stage-video-wrap[data-fit="contain"] .stage-video-element {
  max-width: 94%;
  max-height: 92%;
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(4, 9, 20, 0.58);
}

.stage-spotlight-img.kb-anim {
  animation: spotlightKenBurns var(--kb-dur, 3.2s) ease-out forwards;
}

@keyframes spotlightKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.065); }
}

.spotlight-tl-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  max-width: min(340px, 58%);
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(12, 18, 30, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(4, 9, 20, 0.42);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.spotlight-tl-badge[data-corner="bl"] {
  top: auto;
  bottom: var(--cap-bottom, 16px);
}

.spotlight-tl-badge:empty,
.spotlight-tl-badge.is-empty {
  display: none;
}

.spotlight-tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stage-video-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-tl-counter {
  font-size: 10.5px;
  font-weight: 600;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.stage-video-note {
  font-size: 11.5px;
  line-height: 1.3;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#placeQ {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 10px;
  font: 13px system-ui, sans-serif
}

#placeQ:focus {
  outline: none;
  border-color: var(--accent)
}

#addp {
  margin: 0;
  white-space: nowrap
}

#sugg {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  z-index: 15;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px
}

#sugg.open {
  display: block
}

.sitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px
}

.sitem:hover,
.sitem.active {
  background: var(--bg)
}

.sitem .sic {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0
}

.sitem .stxt {
  flex: 1;
  min-width: 0
}

.sitem .stxt b {
  display: block;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px
}

.sitem .stxt small {
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.sugg-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.sugg-status-empty {
  color: var(--text);
}

.sugg-status-error {
  color: #f59e0b;
}

.sugg-status-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.sugg-spinner,
.btn-spinner {
  display: inline-block;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: suggSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.sugg-spinner {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.btn-spinner {
  width: 13px;
  height: 13px;
  color: #fff;
  vertical-align: middle;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
}

@keyframes suggSpin {
  to {
    transform: rotate(360deg);
  }
}

.itinerary-header {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.itinerary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  font-size: 11px !important;
  padding: 5px 9px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.btn-subtle {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-subtle:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line);
}

.media-slot {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.media-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
  cursor: pointer;
}

.thumb-del-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: background 0.15s ease;
  z-index: 2;
}

.thumb-del-btn:hover {
  background: #e4572e;
}

.btn-stop-media {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px dashed var(--line);
  background: var(--bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-stop-media:hover {
  color: var(--text);
  border-color: var(--accent);
}

.video-trim-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px !important;
  margin-top: 3px !important;
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.video-trim-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.stop-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 2px;
}

.stop-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.stop-actions button {
  padding: 3px 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

details.batch {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--bg)
}

details.batch summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  user-select: none
}

details.batch[open] summary {
  margin-bottom: 8px;
  color: var(--text)
}

details.batch textarea {
  background: var(--panel)
}

#qstops {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: none
}

.qchips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 8px
}

.qchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  max-width: 100%
}

.qchip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.qchip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 0 0 3px;
  margin: 0;
  font-size: 12px;
  line-height: 1
}

.qchip button:hover {
  color: var(--text)
}

h1 {
  font-size: 17px;
  margin: 0 0 2px
}

h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 8px
}

p.s {
  margin: 0;
  color: var(--muted);
  font-size: 12px
}

textarea {
  width: 100%;
  box-sizing: border-box;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 8px;
  font: 13px ui-monospace, Menlo, monospace
}

button,
label.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 11px;
  font: inherit;
  cursor: pointer;
  margin: 4px 4px 0 0
}

button.p,
label.btn.p {
  background: var(--accent);
  color: var(--accent-t);
  border-color: var(--accent)
}

select {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 6px
}

input[type=range] {
  width: 100%;
  margin: 8px 0
}

ol {
  list-style: none;
  margin: 6px 0 0;
  padding: 0
}

li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line)
}

li img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 5px
}

li .n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

li small {
  color: var(--muted);
  display: block
}

li button {
  padding: 2px 7px;
  margin: 0
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0
}

.row label {
  font-size: 12px;
  color: var(--muted)
}

input[type=number] {
  width: 60px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit
}

li .n b {
  display: block
}

li input.t {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  padding: 3px 6px;
  font: 12px system-ui, sans-serif;
  margin-top: 3px
}

li select.leg {
  margin-top: 3px;
  font-size: 12px;
  max-width: 100%
}

#msg {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px
}

#cpos {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--card-w, min(296px, 60%));
  pointer-events: none;
  z-index: 9;
}

#cpos.is-video {
  width: var(--card-vid-w, min(380px, 68%));
}

#fcards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}

.fpos {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--fcard-w, min(210px, 44%));
  pointer-events: none;
}

.fpol {
  position: relative;
  background: #fff;
  padding: 6px 6px 0;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  opacity: 0;
  transform-origin: 50% 100%;
  transform: translateY(40px) scale(.15) rotate(-10deg);
  transition: opacity .3s, transform .55s cubic-bezier(.34, 1.56, .64, 1);
  color: #222;
}

.fpol.show {
  opacity: 1;
  transform: translateY(-10px) scale(var(--fsc, 1)) rotate(var(--frot, -3deg));
}

.fpol .ph {
  aspect-ratio: var(--card-ar, 1);
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}

.fpol img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.15) saturate(.2) blur(6px);
  transition: filter 1.4s ease .25s;
}

.fpol.show img {
  filter: none;
}

.fpol .cap {
  min-height: 38px;
  padding: 2px 0 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font: 600 17px/1.05 Caveat, "Bradley Hand", "Segoe Script", cursive;
  text-align: center;
}

.fpol .ccap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fpol .cnote {
  font: 600 13px/1.05 Caveat, "Bradley Hand", cursive;
  color: #555;
  white-space: normal;
  max-height: 26px;
  overflow: hidden;
}

.fpol .cnum {
  font: 10px system-ui, sans-serif;
  color: #71717a;
  font-variant-numeric: tabular-nums;
}

#card {
  position: relative;
  background: #fff;
  padding: 8px 8px 0;
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(4, 9, 20, .38);
  opacity: 0;
  transform-origin: 50% 100%;
  transform: translateY(46px) scale(.15) rotate(-12deg);
  transition: opacity .3s, transform .55s cubic-bezier(.34, 1.56, .64, 1);
  color: #222;
}

#card.show {
  opacity: 1;
  transform: translateY(-16px) scale(1) rotate(var(--card-rot, -3deg));
}

#card .ph {
  aspect-ratio: var(--card-ar, 1);
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}

#card img,
#card .card-video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#card .card-video-el {
  display: none;
}

#card[data-style="polaroid"] img {
  filter: brightness(.15) saturate(.2) blur(8px);
  transition: filter 1.8s ease .3s;
}

#card[data-style="polaroid"].show img {
  filter: none;
}

#cph {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  background: linear-gradient(135deg, #3a7bd5, #00d2ff);
}

/* Optional card ornaments hidden by default */
#card .card-tape,
#card .card-rebate,
#card .card-keyline,
#card .card-ed-num,
#card .card-quartz,
#card .card-postmark,
#card .cap-meta-row,
#card .card-ticket-hdr,
#card .card-ticket-perf,
#card .card-ticket-barcode,
#card .card-stamp-denom,
#card .card-cancel-waves,
#card .card-visa-stamp,
#card .card-story-bars,
#card .card-social-heart,
#card .cap-passport-badge,
.fpol .card-tape,
.fpol .card-rebate,
.fpol .card-keyline,
.fpol .card-ed-num,
.fpol .card-quartz,
.fpol .card-postmark,
.fpol .cap-meta-row,
.fpol .card-ticket-hdr,
.fpol .card-ticket-perf,
.fpol .card-ticket-barcode,
.fpol .card-stamp-denom,
.fpol .card-cancel-waves,
.fpol .card-visa-stamp,
.fpol .card-story-bars,
.fpol .card-social-heart,
.fpol .cap-passport-badge {
  display: none;
}

#card .cap {
  min-height: 46px;
  padding: 2px 0 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font: 600 20px/1.05 Caveat, "Bradley Hand", "Segoe Script", cursive;
  text-align: center;
}

#ccap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cnote {
  font: 600 15px/1.05 Caveat, "Bradley Hand", cursive;
  color: #52525b;
  white-space: normal;
  max-height: 32px;
  overflow: hidden;
}

#cnum {
  font: 11px system-ui, sans-serif;
  color: #71717a;
  font-variant-numeric: tabular-nums;
}

/* --- Theme 2: Minimal Glass (glass) --- */
#card[data-style="glass"],
.fpol[data-style="glass"] {
  --card-rot: 0deg;
  background: #0f172a;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 16px 38px rgba(4, 9, 20, 0.52);
  overflow: hidden;
  color: #f8fafc;
}

.fpol[data-style="glass"] {
  border-radius: 11px;
}

#card[data-style="glass"] .ph,
.fpol[data-style="glass"] .ph {
  border-radius: inherit;
}

#card[data-style="glass"] img,
.fpol[data-style="glass"] img {
  filter: none;
}

#card[data-style="glass"] .cap,
.fpol[data-style="glass"] .cap {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  min-height: 0;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(12, 18, 30, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 600 12.5px/1.25 system-ui, -apple-system, sans-serif;
  text-align: left;
  color: #f8fafc;
  gap: 2px;
}

.fpol[data-style="glass"] .cap {
  left: 5px;
  right: 5px;
  bottom: 5px;
  padding: 5px 7px;
  font-size: 10.5px;
}

#card[data-style="glass"] #cnote,
.fpol[data-style="glass"] .cnote {
  font: 500 10.5px/1.25 system-ui, -apple-system, sans-serif;
  color: #cbd5e1;
  max-height: 26px;
}

#card[data-style="glass"] #cnum,
.fpol[data-style="glass"] .cnum {
  position: absolute;
  top: 7px;
  right: 9px;
  font: 600 9.5px/1 system-ui, sans-serif;
  color: #cbd5e1;
}

/* --- Theme 3: Vintage Postcard (postcard) --- */
#card[data-style="postcard"],
.fpol[data-style="postcard"] {
  --card-rot: -2deg;
  background:
    repeating-linear-gradient(-45deg, #c83e37 0 6px, #fbf6ec 6px 11px, #264b77 11px 17px, #fbf6ec 17px 22px) top / 100% 4px no-repeat,
    repeating-linear-gradient(-45deg, #c83e37 0 6px, #fbf6ec 6px 11px, #264b77 11px 17px, #fbf6ec 17px 22px) bottom / 100% 4px no-repeat,
    #fbf6ec;
  padding: 10px 8px 6px;
  border-radius: 3px;
  border: 1px solid #dfd3bd;
  box-shadow: 0 12px 30px rgba(28, 20, 14, 0.42);
  color: #2c221e;
}

#card[data-style="postcard"] .ph,
.fpol[data-style="postcard"] .ph {
  border: 1px solid #d5c5a8;
}

#card[data-style="postcard"] img,
.fpol[data-style="postcard"] img {
  filter: sepia(0.12) contrast(1.03);
}

#card[data-style="postcard"] .card-postmark,
.fpol[data-style="postcard"] .card-postmark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px dashed rgba(176, 54, 45, 0.72);
  background: rgba(251, 246, 236, 0.78);
  color: #9f2f27;
  transform: rotate(-14deg);
  pointer-events: none;
}

.fpol[data-style="postcard"] .card-postmark {
  width: 30px;
  height: 30px;
}

#card[data-style="postcard"] .postmark-lbl,
.fpol[data-style="postcard"] .postmark-lbl {
  font: 700 7.5px/1.05 "Courier New", Courier, monospace;
  letter-spacing: 0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#card[data-style="postcard"] .cap,
.fpol[data-style="postcard"] .cap {
  min-height: 42px;
  padding: 6px 2px 3px;
  font: 700 13px/1.2 Georgia, "Times New Roman", serif;
  text-align: left;
  color: #2c221e;
  gap: 2px;
}

.fpol[data-style="postcard"] .cap {
  min-height: 32px;
  font-size: 11px;
}

#card[data-style="postcard"] #cnote,
.fpol[data-style="postcard"] .cnote {
  font: 500 10.5px/1.25 "Courier New", Courier, monospace;
  color: #6b584e;
  max-height: 26px;
}

#card[data-style="postcard"] #cnum,
.fpol[data-style="postcard"] .cnum {
  font: 700 9.5px/1 "Courier New", Courier, monospace;
  color: #8c7365;
  margin-top: 1px;
}

/* --- Theme 4: 35mm Analog Film (film35) --- */
#card[data-style="film35"],
.fpol[data-style="film35"] {
  --card-rot: 1.5deg;
  background: #141416;
  padding: 4px 8px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.56);
  color: #f4f4f5;
}

#card[data-style="film35"] img,
.fpol[data-style="film35"] img {
  filter: contrast(1.05) saturate(1.08);
}

#card[data-style="film35"] .card-rebate,
.fpol[data-style="film35"] .card-rebate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 15px;
  padding: 0 2px;
  font: 700 8.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #f59e0b;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.82) 1.8px, transparent 2px);
  background-size: 14px 100%;
  background-position: center;
}

#card[data-style="film35"] .rebate-brand,
#card[data-style="film35"] .rebate-frame,
.fpol[data-style="film35"] .rebate-brand,
.fpol[data-style="film35"] .rebate-frame {
  background: #141416;
  padding: 0 3px;
}

#card[data-style="film35"] .card-rebate-bot,
.fpol[data-style="film35"] .card-rebate-bot {
  height: 11px;
  margin-top: 2px;
}

#card[data-style="film35"] .card-quartz,
.fpol[data-style="film35"] .card-quartz {
  display: block;
  position: absolute;
  right: 7px;
  bottom: 5px;
  font: 700 9.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fb923c;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

#card[data-style="film35"] .cap,
.fpol[data-style="film35"] .cap {
  min-height: 36px;
  padding: 4px 2px 2px;
  font: 600 12.5px/1.25 system-ui, -apple-system, sans-serif;
  text-align: left;
  color: #f4f4f5;
  gap: 2px;
}

.fpol[data-style="film35"] .cap {
  min-height: 28px;
  font-size: 10.5px;
}

#card[data-style="film35"] #cnote,
.fpol[data-style="film35"] .cnote {
  font: 400 10.5px/1.25 system-ui, sans-serif;
  color: #a1a1aa;
  max-height: 24px;
}

#card[data-style="film35"] #cnum,
.fpol[data-style="film35"] .cnum {
  display: none;
}

/* --- Theme 5: Field Notes / Washi Tape (fieldnotes) --- */
#card[data-style="fieldnotes"],
.fpol[data-style="fieldnotes"] {
  --card-rot: -2.2deg;
  background: #f6f1e7;
  padding: 8px 8px 6px;
  border-radius: 3px;
  border: 1px solid #ded5c3;
  box-shadow: 0 12px 28px rgba(28, 22, 16, 0.38);
  color: #292524;
}

#card[data-style="fieldnotes"] img,
.fpol[data-style="fieldnotes"] img {
  filter: none;
}

#card[data-style="fieldnotes"] .card-tape,
.fpol[data-style="fieldnotes"] .card-tape {
  display: block;
  position: absolute;
  top: -6px;
  width: 44px;
  height: 14px;
  z-index: 4;
  background: repeating-linear-gradient(45deg, rgba(217, 119, 6, 0.62) 0 4px, rgba(245, 158, 11, 0.46) 4px 8px);
  border: 1px solid rgba(180, 83, 9, 0.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

.fpol[data-style="fieldnotes"] .card-tape {
  width: 32px;
  height: 10px;
  top: -4px;
}

#card[data-style="fieldnotes"] .card-tape-tl,
.fpol[data-style="fieldnotes"] .card-tape-tl {
  left: -8px;
  transform: rotate(-28deg);
}

#card[data-style="fieldnotes"] .card-tape-tr,
.fpol[data-style="fieldnotes"] .card-tape-tr {
  right: -8px;
  transform: rotate(26deg);
  background: repeating-linear-gradient(-45deg, rgba(22, 101, 52, 0.52) 0 4px, rgba(34, 197, 94, 0.34) 4px 8px);
  border-color: rgba(22, 101, 52, 0.22);
}

#card[data-style="fieldnotes"] .cap-meta-row,
.fpol[data-style="fieldnotes"] .cap-meta-row {
  display: flex;
  margin-bottom: 3px;
}

#card[data-style="fieldnotes"] .cap-stamp-badge,
.fpol[data-style="fieldnotes"] .cap-stamp-badge {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid rgba(140, 59, 43, 0.55);
  border-radius: 2px;
  font: 700 8.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  color: #8c3b2b;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

#card[data-style="fieldnotes"] .cap,
.fpol[data-style="fieldnotes"] .cap {
  min-height: 44px;
  padding: 6px 2px 2px;
  font: 600 13px/1.25 Georgia, serif;
  text-align: left;
  color: #292524;
  background-image: repeating-linear-gradient(to bottom, transparent 0 17px, rgba(168, 155, 134, 0.24) 17px 18px);
}

.fpol[data-style="fieldnotes"] .cap {
  min-height: 32px;
  font-size: 11px;
}

#card[data-style="fieldnotes"] #cnote,
.fpol[data-style="fieldnotes"] .cnote {
  font: 400 11px/1.25 system-ui, sans-serif;
  color: #57534e;
  max-height: 26px;
}

#card[data-style="fieldnotes"] #cnum,
.fpol[data-style="fieldnotes"] .cnum {
  display: none;
}

/* --- Theme 6: Trail / Telemetry Card (telemetry) --- */
#card[data-style="telemetry"],
.fpol[data-style="telemetry"] {
  --card-rot: 0deg;
  background: #0f172a;
  padding: 6px 6px 7px;
  border-radius: 9px;
  border: 1px solid rgba(16, 185, 129, 0.38);
  box-shadow: 0 14px 36px rgba(4, 9, 20, 0.56);
  overflow: hidden;
  color: #f8fafc;
}

#card[data-style="telemetry"] .ph,
.fpol[data-style="telemetry"] .ph {
  border-radius: 5px;
}

#card[data-style="telemetry"] img,
.fpol[data-style="telemetry"] img {
  filter: none;
}

#card[data-style="telemetry"] .cap-meta-row,
.fpol[data-style="telemetry"] .cap-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

#card[data-style="telemetry"] .cap-telem-badge,
.fpol[data-style="telemetry"] .cap-telem-badge {
  display: inline-block;
  font: 700 9.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #10b981;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

#card[data-style="telemetry"] .cap,
.fpol[data-style="telemetry"] .cap {
  min-height: 40px;
  padding: 6px 3px 1px;
  font: 700 12.5px/1.2 system-ui, -apple-system, sans-serif;
  text-align: left;
  color: #f8fafc;
  gap: 1px;
}

.fpol[data-style="telemetry"] .cap {
  min-height: 30px;
  font-size: 10.5px;
}

#card[data-style="telemetry"] #cnote,
.fpol[data-style="telemetry"] .cnote {
  font: 500 10.5px/1.25 system-ui, sans-serif;
  color: #94a3b8;
  max-height: 24px;
}

#card[data-style="telemetry"] #cnum,
.fpol[data-style="telemetry"] .cnum {
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #64748b;
  margin-top: 2px;
}

/* --- Theme 7: Editorial Magazine (editorial) --- */
#card[data-style="editorial"],
.fpol[data-style="editorial"] {
  --card-rot: 0deg;
  background: #111318;
  padding: 0;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(4, 9, 20, 0.54);
  overflow: hidden;
  color: #ffffff;
}

#card[data-style="editorial"] img,
.fpol[data-style="editorial"] img {
  filter: contrast(1.04);
}

#card[data-style="editorial"] .card-keyline,
.fpol[data-style="editorial"] .card-keyline {
  display: block;
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  pointer-events: none;
  z-index: 3;
}

.fpol[data-style="editorial"] .card-keyline {
  inset: 5px;
}

#card[data-style="editorial"] .card-ed-num,
.fpol[data-style="editorial"] .card-ed-num {
  display: block;
  position: absolute;
  top: 12px;
  right: 13px;
  z-index: 4;
  font: 700 9px/1 system-ui, sans-serif;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  font-variant-numeric: tabular-nums;
}

#card[data-style="editorial"] .cap,
.fpol[data-style="editorial"] .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  min-height: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(8, 10, 15, 0.9) 0%, rgba(8, 10, 15, 0.42) 58%, transparent 100%);
  font: 700 13px/1.18 system-ui, -apple-system, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  color: #ffffff;
  gap: 3px;
}

.fpol[data-style="editorial"] .cap {
  padding: 18px 10px 9px;
  font-size: 10.5px;
}

#card[data-style="editorial"] #cnote,
.fpol[data-style="editorial"] .cnote {
  font: italic 400 11px/1.25 Georgia, "Times New Roman", serif;
  text-transform: none;
  letter-spacing: 0;
  color: #e2e8f0;
  max-height: 26px;
}

#card[data-style="editorial"] #cnum,
.fpol[data-style="editorial"] .cnum {
  display: none;
}

/* --- Theme 8: Pin Callout / Speech Bubble (speech) --- */
#card[data-style="speech"],
.fpol[data-style="speech"] {
  --card-rot: 0deg;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 12px 26px rgba(4, 9, 20, 0.42));
  overflow: visible;
}

#card[data-style="speech"].show {
  transform: translateY(-4px) scale(1) rotate(0deg);
}

.fpol[data-style="speech"].show {
  transform: translateY(-2px) scale(var(--fsc, 1)) rotate(0deg);
}

#card[data-style="speech"]::before,
.fpol[data-style="speech"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  clip-path: var(--speech-outer-clip, polygon(0% 0%, 100% 0%, 100% 88%, 68% 88%, 60% 100%, 48% 88%, 0% 88%));
  z-index: 1;
}

#card[data-style="speech"] .ph,
.fpol[data-style="speech"] .ph {
  aspect-ratio: auto;
  width: 100%;
  height: calc((var(--card-w, 240px) / var(--card-ar, 1.333)) + var(--speech-tail-h, 24px));
  background: #ffffff;
  clip-path: var(--speech-inner-clip, polygon(3% 3.5%, 97% 3.5%, 97% 84.5%, 66% 84.5%, 59.5% 95%, 50% 84.5%, 3% 84.5%));
  z-index: 2;
}

.fpol[data-style="speech"] .ph {
  height: calc((var(--fcard-w, 178px) / var(--card-ar, 1.333)) + var(--speech-tail-h, 18px));
}

#card[data-style="speech"] img,
.fpol[data-style="speech"] img {
  filter: none;
}

#card[data-style="speech"] .cap,
.fpol[data-style="speech"] .cap {
  display: none !important;
}

/* --- Theme 9: Postage Stamp (stamp) --- */
#card[data-style="stamp"],
.fpol[data-style="stamp"] {
  --card-rot: -1.5deg;
  background:
    radial-gradient(circle at 6px 0, transparent 3.4px, #faf6ee 3.8px) top left / 12px 10px repeat-x,
    radial-gradient(circle at 6px 100%, transparent 3.4px, #faf6ee 3.8px) bottom left / 12px 10px repeat-x,
    radial-gradient(circle at 0 6px, transparent 3.4px, #faf6ee 3.8px) top left / 10px 12px repeat-y,
    radial-gradient(circle at 100% 6px, transparent 3.4px, #faf6ee 3.8px) top right / 10px 12px repeat-y,
    linear-gradient(#faf6ee, #faf6ee) center / calc(100% - 16px) calc(100% - 16px) no-repeat;
  padding: 11px 11px 7px;
  border-radius: 2px;
  box-shadow: none;
  filter: drop-shadow(0 12px 24px rgba(28, 20, 14, 0.42));
  color: #2c1d14;
}

.fpol[data-style="stamp"] {
  padding: 9px 9px 5px;
}

#card[data-style="stamp"] .ph,
.fpol[data-style="stamp"] .ph {
  border: 1.5px solid #9a3412;
  outline: 1px solid rgba(154, 52, 18, 0.35);
  outline-offset: 2px;
}

#card[data-style="stamp"] img,
.fpol[data-style="stamp"] img {
  filter: sepia(0.14) contrast(1.04);
}

#card[data-style="stamp"] .card-stamp-denom,
.fpol[data-style="stamp"] .card-stamp-denom {
  display: inline-block;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  padding: 2px 6px;
  background: rgba(250, 246, 238, 0.9);
  border: 1px solid #9a3412;
  font: 800 10px/1.1 Georgia, "Times New Roman", serif;
  color: #9a3412;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.fpol[data-style="stamp"] .card-stamp-denom {
  font-size: 8.5px;
  padding: 1.5px 4px;
}

#card[data-style="stamp"] .card-cancel-waves,
.fpol[data-style="stamp"] .card-cancel-waves {
  display: block;
  position: absolute;
  left: -4px;
  bottom: 5px;
  width: 68px;
  height: 24px;
  z-index: 4;
  color: rgba(127, 29, 29, 0.82);
  transform: rotate(-8deg);
  pointer-events: none;
}

.fpol[data-style="stamp"] .card-cancel-waves {
  width: 50px;
  height: 18px;
}

#card[data-style="stamp"] .cap,
.fpol[data-style="stamp"] .cap {
  min-height: 38px;
  padding: 6px 2px 2px;
  font: 700 12.5px/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: #7c2d12;
  gap: 2px;
}

.fpol[data-style="stamp"] .cap {
  min-height: 28px;
  font-size: 10.5px;
}

#card[data-style="stamp"] #cnote,
.fpol[data-style="stamp"] .cnote {
  font: italic 500 10.5px/1.25 Georgia, serif;
  text-transform: none;
  letter-spacing: 0;
  color: #57534e;
  max-height: 24px;
}

#card[data-style="stamp"] #cnum,
.fpol[data-style="stamp"] .cnum {
  display: none;
}

/* --- Theme 10: Boarding Pass / Transit Ticket (ticket) --- */
#card[data-style="ticket"],
.fpol[data-style="ticket"] {
  --card-rot: 0deg;
  background: #ffffff;
  padding: 0;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 14px 34px rgba(4, 9, 20, 0.45);
  overflow: hidden;
  color: #0f172a;
}

#card[data-style="ticket"] .card-ticket-hdr,
.fpol[data-style="ticket"] .card-ticket-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: linear-gradient(90deg, #0284c7, #0369a1);
  color: #ffffff;
  font: 800 9px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.fpol[data-style="ticket"] .card-ticket-hdr {
  padding: 4px 7px;
  font-size: 7.5px;
}

#card[data-style="ticket"] .ticket-hdr-gate,
.fpol[data-style="ticket"] .ticket-hdr-gate {
  background: rgba(255, 255, 255, 0.2);
  padding: 1.5px 5px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

#card[data-style="ticket"] .ph,
.fpol[data-style="ticket"] .ph {
  margin: 6px 8px 4px;
  border-radius: 4px;
}

.fpol[data-style="ticket"] .ph {
  margin: 5px 6px 3px;
}

#card[data-style="ticket"] img,
.fpol[data-style="ticket"] img {
  filter: none;
}

#card[data-style="ticket"] .card-ticket-perf,
.fpol[data-style="ticket"] .card-ticket-perf {
  display: block;
  position: relative;
  height: 10px;
  margin: 0;
}

#card[data-style="ticket"] .card-ticket-perf::before,
.fpol[data-style="ticket"] .card-ticket-perf::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 4px;
  border-top: 1.5px dashed #cbd5e1;
}

#card[data-style="ticket"] .card-ticket-perf::after,
.fpol[data-style="ticket"] .card-ticket-perf::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: calc(var(--card-w, 250px) - 1px) 0 0 #0f172a;
}

.fpol[data-style="ticket"] .card-ticket-perf::after {
  box-shadow: calc(var(--fcard-w, 178px) - 1px) 0 0 #0f172a;
}

#card[data-style="ticket"] .cap,
.fpol[data-style="ticket"] .cap {
  position: relative;
  min-height: 40px;
  padding: 3px 44px 7px 10px;
  font: 700 12.5px/1.2 system-ui, -apple-system, sans-serif;
  text-align: left;
  color: #0f172a;
  gap: 1px;
}

.fpol[data-style="ticket"] .cap {
  min-height: 30px;
  padding: 2px 34px 5px 7px;
  font-size: 10.5px;
}

#card[data-style="ticket"] #cnote,
.fpol[data-style="ticket"] .cnote {
  font: 500 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #64748b;
  max-height: 22px;
}

#card[data-style="ticket"] #cnum,
.fpol[data-style="ticket"] .cnum {
  font: 700 8.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #0284c7;
  letter-spacing: 0.05em;
}

#card[data-style="ticket"] .card-ticket-barcode,
.fpol[data-style="ticket"] .card-ticket-barcode {
  display: block;
  position: absolute;
  right: 9px;
  top: 4px;
  bottom: 7px;
  width: 26px;
  background: repeating-linear-gradient(
    90deg,
    #0f172a 0 2px,
    transparent 2px 3.5px,
    #0f172a 3.5px 4.5px,
    transparent 4.5px 6.5px,
    #0f172a 6.5px 9px,
    transparent 9px 10.5px
  );
  opacity: 0.82;
}

.fpol[data-style="ticket"] .card-ticket-barcode {
  width: 20px;
  right: 6px;
}

/* --- Theme 11: Social Story / Creator Reel (social) --- */
#card[data-style="social"],
.fpol[data-style="social"] {
  --card-rot: 0deg;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 35%, #ec4899 70%, #8b5cf6 100%);
  padding: 3.5px;
  border-radius: 15px;
  box-shadow: 0 16px 38px rgba(4, 9, 20, 0.54);
  overflow: hidden;
  color: #ffffff;
}

.fpol[data-style="social"] {
  padding: 2.5px;
  border-radius: 12px;
}

#card[data-style="social"] .ph,
.fpol[data-style="social"] .ph {
  border-radius: 12px;
}

.fpol[data-style="social"] .ph {
  border-radius: 9.5px;
}

#card[data-style="social"] img,
.fpol[data-style="social"] img {
  filter: none;
}

#card[data-style="social"] .card-story-bars,
.fpol[data-style="social"] .card-story-bars {
  display: flex;
  gap: 3px;
  position: absolute;
  top: 7px;
  left: 8px;
  right: 8px;
  z-index: 4;
}

#card[data-style="social"] .story-bar-seg,
.fpol[data-style="social"] .story-bar-seg {
  flex: 1;
  height: 2.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#card[data-style="social"] .story-bar-seg.is-filled,
.fpol[data-style="social"] .story-bar-seg.is-filled {
  background: #ffffff;
}

#card[data-style="social"] .card-social-heart,
.fpol[data-style="social"] .card-social-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 15px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  z-index: 4;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.55);
}

.fpol[data-style="social"] .card-social-heart {
  width: 17px;
  height: 17px;
  font-size: 9px;
  top: 12px;
  right: 6px;
}

#card[data-style="social"] .cap,
.fpol[data-style="social"] .cap {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  font: 700 11.5px/1.2 system-ui, -apple-system, sans-serif;
  text-align: left;
  color: #0f172a;
}

.fpol[data-style="social"] .cap {
  left: 7px;
  right: 7px;
  bottom: 7px;
  padding: 4px 8px;
  font-size: 9.5px;
}

#card[data-style="social"] #cnote,
.fpol[data-style="social"] .cnote {
  font: 500 9.5px/1.15 system-ui, sans-serif;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#card[data-style="social"] #cnum,
.fpol[data-style="social"] .cnum {
  display: none;
}

/* --- Theme 12: Passport Visa Stamp (passport) --- */
#card[data-style="passport"],
.fpol[data-style="passport"] {
  --card-rot: 1.2deg;
  background:
    repeating-linear-gradient(45deg, rgba(30, 58, 138, 0.035) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(185, 28, 28, 0.03) 0 2px, transparent 2px 7px),
    #f5efe2;
  padding: 9px 9px 7px;
  border-radius: 4px;
  border: 1.5px solid #1e3a8a;
  box-shadow: inset 0 0 0 2px #f5efe2, inset 0 0 0 3px rgba(30, 58, 138, 0.45), 0 13px 32px rgba(20, 18, 14, 0.44);
  color: #1e293b;
}

.fpol[data-style="passport"] {
  padding: 7px 7px 5px;
}

#card[data-style="passport"] .ph,
.fpol[data-style="passport"] .ph {
  border: 1px solid rgba(30, 58, 138, 0.55);
}

#card[data-style="passport"] img,
.fpol[data-style="passport"] img {
  filter: contrast(1.03) sepia(0.08);
}

#card[data-style="passport"] .card-visa-stamp,
.fpol[data-style="passport"] .card-visa-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 4;
  padding: 3px 7px;
  border: 1.8px solid rgba(185, 28, 28, 0.85);
  outline: 1px dashed rgba(185, 28, 28, 0.55);
  outline-offset: -3.5px;
  border-radius: 4px;
  background: rgba(245, 239, 226, 0.86);
  color: #b91c1c;
  transform: rotate(-11deg);
  pointer-events: none;
}

.fpol[data-style="passport"] .card-visa-stamp {
  padding: 2px 5px;
  right: 4px;
  bottom: 4px;
}

#card[data-style="passport"] .visa-stamp-top,
.fpol[data-style="passport"] .visa-stamp-top {
  font: 700 6.5px/1.1 "Courier New", Courier, monospace;
  letter-spacing: 0.08em;
}

#card[data-style="passport"] .visa-stamp-mid,
.fpol[data-style="passport"] .visa-stamp-mid {
  font: 800 8.5px/1.15 "Courier New", Courier, monospace;
  letter-spacing: 0.06em;
}

.fpol[data-style="passport"] .visa-stamp-top {
  font-size: 5.5px;
}

.fpol[data-style="passport"] .visa-stamp-mid {
  font-size: 7px;
}

#card[data-style="passport"] .cap-meta-row,
.fpol[data-style="passport"] .cap-meta-row {
  display: flex;
  margin-bottom: 2px;
}

#card[data-style="passport"] .cap-passport-badge,
.fpol[data-style="passport"] .cap-passport-badge {
  display: inline-block;
  font: 700 8.5px/1.2 "Courier New", Courier, monospace;
  letter-spacing: 0.07em;
  color: #1e3a8a;
}

#card[data-style="passport"] .cap,
.fpol[data-style="passport"] .cap {
  min-height: 40px;
  padding: 5px 2px 2px;
  font: 700 12.5px/1.2 Georgia, "Times New Roman", serif;
  text-align: left;
  color: #0f172a;
  gap: 1px;
}

.fpol[data-style="passport"] .cap {
  min-height: 30px;
  font-size: 10.5px;
}

#card[data-style="passport"] #cnote,
.fpol[data-style="passport"] .cnote {
  font: 600 10px/1.2 "Courier New", Courier, monospace;
  color: #475569;
  max-height: 24px;
}

#card[data-style="passport"] #cnum,
.fpol[data-style="passport"] .cnum {
  display: none;
}

@media (min-width:820px) {
  #app {
    flex-direction: row
  }

  #panel {
    order: 0;
    width: clamp(380px, 26vw, 420px);
    max-height: none;
    border-top: 0;
    border-right: 1px solid var(--line);
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #panel.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    border-right: none !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* Mappi-style Redesigned Studio Ergonomics */
.panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  gap: 8px;
  flex-shrink: 0;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  user-select: none;
}

.panel-title-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-title-input {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 6px;
  margin: 0;
  max-width: 175px;
  min-width: 80px;
  text-overflow: ellipsis;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.project-title-input:hover {
  background: var(--bg);
  border-color: var(--line);
}

.project-title-input:focus {
  background: var(--panel);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}

.panel-title-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--line2);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-header-bar .tabs {
  display: flex;
  padding: 0;
  border-bottom: none;
  background: transparent;
  flex: 1;
  gap: 4px;
}

.panel-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0 !important;
  margin: 0 !important;
}

.panel-collapse-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--bg);
}


.panel-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  height: 34px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.panel-expand-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--text);
}

.panel-expand-btn svg,
.panel-collapse-btn svg {
  color: var(--muted);
  transition: color 0.15s ease;
}

.panel-expand-btn:hover svg,
.panel-collapse-btn:hover svg {
  color: var(--accent);
}

/* Stage Bar Camera Button (matches .ar-group and .ar-btn) */
.cam-group-wrap {
  position: relative;
  display: inline-flex;
}

.music-group-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cam-group {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
}

.stage-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.stage-icon-btn:hover {
  color: var(--text);
  background: var(--bg);
}

.stage-icon-btn.active {
  color: var(--accent);
  background: var(--bg);
}

.stage-icon-btn svg {
  width: 17px;
  height: 17px;
}

.canvas-cam-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 350px;
  max-width: 94vw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 12px;
  z-index: 50;
  animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cam-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.cam-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cam-mode-grid,
.cam-mode-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.cam-mode-chip,
.cam-mode-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  padding: 8px 10px;
  min-height: 58px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 !important;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
}

.cam-mode-chip:last-child:nth-child(odd),
.cam-mode-item:last-child:nth-child(odd) {
  grid-column: span 2;
}

.cam-mode-chip:hover,
.cam-mode-item:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.06);
}

.cam-mode-chip.active,
.cam-mode-item.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent);
}

.cam-mode-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.cam-mode-chip .cam-mode-icon,
.cam-mode-item .cam-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.cam-mode-chip:hover .cam-mode-icon,
.cam-mode-item:hover .cam-mode-icon {
  color: var(--text);
}

.cam-mode-chip.active .cam-mode-icon,
.cam-mode-item.active .cam-mode-icon {
  color: var(--accent);
}

.cam-mode-chip .cam-mode-name,
.cam-mode-item .cam-mode-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-mode-chip.active .cam-mode-name,
.cam-mode-item.active .cam-mode-name {
  color: var(--accent);
}

.cam-mode-chip .cam-mode-desc,
.cam-mode-item .cam-mode-desc {
  font-size: 9.5px;
  line-height: 1.25;
  color: var(--muted);
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-mode-chip.active .cam-mode-desc,
.cam-mode-item.active .cam-mode-desc {
  color: rgba(255, 255, 255, 0.8);
}
}

.cam-zoom-section {
  padding: 10px 4px 4px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.cam-zoom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cam-zoom-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.cam-zoom-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.cam-zoom-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
}

.cam-zoom-presets {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
}

.cam-zoom-chip {
  flex: 1;
  padding: 3px 0;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cam-zoom-chip:hover {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line2);
}

.cam-zoom-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Stage Map & 3D Terrain Popover */
.stage-map-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 330px;
  max-width: 92vw;
  max-height: 82vh;
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 12px;
  z-index: 50;
  animation: popoverFadeIn 0.15s ease-out;
}

.map-style-tabs {
  display: flex;
  gap: 4px;
  margin: 6px 0 10px 0;
  background: var(--bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.map-tab-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.map-tab-btn:hover {
  color: var(--text);
}

.map-tab-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.map-tab-btn .tab-badge {
  display: inline-block;
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
  margin-left: 4px;
  vertical-align: middle;
}

.map-tab-btn.active .tab-badge {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
}

.map-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.map-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.map-popover-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.anim-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.anim-section-label.anim-section-first {
  margin-top: 2px;
  padding-top: 0;
  border-top: none;
}

.map-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.map-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.map-style-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  margin: 0 !important;
}

.map-style-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.06);
}

.map-style-chip.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent);
}

.map-style-icon {
  font-size: 18px;
  line-height: 1;
}

.map-style-name {
  font-size: 11px;
  line-height: 1.2;
}

.chip-pro-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.chip-pro-badge svg {
  width: 8px;
  height: 8px;
}

.terrain-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.terrain-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 6px;
  min-height: 42px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 !important;
  box-sizing: border-box;
}

.terrain-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.06);
}

.terrain-chip.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent);
}

.terrain-chip .chip-pro-badge {
  top: -4px;
  right: -2px;
  font-size: 7.5px;
  padding: 1px 4px;
  border-radius: 3px;
}

.map-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-gridcol-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}

.map-color-input {
  width: 32px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

/* Stage Animation & Route Popover */
.stage-anim-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  max-width: 92vw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 12px;
  z-index: 50;
  animation: popoverFadeIn 0.15s ease-out;
  box-sizing: border-box;
}

.anim-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.anim-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stage-popover-close,
.anim-popover-close {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.stage-popover-close:hover,
.anim-popover-close:hover {
  background: var(--line2);
  color: var(--text);
}

.anim-popover-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.anim-popover-tab {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.anim-popover-tab:hover {
  color: var(--text);
}

.anim-popover-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.anim-subpane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anim-subpane .sfield {
  margin: 0;
}

.anim-tinfo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
}

/* Media Style Preset Grid inside Animation Popover */
.media-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}

.media-style-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  margin: 0 !important;
  box-sizing: border-box;
}

.media-style-chip:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.media-style-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.media-style-chip.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
}

.ms-thumb {
  width: 34px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ms-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ms-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ms-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-style-chip.active .ms-name {
  color: var(--accent);
}

.ms-tag {
  font-size: 9.5px;
  line-height: 1.15;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-timing-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.pip-corner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pip-corner-switch .sw-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  min-width: 26px;
}

.anim-tinfo-icon {
  font-size: 14px;
  line-height: 1.2;
}

.anim-tinfo-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}


/* Clean Empty State Hero */
.empty-state-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 18px 24px;
  user-select: none;
}

.empty-hero-graphic {
  margin-bottom: 12px;
}

.empty-hero-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.empty-hero-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px 0;
  line-height: 1.4;
}

.empty-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 260px;
}

.empty-action-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.empty-action-pill:hover {
  border-color: var(--accent);
  background: var(--panel);
  transform: translateY(-1px);
}

/* Destinations Section Header */
.dest-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.dest-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dest-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dest-icon-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  margin: 0;
}

.dest-icon-action-btn:hover {
  background: var(--bg);
  border-color: var(--line);
  color: var(--text);
}

.dest-clear-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 2px 4px !important;
  margin: 0 !important;
  transition: opacity 0.15s ease;
}

.dest-clear-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Integrated Search in Empty Hero */
.empty-hero-search-wrap {
  width: 100%;
  max-width: 300px;
  position: relative;
  margin-bottom: 14px;
}

.empty-search-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 3px 4px 3px 10px;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.empty-search-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.15);
}

.empty-search-icon {
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.empty-search-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 5px 0;
  min-width: 0;
  margin: 0;
}

.empty-search-row button.p {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  margin: 0;
  cursor: pointer;
}

/* Metro Timeline Spine & Destination Cards */
.timeline-container {
  position: relative;
  padding-bottom: 12px;
}

.timeline-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 24px;
  left: 17px;
  width: 2px;
  border-left: 2px dotted var(--line);
  z-index: 1;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 0;
  padding: 0;
  border-bottom: none !important;
  width: 100%;
  box-sizing: border-box;
}

.stop-card-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 3px 0;
  width: 100%;
  box-sizing: border-box;
}

.rail-node {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.node-pin-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.node-pin-wrap svg {
  width: 16px;
  height: 16px;
  display: block;
}

.node-pin-wrap.start-pin {
  color: #3b82f6;
  border-color: #3b82f6;
}

.node-pin-wrap.mid-pin {
  color: var(--muted);
}

.node-pin-wrap.end-pin {
  color: #3b82f6;
  border-color: #3b82f6;
}

.dest-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.dest-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.dest-card.dragging {
  opacity: 0.4;
  border: 1px dashed var(--accent);
}

.dest-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dest-name-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dest-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.dest-card:hover .dest-card-actions {
  opacity: 1;
}

.dest-icon-action {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px !important;
  margin: 0 !important;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.dest-icon-action:hover {
  color: var(--text);
  background: var(--panel);
}

.dest-icon-action.drag-handle {
  cursor: grab;
  user-select: none;
}

.dest-icon-action.drag-handle:active {
  cursor: grabbing;
}

.dest-card-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

.dest-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  padding: 2px 7px !important;
  margin: 0 !important;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 11px;
  color: var(--muted);
}

.dest-sub-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Route Leg Segment Pill */
.leg-segment-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 4px 0;
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.leg-segment-rail {
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.leg-rail-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.leg-segment-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px 10px;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.leg-segment-pill:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.leg-segment-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.leg-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.leg-mode-badge:hover {
  background: var(--bg2);
  border-color: var(--accent);
}

.leg-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.leg-chevron {
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-size: 12px;
}

.timeline-add-btn {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 2px;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  transition: color 0.15s ease;
}

.timeline-add-btn:hover {
  color: var(--text);
}

.timeline-add-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin: 0 auto;
  transition: all 0.15s ease;
  position: relative;
  z-index: 2;
}

.timeline-add-btn:hover .timeline-add-icon {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg);
}

.timeline-add-label {
  padding-left: 2px;
}

/* Inline Destination Search Card */
.inline-search-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: flex-start;
  margin-top: 4px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.inline-search-rail {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.inline-search-card-body {
  background: var(--panel);
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 16px rgba(228, 87, 46, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 6px 10px;
  position: relative;
  box-sizing: border-box;
}

.inline-search-field-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.inline-search-icon {
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.inline-search-field-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 4px 2px;
  min-width: 0;
  margin: 0;
}

.inline-add-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.inline-cancel-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  margin: 0;
}

.inline-cancel-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.inline-sugg-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* Pro Template Fallback Banner (Top of Studio Stage) */
.pro-fallback-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 7px 10px 7px 12px;
  border-radius: 999px;
  background: rgba(18, 22, 32, 0.92);
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px;
  line-height: 1.35;
}

[data-theme="light"] .pro-fallback-banner {
  background: rgba(255, 251, 235, 0.96);
  color: #1e293b;
  border-color: rgba(217, 119, 6, 0.42);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.pro-fallback-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.pro-fallback-text {
  font-weight: 500;
  min-width: 0;
}

.pro-fallback-cta {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  margin: 0;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.pro-fallback-cta:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pro-fallback-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.pro-fallback-close:hover {
  opacity: 1;
  background: rgba(148, 163, 184, 0.2);
}

@media (max-width: 640px) {
  .pro-fallback-banner {
    border-radius: 12px;
    flex-wrap: wrap;
    row-gap: 6px;
    top: 8px;
    padding: 8px 10px;
  }
}

.template-toast-action {
  margin: 0 0 0 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.template-toast-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* In-Sidebar Drilldown Inspector */
#tDetail {
  padding: 14px;
  overflow-y: auto;
}

.detail-header {
  margin-bottom: 12px;
}

.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #3b82f6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 !important;
  margin-bottom: 8px !important;
  transition: opacity 0.15s ease;
}

.detail-back-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.detail-route-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-route-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-mode-badge {
  display: flex;
  align-items: center;
}

.detail-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.detail-subtabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  gap: 8px;
}

.detail-subtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.detail-subtab:hover {
  color: var(--text);
}

.detail-subtab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.detail-card-note {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.detail-num-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
}

.detail-num-box input {
  width: 44px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.detail-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.detail-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.detail-pill-opt {
  padding: 4px 10px !important;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 !important;
}

.detail-pill-opt:hover {
  color: var(--text);
}

.detail-pill-opt.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.detail-veh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.detail-veh-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.detail-veh-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.detail-veh-card.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.detail-veh-title {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text);
}

/* Settings Segmented Sub-tabs */
.settings-subtabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
  gap: 3px;
  margin: 6px 12px 14px;
  flex-shrink: 0;
}

.settings-subtab {
  flex: 1;
  padding: 5px 8px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-subtab:hover {
  color: var(--text);
}

.settings-subtab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.settings-pane {
  padding: 0 12px 14px;
}

/* Modal Spot Chips */
.act-spot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}

.act-spot-chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border: none;
  font-size: 9px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease;
}

.act-spot-chip-del:hover {
  background: #ef4444;
}

/* In-Studio Starter Template Live Preview Mode */
#app.template-preview-mode #dock {
  display: none !important;
}
#app.template-preview-mode #panelExpandBtn {
  display: none !important;
}

.tpl-preview-tray {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 860px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
  animation: tplTraySlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .tpl-preview-tray,
:root:not([data-theme="light"]) .tpl-preview-tray {
  background: rgba(27, 32, 41, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .tpl-preview-tray {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
}

@keyframes tplTraySlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.tpl-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.tpl-preview-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  max-width: 270px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tpl-preview-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(228, 87, 46, 0.15);
}

.tpl-preview-search-icon {
  display: flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.tpl-preview-search-input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  width: 100%;
  outline: none;
  padding: 0;
}

.tpl-preview-search-input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.tpl-preview-empty-msg {
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
  display: flex;
  align-items: center;
}

.tpl-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tpl-preview-cancel-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tpl-preview-cancel-btn:hover {
  background: var(--line);
  color: var(--text);
}

.tpl-preview-use-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-t, #fff);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(228, 87, 46, 0.35);
}

.tpl-preview-use-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.tpl-preview-carousel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.tpl-preview-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tpl-preview-nav:hover {
  background: var(--line);
  border-color: var(--accent);
}

.tpl-preview-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  flex: 1;
}

.tpl-preview-track::-webkit-scrollbar {
  display: none;
}

.tpl-preview-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tpl-preview-card:hover {
  background: var(--panel);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tpl-preview-card.active {
  background: linear-gradient(135deg, rgba(228, 87, 46, 0.18) 0%, rgba(228, 87, 46, 0.08) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(228, 87, 46, 0.25);
}

.tpl-preview-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.tpl-preview-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tpl-preview-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.tpl-preview-loc {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tpl-preview-tray {
    width: calc(100% - 16px);
    bottom: 10px;
    padding: 10px 12px;
  }
  .tpl-preview-current-sub {
    display: none;
  }
}

.hr-ramp-pill {
  display: inline-block;
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fdba74 0%, #f97316 50%, #9a3412 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

/* --- modals.css --- */
/* Background Music & Modal Styling */
.bgm-card {
  background: var(--bg-alt, rgba(0,0,0,0.03));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}
.bgm-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bgm-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.bgm-card-details {
  flex: 1;
  min-width: 0;
}
.bgm-card-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bgm-card-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.bgm-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.bgm-card-actions .btn {
  padding: 4px 8px;
  font-size: 11px;
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
#vehModal {
  z-index: 10500;
}
.act-prev-veh-btn:hover {
  border-color: var(--accent) !important;
  background: var(--btn-hover, rgba(255, 255, 255, 0.05)) !important;
}
.modal-box {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.modal-close-btn:hover {
  background: var(--line);
  color: var(--fg);
}
.modal-quick-bar {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-alt, rgba(0, 0, 0, 0.02));
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.btn-subtle {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
  font-size: 12px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-subtle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.modal-search-wrap {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-search-row {
  display: flex;
  gap: 8px;
}
.modal-search-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  outline: none;
}
.modal-search-row input:focus {
  border-color: var(--accent);
}
.modal-search-row button {
  padding: 8px 16px;
  font-size: 13px;
}
.modal-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.chip-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.chip-btn:hover {
  color: var(--fg);
  border-color: var(--muted);
}
.modal-lic-pills {
  display: flex;
  background: var(--bg-alt, rgba(0,0,0,0.04));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px;
}
.lic-pill {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
}
.lic-pill.active {
  background: var(--accent);
  color: #fff;
}
.modal-results-feed {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}
.track-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.track-card:hover {
  border-color: var(--accent);
}
.track-card.active-selected {
  border-color: var(--accent);
  background: rgba(46, 158, 79, 0.08);
}
.track-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-alt, #f0f0f0);
  color: var(--fg);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.track-play-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  color: var(--accent);
}
.track-play-btn.playing {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.track-main {
  flex: 1;
  min-width: 0;
}
.track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  flex-wrap: wrap;
}
.lic-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}
.lic-badge.cc0 {
  background: rgba(46, 158, 79, 0.18);
  color: #2e9e4f;
}
.lic-badge.cc-by {
  background: rgba(33, 150, 243, 0.18);
  color: #2196f3;
}
.lic-badge.ftu {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}
.lic-badge.pro-locked {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.track-use-btn {
  padding: 5px 12px;
  font-size: 11px;
  flex-shrink: 0;
}

/* Compact Single Integrated Mini-Bar */
.bgm-modal-minibar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-alt, rgba(0, 0, 0, 0.03));
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.bgm-minibar-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.bgm-modal-track-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.bgm-minibar-meta {
  min-width: 0;
  max-width: 140px;
}
.bgm-minibar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.bgm-minibar-sub {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.bgm-minibar-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.bgm-minibar-btn {
  padding: 3px 8px;
  font-size: 11px;
  height: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bgm-remove-btn {
  color: var(--muted);
  border-color: var(--line);
  font-weight: 700;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.bgm-remove-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}
.bgm-minibar-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  flex-shrink: 0;
}
.bgm-minibar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.bgm-minibar-ctrl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text);
}
.bgm-minibar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.bgm-range-inline {
  width: 60px;
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
  vertical-align: middle;
}
.bgm-minibar-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bgm-minibar-select {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.btn-subtle.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Vehicle Card & Modal Styling */
.veh-card {
  background: var(--bg-alt, rgba(0,0,0,0.03));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
}
.veh-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.veh-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.veh-card-details {
  flex: 1;
  min-width: 0;
}
.veh-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
}
.veh-card-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.veh-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-block;
  flex-shrink: 0;
}
.veh-badge.badge-road {
  background: rgba(228, 87, 46, 0.15);
  color: #e4572e;
}
.veh-badge.badge-trail {
  background: rgba(46, 158, 79, 0.15);
  color: #2e9e4f;
}
.veh-badge.badge-air {
  background: rgba(33, 150, 243, 0.15);
  color: #2196f3;
}
.veh-badge.badge-sea {
  background: rgba(103, 58, 183, 0.15);
  color: #673ab7;
}
.veh-badge.badge-rail {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.veh-badge.badge-military {
  background: rgba(91, 100, 48, 0.18);
  color: #7b8842;
}
.veh-badge.badge-festive {
  background: rgba(220, 38, 38, 0.18);
  color: #ef4444;
}
.veh-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  padding: 16px 18px;
  overflow-y: auto;
}
.veh-item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
  min-height: 195px;
  box-sizing: border-box;
}
.veh-item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.veh-item-card.active-selected {
  border-color: var(--accent, #2e9e4f);
  background: rgba(46, 158, 79, 0.08);
}
.veh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}
.veh-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.veh-card-img-wrap {
  width: 100%;
  height: 110px;
  min-height: 110px;
  flex-shrink: 0;
  position: relative;
  background: var(--bg-alt, rgba(255, 255, 255, 0.04));
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.veh-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
  display: block;
  transition: transform 0.22s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}
.veh-item-card:hover .veh-card-img {
  transform: scale(1.06);
}
.veh-card-img-fallback {
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.veh-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin-top: auto;
  padding: 2px 2px 0 0;
}
.veh-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.veh-card-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: var(--bg-alt, rgba(255, 255, 255, 0.03));
  transition: all 0.18s ease;
  flex-shrink: 0;
  margin-bottom: 2px;
  margin-right: 2px;
}
.veh-item-card:hover .veh-card-check:not(.checked) {
  border-color: var(--accent);
  color: rgba(255, 255, 255, 0.35);
}
.veh-card-check.checked {
  background: #2e9e4f;
  border-color: #2e9e4f;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(46, 158, 79, 0.4);
}
.leg-veh-btn {
  font-size: 11px;
  padding: 2px 7px;
  margin-left: 4px;
  cursor: pointer;
}

/* Icon Selection Modal */
.stop-icon-btn {
  font-size: 11px;
  padding: 3px 8px;
  margin-left: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.stop-icon-preview {
  font-size: 13px;
  line-height: 1;
}
.icon-custom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-alt, rgba(0, 0, 0, 0.02));
  border-bottom: 1px solid var(--line);
}
.icon-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  padding: 14px 18px;
  overflow-y: auto;
}
.icon-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-item-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.icon-item-card.active-selected {
  border-color: var(--accent);
  background: rgba(46, 158, 79, 0.08);
}
.icon-item-symbol {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt, rgba(0,0,0,0.03));
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1;
}
.icon-item-details {
  flex: 1;
  min-width: 0;
}
.icon-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-item-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.icon-item-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* 3D Stay & Accommodation Cards in Marker Modal */
.stay-item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 190px;
  box-sizing: border-box;
}
.stay-item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.stay-item-card.active-selected {
  border-color: var(--accent);
  background: rgba(46, 158, 79, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}
.stay-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.stay-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stay-card-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(46, 158, 79, 0.15);
  color: #2e9e4f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stay-card-img-wrap {
  width: 100%;
  height: 105px;
  min-height: 105px;
  background: #1a1c23;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}
.stay-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stay-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stay-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}
.modal-section-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.3px;
}

/* Video Trimmer Modal */
.trim-player-wrap {
  position: relative;
  width: 100%;
  max-height: 330px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 10px;
}
.trim-video {
  max-width: 100%;
  max-height: 330px;
  display: block;
}
.trim-time-badge {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.trim-controls {
  padding: 0 4px 6px;
}
.trim-track-wrap {
  position: relative;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  margin: 6px 0 14px;
  user-select: none;
  overflow: visible;
}
.trim-highlight {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 30%;
  background: rgba(228, 87, 46, 0.28);
  border: 2px solid var(--accent, #e4572e);
  border-radius: 6px;
  box-sizing: border-box;
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.trim-highlight:hover {
  background: rgba(228, 87, 46, 0.38);
}
.trim-highlight.dragging {
  cursor: grabbing;
  background: rgba(228, 87, 46, 0.48);
  box-shadow: 0 0 12px rgba(228, 87, 46, 0.45);
}
.trim-grip-bar {
  width: 14px;
  height: 14px;
  background-image: radial-gradient(circle, var(--accent, #e4572e) 1.5px, transparent 1.5px);
  background-size: 5px 6px;
  background-repeat: repeat;
  opacity: 0.75;
  pointer-events: none;
}
.trim-handle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 18px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  touch-action: none;
}
.trim-handle::after {
  content: '';
  width: 4px;
  height: 20px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s ease, background 0.1s ease;
}
.trim-handle:hover::after,
.trim-handle.dragging::after {
  background: var(--accent, #e4572e);
  transform: scaleY(1.15);
}
.trim-handle-start {
  left: -9px;
}
.trim-handle-end {
  right: -9px;
}
.trim-playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 4;
}
.trim-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 6px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.trim-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.trim-time-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.trim-time-field input {
  width: 72px;
  padding: 4px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.trim-chip-dur {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #e4572e);
  background: rgba(228, 87, 46, 0.12);
  padding: 4px 10px;
  border-radius: 12px;
}
.trim-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-trim-btn {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent, #e4572e);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  margin-left: 6px;
}
.video-trim-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}

/* Export Video Wizard Modal */
.export-modal-box {
  max-width: 520px;
}

.export-modal-body {
  padding: 18px 20px;
}

.exp-section {
  margin-bottom: 18px;
}

.exp-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.exp-aspect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .exp-aspect-grid {
    grid-template-columns: 1fr;
  }
}

.exp-aspect-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}

.exp-aspect-card:hover {
  border-color: var(--accent);
}

.exp-aspect-card.active {
  border-color: var(--accent);
  background: rgba(228, 87, 46, .07);
}

.exp-aspect-shape {
  border: 2px solid var(--muted);
  border-radius: 3px;
  background: rgba(128, 128, 128, .1);
  flex-shrink: 0;
  transition: border-color .15s;
}

.exp-aspect-card.active .exp-aspect-shape {
  border-color: var(--accent);
  background: rgba(228, 87, 46, .2);
}

.exp-aspect-shape.ratio-16-9 {
  width: 28px;
  height: 16px;
}

.exp-aspect-shape.ratio-9-16 {
  width: 16px;
  height: 28px;
}

.exp-aspect-shape.ratio-1-1 {
  width: 20px;
  height: 20px;
}

.exp-aspect-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-aspect-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.exp-aspect-sub {
  font-size: 11px;
  color: var(--muted);
}

.exp-controls-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.exp-field {
  display: flex;
  flex-direction: column;
}

.exp-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-sizing: border-box;
}

.exp-summary-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 8px;
  text-align: center;
  gap: 6px;
}

.exp-sum-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.exp-sum-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-top: 2px;
}

/* Render Progress View */
.exp-render-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 16px;
}

.exp-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(228, 87, 46, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: expSpin .8s linear infinite;
  flex-shrink: 0;
}

@keyframes expSpin {
  to { transform: rotate(360deg); }
}

.exp-progress-wrap {
  height: 10px;
  background: rgba(128, 128, 128, .15);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.exp-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width .15s ease-out;
}

.exp-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* --- GPS Activity Import Preview Modal & Telemetry Styles --- */
.act-metric-box {
  background: var(--input-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.act-metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted, #94a3b8);
  margin-bottom: 2px;
}

.act-metric-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #f8fafc);
}

.act-sensor-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.act-sensor-chip.disabled {
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted, #94a3b8);
  border-color: rgba(148, 163, 184, 0.2);
  opacity: 0.6;
}

/* --- pro.css --- */
/* Pro / Subscription Tier Badges, Modals & User Navigation */

.pro-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.pro-modal-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Badges */
.pro-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.free-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted, #94a3b8);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

/* User Account Pill in Navbar & Toolbar */
.user-account-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-account-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.user-account-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.user-pill-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.user-pill-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User Account Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--panel, #181c24);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 8px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.user-dropdown-menu.active {
  display: flex;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.user-dropdown-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.user-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #f1f5f9);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-email {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #94a3b8);
  word-break: break-all;
}

.user-dropdown-tier {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text, #f1f5f9);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown-item.danger {
  color: #ef4444;
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* Auth Modal Specifics */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted, #94a3b8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--accent, #f59e0b);
  border-bottom-color: var(--accent, #f59e0b);
}

.auth-form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #94a3b8);
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #f1f5f9);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.auth-input:focus {
  border-color: var(--accent, #f59e0b);
}

.auth-checkout-notice {
  background: rgba(228, 87, 46, 0.12);
  border: 1px solid rgba(228, 87, 46, 0.3);
  color: var(--accent, #e4572e);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  text-align: center;
}

.auth-submit-btn {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  background: var(--accent, #e4572e);
  color: var(--accent-t, #fff);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(228, 87, 46, 0.3);
  transition: opacity 0.2s ease, filter 0.15s ease;
}

.auth-submit-btn:hover {
  filter: brightness(1.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--muted, #94a3b8);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  padding: 0 10px;
}

.btn-google {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background 0.2s ease, transform 0.1s ease;
  margin-bottom: 6px;
}

.btn-google:hover {
  background: #f8fafc;
}

.auth-error {
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
}

/* Upgrade Modal Specifics & Geo-Pricing Switcher */
.geo-switch-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.geo-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 3px;
  gap: 3px;
}

.geo-switch-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.geo-switch-btn.active {
  background: var(--accent, #f59e0b);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.upgrade-price-hero {
  text-align: center;
  padding: 14px 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  margin-bottom: 16px;
}

.upgrade-amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--text, #f1f5f9);
  line-height: 1;
}

.upgrade-period {
  font-size: 14px;
  color: var(--muted, #94a3b8);
  font-weight: 500;
}

.upgrade-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, #f59e0b);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 8px;
}

.upgrade-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.upgrade-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text, #f1f5f9);
}

.upgrade-feature-item svg {
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

.upgrade-feature-sub {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  margin-top: 1px;
}

.btn-subscribe-pro {
  width: 100%;
  padding: 13px;
  border-radius: 9px;
  background: var(--accent, #e4572e);
  color: var(--accent-t, #fff);
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(228, 87, 46, 0.35);
  transition: opacity 0.2s ease, filter 0.15s ease, transform 0.15s ease;
}

.btn-subscribe-pro:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.upgrade-guarantee-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted, #94a3b8);
  margin-top: 10px;
}

.pro-locked-card {
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pro-locked-card:hover {
  border-color: rgba(245, 158, 11, 0.45) !important;
}

/* Upgrade Modal subtle Redeem link */
.upgrade-redeem-link-wrap {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

.upgrade-redeem-link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: var(--accent, #e4572e);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upgrade-redeem-link-btn:hover {
  filter: brightness(1.12);
}

/* Manage Subscription Modal */
.sub-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sub-modal-loading {
  text-align: center;
  padding: 28px 10px;
  color: var(--muted, #94a3b8);
  font-size: 13px;
}

.sub-account-bar {
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

.sub-account-bar strong {
  color: var(--text, #f1f5f9);
}

.sub-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}

.sub-alert.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #ef4444;
}

.sub-alert.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #10b981;
}

.sub-plan-card {
  border-radius: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--panel, rgba(255, 255, 255, 0.03));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-plan-card.lifetime {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(245, 158, 11, 0.08));
  border-color: rgba(16, 185, 129, 0.35);
}

.sub-plan-card.pro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(228, 87, 46, 0.06));
  border-color: rgba(245, 158, 11, 0.35);
}

.sub-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sub-plan-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.sub-plan-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.sub-plan-badge.lifetime {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sub-plan-badge.pro {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sub-plan-badge.free {
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted, #94a3b8);
  border: 1px solid var(--line, rgba(148, 163, 184, 0.25));
}

.sub-plan-desc {
  font-size: 12.5px;
  color: var(--muted, #94a3b8);
  line-height: 1.45;
}

.sub-plan-meta {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sub-code-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(127, 127, 127, 0.14);
  color: var(--text, #f1f5f9);
}

.sub-plan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.sub-secondary-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--text, #f1f5f9);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sub-secondary-btn:hover {
  border-color: var(--accent, #e4572e);
}

.sub-dodo-warning {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub-dodo-warning-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f59e0b;
}

.sub-dodo-warning-text {
  font-size: 12px;
  color: var(--text, #f1f5f9);
  line-height: 1.45;
}

.sub-warning-btn {
  align-self: flex-start;
  margin-top: 2px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.16);
  color: var(--text, #f1f5f9);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sub-warning-btn:hover {
  background: rgba(245, 158, 11, 0.25);
}

.sub-redeem-section {
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-redeem-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.sub-redeem-sub {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  line-height: 1.45;
}

.sub-redeem-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.sub-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  font-size: 13.5px;
  background: var(--bg, rgba(0, 0, 0, 0.25));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.18));
  color: var(--text, #f1f5f9);
}

.sub-redeem-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.sub-redeem-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.sub-redeem-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sub-lifetime-foot {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  line-height: 1.5;
  text-align: center;
  padding-top: 4px;
}

/* Dedicated /redeem Page */
.redeem-page-wrap {
  max-width: 560px;
  width: 100%;
  margin: 40px auto 64px;
  padding: 0 20px;
  box-sizing: border-box;
}

.redeem-hero {
  text-align: center;
  margin-bottom: 24px;
}

.redeem-hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.redeem-hero p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

.redeem-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.redeem-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.redeem-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.redeem-step.active {
  color: var(--text);
}

.redeem-step.done {
  color: #10b981;
}

.redeem-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.16);
}

.redeem-step.active .redeem-step-num {
  background: var(--accent, #e4572e);
  color: #fff;
}

.redeem-step.done .redeem-step-num {
  background: #10b981;
  color: #fff;
}

.redeem-user-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.redeem-user-pill strong {
  color: var(--text);
}

.redeem-switch-btn {
  background: none;
  border: none;
  color: var(--accent, #e4572e);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.redeem-perks {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.redeem-perks h3 {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.redeem-perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .redeem-perks-grid {
    grid-template-columns: 1fr;
  }
}

/* --- pricing.css --- */
/* Standalone & In-Page Pricing Styles */

.pricing-page-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.pricing-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.pricing-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
  line-height: 1.15;
}

.pricing-hero p {
  font-size: 16px;
  color: var(--muted, #94a3b8);
  line-height: 1.5;
  margin: 0;
}

/* Geo-Pricing Toggle Pill */
.pricing-switcher-row {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.pricing-switcher-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  padding: 4px;
  gap: 4px;
}

.pricing-switch-btn {
  padding: 8px 18px;
  border-radius: 30px;
  border: none;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pricing-switch-btn.active {
  background: var(--accent, #f59e0b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Pricing Grid */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.plan-card {
  background: var(--panel, #181c24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.plan-card.featured {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.12);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--panel, #181c24) 40%);
}

.plan-card-tag {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.plan-desc {
  font-size: 13px;
  color: var(--muted, #94a3b8);
  margin: 0 0 20px;
  min-height: 38px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.plan-price {
  font-size: 44px;
  font-weight: 800;
  color: var(--text, #f1f5f9);
  line-height: 1;
}

.plan-frequency {
  font-size: 14px;
  color: var(--muted, #94a3b8);
  font-weight: 500;
}

.ppp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, #f59e0b);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 6px;
  width: 100%;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text, #f1f5f9);
}

.plan-feature.dim {
  color: var(--muted, #64748b);
}

.plan-feature-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-cta-btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #f1f5f9);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.plan-cta-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.plan-cta-btn.primary {
  background: var(--accent, #e4572e);
  border-color: transparent;
  color: var(--accent-t, #fff);
  box-shadow: 0 4px 16px rgba(228, 87, 46, 0.35);
}

.plan-cta-btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Guarantee / Policy Strip */
.policy-strip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #94a3b8);
  line-height: 1.5;
  margin-bottom: 50px;
}

/* --- seo-pages.css --- */
/* ==========================================================================
   Anim8MyTrip SEO Static Pages & Blog Stylesheet (seo-pages.css)
   ========================================================================== */

/* Shared Page Scroll Wrapper */
.seo-page-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
}

.seo-wrap {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px 80px;
  box-sizing: border-box;
}

/* Breadcrumbs */
.seo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.seo-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.seo-breadcrumb a:hover {
  color: var(--accent);
}
.seo-breadcrumb span.sep {
  opacity: 0.4;
}
.seo-breadcrumb span.current {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category Pill / Kicker */
.seo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(228, 87, 46, .12);
  color: var(--accent);
  margin-bottom: 16px;
}

/* Landing Page Hero */
.seo-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 32px 0 56px;
}
.seo-hero-content h1 {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin: 0 0 18px;
}
.seo-hero-content p.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 28px;
  font-weight: 400;
}
.seo-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.seo-hero-actions .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(228, 87, 46, .35);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.seo-hero-actions .cta-primary:hover {
  background: #d04a23;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(228, 87, 46, .45);
}
.seo-hero-actions .cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.seo-hero-actions .cta-secondary:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.seo-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.seo-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Simulated 3D Route Mockup Visual */
.seo-mockup-card {
  position: relative;
  background: linear-gradient(145deg, #181d26, #0e1117);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
}
.seo-mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: #d1d5db;
}
.seo-mockup-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.seo-mockup-badge {
  background: rgba(228, 87, 46, .25);
  color: #ff8c66;
  border: 1px solid rgba(228, 87, 46, .4);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.seo-mockup-stage {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 60% 40%, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.95)),
              repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0px, rgba(255,255,255,.015) 1px, transparent 1px, transparent 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* S-Curve SVG Route Track */
.seo-mockup-route-svg {
  position: absolute;
  width: 90%;
  height: 80%;
  overflow: visible;
}
.route-line-bg {
  stroke: rgba(255, 255, 255, .15);
  stroke-width: 4;
  fill: none;
  stroke-dasharray: 4 4;
}
.route-line-active {
  stroke: #ff5722;
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, .7));
}

/* Vehicle Chip on Route */
.seo-mockup-vehicle {
  position: absolute;
  top: 42%;
  left: 54%;
  transform: translate(-50%, -50%);
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(228, 87, 46, 0.6);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
  animation: floatVeh 3s ease-in-out infinite alternate;
}
@keyframes floatVeh {
  0% { transform: translate(-50%, -50%) translateY(0); }
  100% { transform: translate(-50%, -50%) translateY(-4px); }
}

/* Polaroid Mockup Moment */
.seo-mockup-polaroid {
  position: absolute;
  bottom: 16px;
  right: 18px;
  background: #ffffff;
  padding: 6px 6px 18px 6px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  transform: rotate(4deg);
  width: 96px;
}
.seo-mockup-polaroid-photo {
  height: 72px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
}
.seo-mockup-polaroid-caption {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 8px;
  color: #374151;
  text-align: center;
  margin-top: 5px;
  white-space: nowrap;
}

/* Live Telemetry HUD Bar */
.seo-mockup-hud {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: flex;
  gap: 8px;
}
.seo-mockup-hud-chip {
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  color: #e5e7eb;
}
.seo-mockup-hud-chip b {
  color: #38bdf8;
  font-weight: 700;
}

/* Section Containers */
.seo-section {
  margin-top: 64px;
}
.seo-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}
.seo-section-header h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0 0 12px;
}
.seo-section-header p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Value Props Grid */
.seo-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.seo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.seo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}
.seo-card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
}
.seo-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}
.seo-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

/* Step by Step Workflow */
.seo-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.seo-step-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 20px;
  position: relative;
}
.seo-step-num {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(228, 87, 46, .4);
}
.seo-step-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 8px;
}
.seo-step-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Feature Spotlight Matrix */
.seo-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px;
  margin-top: 48px;
}
.seo-spotlight-content h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.seo-spotlight-content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 20px;
}
.seo-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.seo-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}
.seo-checklist li svg {
  flex-shrink: 0;
  color: #10b981;
  margin-top: 2px;
}

/* FAQ Accordion Section */
.seo-faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.seo-faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .15s ease;
}
.seo-faq-item[open] {
  border-color: var(--accent);
}
.seo-faq-question {
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.seo-faq-question::-webkit-details-marker {
  display: none;
}
.seo-faq-question::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s ease;
}
.seo-faq-item[open] .seo-faq-question::after {
  content: "−";
  color: var(--accent);
}
.seo-faq-answer {
  padding: 0 22px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.seo-faq-answer p {
  margin: 0 0 10px;
}
.seo-faq-answer p:last-child {
  margin-bottom: 0;
}

/* Bottom Call to Action Banner */
.seo-cta-banner {
  margin-top: 72px;
  background: linear-gradient(135deg, #1b2029 0%, #12151b 100%);
  border: 1px solid rgba(228, 87, 46, .35);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  position: relative;
  overflow: hidden;
}
.seo-cta-banner h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  color: #fff;
}
.seo-cta-banner p {
  font-size: 17px;
  color: #9aa4b5;
  max-width: 620px;
  margin: 0 auto 30px;
  line-height: 1.6;
}
.seo-cta-banner .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(228, 87, 46, .45);
  transition: transform .15s ease, background .15s ease;
}
.seo-cta-banner .cta-primary:hover {
  background: #d04a23;
  transform: translateY(-2px);
}
.seo-cta-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  font-size: 13px;
  color: #9aa4b5;
}
.seo-cta-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Blog Article & Hub Layouts
   ========================================================================== */

.blog-wrap {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 80px;
  box-sizing: border-box;
}

/* Article Header */
.blog-article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.blog-article-header h1 {
  font-size: 38px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 12px 0 16px;
}
.blog-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.blog-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Table of Contents */
.blog-toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0 36px;
}
.blog-toc-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 12px;
}
.blog-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-toc li a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.blog-toc li a:hover {
  color: var(--accent);
}

/* Article Body Typography */
.blog-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}
.blog-body h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 44px 0 16px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.blog-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}
.blog-body p {
  margin: 0 0 20px;
}
.blog-body ul, .blog-body ol {
  padding-left: 24px;
  margin: 0 0 24px;
}
.blog-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}
.blog-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.blog-body strong {
  font-weight: 700;
  color: var(--text);
}

/* Callout Boxes */
.blog-callout {
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.blog-callout.tip {
  border-left-color: #10b981;
}
.blog-callout.note {
  border-left-color: #3b82f6;
}
.blog-callout-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-callout.tip .blog-callout-header {
  color: #10b981;
}
.blog-callout.note .blog-callout-header {
  color: #3b82f6;
}
.blog-callout-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.blog-callout-body p:last-child {
  margin-bottom: 0;
}

/* In-Article Studio CTA Card */
.blog-studio-card {
  background: linear-gradient(135deg, rgba(228, 87, 46, .08), rgba(228, 87, 46, .02));
  border: 1px solid rgba(228, 87, 46, .35);
  border-radius: 16px;
  padding: 30px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.blog-studio-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.blog-studio-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.blog-body .blog-studio-btn,
.blog-studio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(228, 87, 46, .35);
  transition: transform .15s ease, background .15s ease;
}
.blog-body .blog-studio-btn:hover,
.blog-studio-btn:hover {
  background: #d04a23;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Related Articles Grid */
.blog-related-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.blog-related-section h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.blog-related-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
  display: flex;
  flex-direction: column;
}
.blog-related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.blog-related-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-related-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.4;
}
.blog-related-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

/* Blog Index / Hub */
.blog-hub-hero {
  text-align: center;
  padding: 32px 0 44px;
  max-width: 760px;
  margin: 0 auto;
}
.blog-hub-hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin: 12px 0 16px;
}
.blog-hub-hero p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Category Filter Tabs */
.blog-filter-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.blog-tab-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}
.blog-tab-btn:hover, .blog-tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-grid-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.blog-grid-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .05);
}
.blog-grid-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.blog-grid-badge {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .04em;
}
.blog-grid-card h2, .blog-grid-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.4;
}
.blog-grid-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
  flex: 1;
}
.blog-grid-readmore {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 960px) {
  .seo-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 0 40px;
  }
  .seo-hero-content h1 {
    font-size: 34px;
  }
  .seo-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .seo-steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .seo-spotlight {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .seo-wrap, .blog-wrap {
    padding: 20px 16px 60px;
  }
  .seo-hero-content h1 {
    font-size: 28px;
  }
  .seo-hero-content p.lead {
    font-size: 16px;
  }
  .seo-grid-3, .seo-steps-grid, .blog-grid, .blog-related-grid {
    grid-template-columns: 1fr;
  }
  .blog-article-header h1 {
    font-size: 28px;
  }
  .blog-studio-card {
    flex-direction: column;
    text-align: center;
  }
  .seo-cta-banner {
    padding: 36px 20px;
  }
  .seo-cta-banner h2 {
    font-size: 26px;
  }
  .seo-cta-badges {
    flex-direction: column;
    gap: 10px;
  }
}
