.demo-page { --accent: var(--teal); background: var(--surface); color: var(--ink); }
.demo-main { max-width: var(--layout-max); margin: auto; padding: var(--section-tight) var(--page-pad) var(--section-y); }
.demo-main, .demo-main * { box-sizing: border-box; }
.demo-main h1,.demo-main h2,.demo-main h3,.demo-main p,.demo-main dl,.demo-main dd,.demo-main dt { margin: 0; }
.demo-intro { padding-bottom: clamp(32px,4vw,56px); }
.demo-kicker { color: var(--accent); display: flex; align-items: center; gap: 13px; font-size: 14px; font-weight: 600; }
.demo-kicker span { border: 1px solid #ced9d6; border-radius: 3px; color: #56615f; padding: 2px 6px; font-size: 12px; font-weight: 400; }
.demo-intro h1 { font-size: var(--display-lg); font-weight: 500; line-height: 1.16; letter-spacing: -.01em; margin: 20px 0 16px; }
.demo-intro>p:last-child,.demo-judgment p { color: var(--muted); font-size: var(--read-size); line-height: var(--read-leading); }
.demo-board { border: 1px solid #ced5d3; border-radius: 7px; overflow: hidden; }
.demo-toolbar,.demo-summary,.demo-itinerary { padding: 20px clamp(16px,2.3vw,32px); }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.demo-toolbar h2,.demo-judgment h2 { font-weight: 600; font-size: 24px; letter-spacing: -.04em; }
.demo-replay { padding: 20px clamp(16px,2.3vw,32px); border-bottom: 1px solid var(--line); background: #f2f7f3; }
.demo-replay h3 { margin-bottom: 12px; }
.demo-replay #demo-step-note { margin-top: 12px; color: var(--muted); line-height: var(--read-leading,1.7); }
.demo-stops time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.demo-buttons,.demo-tabs { display: inline-flex; align-items: center; gap: 4px; }
.demo-main button { cursor: pointer; font: inherit; transition: background-color var(--ui-motion), border-color var(--ui-motion), color var(--ui-motion); }
.demo-buttons button:not([aria-pressed=true]):is(:hover,:focus-visible),.demo-tabs button:not([aria-pressed=true]):is(:hover,:focus-visible) { background: #eef2ef; color: #19231e; }
.demo-main button:focus-visible { outline: 3px solid #17a199; outline-offset: 2px; }
.demo-buttons { border: 1px solid var(--line); border-radius: 6px; padding: 3px; }
.demo-buttons button,.demo-tabs button { padding: 7px 14px; border: 0; border-radius: 3px; background: transparent; color: #465254; font-size: 14px; line-height: 1.4; }
.demo-buttons button[aria-pressed=true] { background: #192b2b; color: #fff; }
.demo-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.demo-stat { display: flex; flex-wrap: wrap; gap: 3px 8px; align-content: flex-start; align-items: baseline; border-right: 1px solid var(--line); padding-right: 6px; padding-left: clamp(0px,1.3vw,20px); }
.demo-stat:first-child { padding-left: 0; }
.demo-stat:last-child { border: 0; }
.demo-stat small { display: block; width: 100%; color: var(--muted); font-size: 13px; }
.demo-stat b { font-size: clamp(23px,3.2vw,42px); line-height: 1.3; letter-spacing: -.04em; font-weight: 550; font-variant-numeric: tabular-nums; }
.demo-stat span { font-size: 13px; }
.demo-body { display: grid; grid-template-columns: 1.67fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo-map-wrap { display: grid; position: relative; background: #f0f3ee; min-height: 295px; overflow: hidden; }
#demo-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-main .map-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid #bcc8c4; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 14px; }
.demo-main .map-tool[hidden] { display: none; }
.map-tool:is(:hover,:focus-visible) { background: #eef4f0; border-color: #7e9d91; }
.map-tool svg { width: 16px; height: 16px; }
#demo-map-open { position: absolute; top: 12px; right: 12px; }
html:has(.demo-map-dialog[open]) { overflow: hidden; }
.demo-map-dialog { position: fixed; inset: 0; width: min(1040px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #b6c3bd; border-radius: 6px; background: var(--surface); color: var(--ink); }
.demo-map-dialog::backdrop { background: rgb(20 32 28 / .68); }
.demo-map-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(14px,3vw,28px); }
.demo-map-dialog header p { color: var(--muted); font-size: 12px; }
.demo-map-dialog h2 { font-size: 22px; line-height: 1.3; font-weight: 500; }
.large-map-stage { position: relative; height: clamp(200px,55vh,530px); border-block: 1px solid var(--line); }
#demo-large-map,#demo-stations { position: absolute; inset: 0; width: 100%; height: 100%; }
.station-pin { position: absolute; transform: translate(-50%,-50%); width: 64px; height: 44px; border: 0; border-radius: 3px; background: transparent; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.station-pin::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; background: #253d36; box-shadow: 0 0 0 1px #667a71; }
.station-pin span { position: absolute; left: 50%; bottom: calc(50% + 8px); transform: translateX(-50%); border-radius: 3px; padding: 1px 4px; white-space: nowrap; background: var(--surface); font-size: 13px; line-height: 1.5; }
.station-pin.label-below span { bottom: auto; top: calc(50% + 8px); }
.station-pin[aria-pressed=true]::before { background: var(--teal); box-shadow: 0 0 0 3px #7eb6a5; }
.station-pin[aria-pressed=true] span { background: #19534a; color: white; }
.large-map-detail { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px clamp(14px,3vw,28px); }
.large-map-detail p { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--muted); }
.large-map-detail p+p { margin-top: 4px; }
.large-map-detail time { color: var(--ink); font-family: var(--font-mono); }
.station-vehicle { color: #176e67; }
.station-vehicle.vehicle-2 { color: #885024; }
.demo-legend { display: flex; align-items: center; gap: 18px; position: absolute; bottom: 12px; left: 15px; font-size: 12px; background: #fffffff0; padding: 5px 9px; border: 1px solid #dadfdc; border-radius: 3px; }
.demo-legend span { display: flex; align-items: center; gap: 6px; }
.demo-legend i { width: 19px; height: 3px; background: #176e67; }
.demo-legend span:nth-child(2) i { background: #a06732; }
.demo-legend small { font-size: 11px; color: #65716f; }
.demo-evidence { border-left: 1px solid var(--line); padding: clamp(17px,2vw,29px); }
.demo-main h3 { font-size: 17px; font-weight: 600; line-height: 1.5; }
.demo-tabs { margin: 13px 0 16px; gap: 8px; }
.demo-tabs button { padding: 4px 9px; border: 1px solid var(--line); }
.demo-tabs button[aria-pressed=true] { background: #e6f2ed; color: #165950; border-color: #a7c8be; }
#demo-evidence small { display: block; color: var(--muted); font-size: 12px; }
#demo-evidence p { line-height: 1.7; font-size: 14px; }
#demo-evidence .demo-record { margin: 4px 0 15px; }
.demo-itinerary h3 { margin-bottom: 13px; }
.demo-route { padding: 10px 0; display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: baseline; border-top: 1px solid var(--line); }
.demo-route b { font-weight: 600; font-size: 14px; color: #176e67; }
.demo-route:nth-child(2) b { color: #885024; }
.demo-stops { display: flex; align-items: baseline; gap: 4px 9px; flex-wrap: wrap; }
.demo-stops time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 5px; font-size: 13px; }
.demo-stops span { font-size: 14px; }
.demo-stops i { font-style: normal; color: #788481; }
.demo-judgment { border-bottom: 1px solid var(--line); padding: 32px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.demo-judgment p { margin-top: 5px; font-size: 15px; }
.demo-confirm { min-width: 146px; text-align: center; }
.demo-confirm button { padding: 10px 23px; border-radius: 5px; background: #121614; border: 1px solid #121614; color: white; }
.demo-confirm button:is(:hover,:focus-visible) { background: #2a302d; }
.demo-confirm p { font-size: 12px; line-height: 1.7; color: #5a6561; }
@media(max-width: 740px) {
  .demo-map-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .large-map-stage { height: clamp(176px,48dvh,380px); }
  .demo-body { grid-template-columns: 1fr; }
  .demo-map-wrap { height: clamp(220px,57vw,320px); min-height: 0; }
  .demo-evidence { border-left: 0; border-top: 1px solid var(--line); }
  .demo-toolbar h2,.demo-judgment h2 { font-size: 20px; }
  .demo-judgment { align-items: flex-start; flex-wrap: wrap; }
  .demo-route { grid-template-columns: 48px 1fr; gap: 8px; }
  .demo-buttons button { padding: 6px 10px; }
}
@media(max-width:400px) { .demo-summary,.demo-toolbar,.demo-itinerary {padding-left:12px;padding-right:12px;} .demo-stat small {font-size:12px;} .demo-stat {gap: 0 3px;} }
