@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Mono:wght@400;500&family=Nunito+Sans:wght@400;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  font-family: "Nunito Sans", sans-serif;
  background: #17182a;
  --ink: #fff8e9;
  --muted: #b6b3c4;
  --acid: #f6c453;
  --mint: #68d4c5;
  --ember: #f06449;
  --violet: #6b65c8;
  --paper: #fff7e6;
  --paper-ink: #262034;
  --panel: rgba(30, 29, 49, 0.92);
  --line: rgba(255, 248, 233, 0.14);
}

/* Board life, readable movement and in-context game guidance */
.class-portrait canvas {
  cursor: grab;
  height: 100%;
  inset: 0;
  min-height: 10rem;
  position: absolute;
  touch-action: none;
  width: 100%;
  z-index: 3;
}

.class-portrait canvas:active {
  cursor: grabbing;
}

.class-portrait:has(canvas) > span,
.class-portrait:has(canvas) > i {
  opacity: 0;
}

.class-portrait small {
  background: rgba(35, 35, 59, 0.78);
  border: 1px solid rgba(255, 247, 230, 0.22);
  border-radius: 999px;
  bottom: 0.25rem;
  color: #fff7e6;
  font: 600 0.48rem "DM Mono", monospace;
  left: 50%;
  padding: 0.3rem 0.55rem;
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 4;
}

.camera-hint {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 247, 230, 0.72);
  margin-left: 0.25rem;
  padding-left: 0.65rem;
}

.movement-breakdown {
  color: #fff7e6;
  font: 600 0.5rem/1.35 "DM Mono", monospace;
  grid-column: 1 / -1;
  max-width: 12rem;
  text-align: center;
  white-space: nowrap;
}

.turn-controls .dice-readout {
  grid-template-columns: repeat(2, 2.25rem);
  justify-content: center;
  min-width: 11rem;
}

.space-inspector {
  align-items: flex-start;
  background: rgba(255, 247, 230, 0.97);
  border: 2px solid #282741;
  border-radius: 1.1rem;
  bottom: 7.6rem;
  box-shadow: 0.65rem 0.65rem 0 #292942, 0 1.5rem 4rem rgba(10, 9, 20, 0.32);
  color: #292942;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  max-width: min(27rem, calc(100vw - 2rem));
  opacity: 0;
  padding: 1rem;
  position: fixed;
  right: 1.2rem;
  transform: translateX(calc(100% + 3rem)) rotate(1deg);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(.2,.8,.2,1);
  visibility: hidden;
  width: 25rem;
  z-index: 30;
}

.space-inspector[data-open="true"] {
  opacity: 1;
  transform: translateX(0) rotate(0);
  visibility: visible;
}

.space-inspector-close {
  align-items: center;
  background: #292942;
  border: 0;
  border-radius: 50%;
  color: #fff7e6;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  height: 1.8rem;
  justify-content: center;
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  width: 1.8rem;
}

.space-number {
  align-items: center;
  background: #f6c453;
  border: 2px solid #292942;
  border-radius: 0.8rem;
  box-shadow: 0.3rem 0.3rem 0 #292942;
  display: flex;
  font: 900 1.45rem "DM Mono", monospace;
  height: 4.4rem;
  justify-content: center;
}

.space-inspector[data-type="event"] .space-number {
  background: #f06449;
}

.space-inspector[data-type="special"] .space-number {
  background: #9d91ed;
}

.space-inspector[data-type="start"] .space-number {
  background: #68d4c5;
}

.space-inspector h2 {
  font-size: 1.2rem;
  margin: 0.16rem 2rem 0.35rem 0;
}

.space-inspector p {
  font-size: 0.68rem;
  line-height: 1.45;
  margin: 0;
}

.space-metrics {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0.8rem 0 0;
}

.space-metrics div {
  background: #ebe2d0;
  border-radius: 0.55rem;
  padding: 0.5rem;
}

.space-metrics dt {
  color: #756d78;
  font: 600 0.46rem "DM Mono", monospace;
  text-transform: uppercase;
}

.space-metrics dd {
  font-size: 0.68rem;
  font-weight: 800;
  margin: 0.16rem 0 0;
}

.guide-dialog {
  background: transparent;
  border: 0;
  color: #292942;
  max-height: 100vh;
  max-width: 100vw;
  padding: 1rem;
}

.guide-dialog::backdrop {
  background: rgba(24, 22, 40, 0.76);
  backdrop-filter: blur(8px);
}

.guide-shell {
  background: #fff7e6;
  border: 2px solid #292942;
  border-radius: 1.4rem;
  box-shadow: 0.8rem 0.8rem 0 #f06449;
  max-width: 48rem;
  overflow: hidden;
  padding: 1.35rem;
  width: calc(100vw - 2rem);
}

.guide-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.guide-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: -0.05em;
  margin: 0.2rem 0 1rem;
}

.guide-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, 1fr);
}

.guide-grid article {
  background: #ebe2d0;
  border-radius: 0.9rem;
  padding: 0.9rem;
}

.guide-grid article span {
  color: #f06449;
  font: 900 0.7rem "DM Mono", monospace;
}

.guide-grid h3 {
  font-size: 0.92rem;
  margin: 0.5rem 0 0.35rem;
}

.guide-grid p,
.guide-note p {
  font-size: 0.65rem;
  line-height: 1.5;
  margin: 0;
}

.guide-note {
  align-items: start;
  background: #292942;
  border-radius: 0.9rem;
  color: #fff7e6;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto 1fr;
  margin-top: 0.65rem;
  padding: 0.9rem;
}

.guide-note strong {
  color: #68d4c5;
  font: 800 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .space-inspector {
    bottom: 10.5rem;
    left: 0.7rem;
    right: 0.7rem;
    width: auto;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#game-canvas {
  display: block;
  height: 100vh;
  width: 100vw;
  outline: none;
}

.scene-vignette {
  background:
    linear-gradient(180deg, rgba(4, 10, 9, 0.66) 0%, transparent 28%),
    radial-gradient(circle at 50% 46%, transparent 30%, rgba(3, 9, 8, 0.42) 100%);
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.entry-flow {
  align-items: center;
  backdrop-filter: blur(12px);
  background:
    radial-gradient(circle at 50% 25%, rgba(39, 77, 64, 0.42), transparent 48%),
    rgba(3, 10, 8, 0.74);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 5.5rem 1rem 1rem;
  position: fixed;
  z-index: 40;
}

.entry-flow[hidden] {
  display: none;
}

.entry-shell {
  backdrop-filter: blur(28px);
  background: rgba(7, 20, 17, 0.94);
  border: 1px solid rgba(215, 245, 66, 0.18);
  border-radius: 1.4rem;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.48);
  max-height: calc(100vh - 7rem);
  overflow: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  width: min(31rem, 100%);
}

.entry-shell h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: -0.055em;
  margin: 0.35rem 0 0;
}

.entry-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0.65rem 0 1.25rem;
}

.entry-form {
  display: grid;
  gap: 0.65rem;
}

.entry-form label {
  color: #b5c5bf;
  font: 0.6rem "DM Mono", monospace;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
  text-transform: uppercase;
}

.entry-form input,
.entry-form select {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  font: 0.82rem "Manrope", sans-serif;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
}

