:root {
  color-scheme: dark;
  --bg: #101724;
  --panel: #192438;
  --ink: #e9eff6;
  --muted: #b0bed1;
  --line: #40516a;
  --accent: #b4d2f2;
  --warning: #f3d69b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 system-ui, -apple-system, "Noto Sans JP", sans-serif;
}
main { max-width: 960px; margin: auto; padding: 30px 24px; }
header { padding: 24px 0 35px; }
a { color: var(--accent); }
.home { font-size: 14px; text-decoration: none; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .14em; margin-top: 32px; }
h1 { font-size: clamp(29px, 5vw, 48px); line-height: 1.4; font-weight: 650; letter-spacing: .025em; margin: 16px 0; }
.lead { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges span { padding: 3px 12px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; }
section { padding: 26px; background: var(--panel); border: 1px solid #34435a; border-radius: 16px; margin-bottom: 20px; }
h2 { font-size: 19px; margin: 0 0 18px; }
h3 { font-size: 16px; margin: 25px 0 6px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend, label { font-size: 14px; }
label { display: block; margin: 12px 0 6px; }
textarea, input, select, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  background: #111b2b;
  color: var(--ink);
  border: 1px solid #647b99;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
}
input[type="date"] { max-width: 100%; }
textarea { resize: vertical; font: 14px/1.65 ui-monospace, monospace; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
button { border: 1px solid #748baa; border-radius: 8px; background: #293b55; color: var(--ink); padding: 10px 16px; cursor: pointer; min-height: 46px; }
button.primary { background: var(--accent); color: #14283f; font-weight: 700; border-color: var(--accent); }
button.quiet { font-size: 13px; background: transparent; }
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--warning); outline-offset: 3px; }
.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode-picker label { margin: 0; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 2px 10px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; }
.mode-picker label:has(input:checked) { border-color: var(--accent); background: #233750; }
.mode-picker span { font-weight: 650; }
.mode-picker small { grid-column: 2; color: var(--muted); font-size: 12px; }
.two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.weekdays { margin: 20px 0; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-options label { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 44px; }
.weekday-options label:has(input:checked) { border-color: #8aa7ca; background: #263950; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0; overflow-wrap: anywhere; }
.warning { color: var(--warning); font-size: 14px; padding-left: 12px; border-left: 2px solid var(--warning); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 10px; }
#status { font-size: 14px; min-height: 1.75em; margin-bottom: 0; }
#status[data-error="true"] { color: var(--warning); }
.result-eyebrow { margin: 0 0 5px; }
.range-summary { color: var(--accent); font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.destination { padding: 20px; background: #22354d; border-radius: 12px; margin-bottom: 16px; }
.destination > span { display: block; color: var(--muted); font-size: 13px; }
.destination strong { display: block; font-size: clamp(25px, 5vw, 38px); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.destination p { font-size: 14px; margin: 6px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metrics div { border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
dt { font-size: 12px; color: var(--muted); }
dd { margin: 5px 0 0; font-size: 26px; font-variant-numeric: tabular-nums; }
.convention { font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
caption { text-align: left; padding: 12px; background: #111b2b; color: var(--muted); }
th, td { padding: 12px; text-align: left; border-top: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 500; }
th:first-child, td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
th:last-child, td:last-child { text-align: right; white-space: nowrap; }
.day-state { color: var(--accent); font-size: 12px; display: block; font-weight: 650; }
.day-state.excluded { color: var(--muted); }
.day-reason { color: var(--muted); font-size: 12px; }
.pr { display: flex; flex-direction: column; gap: 3px; padding: 20px; margin-top: 25px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.pr strong { font-size: 11px; }
.guide { background: transparent; }
.guide p { color: var(--muted); font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  main { padding: 16px 12px; }
  header { padding-top: 10px; }
  section { padding: 20px 14px; }
  .two-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mode-picker { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mode-picker label { padding: 10px 12px; }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .metrics div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; }
  dd { font-size: 23px; margin: 0; }
  .toolbar button { flex: 1 1 auto; }
  .shortcut { flex-basis: 100%; }
  .weekday-options { gap: 6px; }
  .weekday-options label { padding: 8px 10px; }
  th, td { padding: 10px 7px; }
  th:nth-child(2), td:nth-child(2) { padding-left: 2px; padding-right: 2px; }
  .destination { padding: 15px; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: filter .15s ease; }
}
