/* Shared city library, isolated inside each browsing/selection shadow root. */
.city-atlas-page { margin:0; background:var(--site-bg); }
#city-atlas-panel { position:fixed; inset:0; width:100%; max-width:none; height:var(--site-layout-height, 100dvh); max-height:none; margin:0; padding:0; border:0; border-radius:0; background:var(--site-bg); -webkit-backdrop-filter:var(--material-background-blur,none); backdrop-filter:var(--material-background-blur,none); box-shadow:none; overscroll-behavior:contain; }
#city-atlas-panel::backdrop { background:transparent; }
.cityrail-city-surface { box-sizing:border-box; min-height:var(--site-layout-height, 100dvh); color-scheme:light; font:16px/1.5 -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Helvetica Neue",sans-serif; color:var(--site-text); background:var(--site-bg); text-align:left; }
.cityrail-city-surface[data-appearance="dark"] { color-scheme:dark; }
.cityrail-city-surface * { box-sizing:border-box; }
.cityrail-city-surface a { color:var(--site-blue); text-decoration:none; }
.cityrail-city-surface button,.cityrail-city-surface input { font:inherit; }
.cityrail-city-surface button { cursor:pointer; touch-action:manipulation; }
.cityrail-city-surface :is(a,button,input):focus-visible { outline:3px solid #0071e3; outline-offset:4px; }
.cityrail-city-surface .atlas-nav { position:sticky; top:0; z-index:2; min-height:68px; padding:12px max(28px,calc((100% - 1120px)/2)); display:flex; align-items:center; justify-content:space-between; gap:16px; background:var(--site-glass); backdrop-filter:blur(24px) saturate(160%); }
.cityrail-city-surface .atlas-brand { font-size:19px; font-weight:600; letter-spacing:-.4px; white-space:nowrap; }
.cityrail-city-surface .atlas-return { display:flex; align-items:center; gap:16px; min-height:44px; padding:0 4px; background:transparent; border:0; box-shadow:none; color:var(--site-muted); font-size:13px; }
.cityrail-city-surface .atlas-return span { display:grid; place-items:center; width:30px; height:30px; background:var(--site-fill); border-radius:50%; font-size:22px; }
.cityrail-city-surface .atlas-main { max-width:1120px; margin:auto; padding:0 28px; }
.cityrail-city-surface .atlas-hero { text-align:center; padding:60px 0 38px; }
.cityrail-city-surface :is(h1,h2,h3) { color:var(--site-text); }
.cityrail-city-surface h1 { margin:0; font-size:clamp(38px,5vw,62px); font-weight:600; letter-spacing:-.045em; line-height:1.16; }
.cityrail-city-surface h1 span { color:var(--site-muted); }
.cityrail-city-surface .atlas-intro { margin:22px 0 18px; font-size:17px; line-height:1.7; color:var(--site-muted); }
.cityrail-city-surface .atlas-intro strong { color:var(--site-text); font-weight:600; }
.cityrail-city-surface .atlas-explore { display:inline-flex; gap:10px; align-items:center; min-height:44px; font-size:15px; }
.cityrail-city-surface .atlas-featured { position:relative; display:grid; grid-template-columns:1fr 1.7fr; align-items:center; min-height:330px; background:var(--site-surface); border-radius:28px; overflow:hidden; box-shadow:0 4px 22px #00000004; }
.cityrail-city-surface .atlas-feature-copy { padding:35px 0 35px 48px; }
.cityrail-city-surface .atlas-badge { color:var(--site-muted); font-size:13px; }
.cityrail-city-surface .atlas-feature-copy h2 { font-size:38px; letter-spacing:-1px; line-height:1.2; margin:12px 0 14px; font-weight:600; }
.cityrail-city-surface .atlas-feature-copy p { font-size:22px; font-weight:500; line-height:1.5; margin:0 0 16px; }
.cityrail-city-surface .atlas-feature-open { display:inline-flex; align-items:center; gap:12px; min-height:44px; border:0; box-shadow:none; background:transparent; color:var(--site-blue); font-size:14px; padding:0; }
.cityrail-city-surface .atlas-feature-map { min-width:0; padding:28px 28px 22px 20px; }
.cityrail-city-surface #featured-network { aspect-ratio:1800/1320; }
.cityrail-city-surface .atlas-map-credit { margin:12px 0 0; color:var(--site-muted); font-size:11px; line-height:1.6; text-align:right; }
.cityrail-city-surface .atlas-map-credit a { color:inherit; text-underline-offset:3px; }
@media (hover: hover) and (pointer: fine) {
.cityrail-city-surface .atlas-map-credit a:hover { text-decoration:underline; }
}
.cityrail-city-surface .city-visual,.cityrail-city-surface .city-network-svg { height:100%; width:100%; display:block; }
.cityrail-city-surface .city-visual { background:none; border:0; box-shadow:none; aspect-ratio:auto; }
.cityrail-city-surface .city-network-district { fill:var(--site-fill); stroke:var(--site-border); stroke-width:.5; }
.cityrail-city-surface .city-network-line { fill:none; stroke-width:.9; stroke-linecap:round; stroke-linejoin:round; filter:none; vector-effect:none; }
.cityrail-city-surface #city-library { padding-top:64px; scroll-margin-top:88px; }
.cityrail-city-surface .library-head { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.cityrail-city-surface .library-head h2 { font-size:30px; line-height:1.3; font-weight:600; letter-spacing:-1px; margin:0 0 8px; }
.cityrail-city-surface .library-head p { font-size:15px; color:var(--site-muted); margin:0; }
.cityrail-city-surface .atlas-search { display:flex; align-items:center; gap:9px; background:var(--site-fill); border-radius:12px; padding:0 14px; min-height:46px; color:var(--site-muted); }
.cityrail-city-surface .atlas-search svg { width:19px; height:19px; flex-shrink:0; }
.cityrail-city-surface .atlas-search input { width:225px; min-width:0; padding:11px 0; border:0; border-radius:0; background:transparent; color:var(--site-text); box-shadow:none; font-size:14px; }
.cityrail-city-surface .atlas-search input::placeholder { color:var(--site-muted); }
.cityrail-city-surface .library-meta { display:flex; justify-content:space-between; gap:14px; font-size:12px; color:var(--site-muted); margin:28px 0 18px; }
.cityrail-city-surface .city-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.cityrail-city-surface .city-card { display:block; text-align:left; color:var(--site-text); background:var(--site-surface); border:0; border-radius:22px; padding:0; overflow:hidden; box-shadow:0 3px 14px #00000004; transition:transform 180ms ease-out; }
.cityrail-city-surface .city-card:active { transform:scale(.975); transition-duration:80ms; }
.cityrail-city-surface .city-card .city-visual { height:165px; padding:12px 14px 0; }
.cityrail-city-surface .city-card-foot { padding:14px 22px 22px; display:flex; align-items:center; justify-content:space-between; }
.cityrail-city-surface .city-card h3 { margin:0 0 3px; font-size:21px; font-weight:600; line-height:1.4; }
.cityrail-city-surface .city-card small { font-size:12px; color:var(--site-muted); }
.cityrail-city-surface .atlas-card-more { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--site-fill); color:var(--site-muted); font-size:21px; }
.cityrail-city-surface #empty-state { text-align:center; padding:60px 0; color:var(--site-muted); }
.cityrail-city-surface .atlas-footer { padding:40px 0 30px; font-size:11px; color:var(--site-muted); }
.cityrail-city-surface .atlas-footer p { margin:8px 0 0; }
.cityrail-city-surface .atlas-detail { margin:auto; color:var(--site-text); background:var(--material-panel,var(--site-surface)); -webkit-backdrop-filter:var(--material-blur,none); backdrop-filter:var(--material-blur,none); border:0; border-radius:28px; width:min(720px,calc(100% - 32px)); max-height:calc(100% - 32px); padding:38px; box-shadow:0 28px 100px #0003; }
.cityrail-city-surface .atlas-detail::backdrop { background:var(--site-backdrop); backdrop-filter:blur(8px); }
.cityrail-city-surface .atlas-detail h2 { font-size:36px; margin:0; line-height:1.3; }
.cityrail-city-surface #detail-close { position:absolute; top:15px; right:15px; width:44px; height:44px; border:0; border-radius:50%; box-shadow:none; background:var(--site-fill); color:var(--site-muted); font-size:26px; }
.cityrail-city-surface #detail-network { height:350px; }
.cityrail-city-surface .atlas-detail-note { color:var(--site-muted); line-height:1.7; font-size:14px; }
.cityrail-city-surface .atlas-play-link { display:inline-block; min-height:44px; padding:12px 22px; border:0; border-radius:24px; background:#0071e3; color:white; box-shadow:none; font-size:14px; }
@media(hover:hover) and (pointer:fine) { .cityrail-city-surface .city-card:hover { transform:translateY(-3px); } }
@media(max-width:900px) {
  .cityrail-city-surface .city-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cityrail-city-surface .atlas-feature-copy { padding-left:32px; }
  .cityrail-city-surface .library-head { align-items:start; flex-direction:column; }
}
@media(max-width:600px) {
  .cityrail-city-surface .atlas-nav { padding:10px 20px; }
  .cityrail-city-surface .atlas-brand { font-size:17px; }
  .cityrail-city-surface .atlas-main { padding:0 20px; }
  .cityrail-city-surface .atlas-hero { padding:36px 0 28px; }
  .cityrail-city-surface .atlas-intro { font-size:14px; }
  .cityrail-city-surface .atlas-featured { grid-template-columns:1fr; border-radius:24px; }
  .cityrail-city-surface .atlas-feature-copy { padding:26px 26px 0; }
  .cityrail-city-surface .atlas-feature-copy h2 { font-size:30px; }
  .cityrail-city-surface .atlas-feature-copy p { font-size:18px; }
  .cityrail-city-surface .atlas-feature-copy p br { display:none; }
  .cityrail-city-surface .atlas-feature-map { padding:18px 18px 22px; }
  .cityrail-city-surface .atlas-map-credit { text-align:left; font-size:10px; }
  .cityrail-city-surface #city-library { padding-top:38px; }
  .cityrail-city-surface .library-head h2 { font-size:22px; }
  .cityrail-city-surface .atlas-search { width:100%; }
  .cityrail-city-surface .atlas-search input { width:100%; min-height:44px; font-size:16px; }
  .cityrail-city-surface .city-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .cityrail-city-surface .city-card { border-radius:18px; }
  .cityrail-city-surface .city-card .city-visual { height:125px; padding:8px 7px 0; }
  .cityrail-city-surface .city-card-foot { padding:10px 16px 18px; }
  .cityrail-city-surface .city-card h3 { font-size:19px; }
  .cityrail-city-surface .atlas-detail { padding:24px 16px; border-radius:20px; }
  .cityrail-city-surface .atlas-detail h2 {font-size:26px;padding-right:44px;}
  .cityrail-city-surface #detail-network { height:240px; }
}
@media(prefers-reduced-motion:reduce) { .cityrail-city-surface .city-card { transition:none; transform:none; } }
@media(prefers-reduced-transparency:reduce) { .cityrail-city-surface .atlas-nav { background:var(--site-surface); backdrop-filter:none; } #city-atlas-panel::backdrop,.cityrail-city-surface .atlas-detail::backdrop { backdrop-filter:none; } }
@media(prefers-contrast:more) { .cityrail-city-surface .city-card { border:1px solid var(--site-muted); } .cityrail-city-surface .atlas-nav { background:var(--site-surface); } }
/* Explicit SVG palettes follow the shared theme; route hues remain unchanged. */
.cityrail-city-surface .city-visual.atlas-map-paper { overflow:hidden; border-radius:16px; background:#f7f8fa; border:1px solid color-mix(in srgb,var(--site-border) 55%,transparent); }
.cityrail-city-surface .atlas-map-image { display:block; width:100%; height:100%; object-fit:contain; }
.cityrail-city-surface[data-appearance="dark"] .atlas-map-paper { background:#202329; border-color:#ffffff0c; }
.cityrail-city-surface .city-card .atlas-map-paper { width:calc(100% - 24px); height:145px; margin:12px 12px 0; padding:0; border-radius:12px; }
.cityrail-city-surface .atlas-detail-map { width:min(1080px,calc(100% - 32px)); }
.cityrail-city-surface .atlas-detail-map #detail-network { height:auto; margin-top:22px; }
.cityrail-city-surface .atlas-detail-map .atlas-map-image { height:auto; max-height:calc(var(--site-layout-height, 100dvh) * .65); object-fit:contain; }
.cityrail-city-surface .city-visual:not(.atlas-map-paper) .city-network-line { stroke-width:3; }
@media(max-width:600px) {
  .cityrail-city-surface .city-card .atlas-map-paper { width:calc(100% - 16px); height:117px; margin:8px 8px 0; border-radius:10px; }
  .cityrail-city-surface .atlas-detail-map { padding:24px 18px; }
}

.cityrail-city-picker { min-height:var(--site-layout-height, 100dvh); max-width:1120px; margin:auto; padding:36px 28px; }
.cityrail-city-picker #city-library { padding-top:0; }
.cityrail-city-picker .library-head { flex-direction:row; align-items:center; }
.cityrail-city-picker .atlas-search { flex:1; max-width:520px; }
.cityrail-city-picker .atlas-search input { width:100%; min-height:44px; font-size:16px; }
@media(max-width:600px) { .cityrail-city-picker { padding:16px; } }
