:root {
    color-scheme: dark;
    --bg: #0a0a0b;
    --panel: #0f1115;
    --ink: rgba(255, 255, 255, 0.94);
    --ink-soft: rgba(255, 255, 255, 0.72);
    --muted: rgba(255, 255, 255, 0.46);
    --faint: rgba(255, 255, 255, 0.18);
    --hairline: rgba(148, 163, 184, 0.18);
    --field: rgba(22, 27, 34, 0.78);
    --amber: #f59e0b;
    --route-color: #f59e0b;
    --route-soft: rgba(245, 166, 35, 0.18);
    --danger: #f06f5f;
    --success: #10b981;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html,
body,
.window-shell {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "ss01", "cv11";
}

.window-shell {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
}

.control-panel {
    position: relative;
    z-index: 20;
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    gap: 20px;
    padding: 28px 26px;
    border-right: 1px solid var(--hairline);
    background:
        radial-gradient(circle at 24% 0%, rgba(245, 158, 11, 0.075), transparent 32%),
        linear-gradient(180deg, rgba(15, 17, 21, 0.985), rgba(10, 10, 11, 0.985));
    overflow: auto;
}

.map-panel {
    position: relative;
    min-width: 0;
    height: 100%;
    background: var(--bg);
}

#window-map {
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.top-bar,
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.12), rgba(255, 255, 255, 0.02));
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    content: "";
}

.brand-mark::before {
    top: 14px;
    left: 7px;
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: var(--amber);
    transform: rotate(-42deg);
}

.brand-mark::after {
    right: 7px;
    bottom: 7px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
}

.brand-link strong,
.brand-link small {
    display: block;
    line-height: 1.1;
}

.brand-link strong {
    font-size: 15px;
    font-weight: 760;
}

.brand-link small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
    font-weight: 560;
}

.intro {
    display: grid;
    gap: 8px;
    padding: 5px 0 0;
}

.intro p,
.intro h1 {
    margin: 0;
}

.intro p {
    color: rgba(245, 158, 11, 0.78);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 680;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.intro h1 {
    max-width: 300px;
    color: var(--ink);
    font-size: 34px;
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.025em;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 28px;
    padding: 0 11px;
    border: 0.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    font: inherit;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.lookup-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 8px;
    align-items: stretch;
}

.lookup-form label {
    display: block;
    min-width: 0;
    height: 48px;
}

input,
.date-display-button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--hairline);
    border-radius: 4px;
    outline: none;
    background: var(--field);
    color: var(--ink);
    appearance: none;
    font: inherit;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}

input::placeholder {
    color: var(--muted);
}

input:focus,
.date-display-button:focus {
    border-color: rgba(245, 166, 35, 0.62);
}

.date-field {
    position: relative;
    display: block;
    height: 100%;
}

.date-display-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.date-display-button::after {
    width: 0;
    height: 0;
    border-top: 4px solid var(--muted);
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    content: "";
}

.native-date-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    appearance: none;
}

button {
    border: 0;
    border-radius: 4px;
    background: var(--amber);
    color: #111111;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

button:disabled {
    cursor: wait;
    opacity: 0.52;
}

.lookup-form > button {
    grid-column: span 2;
    height: 52px;
    margin-top: 2px;
    box-shadow: 0 12px 24px rgba(245, 166, 35, 0.16);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.example-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -8px;
}

.example-chip {
    height: 27px;
    padding: 0 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.13);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.46);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.06em;
}

.example-chip:hover,
.example-chip:focus {
    border-color: rgba(245, 166, 35, 0.42);
    color: rgba(255, 255, 255, 0.76);
}

