@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --page: #181b20;
  --surface: #22262c;
  --deep: #14171b;
  --border: #3a3f46;
  --rule: #343940;
  --ink: #f0f0ed;
  --muted: #b2b7bd;
  --gold: #ebc880;
  --water: #8ad4c7;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
  font: 15px/1.45 "Instrument Sans", "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, ol { margin: 0; }
a { color: var(--gold); text-underline-offset: 3px; }
button, select { font: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.mast { background: var(--deep); border-bottom: 1px solid var(--border); }
nav, .brand, .nav-links, .page-head, .panel-head, footer, .route-caption {
  display: flex;
  align-items: center;
}
nav { min-height: 54px; gap: 42px; }
nav a { text-decoration: none; }
.brand { gap: 9px; font-size: 1.13rem; font-weight: 700; color: var(--ink); letter-spacing: -.035em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--gold);
  color: #242225;
  font: italic bold 20px/1 Georgia, serif;
  border-radius: 3px 3px 9px 3px;
}
.nav-links { align-self: stretch; gap: 24px; }
.nav-links a { display: grid; align-items: center; color: var(--muted); font-weight: 600; font-size: .9rem; border-block: 2px solid transparent; }
.nav-links a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.nav-links a:hover, footer a:hover { color: white; }
.game { margin-left: auto; color: var(--muted); font-size: .84rem; }
.page-head { justify-content: space-between; gap: 16px; padding: 28px 0 17px; }
h1 { font-size: clamp(1.67rem, 3vw, 2.2rem); letter-spacing: -.045em; line-height: 1.15; font-weight: 650; }
h2 { font-size: 1.15rem; letter-spacing: -.022em; font-weight: 650; }
.zone-control { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .86rem; }
select {
  max-width: 100%;
  background: #292e35;
  color: var(--ink);
  border: 1px solid #494f59;
  padding: 6px 7px;
  border-radius: 3px;
  font-size: .86rem;
}
select:hover { border-color: #879098; }
.live-board {
  --accent: var(--gold);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #292a29;
  border: 1px solid #514b3e;
  border-left: 3px solid var(--accent);
}
.live-board.open { --accent: var(--water); border-color: #365751; border-left-color: var(--accent); background: #21312f; }
.key { font-size: .72rem; line-height: 1.35; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.live-board .key { color: var(--accent); }
.next-voyage h2 { margin: 3px 0 1px; line-height: 1.18; font-size: 1.48rem; }
.window, #detail-window { font-size: .87rem; color: var(--muted); }
.timer { margin-left: auto; padding-left: 18px; text-align: right; }
.timer span { display: block; }
#countdown { color: var(--accent); font: 500 clamp(1.65rem, 3.6vw, 2.85rem)/1.12 var(--mono); letter-spacing: -.06em; }
.signal { position: relative; width: 51px; height: 43px; flex: none; color: var(--accent); border-bottom: 2px solid currentColor; }
.signal::before, .signal::after { content: ""; position: absolute; background: currentColor; }
.signal::before { inset: 0 6px 11px; clip-path: polygon(5% 91%, 51% 0, 51% 91%, 61% 91%, 61% 20%, 98% 91%); }
.signal::after { inset: auto 0 4px; height: 7px; clip-path: polygon(0 0, 100% 0, 83% 100%, 17% 100%); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30%); gap: 18px; align-items: start; margin: 20px 0; }
.timetable, .details, .route-list { border: 1px solid var(--border); background: var(--surface); }
.panel-head { min-height: 52px; padding: 9px 16px; border-bottom: 1px solid var(--border); justify-content: space-between; gap: 10px; }
.panel-head label { max-width: 53%; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; }
thead th { color: var(--muted); font-size: .77rem; font-weight: 600; padding: 7px 14px; }
thead th:first-child { width: 18%; }
thead th:last-child { width: 23%; }
.date-row th {
  background: #1b1e23;
  color: #c3c8cd;
  border-block: 1px solid var(--rule);
  font: 600 .73rem/1.25 var(--mono);
  letter-spacing: .04em;
  padding: 6px 14px;
}
.sailing td { height: 43px; padding: 2px 14px; border-top: 1px solid var(--rule); }
.sailing { cursor: pointer; }
.sailing:hover { background: #30363b; }
.sailing.selected { background: #2b3d3e; }
.sailing.selected td:first-child { box-shadow: inset 3px 0 0 var(--water); }
.sailing time { font: 600 1.07rem/1.2 var(--mono); white-space: nowrap; color: #efefea; }
.open-label { display: block; color: var(--water); font-size: .68rem; line-height: 1.15; }
.route-button {
  background: none; border: 0; color: var(--ink); font-weight: 600; padding: 5px 0; text-align: left; line-height: 1.23;
}
.route-button:hover { text-decoration: underline; }
.route-button::after { content: "›"; display: inline-block; margin-left: .4em; color: #899b9e; }
.selected .route-button { color: #b6f0e5; }
.phase { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .86rem; }
.phase-icon { display: inline-grid; place-items: center; width: 1.05rem; line-height: 1; font-family: "Segoe UI Symbol", sans-serif; font-size: 1.08rem; }
.phase-day { color: #f2cf73; }
.phase-sunset { color: #f3a27e; }
.phase-night { color: #aabff5; }
.details:focus { outline: none; }
.details:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
.detail-body { padding: 16px; }
.detail-body h3 { font-size: 1.36rem; font-weight: 650; letter-spacing: -.032em; line-height: 1.2; margin: 3px 0; }
.stops, .guide-stops { list-style: none; padding: 0; counter-reset: port; }
.stops { margin: 20px 0; }
.stops li, .guide-stops li { position: relative; counter-increment: port; }
.stops li { padding: 0 0 18px 31px; font-size: .92rem; }
.stops li:last-child { padding-bottom: 0; }
.stops li::before, .guide-stops li::before {
  content: counter(port); position: absolute; left: 0; top: 1px;
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid #75868b; color: #cedbdb; background: var(--surface); font: 600 .66rem var(--mono);
}
.stops li:not(:last-child)::after { content: ""; position: absolute; top: 20px; bottom: 0; left: 9px; border-left: 1px solid #66777a; }
.stops li:last-child::before, .guide-stops li:last-child::before { background: #b1d5cd; border-color: #b1d5cd; color: #182321; }
.stops .phase { display: flex; margin-top: 3px; color: var(--muted); font-size: .8rem; }
.calendar {
  display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; min-height: 36px;
  border: 1px solid #676250; border-radius: 3px; color: var(--gold); background: #34332e; font-weight: 600; padding: 6px 10px;
}
.calendar:hover { background: #444034; border-color: var(--gold); }
.return { display: none; }
.boarding { max-width: 82ch; margin: 22px 0 26px; color: var(--muted); font-size: .9rem; }
.boarding h2 { font-size: 1.02rem; margin-bottom: 4px; color: var(--ink); }
.boarding p + p, .boarding details { margin-top: 6px; }
.boarding strong { color: #d8dbda; }
.coords { white-space: nowrap; }
summary { cursor: pointer; color: var(--gold); width: fit-content; }
details[open] summary { margin-bottom: 5px; }
.no-js, .guide-intro { margin-bottom: 18px; color: var(--muted); }
footer { justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 15px 0 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
footer a { color: inherit; }
.guide .page-head { padding-bottom: 8px; }
.guide-intro { font-size: .95rem; }
.route-entry { padding: 15px 18px; }
.route-entry + .route-entry { border-top: 1px solid var(--border); }
.route-caption { justify-content: space-between; gap: 10px; }
.route-caption h2 { color: #cfebe5; }
.route-caption a { white-space: nowrap; font-size: .86rem; }
.guide-stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.guide-stops li { padding-left: 26px; font-size: .9rem; }
@media (max-width: 780px) {
  .wrap { width: calc(100% - 34px); }
  .workspace { grid-template-columns: 1fr; gap: 13px; }
  .detail-body { padding: 14px 16px; }
  .return { display: inline-block; margin-top: 11px; font-size: .85rem; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 24px); }
  nav { gap: 19px; min-height: 47px; }
  .brand { gap: 6px; font-size: 1rem; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: .83rem; }
  .game, .signal { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 8px; padding: 17px 0 11px; }
  .zone-control select { padding: 4px 5px; }
  .live-board { padding: 11px; gap: 5px; }
  .next-voyage h2 { font-size: 1.1rem; }
  .timer { padding-left: 5px; white-space: nowrap; }
  .key { font-size: .65rem; letter-spacing: .06em; }
  .window { font-size: .76rem; }
  .workspace { margin: 13px 0; }
  .panel-head { padding: 7px 9px; min-height: 43px; }
  .panel-head h2 { font-size: 1rem; }
  .panel-head select { font-size: .8rem; }
  .sailing td, thead th, .date-row th { padding-inline: 9px; }
  .sailing td { height: 44px; }
  .route-button { font-size: .88rem; }
  .phase { gap: 3px; font-size: .8rem; }
  .sailing time { font-size: .94rem; }
  .guide-stops { grid-template-columns: 1fr; gap: 9px; }
  .guide-stops li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 9px; height: 10px; border-left: 1px solid #66777a; }
  .route-entry { padding: 13px 12px; }
  footer { gap: 5px; flex-direction: column; align-items: flex-start; }
}
