:root {
  --bg: #f6f7f9; --card: #ffffff; --ink: #1c2430; --mute: #667085; --line: #e3e7ee;
  --accent: #0b5cad; --ok: #1f8a4c; --warn: #b7791f; --bad: #c0392b; --sea: #dfe9f3; --land: #cfd6de; --landline: #9aa6b3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; }
a { color: var(--accent); }
header.site { background: #0f2540; color: #fff; padding: 14px 20px; }
header.site h1 { margin: 0; font-size: 22px; letter-spacing: .02em; }
header.site p { margin: 4px 0 0; color: #b9c8dc; font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.card h2 { margin: 0 0 8px; font-size: 17px; }
.card h3 { margin: 12px 0 6px; font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.row label { display: flex; flex-direction: column; font-size: 12px; color: var(--mute); gap: 3px; min-width: 120px; }
.row select, .row input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-width: 120px; }
.row input[type=number] { width: 120px; }
.hint { color: var(--mute); font-size: 12.5px; margin: 6px 0 0; }
.map-wrap { overflow-x: auto; }
svg.map { width: 100%; min-width: 640px; height: auto; background: var(--sea); border-radius: 8px; display: block; }
svg.map .land { fill: none; stroke: var(--landline); stroke-width: .6; }
svg.map .route { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; opacity: .95; }
svg.map .route.best { stroke-width: 3.6; }
svg.map .route.infeasible { stroke-dasharray: 5 4; opacity: .55; }
svg.map .zone { fill: #fff; stroke: #c0392b; stroke-width: 1.4; }
svg.map .zone.hot { fill: #ffd5cc; }
svg.map .zone.calm { stroke: #667085; }
svg.map .lbl { font-size: 9.5px; fill: #1c2430; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; stroke-linejoin: round; }
svg.map .port { fill: #1c2430; }
table.res { width: 100%; border-collapse: collapse; font-size: 14px; }
table.res th, table.res td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: right; vertical-align: top; white-space: nowrap; }
table.res th:first-child, table.res td:first-child { text-align: left; white-space: normal; }
table.res th { color: var(--mute); font-weight: 600; font-size: 12.5px; }
table.res tr.best td { background: #eef7f1; }
table.res tr.infeasible td { color: var(--mute); }
.tbl-wrap { overflow-x: auto; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.bar { height: 8px; background: #e6ebf2; border-radius: 4px; overflow: hidden; min-width: 120px; }
.bar > i { display: block; height: 100%; }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: #eef2f7; color: var(--mute); margin-left: 6px; }
.badge.best { background: #d9f0e1; color: var(--ok); }
.badge.bad { background: #fde3df; color: var(--bad); }
.verdict { font-size: 15.5px; margin: 8px 0; padding: 10px 12px; background: #f1f6fc; border-left: 4px solid var(--accent); border-radius: 6px; }
.verdict b { color: var(--accent); }
.breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.breakdown .kv { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.breakdown .kv b { display: block; font-size: 12px; color: var(--mute); font-weight: 600; }
.breakdown .kv span { font-size: 15px; }
details.ship { margin-top: 8px; }
details.ship summary { cursor: pointer; color: var(--accent); font-size: 13.5px; }
.ship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.ship-grid label { display: flex; flex-direction: column; font-size: 12px; color: var(--mute); }
.ship-grid input { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
ul.actual { padding-left: 0; list-style: none; margin: 0; }
ul.actual li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.actual li:last-child { border-bottom: 0; }
ul.actual .when { color: var(--mute); font-size: 12.5px; }
ul.src { font-size: 13px; color: var(--mute); padding-left: 18px; }
footer.site { text-align: center; color: var(--mute); font-size: 12.5px; padding: 24px 12px; }
@media (max-width: 600px) {
  .row label { min-width: 46%; }
  .row select, .row input { min-width: 0; width: 100%; }
  .row input[type=number] { width: 100%; }
  table.res { font-size: 13px; }
}
