@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f4efdf;
  --ink: #263b3a;
  --muted: #6c766b;
  --line: #d7d6c5;
  --gold: #d2a359;
  --green: #335f59;
  --soft: #faf7ee;
  --purple: #66506d;
  font:
    15px/1.55 ui-sans-serif,
    system-ui,
    sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 650;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled) {
  background: #e6e4d3;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #bb8434;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  min-height: 80px;
}
.acre {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-decoration: none;
  white-space: nowrap;
}
.acre small {
  font-size: 8px;
  font-weight: 400;
  margin-left: 7px;
}
.wordmark {
  font:
    italic 700 26px/1 Georgia,
    serif;
  text-decoration: none;
}
.wordmark i {
  color: #af823e;
  font-size: 20px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiet {
  background: transparent;
  font-size: 12px;
  padding: 10px 13px;
}
.volume input {
  width: 64px;
  accent-color: var(--green);
}
main {
  max-width: 1600px;
  padding: 24px;
  margin: auto;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font:
    400 38px/1.05 Georgia,
    serif;
  letter-spacing: -0.03em;
  margin: 14px 0 18px;
}
h3 {
  font-size: 15px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 800;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.fine {
  font-size: 10px;
  line-height: 1.65;
  color: var(--muted);
}
.primary {
  background: var(--green);
  color: #fff5d9;
  border-color: var(--green);
  box-shadow: 0 3px 0 #213f3a;
  width: 100%;
  padding: 14px;
}
.primary:hover:not(:disabled) {
  background: #264a46;
}
.secondary {
  background: #e9e7d7;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 7px 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.primary span {
  float: right;
}
.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
  gap: 22px;
}
.hero {
  min-height: 705px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #1b343962 0, transparent 70%),
    url("/arcade/assets/hocus-havoc-cover-1024.webp") center/cover;
  position: relative;
  color: #fff3d6;
  box-shadow: 0 15px 45px #29424018;
}
.hero-copy {
  padding: 52px 44px;
}
.hero h1 {
  font:
    700 clamp(64px, 7.8vw, 126px) / 0.85 Georgia,
    serif;
  letter-spacing: -0.07em;
  margin: 28px 0 26px;
  text-shadow: 0 3px 30px #24494c55;
}
.hero h1 em {
  font-weight: 400;
}
.hero p {
  font-size: 16px;
  text-shadow: 0 1px 8px #123;
}
.hero-tags {
  display: flex;
  gap: 18px;
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-top: 36px;
}
.hero-bottom {
  position: absolute;
  bottom: 22px;
  left: 28px;
  right: 28px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.07em;
  text-shadow: 0 1px 5px #111;
}
.room-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8f0;
  padding: 28px;
}
.room-card label:not(.check) {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin: 20px 0 8px;
}
.room-card input:not([type="checkbox"]),
.room-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffff9;
  color: var(--ink);
  padding: 12px;
  min-width: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin: 16px 0;
}
.check input {
  accent-color: var(--green);
}
.divider {
  text-align: center;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 28px 0 0;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.join-row {
  display: flex;
  gap: 9px;
}
.join-row input {
  letter-spacing: 0.15em;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}
.list-heading h3 {
  margin: 0;
}
.open-room {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.open-room small {
  display: block;
  color: var(--muted);
}
#open-rooms {
  max-height: 160px;
  overflow: auto;
}
.room-card .fine {
  margin: 24px 0 0;
}
.lobby-title {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lobby-title h2 {
  letter-spacing: 0.12em;
  font-size: 26px;
}
.roster-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.roster-seat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.roster-seat .seat-status {
  margin-left: auto;
  font-size: 10px;
}
.portrait {
  display: block;
  background-image: url("/arcade/assets/havoc-characters-v2-1024.webp");
  background-size: 400% 200%;
  width: 54px;
  height: 72px;
  flex: none;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.settings select {
  font-size: 10px !important;
  padding: 9px !important;
}
.lobby-actions {
  display: grid;
  gap: 10px;
  margin: 20px 0 10px;
}
.cast-section {
  margin: 50px 0 20px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 10px 0 0;
}
.section-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}
.characters {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.character {
  padding: 10px 4px 14px;
  border: 1px solid var(--line);
  background: #faf7ed;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.character .portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  filter: drop-shadow(0 7px 5px #59634828);
}
.character b {
  display: block;
  font:
    700 15px Georgia,
    serif;
}
.character small {
  font-size: 9px;
  color: var(--muted);
}
.character[aria-pressed="true"] {
  border: 2px solid #af813b;
  background: #f1e4c2;
  padding: 9px 3px 13px;
}
.character:disabled {
  opacity: 0.32;
}
.character-detail {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
  min-height: 55px;
  font-size: 12px;
}
.character-detail em {
  font:
    italic 19px Georgia,
    serif;
}
.character-detail span {
  color: var(--muted);
  max-width: 65%;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1600px;
  margin: auto;
  padding: 25px 28px 35px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}
footer span:last-child {
  font:
    italic 13px Georgia,
    serif;
}
.battle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.battle-heading h2 {
  margin: 5px 0 0;
  font-size: 30px;
}
.battle-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.battle-tools > span {
  font-size: 11px;
  color: var(--muted);
}
.turn-order {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 3px;
}
.wizard-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 130px;
  max-width: 250px;
  padding: 5px 9px 5px 4px;
  font-size: 11px;
  text-align: left;
  border-radius: 8px;
  background: #eae6d8;
}
.wizard-chip.active {
  background: #fff9e4;
  border-color: #bc914d;
  box-shadow: 0 0 0 1px #bc914d;
}
.wizard-chip.out {
  opacity: 0.38;
}
.wizard-chip .portrait {
  width: 33px;
  height: 44px;
}
.wizard-chip .chip-copy {
  flex: 1;
  overflow: hidden;
}
.wizard-chip b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.wizard-chip small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.hp-track {
  height: 3px;
  background: #c7c6b8;
  border-radius: 5px;
  margin: 4px 0;
}
.hp-track i {
  display: block;
  background: var(--player-color);
  height: 100%;
  border-radius: 5px;
}
.arena-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #809392;
  background: #81a6ad;
  box-shadow: 0 15px 45px #203a3a12;
}
#arena {
  display: block;
  width: 100%;
  height: clamp(340px, 43vw, 610px);
  touch-action: none;
  cursor: crosshair;
}
.arena-hud {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.arena-hud span {
  background: #20393bd9;
  color: #fff2d3;
  border: 1px solid #ffffff20;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  backdrop-filter: blur(6px);
}
#timer-label {
  margin-left: auto;
  font-weight: 800;
}
.canvas-hint {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  background: #263d40d9;
  color: #fff5da;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 10px;
  pointer-events: none;
  text-align: center;
  max-width: 90%;
  width: max-content;
}
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff4d1;
  background: #233e4966;
  font:
    700 68px Georgia,
    serif;
  pointer-events: none;
}
.last-event {
  font:
    italic 17px/1.5 Georgia,
    serif;
  text-align: center;
  min-height: 26px;
  margin: 16px 0;
  color: #5c675e;
}
.command-deck {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 32px;
  padding: 22px 26px;
  background: #faf7ee;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.movement .eyebrow {
  font-size: 9px;
}
.move-buttons {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.move-buttons button {
  flex: 1;
  padding: 9px;
  font-size: 15px;
  touch-action: none;
  user-select: none;
}
.fuel-track {
  height: 4px;
  background: #d7d9c7;
  border-radius: 4px;
}
.fuel-track i {
  display: block;
  width: 100%;
  height: 100%;
  background: #729b7f;
  border-radius: 4px;
}
.movement small {
  font-size: 9px;
  color: var(--muted);
}
.aim-controls label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
}
.aim-controls output {
  color: #856d46;
  letter-spacing: 0;
}
input[type="range"] {
  accent-color: #477c70;
}
.aim-controls input {
  width: 100%;
  margin: 8px 0 12px;
}
.cast-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cast-controls > span {
  font:
    italic 18px Georgia,
    serif;
}
.cast-controls .text-button {
  padding: 2px;
}
.spellbook {
  margin-top: 22px;
}
.spellbook-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.spellbook-heading .muted {
  font-size: 11px;
  max-width: 75%;
  min-height: 36px;
}
.spells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}
.spell {
  min-height: 94px;
  padding: 10px 5px;
  background: #eae7d8;
  position: relative;
}
.spell .spell-icon {
  font:
    27px Georgia,
    serif;
  display: block;
  color: #536b63;
}
.spell b {
  display: block;
  font-size: 10px;
  margin: 3px 0;
}
.spell small {
  font-size: 9px;
  color: var(--muted);
}
.spell .spell-key {
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 9px;
  color: #7c8375;
}
.spell[aria-pressed="true"] {
  background: #e3d4b3;
  border-color: #a78146;
  box-shadow: inset 0 0 0 1px #a78146;
}
.spell.signature {
  background: #e8ddec;
}
.spell.signature[aria-pressed="true"] {
  border-color: #9263a5;
  box-shadow: inset 0 0 0 1px #9263a5;
}
.keyboard-note {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  margin: 20px 0;
}
.notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  max-width: min(620px, 90%);
  padding: 15px 23px;
  background: #233e3e;
  color: #fff4d4;
  border: 1px solid #617c6b;
  border-radius: 10px;
  box-shadow: 0 10px 35px #1329293a;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  font-size: 13px;
  z-index: 10;
}
.notice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.notice.error {
  background: #73434b;
  border-color: #b88f87;
}
dialog {
  border: 1px solid #c6c6b1;
  border-radius: 16px;
  background: var(--soft);
  color: var(--ink);
  padding: 38px;
  max-width: min(820px, calc(100% - 24px));
  max-height: 90dvh;
  box-shadow: 0 30px 90px #16343850;
}
dialog::backdrop {
  background: #142e3db3;
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  background: transparent;
  border: 0;
  font-size: 23px;
}
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
  margin: 30px 0;
}
.rule-grid article b {
  font-size: 9px;
  color: #a27b37;
  letter-spacing: 0.1em;
}
.rule-grid h3 {
  font:
    700 21px Georgia,
    serif;
  margin: 10px 0;
}
.rule-grid p {
  font-size: 12px;
  color: var(--muted);
}
#result {
  text-align: center;
  width: 480px;
}
.result-star {
  font-size: 60px;
  color: #c4984a;
  margin: 10px;
}
#result-title {
  font-size: 43px;
}
#result-reason {
  font-size: 13px;
  color: var(--muted);
}
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.result-row small {
  color: var(--muted);
}
#results-list {
  margin: 24px 0;
  text-align: left;
  max-height: 250px;
  overflow: auto;
}
#leave-result {
  display: block;
  margin: 15px auto 0;
}
.playing main {
  max-width: 1500px;
}
.playing footer {
  padding-top: 8px;
}
@media (min-width: 1700px) {
  .hero h1 {
    font-size: 130px;
  }
  .hero {
    min-height: 760px;
  }
}
@media (max-width: 1100px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr) 325px;
  }
  .room-card {
    padding: 23px;
  }
  .hero-copy {
    padding: 42px 30px;
  }
  .characters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .character .portrait {
    max-width: 160px;
    margin: auto;
  }
  .command-deck {
    gap: 20px;
    padding: 20px;
  }
  .topbar .wordmark {
    display: none;
  }
  .hero-tags {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}
