@font-face {
  font-family: Archivo Black;
  src: url("/fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: DM Sans;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101110;
  --surface: #191a18;
  --outline: #343530;
  --ink: #f1f0e8;
  --muted: #a09f96;
  --dim: #73756c;
  --orange: #ff8657;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --display: "Archivo Black", Arial Black, sans-serif;
  --sans: "DM Sans", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 var(--sans);
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  background: none;
  color: inherit;
  border: 0;
}
button:disabled,
input:disabled {
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
button:hover:enabled {
  filter: brightness(1.12);
}
.topbar {
  border-bottom: 1px solid var(--outline);
}
.top-inner,
.shell {
  max-width: 1576px;
  margin: auto;
  padding: 0 clamp(20px, 4.2vw, 76px);
}
.top-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -1.6px;
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1;
}
.wordmark-light {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  margin-left: 11px;
  color: var(--muted);
  border-left: 1px solid #4a4b45;
  padding-left: 11px;
  vertical-align: 3px;
}
.brand-symbol {
  width: 29px;
  height: 26px;
  position: relative;
  display: block;
  transform: skew(-9deg);
}
.brand-symbol:before,
.brand-symbol:after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--orange);
  clip-path: polygon(0 0, 60% 0, 100% 48%, 59% 100%, 0 100%, 37% 50%);
}
.brand-symbol:after {
  inset: 7px 9px 7px 8px;
  background: var(--bg);
}
.help {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c1c0b6;
  font-size: 13px;
  padding: 8px 0 8px 10px;
}
.help-icon {
  border: 1px solid #706f66;
  border-radius: 100%;
  width: 16px;
  height: 16px;
  font: 11px/14px var(--mono);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 38px 0 25px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font: 400 clamp(40px, 5.2vw, 84px) / 0.97 var(--display);
  letter-spacing: -0.075em;
}
.title-dot {
  color: var(--orange);
}
.format {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #aaa99e;
  font: 11px var(--mono);
  padding-bottom: 7px;
  white-space: nowrap;
}
.format i {
  width: 1px;
  height: 12px;
  background: #45473e;
  margin: 0 3px;
}
.clock-icon {
  position: relative;
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 100%;
}
.clock-icon:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 3px;
  height: 4px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.28fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.world-column,
