body {
  background: #e8efe6;
  color: #234c52;
  --pixel: Pixel, monospace;
  font:
    650 16px/1.43 Nunito,
    sans-serif;
}
header {
  background: #244c55;
  border-bottom: 4px solid #d7b874;
}
.brand {
  color: #fff3d3;
}
.top nav a {
  color: #f3efe0;
}
.top nav a:hover {
  text-decoration: underline;
}
.top,
main,
footer {
  max-width: 1240px;
}
#light {
  padding-top: 22px;
}
footer {
  margin: 22px auto 0;
  padding-top: 14px;
  border-top: 1px solid #b4cbc2;
}
footer a,
.charts-shelf a,
.navigation-book > a,
.paper-chart a {
  color: #2c616b;
}
.harbor-postcard {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  background: #f9f1d9;
  border: 2px solid #7b9a90;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px #bbc9b7;
}
.harbor-postcard > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  max-height: 438px;
  object-fit: cover;
  object-position: 50% 48%;
}
.port-sign {
  align-self: center;
  padding: clamp(22px, 3vw, 43px);
  position: relative;
}
.port-sign:before,
.port-sign:after {
  content: '≋';
  position: absolute;
  right: 22px;
  font:
    700 35px Georgia,
    serif;
  color: #94b2a7;
}
.port-sign:before {
  top: 4px;
}
.port-sign:after {
  bottom: 0;
}
.port-sign small,
.quay-heading small,
.berth-door small,
.port-stamp small,
.opened-slip small {
  font:
    900 0.74rem Nunito,
    sans-serif;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  color: #6a6953;
}
.port-sign h1,
.quay-heading h1 {
  color: #244f57;
  font: 700 clamp(3em, 4.9vw, 4.55em)/0.92 var(--pixel);
  letter-spacing: -0.045em;
  margin: 8px 0 12px;
}
.port-sign p {
  max-width: 31ch;
  margin: 0 0 18px;
  font-size: 1.1rem;
}
#light .brass {
  display: inline-flex;
  align-items: center;
  background: #ffdb92;
  border: 1px solid #9f8049;
  box-shadow: 0 2px 0 #a48251;
  border-radius: 8px;
  padding: 9px 14px;
  color: #3b4542;
  text-decoration: none;
  font-weight: 950;
}
.berth-doors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 17px 0;
}
.berth-door {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fcf7e8;
  border: 1px solid #a8bfb2;
  border-top: 4px solid #87aca3;
  padding: 12px;
  border-radius: 9px;
  color: #2d5357;
  text-decoration: none;
  box-shadow: 0 2px #c4d1bd;
}
.berth-door:hover {
  background: #fff1cc;
}
.ticket-mark {
  font:
    26px Georgia,
    serif;
  color: #a3594f;
}
.berth-door strong,
.berth-door em {
  display: block;
}
.berth-door strong {
  font: 700 1.35rem/1.06 var(--pixel);
  margin: 6px 0;
}
.berth-door em {
  font-size: 0.86rem;
  font-style: normal;
}
.charts-shelf {
  border-block: 1px solid #adbfaa;
  padding: 9px 4px;
}
.charts-shelf summary,
.manifest summary,
.bottle-result summary {
  cursor: pointer;
  font-weight: 850;
}
.quay-heading h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.55rem);
}
.quay-tabs,
.rope-row,
.pilots,
.knot-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.quay-tabs {
  margin: 0 0 12px;
}
.quay-tabs a {
  padding: 5px 11px;
  color: #315b62;
  border: 1px solid #98afa7;
  background: #f7f6e9;
  border-radius: 6px;
  font-weight: 850;
  text-decoration: none;
}
.quay-tabs .on {
  background: #315e69;
  color: #fff1d0;
  border-color: #315e69;
}
.quay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 0.85fr);
  gap: 15px;
  align-items: start;
  margin-bottom: 15px;
}
.helm,
.navigation-book {
  min-width: 0;
  background: #fff8e7;
  border: 1px solid #98afa2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px #beccb9;
}
.navigation-book {
  padding: 15px 17px;
  border-top: 5px solid #b27760;
  background: #f5ebd2;
}
.navigation-book h2,
.telegram h2,
.port-stamp h2 {
  font: 700 1.66rem/1.05 var(--pixel);
  margin: 0 0 6px;
}
.navigation-book > p {
  font-size: 0.93rem;
  line-height: 1.44;
}
.stage-work {
  padding: 15px clamp(12px, 2vw, 20px);
}
.telegram p {
  margin: 0 0 12px;
}
.stage-work button,
.pilots button {
  background: #fffaf0;
  border: 1px solid #93a99a;
  color: #28535a;
  border-radius: 7px;
  min-height: 38px;
  font-weight: 850;
}
.stage-work [aria-pressed='true'] {
  background: #c7e3d4;
  color: #204f4b;
  border: 2px solid #618d80;
}
.rope-row,
.pilots,
.knot-line {
  margin: 9px 0;
}
.pilots > span {
  margin-right: auto;
}
.opened-slip,
.manifest,
.bottle-result,
.knot-line,
.legend-strip {
  border: 1px solid #b9c5ad;
  border-radius: 9px;
  padding: 9px 12px;
  background: #ecf0df;
}
.opened-slip {
  border: 1px dashed #b8a87f;
  background: #fff4d4;
  min-height: 60px;
}
.opened-slip > * {
  display: block;
}
.opened-slip span,
.manifest p {
  font-size: 0.86rem;
}
.manifest {
  margin-top: 9px;
}
.manifest p {
  margin: 5px 0;
}
lighthouse-harbor {
  display: block;
}
.harbor-water {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 282;
  background: #88c4c0;
  border-bottom: 4px solid #8eaa9d;
}
.harbor-water canvas,
.berth-buttons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.berth-buttons {
  pointer-events: none;
}
.berth-buttons button {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -15%);
  border: 1px solid #657e78;
  box-shadow: 0 2px #517d79;
  background: #f8efce;
  color: #345458;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 950;
  line-height: 1;
  padding: 5px 9px;
  min-width: 32px;
}
.berth-buttons button[aria-pressed='true'] {
  background: #ffdc83;
  border-color: #8e693f;
}
.berth-buttons button.marked:after {
  content: '•';
  color: #934f44;
  margin-left: 3px;
}
#quay-status {
  padding: 9px 14px;
  margin: 0 14px 14px;
  border-left: 3px solid #b17a59;
  background: #f5ead0;
  color: #454a3c;
}
#quay-status:empty {
  display: none;
}
.trial-board {
  margin: 12px 0;
}
.trial-board > div {
  display: grid;
  grid-template-columns: minmax(95px, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 6px 8px;
  border-bottom: 1px solid #c9d0ba;
  font-size: 0.88rem;
}
.trial-board span:not(:first-child) {
  text-align: center;
}
.trial-head {
  background: #dfe9d6;
  color: #365955;
  border-radius: 6px;
  font-weight: 900;
}
.fog-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.fog-panel fieldset {
  border: 1px solid #bdc6af;
  border-radius: 8px;
  padding: 4px 6px 7px;
  margin: 0;
}
.fog-panel legend {
  font-size: 0.83rem;
  font-weight: 900;
}
.fog-panel button {
  min-height: 35px;
  margin: 2px;
}
.scroll-track {
  display: flex;
  gap: 3px;
  margin: 14px 0 0;
  flex-wrap: wrap;
}
.scroll-track span {
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid #b9ba9d;
  background: #eee9cf;
  border-radius: 4px;
  min-width: 26px;
  height: 34px;
  flex: 1;
  font-size: 0.8rem;
}
.scroll-track .within {
  background: #b9dcd2;
  border-color: #89aa9a;
}
.scroll-track .gold:after {
  content: '◆';
  position: absolute;
  font-size: 9px;
  top: -8px;
  color: #a55d43;
}
.legend-strip {
  padding: 5px;
  font-size: 0.8rem;
  background: transparent;
  border: 0;
}
.paper-chart {
  margin: 12px 0;
  padding: 12px;
  background: #e6ecda;
  border-radius: 10px;
  border: 1px solid #b9c6b1;
}
.paper-chart figcaption span,
.paper-chart figcaption b,
.paper-chart svg {
  display: block;
}
.paper-chart figcaption span,
.paper-chart small {
  font-size: 0.8rem;
}
.paper-chart svg {
  width: 100%;
  margin: 8px 0 3px;
}
.paper-chart text {
  text-anchor: middle;
  font:
    700 11px Nunito,
    sans-serif;
  fill: #335456;
}
.knot-line span {
  background: #ffedc4;
  border: 1px dashed #a58a5f;
  border-radius: 50px;
  padding: 3px 8px;
}
.knot-line em {
  font-size: 0.85rem;
}
.bottle-result {
  margin-top: 8px;
  display: flex;
  gap: 4px 12px;
  flex-wrap: wrap;
}
.bottle-result > strong {
  color: #7e5844;
}
.bottle-result details {
  flex-basis: 100%;
  font-size: 0.86rem;
}
.bottle-result ul {
  padding-left: 18px;
}
.port-stamp > span {
  display: block;
  font-size: 33px;
}
.port-stamp > a,
.port-stamp > button {
  margin: 6px 6px 6px 0;
}
@media (max-width: 880px) {
  .berth-doors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quay-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.8fr);
  }
  .harbor-postcard {
    grid-template-columns: 1.3fr 1fr;
  }
}
@media (max-width: 680px) {
  .top {
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-block: 7px;
  }
  .top nav {
    gap: 6px 10px;
    flex-wrap: wrap;
    font-size: 0.83rem;
  }
  #light {
    padding-top: 12px;
  }
  .harbor-postcard,
  .quay-layout {
    grid-template-columns: 1fr;
  }
  .harbor-postcard > img {
    height: auto;
    min-height: 0;
    max-height: 290px;
    aspect-ratio: 1.8;
  }
  .port-sign {
    padding: 16px 18px;
  }
  .port-sign br {
    display: none;
  }
  .port-sign h1 {
    font-size: 2.9rem;
  }
  .port-sign p {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  .ticket-mark {
    display: none;
  }
  .berth-door {
    padding: 9px;
  }
  .berth-door strong {
    font-size: 1.15rem;
  }
  .quay-tabs {
    gap: 5px;
  }
  .quay-tabs a {
    font-size: 0.83rem;
    padding: 5px 7px;
  }
  .pilots {
    gap: 4px;
  }
  .pilots > span {
    flex-basis: 100%;
  }
  .berth-buttons button {
    min-width: 33px;
    min-height: 28px;
    padding: 3px 8px;
    font-size: 0.73rem;
    transform: translate(-50%, -38%);
  }
  .harbor-water {
    aspect-ratio: 2.35;
  }
  .trial-board > div {
    font-size: 0.76rem;
    grid-template-columns: minmax(85px, 1.3fr) repeat(3, minmax(0, 1fr));
  }
  .stage-work button {
    min-height: 42px;
  }
  .fog-panel fieldset {
    flex: 1 1 105px;
  }
  .scroll-track {
    gap: 2px;
  }
  .scroll-track span {
    min-width: 19px;
  }
  .opened-slip {
    min-height: 66px;
  }
}

.charter-desk {
  background: #e2eddd;
  border: 1px solid #a8bdad;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.charter-desk h3 {
  font: 700 1.3rem var(--pixel);
  margin: 0;
}
.charter-desk p {
  margin: 4px 0;
}
.fare {
  background: #fff0c8;
  border-left: 3px solid #a6854e;
  padding: 8px 12px;
}