.status-line {
    min-height: 14px;
    margin: -10px 0 -2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.status-line[data-tone="error"] {
    color: rgba(240, 111, 95, 0.86);
}

.status-line[data-tone="action"] {
    color: rgba(245, 166, 35, 0.78);
}

.status-line a {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 720;
    text-decoration: none;
}

.status-line a:hover,
.status-line a:focus {
    color: var(--ink);
}

.starter-panel {
    display: grid;
    gap: 7px;
    padding: 14px 0 0;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.starter-panel.is-hidden {
    display: none;
}

.starter-kicker,
.starter-copy {
    margin: 0;
}

.starter-kicker {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    font-weight: 680;
    line-height: 1.32;
}

.starter-copy {
    max-width: 218px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 12px;
    line-height: 1.45;
}

.route-choices {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.route-choices[hidden] {
    display: none;
}

.route-choice {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--hairline);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--ink);
    text-align: left;
}

.route-choice:hover,
.route-choice:focus {
    border-color: rgba(245, 166, 35, 0.38);
    background: rgba(255, 255, 255, 0.04);
}

.route-choice-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.route-choice strong,
.route-choice-badge {
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
}

.route-choice-badge {
    flex: 0 0 auto;
    color: var(--route-color, var(--amber));
    font-size: 11px;
}

.route-choice-detail,
.route-choice-footnote {
    color: var(--muted);
    font-size: 12px;
    font-weight: 520;
    line-height: 1.35;
}

.route-choice-footnote {
    color: rgba(255, 255, 255, 0.28);
    font-size: 11px;
}

.result-panel {
    display: grid;
    gap: 10px;
    padding: 14px 0 0;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    animation: resultFade 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.result-panel.is-hidden {
    display: none;
}

.answer-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background:
        radial-gradient(circle at 90% 15%, rgba(245, 158, 11, 0.07), transparent 42%),
        rgba(255, 255, 255, 0.028);
}

.answer-copy {
    min-width: 0;
}

.answer-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-route {
    margin: 0;
    color: rgba(255, 255, 255, 0.28);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.3;
}

#recommendation-side {
    display: block;
    color: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: 0;
}

.status-icon {
    position: relative;
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid var(--success);
    border-radius: 999px;
    color: var(--success);
}

.status-icon::before {
    color: currentColor;
    font-size: 19px;
    font-weight: 760;
    line-height: 1;
    content: "\2713";
}

.status-icon.is-none {
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.48);
}

.status-icon.is-none::before {
    content: "-";
}

.status-icon.is-loading {
    border-color: rgba(245, 166, 35, 0.24);
    border-top-color: var(--amber);
    color: transparent;
    animation: historySpin 850ms linear infinite;
}

.status-icon.is-loading::before {
    content: "";
}

.result-panel.is-loading .answer-card,
.result-panel.is-history-error .answer-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 150px;
}

.result-panel.is-loading .seat-map,
.result-panel.is-history-error .seat-map,
.result-panel.is-loading .confidence-row,
.result-panel.is-history-error .confidence-row,
.result-panel.is-history-error .confidence-meter,
.result-panel.is-loading .evidence-grid,
.result-panel.is-history-error .evidence-grid,
.result-panel.is-loading .save-button,
.result-panel.is-history-error .save-button,
.map-panel.is-fetching-history .map-legend {
    display: none;
}

.result-panel.is-loading .confidence-meter {
    display: block;
    height: 4px;
    margin: 2px 0 0;
}

.result-panel.is-loading .confidence-meter span {
    width: var(--history-progress, 10%);
    background: var(--amber);
    transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.result-panel.is-loading #recommendation-side,
.result-panel.is-history-error #recommendation-side {
    max-width: 270px;
    font-size: 29px;
    line-height: 1.08;
}

@keyframes historySpin {
    to {
        transform: rotate(360deg);
    }
}

.landmark-anchor,
.result-reason,
.result-meta {
    margin: 0;
    line-height: 1.35;
}

.result-reason {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 720;
    margin-top: 10px;
}

