.diorama { margin-top: 34px; scroll-margin-top: 70px; }
.diorama-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.diorama-heading p { margin-top: 4px; color: var(--muted); }
.diorama-heading a { flex: none; color: var(--red); text-underline-offset: 3px; font-weight: 700; font-size: .875rem; }
.diorama-exhibit { position: relative; overflow: hidden; border: var(--rule); background: #fff; }
.diorama-toolbar { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; gap: 5px; padding: 4px; border: var(--rule); background: #fff; }
.diorama-toolbar button, .diorama-close { border: 0; background: transparent; color: var(--red); padding: 6px 9px; font-size: .875rem; font-weight: 670; min-height: 38px; }
.diorama-toolbar button:disabled { opacity: .43; cursor: default; }
.diorama-toolbar button:hover:enabled, .diorama-close:hover { background: var(--wash); }
.diorama-view { position: relative; height: clamp(400px, 52vw, 565px); background: #83c6ce; overflow: hidden; }
.diorama-view canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.diorama-view canvas.is-dragging { cursor: grabbing; }
.diorama-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 15px; text-align: center; color: var(--ink); }
.diorama-noscript { background: var(--wash); }
.diorama-compass { position: absolute; bottom: 14px; left: 14px; display: grid; justify-items: center; gap: 3px; width: 44px; padding: 5px 0 6px; border: var(--rule); background: #fff; color: var(--ink); font-size: .8rem; font-weight: 750; pointer-events: none; }
.diorama-compass span { width: 13px; height: 17px; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 50% 69%, 0 100%); transform: rotate(var(--north)); }
.diorama-marker { display: grid; place-items: center; position: absolute; z-index: 1; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.diorama-marker span { width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1pt var(--red); }
.diorama-marker[aria-pressed="true"] span, .diorama-marker:hover span, .diorama-marker:focus-visible span { background: #fff; box-shadow: 0 0 0 2pt var(--red); }
.diorama-marker:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.diorama-selection:has(> :not([hidden])) { border-top: var(--rule); padding: 13px 16px; }
.diorama-prompt { margin: 0; color: var(--muted); font-size: .875rem; }
.diorama-selection article { display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 12px; align-items: start; }
.diorama-selection img { height: 100px; width: 100%; object-fit: cover; }
.diorama-selection figcaption { margin-top: 2px; color: var(--muted); font-size: .69rem; }
.diorama-card-text h3 { font-size: clamp(1rem, 2.75vw, 1.25rem); }
.diorama-card-text .station { margin-top: 4px; }
.diorama-card-meta { margin-top: 2px; font-size: .875rem; color: var(--muted); }
.diorama-detail-link { display: inline-block; margin-top: 6px; background: var(--red); color: white; padding: 6px 12px; font-size: .875rem; font-weight: 700; text-decoration: none; }
.diorama-detail-link:hover { background: var(--red-hover); }
.diorama-credit { margin: 8px 0 0; }
#area-list-heading { scroll-margin-top: 72px; }
@media (max-width: 600px) {
  .diorama { margin-top: 26px; }
  .diorama-heading { flex-wrap: wrap; align-items: start; gap: 6px; }
  .diorama-heading p { font-size: .9375rem; }
  .diorama-view { height: clamp(305px, 88vw, 400px); }
  .diorama-toolbar { top: 8px; right: 8px; }
  .diorama-toolbar button { padding-inline: 7px; }
  .diorama-selection:has(> :not([hidden])) { padding: 10px; }
  .diorama-selection article { grid-template-columns: 85px minmax(0,1fr); gap: 8px; }
  .diorama-selection figure { margin-top: 3px; }
  .diorama-selection img { height: 82px; }
  .diorama-close { grid-column: 2; justify-self: start; margin-top: -3px; }
}

.city-map { margin-top: 30px; scroll-margin-top: 68px; }
.city-head, .city-filters { display: flex; gap: 16px; justify-content: space-between; align-items: end; }
.city-head a, .city-info a { color: var(--red); text-underline-offset: 3px; }
.city-filters { justify-content: flex-start; margin: 14px 0; }
.city-filters label { display: grid; gap: 3px; font-weight: 650; font-size: .875rem; max-width: 100%; }
.city-filters select { width: 100%; min-width: 0; min-height: 44px; padding: 6px 32px 6px 10px; font: inherit; border: var(--rule); background-color: white; color: var(--ink); }
.city-stage { background: #e4e7db; position: relative; overflow: hidden; height: clamp(340px,48vw,540px); border: var(--rule); }
.city-stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.city-stage canvas.dragging { cursor: grabbing; }
.city-tools,.city-key,.city-north { position: absolute; background: #fffffff5; border: var(--rule); }
.city-tools { top: 10px; right: 10px; display: flex; }
.city-tools button { font: inherit; font-size: .875rem; font-weight: 650; color: var(--ink); background: white; border: 0; min-width: 40px; min-height: 40px; padding-inline: 8px; }
.city-tools button + button { border-left: var(--rule); }
.city-tools button:disabled { color: #999; }
.city-key { display: flex; flex-wrap: wrap; gap: 10px; bottom: 9px; left: 9px; padding: 4px 8px; font-size:.8rem; pointer-events:none; }
.city-key span:before { content:""; height:9px;width:9px;background:#ae293a;border-radius:50%;display:inline-block;margin-right:4px; }
.city-key span+span:before { background:#205864;border-radius:1px; }
.city-north { left:10px;top:10px;padding:4px 7px;font-size:.73rem;text-align:center;pointer-events:none; }
.city-north i { display:block;width:11px;height:15px;background:#444;clip-path:polygon(50% 0,100% 100%,50% 74%,0 100%);transform:rotate(var(--north,0deg)); }
.city-hint { margin:0; padding:10px 2px; color:var(--muted); font-size:.9rem; }
.city-info article { display:flex; align-items:center; flex-wrap:wrap; gap:18px; padding:14px 0; border-bottom:var(--rule); }
.city-info article>div { flex:1 1 230px; }
.city-info figure { width:min(220px,100%); margin:0; }
.city-info img {width:100%;height:126px;object-fit:cover;display:block;}
.city-info figcaption,.city-attribution {font-size:.8rem;color:var(--muted);}
.city-info h3 {font-size:1.28rem;color:var(--ink);margin:2px 0 6px;}
.city-kind,.city-address {font-size:.875rem;color:var(--muted);}
.city-info article>div>a {display:inline-block;margin-top:6px;font-weight:700;}
.city-attribution {margin:7px 0;}
.legacy-model { padding-block:16px;border-bottom:var(--rule); }
.legacy-model summary {color:var(--red);cursor:pointer;}
.legacy-model .diorama {width:100%;margin-top:12px;}
.area-other {display:flex;flex-wrap:wrap;gap:8px 18px;}
@media(max-width:600px){
.city-filters {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:8px;}
.city-head {align-items:center;}
.city-head h2 {font-size:1.35rem;}
.city-head a {white-space:nowrap;font-size:.875rem;}
.city-info article {gap:10px;}
.city-info figure {width:min(100%,260px);}
}

.city-modes {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0;}
.city-modes button {min-height:40px;padding:6px 14px;border:var(--rule);background:white;color:var(--ink);font:inherit;font-size:.875rem;font-weight:650;cursor:pointer;}
.city-modes button[aria-pressed="true"] {background:#243446;color:white;border-color:#243446;}
.city-modes button:focus-visible {outline:2px solid var(--red);outline-offset:2px;}
.city-night .city-stage {background:#141c29;}
.city-night :is(.city-key,.city-north,.city-tools,.city-tools button) {background:#202d3d;color:#f3f1ef;border-color:#65707b;}
.city-night .city-north i {background:#f8ddb7;}
.city-night .city-key span:before {background:#ff8590;}
.city-night .city-key span+span:before {background:#94e3dc;}
.city-stations {position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.city-stations span {position:absolute;display:flex;align-items:center;gap:4px;white-space:nowrap;color:#173753;font:650 13px/18px system-ui,sans-serif;}
.city-stations b {background:#fffffff0;padding:0 3px;border-radius:2px;}
.city-stations i {width:16px;height:18px;display:grid;place-items:center;border-radius:4px;background:#234964;color:white;border:1px solid white;font:0/1 sans-serif;}
.city-stations i::after {content:"";width:12px;height:13px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath fill-rule='evenodd' d='M4 1h8q2 0 2 2v9q0 2-2 2l2 3h-2l-1-2H5l-1 2H2l2-3q-2 0-2-2V3q0-2 2-2Zm0 3v5h8V4Zm1 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z'/%3E%3C/svg%3E") center/contain no-repeat;}
.city-stations .reverse {flex-direction:row-reverse;}
.city-stations .icon-only b {display:none;}
.city-stations .nearest b {outline:1px solid currentColor;}
.city-night .city-stations b {color:#deefff;background:#1c3449f5;}
.city-night .city-stations i {background:#c8e7ff;color:#17334b;}
.city-tools,.city-north,.city-key {z-index:1;}
