@font-face {
  font-family: Barlow;
  src: url('/fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #101816;
  --paper: #f6f1e5;
  --muted: #bec4bc;
  --gold: #e9bb7d;
  --line: #ffffff29;
  --base: 16px;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: var(--base);
  background: var(--ink);
  color: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
body:has(dialog[open]) {
  overflow: hidden;
}
a {
  text-underline-offset: 4px;
}
button svg,
.icon {
  width: 19px;
  height: 19px;
  flex: none;
}
#top {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(20px, 5.25vw, 90px);
  position: relative;
  background: #101916;
  z-index: 3;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font:
    600 1.45rem Barlow,
    sans-serif;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 0;
  white-space: nowrap;
}
.brand img {
  width: 38px;
  height: 38px;
}
.tools,
.langs,
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.langs {
  gap: 0;
}
.langs button {
  font-size: 0.78rem;
  padding: 9px 10px;
  color: #b8bdb6;
  border-bottom: 1px solid transparent;
}
.langs [aria-pressed='true'] {
  color: var(--gold);
  border-color: var(--gold);
}
.iconbtn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.iconbtn:hover,
.soft:hover,
.linebtn:hover,
.item:hover,
.tile:hover {
  background: #ffffff12;
}
.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #12201c;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/world/station.webp') center 52% / cover no-repeat;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(8, 17, 15, 0.94) 0%,
      rgba(10, 18, 16, 0.81) 27%,
      rgba(6, 15, 15, 0.19) 72%
    ),
    linear-gradient(
      0deg,
      rgba(8, 15, 13, 0.92),
      transparent 34%,
      rgba(9, 16, 14, 0.1) 78%,
      rgba(8, 15, 14, 0.35)
    );
}
.heroBody {
  padding: clamp(42px, 9.6vh, 140px) clamp(24px, 7.7vw, 150px) 44px;
  max-width: 1050px;
}
.kicker,
.micro,
.scenestamp,
.count {
  font:
    600 0.77rem/1.4 ui-monospace,
    Consolas,
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 13px;
}
.kicker:before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--gold);
}
.hero h1 {
  font:
    500 clamp(5.4rem, 9.5vw, 11.9rem) / 0.85 Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -0.075em;
  margin: 0.22em 0 0.25em;
  text-shadow: 0 2px 32px #07100f66;
}
.hero h1 em {
  font-weight: 400;
  color: #e9c797;
}
.hero .intro {
  max-width: 460px;
  line-height: 1.6;
  font-size: 1.04rem;
  color: #e2e1d8;
  margin: 0 0 29px;
}
.btn,
.linebtn,
.soft,
.item,
.tile {
  border-radius: 4px;
}
.btn,
.linebtn,
.soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 43px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.92rem;
}
.btn {
  background: var(--gold);
  color: #231e16;
}
.btn:hover {
  background: #f8d39d;
}
.linebtn {
  border: 1px solid #ffffff59;
  background: #17231f95;
}
.soft {
  color: #d8dcd4;
  padding: 8px 12px;
}
.ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #e9c797;
  padding: 12px 0;
  font-size: 0.88rem;
}
.ghost:hover {
  text-decoration: underline;
}
.herofoot {
  border-top: 1px solid var(--line);
  background: #0a141263;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px clamp(24px, 5.25vw, 90px);
  color: #d0d4cb;
  font-size: 0.83rem;
}
.herofoot span,
.herofoot button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.stamp {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.herofoot svg {
  width: 16px;
  color: var(--gold);
}
.textlink {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px;
}
.textlink:hover {
  text-decoration: underline;
}
.page {
  max-width: 1080px;
  margin: auto;
  padding: clamp(30px, 6vw, 78px) 24px;
  min-height: calc(100svh - 76px);
}
.page h1,
dialog h2,
.gameinfo h2 {
  font:
    400 clamp(2.2rem, 4vw, 4rem) / 1.02 Georgia,
    serif;
  letter-spacing: -0.045em;
  margin: 0.25em 0 0.36em;
}
.page h2,
dialog h3,
.panel h3 {
  font:
    600 1.35rem Barlow,
    sans-serif;
  letter-spacing: 0.025em;
}
.sub {
  color: var(--muted);
  line-height: 1.6;
}
.pageHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 14px;
}
.tile,
.item,
.box {
  background: #1a2622;
  border: 1px solid var(--line);
  text-align: left;
  padding: 18px;
  color: var(--paper);
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
  min-height: 108px;
}
.tile strong,
.item strong {
  font-size: 1.1rem;
}
.tile small,
.item small,
.muted {
  color: var(--muted);
}
.box {
  border-radius: 5px;
  margin: 18px 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.item .end {
  margin-left: auto;
  color: var(--gold);
}
.roleicon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #786549;
  color: var(--gold);
  border-radius: 50%;
  flex: none;
}
.wide {
  width: 100%;
}
dialog {
  width: min(540px, calc(100% - 24px));
  padding: 0;
  max-height: min(89svh, 840px);
  border: 1px solid #686857;
  border-radius: 8px;
  box-shadow: 0 24px 100px #0009;
  background: #19231f;
  color: var(--paper);
}
dialog::backdrop {
  background: #040b09b0;
  backdrop-filter: blur(4px);
}
#sheet {
  padding: clamp(19px, 4vw, 32px);
}
.sheetHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 17px;
}
.sheetHead h2 {
  font-size: 2.15rem;
  overflow-wrap: anywhere;
}
.sheetHead .iconbtn {
  flex: none;
}
.field {
  display: grid;
  gap: 6px;
  color: #e4e6df;
  font-size: 0.9rem;
  margin: 13px 0;
}
.field input,
.field select,
.field textarea,
.codebox,
.chatline input {
  background: #101916;
  color: var(--paper);
  border: 1px solid #536157;
  border-radius: 4px;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}