.landmark-anchor {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.confidence-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.result-meta {
    font-family: var(--mono);
    color: rgba(255, 255, 255, 0.34);
    font-size: 10px;
    letter-spacing: 0.02em;
}

.confidence-info {
    display: inline-grid;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.36);
    font-size: 10px;
    font-weight: 700;
}

.confidence-meter {
    position: relative;
    width: 100%;
    height: 5px;
    margin: 2px 0 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.confidence-meter span {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--confidence-width, 34%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--route-color), rgba(255, 255, 255, 0.72));
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.evidence-item {
    position: relative;
    min-width: 0;
    min-height: 60px;
    padding: 10px 34px 10px 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
}

.evidence-item span,
.evidence-item strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.evidence-item span {
    font-family: var(--mono);
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    font-weight: 720;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.evidence-item strong {
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 760;
}

.evidence-item::after {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    content: "";
    transform: translateY(-50%);
}

.evidence-item::before {
    position: absolute;
    z-index: 1;
    content: "";
}

.evidence-item--evidence::before {
    top: 50%;
    right: 13px;
    width: 8px;
    height: 4px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.58);
    border-left: 1.5px solid rgba(255, 255, 255, 0.58);
    transform: translateY(-60%) rotate(-45deg);
}

.evidence-item--history::before {
    top: 50%;
    right: 12px;
    width: 10px;
    height: 9px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-top-width: 3px;
    border-radius: 2px;
    transform: translateY(-50%);
}

.evidence-item--route::before {
    top: 50%;
    right: 11px;
    width: 12px;
    height: 8px;
    border-top: 1.5px solid rgba(255, 255, 255, 0.52);
    border-right: 1.5px solid rgba(255, 255, 255, 0.52);
    border-radius: 0 7px 0 0;
    transform: translateY(-50%) rotate(-18deg);
}

.evidence-item--schedule::before {
    top: 50%;
    right: 16px;
    width: 1px;
    height: 6px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 3px 4px 0 -0.5px rgba(255, 255, 255, 0.54);
    transform: translateY(-72%);
}

.seat-map {
    position: relative;
    display: block;
    width: 82px;
    height: 104px;
    justify-self: end;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 720;
}

.seat-cabin {
    position: absolute;
    right: 10px;
    bottom: 0;
    display: block;
    width: 48px;
    height: 102px;
}

.seat-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 50%;
}

.seat-map.is-right .seat-image {
    transform: scaleX(-1);
}

.seat-map.is-none .seat-image {
    filter: grayscale(1) brightness(0.78);
    opacity: 0.68;
}

.seat-window {
    position: absolute;
    top: 49px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 760;
    line-height: 1;
}

.seat-window-left {
    left: 12px;
}

.seat-window-right {
    right: 0;
}

.save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    margin-top: 8px;
    border: 0.5px solid rgba(245, 166, 35, 0.34);
    background: rgba(245, 166, 35, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.save-button::before {
    display: block;
    width: 8px;
    height: 13px;
    border: 1px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    opacity: 0.76;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
    content: "";
}

.save-button:not(:disabled):hover,
.save-button:not(:disabled):focus {
    border-color: rgba(245, 166, 35, 0.52);
    background: rgba(245, 166, 35, 0.15);
    color: var(--ink);
}

.save-button:disabled {
    color: rgba(255, 255, 255, 0.28);
}

.demo-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.025);
}

.demo-panel div {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
    gap: 3px;
}