@media (max-width: 760px) {
  main {
    padding: 14px;
  }
  .topbar {
    padding: 12px 15px;
    gap: 8px;
    min-height: 66px;
  }
  .acre small,
  .volume {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .quiet {
    padding: 9px;
    font-size: 10px;
  }
  .acre {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .welcome-grid {
    display: block;
  }
  .hero {
    min-height: 480px;
    margin-bottom: 16px;
  }
  .hero-copy {
    padding: 30px 25px;
  }
  .hero h1 {
    font-size: 86px;
  }
  .hero-bottom {
    left: 20px;
    right: 20px;
    font-size: 8px;
  }
  .hero-tags {
    font-size: 8px;
  }
  .room-card {
    padding: 25px;
  }
  .room-card h2 {
    font-size: 38px;
  }
  .section-heading {
    display: block;
  }
  .section-heading p {
    margin-top: 15px;
  }
  .cast-section {
    margin-top: 35px;
  }
  .characters {
    gap: 7px;
  }
  .character b {
    font-size: 12px;
  }
  .character small {
    font-size: 8px;
  }
  .character-detail {
    display: block;
  }
  .character-detail span {
    display: block;
    max-width: none;
    margin-top: 10px;
  }
  .battle-heading {
    align-items: start;
  }
  .battle-heading h2 {
    font-size: 24px;
  }
  .battle-heading .eyebrow {
    font-size: 8px;
  }
  .battle-tools {
    flex-wrap: wrap;
    justify-content: end;
    max-width: 180px;
    gap: 5px;
  }
  .battle-tools > span {
    width: 100%;
    text-align: right;
  }
  .battle-tools .quiet {
    padding: 7px;
    font-size: 9px;
  }
  .wizard-chip {
    min-width: 115px;
  }
  #arena {
    height: 350px;
  }
  .arena-hud {
    left: 9px;
    right: 9px;
    top: 9px;
    gap: 5px;
  }
  .arena-hud span {
    padding: 5px 7px;
    font-size: 8px;
  }
  .canvas-hint {
    font-size: 9px;
    bottom: 8px;
    padding: 5px 10px;
  }
  .command-deck {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    gap: 20px 18px;
  }
  .cast-controls {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 16px;
  }
  .cast-controls > span {
    font-size: 15px;
  }
  .cast-controls .primary {
    grid-column: 1;
    grid-row: 2;
  }
  .cast-controls .text-button {
    grid-column: 2;
    grid-row: 2;
  }
  .spells {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .spell:last-child {
    grid-column: span 2;
  }
  .spell {
    min-height: 86px;
  }
  .spellbook-heading {
    display: block;
  }
  .spellbook-heading .muted {
    display: block;
    max-width: none;
    margin: 7px 0;
    min-height: 32px;
  }
  .keyboard-note {
    display: none;
  }
  footer {
    padding: 20px 16px 28px;
    display: block;
    font-size: 9px;
  }
  footer span {
    display: block;
    margin-bottom: 7px;
  }
  dialog {
    padding: 27px 22px;
  }
  .rule-grid {
    gap: 20px;
  }
  .rule-grid h3 {
    font-size: 19px;
  }
}
@media (max-width: 390px) {
  #help {
    font-size: 0;
  }
  #help:after {
    content: "Rules";
    font-size: 10px;
  }
  .top-actions {
    gap: 3px;
  }
  .quiet {
    padding: 9px 8px;
  }
  .hero {
    min-height: 460px;
  }
  .hero h1 {
    font-size: 77px;
  }
  .hero-tags {
    max-width: 180px;
  }
  .characters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .character b {
    font-size: 15px;
  }
  .character small {
    font-size: 9px;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
  .battle-tools {
    max-width: 155px;
  }
  .battle-heading h2 {
    font-size: 21px;
  }
  #arena {
    height: 320px;
  }
  .command-deck {
    padding: 13px;
    gap: 16px 13px;
  }
  .spells {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .spell:last-child {
    grid-column: span 3;
    min-height: 65px;
  }
  .spell:last-child .spell-icon {
    display: inline;
    margin-right: 10px;
  }
  .spell:last-child b {
    display: inline;
  }
  .spell:last-child small {
    display: block;
  }
  .last-event {
    font-size: 15px;
  }
  .hero-bottom > span {
    max-width: 110px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