.entry-form input:focus,
.entry-form select:focus {
  border-color: rgba(215, 245, 66, 0.55);
  outline: 2px solid rgba(215, 245, 66, 0.1);
}

.entry-main-action {
  margin-top: 0.45rem;
}

.entry-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font: 0.56rem "DM Mono", monospace;
  gap: 0.7rem;
  margin: 0.45rem 0;
  text-transform: uppercase;
}

.entry-divider::before,
.entry-divider::after {
  background: var(--line);
  content: "";
  flex: 1;
  height: 1px;
}

.join-row {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr auto;
}

#room-code {
  font: 700 1rem "DM Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lobby-title-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.room-code-button {
  background: rgba(215, 245, 66, 0.09);
  border: 1px solid rgba(215, 245, 66, 0.24);
  border-radius: 0.8rem;
  color: var(--acid);
  cursor: pointer;
  padding: 0.55rem 0.75rem;
}

.room-code-button span,
.room-code-button strong {
  display: block;
}

.room-code-button span {
  color: var(--muted);
  font: 0.5rem "DM Mono", monospace;
  text-transform: uppercase;
}

.room-code-button strong {
  font: 700 0.95rem "DM Mono", monospace;
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
}

.lobby-players {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  max-height: 16rem;
  overflow: auto;
  padding: 0;
}

.lobby-players li {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0.8rem;
}

.lobby-players li div,
.lobby-players li strong,
.lobby-players li span {
  display: block;
}

.lobby-players li strong {
  font-size: 0.78rem;
}

.lobby-players li div span {
  color: var(--muted);
  font: 0.58rem "DM Mono", monospace;
  margin-top: 0.15rem;
  text-transform: capitalize;
}

.lobby-ready {
  color: #e8b16b;
  font: 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
}

.lobby-ready.is-ready {
  color: var(--mint);
}

.lobby-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.entry-error {
  color: #ffad92;
  font-size: 0.72rem;
  min-height: 1.1rem;
  margin: 0.8rem 0 0;
  text-align: center;
}

.turn-controls {
  align-items: center;
  backdrop-filter: blur(24px);
  background: rgba(7, 20, 17, 0.92);
  border: 1px solid rgba(215, 245, 66, 0.2);
  border-radius: 1rem;
  bottom: 1.25rem;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr) auto;
  left: 50%;
  max-width: min(58rem, calc(100vw - 2rem));
  padding: 0.75rem;
  position: fixed;
  transform: translateX(-50%);
  width: max-content;
  z-index: 25;
}

.turn-controls[hidden] {
  display: none;
}

.local-player-readout strong,
.local-player-readout span {
  display: block;
}

.local-player-readout strong {
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.local-player-readout span,
.turn-action-status {
  color: var(--muted);
  font: 0.58rem "DM Mono", monospace;
  margin: 0.15rem 0 0;
}

.dice-readout {
  align-items: center;
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(2, 2.25rem);
}

.dice-readout span {
  align-items: center;
  background: #e8e5d9;
  border-radius: 0.48rem;
  color: #152019;
  display: flex;
  font: 800 1rem "DM Mono", monospace;
  height: 2.25rem;
  justify-content: center;
}

.dice-readout strong {
  color: var(--acid);
  font: 0.55rem "DM Mono", monospace;
  grid-column: 1 / -1;
  text-align: center;
  text-transform: uppercase;
}

.property-offer span,
.property-offer strong,
.property-offer small {
  display: block;
}

.property-offer span,
.property-offer small {
  color: var(--muted);
  font: 0.52rem "DM Mono", monospace;
  text-transform: uppercase;
}

.property-offer strong {
  font-size: 0.72rem;
  margin: 0.12rem 0;
}

.turn-actions {
  display: flex;
  gap: 0.4rem;
}

.turn-action-status {
  grid-column: 1 / -1;
  text-align: center;
}

.game-over-shell {
  text-align: center;
}

.winner-mark {
  color: var(--acid);
  filter: drop-shadow(0 0 18px rgba(215, 245, 66, 0.35));
  font-size: 2.8rem;
}

.game-over-shell h2 {
  font-size: 1.7rem;
  margin: 0.35rem 0;
}

.game-over-shell > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.4rem 0 1.25rem;
}

.skip-link {
  background: var(--acid);
  color: #101b16;
  font-weight: 800;
  left: 1rem;
  padding: 0.65rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.brand-lockup {
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35));
  line-height: 1;
}

.brand-kicker,
.eyebrow {
  color: var(--acid);
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin: 0;
  text-transform: uppercase;
}

.brand-lockup h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  margin: 0.22rem 0 0;
  text-transform: uppercase;
}

.brand-lockup h1 span {
  color: var(--acid);
}

.brand-subtitle {
  color: #a4b4af;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  margin: 0.35rem 0 0 0.1rem;
  text-transform: uppercase;
}

.status-pill {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(7, 17, 15, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  gap: 0.55rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 0.9rem;
  text-transform: uppercase;
}

.status-dot {
  background: #efb75e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(239, 183, 94, 0.12);
  height: 0.45rem;
  width: 0.45rem;
}

.status-pill[data-state="connected"] .status-dot {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(70, 214, 164, 0.12);
}

.status-pill[data-state="disconnected"] .status-dot {
  background: var(--ember);
  box-shadow: 0 0 0 4px rgba(255, 135, 92, 0.12);
}

.social-toggle,
.icon-button {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(7, 17, 15, 0.76);
  border: 1px solid var(--line);
  color: #dce5e1;
  cursor: pointer;
  display: inline-flex;
  font-family: "DM Mono", monospace;
  justify-content: center;
  text-transform: uppercase;
}

.social-toggle {
  border-radius: 999px;
  font-size: 0.66rem;
  gap: 0.45rem;
  letter-spacing: 0.08em;
  min-height: 2.15rem;
  padding: 0.55rem 0.75rem;
}

.social-toggle > span:first-child {
  color: var(--acid);
}

.social-toggle:hover,
.social-toggle:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(215, 245, 66, 0.48);
  color: var(--acid);
  outline: none;
}

.hud-card,
.turn-card,
.board-legend {
  backdrop-filter: blur(20px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.hud-card {
  border-radius: 1.15rem;
  padding: 1rem;
}

.hud-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.8rem;
}

.hud-card h2,
.turn-card h2 {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
}

.count-badge {
  align-items: center;
  background: rgba(215, 245, 66, 0.12);
  border: 1px solid rgba(215, 245, 66, 0.22);
  border-radius: 999px;
  color: var(--acid);
  display: inline-flex;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  height: 1.65rem;
  justify-content: center;
  min-width: 1.65rem;
}

.empty-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 0.8rem;
  padding: 1.1rem 0.2rem 0.25rem;
}

.empty-state[hidden] {
  display: none;
}

.empty-state-icon {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--acid);
  display: flex;
  flex: 0 0 auto;
  font-size: 1.3rem;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.empty-state strong {
  color: #d5ded9;
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

.empty-state p,
.asset-card p,
.turn-card p {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
  margin: 0;
}

.players-list {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0.75rem 0 0;
  max-height: min(42vh, 22rem);
  overflow: auto;
  padding: 0;
}

.player-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 0.8rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.6rem;
}