.demo-panel span {
    color: rgba(255, 255, 255, 0.28);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.demo-panel strong {
    color: rgba(255, 255, 255, 0.54);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.demo-panel small {
    color: rgba(255, 255, 255, 0.32);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 680;
    line-height: 1.25;
}

.demo-panel button {
    display: inline-grid;
    min-width: 72px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    border: 0.5px solid rgba(245, 166, 35, 0.26);
    border-radius: 4px;
    background: rgba(245, 166, 35, 0.08);
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-panel button:not(:disabled):hover,
.demo-panel button:not(:disabled):focus {
    border-color: rgba(245, 166, 35, 0.44);
    color: var(--ink);
}

.demo-panel button:disabled {
    cursor: default;
    opacity: 0.42;
}

.demo-panel.is-published button {
    border-color: rgba(255, 255, 255, 0.14);
    background: transparent;
    color: rgba(255, 255, 255, 0.42);
}

.map-legend {
    position: absolute;
    right: 72px;
    bottom: 26px;
    z-index: 500;
    display: inline-flex;
    padding: 7px 9px;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(10, 10, 11, 0.42);
    color: rgba(255, 255, 255, 0.34);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.is-hidden {
    display: none !important;
}

.map-hint {
    position: absolute;
    top: 34px;
    left: 34px;
    z-index: 450;
    display: grid;
    max-width: 270px;
    gap: 6px;
    padding: 12px 14px;
    border: 0.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 4px;
    background: rgba(10, 10, 11, 0.72);
    color: rgba(255, 255, 255, 0.42);
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.map-hint.is-hidden {
    display: none;
}

.map-hint strong {
    color: rgba(255, 255, 255, 0.64);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 680;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.map-hint span {
    font-size: 12px;
    line-height: 1.38;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.map-legend i {
    display: inline-block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
}

.legend-history {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.34));
}

.landmark-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 138px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.78);
    transform-origin: 18px 18px;
    transition: transform 120ms ease, opacity 120ms ease;
}

.landmark-pin {
    position: relative;
    display: block;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 1px dotted rgba(245, 166, 35, 0.72);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1), transparent 58%);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.05), 0 0 24px rgba(245, 158, 11, 0.1);
}

.landmark-pin::before,
.landmark-pin::after {
    position: absolute;
    content: "";
}

.landmark-pin::after {
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--side-color, var(--amber));
    box-shadow: 0 0 12px var(--route-soft);
    transform: translate(-50%, -50%);
}

.landmark-copy {
    display: grid;
    gap: 2px;
    transform: translateX(-2px);
}

.landmark-copy strong,
.landmark-copy small {
    display: block;
}

.landmark-copy strong {
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 760;
}

.landmark-copy small {
    color: rgba(245, 166, 35, 0.9);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 650;
}

.map-panel.is-zoom-low .landmark-label {
    min-width: 36px;
    gap: 0;
    transform: scale(0.78);
}

.map-panel.is-zoom-low .landmark-copy {
    display: none;
}

.map-panel.is-zoom-very-low .landmark-label {
    opacity: 0.72;
    transform: scale(0.62);
}

.leaflet-tooltip.route-hover-tooltip {
    padding: 6px 9px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(10, 10, 11, 0.78);
    color: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.leaflet-tooltip.route-hover-tooltip::before {
    display: none;
}

.landmark-strip {
    position: absolute;
    right: 72px;
    bottom: 68px;
    z-index: 460;
    display: grid;
    width: min(360px, calc(100% - 120px));
    max-height: 180px;
    overflow-y: auto;
    border: 0.5px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    background: rgba(10, 10, 11, 0.52);
    color: rgba(255, 255, 255, 0.62);
    pointer-events: auto;
    backdrop-filter: blur(12px);
}

.landmark-strip::-webkit-scrollbar {
    width: 0;
}

.landmark-strip-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    min-height: 56px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 0.5px solid rgba(148, 163, 184, 0.1);
    background: transparent;
    color: inherit;
    text-align: left;
}

.landmark-strip-card:last-child {
    border-bottom: 0;
}

.landmark-strip-time {
    color: var(--route-color);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.landmark-strip-copy {
    min-width: 0;
}

.landmark-strip-copy strong,
.landmark-strip-copy span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.landmark-strip-copy strong {
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 740;
}

.landmark-strip-copy span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.38);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.airport-point-label {
    position: relative;
    pointer-events: none;
}

.airport-point {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    transform: translate(-50%, -50%);
}