.field input[type='checkbox'] {
  width: 18px;
  min-height: 18px;
}
.field.inline {
  display: flex;
  align-items: center;
}
.error {
  color: #ffd0ab;
}
.notice {
  background: #27362c;
  border-left: 2px solid var(--gold);
  padding: 12px;
  line-height: 1.45;
  white-space: pre-line;
}
.article {
  font:
    400 1.12rem/1.65 Georgia,
    serif;
  white-space: pre-line;
}
.article strong {
  font-family: system-ui, sans-serif;
}
details {
  border-top: 1px solid var(--line);
  padding: 11px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
#toast:not(:empty) {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 650px);
  background: #f0d3a7;
  color: #20231f;
  border-radius: 5px;
  padding: 11px 17px;
  z-index: 15;
  box-shadow: 0 4px 16px #0006;
}
body.play #top {
  height: 54px;
  padding: 0 18px;
}
body.play .brand {
  font-size: 1.1rem;
}
body.play .brand img {
  width: 29px;
  height: 29px;
}
.arena {
  position: relative;
  height: calc(100svh - 54px);
  isolation: isolate;
  overflow: hidden;
  background: #16221f;
}
.world {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #17221fca, #17221f66),
    url('/world/station.webp') center/cover;
}
.world canvas {
  display: block;
}
.hud {
  position: absolute;
  left: 16px;
  top: 15px;
  max-width: min(440px, calc(100% - 32px));
  background: #101815e8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 16px;
  pointer-events: none;
}
.hud h2 {
  font:
    600 1.4rem/1.05 Barlow,
    sans-serif;
  margin: 2px 0;
}
.hud p {
  margin: 5px 0 0;
  color: #d7dbd1;
  font-size: 0.86rem;
}
.dock {
  position: absolute;
  inset: auto 15px 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.dock > * {
  pointer-events: auto;
}
.docknav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  background: #101815ed;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 5px;
}
.docknav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
}
.docknav button:hover {
  background: #ffffff15;
}
.focus {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translateX(-50%);
  background: #101916e8;
  color: #f0d3a7;
  max-width: 65vw;
  border-radius: 3px;
  box-shadow: 0 1px 8px #0008;
}
.focus:not(:empty) {
  padding: 7px 11px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#sheet form > .row {
  margin-top: 20px;
}
.chatlog {
  max-height: 220px;
  overflow: auto;
}
.chatlog p {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.chatline {
  display: flex;
  gap: 8px;
}
.vlist {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel {
  margin-top: 26px;
}
.panel h3 {
  margin-bottom: 8px;
}
.tag {
  font:
    600 0.72rem ui-monospace,
    monospace;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.wideDialogue {
  width: min(650px, calc(100% - 24px));
}
#sheet > h3 {
  margin-bottom: 7px;
}
.herofoot .row {
  gap: 24px;
}
.codebox {
  font:
    600 1.6rem ui-monospace,
    monospace;
  letter-spacing: 0.28em;
}
.empty {
  padding: 24px;
  background: #18231f;
  border: 1px dashed #596359;
}
.under {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 26px;
}
@media (max-width: 650px) {
  #top {
    height: 64px;
    padding: 0 13px;
    gap: 4px;
  }
  .brand {
    gap: 5px;
    font-size: 1rem;
    letter-spacing: 0.8px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .tools {
    gap: 4px;
  }
  .langs button {
    font-size: 0.72rem;
    padding: 8px 5px;
  }
  .tools .iconbtn {
    width: 31px;
    height: 31px;
  }
  .hero {
    min-height: calc(100svh - 64px);
  }
  .heroBody {
    padding: clamp(55px, 13svh, 110px) 24px 36px;
  }
  .hero h1 {
    font-size: clamp(4.8rem, 18.2vw, 7rem);
  }
  .hero:before {
    background-position: 62% center;
  }
  .hero:after {
    background:
      linear-gradient(90deg, #091310dc, #09131071 89%),
      linear-gradient(0deg, #091310ed, transparent 88%);
  }
  .herofoot {
    padding: 13px 18px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .herofoot .row {
    gap: 12px;
  }
  .herofoot .stamp {
    display: none;
  }
  .dock {
    inset: auto 6px 8px;
    flex-wrap: wrap;
  }
  .docknav button {
    padding: 7px;
  }
  .docknav button span {
    font-size: 0.75rem;
  }
  .hud {
    left: 8px;
    top: 8px;
  }
  .gamehint {
    display: none;
  }
  .page {
    padding: 32px 16px;
  }
  .hero .intro {
    max-width: 355px;
  }
  .stamp {
    padding-left: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}
.reading {
  position: absolute;
  bottom: 77px;
  left: 16px;
  max-width: min(520px, calc(100% - 32px));
  max-height: 44%;
  overflow: auto;
  padding: 14px 18px;
  border: 1px solid #a9a08b70;
  background: #14201cf2;
  border-radius: 5px;
  box-shadow: 0 4px 22px #0006;
}
.reading h3 {
  font:
    400 1.5rem Georgia,
    serif;
  margin: 6px 0;
}
.reading p {
  line-height: 1.5;
  margin: 8px 0;
  white-space: pre-line;
}
.reading .readclose {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
}
.reading .row {
  gap: 19px;
}
.reading .textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reading .textlink svg {
  width: 15px;
}
.chatline {
  align-items: flex-end;
}
.chatline .field {
  flex: 1;
  margin-bottom: 0;
}
.herofoot button + button {
  margin-left: 9px;
}
@media (max-width: 650px) {
  .reading {
    bottom: 100px;
    left: 8px;
    max-height: 39%;
    padding: 10px;
  }
  .readclose {
    padding: 6px;
  }
  .hero:after {
    pointer-events: none;
  }
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(42px, 72px));
  gap: 5px;
  margin: 9px 0 16px;
}
.keypad button {
  font:
    600 1.35rem ui-monospace,
    monospace;
  border-radius: 4px;
  border: 1px solid #898b73;
  border-bottom-width: 3px;
  background: #343e33;
  padding: 9px;
  color: #eee8cb;
}
.keypad button:hover,
.clockgrid button:hover {
  background: #4b5140;
}
.clockgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.clockgrid button {
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 12px 5px;
  background: #28312b;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.clockface {
  width: 38px;
  height: 38px;
  border: 3px double #d6b477;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #bda575 0 2px, transparent 2.5px),
    repeating-conic-gradient(#b89354 0 2deg, transparent 2deg 30deg);
  position: relative;
}
.clockface:before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #333b32;
}
.clockface:after {
  content: '';
  position: absolute;
  width: 9px;
  height: 12px;
  left: 9px;
  top: 3px;
  border-bottom: 2px solid #deb981;
  border-right: 2px solid #deb981;
  transform: rotate(-16deg);
}
.reel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0;
}
.reel .item {
  cursor: grab;
}
.splice-drop {
  border: 1px dashed #aa9572;
  text-align: center;
  padding: 14px;
  margin-top: 12px;
  color: var(--gold);
}
.puzzlerefs {
  margin-top: 16px;
}
.puzzlerefs h4 {
  margin: 10px 0 4px;
}
.puzzlerefs p {
  margin: 0 0 8px;
  color: var(--muted);
}
.mapdesk {
  margin: 10px 0 16px;
}
.mapdesk canvas {
  width: 100%;
  height: auto;
  border: 2px solid #b7a786;
}
.mapdesk label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}
.mapdesk input {
  width: 100%;
  accent-color: var(--gold);
}
