:root {
  color-scheme: dark;
  --pine: #172e2f;
  --lake: #234541;
  --sage: #b7cda4;
  --cream: #f6eed4;
  --amber: #f0ca88;
  --muted: #c3cdb6;
  --line: #bcd6b463;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--cream);
  background: var(--pine);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.56;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #f8d99b;
  outline-offset: 3px;
}
.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem clamp(0.7rem, 3vw, 2.4rem);
  background: #193536;
  border-bottom: 1px solid #83a38b5a;
  min-height: 55px;
}
.mast a {
  font-weight: 720;
  text-decoration: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  background: none;
  border: 0;
  color: var(--cream);
  font-weight: 800;
  padding: 0;
}
.brand img {
  border-radius: 11px;
}
main {
  width: min(1480px, 100%);
  margin: auto;
  padding: clamp(0.55rem, 1.8vw, 1.4rem);
}
.arrival {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(530px, 80dvh, 760px);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  overflow: hidden;
  box-shadow: 0 18px 45px #0d2428;
}
.cover,
.cover::after {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -1;
}
.cover {
  background: #375d58;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% 50%;
  display: block;
}
.cover::after {
  content: "";
  z-index: auto;
  background:
    linear-gradient(
      90deg,
      #162f31 2%,
      #162f31ec 22%,
      #162f318c 54%,
      #162f3123 85%
    ),
    linear-gradient(0deg, #162f31b0, transparent 41%);
}
.arrival-copy {
  max-width: 570px;
  padding: clamp(1.1rem, 4.4vw, 4.2rem);
}
.kicker {
  margin: 0;
  color: #dcd6a0;
  text-transform: uppercase;
  letter-spacing: 0.165em;
  font-size: 0.72rem;
  font-weight: 800;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin: 0.36em 0;
  line-height: 1.03;
}
h1 {
  font-size: clamp(3.05rem, 7vw, 6.4rem);
}
h2 {
  font-size: clamp(1.85rem, 4vw, 2.8rem);
}
p {
  line-height: 1.55;
}
.arrival-copy > p:not(.kicker) {
  max-width: 42ch;
}
.entry-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 1.15rem 0 0.55rem;
}
.primary,
.secondary,
.subtle,
.hud-card,
.social button,
.close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 0.52rem 0.82rem;
  border-radius: 0.63rem;
  text-decoration: none;
  font-size: 0.91rem;
  font-weight: 760;
  border: 1px solid var(--line);
  color: var(--cream);
  background: #2b4b44;
}
.primary {
  background: var(--amber);
  border-color: #ffda97;
  color: #253a33;
}
.secondary:hover,
.hud-card:hover,
.social button:hover {
  background: #456655;
}
.primary:hover {
  background: #ffe0a2;
}
.subtle {
  min-height: 39px;
  padding-inline: 0;
  background: none;
  border: 0;
  color: #f5d498;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.rules,
.round-copy,
#notice {
  font-size: 0.87rem;
  color: var(--muted);
}
.round-copy {
  color: #f3dba5;
}
#notice {
  margin: 0.65rem 0.2rem;
  min-height: 1.25em;
}
.game {
  position: relative;
  height: clamp(470px, 79dvh, 900px);
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #7fa69a;
  isolation: isolate;
}
.game canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}
.hud {
  position: absolute;
  inset: 0.64rem 0.65rem auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.35rem;
  pointer-events: none;
}
.hud > * {
  pointer-events: auto;
}
.hud-card {
  border: 1px solid #d5e3c197;
  background: #20413ce9;
  box-shadow: 0 3px 12px #1b342955;
}
.hud strong,
.hud small {
  display: block;
}
.hud small {
  font-size: 0.71rem;
  white-space: nowrap;
  font-weight: 610;
  color: #d7e3c7;
}
.hud strong {
  font-size: 0.96rem;
  white-space: nowrap;
}
.island-badge {
  display: flex;
  gap: 0.52rem;
  text-align: left;
}
.moon-seal {
  color: var(--amber);
  font-size: 1.61rem;
  line-height: 1;
}
.round-chip {
  display: block;
  text-align: center;
}
.tools {
  display: flex;
  gap: 0.25rem;
}
.scorebar {
  position: absolute;
  top: 4.18rem;
  left: 0.66rem;
  display: flex;
  gap: 0.7rem;
  background: #20413cdd;
  border-radius: 0.46rem;
  padding: 0.37rem 0.58rem;
  font-size: 0.76rem;
  color: #eff2db;
  border: 1px solid var(--line);
  pointer-events: none;
}
.scorebar b {
  color: var(--amber);
}
.social {
  display: flex;
  position: absolute;
  right: 0.65rem;
  top: 4.35rem;
  gap: 0.24rem;
}
.social button {
  min-height: 36px;
  font-size: 0.72rem;
  padding: 0.32rem 0.48rem;
  background: #254841e7;
}
.bottom-tools {
  position: absolute;
  bottom: 0.64rem;
  right: 0.66rem;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.43rem;
  max-width: 72%;
}
.task-chip {
  min-width: 132px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.55rem;
  align-items: center;
  background: #254941f2;
  border: 1px solid var(--line);
  padding: 0.45rem 0.56rem;
  border-radius: 0.58rem;
  font-size: 0.76rem;
}
.task-chip span {
  color: var(--amber);
}
progress {
  width: 100%;
  height: 7px;
  grid-column: 1/-1;
  accent-color: #d8bd80;
}
.tip {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  background: #203f39f3;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.42rem 0.7rem;
  font-size: 0.83rem;
  text-align: center;
  pointer-events: none;
}
.stick {
  background: #274e46cc;
  border: 2px solid #d7e2c28f;
  position: absolute;
  left: 0.76rem;
  bottom: 0.75rem;
  width: 89px;
  height: 89px;
  display: none;
  place-items: center;
  border-radius: 50%;
  touch-action: none;
}
.stick span {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e8d39bcf;
  pointer-events: none;
}
.stick::after {
  content: "MOVE";
  position: absolute;
  bottom: 9px;
  font-size: 0.57rem;
  letter-spacing: 0.09em;
}
dialog {
  background: #203e39;
  color: var(--cream);
  border: 1px solid #b4d0a883;
  border-radius: 1rem;
  padding: clamp(0.85rem, 2.6vw, 1.7rem);
  width: min(590px, calc(100vw - 22px));
  max-height: 82dvh;
  overflow: auto;
  box-shadow: 0 16px 85px #0e2526;
}
dialog::backdrop {
  background: #0d2428ab;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}
.close {
  font-size: 1.3rem;
  min-width: 44px;
  padding: 0.25rem;
}
dialog h2 {
  margin: 0.12em 0 0.35em;
}
dialog p {
  color: #d8e3c8;
}
.task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
}
.activity {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: #305249;
  color: var(--cream);
  min-height: 58px;
}
.activity span,
.activity small {
  min-width: 0;
}
.activity strong {
  display: block;
  font-size: 0.85rem;
}
.activity small {
  color: #d6ddbd;
  font-size: 0.72rem;
}
.activity img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.activity i {
  font-style: normal;
  text-align: center;
  font-size: 1.15rem;
  color: var(--amber);
}
form {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}
label {
  display: grid;
  gap: 0.24rem;
  font-size: 0.83rem;
  font-weight: 700;
}
input,
select {
  border: 1px solid #acc6a182;
  background: #2a4b42;
  color: var(--cream);
  border-radius: 0.4rem;
  min-height: 43px;
  padding: 0.42rem;
  min-width: 0;
}
#parts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.exchange {
  display: grid;
  gap: 0.3rem;
}
.exchange div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0.43rem 0;
}
@media (pointer: coarse), (max-width: 720px) {
  .stick {
    display: grid;
  }
}
@media (max-width: 650px) {
  .arrival {
    align-items: end;
    min-height: calc(83dvh - 20px);
  }
  .arrival-copy {
    padding: clamp(1rem, 5vw, 2rem);
    width: 100%;
    padding-top: 9.3rem;
  }
  .cover img {
    object-position: 64% center;
  }
  .cover::after {
    background: linear-gradient(
      0deg,
      #142d30 5%,
      #152e30ee 35%,
      #162f3170 79%,
      #162f3150
    );
  }
  h1 {
    font-size: clamp(2.9rem, 10.7vw, 4.6rem);
  }
  .game {
    height: calc(100dvh - 109px);
    min-height: 420px;
  }
  .hud {
    inset: 0.4rem 0.38rem auto;
    gap: 0.22rem;
  }
  .hud strong {
    font-size: 0.78rem;
  }
  .hud small {
    font-size: 0.61rem;
  }
  .hud-card {
    padding: 0.38rem 0.42rem;
    font-size: 0.72rem;
  }
  .moon-seal {
    display: none;
  }
  .scorebar {
    left: 0.4rem;
    top: 3.65rem;
    gap: 0.46rem;
  }
  .social {
    right: 0.4rem;
    top: 3.62rem;
    flex-direction: column;
  }
  .social button {
    min-height: 33px;
  }
  .stick {
    width: 76px;
    height: 76px;
    left: 0.46rem;
    bottom: 0.48rem;
  }
  .bottom-tools {
    right: 0.46rem;
    bottom: 0.46rem;
    gap: 0.28rem;
  }
  .bottom-tools button {
    font-size: 0.79rem;
    padding: 0.32rem 0.51rem;
  }
  .task-chip {
    min-width: 113px;
  }
  .tip {
    bottom: 5.2rem;
  }
  .task-list {
    grid-template-columns: 1fr;
  }
}
#arrival-rates {
  margin-inline-start: 0.75rem;
}
#notice:empty {
  display: none;
}
.island-badge {
  min-width: 0;
}
.island-badge:disabled {
  opacity: 1;
  cursor: default;
}
.island-badge span:last-child {
  min-width: 0;
}
.island-badge strong,
.island-badge small {
  overflow: hidden;
  text-overflow: ellipsis;
}