.airport-map-code {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 9px;
    font-weight: 820;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 8px rgba(5, 7, 13, 0.88);
    transform: translate(var(--label-x, -30px), var(--label-y, -14px));
}

.leaflet-control-zoom {
    border: 0 !important;
}

.leaflet-control-zoom a {
    border: 1px solid var(--hairline) !important;
    background: rgba(14, 15, 17, 0.86) !important;
    color: var(--ink) !important;
}

.leaflet-control-attribution {
    background: transparent;
    color: rgba(255, 255, 255, 0.34);
    font-size: 10px;
}

.leaflet-control-attribution a {
    color: rgba(255, 255, 255, 0.46);
}

.leaflet-interactive:focus {
    outline: none;
}

@keyframes resultFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    :root {
        --mobile-edge: clamp(16px, 4.4vw, 22px);
        --mobile-sheet-radius: 22px;
        --mobile-result-sheet-height: min(42dvh, 386px);
    }

    html,
    body,
    .window-shell {
        min-height: 100%;
        min-height: 100dvh;
    }

    body {
        overflow: hidden;
        background: var(--bg);
    }

    .window-shell {
        position: relative;
        display: block;
        min-height: 100dvh;
        overflow: hidden;
    }

    .control-panel {
        position: relative;
        z-index: 40;
        display: flex;
        height: 100dvh;
        padding:
            calc(env(safe-area-inset-top, 0px) + 12px)
            var(--mobile-edge)
            calc(env(safe-area-inset-bottom, 0px) + 18px);
        border-right: 0;
        border-bottom: 0;
        background:
            linear-gradient(180deg, rgba(7, 8, 10, 0.92), rgba(7, 8, 10, 0.58) 32%, transparent 52%),
            linear-gradient(0deg, rgba(7, 8, 10, 0.84), transparent 42%);
        overflow: hidden;
        pointer-events: none;
    }

    .top-bar,
    .intro,
    .lookup-form,
    .example-row,
    .status-line,
    .starter-panel,
    .route-choices,
    .result-panel {
        pointer-events: auto;
    }

    .top-bar {
        min-height: 44px;
        padding-right: 4px;
    }

    .brand-link {
        max-width: calc(100% - 72px);
        min-width: 0;
    }

    .brand-link span:last-child {
        min-width: 0;
    }

    .brand-link strong,
    .brand-link small {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
    }

    .ghost-button {
        width: auto;
        height: 34px;
        padding: 0 12px 0 10px;
        border-radius: 999px;
        background: rgba(9, 11, 15, 0.4);
        font-size: 10px;
        letter-spacing: 0.06em;
        backdrop-filter: blur(10px);
    }

    .ghost-button::before {
        width: 10px;
        height: 12px;
        margin-right: 7px;
        border: 1.5px solid currentColor;
        border-top-width: 3px;
        border-radius: 3px;
        content: "";
    }

    .intro h1 {
        max-width: min(360px, calc(100vw - 44px));
        font-size: clamp(32px, 11vw, 46px);
        line-height: 0.98;
    }

    .lookup-form {
        grid-template-columns: minmax(0, 1fr) minmax(104px, 30%);
        gap: 8px;
        padding: 8px;
        border: 0.5px solid rgba(255, 255, 255, 0.1);
        border-radius: 18px;
        background: rgba(9, 11, 15, 0.72);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
        backdrop-filter: blur(18px);
    }

    .lookup-form label,
    input,
    .date-display-button {
        height: 46px;
    }

    input,
    .date-display-button {
        border-radius: 11px;
        background: rgba(20, 25, 33, 0.88);
        font-size: 16px;
    }

    .lookup-form > button {
        height: 48px;
        border-radius: 12px;
        box-shadow: 0 14px 26px rgba(245, 166, 35, 0.18);
    }

    .example-row {
        margin-top: -10px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .example-row::-webkit-scrollbar {
        display: none;
    }

    .example-chip {
        height: 32px;
        flex: 0 0 auto;
        border-radius: 9px;
        background: rgba(9, 11, 15, 0.58);
        backdrop-filter: blur(10px);
    }

    .status-line {
        min-height: 18px;
        margin: -10px 2px -4px;
        padding: 0 2px;
    }

    .starter-panel {
        max-width: 280px;
        margin-top: auto;
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
        padding: 14px;
        border: 0.5px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        background: rgba(9, 11, 15, 0.58);
        backdrop-filter: blur(14px);
    }

    .map-panel {
        position: fixed;
        inset: 0;
        z-index: 1;
        height: 100dvh;
        min-height: 0;
    }

    .map-hint {
        top: calc(env(safe-area-inset-top, 0px) + 148px);
        left: var(--mobile-edge);
        max-width: calc(100% - 32px);
        border-radius: 14px;
        background: rgba(10, 10, 11, 0.62);
    }

    .map-legend {
        right: auto;
        left: var(--mobile-edge);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
        max-width: calc(100vw - 150px);
        background: rgba(10, 10, 11, 0.62);
    }

    .landmark-strip {
        right: calc(var(--mobile-edge) + 78px);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 120px);
        left: var(--mobile-edge);
        display: flex;
        width: auto;
        max-width: 390px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 15px;
        background: rgba(10, 10, 11, 0.58);
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(12px);
        scrollbar-width: none;
    }

    .landmark-strip::-webkit-scrollbar {
        display: none;
    }

    .landmark-strip-card {
        min-width: 0;
        flex: 1 0 210px;
        border-right: 0.5px solid rgba(148, 163, 184, 0.1);
        border-bottom: 0;
    }

    .leaflet-control-zoom {
        margin-right: var(--mobile-edge) !important;
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
    }

    body.has-window-result .control-panel,
    body.has-route-choices .control-panel,
    body.is-window-loading .control-panel {
        justify-content: space-between;
        background:
            linear-gradient(180deg, rgba(7, 8, 10, 0.86), rgba(7, 8, 10, 0.42) 21%, transparent 40%),
            linear-gradient(0deg, rgba(7, 8, 10, 0.58), transparent 32%);
    }

    body.has-window-result .intro,
    body.has-window-result .lookup-form,
    body.has-window-result .example-row,
    body.has-window-result .status-line,
    body.is-window-loading .intro,
    body.is-window-loading .lookup-form,
    body.is-window-loading .status-line,
    body.is-window-loading .example-row,
    body.has-route-choices .starter-panel {
        display: none;
    }

    body.has-window-result .top-bar,
    body.is-window-loading .top-bar,
    body.has-route-choices .top-bar {
        min-height: 36px;
    }

    body.has-window-result .lookup-form,
    body.is-window-loading .lookup-form,
    body.has-route-choices .lookup-form {
        margin-top: -2px;
        grid-template-columns: minmax(0, 1fr) 96px 46px;
        border-radius: 16px;
    }

    body.has-window-result .lookup-form > button,
    body.is-window-loading .lookup-form > button,
    body.has-route-choices .lookup-form > button {
        grid-column: auto;
        width: 46px;
        margin-top: 0;
        font-size: 0;
    }

    body.has-window-result .lookup-form > button::before,
    body.is-window-loading .lookup-form > button::before,
    body.has-route-choices .lookup-form > button::before {
        display: block;
        width: 15px;
        height: 15px;
        border: 2px solid #111;
        border-radius: 999px;
        box-shadow: 8px 8px 0 -6px #111;
        content: "";
        transform: translate(-1px, -1px);
    }

    body.has-window-result .result-panel,
    body.is-window-loading .result-panel {
        position: fixed;
        right: var(--mobile-edge);
        bottom: 0;
        left: var(--mobile-edge);
        z-index: 60;
        display: grid;
        max-height: var(--mobile-result-sheet-height);
        gap: 8px;
        padding:
            14px
            16px
            calc(env(safe-area-inset-bottom, 0px) + 14px);
        border: 0.5px solid rgba(255, 255, 255, 0.12);
        border-bottom: 0;
        border-radius: var(--mobile-sheet-radius) var(--mobile-sheet-radius) 0 0;
        background:
            radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.075), transparent 34%),
            rgba(13, 14, 17, 0.82);
        box-shadow: 0 -14px 42px rgba(0, 0, 0, 0.32);
        overflow-y: auto;
        backdrop-filter: blur(18px);
    }

    body.has-window-result .result-panel::before,
    body.is-window-loading .result-panel::before {
        width: 42px;
        height: 4px;
        justify-self: center;
        margin: -4px 0 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        content: "";
    }

    body.has-window-result .answer-card {
        grid-template-columns: minmax(0, 1fr) 66px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.has-window-result #recommendation-side {
        font-size: clamp(32px, 8.4vw, 40px);
    }

    body.has-window-result .status-icon {
        width: 36px;
        height: 36px;
    }

    body.has-window-result .result-reason {
        margin-top: 6px;
    }

    body.has-window-result .seat-map {
        width: 64px;
        height: 84px;
        justify-self: end;
        transform: scale(0.88);
        transform-origin: 100% 50%;
    }

    body.has-window-result .evidence-grid {
        display: flex;
        gap: 8px;
        margin: 2px -2px 0;
        overflow-x: auto;
        padding: 0 2px 3px;
        scrollbar-width: none;
    }

    body.has-window-result .evidence-grid::-webkit-scrollbar {
        display: none;
    }

    body.has-window-result .evidence-item {
        min-width: 148px;
        min-height: 58px;
        flex: 0 0 auto;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.045);
    }

    body.has-window-result .save-button {
        position: sticky;
        bottom: 0;
        height: 48px;
        margin-top: 4px;
        border-radius: 14px;
        background: rgba(245, 158, 11, 0.24);
        box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
        backdrop-filter: blur(10px);
    }

    body.has-window-result .landmark-strip,
    body.is-window-loading .landmark-strip {
        display: none;
    }

    body.has-window-result .map-legend,
    body.is-window-loading .map-legend {
        display: none;
    }

    body.has-window-result .leaflet-control-zoom,
    body.is-window-loading .leaflet-control-zoom {
        margin-bottom: calc(var(--mobile-result-sheet-height) + env(safe-area-inset-bottom, 0px) + 20px) !important;
    }

    body.has-window-result .demo-panel,
    body.is-window-loading .demo-panel {
        display: none;
    }

    body.has-route-choices .route-choices {
        margin-top: auto;
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        padding: 14px;
        border: 0.5px solid rgba(255, 255, 255, 0.12);
        border-radius: 20px;
        background: rgba(13, 14, 17, 0.84);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(18px);
    }
}

@media (max-width: 520px) {
    .lookup-form {
        grid-template-columns: minmax(0, 1fr) 112px;
    }

    .intro h1 {
        font-size: clamp(34px, 12vw, 44px);
    }

    .answer-card {
        grid-template-columns: minmax(0, 1fr) 64px;
    }

    .seat-map {
        justify-self: end;
    }

    .evidence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.has-window-result .lookup-form,
    body.is-window-loading .lookup-form,
    body.has-route-choices .lookup-form {
        grid-template-columns: minmax(0, 1fr) 92px 44px;
    }

    body.has-window-result .lookup-form > button,
    body.is-window-loading .lookup-form > button,
    body.has-route-choices .lookup-form > button {
        width: 44px;
    }

    body.has-window-result .answer-card {
        grid-template-columns: minmax(0, 1fr) 62px;
    }

    body.has-window-result .evidence-grid {
        display: flex;
        grid-template-columns: none;
    }

    body.has-window-result .evidence-item {
        min-width: 142px;
    }
}
