/* The watch desk. All sizes below are logical CSS pixels. */
.wh-root {
  --wh-ink: #37392d;
  --wh-dim: #596052;
  --wh-paper: #e8daba;
  --wh-chalk: #f1e9d3;
  --wh-faded: #c0c6b4;
  --wh-line: #647065;
  --wh-timber: #343b30;
  --wh-serif: Georgia, "Times New Roman", serif;
  --wh-sans: HarbourUI, system-ui, sans-serif;
  --wh-gap: clamp(10px, 1.45vw, 24px);
  font: 14px/1.4 var(--wh-sans);
  color: var(--wh-chalk);
  position: relative;
  z-index: 2;
}
.wh-root *,
.wh-root *:before,
.wh-root *:after {
  box-sizing: border-box;
}
.wh-root button {
  font: inherit;
  cursor: pointer;
}
.wh-root button:disabled {
  opacity: 0.42;
  cursor: default;
}
.wh-root button:focus-visible,
.wh-root input:focus-visible,
.wh-root [tabindex]:focus-visible {
  outline: 2px solid #ba651d;
  outline-offset: 2px;
}
.wh-root button,
.wh-root input {
  touch-action: manipulation;
}
.wh-root h1,
.wh-root h2,
.wh-root h3 {
  font-family: var(--wh-serif);
  letter-spacing: 0;
  margin: 0;
  line-height: 1.12;
}
.wh-root p {
  margin: 0;
}
.wh-root [hidden] {
  display: none !important;
}
.wh-glyph {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}
.wh-kicker,
.wh-folio,
.wh-state-row small,
.wh-entry small {
  font: 600 10px/1.3 var(--wh-sans);
  text-transform: uppercase;
  letter-spacing: 0.135em;
}
.wh-kicker {
  color: #c7c9b7;
}
.wh-box {
  position: relative;
  isolation: isolate;
}
.wh-box:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  border: 20px solid transparent;
  border-image: url("command-board.png") 40 fill / 20px round;
}
.wh-tool {
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid #687065;
  color: inherit;
  border-radius: 2px;
  width: 31px;
  height: 31px;
  padding: 5px;
}
.wh-tool:hover:not(:disabled) {
  background: #61716533;
}
.wh-hud,
.wh-signals,
.wh-journal,
.wh-map-home {
  position: fixed;
  filter: drop-shadow(0 3px 3px #15231f4d);
}
.wh-hud {
  left: var(--wh-gap);
  top: var(--wh-gap);
  width: min(329px, calc(100vw - 24px));
  padding: 15px 17px 12px;
}
.wh-id {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.wh-id h1 {
  color: #f0e6cc;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.wh-seal {
  height: 49px;
  width: 49px;
  object-fit: contain;
}
.wh-id-tools {
  display: flex;
  gap: 3px;
  align-self: start;
}
.wh-id-tools .wh-tool {
  border: 0;
  width: 26px;
  height: 31px;
}
.wh-id-tools .wh-glyph {
  width: 16px;
  height: 16px;
}
.wh-port-name {
  display: block;
  font-size: 9px;
  letter-spacing: 0.12em;
}
.wh-cargo {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  color: #eee6d0;
  background: #17251f66;
  border: 0;
  border-block: 1px solid #586256;
  padding: 5px 0;
  margin: 8px 0 4px;
}
.wh-cargo span {
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: center;
  border-inline-start: 1px solid #4b594d;
}
.wh-cargo span:first-child {
  border: 0;
}
.wh-cargo img {
  width: 22px;
  height: 21px;
  object-fit: contain;
}
.wh-cargo b {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.wh-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.wh-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  padding: 5px 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--wh-chalk);
  min-height: 31px;
}
.wh-nav button:hover {
  background: #dad0ad16;
}
.wh-nav .wh-glyph {
  width: 14px;
  height: 14px;
  color: #c5bd9b;
}
.wh-root[data-compact="true"] .wh-hud-body {
  display: none;
}
.wh-root[data-compact="true"] .wh-hud {
  padding-bottom: 15px;
}
.wh-signals {
  right: var(--wh-gap);
  top: var(--wh-gap);
}
.wh-watch-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  color: #293c36;
  font-weight: 700 !important;
  border: 1px solid #6e6c54;
  outline: 1px dashed #96886b;
  outline-offset: -4px;
  background: #dacbaa url("../material/sailcloth.png") repeat;
  background-size: 64px 64px;
  min-height: 37px;
}
.wh-watch-btn .wh-glyph {
  width: 16px;
}
.wh-count {
  background: #485e4f;
  color: #f8edd4;
  padding: 0 5px;
  min-width: 17px;
  font-size: 12px;
}
.wh-watch-btn[data-alert="true"] .wh-count {
  background: #884b35;
}
.wh-journal {
  bottom: var(--wh-gap);
  left: var(--wh-gap);
  z-index: 4;
  width: min(375px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
}
.wh-unroll {
  height: 0;
  overflow: hidden;
  transition: height 0.46s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}
.wh-root[data-journal="true"] .wh-unroll {
  height: min(385px, 52svh);
  pointer-events: auto;
}
.wh-inner {
  height: min(385px, 52svh);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wh-top-rod {
  flex: 0 0 23px;
  border: solid transparent;
  border-width: 0 33px;
  border-image: url("journal-top.png") 0 66 fill / 0 33px stretch;
  z-index: 1;
}
.wh-paper {
  min-height: 0;
  flex: 1;
  position: relative;
  margin: -8px 15px -2px;
  padding: 17px 17px 7px;
  background: #e7d8b8 url("../material/rag-paper.png") repeat;
  background-size: 64px;
  box-shadow:
    inset 4px 0 5px #705d3d36,
    inset -3px 0 5px #705d3d36,
    inset 0 7px 6px #705d3d38;
  color: var(--wh-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-inline: 1px solid #9e8a66;
}
.wh-paper:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(transparent, #8c795b45);
  pointer-events: none;
}
.wh-paper h2 {
  font-size: 28px;
  line-height: 1.1;
}
.wh-paper .wh-kicker,
.wh-dialog .wh-kicker {
  color: #67634e;
}
.wh-paper header {
  padding: 0 0 7px;
  border-bottom: 2px solid #817e64;
}
.wh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 0;
  border-bottom: 1px solid #b4a987;
}
.wh-filters button {
  background: transparent;
  border: 0;
  padding: 3px 7px;
  color: #505442;
  font-size: 12px;
  min-height: 24px;
}
.wh-filters button[aria-pressed="true"] {
  background: #3c5147;
  color: #f5ead0;
}
.wh-entries {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8d9079 transparent;
  flex: 1;
}
.wh-entry {
  display: grid;
  grid-template-columns: 41px 1fr;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid #b3ac90;
}
.wh-entry time {
  font:
    12px/1.6 ui-monospace,
    monospace;
  color: #6a6952;
}
.wh-entry b,
.wh-entry small {
  display: block;
}
.wh-entry b {
  font: 600 15px/1.25 var(--wh-serif);
}
.wh-entry small {
  font-size: 8px;
  letter-spacing: 0.11em;
  color: #686d55;
}
.wh-entry p,
.wh-state-row p {
  font-size: 12px;
  line-height: 1.4;
  color: #525848;
  margin: 2px 0 0;
}
.wh-folio {
  font-size: 8px;
  text-align: right;
  color: #73735a;
  padding-top: 6px;
}
.wh-roller {
  height: 44px;
  color: #3c362a;
  background: transparent;
  border: solid transparent;
  border-width: 0 52px;
  border-image: url("journal-foot.png") 0 104 fill / 0 52px stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: 600 19px/1 var(--wh-serif) !important;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.wh-unread {
  background: #8e4b35;
  color: #f3e7c9;
  padding: 2px 5px;
  font: 700 11px var(--wh-sans);
  border-radius: 2px;
}
.wh-roller i {
  font-style: normal;
  font-size: 11px;
}
.wh-root[data-journal="true"] .wh-roller i {
  transform: rotate(180deg);
}
.wh-root[data-motion="false"] .wh-unroll {
  transition: none;
}
.wh-empty {
  padding: 12px 0;
  font-style: italic;
}
.wh-map-home {
  bottom: var(--wh-gap);
  right: var(--wh-gap);
  width: 223px;
}
.wh-map {
  padding: 13px 14px 12px;
  background: transparent;
  color: #eee8d0;
}
.wh-map:before {
  border-image-source: url("chart-battens.png");
  border-width: 22px;
  border-image-slice: 44 fill;
  border-image-width: 22px;
}
.wh-map:after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 6px;
  background: #2e4239;
}
.wh-map header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.wh-map .wh-kicker {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: #e6dcbf;
}
.wh-bearing {
  font: 600 10px var(--wh-serif);
  color: #cfcbb0;
}
.wh-map-view {
  background: #8baba6;
  border: 1px solid #1f332c;
}
.wh-chart {
  width: 100%;
  display: block;
  aspect-ratio: 300/190;
  touch-action: none;
  cursor: grab;
}
.wh-chart:active {
  cursor: grabbing;
}
.wh-chart g[data-port] {
  cursor: pointer;
}
.wh-map-foot {
  padding-top: 7px;
}
.wh-map-cap {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font: 12px var(--wh-serif);
}
.wh-map-cap span {
  font: 10px/1.5 var(--wh-sans);
  color: #d1d0bb;
}
.wh-map-tools {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.wh-map-tools .wh-tool {
  flex: 1;
  height: 25px;
  background: #293c32;
  color: #dddcc4;
}
.wh-map-tools .wh-glyph {
  width: 13px;
  height: 13px;
}
.wh-dialog {
  margin: auto;
  max-height: calc(100svh - 24px);
  max-width: calc(100vw - 20px);
  width: 430px;
  border: none;
  padding: 0;
  background: transparent;
  overflow: visible;
  color: var(--wh-ink);
  color-scheme: light;
}
.wh-dialog::backdrop {
  background: #19292379;
}
.wh-dialog-box {
  padding: 24px;
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 24px);
}
.wh-dialog-box:before {
  border-image-source: url("settings-board.png");
}
.wh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
  border-bottom: 2px solid #797963;
}
.wh-modal-head h2 {
  font-size: 29px;
}
.wh-modal-head .wh-tool {
  border-color: #9d957b;
}
.wh-sheet-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #878673 transparent;
}
.wh-sheet-body h3 {
  font: 600 17px var(--wh-serif);
  padding: 13px 0 2px;
}
.wh-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 6px 0;
  border-bottom: 1px solid #acaa8b;
  cursor: pointer;
}
.wh-option strong,
.wh-option small,
.wh-state-row b,
.wh-state-row small {
  display: block;
}
.wh-option small,
.wh-sub {
  font-size: 12px;
  color: #4c5749;
}
.wh-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.wh-option i {
  flex: none;
  background: #ada88c;
  width: 34px;
  height: 18px;
  position: relative;
  border: 1px solid #77775e;
  border-radius: 10px;
}
.wh-option i:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #ede4c9;
  border-radius: 50%;
  box-shadow: 0 1px 2px #4b4d37;
}
.wh-option input:checked + i {
  background: #4a6350;
}
.wh-option input:checked + i:before {
  left: 18px;
}
.wh-option input:focus-visible + i {
  outline: 2px solid #a05c24;
  outline-offset: 2px;
}
.wh-volume {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  padding: 10px 0;
}
.wh-volume input {
  flex: 1;
  width: auto;
  min-height: 0;
  padding: 0;
  accent-color: #435a48;
}
.wh-volume output {
  min-width: 32px;
  text-align: right;
}
.wh-endtools {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #a5a085;
  padding-top: 9px;
}
.wh-endtools button,
.wh-state-row button {
  border: 1px solid #8f9277;
  background: #e1d9ba;
  color: #354c3e;
  padding: 5px 8px;
  border-radius: 2px;
  font-size: 12px;
}
.wh-sub {
  margin: 9px 0 !important;
}
.wh-state-row {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #a5a387;
}
.wh-state-row small {
  font-size: 8px;
  color: #59624e;
}
.wh-state-row b {
  font: 600 16px/1.2 var(--wh-serif);
  margin-top: 2px;
}
.wh-pennant {
  display: inline-block;
  width: 15px;
  height: 23px;
  background: #687e69;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  border-top: 3px solid #374e40;
}
.wh-pennant.watch {
  background: repeating-linear-gradient(135deg, #a86242 0 7px, #d8bd89 7px 11px);
}
.wh-pennant.info {
  background: linear-gradient(90deg, #465964 50%, #d7ccaa 50%);
}
.wh-store {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #aaa286;
  padding: 4px 0;
}
.wh-store img {
  width: 28px;
  height: 28px;
}
.wh-store b {
  font-variant-numeric: tabular-nums;
}
.wh-dialog[data-kind="chart"] {
  width: min(670px, 92vw);
}
.wh-dialog[data-kind="chart"] .wh-dialog-box {
  padding: 18px;
}
.wh-dialog[data-kind="chart"] .wh-modal-head {
  margin: 0 5px 7px;
}
.wh-dialog .wh-map {
  padding: 14px 16px;
}
.wh-dialog .wh-map-cap b {
  font-size: 15px;
}
.wh-dialog .wh-map-tools .wh-tool {
  height: 33px;
}
.wh-dialog .wh-chart {
  max-height: 50svh;
}
@media (prefers-reduced-motion: reduce) {
  .wh-unroll {
    transition: none !important;
  }
}
@media (max-width: 690px) {
  .wh-hud {
    width: min(277px, calc(100vw - 71px));
    padding: 11px 13px 9px;
  }
  .wh-id {
    grid-template-columns: 34px 1fr auto;
    gap: 5px;
  }
  .wh-seal {
    width: 34px;
    height: 39px;
  }
  .wh-id h1 {
    font-size: 20px;
  }
  .wh-id-tools {
    gap: 0;
  }
  .wh-id-tools .wh-tool {
    width: 24px;
  }
  .wh-cargo img {
    width: 19px;
  }
  .wh-cargo b {
    font-size: 13px;
  }
  .wh-nav button {
    font-size: 11px;
    gap: 3px;
  }
  .wh-watch-btn {
    gap: 3px;
    padding: 7px;
  }
  .wh-signal-label {
    display: none;
  }
  .wh-map-home {
    width: 153px;
  }
  .wh-map {
    padding: 11px;
  }
  .wh-map-tools {
    gap: 2px;
  }
  .wh-map-tools .wh-tool {
    height: 24px;
  }
  .wh-map-cap {
    font-size: 11px;
  }
  .wh-journal {
    width: min(320px, calc(100vw - 22px));
  }
  .wh-root[data-journal="false"] .wh-journal {
    width: calc(100vw - 182px);
    max-width: 205px;
  }
  .wh-root[data-journal="false"] .wh-roller {
    font-size: 15px !important;
    gap: 4px;
    border-width: 0 20px;
    border-image-width: 0 20px;
  }
  .wh-root[data-journal="true"] .wh-map-home {
    visibility: hidden;
  }
  .wh-dialog-box {
    padding: 19px;
  }
  .wh-root[data-compact="true"] .wh-hud {
    padding-bottom: 11px;
  }
}
@media (max-width: 375px) {
  .wh-root[data-journal="false"] .wh-roller {
    font-size: 13px !important;
  }
  .wh-id-tools .wh-tool {
    width: 21px;
  }
  .wh-nav .wh-glyph {
    display: none;
  }
  .wh-hud {
    width: calc(100vw - 64px);
  }
}
@media (max-height: 510px) and (min-width: 691px) {
  .wh-map-home {
    width: 158px;
  }
  .wh-root[data-journal="true"] .wh-hud {
    visibility: hidden;
  }
  .wh-inner,
  .wh-root[data-journal="true"] .wh-unroll {
    height: 68svh;
  }
}
.wh-stamp {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: rotate(-3deg);
}
.wh-modal-head > div {
  flex: 1;
}
.wh-dialog[data-kind="chart"] .wh-stamp {
  display: none;
}
.wh-dialog .wh-modal-head {
  gap: 10px;
}
.wh-map .wh-kicker {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.wh-map .wh-kicker:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a08c60;
  box-shadow:
    inset 0 1px 0 #d0bb88,
    0 1px 0 #25372e;
}

.wh-nav img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
@media (max-width: 375px) {
  .wh-nav img {
    width: 13px;
    height: 13px;
  }
}
.wh-paper:before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border: 10px solid transparent;
  border-image: url("journal-leaf.png") 64 / 10px round;
}
