:root{--bg:#f5f5f2;--ink:#151515;--muted:#686868;--line:#d9d9d3;--card:#fff;--accent:#111;--soft:#ededE8}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;line-height:1.55}.shell{max-width:1060px;margin:auto;padding:52px 20px 80px}.hero{max-width:800px;margin-bottom:30px}.eyebrow,.section-kicker{font:700 12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.13em;color:var(--muted)}h1{font-size:clamp(40px,7vw,78px);line-height:1;letter-spacing:-.055em;margin:12px 0 22px}h2{font-size:26px;letter-spacing:-.025em;margin:5px 0}.lead{font-size:18px;max-width:720px}.notice{margin-top:20px;padding:12px 14px;border-left:3px solid var(--ink);background:#fff;font-size:14px}.panel{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:22px;margin-top:22px}.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;background:#ededE8;border-radius:14px;margin-bottom:24px}.mode-btn{min-height:46px;border:0;border-radius:10px;background:transparent;color:#575757;font:700 14px/1.2 inherit;cursor:pointer}.mode-btn.active{background:#111;color:#fff}.section-head,.result-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.ghost,.primary,.play{font:inherit;cursor:pointer}.ghost{border:1px solid var(--line);background:transparent;padding:10px 14px;border-radius:999px}.map-wrap{position:relative;overflow:hidden;border-radius:16px;background:#ececeb}#map{height:560px;border-radius:16px;background:#ececeb;border:1px solid var(--line)}.base-tiles{filter:saturate(.62) brightness(1.04) contrast(.90);opacity:.80}.map-hint{position:absolute;z-index:500;left:50%;bottom:14px;transform:translateX(-50%);background:rgba(20,20,20,.9);color:#fff;padding:8px 13px;border-radius:999px;font-size:13px;pointer-events:none;white-space:nowrap}.point-readout{display:flex;align-items:center;gap:10px;margin:12px 2px 0;font-size:13px}.point-readout div{display:flex;flex-direction:column}.point-readout small{color:var(--muted)}.point-dot{width:14px;height:14px;border-radius:50%;display:inline-block;box-shadow:0 0 0 3px #fff,0 0 0 4px #aaa}.point-dot.arrive{background:#e5484d}.point-dot.depart{background:#2563eb}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.form-grid label{font-size:12px;font-weight:700;color:var(--muted);min-width:0}input,select{width:100%;min-width:0;max-width:100%;margin-top:6px;padding:11px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:600 15px/1.2 inherit}.check-label{display:flex!important;align-items:center;gap:8px;padding-top:22px}.check-label input{width:20px;height:20px;margin:0}.primary{width:100%;margin-top:18px;border:0;border-radius:13px;background:var(--accent);color:#fff;font-weight:800;padding:15px 18px;font-size:16px}.primary:disabled{opacity:.35;cursor:not-allowed}.status{font-size:13px;color:var(--muted);margin:10px 2px 0}.hidden{display:none!important}.result-meta{font-size:13px;color:var(--muted);text-align:right}.slider-row{display:flex;align-items:center;gap:12px}.play{width:46px;height:46px;border-radius:50%;border:1px solid var(--line);background:#fff}.slider-label{flex:1;display:grid;grid-template-columns:1fr auto;gap:4px 12px;font-size:13px;color:var(--muted)}.slider-label strong{font-size:18px;color:var(--ink)}.slider-label input{grid-column:1/-1;margin:0;padding:0;border:0}.legend{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-top:14px}.gradient{height:13px;flex:1;max-width:410px;border-radius:99px;background:linear-gradient(90deg,#6d28d9 0%,#2563eb 23%,#06b6d4 43%,#84cc16 58%,#facc15 72%,#f97316 86%,#dc2626 100%);border:1px solid rgba(0,0,0,.12)}.unreachable{width:13px;height:13px;background:#d5d5d5;border:1px solid #bbb;border-radius:3px;margin-left:10px}.method{padding:40px 4px 0;max-width:820px}.method-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}.method-grid div{border-top:2px solid var(--ink);padding-top:10px}.method-grid b{font:800 28px/1 ui-monospace,monospace;display:block}.method-grid span{font-size:14px}.fine{font-size:12px;color:var(--muted)}.leaflet-control-attribution{font-size:9px!important}.cell-popup{font-size:13px}.cell-popup b{font-size:20px}.boundary-line{pointer-events:none}
@media(max-width:780px){.shell{padding:30px 12px 60px}.panel{padding:15px;border-radius:16px}.section-head,.result-head{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr 1fr}#map{height:440px}.method-grid{grid-template-columns:1fr}.lead{font-size:16px}.result-meta{text-align:left}}
@media(max-width:560px){.mode-switch{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}#map{height:400px}.map-hint{font-size:12px}.slider-row{align-items:flex-start}input[type=date],input[type=time]{display:block;width:100%;min-width:0}}


/* v1.0 release polish */
.map-result-controls{position:absolute;z-index:520;right:14px;top:14px;width:min(320px,calc(100% - 28px));padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.94);border:1px solid rgba(0,0,0,.12);backdrop-filter:blur(8px);box-shadow:0 2px 14px rgba(0,0,0,.08)}
.map-result-top{display:flex;align-items:center;gap:10px;margin-bottom:7px}.map-result-top>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex:1}.map-result-top span{font-size:11px;font-weight:700;color:var(--muted)}.map-result-top strong{font-size:18px}.map-result-controls input[type=range]{margin:0;padding:0;border:0;background:transparent}
.primary.busy{cursor:wait;opacity:.82}.primary.busy::before{content:"";display:inline-block;width:13px;height:13px;margin-right:9px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;vertical-align:-2px;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.legend-scale{max-width:540px;margin-top:10px}.legend-scale .gradient{max-width:none;width:100%;height:15px}.legend-ticks{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:4px}
.footer{margin-top:42px;padding-top:18px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.footer p{margin:0}
.result{padding-top:18px;padding-bottom:18px}.result-head{margin-bottom:8px}.result-meta{max-width:480px}
.leaflet-popup-content-wrapper{border-radius:12px}.leaflet-popup-content{margin:11px 13px}
@media(max-width:780px){.map-result-controls{left:10px;right:10px;top:auto;bottom:34px;width:auto}.map-hint{bottom:12px}.map-wrap.has-results .map-hint{display:none}.footer{display:block}.footer p+p{margin-top:4px}}

/* v1.2 mobile-first control layout */
.map-result-controls{
  position:static;
  width:100%;
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#f7f7f4;
  border:1px solid var(--line);
  box-shadow:none;
  backdrop-filter:none;
}
.map-result-top{margin-bottom:5px}
.map-result-controls .play{width:36px;height:36px;flex:0 0 36px}
.map-result-controls input[type=range]{height:22px}

@media(max-width:780px){
  .shell{padding:14px 8px 36px}
  .hero{margin-bottom:10px}
  .hero .eyebrow{display:none}
  .hero h1{font-size:30px;line-height:1.02;margin:0 0 6px;letter-spacing:-.045em}
  .hero h1 br{display:none}
  .hero .lead{font-size:12px;line-height:1.35;margin:0;color:var(--muted)}
  .hero .notice{display:none}
  .panel{margin-top:10px;padding:10px;border-radius:14px}
  .mode-switch{grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:8px;border-radius:11px}
  .mode-btn{min-height:36px;font-size:12px;padding:4px 6px}
  .section-head{flex-direction:row;align-items:center;gap:8px;margin-bottom:8px}
  .section-head .section-kicker{display:none}
  .section-head h2{font-size:17px;margin:0}
  .ghost{padding:7px 10px;font-size:11px;white-space:nowrap}
  #map{height:clamp(250px,calc(100dvh - 405px),360px);min-height:250px;border-radius:12px}
  .map-wrap{border-radius:12px}
  .map-hint{bottom:8px;max-width:calc(100% - 18px);padding:6px 9px;font-size:10px;overflow:hidden;text-overflow:ellipsis}
  .point-readout{margin:7px 2px 0;gap:7px;font-size:11px;min-height:25px}
  .point-readout small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:72vw}
  .point-dot{width:10px;height:10px;box-shadow:0 0 0 2px #fff,0 0 0 3px #aaa}
  .form-grid{grid-template-columns:1fr 1fr;gap:6px 8px;margin-top:8px}
  .form-grid label{font-size:10px;line-height:1.15}
  input,select{margin-top:3px;padding:7px 7px;border-radius:8px;font-size:13px;min-height:34px}
  .check-label{padding-top:15px;gap:6px}
  .check-label input{width:18px;height:18px;min-height:18px}
  .primary{margin-top:8px;padding:10px 12px;border-radius:10px;font-size:14px;min-height:40px}
  .status{margin:5px 2px 0;font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .map-result-controls{margin-top:7px;padding:6px 9px;border-radius:10px}
  .map-result-top{margin-bottom:2px;gap:7px}
  .map-result-controls .play{width:30px;height:30px;flex-basis:30px;font-size:12px}
  .map-result-top span{font-size:9px}
  .map-result-top strong{font-size:14px}
  .map-result-controls input[type=range]{height:18px}
  .result{margin-top:10px;padding:10px}
  .result-head{margin-bottom:5px;gap:4px}
  .result-head .section-kicker{display:none}
  .result-head h2{font-size:17px}
  .result-meta{font-size:10px}
  .legend-scale{margin-top:5px}
  .legend-ticks{font-size:9px}
  .result .fine{font-size:10px;margin-bottom:0}
  .method{padding-top:24px}
}

@media(max-width:420px){
  .shell{padding-left:6px;padding-right:6px}
  .hero h1{font-size:27px}
  .hero .lead{font-size:11px}
  .panel{padding:8px}
  .mode-btn{font-size:11px}
  #map{height:clamp(235px,calc(100dvh - 390px),330px);min-height:235px}
  .form-grid{gap:5px 6px}
  input,select{font-size:12px;padding:6px}
}

@media(max-width:360px){
  .hero .lead{display:none}
  .section-head h2{font-size:16px}
  .ghost{font-size:10px;padding:6px 8px}
  #map{height:240px;min-height:240px}
}
