:root {
  color-scheme: dark;
  --ink: #102e32;
  --cream: #fff3d8;
  --muted: #c3d1bf;
  --gold: #f7cb80;
  --line: #f3d29840;
  --panel: #102e32ed;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--cream);
  background: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #fff1b5;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 1px solid var(--line);
  background: #173c3e;
  border-radius: 6px;
}
button:hover {
  background: #285354;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #102c30;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.arcade-link {
  font-size: 13px;
  font-weight: 650;
  color: #c8d6c8;
  letter-spacing: 0.02em;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, serif;
  letter-spacing: 0.16em;
  font-size: 21px;
}
.utilities {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.utilities button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}
.utilities #help {
  width: 36px;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 20px;
}
#stage {
  position: relative;
  height: calc(100dvh - 64px);
  min-height: 470px;
  isolation: isolate;
}
#world {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  background: #456f6e;
}
#welcome {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(
    90deg,
    #0b2e34f2 0%,
    #0d3436d6 29%,
    #0f353866 53%,
    transparent 80%
  );
}
.welcome-copy {
  margin-left: 8%;
  padding: 20px 0 30px;
  max-width: 600px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #d6c494;
  margin: 0 0 20px;
}
.welcome-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6.2vw, 88px);
  font-weight: 400;
  line-height: 1;
  margin: 0 0 20px;
  letter-spacing: -0.045em;
}
.title-star {
  font-size: 30px;
  vertical-align: top;
  margin-left: 10px;
  color: #f1c579;
}
.lead {
  font-family: Georgia, serif;
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.18;
  margin: 0 0 20px;
  color: #f4d69e;
}
.intro {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 22px;
  color: #d2dcc9;
}
#join-form {
  max-width: 340px;
}
#new-keeper > label {
  display: block;
  font-size: 12px;
  color: #e9dabb;
  margin-bottom: 8px;
}
input[type="text"],
input:not([type]) {
  width: 100%;
  font: inherit;
  color: var(--cream);
  border: 1px solid #c7c9a65c;
  background: #102f33c9;
  border-radius: 5px;
  min-height: 45px;
  padding: 10px 14px;
  font-size: 15px;
}
input::placeholder {
  color: #acbdb2;
}
.colors {
  border: 0;
  padding: 0;
  margin: 15px 0 20px;
  display: flex;
  gap: 10px;
}
.colors legend {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.swatch {
  position: relative;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.swatch input {
  appearance: none;
  width: 19px;
  height: 19px;
  border: 2px solid #f2dfb875;
  border-radius: 50%;
  margin: 0;
  background: #398c80;
}
.swatch input:checked {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}
.rust input {
  background: #b6664e;
}
.lavender input {
  background: #8c7db2;
}
.gold input {
  background: #c39945;
}
.primary {
  background: #f2c779;
  color: #173134;
  font-weight: 750;
  min-height: 48px;
  padding: 12px 23px;
  border: 1px solid #ffe4b0;
  border-radius: 5px;
  box-shadow: 0 3px 0 #ab8148;
  letter-spacing: 0.015em;
}
.primary:hover {
  background: #ffdfa2;
}
.primary span {
  margin-left: 45px;
  font-size: 20px;
}
.fine {
  font-size: 11px;
  line-height: 1.7;
  color: #b4c4b8;
  margin: 20px 0 0;
}
#join-error {
  font-size: 13px;
  color: #ffd3b8;
  line-height: 1.5;
  margin: 12px 0 0;
}
.welcome-caption {
  position: absolute;
  right: 6%;
  bottom: 8%;
  color: #173939;
  text-shadow: 0 1px #ffffff60;
}
.welcome-caption span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.welcome-caption p {
  font:
    italic 27px/1.2 Georgia,
    serif;
  margin: 10px 0;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#hud button,
#hud a {
  pointer-events: auto;
}
.keeper-card {
  position: absolute;
  top: 24px;
  left: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 17px 12px 12px;
  min-width: 230px;
  box-shadow: 0 6px 24px #13373544;
}
.portrait {
  width: 47px;
  height: 57px;
  border: 1px solid #d8b87588;
  display: grid;
  place-items: center;
  font:
    35px Georgia,
    serif;
  color: #f5cc87;
  background: #285452;
  border-radius: 35% 35% 45% 45%;
}
.keeper-card strong {
  font:
    18px Georgia,
    serif;
  display: block;
}
.keeper-card small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #d7d5b9;
  margin: 5px 0 0;
}
.meter {
  width: 145px;
  height: 5px;
  background: #a6bea32b;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: #a5c795;
  transition: width 0.2s;
}
.energy {
  height: 3px;
  margin-top: 4px;
}
.energy span {
  background: #f2cb83;
}
.location {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff3d8;
  text-shadow: 0 2px 4px #103537;
}
.location p {
  font:
    26px Georgia,
    serif;
  margin: 0 0 5px;
}
.location span {
  font-size: 10px;
  letter-spacing: 0.06em;
  background: #173b3db8;
  padding: 4px 10px;
  border-radius: 10px;
}
.quest-card {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  gap: 14px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 15px 18px;
  min-width: 250px;
  max-width: 320px;
  box-shadow: 0 6px 24px #13373544;
}
.quest-symbol {
  color: var(--gold);
  font-size: 30px;
}
.quest-card small {
  color: #d2bd8e;
  font-size: 9px;
  letter-spacing: 0.18em;
  display: block;
  margin-bottom: 8px;
}
.quest-card strong {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  display: block;
}
.quest-card #beacon-progress {
  font-size: 15px;
  letter-spacing: 0.2em;
  color: #efca80;
  display: block;
  margin-top: 9px;
}
.quest-arrow {
  font-size: 15px;
  color: #c1cbb7;
  margin-left: auto;
}
.actionbar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 5px 20px #13373555;
}
.actionbar span,
.actionbar button {
  font-size: 11px;
  color: #d6dbc4;
}
.actionbar button {
  border: 0;
  background: transparent;
  padding: 3px 0 3px 10px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  min-height: 24px;
}
.actionbar b {
  font-weight: 500;
  color: var(--gold);
  margin-left: 12px;
}
kbd {
  font:
    10px system-ui,
    sans-serif;
  display: inline-block;
  background: #b5c5a71c;
  color: #f5e9c8;
  padding: 5px 7px;
  border: 1px solid #e4d2a14d;
  border-bottom-width: 2px;
  border-radius: 4px;
  margin-right: 5px;
}
.actionbar span {
  display: flex;
  align-items: center;
  gap: 4px;
}
#toast {
  position: absolute;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  max-width: 500px;
  text-align: center;
  line-height: 1.65;
  font-size: 14px;
  background: #102e32ed;
  border: 1px solid #e7cc8f77;
  border-radius: 8px;
  padding: 14px 22px;
  opacity: 0;
  transition: opacity 0.25s;
  box-shadow: 0 8px 25px #10303044;
}
#toast.visible {
  opacity: 1;
}
#interaction {
  position: absolute;
  left: 50%;
  top: 65%;
  transform: translateX(-50%);
  background: #183f40ed;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: #ffe5ad;
}
#journey {
  position: absolute;
  width: 240px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  background: #b7c5ae55;
  display: flex;
  justify-content: space-between;
}
#journey-fill {
  position: absolute;
  height: 100%;
  background: var(--gold);
  width: 0;
}
#journey i {
  position: relative;
  font-style: normal;
  font-size: 11px;
  color: #ffe0a4;
  top: -6px;
}
dialog {
  color: var(--cream);
  background: #123437f5;
  max-width: 550px;
  width: calc(100% - 40px);
  border: 1px solid #e3c28b88;
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 30px 100px #061b25b0;
  line-height: 1.7;
}
dialog::backdrop {
  background: #0b232b88;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font:
    32px Georgia,
    serif;
  margin: 0 0 20px;
  color: #f3d49c;
}
dialog h3 {
  font:
    21px Georgia,
    serif;
  color: #e8d6ae;
  margin: 20px 0 10px;
}
dialog p,
dialog li {
  font-size: 14px;
  color: #d9dfca;
}
dialog a {
  text-decoration: underline;
  color: #f6d598;
}
dialog small {
  font-size: 11px;
  color: #b8ccbe;
}
.close {
  position: absolute;
  right: 12px;
  top: 9px;
  width: 35px;
  height: 35px;
  font-size: 25px;
  border: 0;
  background: transparent;
}
.quest-step {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.quest-step span {
  color: var(--gold);
}
.satchel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.satchel-item {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 7px;
}
.satchel-item b {
  font:
    30px Georgia,
    serif;
  color: var(--gold);
  display: block;
}
.satchel-item small {
  font-size: 12px;
}
#reconnect {
  position: absolute;
  inset: 0;
  background: #102f33e8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: auto;
  z-index: 4;
}
#reconnect strong {
  font:
    32px Georgia,
    serif;
  color: var(--gold);
}
#reconnect p {
  font-size: 14px;
}
#reconnect button {
  margin: 20px 0;
}
#reconnect a {
  font-size: 13px;
  text-decoration: underline;
}
#small-screen {
  display: none;
}
@media (min-width: 800px) and (max-height: 780px) {
  .welcome-copy {
    padding-top: 5px;
    padding-bottom: 12px;
  }
  .eyebrow {
    margin-bottom: 12px;
  }
  .welcome-copy h1 {
    font-size: 60px;
    margin-bottom: 14px;
  }
  .lead {
    font-size: 28px;
    margin-bottom: 12px;
  }
  .intro {
    margin-bottom: 12px;
    font-size: 13px;
  }
  .colors {
    margin: 12px 0;
  }
  .fine {
    margin-top: 14px;
  }
  .keeper-card {
    top: 18px;
  }
  .quest-card {
    top: 18px;
  }
}
@media (max-width: 1080px) {
  .utilities #connection {
    display: none;
  }
  .quest-card {
    max-width: 240px;
    min-width: 210px;
    padding: 12px;
  }
  .location {
    top: 30px;
  }
  .location p {
    font-size: 20px;
  }
  .actionbar {
    gap: 9px;
    padding: 9px 12px;
  }
  .actionbar span {
    font-size: 10px;
  }
  .welcome-copy {
    margin-left: 7%;
  }
}
@media (max-width: 799px) {
  body {
    overflow: auto;
  }
  .topbar {
    padding: 0 15px;
  }
  .wordmark {
    font-size: 14px;
    gap: 6px;
  }
  .wordmark img {
    width: 20px;
  }
  .utilities {
    display: none;
  }
  .arcade-link {
    font-size: 12px;
  }
  #stage {
    display: none;
  }
  #small-screen {
    display: flex;
    min-height: calc(100dvh - 64px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 35px;
    text-align: center;
    background:
      linear-gradient(#0e3437d9, #0e3437eb),
      url("/art/woodland.png") center/cover;
  }
  #small-screen h2 {
    font:
      30px/1.2 Georgia,
      serif;
    color: var(--gold);
    max-width: 300px;
  }
  #small-screen p {
    font-size: 15px;
    line-height: 1.8;
    max-width: 310px;
    color: #d3dcc4;
  }
  #small-screen a {
    display: block;
    padding: 20px;
    font-size: 14px;
    text-decoration: underline;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root {
    --panel: #102e32;
  }
  dialog {
    background: #123437;
  }
  dialog::backdrop {
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  button,
  input,
  a {
    border: 1px solid CanvasText;
  }
  .meter {
    border: 1px solid CanvasText;
  }
  .meter span {
    background: Highlight;
  }
}