.side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 14px;
}
.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 390px;
  height: clamp(405px, 49.5vh, 650px);
  border: 1px solid #383a34;
  border-radius: 6px;
  background: #151715;
}
.stage:fullscreen,
.stage.expanded {
  height: 100%;
  width: 100%;
  background: #151715;
  border: 0;
  border-radius: 0;
}
.stage.expanded {
  position: fixed;
  inset: 0;
  z-index: 10;
  height: 100dvh;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  outline-offset: -3px !important;
}
.stage-head,
.stage-foot {
  position: absolute;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.stage-head {
  top: 16px;
}
.stage-foot {
  bottom: 16px;
}
.view-id,
.stage-status,
.eyebrow,
.section-line > span,
.roster-head,
.footer-mark + span {
  font: 11px/1.2 var(--mono);
}
.view-id {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.12em;
  color: #c6c6ba;
  font-size: 10px;
}
.cross-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(#a9aba0, #a9aba0) center/1px 100% no-repeat,
    linear-gradient(#a9aba0, #a9aba0) center/100% 1px no-repeat;
}
.cross-icon:after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #a9aba0;
  border-radius: 100%;
}
.stage-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.expand {
  width: 28px;
  height: 28px;
  pointer-events: auto;
  display: grid;
  place-items: center;
  border: 1px solid #3b3c35;
  border-radius: 4px;
  background: #181a17;
}
.expand i {
  width: 12px;
  height: 12px;
  display: block;
  background:
    linear-gradient(var(--muted), var(--muted)) right top/6px 1px no-repeat,
    linear-gradient(var(--muted), var(--muted)) right top/1px 6px no-repeat,
    linear-gradient(var(--muted), var(--muted)) left bottom/6px 1px no-repeat,
    linear-gradient(var(--muted), var(--muted)) left bottom/1px 6px no-repeat;
}
#round-clock {
  font: bold 16px/1 var(--mono);
}
.stage-status {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #aaa99e;
}
.stage-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a6a79b;
}
.stage-status.live i {
  background: var(--orange);
  box-shadow: 0 0 10px #fe87556c;
}
#health {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 10px var(--mono);
}
#health strong {
  font-size: 14px;
}
#health > i {
  display: block;
  width: 48px;
  height: 4px;
  background: #45483e;
}
#hp-meter {
  height: 100%;
  background: var(--ink);
  display: block;
}
#shield {
  color: var(--orange);
}
.panel,
.loadout {
  border: 1px solid var(--outline);
  border-radius: 6px;
  background: var(--surface);
}
.panel {
  padding: 20px;
}
.panel-heading,
.section-line,
.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-heading h2,
.section-line h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.panel-icon {
  width: 16px;
  height: 14px;
  position: relative;
  opacity: 0.8;
}
.access-icon {
  border: 1px solid #93958a;
  border-radius: 1px;
}
.access-icon:before {
  position: absolute;
  content: "";
  background: #93958a;
  left: 3px;
  right: 3px;
  top: 3px;
  height: 1px;
}
.access-icon:after {
  position: absolute;
  content: "";
  height: 3px;
  width: 3px;
  background: #93958a;
  right: 3px;
  bottom: 2px;
}
.chat-icon {
  border: 1px solid #93958a;
  border-radius: 2px;
  height: 12px;
}
.chat-icon:after {
  content: "";
  position: absolute;
  height: 4px;
  width: 4px;
  bottom: -3px;
  left: 3px;
  background: var(--surface);
  border-left: 1px solid #93958a;
  border-bottom: 1px solid #93958a;
  transform: skewY(-35deg);
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #10120f;
  border: 1px solid #33352f;
  border-radius: 4px;
  padding: 3px;
  gap: 3px;
  margin: 18px 0;
}
.tabs button {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  height: 30px;
  border-radius: 3px;
}
.tabs button[aria-pressed="true"] {
  background: #30322d;
  color: var(--ink);
  box-shadow: 0 1px 4px #05060555;
}
form label,
.setting-row label {
  display: block;
  font: 10px var(--mono);
  letter-spacing: 0.07em;
  color: #b9b9ae;
  text-transform: uppercase;
  margin-bottom: 7px;
}
input,
select {
  display: block;
  width: 100%;
  color: var(--ink);
  background: #121411;
  border: 1px solid #41433b;
  border-radius: 3px;
  height: 39px;
  padding: 0 11px;
  min-width: 0;
}
input::placeholder {
  color: #84877b;
}
input:focus,
select:focus {
  outline: 1px solid #8c8d81;
  outline-offset: -1px;
}
#join-field {
  margin-top: 13px;
}
#code,
#room-code {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
details {
  font-size: 13px;
  color: var(--muted);
}
summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  padding: 13px 0;
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover {
  color: var(--ink);
}
.sliders {
  width: 13px;
  height: 12px;
  display: inline-block;
  position: relative;
  background:
    linear-gradient(currentColor, currentColor) left 3px/100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) left 9px/100% 1px no-repeat;
}
.sliders:before,
.sliders:after {
  content: "";
  position: absolute;
  width: 2px;
  height: 5px;
  background: currentColor;
}
.sliders:before {
  left: 3px;
  top: 1px;
}
.sliders:after {
  right: 3px;
  bottom: 0;
}
.chevron {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
}
details[open] .chevron {
  transform: rotate(225deg);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.setting-row input,
.setting-row select {
  width: 67px;
  height: 30px;
  font-size: 13px;
}
.setting-row label {
  font: 12px var(--sans);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--orange);
  color: #171710;
  padding: 0 13px 0 14px;
  height: 42px;
  font-weight: 800;
  font-size: 14px;
  border-radius: 3px;
}
.primary b {
  font: 22px/1 var(--sans);
}
.primary:disabled {
  opacity: 0.55;
}
.entry-caption,
.tools-body p,
.form-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
}
.form-status {
  color: #ffd0b5;
}
#entry-form.join .primary {
  margin-top: 15px;
}
.loadout {
  padding: 14px 17px 17px;
}
.section-line {
  margin-bottom: 11px;
}
.section-line > span {
  font-size: 10px;
  color: var(--muted);
}
.slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}
.slot {
  display: flex;
  gap: 6px;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 9px;
  background: #141613;
  border: 1px solid #33362e;
  border-radius: 3px;
  min-width: 0;
  text-align: left;
}
.slot kbd {
  font: 700 11px/1 var(--mono);
  min-height: 17px;
  padding: 3px 4px;
  border: 1px solid #515348;
  background: #23251f;
  border-radius: 3px;
  color: #d4d4c8;
}
.slot span {
  font-size: 11px;
  color: #818479;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.slot.bound {
  border-color: #85604b;
}
.slot.bound span {
  color: #f0e7d9;
}
.slot.bound kbd {
  border-color: var(--orange);
}
.chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 156px;
}
.chat-log {
  overflow: auto;
  min-height: 0;
  max-height: 152px;
  scrollbar-color: #44473c transparent;
  scrollbar-width: thin;
}
.chat-log:not(:empty) {
  margin: 9px 0 12px;
}
.chat-line {
  font-size: 13px;
  line-height: 1.4;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.chat-line strong {
  font-weight: 650;
  color: #d3d3c6;
  margin-right: 6px;
}
.chat-line.own strong {
  color: var(--orange);
}
.empty-chat {
  font-size: 13px;
  color: #929589;
  margin: 18px 0;
}
.chat-form {
  margin-top: auto;
  display: flex;
  gap: 7px;
  align-items: center;
}
.chat-form input {
  font-size: 13px;
  height: 33px;
}
.chat-form button,
.copy {
  border: 1px solid #46483e;
  border-radius: 3px;
  background: #252720;
  color: var(--ink);
}
.chat-form button {
  width: 33px;
  height: 33px;
  line-height: 1;
  font-size: 19px;
  flex: none;
}
.chat-form button:disabled {
  color: #797d70;
  background: #20221d;
}
.join-code {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: #10120f;
  border: 1px solid #35382f;
  border-radius: 4px;
}
.eyebrow {
  display: block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 10px;
}
.join-code strong {
  display: block;
  font-size: 20px;
}
.copy {
  font-size: 12px;
  padding: 7px 9px;
  white-space: nowrap;
}
.roster-head {
  color: var(--muted);
  margin-top: 15px;
  font-size: 11px;
}
.roster {
  list-style: none;
  padding: 0;
  margin: 7px 0 12px;
  max-height: 120px;
  overflow: auto;
}
.roster li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}
.roster li:before {
  content: "";
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: #a7aa9b;
}
.roster li.self:before {
  background: var(--orange);
}
.roster li.out {
  opacity: 0.5;
}
.roster small {
  font: 10px var(--mono);
  color: var(--muted);
  margin-left: auto;
}
.leave {
  padding: 4px 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
}
#host-tools summary {
  padding-bottom: 8px;
  font-size: 12px;
}
.tools-body {
  padding-bottom: 10px;
}
.tools-body p {
  margin: 0 0 8px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--outline);
  margin: 24px 0 0;
  padding: 13px 0 20px;
  color: #8b8e80;
  font-size: 11px;
}
footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 9px var(--mono);
  letter-spacing: 0.1em;
}
.footer-mark {
  width: 6px;
  height: 6px;
  border: 1px solid #96998a;
  transform: rotate(45deg);
}
.result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  background: #11130ff3;
  animation: fade 0.35s ease-out;
  gap: 12px;
}
.result h2,
#guide h2 {
  font: 400 38px/0.98 var(--display);
  letter-spacing: -0.065em;
}
.result p {
  color: var(--muted);
  font-size: 14px;
}
.result .primary {
  max-width: 145px;
}
#guide {
  padding: 24px;
  width: min(90vw, 435px);
  border: 1px solid #474b3e;
  border-radius: 7px;
  background: #1a1c18;
  color: var(--ink);
}
#guide::backdrop {
  background: #030503bd;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-head button {
  font: 24px var(--sans);
  color: var(--muted);
}
#guide p {
  font-size: 14px;
  color: #b1b4a7;
  margin: 14px 0;
}
#guide dl {
  margin: 12px 0;
}
#guide dl > div {
  padding: 8px 0;
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 10px;
  border-top: 1px solid var(--outline);
}
#guide dt {
  font: 11px/1.6 var(--mono);
  color: var(--orange);
}
#guide dd {
  font-size: 13px;
  margin: 0;
}
#guide p.guide-note {
  font-size: 12px;
  margin-bottom: 0;
}
.touch-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 11px var(--mono);
  color: var(--muted);
}
.dpad {
  display: flex;
  gap: 4px;
}
.dpad button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: 4px;
  touch-action: none;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (min-width: 1500px) {
  .stage {
    height: clamp(510px, 54vh, 650px);
  }
  .panel {
    padding: 24px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1.65fr) minmax(235px, 0.95fr);
    gap: 12px;
  }
  .top-inner,
  .shell {
    padding: 0 24px;
  }
  .panel {
    padding: 15px;
  }
  .stage {
    min-height: 360px;
  }
  .slots {
    gap: 4px;
  }
  .slot {
    padding: 7px 5px;
  }
}
@media (max-width: 700px) {
  .top-inner,
  .shell {
    padding: 0 16px;
  }
  .top-inner {
    height: 54px;
  }
  .wordmark {
    font-size: 17px;
  }
  .brand-symbol {
    width: 23px;
    height: 21px;
  }
  .wordmark-light {
    font-size: 9px;
  }
  .heading {
    padding: 24px 0 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .format {
    font-size: 10px;
    padding: 0;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stage {
    height: clamp(250px, 49vw, 350px);
    min-height: 0;
  }
  .world-column,
  .side {
    gap: 10px;
  }
  .panel,
  .loadout {
    padding: 13px;
  }
  .stage-head,
  .stage-foot {
    left: 12px;
    right: 12px;
  }
  .stage-head {
    top: 9px;
  }
  .stage-foot {
    bottom: 9px;
  }
  .slot span {
    font-size: 10px;
  }
  .slots {
    gap: 3px;
  }
  .loadout {
    padding: 9px 11px 11px;
  }
  .section-line {
    margin-bottom: 7px;
  }
  .section-line h2,
  .panel-heading h2 {
    font-size: 15px;
  }
  .side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .chat-panel {
    min-height: 155px;
  }
  .chat-log {
    max-height: 160px;
  }
  .help {
    font-size: 12px;
  }
  .chat-form {
    gap: 4px;
  }
  .entry-caption {
    font-size: 11px;
  }
  .tabs {
    margin: 12px 0;
  }
  .slot {
    gap: 4px;
  }
  .join-code {
    padding: 8px;
    flex-wrap: wrap;
  }
  .copy {
    font-size: 11px;
  }
}
@media (max-width: 440px) {
  .side {
    grid-template-columns: 1fr;
  }
  .stage {
    height: 252px;
  }
  .chat-panel {
    min-height: 128px;
  }
  .wordmark-light {
    margin-left: 7px;
    padding-left: 7px;
  }
  .slot {
    padding: 6px 4px;
  }
  .slot kbd {
    font-size: 10px;
  }
  .format {
    gap: 6px;
  }
  .section-line > span {
    font-size: 9px;
  }
  .result h2 {
    font-size: 27px;
  }
  footer {
    gap: 15px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:after,
  *:before {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
  }
}
