:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #172f35;
  background: #f2f6f5;
  --muted: #50656a;
  --line: #d9e4e2;
  --green: #006856;
  --ink: #13383e;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #167765; outline-offset: 3px; }
.shell { width: min(1320px, calc(100% - 72px)); margin-inline: auto; }
.site-header { background: #103b3e; color: #fff; }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: flex; gap: .7rem; align-items: center; font-weight: 760; letter-spacing: .09em; }
.mark { display: grid; gap: 3px; transform: skewY(-16deg); }
.mark i { display: block; width: 20px; height: 2px; background: #8bdfc0; border-radius: 2px; }
.mark i:nth-child(2) { width: 15px; }
.mark i:nth-child(3) { width: 10px; }
.header-context { color: #d5e8e5; font-size: .9rem; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 32px 0 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.22; }
.intro p { color: var(--muted); margin-top: .65rem; line-height: 1.55; }
.text-link { flex-shrink: 0; font-weight: 650; font-size: .94rem; }
.status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #e3d3aa; background: #fbf7ec; border-radius: 12px; padding: 12px 16px; min-height: 68px; }
.status.is-confirmed { border-color: #a5d3c0; background: #e9f6ef; }
.status-text { display: grid; gap: .18rem; }
.status-text strong { color: #62460d; }
.is-confirmed .status-text strong { color: #16543e; }
.status-text span { font-size: .9rem; color: #534a3a; line-height: 1.45; }
.primary { border: 0; border-radius: 8px; padding: .63rem .85rem; color: white; background: #12614f; font-weight: 680; flex-shrink: 0; }
.primary:hover { background: #0e5142; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 16px 0; }
.stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .65rem; padding: 14px 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 81px; }
.stat > div { width: 100%; font-size: .88rem; color: var(--muted); font-weight: 650; }
.stat strong { font-size: 1.65rem; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .9rem; font-weight: 650; }
.stat.accent { background: #e4f3ec; border-color: #bfdcce; color: #005747; }
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(315px, 1fr); gap: 16px; align-items: start; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 15px 18px; }
h2 { font-size: 1.125rem; letter-spacing: .005em; }
.switch, .muted { color: var(--muted); font-size: .88rem; }
.switch { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
input[type=checkbox] { accent-color: var(--green); width: 1rem; height: 1rem; margin: 0; flex-shrink: 0; }
.map { height: clamp(385px, 53vh, 650px); position: relative; background: #d5e8ea; overflow: hidden; border-block: 1px solid var(--line); touch-action: none; }
canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.map.dragging canvas { cursor: grabbing; }
.map-controls { position: absolute; right: 13px; top: 13px; display: grid; border: 1px solid #b5c9c7; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px #253d4420; }
.map-controls button { width: 42px; min-height: 37px; color: var(--ink); background: white; border: 0; font-weight: 720; font-size: 1.15rem; }
.map-controls button:last-child { font-size: .81rem; }
.map-controls button + button { border-top: 1px solid var(--line); }
.map-controls button:hover { background: #e8f2ef; }
.map-controls button:focus-visible { outline-offset: -3px; }
.scale { position: absolute; left: 13px; bottom: 16px; border: solid #2c5154; border-width: 0 1px 1px; text-align: center; font-size: .77rem; color: #1e3f42; background: #ffffffd9; }
.map-credit { position: absolute; right: 0; bottom: 0; background: #ffffffdd; padding: .14rem .4rem; color: #2c5055; font-size: .75rem; }
.map-popup { position: absolute; inset: 13px auto auto 13px; max-width: min(75%, 330px); background: #fff; border: 1px solid #a9c2be; box-shadow: 0 2px 12px #263d4126; border-radius: 8px; padding: .55rem .75rem; line-height: 1.45; font-size: .86rem; pointer-events: none; }
.map-popup strong { display: block; }
.legend { display: flex; gap: .7rem 1.1rem; padding: 12px 17px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.legend > span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: 11px; height: 11px; border-radius: 50%; background: #155b68; }
.legend .route-line { width: 21px; height: 4px; border-radius: 6px; background: #008d70; }
.legend .baseline-line .route-line { background: #9b6324; }
.legend .legend-bus { background: #a56728; width: 8px; height: 8px; }
.orders { display: flex; gap: .3rem; padding: 3px; margin: 0 16px 6px; border-radius: 8px; background: #edf4f2; }
.orders button { flex: 1; border: 0; padding: .5rem; border-radius: 6px; color: var(--muted); background: transparent; font-size: .9rem; font-weight: 660; }
.orders button[aria-pressed=true] { background: white; color: var(--green); box-shadow: 0 1px 4px #1c50441a; }
.visit-list { list-style: none; padding: 0 16px; margin: 0; }
.visit-list li { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: start; gap: .65rem; padding: .66rem 2px; }
.visit-list li + li { border-top: 1px solid #e5edeb; }
.stop-number { display: grid; place-content: center; border-radius: 50%; width: 26px; height: 26px; margin-top: 1px; color: white; background: #155b68; font-size: .81rem; font-weight: 700; }
.visit-title { text-align: left; border: 0; color: #133b41; background: transparent; padding: 0; font-weight: 720; }
.visit-title:hover { text-decoration: underline; text-underline-offset: .2em; }
.meta { color: var(--muted); display: block; font-size: .86rem; line-height: 1.45; margin-top: .17rem; }
.arrival { font-size: .86rem; color: var(--muted); margin-top: .28rem; }
.arrival summary { cursor: pointer; width: fit-content; }
.arrival p { margin-block: .3rem; line-height: 1.5; }
.confirm { display: flex; gap: .45rem; align-items: start; padding-block: .25rem; cursor: pointer; color: #214f48; }
.confirm input { margin-top: .16rem; }
.sources { margin: 30px 0 34px; padding-top: 19px; border-top: 1px solid var(--line); }
.sources ul { margin: .6rem 0 0; padding-left: 1.35rem; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.sources li + li { margin-top: .35rem; }
@media (max-width: 880px) {
  .shell { width: calc(100% - 36px); }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); }
  .intro { align-items: start; flex-direction: column; padding: 22px 0 17px; }
  .status { align-items: start; flex-direction: column; gap: .7rem; }
  .stats { gap: 6px; }
  .stat { padding: 8px; min-height: 70px; }
  .stat strong { font-size: 1.18rem; }
  .map { height: 410px; }
}
