* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2430; }
body { display: flex; }
#panel { width: 400px; max-width: 100%; height: 100%; overflow-y: auto; padding: 14px 16px; background: #fafbfc; border-right: 1px solid #dde2e8; }
#map { flex: 1; height: 100%; }
h1 { margin: 0; font-size: 20px; }
.sub { margin: 2px 0 10px; color: #5b6573; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 8px; border: 1px solid #c9d1db; background: #fff; border-radius: 6px; cursor: pointer; font-weight: 600; }
.tabs button.active { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
label { display: block; margin: 6px 0; font-weight: 600; font-size: 12px; color: #3a4452; }
input, select { width: 100%; padding: 6px 8px; border: 1px solid #c9d1db; border-radius: 5px; font: inherit; font-weight: 400; }
.row { display: flex; gap: 8px; align-items: end; }
.row > * { flex: 1; }
.addr { display: flex; gap: 4px; }
.addr button { width: 34px; flex: none; border: 1px solid #c9d1db; background: #fff; border-radius: 5px; cursor: pointer; }
.addr button.armed { background: #ffd34d; }
.check { display: flex; align-items: center; gap: 6px; }
.check input[type=checkbox] { width: auto; }
.check input[type=number] { width: 70px; }
button.go { width: 100%; margin: 10px 0; padding: 10px; border: 0; border-radius: 6px; background: #1f5fbf; color: #fff; font-weight: 700; cursor: pointer; }
button.go:disabled { opacity: .5; cursor: wait; }
button.small { padding: 4px 8px; border: 1px solid #c9d1db; background: #fff; border-radius: 5px; cursor: pointer; font-size: 12px; }
.settings, .curve { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
#curve-chart { width: 100%; height: 120px; background: #fff; border: 1px solid #dde2e8; border-radius: 5px; }
#curve-table { width: 100%; border-collapse: collapse; margin: 6px 0; }
#curve-table td, #curve-table th { padding: 2px 4px; font-size: 12px; }
#curve-table input { padding: 3px 5px; }
#curve-table button { border: 0; background: none; cursor: pointer; color: #b03a2e; }
.note { padding: 8px 10px; border-radius: 6px; margin: 6px 0; font-size: 13px; background: #eef3fb; }
.note.warn { background: #fff4d6; }
.note.err { background: #fde2df; }
.out table { width: 100%; border-collapse: collapse; font-size: 12px; }
.out th { text-align: left; color: #5b6573; font-weight: 600; border-bottom: 1px solid #dde2e8; padding: 4px 3px; }
.out td { padding: 5px 3px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.out tr.station { cursor: pointer; }
.out tr.station:hover, .out tr.station.sel { background: #eef3fb; }
.out tr.best td:first-child { border-left: 4px solid #2e9e5b; }
.num { text-align: right; white-space: nowrap; }
.muted { color: #7a8492; }
.big { font-size: 22px; font-weight: 800; }
.cards { display: flex; gap: 8px; }
.card { flex: 1; background: #fff; border: 1px solid #dde2e8; border-radius: 8px; padding: 8px; }
.card h3 { margin: 0 0 4px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.card.win { border: 2px solid #2e9e5b; }
.swatch { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.card dl { display: grid; grid-template-columns: 1fr auto; margin: 0; font-size: 12px; row-gap: 2px; }
.card dd { margin: 0; text-align: right; }
.verdict { margin: 10px 0; padding: 10px; background: #e7f5ec; border-radius: 8px; }
#suggest { position: fixed; z-index: 2000; margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #c9d1db; border-radius: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
#suggest li { padding: 6px 10px; cursor: pointer; font-size: 13px; }
#suggest li:hover, #suggest li.on { background: #eef3fb; }
footer { margin-top: 16px; font-size: 11px; color: #7a8492; }
.pin { font-size: 22px; line-height: 22px; text-align: center; text-shadow: 0 0 3px #fff; }
@media (max-width: 760px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; height: 55%; border-right: 0; border-top: 1px solid #dde2e8; }
  #map { height: 45%; flex: none; }
}
.detail { background: #fff; border: 1px solid #dde2e8; border-radius: 8px; padding: 10px; margin: 8px 0; }
.detail-head { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.rank { flex: none; width: 26px; height: 26px; border-radius: 13px; background: #1f5fbf; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bill { display: grid; grid-template-columns: 1fr auto; margin: 0 0 6px; font-size: 13px; row-gap: 3px; column-gap: 8px; }
.bill dd { margin: 0; text-align: right; white-space: nowrap; }
.bill .sub { border-top: 1px dashed #c9d1db; padding-top: 3px; font-weight: 600; }
.bill .tot { border-top: 1px solid #1d2430; padding-top: 4px; font-weight: 800; font-size: 15px; }
.good { color: #2e9e5b; font-weight: 600; }
.cmp-bar { align-items: center; margin: 6px 0; }
.cmp-bar button { flex: none; }
.cmp-bar button:not(:disabled) { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.out table.compare { margin: 8px 0; background: #fff; border: 1px solid #dde2e8; border-radius: 8px; font-size: 13px; }
.compare th { font-weight: 600; color: #3a4452; }
.compare thead th { vertical-align: bottom; }
.compare tr.tot td, .compare tr.tot th { border-top: 1px solid #1d2430; }
.compare tr.diff td { font-weight: 700; }
.out td input.cmp { width: auto; }
.out table.compare { table-layout: fixed; width: 100%; }
.compare th:first-child { width: 34%; }
.compare td, .compare thead th { word-wrap: break-word; }
.compare thead th.num { white-space: normal; }
