/* Rider palette and desktop density. Legacy expert workflows remain available. */
:root{--tx-cream:#F4F0E7;--tx-paper:#FBF8F1;--tx-surface:#FFFDF8;--tx-raised:#FFFDF8;--tx-ink:#282A26;--tx-muted:#74756F;--tx-line:#D8D0C3;--tx-gold-500:#B18A4A;--tx-gold-300:#E8D8B7;--tx-cyan:#00E5FF;--tx-font-display:var(--tx-font-ui);--tx-radius-md:14px;--tx-radius-lg:18px;--tx-header-height:62px;--tx-shadow-card:0 2px 4px #191e2610,0 14px 30px #191e2612;color-scheme:light}
:root[data-theme="dark"]{--tx-cream:#050706;--tx-paper:#0B0E0C;--tx-surface:#111512;--tx-raised:#171C19;--tx-ink:#F7F4ED;--tx-muted:#A8AEA9;--tx-muted-light:#A8AEA9;--tx-line:#303732;--tx-sand-100:#1B211E;--tx-sand-200:#313733;--tx-sand-300:#424A44;--tx-shadow-card:0 2px 4px #0004,0 14px 32px #0005;color-scheme:dark}
/* Preserve the shared shell palette when a workspace has its own panel colors. */
:root{--tx-header-paper:var(--tx-paper);--tx-header-surface:var(--tx-surface);--tx-header-raised:var(--tx-raised);--tx-header-ink:var(--tx-ink);--tx-header-muted:var(--tx-muted);--tx-header-line:var(--tx-line)}
body{background:var(--tx-cream);color:var(--tx-ink)}
.tx-topbar,.tx-sidebar{background:var(--tx-paper);border-color:var(--tx-line)}
.tx-tagline,.tx-sidebar-kicker{color:var(--tx-muted)}
.tx-nav-item{color:var(--tx-ink);min-height:44px;font-weight:650;border:1px solid transparent}
.tx-nav-item:hover{background:var(--tx-raised);border-color:var(--tx-line)}
.tx-nav-item.active{background:var(--tx-surface);color:var(--tx-ink);border-color:var(--tx-gold-500);box-shadow:inset 3px 0 var(--tx-gold-500)}
.tx-page-title,.tx-card-title,.route-title,.destination-profile-title,.experience-title{font-family:var(--tx-font-ui);color:var(--tx-ink);font-weight:800;letter-spacing:-.035em}
.tx-card,.tx-dialog,.route-row,.destination-list-card,.route-detail,.route-library{background:var(--tx-surface);color:var(--tx-ink);border-color:var(--tx-line)}
.tx-input,.tx-select,.tx-textarea,textarea{background:var(--tx-surface);color:var(--tx-ink);border-color:var(--tx-line);border-radius:14px}
.tx-button{min-height:42px;border-radius:14px;box-shadow:0 2px 3px #0001;font-weight:700}
.tx-button-primary{background:#254537;color:#FFFDF8;border-color:#315B49}
.tx-button-secondary,.tx-button-quiet{background:var(--tx-raised);color:var(--tx-ink);border-color:var(--tx-line)}
.tx-brand-logo{background:transparent;border:0;border-radius:0;padding:0}
/* Use the exact public website artwork; preserve its green EXP in dark mode. */
[data-theme="dark"] .tx-brand-logo{content:url("../images/trailexp-logo-app.png");filter:none}
[data-theme="dark"] :is(.route-row-name,.route-distance,.route-status-pill,.tx-label,.tx-eyebrow){color:var(--tx-ink)}
[data-theme="dark"] :is(.route-hero,.route-stat,.destination-stat,.route-photo-rail,.route-detail-body,.media-toolbar,.route-toolbar){background:var(--tx-surface);color:var(--tx-ink)}
.tx-theme-control{display:flex;align-items:center;gap:8px;margin-left:auto;padding:0 18px;font-size:12px;color:var(--tx-muted)}
.tx-theme-control select{padding:8px;border-radius:12px;border:1px solid var(--tx-line);color:var(--tx-ink);background:var(--tx-surface)}
.tx-topbar:has(.tx-studio-header-actions){padding-block:8px}
.tx-studio-header-actions .tx-theme-control{padding:0;margin:0}
@media(max-width:700px){.tx-topbar:has(.tx-studio-header-actions){padding-inline:8px;gap:8px}}
@media(max-width:380px){.tx-topbar:has(.tx-studio-header-actions) .tx-brand-wordmark{width:150px}}
.tx-rider-workspace{max-width:1640px;margin:auto}
.tx-rider-head,.tx-rider-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}
.tx-rider-head h1{font-size:36px;line-height:1.1;letter-spacing:-.045em;margin:7px 0 10px}
.tx-rider-detail-heading h2{font-size:25px;line-height:1.2;letter-spacing:-.025em;margin:8px 0}
.tx-rider-eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:11px;font-weight:800;color:var(--tx-gold-500)}
.tx-rider-muted,.tx-rider-map-legend{font-size:12px;line-height:1.55;color:var(--tx-muted)}
.tx-rider-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.tx-rider-filters :is(input:not([type="checkbox"]),select){border:1px solid var(--tx-line);background:var(--tx-surface);color:var(--tx-ink);padding:11px 12px;border-radius:14px;min-height:44px;max-width:100%}
.tx-rider-filters input[name="query"]{flex:1;min-width:210px}
.tx-rider-filters label{display:flex;gap:8px;align-items:center;font-size:12px}
.tx-rider-workspace button,.tx-explorer-dialog button,.tx-rider-viewer button,.tx-rider-return,.tx-rider-map-launch{min-height:42px;border-radius:14px;padding:10px 14px;border:1px solid var(--tx-line);background:var(--tx-raised);color:var(--tx-ink);font:700 12px var(--tx-font-ui);cursor:pointer}
.tx-rider-workspace button:hover,.tx-explorer-dialog button:hover{border-color:var(--tx-gold-500)}
.tx-rider-workspace button:disabled{opacity:.5;cursor:wait}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,.tx-nav-item:focus-visible{outline:3px solid var(--tx-gold-500);outline-offset:3px}
.tx-rider-advanced,.tx-rider-diagnostics{padding:14px;border:1px solid var(--tx-line);border-radius:14px;margin-bottom:14px}
.tx-rider-advanced summary,.tx-rider-diagnostics summary{cursor:pointer;font-size:13px;font-weight:750}
.tx-rider-advanced[open] summary{margin-bottom:14px}
.tx-rider-notice{font-size:12px;line-height:1.6;color:var(--tx-muted);margin:10px 0 18px}
.tx-rider-layout{display:grid;grid-template-columns:minmax(285px,370px) minmax(0,1fr);gap:22px;align-items:start}
.tx-rider-list{max-height:72vh;overflow:auto;overscroll-behavior:contain;padding:3px 8px 10px 3px}
.tx-rider-list .tx-rider-card{display:block;width:100%;text-align:left;margin:0 0 12px;padding:16px;border-radius:18px;background:var(--tx-surface);box-shadow:var(--tx-shadow-card);color:var(--tx-ink)}
.tx-rider-card.is-selected{border-color:var(--tx-gold-500);box-shadow:inset 3px 0 var(--tx-gold-500),var(--tx-shadow-card)}
.tx-rider-card-head,.tx-rider-stats{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px;align-items:flex-start}
.tx-rider-card-head strong{font-size:15px;line-height:1.4;flex:1;overflow-wrap:anywhere}
.tx-rider-card-head>span{white-space:nowrap;font-size:12px}
.tx-rider-stats{font-size:12px;margin-top:12px;flex-wrap:wrap}
.tx-rider-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tx-track-thumb,.tx-photo-thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;width:100%;min-width:0;min-height:0;border-radius:12px;overflow:hidden;background:#10241E;color:var(--tx-cyan);font-size:11px}
.tx-photo-thumb{color:var(--tx-muted);background:var(--tx-cream)}
.tx-photo-thumb img{width:100%;height:100%;object-fit:cover}
.tx-track-thumb svg{width:100%;height:100%}
.tx-track-empty{color:#A8AEA9;font-size:11px}
.tx-rider-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}
.tx-rider-metrics>div{padding:14px;border:1px solid var(--tx-line);border-radius:14px;background:var(--tx-surface)}
.tx-rider-metrics strong{display:block;font-size:19px;font-weight:800;line-height:1.2}.tx-rider-metrics span{display:block;font-size:11px;color:var(--tx-muted);margin-top:8px}
.tx-rider-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:15px 0}
.tx-rider-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
/* Larger media tiles in the desktop Ride Library detail only. */
.tx-rider-workspace [data-gallery].tx-rider-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tx-rider-workspace [data-gallery] .tx-media-reorderable{cursor:grab;touch-action:auto}.tx-rider-workspace [data-gallery] .tx-media-reorderable:active{cursor:grabbing}.tx-rider-workspace [data-gallery] .tx-media-dragging{opacity:.45}.tx-rider-workspace [data-gallery] .tx-media-drop-before{box-shadow:inset 5px 0 0 var(--tx-cyan)}.tx-rider-workspace [data-gallery] .tx-media-drop-after{box-shadow:inset -5px 0 0 var(--tx-cyan)}.tx-media-order-help{margin:-4px 0 10px}
.tx-rider-gallery .tx-rider-media{aspect-ratio:4/3;width:100%;height:auto;min-width:0;min-height:0;padding:0;overflow:hidden}.tx-rider-media img{display:block;width:100%;height:100%;object-fit:cover}
.tx-rider-media,.tx-photo-thumb{position:relative}
.tx-video-play-badge{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:38px;height:38px;padding-left:2px;border-radius:50%;background:#050706b8;border:1px solid #fff9;color:#fff;font-size:16px;box-shadow:0 2px 10px #0005;pointer-events:none}
.tx-rider-viewer,.tx-explorer-dialog{color:var(--tx-ink);background:var(--tx-paper);border:1px solid var(--tx-line);border-radius:20px;padding:22px;max-width:94vw;max-height:94vh}
.tx-rider-viewer::backdrop,.tx-explorer-dialog::backdrop{background:#000b}
.tx-rider-viewer>.tx-rider-actions{justify-content:flex-end;margin:0 0 14px}
.tx-rider-viewer :is(img,video){display:block;max-width:85vw;max-height:75vh;object-fit:contain;margin:auto}
.tx-rider-return,.tx-rider-map-launch{margin:10px 0 16px}
.tx-explorer-dialog{width:1300px}.tx-explorer-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px}.tx-explorer-results{max-height:65vh;overflow:auto}.tx-explorer-results>button{display:block;width:100%;text-align:left;margin:8px 0}.tx-explorer-results strong{display:block;margin-bottom:8px}
.tx-rider-map{position:relative;height:440px;min-height:300px;border-radius:18px;overflow:hidden;background:#10241E;border:1px solid var(--tx-line);isolation:isolate}
.tx-rider-map[data-library-map]:not(:fullscreen){height:880px}
.tx-rider-map:fullscreen{height:100vh;width:100vw;border-radius:0}
.tx-rider-map > .tx-map-canvas{position:absolute;inset:0;width:100%;height:100%}
.tx-library-environment{display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:12px 16px;margin-bottom:18px;border:1px solid var(--tx-gold-500);border-radius:14px;font-size:13px;color:var(--tx-ink);background:var(--tx-surface)}
.tx-library-environment a{color:var(--tx-ink);text-decoration:underline;text-underline-offset:3px}
.tx-library-environment strong{color:var(--tx-gold-500)}
.tx-staging-main{margin:0 auto;width:100%;box-sizing:border-box}
.tx-map-toolbar{position:absolute;z-index:2;left:10px;top:10px;right:55px;display:flex;flex-wrap:wrap;gap:5px;pointer-events:none}
.tx-map-toolbar button{pointer-events:auto;min-height:34px;border:1px solid #5f6d60;border-radius:12px;padding:6px 9px;background:#111512ee;color:#FFFDF8;font:700 11px var(--tx-font-ui);cursor:pointer}
.tx-map-toolbar button:disabled{opacity:.5}
.tx-map-style-panel{position:fixed;inset:auto;z-index:30;box-sizing:border-box;margin:0;padding:16px;border:1px solid #687665;border-radius:18px;background:#17251f;color:#fffdf8;box-shadow:0 12px 40px #0007;font:13px/1.4 var(--tx-font-ui);max-height:calc(100dvh - 24px);overflow:auto}
.tx-map-style-panel[hidden]{display:none}
.tx-map-style-panel>strong{font-size:15px}
.tx-map-style-panel>p{margin:12px 0 0;color:#c1ccbf;font-size:11px}
.tx-map-key{margin-top:14px;padding-top:12px;border-top:1px solid #536557}
.tx-map-key-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 14px;margin:12px 0}
.tx-map-key-item{display:flex;align-items:center;gap:10px;font-size:11px;min-height:14px}
.tx-map-key-item>.tx-grade-symbol{margin-left:6px;margin-right:7px}
.tx-map-key-item>.tx-grade-symbol.double_black{margin-left:3px;margin-right:10px}
.tx-map-key-line{display:block;position:relative;flex:none;width:26px;height:0.805px;border-radius:2px;background:#94a496;box-shadow:0 0 0 0.35px #f2f4ec}
.tx-map-key-line.fire-road{height:1.61px;background:#bb80f3}
.tx-map-key-line.selected{height:1.26px;background:#388cf4;box-shadow:0 0 0 0.35px #f2f4ec,0 0 0 0.7875px #1b3427,0 0 0 1.8375px #49e4ef}
.tx-map-key>small{display:block;color:#c1ccbf;font-size:10px;line-height:1.5}
.tx-map-style-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.tx-map-style-choices button{min-width:0;padding:5px 5px 8px;border:2px solid transparent;border-radius:11px;background:#26372d;color:#fffdf8;cursor:pointer;text-align:left;font:inherit}
.tx-map-style-choices button[aria-pressed=true]{border-color:#b9dc8d;background:#344a37}
.tx-map-style-choices button:focus-visible{outline:3px solid #00e5ff;outline-offset:2px}
.tx-map-style-choices strong,.tx-map-style-choices small{display:block;padding:0 3px}
.tx-map-style-choices strong{margin-top:7px;font-size:12px;line-height:1.3}
.tx-map-style-choices small{margin-top:4px;font-size:10px;color:#c1ccbf}
.tx-map-style-thumbnail{display:block;height:64px;overflow:hidden;border-radius:6px;background:linear-gradient(138deg,transparent 47%,#849fbc 48% 52%,transparent 53%),repeating-radial-gradient(ellipse at 20% 100%,#59814b 0 9px,#3e643b 12px 18px,#294b34 22px 28px);position:relative}
.tx-map-style-thumbnail.topo{background:linear-gradient(138deg,transparent 47%,#c7d8dd 48% 51%,transparent 52%),repeating-radial-gradient(ellipse at 20% 100%,#f7f7f2 0 9px,#cdd3c7 10px,#eef1e9 11px 18px,#f7f7f2 22px 28px)}
.tx-map-style-thumbnail.topo-detailed{background:linear-gradient(138deg,transparent 47%,#9ec7dc 48% 51%,transparent 52%),repeating-radial-gradient(ellipse at 20% 100%,#b6cda4 0 9px,#a59c79 10px,#d5dfc1 11px 18px,#b6cda4 22px 28px)}
.tx-map-style-thumbnail.satellite-contours:after{content:'';position:absolute;inset:0;background:repeating-radial-gradient(ellipse at 20% 100%,transparent 0 9px,#eee7bfaa 10px,transparent 11px 18px)}
.tx-map-message{position:absolute;bottom:40px;left:12px;max-width:min(360px,calc(100% - 24px));box-sizing:border-box;display:flex;align-items:center;gap:10px;background:#fffdf8f5;color:#24372a;border:1px solid #b7c1b8;padding:8px 10px;border-radius:10px;font-size:12px;box-shadow:0 2px 8px #0002;z-index:2}
.tx-map-message[hidden]{display:none}
.tx-map-message button{flex:none;min-width:32px;min-height:32px;border:0;border-radius:6px;background:transparent;color:inherit;font-size:20px;cursor:pointer}
.tx-map-message button:focus-visible{outline:2px solid #245d39}
.tx-rider-map .tx-map-dot{width:28px;height:28px;min-height:0;padding:0;border-radius:50%;border:2px solid white;background:#B18A4A;color:white;display:grid;place-items:center;font-size:10px;box-shadow:0 1px 6px #0008}
.tx-map-dot.history{background:#747e77}.tx-map-dot.selected{background:#00A8BE}.tx-map-dot.finish{background:#B9655A}.tx-map-dot.photo{background:#B18A4A;width:26px;height:26px}.tx-map-dot.user{background:#1677E8;width:18px;height:18px;box-shadow:0 0 0 6px #1687e844}
.tx-map-media-popup :is(.maplibregl-popup-content,.mapboxgl-popup-content){padding:5px;border:1px solid var(--tx-gold-500);border-radius:14px;background:var(--tx-surface);color:var(--tx-ink);box-shadow:0 6px 24px #0006}
.tx-map-media-preview{width:210px;max-width:55vw}
.tx-map-media-preview button{display:block;width:100%;min-height:0;padding:0;border:0;border-radius:9px;overflow:hidden;background:var(--tx-surface);color:var(--tx-ink);cursor:pointer}
.tx-map-media-frame{position:relative;display:grid;place-items:center;aspect-ratio:4/3;width:100%;overflow:hidden;background:var(--tx-cream);font-size:12px;color:var(--tx-muted)}
.tx-map-media-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tx-map-media-caption{display:block;padding:8px;font-size:11px;text-align:center}
.tx-map-media-popup:is(.maplibregl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right,.mapboxgl-popup-anchor-bottom-right) :is(.maplibregl-popup-tip,.mapboxgl-popup-tip){border-top-color:var(--tx-gold-500)}
.tx-map-media-popup:is(.maplibregl-popup-anchor-top,.mapboxgl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right,.mapboxgl-popup-anchor-top-right) :is(.maplibregl-popup-tip,.mapboxgl-popup-tip){border-bottom-color:var(--tx-gold-500)}
.tx-map-media-popup:is(.maplibregl-popup-anchor-left,.mapboxgl-popup-anchor-left) :is(.maplibregl-popup-tip,.mapboxgl-popup-tip){border-right-color:var(--tx-gold-500)}
.tx-map-media-popup:is(.maplibregl-popup-anchor-right,.mapboxgl-popup-anchor-right) :is(.maplibregl-popup-tip,.mapboxgl-popup-tip){border-left-color:var(--tx-gold-500)}
.tx-rider-empty{padding:24px;color:var(--tx-muted);line-height:1.6}
@media(max-width:1100px){.tx-rider-layout{grid-template-columns:300px minmax(0,1fr)}.tx-rider-metrics,.tx-rider-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.tx-tagline{display:none}.tx-theme-control{padding:0 8px}.tx-main{padding:22px}}
@media(max-width:800px){.tx-rider-layout,.tx-explorer-layout{grid-template-columns:1fr}.tx-rider-list{max-height:390px}.tx-rider-map{height:390px}.tx-rider-map[data-library-map]:not(:fullscreen){height:780px}.tx-rider-head{flex-wrap:wrap}.tx-shell{grid-template-columns:140px minmax(0,1fr)}.tx-topbar{padding:12px}.tx-brand-product,.txReleaseVersion{display:none}.tx-theme-control span{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.tx-rider-workspace .tx-rider-delete{color:#ef8e87;border-color:#9a4943;}

/* Native dialog keeps keyboard focus inside the Strava review flow. */
.tx-strava-dialog{width:min(720px,92vw);max-height:90vh;box-sizing:border-box;overflow:auto;padding:26px;border:1px solid var(--tx-line);border-radius:20px;background:var(--tx-paper);color:var(--tx-ink);font-family:var(--tx-font-ui);line-height:1.5}
.tx-strava-dialog::backdrop{background:#000a}
.tx-strava-dialog header,.tx-strava-dialog footer,.tx-strava-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tx-strava-dialog h2{margin:4px 0;font-size:28px;line-height:1.15}
.tx-strava-dialog button,.tx-strava-dialog input[type=date]{min-height:42px;border:1px solid var(--tx-line);border-radius:12px;padding:9px 14px;background:var(--tx-surface);color:var(--tx-ink);font:inherit}
.tx-strava-dialog button{cursor:pointer;font-weight:700}
.tx-strava-dialog button:disabled{opacity:.5;cursor:default}
.tx-strava-dialog .tx-strava-connect,.tx-strava-dialog [data-import]{background:#254537;color:#fffdf8;border-color:#315b49}
.tx-strava-dialog [hidden]{display:none!important}
.tx-strava-tools{margin:20px 0;justify-content:flex-start}
.tx-strava-tools label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tx-strava-row{display:flex;gap:14px;align-items:center;padding:16px 12px;border:1px solid var(--tx-line);border-radius:12px;margin:8px 0;background:var(--tx-surface);cursor:pointer}
.tx-strava-row input{width:20px;height:20px;flex:0 0 auto;accent-color:#315b49}
.tx-strava-row span{min-width:0;overflow-wrap:anywhere}.tx-strava-row strong,.tx-strava-row small{display:block}.tx-strava-row small{color:var(--tx-muted);margin-top:4px}
.tx-strava-dialog footer{position:sticky;bottom:-26px;padding:16px 0;background:var(--tx-paper);border-top:1px solid var(--tx-line);margin-top:18px}
.tx-strava-dialog :focus-visible{outline:3px solid var(--tx-gold-500);outline-offset:3px}
@media(max-width:520px){.tx-strava-dialog{padding:18px}.tx-strava-dialog h2{font-size:24px}.tx-strava-dialog footer{bottom:-18px}.tx-strava-dialog header{align-items:flex-start}}


/* Keep the ride map close to the top without reducing its viewing area. */
.tx-main:has(#recorded-activities.active>.tx-rider-workspace){padding-top:14px}
.tx-library-head{margin-bottom:10px;align-items:center}
.tx-library-head h1{margin:5px 0 0}
.tx-library-head>.tx-rider-actions{margin:0;gap:8px}
.tx-rider-workspace>.tx-rider-filters{margin-bottom:8px}
.tx-rider-workspace>.tx-rider-advanced{padding:10px 14px;margin-bottom:8px}
.tx-rider-workspace>[data-library-status]{margin:6px 0 10px}
.tx-rider-layout>aside>[data-library-count]{margin:0 0 10px}
.tx-track-thumb{position:relative}
.tx-thumb-attribution{position:absolute;right:2px;bottom:2px;padding:1px 3px;border-radius:2px;background:#050706bb;color:#fff;font:7px/1.3 var(--tx-font-ui);pointer-events:none}
.tx-thumb-unavailable{position:absolute;left:3px;top:3px;background:#050706bb;color:#fff;font-size:9px;padding:3px;border-radius:3px}
.tx-import-options{display:grid;gap:12px;margin:24px 0 16px}
.tx-import-options>button{text-align:left;padding:18px}
.tx-import-options strong,.tx-import-options span{display:block}
.tx-import-options strong{font-size:18px}.tx-import-options span{font-size:13px;font-weight:400;color:var(--tx-muted);margin-top:6px}

.tx-rider-error{margin:8px 0;color:#A7443A;font-size:12px;font-weight:700;line-height:1.5}
[data-theme="dark"] .tx-rider-error{color:#EF8E87}

/* Synced ride editor: edits the same owner-scoped cloud ride used by the phone app. */
.tx-ride-editor{width:min(860px,94vw);max-height:92vh;box-sizing:border-box;overflow:auto;padding:0;border:1px solid var(--tx-line);border-radius:22px;background:var(--tx-paper);color:var(--tx-ink);font-family:var(--tx-font-ui)}
.tx-ride-editor::backdrop{background:#000b}
.tx-ride-editor>header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid var(--tx-line);background:var(--tx-paper)}
.tx-ride-editor h2,.tx-ride-editor h3{margin:0}.tx-ride-editor h2{font-size:28px}.tx-ride-editor h3{font-size:20px}
.tx-ride-editor button,.tx-ride-editor input,.tx-ride-editor select,.tx-ride-editor textarea{font:inherit}
.tx-ride-editor button,.tx-ride-editor select,.tx-ride-editor input[type=text],.tx-ride-editor input:not([type]),.tx-ride-editor textarea{border:1px solid var(--tx-line);border-radius:12px;background:var(--tx-surface);color:var(--tx-ink)}
.tx-ride-editor button{min-height:42px;padding:9px 14px;cursor:pointer;font-weight:750}.tx-ride-editor button:disabled{opacity:.5;cursor:default}
.tx-ride-editor form{display:grid;gap:22px;padding:22px}
.tx-ride-editor-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:14px}
.tx-ride-editor-fields label{display:grid;gap:7px;font-size:12px;font-weight:800;color:var(--tx-muted)}
.tx-ride-editor-fields input,.tx-ride-editor-fields select,.tx-ride-editor-fields textarea{width:100%;box-sizing:border-box;padding:12px;color:var(--tx-ink)}
.tx-ride-editor-comments{grid-column:1/-1}.tx-ride-editor textarea{resize:vertical;min-height:92px}
.tx-ride-editor-geometry{display:grid;gap:14px;padding-top:4px}
.tx-ride-editor-map{height:240px;border:1px solid var(--tx-line);border-radius:16px;overflow:hidden;background:var(--tx-surface)}
.tx-ride-editor-map svg{display:block;width:100%;height:100%}.tx-ride-editor-map polyline{fill:none;stroke-linecap:round;stroke-linejoin:round}
.tx-ride-editor-raw polyline{stroke:#7D8784;stroke-width:5;opacity:.7}.tx-ride-editor-visible polyline{stroke:#00D9ED;stroke-width:6}
.tx-ride-editor-map-empty{height:100%;display:grid;place-items:center;color:var(--tx-muted);font-weight:750}
.tx-ride-editor [data-controls]{display:grid;gap:12px}.tx-ride-editor [hidden]{display:none!important}
.tx-ride-editor-control{display:grid;gap:8px;padding:12px 14px;border:1px solid var(--tx-line);border-radius:14px;background:var(--tx-surface)}
.tx-ride-editor-control>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.tx-ride-editor-control span{color:var(--tx-gold-500);font-weight:800}
.tx-ride-editor input[type=range]{width:100%;accent-color:var(--tx-gold-500)}
.tx-ride-editor-toggle{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px;border:1px solid var(--tx-line);border-radius:14px;background:var(--tx-surface)}
.tx-ride-editor-toggle span{display:grid;gap:4px}.tx-ride-editor-toggle small{color:var(--tx-muted);font-weight:400}.tx-ride-editor-toggle input{width:22px;height:22px}
.tx-ride-editor footer{position:sticky;bottom:-22px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 0 0;border-top:1px solid var(--tx-line);background:var(--tx-paper)}
.tx-ride-editor footer span{max-width:560px}.tx-ride-editor [data-save]{background:#254537;color:#fffdf8;border-color:#315b49}
.tx-ride-editor :focus-visible{outline:3px solid var(--tx-gold-500);outline-offset:3px}
@media(max-width:640px){.tx-ride-editor{width:96vw}.tx-ride-editor>header,.tx-ride-editor form{padding:16px}.tx-ride-editor-fields{grid-template-columns:1fr}.tx-ride-editor-comments{grid-column:auto}.tx-ride-editor-map{height:210px}.tx-ride-editor footer{bottom:-16px;align-items:stretch;flex-direction:column}.tx-ride-editor footer button{width:100%}}


/* Rider-first Studio information architecture. */
.tx-nav-primary{margin-bottom:14px}
.tx-nav-manage{border-top:1px solid var(--tx-line);padding-top:10px;margin-top:8px}
.tx-nav-manage>summary{list-style:none;cursor:pointer;padding:10px 12px;border-radius:12px;color:var(--tx-muted);font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.tx-nav-manage>summary::-webkit-details-marker{display:none}
.tx-nav-manage>summary::after{content:'▾';float:right;transition:transform .15s ease}
.tx-nav-manage:not([open])>summary::after{transform:rotate(-90deg)}
.tx-nav-manage>summary:hover{background:var(--tx-raised);color:var(--tx-ink)}
.tx-nav-manage .tx-nav{margin-top:4px}
.tx-nav-manage .tx-nav-item{font-size:12px;min-height:38px;padding-top:8px;padding-bottom:8px}
.tx-discover-workspace{max-width:1720px}
.tx-discover-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(310px,390px);gap:20px;align-items:start}
.tx-discover-workspace [data-discover-map]{height:760px}
.tx-discover-side{display:grid;gap:14px;max-height:760px;overflow:auto;padding-right:4px}
.tx-discover-results-head{position:sticky;top:0;z-index:2;padding:10px 0;background:var(--tx-cream)}
.tx-discover-row{display:flex!important;justify-content:space-between;align-items:flex-start;gap:12px;width:100%;text-align:left;margin:0 0 9px;padding:13px!important}
.tx-discover-row span{display:block;min-width:0}.tx-discover-row strong{display:block;font-size:13px;line-height:1.35}.tx-discover-row small{display:block;margin-top:5px;color:var(--tx-muted);font-size:10px;line-height:1.35}
.tx-discover-row em{font-style:normal;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap;padding:5px 7px;border-radius:999px;border:1px solid var(--tx-line)}
.tx-discover-row em[data-kind="public"]{color:var(--tx-gold-500)}
.tx-discover-row em[data-kind="mine"]{color:var(--tx-muted)}
.tx-discover-row.is-selected{border-color:var(--tx-cyan)!important;box-shadow:inset 3px 0 var(--tx-cyan)}
.tx-discover-detail-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.tx-discover-detail-head h2{font-size:22px;margin:6px 0}
.tx-discover-private{border:1px solid var(--tx-line);border-radius:12px;padding:10px 12px;background:var(--tx-surface)}
.tx-discover-comments{white-space:pre-wrap;line-height:1.6;color:var(--tx-ink)}
.tx-discover-gallery{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:10px}
.tx-discover-toggle{padding:0 4px}
.tx-profile-workspace{max-width:1200px}
.tx-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.tx-profile-card{padding:22px}.tx-profile-card h2{margin:7px 0 9px;font-size:22px}.tx-profile-card p{color:var(--tx-muted);line-height:1.65}
.tx-profile-signout{margin-top:20px}
@media(max-width:1050px){.tx-discover-layout{grid-template-columns:1fr}.tx-discover-side{max-height:none}.tx-discover-workspace [data-discover-map]{height:620px}.tx-profile-grid{grid-template-columns:1fr}}
@media(max-width:700px){.tx-discover-workspace [data-discover-map]{height:500px}}

/* Keep native image dragging from competing with the Library tile gesture. */
.tx-rider-workspace [data-gallery] .tx-rider-media{position:relative;user-select:none}
.tx-rider-workspace [data-gallery] .tx-rider-media img{pointer-events:none;-webkit-user-drag:none;user-select:none}
/* Above the thumbnail: an inset shadow behind an opaque image is invisible. */
.tx-rider-workspace [data-gallery] .tx-media-drop-before::after,
.tx-rider-workspace [data-gallery] .tx-media-drop-after::after{content:"";position:absolute;z-index:2;top:0;bottom:0;width:5px;background:var(--tx-cyan);box-shadow:0 0 0 1px #111;pointer-events:none}
.tx-rider-workspace [data-gallery] .tx-media-drop-before::after{left:0}
.tx-rider-workspace [data-gallery] .tx-media-drop-after::after{right:0}
.tx-rider-workspace [data-gallery][aria-busy="true"] .tx-rider-media{cursor:progress}

/* Public route and destination galleries share one viewer and control layout. */
.tx-public-photo-viewer { box-sizing: border-box; width: min(1120px,94vw); max-height: 94dvh; }
.tx-public-photo-frame { display: grid; place-items: center; width: 100%; aspect-ratio: 4/3; max-height: min(75vh,calc(94dvh - 160px)); min-height: 0; }
.tx-public-photo-frame :is(img,video) { width: 100%; height: 100%; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.tx-public-photo-viewer>.tx-public-photo-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 14px 0 0; }
.tx-public-photo-nav button:first-child { justify-self: start; }.tx-public-photo-nav button:last-child { justify-self: end; }
.tx-public-photo-nav span { color: var(--tx-muted); font-size: 13px; white-space: nowrap; }
.tx-public-photo-viewer button[aria-label="Close photo"] { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; }
@media (max-width: 540px) { .tx-public-photo-nav button { padding: 9px; font-size: 12px; } }


/* Stable plot height; Studio can opt into a compact profile without scaling text. */
.tx-public-route-elevation{min-width:0;padding:14px 12px 12px;border:1px solid var(--tx-line);border-radius:14px;background:var(--tx-surface)}
.tx-public-route-elevation header,.tx-elevation-readout{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;align-items:center}
.tx-public-route-elevation h3{margin:0;font-size:13px}.tx-public-route-elevation small{color:var(--tx-muted);font-size:10px}
.tx-public-route-elevation svg{display:block;width:100%;height:var(--tx-elevation-chart-height,210px);margin:12px 0 10px;overflow:visible}
.tx-public-route-elevation [data-elevation-chart]{position:relative;border-radius:5px;cursor:crosshair;touch-action:pan-y}
.tx-public-route-elevation [data-elevation-chart]:focus-visible{outline:2px solid var(--tx-gold-500);outline-offset:3px}
.tx-elevation-grid line{stroke:var(--tx-line);stroke-width:1;stroke-dasharray:3 4}.tx-elevation-grid text{fill:var(--tx-muted);font:12px system-ui,sans-serif;font-variant-numeric:tabular-nums}
.tx-elevation-area{fill:var(--tx-gold-500);fill-opacity:.18}.tx-elevation-line{fill:none;stroke:var(--tx-gold-500);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.tx-elevation-cursor line{stroke:var(--tx-ink);stroke-width:1;stroke-dasharray:3 3}.tx-elevation-cursor circle{fill:var(--tx-ink);stroke:var(--tx-surface);stroke-width:2}
.tx-elevation-readout{border-top:1px solid var(--tx-line);padding-top:10px}.tx-elevation-readout strong{font-size:11px;font-variant-numeric:tabular-nums}
.tx-elevation-tooltip{position:absolute;z-index:1;pointer-events:none;min-width:116px;padding:7px 9px;border:1px solid var(--tx-line);border-radius:8px;background:var(--tx-surface);color:var(--tx-ink);box-shadow:0 3px 12px #0002;font:11px/1.5 var(--tx-font-ui);font-variant-numeric:tabular-nums}
.tx-elevation-tooltip[hidden]{display:none}
.tx-elevation-tooltip>div{display:flex;justify-content:space-between;gap:12px;white-space:nowrap}.tx-elevation-tooltip span{color:var(--tx-muted)}

/* Elevation inspection is independent of photo pins and route endpoint layers. */
.tx-rider-map .tx-map-dot.inspection{width:14px;height:14px;min-width:0;min-height:0;box-sizing:border-box;border:3px solid #fffdf8;border-radius:50%;background:#282a26;box-shadow:0 0 0 2px #00e5ff,0 2px 7px #0008;z-index:5;pointer-events:none}


/* Mapbox sets inline pointer events when markers fade behind terrain. */
.tx-rider-map .tx-direction-arrow,.tx-rider-map .tx-direction-dot,.tx-rider-map .tx-map-dot.inspection{pointer-events:none!important}
.tx-mapbox .tx-direction-arrow{width:18px;height:18px;font-size:12px}
.tx-mapbox .tx-direction-dot{width:11px;height:11px;border-width:2px}

.tx-trail-community-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.tx-trail-community-gallery figure{margin:0}.tx-trail-community-gallery img{width:100%;height:140px;object-fit:cover;border-radius:8px}.tx-trail-community-gallery figcaption{font-size:12px}
