:root {
	color-scheme: light;
	--ink: #17263d;
	--muted: #68758a;
	--line: #e2e7ef;
	--paper: #ffffff;
	--canvas: #f3f6fa;
	--accent: #2459a6;
	--accent-dark: #1a437f;
	--soft-blue: #edf3fb;
	--success: #2a765a;
	--shadow: 0 10px 28px rgba(23, 38, 61, 0.07);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
.app-shell { width: min(100%, 760px); margin: 0 auto; padding: 0 18px calc(28px + env(safe-area-inset-bottom)); }
.app-header { display: flex; align-items: center; gap: 12px; padding: calc(22px + env(safe-area-inset-top)) 2px 20px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -1px; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 9px; line-height: 1.3; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0; font-size: 20px; letter-spacing: .02em; }
h2 { margin: 0; font-size: 18px; letter-spacing: .01em; }
.route-summary { display: flex; align-items: center; gap: 15px; padding: 22px 20px; border-radius: 20px; color: white; background: linear-gradient(120deg, #17263d, #263f63); box-shadow: var(--shadow); }
.station-block { display: flex; flex-direction: column; gap: 5px; min-width: 64px; }
.station-label { color: #b7c7dc; font-size: 11px; }
.station-block strong { font-size: 23px; font-weight: 750; letter-spacing: .02em; }
.station-destination { text-align: right; }
.route-connector { display: flex; align-items: center; flex: 1; gap: 4px; padding: 0 5px; }
.route-connector::before, .route-connector::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.45); }
.route-connector span { width: 5px; height: 5px; border: 1px solid #cbd9eb; border-radius: 50%; }
.search-panel { margin-top: 17px; padding: 21px 20px 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.section-heading, .results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.weekday-chip { flex: 0 0 auto; padding: 6px 9px; border-radius: 20px; background: var(--soft-blue); color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.input-hint { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.time-input-wrap { display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 0 14px; border: 1px solid #cbd4e1; border-radius: 12px; background: #fbfcfe; }
.time-input-wrap:focus-within, .number-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36,89,166,.10); }
icon-placeholder { color: var(--accent); font-size: 23px; line-height: 1; }
.time-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 25px; font-weight: 700; }
.settings-panel { margin-top: 17px; border-top: 1px solid var(--line); }
.settings-panel summary { display: flex; align-items: center; gap: 9px; padding: 15px 0 8px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 750; }
.settings-panel summary::-webkit-details-marker, .install-help summary::-webkit-details-marker { display: none; }
.summary-note { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 500; }
.chevron { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.settings-panel[open] .chevron { transform: rotate(225deg); }
.settings-description, .settings-footnote { color: var(--muted); font-size: 11px; line-height: 1.65; }
.settings-description { margin: 4px 0 12px; }
.transfer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.transfer-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; font-weight: 700; }
.number-input-wrap { display: flex; align-items: center; gap: 7px; height: 43px; padding: 0 10px; border: 1px solid #cbd4e1; border-radius: 10px; background: #fbfcfe; color: var(--muted); }
.number-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; font-weight: 700; }
.number-input-wrap span { font-size: 11px; }
.settings-footnote { margin: 9px 0 0; font-size: 10px; }
.search-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 53px; margin-top: 18px; border: 0; border-radius: 12px; background: var(--accent); color: white; font-size: 15px; font-weight: 750; cursor: pointer; transition: background .15s, transform .15s; }
.search-button:active { transform: scale(.99); background: var(--accent-dark); }
.search-button:disabled { opacity: .55; cursor: wait; }
.button-arrow { font-size: 20px; font-weight: 400; }
.data-status { min-height: 16px; margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.data-status.error { color: #b23c36; }
.results-section { margin-top: 27px; }
.results-header { margin-bottom: 13px; }
.result-count { color: var(--muted); font-size: 11px; }
.results-list { display: grid; gap: 12px; }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 30px 16px; border: 1px dashed #cbd4e1; border-radius: 17px; color: var(--muted); text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft-blue); color: var(--accent); font-size: 21px; }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state p { margin: 0; font-size: 11px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 5px 18px rgba(23,38,61,.04); }
.result-card-top { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 15px 16px 13px; }
.route-name { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.5; }
.journey-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: normal; }
.journey-times { font-size: clamp(21px, 5.4vw, 29px); font-weight: 850; letter-spacing: -.035em; }
.journey-duration { color: var(--muted); font-size: clamp(16px, 4.1vw, 21px); font-weight: 750; letter-spacing: -.02em; }
.legs { padding: 0 16px 14px; }
.leg-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid #edf0f5; }
.leg-line-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; margin-bottom: 3px; }
.leg-line { display: block; font-size: 12px; font-weight: 750; }
.service-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 5px; font-size: 9px; line-height: 1.35; font-weight: 800; white-space: nowrap; }
.service-badge-terminal { background: #fff0df; color: #a95608; }
.service-badge-origin { background: #e7f4ee; color: #22714d; }
.leg-stations { color: var(--muted); font-size: 10px; }
.leg-times { align-self: center; white-space: nowrap; text-align: right; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.leg-times .time-arrow { padding: 0 4px; color: #9aa6b6; font-weight: 400; }
.transfer-note { display: flex; align-items: center; gap: 7px; margin: 0 0 0 10px; padding: 7px 9px; border-left: 2px solid #bdcbe0; background: #f7f9fc; color: var(--muted); font-size: 10px; }
.transfer-note strong { font-weight: 800; }
.wait-short { color: #16834a !important; }
.wait-medium { color: #737b87 !important; }
.wait-long { color: #cf3535 !important; }
.result-card.route-rapid { border-left: 5px solid #ef8b26; }
.result-card.route-sobu { border-left: 5px solid #e0bd25; }
.result-legends { display: grid; gap: 7px; margin: -3px 0 12px; }
.route-legend, .wait-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; color: var(--muted); font-size: 10px; }
.route-legend span { display: inline-flex; align-items: center; gap: 5px; }
.route-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.route-dot-rapid { background: #ef8b26; }
.route-dot-sobu { background: #e0bd25; }
.wait-legend span { font-weight: 750; }
.day-mark { color: #98651d; font-size: 9px; font-weight: 700; }
.no-results { padding: 22px 16px; border-radius: 15px; background: var(--paper); color: var(--muted); text-align: center; font-size: 12px; line-height: 1.7; }
.notes-panel { margin-top: 24px; padding: 16px; border-radius: 15px; background: #eaf0f7; }
.notes-title { margin: 0 0 8px; font-size: 11px; font-weight: 800; }
.notes-panel ul { margin: 0; padding-left: 17px; color: #526178; font-size: 10px; line-height: 1.75; }
.install-help { margin-top: 13px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.install-help summary { cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; }
.install-help summary::after { content: "+"; float: right; color: var(--muted); font-size: 16px; font-weight: 400; }
.install-help[open] summary::after { content: "−"; }
.install-help ol { margin: 11px 0 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.app-footer { display: flex; justify-content: space-between; gap: 8px; padding: 20px 2px 0; color: var(--muted); font-size: 9px; }
.app-footer span { text-align: right; }
@media (min-width: 600px) {
	.app-shell { padding-right: 28px; padding-left: 28px; }
	.app-header { padding-top: 30px; }
	.route-summary { padding: 25px 28px; }
	.search-panel { padding: 25px 26px 19px; }
	.results-list { grid-template-columns: 1fr 1fr; align-items: start; }
	.empty-state, .no-results { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
