:root {
  --navy: #0b3558;
  --navy-dark: #06243d;
  --blue: #1f6fa8;
  --red: #d84b3e;
  --cream: #f7f4ed;
  --white: #ffffff;
  --ink: #142b3b;
  --muted: #60717d;
  --border: #dbe2e6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: #e9eef1;
}

button, a { font: inherit; }

.topbar {
  position: relative;
  z-index: 1000;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  color: var(--white);
  background: linear-gradient(100deg, var(--navy-dark), var(--navy));
  box-shadow: 0 4px 18px rgba(5, 34, 57, .24);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; }
.brand p { margin: 4px 0 0; color: #bcd1df; font-size: 13px; }

.rail-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
}
.rail-icon::before, .rail-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: white;
}
.rail-icon::before { left: 13px; }
.rail-icon::after { right: 13px; }
.rail-icon i { width: 19px; height: 2px; display: block; background: white; }

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 999px;
  color: #d7e5ee;
  font-size: 13px;
}
.header-status span { width: 8px; height: 8px; background: #6ed3a7; border-radius: 50%; box-shadow: 0 0 0 4px rgba(110,211,167,.14); }

main { position: relative; height: calc(100vh - 78px); }
#map { position: absolute; inset: 0; background: #dce5e9; }

.map-intro {
  position: absolute;
  z-index: 700;
  top: 22px;
  left: 22px;
  width: 330px;
  padding: 22px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(11,53,88,.14);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(6,36,61,.18);
  backdrop-filter: blur(8px);
}
.kicker { margin: 0 0 7px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.map-intro h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.map-intro > p:not(.kicker) { margin: 10px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.map-intro button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  color: white;
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.map-intro button:hover { background: var(--blue); transform: translateY(-1px); }

.map-key {
  position: absolute;
  z-index: 700;
  right: 18px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(11,53,88,.13);
  border-radius: 8px;
  box-shadow: 0 7px 22px rgba(6,36,61,.12);
  color: var(--muted);
  font-size: 13px;
}
.key-marker { width: 13px; height: 13px; display: block; background: var(--red); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 2px var(--red); }

.station-marker {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--red);
  border: 3px solid white;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 5px 14px rgba(39,44,48,.34);
  transform: rotate(-45deg);
}
.station-marker::before { content: ""; width: 10px; height: 10px; border: 3px solid white; border-radius: 50%; }
.station-marker::after { content: ""; position: absolute; inset: -8px; border: 2px solid rgba(216,75,62,.45); border-radius: 50%; animation: mapPulse 2s infinite; }

@keyframes mapPulse { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 13px; box-shadow: 0 18px 50px rgba(6,36,61,.25); }
.leaflet-popup-content { width: 390px !important; margin: 0; }
.leaflet-popup-tip { box-shadow: 4px 4px 8px rgba(6,36,61,.11); }
.leaflet-popup-close-button { z-index: 3; top: 10px !important; right: 10px !important; width: 30px !important; height: 30px !important; display: grid !important; place-items: center; color: white !important; background: rgba(6,36,61,.46) !important; border-radius: 50%; font-size: 21px !important; line-height: 1 !important; }

.station-card { background: white; }
.station-card > * { padding-left: 22px; padding-right: 22px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 21px; }
.station-type { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.data-status { display: flex; align-items: center; gap: 6px; color: #35755c; font-size: 12px; font-weight: 700; }
.data-status i { width: 7px; height: 7px; background: #45a076; border-radius: 50%; }
.station-card h2 { margin: 8px 0 2px; font-size: 27px; color: var(--navy-dark); letter-spacing: -.025em; }
.railway-line { display: flex; align-items: center; gap: 7px; margin: 0; padding-bottom: 17px; color: var(--muted); font-size: 13px; }
.railway-line span { color: var(--red); font-weight: 800; }

.station-data { margin: 0; border-top: 1px solid var(--border); }
.station-data div { display: grid; grid-template-columns: 135px 1fr; gap: 11px; padding: 10px 22px; border-bottom: 1px solid var(--border); }
.station-data dt { color: var(--muted); font-size: 12px; font-weight: 650; }
.station-data dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }

.popup-services { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.popup-services h3 { margin: 0 0 10px; color: var(--navy-dark); font-size: 14px; }
.popup-service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.popup-service-grid span, .identity-service-list span { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; }
.popup-service-grid b, .identity-service-list b { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; color: white; background: #287451; border-radius: 7px; font-size: 10px; }
.popup-service-grid .is-unavailable b, .identity-service-list .is-unavailable b { background: #a33c33; }

.source-block { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; padding-bottom: 15px; background: var(--cream); }
.source-block p { margin: 0; }
.source-block p span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.source-block strong { display: block; margin-top: 2px; color: var(--navy); font-size: 13px; }
.source-block a { color: var(--red); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.source-block a:hover { text-decoration: underline; }

.popup-actions { padding-top: 13px; padding-bottom: 13px; border-top: 1px solid var(--border); }
.detail-link { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; color: white; background: var(--navy); border-radius: 8px; font-size: 14px; font-weight: 800; text-decoration: none; }
.detail-link:hover { background: var(--blue); }

.leaflet-control-zoom { margin-right: 18px !important; margin-top: 18px !important; border: 0 !important; box-shadow: 0 5px 18px rgba(6,36,61,.18) !important; }
.leaflet-control-zoom a { color: var(--navy) !important; border-color: var(--border) !important; }
.leaflet-control-attribution { color: #53646f; font-size: 12px; }

noscript { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 25px; background: white; font-size: 17px; }

/* Érd részletes épületadatlap */
body.detail-page { min-height: 100%; overflow: auto; background: #eef2f4; }
.detail-topbar { position: sticky; top: 0; }
.brand-link { color: inherit; text-decoration: none; }
.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: white; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; font-size: 14px; font-weight: 750; text-decoration: none; }
.back-link:hover { background: rgba(255,255,255,.1); }

.detail-main { width: min(1180px, calc(100% - 40px)); height: auto; margin: 0 auto; padding: 42px 0 30px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 28px; align-items: end; padding: 22px 0 38px; }
.hero-copy h2 { margin: 8px 0 18px; color: var(--navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 76px); font-weight: 500; line-height: .96; letter-spacing: -.045em; }
.hero-copy h2 span { color: var(--blue); }
.hero-lead { max-width: 720px; margin: 0; color: #405867; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions a { display: inline-flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 8px; font-size: 14px; font-weight: 800; text-decoration: none; }
.primary-action { color: white; background: var(--navy); }
.primary-action:hover { background: var(--blue); }
.secondary-action { color: var(--navy); background: white; border: 1px solid #cbd6dc; }
.secondary-action:hover { border-color: var(--blue); }

.identity-card { overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 38px rgba(6,36,61,.1); }
.identity-status { display: flex; align-items: center; gap: 9px; padding: 15px 18px; color: #356b55; background: #e9f4ef; font-size: 13px; font-weight: 800; }
.identity-status span { width: 8px; height: 8px; background: #45a076; border-radius: 50%; }
.identity-card dl { margin: 0; }
.identity-card dl div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--border); }
.identity-card dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.identity-card dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.45; }
.identity-services { padding: 17px 18px 18px; border-top: 1px solid var(--border); background: #f7fafb; }
.identity-services h3 { margin: 0 0 12px; color: var(--navy-dark); font-size: 15px; }
.identity-service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }

.section-nav { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 28px; padding: 8px; background: white; border: 1px solid var(--border); border-radius: 10px; scrollbar-width: thin; }
.section-nav a { flex: 0 0 auto; padding: 8px 11px; color: var(--muted); border-radius: 6px; font-size: 14px; font-weight: 750; text-decoration: none; }
.section-nav a:hover { color: var(--navy); background: var(--cream); }

.model-section { margin-bottom: 28px; padding: 28px; background: white; border: 1px solid var(--border); border-radius: 14px; scroll-margin-top: 100px; }
.model-heading { display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: 30px; align-items: end; margin-bottom: 22px; }
.model-heading h3 { margin: 0; color: var(--navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.model-heading > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.model-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1px; overflow: hidden; background: #21435a; border-radius: 12px; }
.model-stage { position: relative; min-height: 560px; overflow: hidden; background: radial-gradient(circle at 50% 42%, #315c72 0%, #17384d 46%, #092638 100%); }
.model-stage::before { content: ""; position: absolute; z-index: 0; right: 0; bottom: 0; left: 0; height: 48%; opacity: .35; background-image: linear-gradient(rgba(140,190,214,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(140,190,214,.16) 1px, transparent 1px); background-size: 34px 34px; transform: perspective(320px) rotateX(58deg) scale(1.5); transform-origin: bottom center; pointer-events: none; }
model-viewer { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.model-badge { position: absolute; z-index: 5; top: 16px; left: 16px; padding: 8px 11px; color: #d4e6ef; background: rgba(5,27,40,.72); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 12px; font-weight: 800; backdrop-filter: blur(8px); }
.model-badge.is-ready { color: #c8f0dd; }
.model-badge.is-loading { color: #f3dca7; }
.model-badge.is-error { color: #ffd0ca; }
.model-empty { position: absolute; z-index: 4; top: 50%; left: 50%; width: min(520px, calc(100% - 36px)); padding: 30px; color: white; text-align: center; background: rgba(5,27,40,.8); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.24); backdrop-filter: blur(10px); transform: translate(-50%, -50%); }
.model-empty[hidden] { display: none; }
.model-empty .kicker { color: #82c4e5; }
.model-empty h4 { margin: 8px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; letter-spacing: -.02em; }
.model-empty > p:not(.kicker) { margin: 0 auto 20px; color: #c7d9e2; font-size: 15px; line-height: 1.6; }
.model-file-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; color: var(--navy-dark); background: white; border-radius: 8px; font-size: 14px; font-weight: 850; cursor: pointer; }
.model-file-button:hover { background: #dcebf2; }
.model-file-button:focus-within { outline: 3px solid #7fc8e8; outline-offset: 3px; }
.model-empty small { display: block; margin-top: 12px; color: #9fb7c4; font-size: 12px; line-height: 1.5; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.model-progress { position: absolute; z-index: 6; right: 16px; bottom: 16px; left: 16px; height: 4px; overflow: hidden; background: rgba(255,255,255,.16); border-radius: 999px; }
.model-progress span { display: block; width: 0; height: 100%; background: #7fc8e8; border-radius: inherit; transition: width .18s ease; }
.model-controls { position: absolute; z-index: 6; right: 16px; bottom: 16px; left: 16px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.model-controls[hidden] { display: none; }
.model-controls button, .ar-button { padding: 10px 12px; color: white; background: rgba(5,27,40,.78); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 14px; font-weight: 750; cursor: pointer; pointer-events: auto; backdrop-filter: blur(8px); }
.model-controls button:hover, .ar-button:hover { background: rgba(24,75,103,.94); }
.model-controls button:last-child { margin-left: auto; }
.ar-button { position: absolute; right: 16px; top: 16px; }
.model-meta { display: flex; flex-direction: column; color: white; background: var(--navy-dark); }
.model-meta > div { padding: 19px 20px; border-bottom: 1px solid rgba(255,255,255,.11); }
.model-meta > div:last-child { border-bottom: 0; }
.model-meta span { display: block; margin-bottom: 5px; color: #81badc; font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.model-meta strong { display: block; font-size: 17px; line-height: 1.35; }
.model-meta p { margin: 7px 0 0; color: #b9cad5; font-size: 13px; line-height: 1.5; }
.model-meta .model-tip { margin-top: auto; background: #103b57; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.article-column { overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 14px; }
.content-section { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 22px; padding: 34px 36px 38px; scroll-margin-top: 100px; }
.content-section + .content-section { border-top: 1px solid var(--border); }
.section-number { margin: 3px 0 0; color: var(--red); font-size: 13px; font-weight: 850; letter-spacing: .08em; }
.content-section h3, .source-panel h3 { margin: 0 0 16px; color: var(--navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; letter-spacing: -.025em; }
.content-section p { margin: 0 0 16px; color: #40545f; font-size: 16px; line-height: 1.72; }
.content-section p:last-child { margin-bottom: 0; }
.content-section strong { color: var(--ink); }
.fact-note { margin-top: 22px; padding: 18px 19px; background: #f8f3e8; border-left: 4px solid #c9973b; }
.fact-note strong { display: block; margin-bottom: 6px; font-size: 14px; }
.fact-note p { margin: 0; font-size: 14px; line-height: 1.6; }

.timeline { position: relative; margin: 8px 0 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 8px; left: 82px; width: 1px; background: #cdd8de; }
.timeline li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 28px; padding: 0 0 23px; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: 78px; width: 9px; height: 9px; background: var(--red); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px var(--red); }
.timeline time { color: var(--navy); font-size: 13px; font-weight: 850; line-height: 1.45; }
.timeline p { margin: 0; font-size: 15px; line-height: 1.58; }

.feature-list { margin: 24px 0 0; padding: 0; border-top: 1px solid var(--border); list-style: none; }
.feature-list li { display: grid; grid-template-columns: 120px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.feature-list span { color: var(--muted); font-size: 13px; font-weight: 750; }
.feature-list strong { font-size: 14px; line-height: 1.45; }

.current-data { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin-top: 22px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; }
.current-data div { padding: 16px; background: #f9fbfc; }
.current-data span, .current-data strong { display: block; }
.current-data span { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.current-data strong { font-size: 14px; line-height: 1.5; }
.services-title { margin: 25px 0 12px; color: var(--navy-dark); font-size: 18px; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.service-card { display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 12px; background: #f9fbfc; border: 1px solid var(--border); border-radius: 9px; }
.service-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 9px; font-size: 12px; font-weight: 900; letter-spacing: -.02em; }
.service-icon-lift { font-size: 22px; }
.service-card div { min-width: 0; }
.service-card strong, .service-card div span { display: block; }
.service-card strong { color: var(--ink); font-size: 14px; line-height: 1.35; }
.service-card div span { margin-top: 4px; font-size: 13px; font-weight: 750; }
.service-card.is-available div span { color: #287451; }
.service-card.is-available .service-icon { background: #287451; }
.service-card.is-unavailable div span { color: #a33c33; }
.service-card.is-unavailable .service-icon { background: #a33c33; }
.service-card.is-unknown div span { color: #6b5e42; }
.service-card.is-unknown .service-icon { color: #4e432e; background: #e6d7ad; }
.services-note { margin: 13px 0 0 !important; color: var(--muted) !important; font-size: 13px !important; line-height: 1.55 !important; }
.services-note a { color: var(--navy); font-weight: 750; }

.credit-table { overflow: hidden; margin: 22px 0; border: 1px solid var(--border); border-radius: 10px; }
.credit-table > div { display: grid; grid-template-columns: 116px minmax(140px, .8fr) 1.2fr; gap: 15px; padding: 12px 14px; border-top: 1px solid var(--border); }
.credit-table > div:first-child { border-top: 0; }
.credit-table .credit-head { color: var(--muted); background: #f2f6f8; font-size: 12px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.credit-table time, .credit-table strong, .credit-table div > span { font-size: 13px; line-height: 1.5; }
.credit-table time { color: var(--muted); font-weight: 750; }
.credit-table div > span { color: #4e626e; }
.inline-source { display: inline-flex; align-items: center; gap: 9px; color: var(--red); font-size: 14px; font-weight: 850; text-decoration: none; }
.inline-source:hover { text-decoration: underline; }

.source-column { position: sticky; top: 106px; scroll-margin-top: 100px; }
.source-panel { padding: 24px; background: var(--navy-dark); border-radius: 14px; box-shadow: 0 14px 38px rgba(6,36,61,.14); }
.source-panel .kicker { color: #81badc; }
.source-panel h3 { color: white; font-size: 27px; }
.source-panel ol { margin: 0; padding: 0; list-style: none; counter-reset: sources; }
.source-panel li { counter-increment: sources; border-top: 1px solid rgba(255,255,255,.13); }
.source-panel li a { position: relative; display: block; padding: 13px 0 13px 30px; color: white; text-decoration: none; }
.source-panel li a::before { content: counter(sources, decimal-leading-zero); position: absolute; top: 15px; left: 0; color: #77add0; font-size: 12px; font-weight: 850; }
.source-panel li a::after { content: "↗"; position: absolute; top: 13px; right: 0; color: #77add0; }
.source-panel li a:hover strong { text-decoration: underline; }
.source-panel li strong { display: block; padding-right: 20px; font-size: 14px; }
.source-panel li span { display: block; margin-top: 4px; padding-right: 10px; color: #b9cad5; font-size: 12px; line-height: 1.5; }
.source-date { margin: 17px 0 0; color: #8fa7b6; font-size: 12px; line-height: 1.5; }

.detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0 4px; color: var(--muted); font-size: 13px; }
.detail-footer p { margin: 0; }
.detail-footer a { color: var(--navy); font-weight: 800; text-decoration: none; }
.detail-footer a:hover { text-decoration: underline; }

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 14px; }
  .brand { gap: 10px; }
  .brand h1 { font-size: 16px; }
  .brand p { font-size: 12px; }
  .rail-icon { width: 38px; height: 38px; }
  .header-status { display: none; }
  main { height: calc(100vh - 68px); }
  .map-intro { top: 12px; left: 12px; width: calc(100% - 24px); padding: 15px; }
  .map-intro h2 { font-size: 21px; }
  .map-intro > p:not(.kicker) { margin: 7px 0 12px; font-size: 13px; }
  .map-intro button { padding: 9px 11px; }
  .leaflet-top.leaflet-right { top: auto; bottom: 62px; }
  .leaflet-control-zoom { margin-top: 0 !important; margin-right: 12px !important; }
  .leaflet-popup-content { width: min(330px, calc(100vw - 34px)) !important; }
  .station-card > * { padding-left: 16px; padding-right: 16px; }
  .station-data div { grid-template-columns: 112px 1fr; padding: 9px 16px; }
  .popup-service-grid { grid-template-columns: 1fr; }
  .source-block { align-items: flex-start; flex-direction: column; }
  .map-key { display: none; }

  .detail-topbar { height: 68px; }
  .detail-topbar .brand p { display: none; }
  .back-link { padding: 8px 9px; font-size: 13px; }
  .back-link span + * { display: none; }
  .detail-main { width: min(100% - 24px, 1180px); padding-top: 24px; }
  .detail-hero { grid-template-columns: 1fr; gap: 23px; padding: 13px 0 28px; }
  .hero-copy h2 { margin-bottom: 14px; font-size: clamp(40px, 13vw, 60px); }
  .hero-lead { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions a { justify-content: space-between; }
  .model-section { padding: 18px; }
  .model-heading { grid-template-columns: 1fr; gap: 8px; }
  .model-heading h3 { font-size: 29px; }
  .model-layout { grid-template-columns: 1fr; }
  .model-stage { min-height: 440px; }
  .model-empty { padding: 23px 18px; }
  .model-empty h4 { font-size: 25px; }
  .model-controls { overflow-x: auto; flex-wrap: nowrap; }
  .model-controls button { flex: 0 0 auto; }
  .model-controls button:last-child { margin-left: 0; }
  .model-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .model-meta > div { border-right: 1px solid rgba(255,255,255,.11); }
  .model-meta .model-tip { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .content-section { grid-template-columns: 1fr; gap: 8px; padding: 26px 20px 30px; }
  .content-section h3 { font-size: 27px; }
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 5px; padding: 0 0 21px 28px; }
  .timeline li::before { left: 2px; }
  .timeline time { font-size: 13px; }
  .current-data { grid-template-columns: 1fr; }
  .identity-service-list { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .credit-table > div { grid-template-columns: 1fr; gap: 3px; }
  .credit-table .credit-head { display: none; }
  .credit-table > div { padding: 13px 14px; }
  .source-column { position: static; }
  .detail-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .station-marker::after { animation: none; }
}

.model-downloads { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 24px 0 0; }
.model-downloads > div { flex: 1 1 230px; }
.model-downloads h4 { margin: 0 0 5px; font-size: 19px; }
.model-downloads p { margin: 0; color: var(--muted); font-size: 14px; }
.model-downloads a, .model-downloads button, .local-model-picker button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 750; }
.locked-download { border: 0; cursor: pointer; }
.locked-download.secondary-action { border: 1px solid #cbd6dc; }
.access-dialog { width: min(500px, calc(100% - 28px)); padding: 0; color: var(--ink); background: white; border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(6,36,61,.32); }
.access-dialog::backdrop { background: rgba(6,24,37,.62); backdrop-filter: blur(3px); }
.access-dialog form { position: relative; padding: 28px; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; color: var(--muted); background: #edf2f4; border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; }
.dialog-lock { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 17px; color: white; background: var(--navy); border-radius: 12px; font-size: 22px; }
.access-dialog h4 { margin: 0 36px 12px 0; color: var(--navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; line-height: 1.15; }
.access-dialog > form > p:not(.kicker):not(.data-origin-note) { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.dialog-confirm { width: 100%; padding: 12px 16px; border: 0; border-radius: 8px; font-weight: 800; cursor: pointer; }
.model-disclaimer p { color: #40545f; }
.local-model-picker { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.local-model-picker summary { cursor: pointer; color: var(--navy); font-size: 15px; font-weight: 750; }
.local-model-picker p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.local-model-picker .model-file-button { background: #eaf1f5; margin: 0 8px 8px 0; }
.local-model-picker button { cursor: pointer; }
.model-file-button { border: 0; }
.model-file-button[hidden] { display: none; }
.model-badge { max-width: calc(100% - 32px); font-size: 14px; border-radius: 8px; overflow-wrap: anywhere; }
.model-meta p, .model-meta span { font-size: 14px; }
.model-meta strong { overflow-wrap: anywhere; }
.model-stage:fullscreen { width: 100%; height: 100%; min-height: 100%; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #d88237; outline-offset: 4px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.archive-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; }
.archive-grid img { display: block; width: 100%; height: 200px; object-fit: contain; background: #e9eef1; }
.archive-grid figcaption { padding: 14px; }
.archive-grid figcaption strong, .archive-grid figcaption span { display: block; }
.archive-grid figcaption span { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.archive-grid figcaption a { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--navy); }
.archive-section { margin-top: 28px; }
.archive-license { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 20px 0 0; }
.archive-license a { color: var(--navy); }
.data-origin-note { margin: 18px 0; padding: 14px 16px; color: var(--navy); background: #edf3f7; border-left: 3px solid var(--blue); border-radius: 4px; font-size: 16px; line-height: 1.6; }
.map-intro > .data-origin-note { margin: 16px 0 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
@media (max-width: 680px) {
  .archive-grid { grid-template-columns: 1fr; }
  .model-downloads { align-items: stretch; }
  .model-downloads a, .model-downloads button { justify-content: center; flex: 1 1 auto; }
  .detail-topbar .brand h1 { max-width: 155px; }
}