.player-row.is-current {
  background: rgba(215, 245, 66, 0.07);
  border-color: rgba(215, 245, 66, 0.2);
}

.player-monogram,
.turn-content > span {
  align-items: center;
  background: var(--player-color, var(--acid));
  border-radius: 0.6rem;
  color: #102019;
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.player-meta strong {
  display: block;
  font-size: 0.72rem;
}

.player-meta span,
.player-balance span {
  color: var(--muted);
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.player-balance {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  text-align: right;
}

.asset-icon {
  align-items: center;
  background: rgba(70, 214, 164, 0.1);
  border: 1px solid rgba(70, 214, 164, 0.18);
  border-radius: 0.75rem;
  color: var(--mint);
  display: flex;
  font-size: 1.35rem;
  height: 2.65rem;
  justify-content: center;
  width: 2.65rem;
}

.asset-path {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.7rem;
}

.asset-path span {
  color: var(--muted);
  display: block;
  font-size: 0.58rem;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.asset-path code {
  color: #bfd0ca;
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-legend {
  border-radius: 999px;
  color: #b4c2bd;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  gap: 1rem;
  padding: 0.7rem 1rem;
  text-transform: uppercase;
}

.board-legend span {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.board-legend i {
  border-radius: 0.18rem;
  display: inline-block;
  height: 0.55rem;
  width: 0.55rem;
}

.legend-property {
  background: #d5caa7;
}

.legend-event {
  background: var(--ember);
}

.legend-player {
  background: var(--acid);
  border-radius: 50% !important;
}

.legend-minion {
  background: #b7352c;
  border: 1px solid #ff8b78;
  border-radius: 50% !important;
}

.turn-card {
  border-radius: 1rem;
  min-width: min(20rem, 88vw);
  padding: 0.8rem 1rem;
}

.turn-content {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.turn-content > span {
  height: 2.4rem;
  width: 2.4rem;
}

.social-panel {
  backdrop-filter: blur(24px);
  background: rgba(7, 18, 16, 0.96);
  border: 1px solid rgba(217, 242, 230, 0.14);
  border-radius: 1.2rem;
  bottom: 1.5rem;
  box-shadow: -24px 22px 70px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  right: 1.5rem;
  top: 7rem;
  transform: translateX(calc(100% + 2rem));
  transition:
    transform 220ms ease,
    visibility 220ms;
  visibility: hidden;
  width: min(23rem, calc(100vw - 2rem));
  z-index: 40;
}

.social-panel[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
}

.social-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem 1rem 0.85rem;
}

.social-header h2 {
  font-size: 1.05rem;
  margin: 0.22rem 0 0;
}

.icon-button {
  border-radius: 0.7rem;
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
  height: 2.2rem;
  width: 2.2rem;
}

.voice-section,
.chat-section {
  padding: 0.9rem 1rem;
}

.voice-section {
  border-bottom: 1px solid var(--line);
}

.social-section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.social-section-heading h3 {
  font-size: 0.78rem;
  margin: 0.2rem 0 0;
}

.voice-button {
  align-items: center;
  background: rgba(70, 214, 164, 0.08);
  border: 1px solid rgba(70, 214, 164, 0.2);
  border-radius: 0.75rem;
  color: #d7e3de;
  cursor: pointer;
  display: flex;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding: 0.68rem 0.75rem;
  text-align: left;
  width: 100%;
}

.voice-button i {
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(70, 214, 164, 0.1);
  height: 0.48rem;
  width: 0.48rem;
}

.voice-button[data-state="active"] {
  background: rgba(255, 102, 85, 0.1);
  border-color: rgba(255, 102, 85, 0.3);
}

.voice-button[data-state="active"] i {
  background: #ff6655;
  box-shadow: 0 0 0 4px rgba(255, 102, 85, 0.12);
}

.voice-button:focus-visible,
.voice-button:hover {
  border-color: rgba(215, 245, 66, 0.5);
  outline: none;
}

.voice-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.social-helper {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.4;
  margin: 0.5rem 0 0;
}

.voice-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0.6rem 0 0;
  max-height: 3.6rem;
  overflow: auto;
  padding: 0;
}

.voice-participants li {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
  display: flex;
  font-size: 0.58rem;
  gap: 0.35rem;
  padding: 0.32rem 0.48rem;
}

.voice-participants small {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.48rem;
}

.voice-dot {
  background: #5d6c67;
  border-radius: 50%;
  height: 0.38rem;
  width: 0.38rem;
}

.voice-dot.is-live {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(70, 214, 164, 0.1);
}

.chat-section {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.identity-label {
  color: #aab9b4;
  font-family: "DM Mono", monospace;
  font-size: 0.54rem;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-scroll {
  flex: 1;
  min-height: 5rem;
  overflow: hidden;
  position: relative;
}

.chat-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.62rem;
  inset: 0;
  justify-content: center;
  line-height: 1.45;
  padding: 1rem 2rem;
  position: absolute;
  text-align: center;
}

.chat-empty[hidden] {
  display: none;
}

.chat-empty span {
  color: var(--acid);
  font-size: 1.25rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  list-style: none;
  margin: 0.7rem 0;
  overflow-y: auto;
  padding: 0 0.2rem 0 0;
}

.chat-message {
  background: rgba(255, 255, 255, 0.035);
  border-left: 2px solid var(--mint);
  border-radius: 0.15rem 0.65rem 0.65rem 0.15rem;
  padding: 0.5rem 0.6rem;
}

.chat-message.is-system {
  background: rgba(215, 245, 66, 0.045);
  border-left-color: var(--acid);
}

.chat-message > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.chat-message strong {
  color: #d8e2de;
  font-size: 0.62rem;
}

.chat-message time {
  color: #64756f;
  font-family: "DM Mono", monospace;
  font-size: 0.48rem;
}

.chat-message p {
  color: #aebdb8;
  font-size: 0.62rem;
  line-height: 1.42;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.chat-form {
  align-items: stretch;
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.chat-form input {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--ink);
  flex: 1;
  font: 0.68rem "Manrope", sans-serif;
  min-width: 0;
  padding: 0.65rem 0.7rem;
}

.chat-form input::placeholder {
  color: #64756f;
}

.chat-form input:focus {
  border-color: rgba(215, 245, 66, 0.45);
  outline: none;
}

.chat-form button {
  background: var(--acid);
  border: 0;
  border-radius: 0.7rem;
  color: #142019;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  width: 2.55rem;
}

.chat-form button:focus-visible,
.chat-form button:hover {
  box-shadow: 0 0 0 3px rgba(215, 245, 66, 0.2);
  outline: none;
}

.social-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: #667872;
  display: flex;
  font-family: "DM Mono", monospace;
  font-size: 0.46rem;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  text-transform: uppercase;
}

.social-footer > div {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.social-footer i {
  background: #53635e;
  border-radius: 50%;
  height: 0.38rem;
  width: 0.38rem;
}

.social-footer [data-connected="true"] {
  color: var(--mint);
}

.social-footer [data-connected="true"] i {
  background: var(--mint);
}

.async-panel {
  backdrop-filter: blur(24px);
  background: rgba(7, 18, 16, 0.96);
  border: 1px solid rgba(217, 242, 230, 0.14);
  border-radius: 1.2rem;
  box-shadow: 24px 22px 70px rgba(0, 0, 0, 0.38);
  left: 1.5rem;
  overflow: hidden;
  position: fixed;
  top: 7rem;
  transform: translateX(calc(-100% - 2rem));
  transition:
    transform 220ms ease,
    visibility 220ms;
  visibility: hidden;
  width: min(22rem, calc(100vw - 2rem));
  z-index: 40;
}

.async-panel[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
}

.bingo-section,
.duel-shortcuts {
  padding: 1rem;
}

.bingo-section {
  border-bottom: 1px solid var(--line);
}

.bingo-ball {
  align-items: center;
  background: var(--acid);
  border-radius: 50%;
  color: #172019;
  display: inline-flex;
  font: 800 0.8rem "DM Mono", monospace;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.bingo-metrics {
  color: var(--muted);
  display: flex;
  font: 0.56rem "DM Mono", monospace;
  justify-content: space-between;
  margin: 0.9rem 0 0.65rem;
  text-transform: uppercase;
}

.bingo-metrics strong {
  color: var(--ink);
}

.bingo-grid {
  display: grid;
  gap: 0.32rem;
  grid-template-columns: repeat(5, 1fr);
  min-height: 10rem;
}

.bingo-grid > span {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  color: #b9c7c2;
  display: flex;
  font: 600 0.68rem "DM Mono", monospace;
  justify-content: center;
  min-height: 2.2rem;
}

.bingo-grid > span[data-drawn="true"] {
  background: rgba(70, 214, 164, 0.16);
  border-color: rgba(70, 214, 164, 0.4);
  color: #8ce8c7;
}

.bingo-grid > span[data-completed="true"] {
  background: var(--acid);
  border-color: var(--acid);
  color: #172019;
}

.mini-helper,
.duel-shortcuts p {
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.45;
  margin: 0.65rem 0 0;
}

.duel-shortcuts h3 {
  font-size: 0.78rem;
  margin: 0.2rem 0 0;
}

.minigame-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-height: calc(100vh - 2rem);
  max-width: calc(100vw - 2rem);
  padding: 0;
  width: min(31rem, calc(100vw - 2rem));
}

.minigame-dialog::backdrop {
  backdrop-filter: blur(5px);
  background: rgba(2, 8, 7, 0.7);
}

.modal-shell {
  background:
    linear-gradient(145deg, rgba(16, 38, 32, 0.98), rgba(7, 18, 16, 0.99));
  border: 1px solid rgba(215, 245, 66, 0.18);
  border-radius: 1.15rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.hot-shell {
  border-color: rgba(255, 135, 92, 0.28);
}

.modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.modal-header h2 {
  font-size: 1.12rem;
  margin: 0.22rem 0 0;
}

.modal-content {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.minigame-status {
  color: #c2cec9;
  font-size: 0.7rem;
  line-height: 1.5;
  margin: 0;
}

.trump-readout {
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
}

.trump-readout span,
.field-label,
.charge-value {
  color: var(--muted);
  font: 0.56rem "DM Mono", monospace;
  text-transform: uppercase;
}

.trump-readout strong {
  color: var(--acid);
  font: 700 0.8rem "DM Mono", monospace;
}

.field-label {
  display: block;
  margin-bottom: 0.4rem;
}

.liars-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 4.5rem;
}

.liars-card {
  background: #eae7db;
  border: 2px solid transparent;
  border-radius: 0.62rem;
  color: #172019;
  cursor: pointer;
  font: 800 0.76rem "DM Mono", monospace;
  height: 4.2rem;
  min-width: 3rem;
  padding: 0.5rem;
  transform: translateY(0);
  transition: transform 120ms ease;
}

.liars-card[data-selected="true"] {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px rgba(215, 245, 66, 0.14);
  transform: translateY(-0.28rem);
}

.liars-card:disabled {
  cursor: default;
  opacity: 0.62;
}

.modal-actions {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.primary-action,
.secondary-action,
.danger-action {
  border-radius: 0.7rem;
  cursor: pointer;
  font: 700 0.65rem "Manrope", sans-serif;
  min-height: 2.65rem;
  padding: 0.65rem 0.75rem;
}

.primary-action {
  background: var(--acid);
  border: 1px solid var(--acid);
  color: #172019;
}

.secondary-action {
  background: rgba(70, 214, 164, 0.1);
  border: 1px solid rgba(70, 214, 164, 0.3);
  color: #a1ebd0;
}

.danger-action {
  background: rgba(255, 135, 92, 0.12);
  border: 1px solid rgba(255, 135, 92, 0.35);
  color: #ffb095;
}

.primary-action:disabled,
.secondary-action:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.danger-action:focus-visible,
.liars-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(215, 245, 66, 0.24);
  outline: none;
}

.code-input,
.target-select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  color: var(--ink);
  width: 100%;
}

.code-input {
  font: 800 2rem "DM Mono", monospace;
  letter-spacing: 0.45em;
  padding: 0.8rem 0.8rem 0.8rem 1.25rem;
  text-align: center;
}

.code-input:focus,
.target-select:focus {
  border-color: rgba(215, 245, 66, 0.55);
  outline: none;
}

.invasion-feedback {
  background: rgba(70, 214, 164, 0.08);
  border-left: 2px solid var(--mint);
  border-radius: 0.2rem 0.65rem 0.65rem 0.2rem;
  color: #a9d9c8;
  font: 0.62rem/1.5 "DM Mono", monospace;
  min-height: 2.6rem;
  padding: 0.65rem 0.75rem;
}

.charge-meter {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 0.8rem;
  overflow: hidden;
}

.charge-meter i {
  background: linear-gradient(90deg, #efc458, var(--ember));
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.charge-value {
  margin: -0.35rem 0 0;
}

.charge-value strong {
  color: #ffc1aa;
}

.charge-action {
  min-height: 4.2rem;
  text-transform: uppercase;
}

.target-select {
  font: 0.68rem "Manrope", sans-serif;
  padding: 0.7rem;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.fatal-error,
.noscript-message {
  background: #471d18;
  border: 1px solid #a74b3d;
  color: #ffe7df;
  left: 50%;
  padding: 1rem 1.25rem;
  position: fixed;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
}

.fatal-error strong,
.fatal-error span {
  display: block;
}

.fatal-error span {
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

@media (max-width: 640px) {
  .brand-subtitle,
  .asset-card {
    display: none;
  }

  .hud-card {
    padding: 0.8rem;
  }

  .players-list {
    max-height: 30vh;
  }

  .turn-card {
    padding: 0.7rem 0.8rem;
  }

  .social-panel {
    bottom: 0.75rem;
    right: 0.75rem;
    top: 5.7rem;
    width: calc(100vw - 1.5rem);
  }

  .async-panel {
    left: 0.75rem;
    top: 5.7rem;
    width: calc(100vw - 1.5rem);
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }

  .status-pill {
    padding-inline: 0.7rem;
  }

  .social-footer > span {
    display: none;
  }

  .turn-controls {
    bottom: 0.6rem;
    grid-template-columns: 1fr auto;
    width: calc(100vw - 1.2rem);
  }

  .property-offer,
  .turn-actions {
    grid-column: 1 / -1;
  }

  .turn-actions > button {
    flex: 1;
  }
}

.legend-market {
  background: #25d7a5;
  box-shadow: 0 0 0.7rem #25d7a5;
}

.legend-duel {
  background: #ff5c48;
  box-shadow: 0 0 0.7rem #ff5c48;
}

.legend-fork {
  background: #ffad32;
  box-shadow: 0 0 0.7rem #ffad32;
}

.market-toggle[data-available="true"] {
  animation: market-call 1.5s ease-in-out infinite;
  background: #25d7a5;
  border-color: #8affde;
  color: #172d29;
}

@keyframes market-call {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(37, 215, 165, 0);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 1.4rem rgba(37, 215, 165, 0.58);
    transform: translateY(-0.12rem);
  }
}

.market-dialog,
.route-dialog {
  background: transparent;
  border: 0;
  color: #fff7e6;
  max-height: 100vh;
  max-width: 100vw;
  margin: auto;
  padding: 1rem;
}

.market-dialog::backdrop,
.route-dialog::backdrop {
  background: rgba(14, 14, 25, 0.82);
  backdrop-filter: blur(9px);
}

.market-shell {
  background:
    linear-gradient(135deg, rgba(37, 215, 165, 0.12), transparent 45%),
    #1f2035;
  border: 2px solid #68d4c5;
  border-radius: 1.3rem;
  box-shadow: 0.8rem 0.8rem 0 #0b5547, 0 2rem 6rem rgba(0, 0, 0, 0.45);
  max-width: 55rem;
  overflow: hidden;
  width: calc(100vw - 2rem);
}

.market-header {
  align-items: flex-start;
  border-bottom: 1px solid rgba(104, 212, 197, 0.23);
  display: flex;
  justify-content: space-between;
  padding: 1.2rem;
}

.market-header h2 {
  color: #68d4c5;
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  letter-spacing: -0.06em;
  margin: 0.15rem 0 0.3rem;
}

.market-header > div > p:last-child {
  color: #b6b3c4;
  font-size: 0.68rem;
  margin: 0;
}

.market-items {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, 1fr);
  padding: 1rem;
}

.market-item {
  background: #2b2c45;
  border: 1px solid rgba(104, 212, 197, 0.18);
  border-radius: 1rem;
  display: grid;
  gap: 0.7rem;
  grid-template-rows: auto 1fr auto;
  min-height: 17rem;
  padding: 1rem;
  transition: transform 160ms ease, border-color 160ms ease;
}

.market-item:hover {
  border-color: #68d4c5;
  transform: translateY(-0.25rem);
}

.market-item-symbol {
  align-items: center;
  background: #68d4c5;
  border-radius: 0.7rem;
  color: #172d29;
  display: flex;
  font-size: 1.4rem;
  height: 2.8rem;
  justify-content: center;
  width: 2.8rem;
}

.market-item h3 {
  font-size: 1.05rem;
  margin: 0.3rem 0;
}

.market-item p:not(.eyebrow) {
  color: #b6b3c4;
  font-size: 0.65rem;
  line-height: 1.45;
  margin: 0;
}

.market-item-actions {
  display: grid;
  gap: 0.45rem;
}

.market-item-actions button {
  background: #68d4c5;
  border: 0;
  border-radius: 0.55rem;
  color: #172d29;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.65rem;
}

.market-item-actions button + button {
  background: transparent;
  border: 1px solid rgba(104, 212, 197, 0.4);
  color: #fff7e6;
}

.market-item-actions button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.34;
}

.market-footer {
  align-items: center;
  background: #17182a;
  display: grid;
  gap: 0.25rem 0.8rem;
  grid-template-columns: auto auto 1fr;
  padding: 0.85rem 1.2rem;
}

.market-footer span,
.market-footer small {
  color: #b6b3c4;
  font: 0.55rem "DM Mono", monospace;
}

.market-footer strong {
  color: #68d4c5;
}

.market-footer small {
  text-align: right;
}

.route-shell {
  background: #fff7e6;
  border: 2px solid #292942;
  border-radius: 1.35rem;
  box-shadow: 0.8rem 0.8rem 0 #ffad32;
  color: #292942;
  max-width: 42rem;
  padding: 1.3rem;
  width: calc(100vw - 2rem);
}

.route-shell h2 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0.3rem 0 1.1rem;
}

.route-options {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, 1fr);
}

.route-options button {
  background: #ebe2d0;
  border: 2px solid transparent;
  border-radius: 0.9rem;
  color: #292942;
  cursor: pointer;
  min-height: 10rem;
  padding: 1rem;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.route-options button:last-child {
  background: #292942;
  color: #fff7e6;
}

.route-options button:hover {
  border-color: #ffad32;
  transform: rotate(-1deg) translateY(-0.2rem);
}

.route-options span,
.route-options strong,
.route-options small {
  display: block;
}

.route-options span {
  color: #ef684d;
  font: 800 0.55rem "DM Mono", monospace;
  text-transform: uppercase;
}

.route-options strong {
  font-size: 1rem;
  margin: 0.75rem 0 0.45rem;
}

.route-options small {
  font-size: 0.64rem;
  line-height: 1.45;
}

#route-status {
  color: #756d78;
  font: 0.55rem "DM Mono", monospace;
  margin: 0.9rem 0 0;
  text-align: center;
}

@media (max-width: 700px) {
  .market-items,
  .route-options {
    grid-template-columns: 1fr;
  }

  .market-items {
    max-height: 66vh;
    overflow: auto;
  }

  .market-item {
    min-height: auto;
  }

  .market-footer {
    grid-template-columns: auto auto;
  }

  .market-footer small {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Distrito 40 — experience layer */

body {
  background: #17182a;
  color: var(--ink);
  font-family: "Nunito Sans", sans-serif;
}

button,
input,
select {
  font-family: inherit;
}

#game-canvas {
  background: #23233b;
}

.scene-vignette {
  background:
    linear-gradient(180deg, rgba(20, 20, 38, 0.62), transparent 22%),
    radial-gradient(circle at 50% 46%, transparent 40%, rgba(19, 18, 34, 0.42) 100%);
}

.entry-flow {
  align-items: stretch;
  background:
    radial-gradient(circle at 15% 18%, rgba(240, 100, 73, 0.24), transparent 28%),
    radial-gradient(circle at 78% 88%, rgba(104, 212, 197, 0.18), transparent 30%),
    #23233d;
  color: var(--ink);
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.entry-flow::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, black, transparent 68%);
  pointer-events: none;
  position: absolute;
  z-index: -2;
}

.entry-flow::after {
  background: #f6c453;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
  height: 34rem;
  left: -21rem;
  opacity: 0.1;
  position: absolute;
  top: calc(50% - 17rem);
  width: 34rem;
  z-index: -1;
}

.entry-backdrop-art {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.floating-tile,
.floating-coin {
  align-items: center;
  display: flex;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  justify-content: center;
  position: absolute;
}

.floating-tile {
  background: var(--paper);
  border: 0.35rem solid #262034;
  border-radius: 1.2rem;
  box-shadow: 0.55rem 0.6rem 0 rgba(12, 11, 24, 0.35);
  color: #262034;
  height: 6rem;
  transform: rotate(-12deg);
  width: 6rem;
}

.tile-one {
  bottom: -1.5rem;
  left: 32%;
}

.tile-two {
  right: 38%;
  top: -2rem;
  transform: rotate(15deg);
}

.floating-coin {
  background: #f6c453;
  border: 0.3rem solid #2d2944;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  color: #342c20;
  height: 4.2rem;
  width: 4.2rem;
}

.coin-one {
  left: 3%;
  top: 12%;
  transform: rotate(10deg);
}

.coin-two {
  bottom: 7%;
  left: 43%;
  transform: rotate(-8deg);
}

.entry-layout {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 6rem);
  grid-template-columns: minmax(22rem, 0.72fr) minmax(38rem, 1.28fr);
  margin: auto;
  max-width: 1440px;
  min-height: 100%;
  position: relative;
  width: 100%;
  z-index: 1;
}

.entry-pitch {
  max-width: 31rem;
  padding-left: clamp(0rem, 3vw, 3rem);
}

.district-seal {
  align-items: stretch;
  background: #f06449;
  border: 0.24rem solid #181729;
  border-radius: 1rem;
  box-shadow: 0.45rem 0.5rem 0 #151424;
  color: #fff7e6;
  display: inline-flex;
  font-family: "Bricolage Grotesque", sans-serif;
  margin-bottom: 2rem;
  overflow: hidden;
  transform: rotate(-3deg);
}

.district-seal span,
.district-seal strong {
  align-items: center;
  display: flex;
  height: 3.8rem;
  justify-content: center;
}

.district-seal span {
  font-size: 1.55rem;
  font-weight: 800;
  width: 3.2rem;
}

.district-seal strong {
  background: #f6c453;
  color: #252035;
  font-size: 1.65rem;
  width: 3.8rem;
}

.entry-kicker,
.entry-tagline {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.entry-kicker {
  color: #8ee4d5;
  font-size: 0.7rem;
  margin: 0;
}

.entry-pitch h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(4rem, 7.2vw, 7.3rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.76;
  margin: 1rem 0 1.35rem;
  max-width: 7ch;
  text-transform: uppercase;
}

.entry-pitch h1 span {
  color: #f6c453;
  display: block;
  letter-spacing: -0.04em;
  margin-left: 1.8ch;
  text-shadow: 0.08em 0.08em 0 #f06449;
}

.entry-tagline {
  color: #f6c453;
  font-size: 0.76rem;
  font-weight: 700;
  margin: 0 0 1.2rem;
}

.entry-manifesto {
  color: #d2cfdd;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 31rem;
}

.entry-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.7rem;
}

.entry-features span {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #c9c6d5;
  font-size: 0.67rem;
  padding: 0.52rem 0.75rem;
}

.entry-features b {
  color: #fff7e6;
  font-family: "DM Mono", monospace;
}

.entry-shell {
  backdrop-filter: none;
  background: var(--paper);
  border: 0;
  border-radius: 1.65rem;
  box-shadow:
    0 0 0 0.3rem #302c49,
    0 2.2rem 5rem rgba(10, 9, 22, 0.38);
  color: var(--paper-ink);
  max-height: calc(100vh - clamp(2rem, 6vw, 5rem));
  max-width: none;
  overflow: auto;
  padding: clamp(1.2rem, 2.4vw, 2rem);
  position: relative;
  width: 100%;
}

.entry-shell::before {
  background: repeating-linear-gradient(
    90deg,
    #f06449 0 1.4rem,
    #f6c453 1.4rem 2.8rem,
    #68d4c5 2.8rem 4.2rem,
    #6b65c8 4.2rem 5.6rem
  );
  border-radius: 1.65rem 1.65rem 0 0;
  content: "";
  height: 0.42rem;
  inset: 0 0 auto;
  position: absolute;
}

.entry-heading,
.field-heading,
.lobby-title-row {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.entry-shell .eyebrow {
  color: #776f89;
}

.entry-shell h2 {
  color: #262034;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.03;
  margin: 0.35rem 0 0;
}

.step-badge {
  background: #302c49;
  border-radius: 999px;
  color: #fff7e6;
  font: 500 0.58rem "DM Mono", monospace;
  padding: 0.55rem 0.7rem;
}

.entry-form {
  gap: 0.72rem;
  margin-top: 1.3rem;
}

.entry-form > label,
.field-heading label,
.field-heading h3 {
  color: #544d62;
  font: 800 0.66rem "Nunito Sans", sans-serif;
  letter-spacing: 0.055em;
  margin: 0;
  text-transform: uppercase;
}

.field-heading {
  align-items: baseline;
  margin-top: 0.25rem;
}

.field-heading > span {
  color: #8c8496;
  font-size: 0.62rem;
}

.entry-form input {
  background: #fffdf8;
  border: 2px solid #ded4c5;
  border-radius: 0.82rem;
  color: #262034;
  font: 700 0.9rem "Nunito Sans", sans-serif;
  min-height: 3.2rem;
  padding: 0.75rem 0.9rem;
}

.entry-form input::placeholder {
  color: #a39aa5;
}

.entry-form input:focus {
  border-color: #6b65c8;
  box-shadow: 0 0 0 4px rgba(107, 101, 200, 0.12);
  outline: none;
}

.class-picker {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(4, 1fr);
}

.class-choice,
.class-chip {
  align-items: center;
  background: #f4ebdc;
  border: 2px solid transparent;
  color: #393144;
  cursor: pointer;
  display: flex;
  text-align: left;
}

.class-choice {
  border-radius: 0.8rem;
  gap: 0.5rem;
  min-height: 3.4rem;
  padding: 0.45rem;
}

.class-choice:hover,
.class-choice:focus-visible,
.class-choice[data-selected="true"],
.class-chip:hover,
.class-chip:focus-visible,
.class-chip[data-selected="true"] {
  background: color-mix(in srgb, var(--class-color) 13%, #fffaf0);
  border-color: var(--class-color);
  outline: none;
}

.class-choice-symbol {
  align-items: center;
  background: var(--class-color);
  border-radius: 0.62rem;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1rem;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.class-choice > span:last-child,
.class-choice strong,
.class-choice small,
.class-chip > span:last-child,
.class-chip strong,
.class-chip small {
  display: block;
  min-width: 0;
}

.class-choice strong {
  font-size: 0.68rem;
  line-height: 1.1;
}

.class-choice small {
  color: #83798a;
  font-size: 0.52rem;
  margin-top: 0.16rem;
}

.class-preview {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--class-color) 18%, #302c49), #302c49);
  border-radius: 1rem;
  color: #fff7e6;
  display: grid;
  gap: 1rem;
  grid-template-columns: 7.2rem 1fr;
  min-height: 11.2rem;
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.class-preview::after {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
  height: 10rem;
  left: -3.2rem;
  position: absolute;
  top: -4rem;
  width: 10rem;
}

.class-portrait {
  align-items: center;
  align-self: stretch;
  display: flex;
  justify-content: center;
  min-height: 9rem;
  position: relative;
}

.class-portrait span {
  align-items: center;
  background: var(--class-color);
  border: 0.35rem solid #fff7e6;
  border-radius: 46% 46% 42% 42%;
  box-shadow:
    0 0.8rem 0 -0.15rem color-mix(in srgb, var(--class-color) 70%, #17182a),
    0 1.1rem 1.8rem rgba(0, 0, 0, 0.28);
  display: flex;
  font-size: 2.1rem;
  height: 5.5rem;
  justify-content: center;
  position: relative;
  transform: rotate(-2deg);
  width: 5.5rem;
  z-index: 1;
}

.class-portrait i {
  background: var(--class-color);
  border: 0.35rem solid #fff7e6;
  border-radius: 45% 45% 0.7rem 0.7rem;
  bottom: -1.1rem;
  height: 4rem;
  position: absolute;
  width: 6.5rem;
}

.class-preview-copy {
  position: relative;
  z-index: 1;
}

.class-preview-copy > p {
  color: var(--class-soft);
  font-size: 0.7rem;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.class-preview-copy > p small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.58rem;
  margin-left: 0.35rem;
}

.class-preview-copy h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  margin: 0.1rem 0;
}

.class-preview blockquote {
  color: #ded9e5;
  font-size: 0.7rem;
  font-style: italic;
  margin: 0.12rem 0 0.65rem;
}

.skill-card {
  background: rgba(10, 9, 22, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.72rem;
  padding: 0.65rem 0.75rem;
}

.skill-card > span {
  color: var(--class-soft);
  display: block;
  font: 500 0.54rem "DM Mono", monospace;
  text-transform: uppercase;
}

.skill-card > strong {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.22rem;
}

.skill-card p {
  color: #cbc6d5;
  font-size: 0.6rem;
  line-height: 1.35;
  margin: 0.2rem 0 0;
}

.entry-actions {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1.1fr 1fr;
}

.entry-main-action {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-inline: 1rem;
}

.entry-main-action b {
  font-size: 1.2rem;
}

.join-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

#room-code {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-width: 0;
}

.primary-action,
.secondary-action,
.danger-action,
.quiet-action {
  border-radius: 0.75rem;
  font: 800 0.73rem "Nunito Sans", sans-serif;
  min-height: 3rem;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.primary-action {
  background: #f06449;
  border-color: #f06449;
  box-shadow: 0 0.28rem 0 #a63d31;
  color: #fff;
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible:not(:disabled) {
  box-shadow: 0 0.38rem 0 #a63d31;
  outline: none;
  transform: translateY(-0.08rem);
}

.secondary-action {
  background: #302c49;
  border-color: #302c49;
  color: #fff7e6;
}

.secondary-action:hover:not(:disabled),
.secondary-action:focus-visible:not(:disabled) {
  background: #464064;
  outline: none;
}

.quiet-action {
  background: transparent;
  border: 1px solid #cfc4b5;
  color: #706778;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
}

.entry-error {
  color: #b43e32;
  font-size: 0.7rem;
  font-weight: 800;
  margin: 0.8rem 0 0;
}

.entry-copy {
  color: #766d7e;
  font-size: 0.74rem;
  margin: 0.65rem 0 1rem;
}

.room-code-button {
  background: #f6c453;
  border: 2px solid #302c49;
  box-shadow: 0.22rem 0.25rem 0 #302c49;
  color: #302c49;
}

.room-code-button span {
  color: #6d5730;
}

.room-code-button strong {
  font-size: 1rem;
}

.lobby-roster,
.lobby-class-switcher {
  border-top: 1px solid #ddd3c5;
  padding-top: 0.85rem;
}

.lobby-class-switcher {
  margin-top: 1rem;
}

.lobby-players {
  gap: 0.48rem;
  margin-top: 0.6rem;
  max-height: 14rem;
}

.lobby-players li {
  background: #fffdf8;
  border: 1px solid #dfd6c8;
  border-left: 0.35rem solid var(--class-color);
  border-radius: 0.75rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.62rem;
}

.lobby-player-avatar {
  align-items: center;
  background: var(--class-color);
  border-radius: 0.58rem;
  color: #fff;
  display: flex !important;
  font-size: 0.86rem;
  height: 2.15rem;
  justify-content: center;
  width: 2.15rem;
}

.lobby-players li strong {
  color: #332b3a;
  font-size: 0.74rem;
}

.lobby-players li div span {
  color: #817787;
  font-size: 0.52rem;
}

.lobby-ready {
  align-self: center;
  color: #a65632;
}

.lobby-ready.is-ready {
  color: #21836f;
}

.lobby-class-picker {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0.6rem;
}

.class-chip {
  border-radius: 0.7rem;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.38rem;
}

.class-chip .class-choice-symbol {
  height: 2rem;
  width: 2rem;
}

.class-chip strong {
  font-size: 0.65rem;
}

.class-chip small {
  color: #7d7485;
  font-size: 0.5rem;
  line-height: 1.2;
  margin-top: 0.08rem;
}

.lobby-actions {
  align-items: center;
  display: flex;
  margin-top: 1rem;
}

.lobby-actions .quiet-action {
  margin-right: auto;
}

.lobby-actions .primary-action,
.lobby-actions .secondary-action {
  min-width: 9.5rem;
}

.game-header {
  inset: 0 0 auto;
  padding: 1rem 1.2rem;
  position: absolute;
  z-index: 20;
}

.game-header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: auto;
  max-width: 1600px;
}

.brand-lockup {
  align-items: center;
  display: flex;
  filter: none;
  gap: 0.65rem;
}

.mini-seal {
  align-items: center;
  background: #f6c453;
  border: 2px solid #262034;
  border-radius: 0.65rem;
  box-shadow: 0.18rem 0.2rem 0 #f06449;
  color: #262034;
  display: flex;
  font: 800 0.82rem "Bricolage Grotesque", sans-serif;
  height: 2.45rem;
  justify-content: center;
  transform: rotate(-3deg);
  width: 2.45rem;
}

.brand-kicker {
  color: #f6c453;
  font-size: 0.5rem;
}

.brand-lockup h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.025em;
  margin: 0.08rem 0 0;
}

.table-whisper {
  align-items: center;
  background: rgba(31, 29, 49, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bcb8c8;
  display: flex;
  font: 500 0.56rem "DM Mono", monospace;
  gap: 0.45rem;
  left: 50%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  position: absolute;
  transform: translateX(-50%);
  text-transform: uppercase;
}

.table-whisper span {
  color: #68d4c5;
}

.header-actions {
  display: flex;
  gap: 0.45rem;
}

.social-toggle,
.icon-button,
.status-pill {
  backdrop-filter: blur(12px);
  background: rgba(31, 29, 49, 0.9);
  border-color: rgba(255, 248, 233, 0.16);
}

.social-toggle {
  font: 800 0.62rem "Nunito Sans", sans-serif;
  min-height: 2.55rem;
  padding-inline: 0.8rem;
  text-transform: none;
}

.status-pill {
  font-size: 0.55rem;
  min-height: 2.55rem;
}

.game-hud {
  inset: 0;
  padding: 5.2rem 1.2rem 1.2rem;
  position: absolute;
  z-index: 10;
}

.hud-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  margin: auto;
  max-width: 1600px;
}

.hud-top-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.hud-card,
.turn-card,
.board-legend {
  backdrop-filter: blur(15px);
  background: rgba(31, 29, 49, 0.9);
  border-color: rgba(255, 248, 233, 0.14);
  box-shadow: 0 1rem 2.5rem rgba(12, 11, 25, 0.22);
}

.players-card {
  border-left: 0.24rem solid #f6c453;
  max-width: 20rem;
  padding: 0.85rem;
  width: min(20rem, 88vw);
}

.hud-card .eyebrow,
.turn-card .eyebrow {
  color: #f6c453;
}

.hud-card h2,
.turn-card h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.92rem;
}

.count-badge {
  background: #f6c453;
  border-color: #f6c453;
  color: #2c2636;
}

.players-list {
  gap: 0.35rem;
  margin-top: 0.6rem;
  max-height: min(34vh, 18rem);
}

.player-row {
  border-left: 0.2rem solid var(--player-color, #f6c453);
  padding: 0.52rem;
}

.player-row.is-current {
  background: rgba(246, 196, 83, 0.12);
  border-color: #f6c453;
}

.player-monogram,
.turn-content > span {
  color: #fff;
}

.turn-card {
  border-right: 0.24rem solid #68d4c5;
  min-width: min(19rem, 86vw);
}

.turn-content {
  margin-top: 0.4rem;
}

.board-legend {
  align-self: flex-start;
  font-size: 0.5rem;
  margin-bottom: 6.3rem;
}

.legend-property {
  background: #f6c453;
}

.legend-event {
  background: #f06449;
}

.legend-player {
  background: #68d4c5;
}

.turn-controls {
  background: #fff7e6;
  border: 0;
  border-bottom: 0.3rem solid #d8cbb9;
  border-radius: 1.2rem;
  box-shadow:
    0 0 0 0.22rem #302c49,
    0 1.4rem 4rem rgba(12, 11, 25, 0.4);
  color: #2b2536;
  gap: 0.85rem;
  grid-template-columns: minmax(7rem, 1fr) 1px auto minmax(7rem, auto) auto;
  max-width: min(64rem, calc(100vw - 2rem));
  padding: 0.8rem 0.9rem;
}

.turn-controls .eyebrow {
  color: #867b88;
}

.local-player-readout strong {
  color: #302c49;
  font-size: 0.82rem;
}

.local-player-readout span,
.turn-action-status {
  color: #716779;
}

.action-separator {
  background: #ded2c2;
  height: 2.8rem;
}

.dice-readout span {
  background: #302c49;
  box-shadow: 0 0.18rem 0 #161522;
  color: #fff7e6;
}

.dice-readout strong {
  color: #a14539;
}

.property-offer span,
.property-offer small {
  color: #847987;
}

.property-offer strong {
  color: #302c49;
  font-size: 0.8rem;
}

.turn-controls .secondary-action {
  background: #302c49;
  border-color: #302c49;
}

.turn-action-status {
  border-top: 1px solid #dfd4c5;
  margin-top: -0.05rem;
  padding-top: 0.45rem;
}

.social-panel,
.async-panel {
  background: rgba(31, 29, 49, 0.98);
  border-color: rgba(255, 248, 233, 0.16);
}

.social-panel {
  top: 5.3rem;
}

.async-panel {
  top: 5.3rem;
}

.modal-shell {
  background: #302c49;
  border-color: rgba(246, 196, 83, 0.4);
}

.minigame-dialog::backdrop {
  background: rgba(16, 14, 28, 0.78);
}

.fatal-error,
.noscript-message {
  border-radius: 1rem;
}

@media (max-width: 1050px) {
  .entry-layout {
    grid-template-columns: minmax(16rem, 0.55fr) minmax(34rem, 1.45fr);
  }

  .entry-pitch h1 {
    font-size: clamp(3.5rem, 7vw, 5rem);
  }

  .entry-manifesto {
    font-size: 0.86rem;
  }

  .class-choice {
    padding: 0.35rem;
  }

  .class-choice-symbol {
    height: 2rem;
    width: 2rem;
  }
}

@media (max-width: 820px) {
  .entry-flow {
    overflow-y: auto;
  }

  .entry-layout {
    display: block;
    margin: auto;
    min-height: auto;
    width: min(100%, 44rem);
  }

  .entry-pitch {
    max-width: none;
    padding: 1rem 0 2rem;
    text-align: center;
  }

  .district-seal {
    margin-bottom: 1rem;
  }

  .entry-pitch h1 {
    font-size: clamp(3.5rem, 16vw, 5.5rem);
    margin-inline: auto;
    max-width: 9ch;
  }

  .entry-pitch h1 span {
    display: inline;
    margin-left: 0.08em;
  }

  .entry-manifesto {
    margin-inline: auto;
  }

  .entry-features {
    justify-content: center;
  }

  .entry-shell {
    max-height: none;
  }

  .table-whisper {
    display: none;
  }
}

@media (max-width: 640px) {
  .entry-flow {
    padding: 0.75rem;
  }

  .entry-pitch {
    padding-top: 0.5rem;
  }

  .district-seal {
    transform: scale(0.82) rotate(-3deg);
  }

  .entry-pitch h1 {
    font-size: 3.6rem;
    line-height: 0.9;
  }

  .entry-tagline {
    font-size: 0.65rem;
  }

  .entry-manifesto {
    font-size: 0.78rem;
  }

  .entry-features {
    margin-top: 1rem;
  }

  .entry-shell {
    border-radius: 1.2rem;
    padding: 1.15rem;
  }

  .class-picker {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-preview {
    grid-template-columns: 4.4rem 1fr;
    padding: 0.8rem;
  }

  .class-portrait span {
    border-width: 0.25rem;
    font-size: 1.4rem;
    height: 3.7rem;
    width: 3.7rem;
  }

  .class-portrait i {
    border-width: 0.25rem;
    height: 3rem;
    width: 4.3rem;
  }

  .entry-actions {
    grid-template-columns: 1fr;
  }

  .lobby-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lobby-actions .quiet-action {
    grid-column: 1 / -1;
    margin-right: 0;
    order: 3;
  }

  .game-header {
    padding: 0.7rem;
  }

  .brand-lockup > div {
    display: none;
  }

  .status-pill #connection-label {
    display: none;
  }

  .status-pill {
    padding-inline: 0.7rem;
  }

  .game-hud {
    padding: 4.6rem 0.7rem 0.7rem;
  }

  .players-card {
    max-width: 11.5rem;
    padding: 0.65rem;
  }

  .players-card .hud-heading h2,
  .players-card .empty-state p,
  .player-balance {
    display: none;
  }

  .players-list {
    max-height: 24vh;
  }

  .player-row {
    grid-template-columns: auto 1fr;
  }

  .turn-card {
    min-width: 10.5rem;
    padding: 0.65rem;
  }

  .turn-content > span {
    height: 2rem;
    width: 2rem;
  }

  .turn-card h2 {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .board-legend {
    display: none;
  }

  .turn-controls {
    bottom: 0.55rem;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.65rem;
    width: calc(100vw - 1.1rem);
  }

  .action-separator {
    display: none;
  }

  .property-offer,
  .turn-actions,
  .turn-action-status {
    grid-column: 1 / -1;
  }

  .turn-actions > button {
    flex: 1;
  }
}
