.topbar .nav a.account-link, .explore-filters a.account-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 11px; min-height: 40px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: 12px; white-space: nowrap; }
.account-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.explore-filters a.account-link { color: var(--ink); background: var(--surface); border-color: var(--line); }
.account-dialog { width: min(500px, calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow-y: auto; color: var(--ink); background: var(--surface); padding: 32px; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 20px 80px rgba(0,0,0,.25); }
.account-dialog::backdrop { background: rgba(12,17,24,.58); backdrop-filter: blur(6px); }
.account-dialog-body > h2 { font-size: 29px; line-height: 1.1; letter-spacing: -.035em; padding-right: 20px; margin: 12px 0 20px; }
.account-dialog p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.account-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; background: var(--paper); color: var(--ink); border: 0; border-radius: 50%; font-size: 23px; }
.account-auth h2 { font-size: 32px; letter-spacing: -.04em; margin: 14px 0 20px; }
.account-dialog:has(.account-auth) .account-dialog-body > h2 { display: none; }
.account-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; margin: 18px 0; background: var(--paper); }
.account-tabs button { flex: 1; border: 0; border-radius: 999px; padding: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; }
.account-tabs button[aria-pressed="true"] { background: var(--cyan); color: #10252d; }
.account-auth-form { display: grid; gap: 15px; }
.account-apple { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 18px; border: 1px solid #000; border-radius: 999px; background: #000; color: #fff; font-size: 16px; font-weight: 600; }
.account-apple svg { width: 22px; height: 24px; flex-shrink: 0; }
.account-apple:disabled { opacity: .65; cursor: wait; }
.account-apple-status:empty { display: none; }
.account-auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.account-auth-divider::before, .account-auth-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
/* Temporarily hide Apple entry points until live sign-in is verified. */
.account-apple, .account-auth-divider { display: none; }
.account-auth-form label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.account-auth-form input { width: 100%; padding: 13px 15px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 14px; min-width: 0; }
.account-auth-form small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-primary, .account-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 12px 18px; font-size: 13px; font-weight: 650; cursor: pointer; }
.account-primary { background: var(--cyan); color: #10252d; }
.account-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.account-dialog .account-primary, .account-dialog .account-secondary { width: 100%; margin-top: 10px; }
.account-primary:disabled { opacity: .6; cursor: wait; }
.account-form-status { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.account-note { font-size: 12px !important; line-height: 1.6; color: var(--muted); }
.account-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 18px; }
.account-help button, .account-text-button { border: 0; background: transparent; color: #235fc2; padding: 6px 0; font-size: 12px; cursor: pointer; }
.account-dialog .account-text-button { margin-top: 14px; }
.account-dialog[data-kind="premium"] { width: min(520px, calc(100% - 32px)); height: min(740px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; background: #fff; border: 0; border-radius: 28px; }
.account-dialog[data-kind="premium"] > .account-close { z-index: 3; top: 20px; right: 20px; width: 38px; height: 38px; color: #172a30; background: #fffffff2; border: 1px solid #d7dfda; box-shadow: 0 2px 8px #10252d20; }
.account-dialog[data-kind="premium"] > .account-close:focus-visible { outline: 2px solid #2184a6; outline-offset: 3px; }
.account-dialog[data-kind="premium"] .account-dialog-body { height: 100%; min-height: 0; }
.account-dialog[data-kind="premium"] .account-dialog-body > h2,
.account-dialog[data-kind="checkout"] .account-dialog-body > h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.premium-overview { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.premium-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.premium-scroll:focus-visible { outline: 2px solid #2997ba; outline-offset: -3px; }
.premium-first-look { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 12px; }
.premium-map-visual { flex: 0 0 auto; position: relative; height: clamp(120px, 21dvh, 175px); overflow: hidden; background: #dbeccd; }
.premium-map-visual > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 63%; }
.premium-map-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, white 0%, #ffffff00 48%); pointer-events: none; }
.premium-map-tile { position: absolute; z-index: 1; left: 50%; bottom: 22px; transform: translateX(-50%) rotate(-4deg); display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 10px; border: 1px solid #ffffffd9; border-radius: 16px; color: #17313b; background: #fffffff2; box-shadow: 0 8px 30px #17313b26; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.premium-map-tile img { width: 64px; height: 45px; object-fit: contain; }
.premium-lead { padding: 0 28px 16px; text-align: center; }
.premium-wordmark { display: inline-flex; align-items: center; gap: 8px; color: #344e57; font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.premium-wordmark > span { padding: 4px 7px; border-radius: 5px; background: #ddf5fd; color: #175b72; font-size: 8px; }
.premium-lead h3 { margin: 12px 0 9px; font-size: clamp(26px, 4.5dvh, 36px); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
.account-dialog .premium-plan-price { margin: 0; font-size: 14px; color: #607078; }
.premium-plan-price strong { color: var(--ink); font-weight: 650; }
.premium-key-benefits { margin: 0 30px; padding: 16px 18px; border: 1px solid #dde4e5; border-radius: 12px; }
.premium-key-benefits ul { display: grid; gap: 13px; list-style: none; padding: 0; margin: 0; }
.premium-key-benefits li { display: flex; align-items: center; gap: 15px; }
.premium-key-benefits li > svg { flex: 0 0 21px; width: 21px; height: 21px; color: #2184a6; }
.premium-key-benefits strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.premium-key-benefits small { display: block; margin-top: 3px; color: #6c7c83; font-size: 11px; line-height: 1.35; }
.account-dialog .premium-context { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #e7eced; font-size: 11px; line-height: 1.4; }
.premium-more-link { display: flex; align-items: center; justify-content: center; gap: 9px; width: fit-content; margin: auto auto 0; padding: 17px 12px 3px; border: 0; background: transparent; color: #55717d; font-size: 11px; cursor: pointer; }
.premium-more { padding: 32px 36px 24px; }
.premium-more > h3 { margin: 0 0 28px; font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
.premium-feature-list { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; }
.premium-feature-list > li { display: flex; align-items: center; gap: 20px; min-width: 0; padding: 22px 0; border-bottom: 1px solid #e5eaec; }
.premium-feature-list > li:last-child { border-bottom: 0; }
.premium-feature-icon { display: grid; place-items: center; flex: 0 0 66px; width: 66px; height: 66px; border-radius: 17px; background: linear-gradient(145deg, #e9f9fc, #cfedf7); color: #17617d; box-shadow: 0 5px 12px #17313b10; border: 3px solid white; }
.premium-feature-icon svg { width: 29px; height: 29px; }
.premium-feature-list strong { display: block; color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 600; }
.account-dialog .premium-feature-list p { margin: 5px 0 0; font-size: 12px; line-height: 1.6; }
.premium-app-section { margin-top: 24px; }
.premium-app-section > h4 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 0 0 6px; }
.premium-road-note { position: relative; overflow: hidden; border-radius: 18px; margin-top: 28px; color: white; }
.premium-road-note > img { display: block; width: 100%; height: 220px; object-fit: cover; }
.premium-road-note > div { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; background: linear-gradient(transparent, #0c1c24e8); }
.premium-road-note strong { font-size: 24px; line-height: 1.1; font-weight: 550; letter-spacing: -.03em; }
.account-dialog .premium-road-note p { color: #e4edf1; font-size: 12px; margin: 9px 0 0; line-height: 1.5; }
.account-dialog .premium-small-print { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 20px 0 0; }
.premium-footer { flex: 0 0 auto; z-index: 2; padding: 14px 30px 16px; border-top: 1px solid #eef1f2; background: #fff; box-shadow: 0 -10px 24px #ffffffeb; }
.account-dialog .premium-subscribe { justify-content: center; margin: 0; min-height: 48px; font-size: 14px; padding-inline: 22px; }
.account-dialog .premium-footer > p { text-align: center; margin: 10px 0 0; font-size: 11px; line-height: 1.3; color: #66767d; }
.premium-test-label { display: block; width: fit-content; margin: 6px auto 0; font-size: 9px; color: #776127; }
.account-dialog[data-kind="checkout"] { width: min(460px, calc(100% - 24px)); height: auto; min-height: 0; max-height: min(740px, calc(100dvh - 48px)); overflow-y: auto; overscroll-behavior: contain; padding: 0; background: #fff; border: 0; border-radius: 16px; outline: 0; }
.account-dialog[data-kind="checkout"] .account-dialog-body { margin: 0; padding: 0; }
.account-dialog[data-kind="checkout"] > .account-close { z-index: 3; top: 7px; right: 7px; width: 28px; height: 28px; background: #f2f4f5e8; font-size: 20px; }
.stripe-checkout { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
.stripe-checkout iframe { display: block; max-width: 100%; border: 0; box-shadow: none; }
.account-dialog[data-kind="checkout"] #checkout-status { padding: 40px 26px 20px; margin: 0; font-size: 13px; }
.account-dialog[data-kind="checkout"] #checkout-status:empty { display: none; }
.account-dialog[data-kind="checkout"][data-checkout-state="loading"] #checkout-status { display: grid; place-items: center; min-height: 200px; padding: 36px; }
.account-dialog[data-kind="checkout"][data-checkout-state="error"] .stripe-checkout { padding: 0 26px 26px; }
.account-dialog[data-kind="checkout"][data-checkout-state="error"] #checkout-status,
.account-dialog[data-kind="checkout"][data-checkout-state="confirmation-error"] #checkout-status { color: #9a3d30; }
@media (max-width: 520px) {
  .account-dialog[data-kind="premium"] { width: calc(100% - 24px); height: min(740px, calc(100dvh - 36px)); max-height: calc(100dvh - 36px); border-radius: 24px; }
  .premium-lead { padding-inline: 18px; padding-bottom: 16px; }
  .premium-key-benefits { margin-inline: 22px; padding: 16px; }
  .premium-more { padding: 28px 22px 24px; }
  .premium-feature-list > li { gap: 15px; }
  .premium-footer { padding: 14px 22px max(16px, env(safe-area-inset-bottom)); }
  .account-dialog[data-kind="checkout"] { max-height: min(740px, calc(100dvh - 36px)); }
}
@media (max-height: 740px) {
  .premium-map-visual { height: 120px; }
  .premium-map-tile { bottom: 15px; padding: 6px 13px 6px 6px; }
  .premium-map-tile img { width: 52px; height: 34px; }
  .premium-lead { padding-bottom: 14px; }
  .premium-lead h3 { margin: 8px 0; font-size: 27px; }
  .premium-key-benefits { padding-block: 13px; }
  .premium-key-benefits ul { gap: 11px; }
  .premium-more-link { padding-top: 13px; }
}
@media (max-height: 620px) {
  .premium-map-visual { height: 85px; }
  .premium-map-tile { bottom: 10px; }
  .premium-key-benefits small { display: none; }
  .premium-key-benefits ul { gap: 12px; }
  .premium-footer { padding-block: 12px; }
}
.account-shell { padding: 125px 0 80px; min-height: 80vh; }
.account-shell > .account-auth { width: min(480px, 100%); margin: 0 auto; padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); }
.account-auth > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.account-overview { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.account-overview h1 { font-size: clamp(40px, 6vw, 68px); }
.account-overview p { color: var(--muted); overflow-wrap: anywhere; }
.account-badge { display: inline-flex; padding: 7px 11px; color: #10252d; background: color-mix(in srgb, var(--cyan) 40%, var(--surface)); border-radius: 999px; font-size: 12px; font-weight: 650; }
.account-membership { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; margin: 30px 0 50px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.account-membership p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.account-membership-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.billing-provider { padding: 20px 0; border-bottom: 1px solid var(--line); }
.billing-provider:first-of-type { padding-top: 0; }
.billing-provider:last-of-type { margin-bottom: 12px; }
.account-saved-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-saved-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.saved-card-content { padding: 24px; }
.saved-card-content > a { color: #235fc2; font-size: 13px; font-weight: 650; }
.saved-no-preview { position: relative; display: grid; place-items: center; min-height: 220px; background: var(--paper); color: var(--muted); font-size: 13px; }
.saved-filters { position: relative; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 14px; }
.saved-type, .saved-range summary { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; }
.saved-range summary::-webkit-details-marker { display: none; }
.saved-arrow { display: inline-grid; place-items: center; width: 14px; height: 14px; line-height: 1; }
.saved-type[data-type="Circular"] { background: var(--cyan); color: #10252d; border-color: transparent; }
.saved-type[data-type="Point-to-point"] { background: #dce8de; border-color: transparent; }
.saved-range { position: relative; }
.saved-range[data-active="true"] summary { border-color: #3199c1; background: color-mix(in srgb, var(--cyan) 20%, var(--surface)); }
.saved-range-panel { position: absolute; top: calc(100% + 10px); left: 0; width: 290px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.saved-range-panel label { display: block; margin-top: 18px; font-size: 12px; color: var(--muted); }
.saved-range-panel output { float: right; color: var(--ink); font-weight: 650; }
.saved-range-panel input { display: block; width: 100%; margin: 14px 0; accent-color: #3199c1; }
.saved-range-panel .account-primary { width: 100%; margin-top: 12px; }
.saved-unit-label { display: flex !important; align-items: center; justify-content: space-between; }
.saved-unit { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
.saved-mobile-filters { display: none; }
.saved-result-count { margin-bottom: 20px; }
.account-saved-card h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.03em; }
.account-saved-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-saved-card > a { font-size: 13px; color: #235fc2; font-weight: 650; }
.account-saved-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px; margin-top: 20px; }
.account-saved-actions .saved-view, .account-saved-actions .saved-navigate { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 14px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.account-saved-actions .saved-view { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.account-saved-actions .saved-navigate { background: var(--cyan); color: #10252d; border: 1px solid transparent; }
.saved-remove-photo { position: absolute; bottom: 14px; right: 14px; z-index: 6; min-height: 34px; padding: 8px 13px; border: 1px solid #ffffffb3; border-radius: 999px; background: #fffffff2; color: #10252d; box-shadow: 0 2px 10px #10252d26; font-size: 11px; font-weight: 650; cursor: pointer; }
.saved-remove-photo:hover { background: white; }
.saved-remove-photo:focus-visible { outline: 2px solid #17617d; outline-offset: 3px; }
.account-empty, .account-app-reminder { padding: 30px; margin-top: 25px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.account-app-reminder { margin-top: 50px; }
.account-app-reminder p, .account-empty p { color: var(--muted); line-height: 1.7; }
.card-actions { display: flex; justify-content: flex-end; padding: 0 22px 20px; }
.route-card-save, .result-save { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 650; }
.route-card-save[aria-pressed="true"], .result-save[aria-pressed="true"] { background: var(--cyan); border-color: transparent; color: #10252d; }
.result-save { display: inline-flex; margin: 10px 0 0 102px; }
@media (max-width: 650px) {
  .saved-mobile-filters { display: inline-flex; }
  .saved-filters { display: none; }
  .saved-filters.is-open { display: flex; }
  .saved-range { position: static; }
  .saved-range-panel { left: 0; width: min(290px, calc(100vw - 48px)); }
  .saved-range[data-range="time"] .saved-range-panel { left: auto; right: 0; }
  .topbar .nav a.account-link, .explore-filters a.account-link { padding: 8px; min-width: 36px; }
  .account-link > span { display: none; }
  .account-dialog { padding: 25px 20px; }
  .account-overview { align-items: flex-start; }
  .account-membership { align-items: flex-start; flex-direction: column; }
  .account-saved-grid { grid-template-columns: 1fr; }
  .account-shell > .account-auth { padding: 26px 20px; }
  .account-saved .gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .account-saved-actions { flex-wrap: wrap; }
}
