:root {
  color-scheme: dark;
  --night: #101c1f;
  --paper: #efdfb8;
  --paper-light: #f8eccf;
  --ink: #17282a;
  --amber: #edb55c;
  --mint: #8fbfb1;
  --muted: #a7b7ad;
  --scrollbar-thumb: #708f87;
  --scrollbar-track: #152d2e;
  font-family: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border: 2px solid var(--scrollbar-track); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--mint); }
*::-webkit-scrollbar-thumb:active { background: var(--paper); }
@media (forced-colors: active) { * { scrollbar-color: auto; } }
body { margin: 0; min-height: 100svh; background: var(--night); color: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 500; background: var(--paper); color: var(--ink); padding: 14px 20px; }
.skip-link:focus { top: 12px; }
.page { width: min(100%, 1800px); margin: 0 auto; padding: 25px clamp(16px, 2.5vw, 44px) 17px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 55px; margin-bottom: 19px; }
.wordmark { display: inline-block; color: var(--paper-light); text-decoration: none; font: 700 18px/1.1 Arial, Helvetica, sans-serif; letter-spacing: 3px; }
.wordmark span { font-weight: 400; color: var(--mint); }
.signal-line { margin: 9px 0 0; color: var(--mint); font: 9px/1.4 Arial, Helvetica, sans-serif; letter-spacing: 2.6px; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; gap: 27px; }
.top-nav button { min-height: 44px; padding: 0; color: var(--paper); border: 0; background: none; font: 12px/1.3 Arial, Helvetica, sans-serif; }
.top-nav button:hover { color: var(--amber); }
.top-nav span { display: inline-block; margin-left: 6px; color: var(--mint); }
.stage { position: relative; width: 100%; }
.scene { position: relative; isolation: isolate; aspect-ratio: 2168 / 725; overflow: hidden; background: #183538; border: 1px solid #b3c3a72b; box-shadow: 0 18px 60px #0003; }
.backdrop, .skyline-foreground { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.backdrop { z-index: 0; }
.skyline-foreground { z-index: 20; clip-path: polygon(0 59%,100% 59%,100% 100%,0 100%); }
.scene-object { position: absolute; margin: 0; padding: 0; border: 0; color: inherit; background: none; isolation: isolate; overflow: visible; }
.scene-object::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 100%; height: 100%; min-width: 44px; min-height: 44px; border-radius: 9px; }
.scene-object:focus-visible { outline: 2px dashed var(--paper-light); outline-offset: 5px; border-radius: 7px; }
.object-art { position: absolute; display: block; max-width: none; object-fit: fill; pointer-events: none; user-select: none; }
.node-zero { z-index: 10; }
.node-art { mask: none; -webkit-mask: none; }
.streetcar { z-index: 30; transform-origin: 50% 100%; will-change: transform, opacity; }
.streetcar::after { min-height: 0; }
.streetcar-art { inset: 0; width: 100%; height: 100%; filter: none; }
/* The clear artwork stays present throughout the journey. This resident haze
   copy has one fixed filter; only its opacity changes as the car approaches.
   Avoid changing blur/filter parameters on a scaled sprite every frame. */
.streetcar-haze { filter: blur(.9px) contrast(.94) saturate(.9); opacity: var(--streetcar-haze, 1); will-change: opacity; }
.streetcar-route {
  position: absolute;
  z-index: 251;
  top: 4%;
  right: 3%;
  width: min(340px,calc(100% - 24px));
  max-height: min(280px,calc(100dvh - 24px));
  margin: 0;
  padding: 10px 14px 11px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 2px solid #152224;
  border-radius: 8px 8px 8px 4px;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 5px 6px 0 #07191e70;
  cursor: auto;
}
.route-ticket-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; }
.route-ticket-kicker { margin: 0; padding-left: 7px; border-left: 2px solid #b69455; color: #647a63; font: 700 9px/1.3 Arial,Helvetica,sans-serif; letter-spacing: 1.3px; text-transform: uppercase; }
.route-ticket-title { margin: 1px 0 7px; color: var(--ink); font: 400 21px/1.15 Georgia,'Times New Roman',serif; }
.route-stops { position: relative; display: grid; margin: 0; }
.route-stops::before { content: ''; position: absolute; left: 3px; top: 16px; bottom: 16px; width: 1px; background: #aa925e99; pointer-events: none; }
.route-stop { position: relative; display: block; min-height: 56px; padding: 7px 5px 8px 16px; border-top: 1px solid #958e6645; color: var(--ink); text-decoration: none; }
.route-stop::before { content: ''; position: absolute; left: 0; top: 14px; width: 7px; height: 7px; border: 1px solid #7d826d; border-radius: 50%; background: var(--paper-light); }
.route-stop:last-child::before { border-color: #a38147; background: #e3c580; }
.route-stop-name { display: flex; align-items: center; justify-content: space-between; gap: 9px; font: 400 17px/1.2 Georgia,'Times New Roman',serif; }
.route-stop-name > span { color: #8d7040; font: 18px/1 Arial,Helvetica,sans-serif; }
.route-stop-description { display: block; margin-top: 2px; color: #52615a; font: 11px/1.35 Arial,Helvetica,sans-serif; }
.route-stop:hover { background: #e9dab6; }
.route-stop:active { background: #dfc897; }
.route-stop:focus-visible { outline: 2px solid #377c73; outline-offset: -2px; border-radius: 2px; }
.route-bell-status { min-height: 12px; margin: 3px 0 0; color: #756443; font: 10px/1.3 Arial,Helvetica,sans-serif; }
.platform-group { position: absolute; z-index: 45; pointer-events: none; }
.platform-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.platform-group .scene-object { pointer-events: auto; }
.streetcar-stop { z-index: 46; }
.streetlamp { z-index: 50; }
.newspaper-stand { z-index: 60; }
.tunafish { z-index: 70; }
.truth-teller { z-index: 71; }
.pothole { z-index: 73; }
.blink { z-index: 80; }
.blink-surface { position: absolute; display: block; pointer-events: none; }
.blink-art, .blink-glow { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.blink-art { z-index: 1; }
.blink-glow { top: -2.15%; z-index: 2; opacity: .88; }
.blink:focus-visible { outline: none; }
.blink:focus-visible::after { inset: 8% 15% 5%; width: auto; height: auto; transform: none; border: 2px dashed var(--paper-light); border-radius: 45% 45% 15% 15%; }
.object-tag { position: absolute; left: 50%; bottom: 100%; z-index: 100; transform: translate(-50%,-8px); padding: 7px 10px; border: 1px solid #cfbf8970; border-radius: 4px; background: #10282bf0; color: var(--paper-light); font: 11px/1.3 Arial, Helvetica, sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.scene-object:hover .object-tag, .scene-object:focus-visible .object-tag { opacity: 1; }
.porch-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 1px 0; }
.invitation { margin: 0; font-size: clamp(15px,1.25vw,19px); font-style: italic; color: #d2d5bf; }
.control-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.control { min-height: 44px; padding: 10px 15px; border: 1px solid #a3b3a644; border-radius: 5px; color: #cfdbce; background: #15272a; font: 11px/1.25 Arial, Helvetica, sans-serif; }
.control:hover { border-color: #c4c6a080; background: #1d3235; }
.control.primary { border-color: #edb55c80; background: var(--paper); color: var(--ink); font-weight: 700; }
.control.primary:hover { background: #ffe3ac; }
.control span { padding-left: 8px; color: var(--mint); }
.control[aria-pressed='false'] { color: #91a49c; }
.find-panel { margin-top: 16px; padding: 18px 0 5px; border-top: 1px solid #adbfaa26; }
.eyebrow { margin: 0; font: 700 10px/1.4 Arial, Helvetica, sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.find-panel .eyebrow { color: var(--mint); margin-bottom: 10px; }
.find-list { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.find-list button { min-height: 44px; padding: 6px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--paper); font: 13px/1.4 Georgia, serif; }
.find-list button:hover { border-bottom-color: var(--amber); color: var(--amber); }
.footer { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 23px 0 0; color: #718f84; font: 10px/1.4 Arial, Helvetica, sans-serif; letter-spacing: .2px; }
.signal-dot { width: 4px; height: 4px; border-radius: 50%; background: #b39a62; }
.speech, .scene-note { position: absolute; z-index: 200; color: var(--ink); background: var(--paper-light); border: 2px solid #152224; box-shadow: 5px 6px 0 #07191e70; }
.speech { left: 53%; top: 22%; width: 35%; max-width: 490px; border-radius: 24px 24px 24px 5px; padding: 15px 21px 17px; }
.speech::before { content: ''; position: absolute; left: -39px; bottom: 34px; width: 40px; height: 27px; background: #152224; clip-path: polygon(100% 0,100% 100%,0 100%); }
.speech::after { content: ''; position: absolute; left: -33px; bottom: 36px; width: 35px; height: 22px; background: var(--paper-light); clip-path: polygon(100% 0,100% 100%,0 100%); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.speaker { color: #815223; }
.close-button { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: none; font: 26px/1 Arial, Helvetica, sans-serif; }
.close-button:hover { background: #ceb57e35; }
.speech button:focus-visible, .speech input:focus-visible, .scene-note button:focus-visible, .newsstand-dialog button:focus-visible { outline-color: #377c73; }
.reply { margin: 4px 0 16px; font-size: clamp(17px,1.45vw,23px); line-height: 1.43; }
.last-message { max-height: 3em; margin: 4px 0 12px; overflow-y: auto; overflow-wrap: anywhere; padding-left: 8px; border-left: 2px solid #bda570; color: #6b6654; font: 12px/1.45 Arial, Helvetica, sans-serif; }
.suggestions { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; }
.suggestions button { min-height: 44px; padding: 8px 10px; border: 1px solid #b29b6c65; border-radius: 20px; color: #514529; background: #ead9b6; font: 11px/1.3 Arial, Helvetica, sans-serif; }
.suggestions button:hover { background: #dfc797; }
.chat-form { display: flex; align-items: stretch; gap: 6px; }
.chat-form input { min-width: 0; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #9c8e6c; border-radius: 6px; background: #fff9ea; color: var(--ink); font: 16px/1.4 Arial, Helvetica, sans-serif; }
.chat-form input::placeholder { color: #7a735f; }
.send-button { min-width: 55px; min-height: 44px; padding: 9px 12px; border: 1px solid #173b3b; border-radius: 6px; color: #fff1d2; background: #204647; font: 700 11px/1.3 Arial, Helvetica, sans-serif; }
.send-button:hover { background: #2b5a58; }
.chat-status { min-height: 13px; margin: 7px 0 0; color: #756443; font: 10px/1.35 Arial, Helvetica, sans-serif; }
.fineprint { margin: 5px 0 0; color: #7d735a; font: 10px/1.4 Arial, Helvetica, sans-serif; }
.scene-note { right: 3%; top: 4%; width: min(350px,38%); border-radius: 12px; padding: 10px 16px 17px; }
.scene-note .eyebrow { color: #647a63; }
.scene-note p { margin: 2px 0 0; font-size: 17px; line-height: 1.45; }
.noscript-note { padding: 12px 0; color: var(--muted); text-align: center; font-size: 15px; }
.newsstand-dialog { width: min(940px,calc(100% - 40px)); max-width: none; max-height: 90svh; padding: 0; border: 1px solid #9b956d; border-radius: 9px; color: var(--ink); background: var(--paper-light); box-shadow: 0 30px 100px #0008; }
.newsstand-dialog::backdrop { background: #061113cc; backdrop-filter: blur(4px); }
.newsstand-shell { padding: clamp(20px,3.5vw,38px); }
.newsstand-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 21px; border-bottom: 1px solid #958e6645; }
.newsstand-top .eyebrow { color: #737756; margin-bottom: 9px; }
.newsstand-top h2 { margin: 0; font-size: clamp(22px,3vw,33px); font-weight: 400; line-height: 1.2; }
.newsstand-top .close-button { margin: -8px -10px 0 0; }
.shelf-empty { text-align: center; padding: 40px 16px 32px; }
.empty-rule { display: block; width: 42px; height: 2px; margin: 0 auto 24px; background: #a58d52; }
.shelf-empty h3 { margin: 0 0 12px; font-weight: 400; font-size: clamp(22px,2.6vw,29px); }
.shelf-empty p { margin: 0 0 26px; color: #697264; font-size: 16px; line-height: 1.5; }
.paper-button { min-height: 44px; padding: 11px 16px; border: 1px solid #9c956e75; border-radius: 5px; color: var(--ink); background: #ecdbb5; font: 12px/1.3 Arial, Helvetica, sans-serif; }
.paper-button:hover:not(:disabled) { background: #dec899; }
.paper-button span { margin-left: 10px; }
.shelf-status { margin: 0; color: #73765e; font: 12px/1.45 Arial, Helvetica, sans-serif; }
.issue-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 25px; }
.issue-grid:not(:empty) { padding-top: 25px; }
.issue-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 44px; padding: 0 0 16px; border: 0; border-bottom: 1px solid #a0956766; color: var(--ink); background: none; text-align: left; }
.issue-card img { display: block; width: 100%; max-height: 330px; object-fit: contain; object-position: left; }
.issue-card strong { font: 400 20px/1.25 Georgia,serif; }
.issue-card span { color: #67715f; font: 12px/1.5 Arial,Helvetica,sans-serif; }
.reader-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 17px 0; }
.reader-tools p { margin: 0; font-size: 15px; }
.reader-page { margin: 0; text-align: center; }
.reader-page img { display: block; width: 100%; max-height: 72svh; object-fit: contain; }
.reader-page figcaption { color: #815b3d; font: 13px/1.5 Arial,Helvetica,sans-serif; }
.reader-navigation { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.reader-navigation p { margin: 0; font: 12px/1.4 Arial,Helvetica,sans-serif; text-align: center; }
.dialog-open { overflow: hidden; }
@media (min-width: 1800px) { .speech { top: 27%; } }
@media (min-width: 701px) and (max-width: 1100px) {
  .speech { left: auto; right: 3%; top: 8%; width: 45%; padding: 10px 16px 14px; }
  .reply { font-size: 17px; margin-bottom: 10px; }
  .suggestions button { min-height: 44px; }
  .porch-controls { align-items: flex-start; }
  .control-buttons { justify-content: flex-end; }
}
@media (max-width: 700px) {
  .page { padding: 17px 0 18px; }
  .masthead { gap: 12px; margin-bottom: 16px; padding: 0 18px; }
  .wordmark { font-size: 14px; letter-spacing: 2px; }
  .signal-line { max-width: 180px; font-size: 8px; letter-spacing: 1.4px; }
  .top-nav { gap: 12px; }
  .top-nav button { font-size: 10px; }
  .top-nav button[data-action='talk'] { display: none; }
  .top-nav span { margin-left: 2px; }
  .scene { border-left: 0; border-right: 0; box-shadow: none; }
  .object-tag { display: none; }
  .speech, .scene-note { position: relative; left: auto; right: auto; top: auto; width: calc(100% - 32px); max-width: none; margin: 19px 16px 0; border-radius: 16px; padding: 14px 17px 18px; }
  .speech::before { left: 38%; top: -22px; bottom: auto; width: 30px; height: 23px; clip-path: polygon(0 100%,100% 100%,20% 0); }
  .speech::after { left: calc(38% + 4px); top: -16px; bottom: auto; width: 22px; height: 17px; clip-path: polygon(0 100%,100% 100%,20% 0); }
  .reply { font-size: 20px; }
  .scene-note p { font-size: 17px; }
  .suggestions button { font-size: 11px; }
  .fineprint { font-size: 11px; }
  .porch-controls { flex-direction: column; align-items: center; gap: 17px; padding: 22px 15px 0; }
  .invitation { font-size: 17px; text-align: center; }
  .control-buttons { justify-content: center; gap: 7px; }
  .control { padding: 10px 11px; font-size: 10px; }
  .find-panel { margin: 20px 18px 0; }
  .find-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 20px; }
  .find-list button { text-align: left; }
  .footer { margin-top: 22px; }
  .newsstand-dialog { width: calc(100% - 22px); max-height: 92svh; }
  .newsstand-shell { padding: 20px; }
  .newsstand-top h2 { font-size: 23px; }
  .shelf-empty { padding: 33px 0 19px; }
  .shelf-empty h3 { font-size: 23px; }
  .reader-navigation { gap: 8px; }
  .reader-navigation .paper-button { padding: 10px; font-size: 11px; }
  .reader-navigation p { font-size: 10px; }
}
@media (max-width: 700px), (hover: none), (pointer: coarse) {
  .streetcar .object-tag { display: block; opacity: .94; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .object-tag { transition: none; }
}
@media (forced-colors: active) {
  .streetcar-route { border-color: CanvasText; color: CanvasText; background: Canvas; box-shadow: none; }
  .route-ticket-kicker, .route-stop, .route-stop-description, .route-stop-name > span, .route-bell-status { color: CanvasText; }
  .route-stop:focus-visible { outline-color: Highlight; }
}
