:root {
  --bg0: #070b12;
  --bg1: #101826;
  --panel: #121b2a;
  --panel-2: #182334;
  --line: #2a3b55;
  --text: #e7eef8;
  --muted: #8fa3bd;
  --accent: #3ec7ff;
  --accent-dim: #1a8fb8;
  --gold: #f0c14b;
  --ok: #3ddc8a;
  --bad: #ff5d6c;
  --warn: #ffb020;
  --shadow: 0 0 0 1px rgba(62, 199, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Exo 2", "Segoe UI", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(62, 199, 255, 0.14), transparent 55%),
    radial-gradient(700px 380px at 90% 10%, rgba(240, 193, 75, 0.08), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, var(--bg0) 55%, #05080e 100%);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { color: #7ad8ff; }

.game {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 1rem auto 2rem;
}

.game-frame {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 30%),
    var(--bg1);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-frame::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 2px,
    rgba(255, 255, 255, 0.012) 4px
  );
  z-index: 2;
}

.frame-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 3;
  border: 2px solid var(--accent);
  opacity: 0.7;
}

.frame-corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.frame-corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.frame-corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.frame-corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.game-top {
  position: relative;
  min-height: 180px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #070d14;
}

.game-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.game-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.02);
}

.game-banner-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 13, 20, 0.22) 0%, rgba(7, 13, 20, 0.42) 50%, rgba(7, 13, 20, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 13, 20, 0.62), transparent 46%, rgba(7, 13, 20, 0.4));
  pointer-events: none;
}

.game-top-bar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 180px;
  padding: 1rem 1.15rem;
}

.game-top .brand-name {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(62, 199, 255, 0.28);
}

.game-top .brand-kicker,
.game-top .brand-sub {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.game-top .loc-chip,
.game-top .btn-ghost {
  backdrop-filter: blur(8px);
  background: rgba(10, 18, 28, 0.55);
  border-color: rgba(140, 170, 200, 0.35);
}

.game-top .btn:not(.btn-ghost) {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.header-status {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0.45rem 0.2rem;
  border: 1px solid rgba(150, 185, 215, 0.28);
  background: rgba(8, 14, 22, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.header-stat {
  display: grid;
  gap: 0.12rem;
  min-width: 5.5rem;
  padding: 0.2rem 0.85rem;
  text-decoration: none;
  color: inherit;
}

a.header-stat:hover {
  text-decoration: none;
  background: rgba(62, 199, 255, 0.08);
}

.header-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-stat-value {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.header-stat-unit {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 0.15rem;
}

.header-stat-sub {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-stat-city {
  font-size: 0.95rem;
}

.header-stat-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(150, 185, 215, 0.22);
  margin: 0.15rem 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-clock {
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .game-top,
  .game-top-bar { min-height: 132px; }
  .header-status { width: 100%; }
  .header-stat { min-width: 0; flex: 1; }
  .game-top-actions { width: 100%; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand:hover .brand-name {
  color: var(--accent);
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 12px rgba(62, 199, 255, 0.35));
  transition: transform 160ms ease, filter 160ms ease;
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 16px rgba(62, 199, 255, 0.5));
}

.brand-mark.small {
  filter: none;
}

.brand-mark svg {
  display: block;
}

.brand-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.brand-kicker {
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.brand-name {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 0 18px rgba(62, 199, 255, 0.22);
  transition: color 0.15s ease;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.84rem;
}


.game-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.header-status .pulse-dot {
  width: 6px;
  height: 6px;
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(62, 199, 255, 0.08);
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hud {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #0a111c;
}

.bank-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.bank-form {
  border: 1px solid var(--line);
  background: #0d1624;
  padding: 0.9rem;
  max-width: none;
}

.bank-form h2 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.hud-item {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.55rem 0.65rem;
  min-width: 0;
}

.hud-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hud-item strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
}

.hud-money { color: var(--gold); }
.hud-xp { color: var(--accent); }
.hud-rank { color: #fff; }
.hud-ok { color: var(--ok); }
.hud-bad { color: var(--bad); }

.hud-bar,
.stat-bar {
  margin-top: 0.35rem;
  height: 7px;
  background: #0a1018;
  border: 1px solid #243247;
  overflow: hidden;
}

.hud-bar-fill,
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #178f55, var(--ok));
}

.hud-bar-fill.energy,
.stat-bar-fill.energy {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  box-shadow: 0 0 10px rgba(62, 199, 255, 0.45);
}

.hud-bar-fill.xp,
.stat-bar-fill.xp {
  background: linear-gradient(90deg, #b8860b, var(--gold));
  box-shadow: 0 0 10px rgba(240, 193, 75, 0.35);
}

.hud-bar-fill.health,
.stat-bar-fill.health {
  background: linear-gradient(90deg, #8b1e2d, var(--bad));
  box-shadow: 0 0 10px rgba(255, 93, 108, 0.35);
}

.status-chip.status-hurt {
  color: var(--bad);
  border-color: rgba(255, 93, 108, 0.4);
  background: rgba(255, 93, 108, 0.1);
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.board-table th,
.board-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.board-table th {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-card {
  margin: 1rem 0 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(62, 199, 255, 0.28);
  background: linear-gradient(180deg, rgba(62, 199, 255, 0.08), rgba(13, 21, 34, 0.35));
}

.guide-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.guide-card-head h2 {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-size: 1.05rem;
}

.guide-panel .panel-body {
  padding-top: 1.15rem;
}

.guide-read {
  max-width: 36rem;
  margin: 0 auto;
}

.guide-read-head {
  margin-bottom: 1rem;
}

.guide-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-read h1 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  line-height: 1.15;
  font-weight: 700;
}

.guide-lede {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.45;
  opacity: 0.92;
}

.guide-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(42, 59, 85, 0.85);
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.guide-pill:hover {
  color: var(--text);
  border-color: rgba(62, 199, 255, 0.4);
}

.guide-pill.is-active {
  color: var(--bg0);
  background: var(--accent);
  border-color: var(--accent);
}

.guide-body {
  display: grid;
  gap: 0.95rem;
}

.guide-body p {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.65;
}

.guide-body ul {
  margin: 0;
  padding: 0.15rem 0 0 1.15rem;
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.5;
}

.guide-body li::marker {
  color: var(--accent);
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(42, 59, 85, 0.85);
}

.guide-actions-spacer {
  width: 4.5rem;
}

.guide-dismiss {
  margin-top: 0.85rem;
  text-align: center;
}

@media (max-width: 560px) {
  .guide-actions {
    flex-direction: column;
  }

  .guide-actions .btn,
  .guide-actions-spacer {
    width: 100%;
  }

  .guide-actions-spacer {
    display: none;
  }
}

.online-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: #5a6a82;
}

.online-dot.on {
  background: #3dce7a;
  box-shadow: 0 0 0 2px rgba(61, 206, 122, 0.2);
}

.online-dot.off {
  background: #5a6a82;
}

.profile-table {
  margin: 0;
  max-width: 36rem;
}

.panel-profile .panel-body {
  display: grid;
  gap: 1.25rem;
}

.profile-section {
  display: grid;
  gap: 0.75rem;
}

.profile-section-title {
  margin: 0;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(62, 199, 255, 0.22);
}

.profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.profile-avatar {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 1px solid rgba(62, 199, 255, 0.35);
  background: #0a121c;
  flex: 0 0 auto;
}

.profile-hero-text {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.profile-hero-text h1 {
  margin: 0;
}

.profile-bio {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
  max-width: 40rem;
}

.profile-bio-empty {
  margin: 0;
}

.profile-edit-form {
  max-width: 36rem;
}

.profile-edit-avatar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
}

.hud-info {
  color: var(--accent);
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.player-cell-avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 1px solid rgba(62, 199, 255, 0.28);
  background: #0a121c;
  flex: 0 0 auto;
}

.panel-garage .page-hero.page-hero-has-copy,
.panel-garage .page-hero.page-hero-has-copy img {
  max-height: 160px;
  height: 160px;
}

.panel-garage .page-hero-copy {
  padding: 0.7rem 1rem 0.75rem;
}

.panel-garage .page-hero-copy h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.panel-garage .page-hero-lede {
  font-size: 0.88rem;
  max-width: 36rem;
}

.panel-garage .panel-body.garage-compact {
  display: grid;
  gap: 0.9rem;
  padding-top: 0.95rem;
}

.garage-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 0.9rem;
  align-items: stretch;
}

.garage-card {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid rgba(62, 199, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(62, 199, 255, 0.05), transparent 42%),
    rgba(10, 18, 28, 0.55);
}

.garage-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}

.garage-card-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.garage-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(62, 199, 255, 0.35);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.garage-pill-ok {
  color: var(--ok);
  border-color: rgba(61, 220, 138, 0.4);
  background: rgba(61, 220, 138, 0.1);
}

.garage-pill-warn {
  color: var(--warn);
  border-color: rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.1);
}

.action-list {
  display: grid;
  border: 1px solid rgba(62, 199, 255, 0.16);
  background: rgba(7, 11, 18, 0.45);
  overflow: hidden;
}

.action-form {
  margin: 0;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-bottom: 1px solid rgba(62, 199, 255, 0.12);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.action-list .action-form:last-child .action-row,
.action-list > .action-row:last-child {
  border-bottom: 0;
}

.action-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.action-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.action-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.chance-chip {
  flex: 0 0 auto;
  min-width: 3.4rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid rgba(62, 199, 255, 0.35);
  background: rgba(62, 199, 255, 0.1);
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.chance-chip.is-muted {
  color: var(--muted);
  border-color: rgba(143, 163, 189, 0.28);
  background: rgba(143, 163, 189, 0.08);
}

.action-row.is-ready {
  cursor: pointer;
}

.action-row.is-ready:hover {
  background: rgba(62, 199, 255, 0.12);
}

.action-row.is-ready:hover .action-name {
  color: var(--accent);
}

.action-row.is-locked,
.action-row.is-cooldown,
.action-row.is-energy,
.action-row.is-full,
.action-row.is-hurt,
.action-row.is-jail {
  opacity: 0.72;
  cursor: default;
}

.garage-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.stat-cell {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(62, 199, 255, 0.12);
  background: rgba(7, 11, 18, 0.4);
}

.stat-cell span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-cell strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
}

.stat-cell-wide {
  grid-column: 1 / -1;
}

.garage-meter {
  margin-top: 0.25rem;
  height: 4px;
  background: rgba(42, 59, 85, 0.8);
  overflow: hidden;
}

.garage-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

.garage-section {
  margin: 0;
}

.garage-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.garage-filters-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}

.garage-filters-compact select,
.garage-filters-compact input {
  min-width: 0;
  width: auto;
  max-width: 9rem;
  padding: 0.32rem 0.45rem;
  background: rgba(7, 11, 18, 0.7);
  border: 1px solid rgba(62, 199, 255, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.damage-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.damage-filter input {
  width: 3.6rem !important;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(62, 199, 255, 0.12);
  background: rgba(7, 11, 18, 0.35);
}

.garage-table {
  margin: 0;
}

.garage-table th,
.garage-table td {
  padding: 0.4rem 0.5rem;
  font-size: 0.84rem;
}

.garage-table th {
  background: rgba(62, 199, 255, 0.06);
}

.garage-table tr.garage-away {
  opacity: 0.7;
}

.garage-empty {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0.35rem;
  text-align: center;
}

.id-chip {
  appearance: none;
  border: 1px solid rgba(62, 199, 255, 0.35);
  background: rgba(62, 199, 255, 0.08);
  color: var(--accent);
  font: inherit;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.12rem 0.35rem;
  cursor: pointer;
}

.id-chip:hover {
  background: rgba(62, 199, 255, 0.18);
}

.damage-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.damage-bar {
  width: 2.4rem;
  height: 4px;
  background: rgba(42, 59, 85, 0.9);
  overflow: hidden;
}

.damage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ok), var(--warn) 55%, var(--bad));
}

.garage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.garage-transport-bar {
  gap: 0.55rem;
}

.transport-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}

.transport-form input,
.transport-form select {
  padding: 0.4rem 0.5rem;
  background: rgba(7, 11, 18, 0.7);
  border: 1px solid rgba(62, 199, 255, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.transport-form input {
  width: 10rem;
}

@media (max-width: 860px) {
  .garage-top {
    grid-template-columns: 1fr;
  }

  .panel-garage .page-hero.page-hero-has-copy,
  .panel-garage .page-hero.page-hero-has-copy img {
    max-height: 140px;
    height: 140px;
  }
}

.pm-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.pm-item {
  border: 1px solid rgba(62, 199, 255, 0.16);
  background: rgba(10, 18, 28, 0.45);
}

.pm-item.is-unread {
  border-color: rgba(240, 193, 75, 0.4);
  background: rgba(240, 193, 75, 0.06);
}

.pm-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  color: inherit;
  text-decoration: none;
}

.pm-link:hover {
  background: rgba(62, 199, 255, 0.08);
  color: inherit;
}

.pm-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.pm-meta time {
  color: var(--muted);
  white-space: nowrap;
}

.pm-subject {
  font-family: var(--display);
  font-weight: 700;
}

.pm-preview {
  font-size: 0.88rem;
}

.pm-compose {
  max-width: 36rem;
}

.pm-body-box {
  margin: 0.85rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(62, 199, 255, 0.18);
  background: rgba(10, 18, 28, 0.5);
}

.pm-body-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.stats-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.stats-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.stats-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
}

.stats-bar-label span {
  color: var(--muted);
}

.stats-bar-track {
  height: 6px;
  background: rgba(42, 59, 85, 0.85);
  overflow: hidden;
}

.stats-bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

@media (max-width: 860px) {
  .stats-block-grid {
    grid-template-columns: 1fr;
  }
}

.board-table tr.you {
  background: rgba(62, 199, 255, 0.08);
}

.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.hud-meter .hud-label {
  margin-bottom: 0.35rem;
}

.game-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.65rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.game-body-play {
  grid-template-columns: 178px minmax(0, 1fr) 230px;
}

.game-body-guest {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
  margin: 0 auto;
}

.game-body-landing {
  max-width: 880px;
}

.nav-block {
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 0.55rem;
}

.nav-head {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.65rem;
  border: 0;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #041018;
  background: linear-gradient(90deg, var(--accent), #7ad8ff);
  cursor: pointer;
  text-align: left;
}

.nav-head:hover {
  filter: brightness(1.05);
}

.nav-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #041018;
  border-bottom: 2px solid #041018;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
  margin-top: -0.15rem;
}

.nav-block.is-collapsed .nav-chevron {
  transform: rotate(-45deg);
  margin-top: 0.1rem;
}

.nav-block.is-collapsed .menu,
.nav-block.is-collapsed .info-panel {
  display: none;
}

.nav-block[data-nav-active="1"] .nav-head {
  background: linear-gradient(90deg, #f0c14b, #ffe08a);
}

.security-blocks {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.security-block {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.55);
}

.security-block h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
}

.totp-setup {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.totp-qr {
  border: 4px solid #fff;
  border-radius: 6px;
  background: #fff;
}

.totp-secret {
  margin: 0;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--muted);
}

.passkey-login {
  margin: 1.1rem 0 0.35rem;
  display: grid;
  gap: 0.55rem;
}

.passkey-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.passkey-status {
  margin: 0;
}

.passkey-status-error {
  color: var(--bad, #e07a7a);
}

.passkey-list {
  list-style: none;
  margin: 0.55rem 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.passkey-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.passkey-list li > div {
  display: grid;
  gap: 0.15rem;
  min-width: 10rem;
}

.passkey-delete-form {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.passkey-delete-form input[type="password"] {
  width: 7.5rem;
  padding: 0.3rem 0.4rem;
}

.passkey-register {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
  max-width: 22rem;
}

.passkey-nickname-label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.login-log-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.login-log-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.login-log-list li.ok strong { color: var(--ok); }
.login-log-list li.fail strong { color: var(--bad); }

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 0.75rem;
}

.panel-head,
.hero-head {
  padding: 0.45rem 0.7rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #041018;
  background: linear-gradient(90deg, var(--accent), #7ad8ff);
  border-bottom: 1px solid var(--line);
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0;
}

.menu li a,
.menu li.disabled,
.menu li span {
  display: block;
  padding: 0.38rem 0.7rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 2px solid transparent;
}

.menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(240, 193, 75, 0.2);
  border: 1px solid rgba(240, 193, 75, 0.55);
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.menu li a:hover,
.menu li a.active {
  color: var(--text);
  background: rgba(62, 199, 255, 0.08);
  border-left-color: var(--accent);
  text-decoration: none;
}

.menu li.disabled {
  opacity: 0.38;
  cursor: default;
}

.menu-logout {
  display: block;
  width: 100%;
}

.menu-logout button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0.38rem 0.7rem;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.menu-logout button:hover {
  color: var(--text);
  background: rgba(62, 199, 255, 0.08);
  border-left-color: var(--accent);
}

.info-block .info-panel {
  padding: 0.7rem 0.75rem 0.85rem;
}

.info-name {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.info-table td {
  padding: 0.22rem 0;
  vertical-align: top;
}

.info-table td:first-child {
  color: var(--muted);
  width: 5.2rem;
}

.info-table .money {
  color: var(--gold);
  font-weight: 700;
}

.bars {
  display: grid;
  gap: 0.55rem;
}

.bar-row .bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage .panel,
.stage .hero {
  margin-bottom: 0.75rem;
}

.stage-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.mission-label {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede.tight {
  margin: 0;
  max-width: 16rem;
  text-align: right;
  font-size: 0.88rem;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.stat-tiles.tiles-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-tile {
  border: 1px solid var(--line);
  background: #0d1624;
  padding: 0.7rem 0.75rem;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-tile strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
}

.landing-hero {
  text-align: center;
  padding: 2.2rem 1.25rem 2.4rem;
}

.landing-hero h1 {
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.landing-hero .lede {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}

.landing-hero .actions {
  justify-content: center;
}

.center-lede {
  text-align: center;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.feature-card {
  border: 1px solid var(--line);
  background: #0d1624;
  padding: 1.1rem 1rem;
  min-height: 7.5rem;
}

.feature-card h2 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-body h2 {
  margin-bottom: 0.35rem;
}

.cta-body .lede {
  margin-bottom: 0;
}

.empty-state {
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.empty-title {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chip {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  margin-right: 0.35rem;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
}

.chip-ok { color: var(--ok); border-color: rgba(61, 220, 138, 0.45); background: rgba(61, 220, 138, 0.1); }
.chip-bad { color: var(--bad); border-color: rgba(255, 93, 108, 0.45); background: rgba(255, 93, 108, 0.1); }
.chip-warn { color: var(--warn); border-color: rgba(255, 176, 32, 0.45); background: rgba(255, 176, 32, 0.1); }

.log-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
  font-weight: 700;
}

.muted.mini {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
}

.panel-body,
.hero-body,
.info-panel,
.quick-actions {
  padding: 0.95rem;
}

h1, h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h1 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
h2 { font-size: 1.05rem; }

.lede, .muted, .guest-text {
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, #4fd0ff, var(--accent-dim));
  color: #041018;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(62, 199, 255, 0.2);
}

.btn:hover {
  filter: brightness(1.08);
  color: #041018;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(62, 199, 255, 0.06);
}

.btn-small {
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
  margin-bottom: 0.5rem;
}

.btn-block:last-child { margin-bottom: 0; }

.inline { display: inline; margin: 0; }

.form {
  display: grid;
  gap: 0.8rem;
  max-width: 360px;
}

.form label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
  border-radius: 0;
  box-sizing: border-box;
}

.form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) calc(50% - 0.15rem),
    calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
  cursor: pointer;
}

.form select option {
  background: #0a111c;
  color: var(--text);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 199, 255, 0.15);
}

.form input:disabled,
.form select:disabled,
.form textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.notice-stack {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.notice-stack:empty {
  display: none;
  margin: 0;
}

.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  background: var(--panel);
  font-weight: 600;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.flash-fade {
  opacity: 0;
  transform: translateY(-4px);
}

.flash-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.flash-label {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.flash p { margin: 0; line-height: 1.45; white-space: pre-line; }
.flash-ok { border-color: rgba(61, 220, 138, 0.45); color: var(--ok); background: rgba(61, 220, 138, 0.08); }
.flash-bad { border-color: rgba(255, 93, 108, 0.45); color: var(--bad); background: rgba(255, 93, 108, 0.08); }
.flash-info { border-color: rgba(62, 199, 255, 0.45); color: #bfefff; background: rgba(62, 199, 255, 0.08); }

.flash-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 0.15rem;
}

.flash-close:hover {
  opacity: 1;
}

.alert-stack {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

.status-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(42, 59, 85, 0.95);
  background: rgba(8, 14, 24, 0.45);
}

.status-alert strong {
  display: block;
  font-family: var(--display);
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.status-alert p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-alert.tone-ok { border-color: rgba(61, 220, 138, 0.35); }
.status-alert.tone-warn { border-color: rgba(240, 193, 75, 0.4); }
.status-alert.tone-bad { border-color: rgba(255, 93, 108, 0.4); }
.status-alert.tone-info { border-color: rgba(62, 199, 255, 0.35); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.quick-link {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(42, 59, 85, 0.95);
  background: rgba(8, 14, 24, 0.4);
  color: var(--text);
  text-decoration: none;
}

.quick-link:hover {
  border-color: rgba(62, 199, 255, 0.45);
  color: var(--accent);
}

.quick-link strong {
  font-family: var(--display);
  font-size: 0.88rem;
}

.quick-link span {
  color: var(--muted);
  font-size: 0.78rem;
}

.stat-tiles.tiles-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.feed-meta {
  margin: 0 0 0.65rem;
}

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

.chat-body {
  display: grid;
  gap: 0.75rem;
}

.chat-window {
  height: min(420px, 55vh);
  overflow-y: auto;
  border: 1px solid rgba(42, 59, 85, 0.95);
  background: rgba(8, 14, 24, 0.55);
  padding: 0.7rem 0.8rem;
}

.chat-empty {
  margin: 0.5rem 0;
}

.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.chat-line {
  display: grid;
  gap: 0.2rem;
  padding: 0.35rem 0.45rem;
  border-left: 2px solid transparent;
}

.chat-line.you {
  border-left-color: var(--accent);
  background: rgba(62, 199, 255, 0.06);
}

.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  font-size: 0.82rem;
}

.chat-meta a {
  color: var(--accent);
  font-weight: 700;
}

.chat-meta time {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-text {
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.chat-form input {
  width: 100%;
  min-width: 0;
}

.chat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chat-tab {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(42, 59, 85, 0.95);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-tab:hover,
.chat-tab.active {
  border-color: rgba(62, 199, 255, 0.45);
  color: var(--accent);
}

.chat-line.system {
  border-left-color: rgba(240, 193, 75, 0.65);
  background: rgba(240, 193, 75, 0.06);
}

.chat-system-name {
  color: #f0c14b;
  font-weight: 700;
}

.gang-create {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 0.75rem;
  align-items: end;
}

.gang-create .field-wide {
  grid-column: 1 / -1;
}

.gang-create .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.gang-bank {
  margin: 0.5rem 0 1.1rem;
}

.section-sub {
  margin: 1rem 0 0.55rem;
  font-family: var(--display);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .gang-create {
    grid-template-columns: 1fr;
  }
}

.casino-games,
.casino-games-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.casino-games-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.casino-games-5 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .casino-games-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .casino-games-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .casino-games-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.casino-choices-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.casino-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(42, 59, 85, 0.95);
  background:
    linear-gradient(165deg, rgba(20, 32, 52, 0.9), rgba(8, 14, 24, 0.92));
  padding: 0.9rem 1rem 1rem;
}

a.casino-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

a.casino-card-link:hover {
  border-color: rgba(62, 199, 255, 0.5);
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

a.casino-card-link:hover h2 {
  color: var(--accent);
}

.casino-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.15rem;
}

.casino-card p {
  margin: 0 0 0.75rem;
}

.salon-visual {
  height: 4.2rem;
  margin: -0.15rem -0.25rem 0.7rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(62, 199, 255, 0.14), transparent 60%),
    rgba(5, 10, 18, 0.65);
  border: 1px solid rgba(62, 199, 255, 0.12);
  overflow: hidden;
}

.salon-slots .salon-visual {
  background:
    radial-gradient(circle at 50% 20%, rgba(240, 193, 75, 0.16), transparent 50%),
    rgba(5, 10, 18, 0.7);
}
.salon-roulette .salon-visual {
  background:
    radial-gradient(circle at 50% 50%, rgba(214, 69, 80, 0.18), transparent 55%),
    rgba(5, 10, 18, 0.7);
}
.salon-blackjack .salon-visual {
  background:
    radial-gradient(circle at 50% 40%, rgba(61, 206, 122, 0.18), transparent 55%),
    rgba(5, 10, 18, 0.7);
}
.salon-duel .salon-visual {
  background:
    radial-gradient(circle at 50% 40%, rgba(62, 199, 255, 0.16), transparent 55%),
    rgba(5, 10, 18, 0.7);
}
.salon-racing .salon-visual {
  background:
    radial-gradient(circle at 50% 40%, rgba(97, 206, 122, 0.18), transparent 55%),
    rgba(5, 10, 18, 0.7);
}

.salon-reel {
  width: 2.1rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #0c121c;
  border: 1px solid rgba(62, 199, 255, 0.3);
  font-size: 1.1rem;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
}

.salon-slots:hover .salon-reel {
  animation: salon-spin 0.45s ease;
}
@keyframes salon-spin {
  0% { transform: translateY(-6px); filter: blur(1px); }
  100% { transform: none; filter: none; }
}

.salon-wheel {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: conic-gradient(#b1323c 0 40deg, #121820 40deg 80deg, #b1323c 80deg 120deg, #121820 120deg 160deg, #1f6b3a 160deg 170deg, #b1323c 170deg 210deg, #121820 210deg 250deg, #b1323c 250deg 290deg, #121820 290deg 330deg, #b1323c 330deg 360deg);
  box-shadow: 0 0 0 3px #2a3b55, 0 0 16px rgba(240, 193, 75, 0.25);
}
.salon-roulette:hover .salon-wheel {
  animation: salon-wheel 0.8s ease;
}
@keyframes salon-wheel {
  to { transform: rotate(220deg); }
}

.salon-card {
  width: 2.2rem;
  height: 3rem;
  border-radius: 4px;
  background: linear-gradient(160deg, #f7f9fc, #dfe6f0);
  color: #121820;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.salon-card.c1 { color: #121820; transform: rotate(-8deg); }
.salon-card.c2 { color: #b1323c; transform: rotate(10deg) translateY(2px); }
.salon-blackjack:hover .salon-card.c1 { transform: rotate(-14deg) translateY(-3px); }
.salon-blackjack:hover .salon-card.c2 { transform: rotate(16deg) translateY(-1px); }

.salon-die {
  font-size: 1.8rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.salon-duel:hover .salon-die {
  animation: salon-die 0.4s ease;
}
@keyframes salon-die {
  50% { transform: translateY(-5px) rotate(12deg); }
}

.salon-horse {
  font-size: 2rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.salon-racing:hover .salon-horse {
  animation: salon-horse 0.55s ease;
}
@keyframes salon-horse {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(10px) translateY(-3px); }
  70% { transform: translateX(4px); }
}

.casino-form,
.viz-form {
  display: grid;
  gap: 0.65rem;
  max-width: 28rem;
  margin-top: 1rem;
}

.viz-controls {
  width: min(100%, 420px);
  max-width: none;
  margin-top: 0.35rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(62, 199, 255, 0.22);
  background: rgba(6, 10, 18, 0.72);
}

.viz-form:has(.roulette-felt) {
  max-width: 420px;
  width: 100%;
}

.casino-form label,
.viz-form label,
.bet-label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.bet-row {
  display: grid;
  gap: 0.45rem;
}

.bet-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bet-quick button {
  appearance: none;
  border: 1px solid rgba(62, 199, 255, 0.3);
  background: rgba(62, 199, 255, 0.08);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.bet-quick button:hover:not(:disabled) {
  border-color: rgba(240, 193, 75, 0.5);
  color: #fff6d6;
}

.bet-quick button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.casino-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.stat-tiles.tiles-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-tiles.tiles-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.jackpot-value,
.jackpot-tile .hud-money {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(240, 193, 75, 0.25);
}

.jackpot-lobby-note {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

/* Casino lobby composition */
.casino-lobby-panel .lobby-body {
  padding: 0;
}

.lobby-stage {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.15rem 1.4rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240, 193, 75, 0.16), transparent 45%),
    radial-gradient(ellipse at 90% 80%, rgba(62, 199, 255, 0.1), transparent 40%),
    linear-gradient(180deg, #121c2e 0%, #0a101a 55%, #070b12 100%);
  isolation: isolate;
}

.lobby-amb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.lobby-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.42;
  filter: saturate(0.85) contrast(1.05);
}

.lobby-photo-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 18, 0.55) 0%, rgba(7, 11, 18, 0.72) 45%, rgba(7, 11, 18, 0.92) 100%),
    linear-gradient(90deg, rgba(7, 11, 18, 0.45), transparent 55%);
}
.lobby-amb i {
  position: absolute;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.35;
  animation: amb-drift 9s ease-in-out infinite alternate;
}
.lobby-amb i:nth-child(1) {
  width: 200px; height: 160px; left: -40px; top: -20px;
  background: rgba(240, 193, 75, 0.35);
}
.lobby-amb i:nth-child(2) {
  width: 180px; height: 180px; right: -30px; top: 30%;
  background: rgba(62, 199, 255, 0.28);
  animation-delay: -3s;
}
.lobby-amb i:nth-child(3) {
  width: 140px; height: 140px; left: 35%; bottom: -40px;
  background: rgba(61, 206, 122, 0.18);
  animation-delay: -5s;
}

.lobby-stage > :not(.lobby-amb) {
  position: relative;
  z-index: 1;
}

.panel-with-hero > .panel-body {
  padding-top: 0.85rem;
}

.lobby-hero {
  text-align: center;
  padding: 0.35rem 0.5rem 1.1rem;
  border-bottom: 1px solid rgba(240, 193, 75, 0.18);
  margin-bottom: 1rem;
}

.lobby-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 246, 214, 0.65);
}

.lobby-brand {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff6d6;
  text-shadow: 0 0 28px rgba(240, 193, 75, 0.25);
}

.lobby-jackpot-label {
  margin: 0;
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lobby-jackpot {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240, 193, 75, 0.4);
  animation: lobby-jackpot-glow 2.8s ease-in-out infinite alternate;
}

.lobby-jackpot span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 246, 214, 0.7);
  font-weight: 600;
  margin-top: 0.15rem;
}

@keyframes lobby-jackpot-glow {
  from { text-shadow: 0 0 16px rgba(240, 193, 75, 0.25); }
  to { text-shadow: 0 0 32px rgba(240, 193, 75, 0.55); }
}

.lobby-jackpot-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.lobby-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.lobby-hud > div {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(62, 199, 255, 0.18);
  background: rgba(6, 10, 18, 0.55);
  display: grid;
  gap: 0.15rem;
}

.lobby-hud span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--display);
}

.lobby-hud strong {
  font-size: 1rem;
}

.lobby-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr);
  gap: 1.1rem;
  align-items: start;
}

.lobby-section-title {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 246, 214, 0.8);
}

.lobby-section-title-soft {
  margin-top: 1.1rem;
  color: var(--muted);
}

.lobby-exchange {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.lobby-x-form {
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(62, 199, 255, 0.18);
  background: rgba(6, 10, 18, 0.55);
}

.lobby-x-form h2 {
  margin: 0 0 0.15rem;
  font-family: var(--display);
  font-size: 0.9rem;
}

.lobby-x-form p {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.lobby-x-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.lobby-x-row input {
  width: 100%;
}

.lobby-salons {
  margin-top: 0;
}

.lobby-feed {
  padding: 0.75rem;
  border: 1px solid rgba(240, 193, 75, 0.2);
  background: rgba(6, 10, 18, 0.6);
  min-height: 12rem;
}

.lobby-feed-empty {
  margin: 0;
  font-size: 0.88rem;
}

.lobby-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  max-height: 22rem;
  overflow: auto;
}

.lobby-feed-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lobby-feed-list li strong {
  display: block;
  font-size: 0.88rem;
}

.lobby-feed-list .muted {
  font-size: 0.72rem;
  text-transform: capitalize;
}

.lobby-feed-meta {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.lobby-feed-mine li strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 900px) {
  .lobby-main {
    grid-template-columns: 1fr;
  }
  .lobby-feed {
    order: 3;
  }
}

@media (max-width: 720px) {
  .lobby-exchange,
  .lobby-hud {
    grid-template-columns: 1fr;
  }
  .lobby-jackpot {
    font-size: 2.2rem;
  }
}

.jackpot-banner {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(240, 193, 75, 0.4);
  background:
    linear-gradient(90deg, rgba(240, 193, 75, 0.12), rgba(240, 193, 75, 0.04));
  font-family: var(--display);
}

.jackpot-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 246, 214, 0.75);
}

.jackpot-banner strong {
  font-size: 1.15rem;
  color: #fff6d6;
  text-align: center;
}

.jackpot-hint {
  font-size: 0.68rem;
  color: var(--muted);
  text-align: right;
}

.jackpot-banner.pulse {
  animation: jackpot-pulse 0.45s ease 2;
}
@keyframes jackpot-pulse {
  50% {
    box-shadow: 0 0 20px rgba(240, 193, 75, 0.45);
    transform: scale(1.02);
  }
}

.viz-stage {
  position: relative;
  margin-top: 1rem;
  min-height: 260px;
  border: 1px solid rgba(62, 199, 255, 0.22);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(62, 199, 255, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(10, 18, 30, 0.95), rgba(6, 10, 18, 0.98));
  padding: 1.5rem 1rem 1.15rem;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  overflow: hidden;
  isolation: isolate;
}

.viz-stage.shake {
  animation: stage-shake 0.38s ease;
}
@keyframes stage-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.viz-stage--slots {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240, 193, 75, 0.14), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(62, 199, 255, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.98), rgba(5, 8, 14, 0.99));
}
.viz-stage--roulette {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(214, 69, 80, 0.12), transparent 50%),
    radial-gradient(ellipse at 20% 90%, rgba(61, 206, 122, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.98), rgba(5, 8, 14, 0.99));
}
.viz-stage--blackjack {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(61, 206, 122, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(8, 22, 16, 0.95), rgba(5, 10, 12, 0.99));
}
.viz-stage--duel {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(62, 199, 255, 0.16), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(240, 193, 75, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(5, 8, 14, 0.99));
}
.viz-stage--racing {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(97, 206, 122, 0.14), transparent 50%),
    radial-gradient(ellipse at 20% 90%, rgba(240, 193, 75, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(10, 18, 14, 0.98), rgba(5, 8, 14, 0.99));
}

.viz-ambiance {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.viz-ambiance .amb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.35;
  animation: amb-drift 8s ease-in-out infinite alternate;
}
.amb-a {
  width: 160px; height: 160px; left: -40px; top: -30px;
  background: rgba(62, 199, 255, 0.35);
}
.amb-b {
  width: 180px; height: 140px; right: -50px; bottom: 10%;
  background: rgba(240, 193, 75, 0.22);
  animation-delay: -3s;
}
.amb-c {
  width: 120px; height: 120px; left: 40%; bottom: -40px;
  background: rgba(61, 206, 122, 0.18);
  animation-delay: -5s;
}
@keyframes amb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(18px, 12px) scale(1.08); }
}

.viz-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.viz-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(240, 193, 75, 0.8);
  animation: spark-fly 0.85s ease-out forwards;
}
@keyframes spark-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

.viz-stage > :not(.viz-ambiance):not(.viz-fx) {
  position: relative;
  z-index: 1;
}

.viz-result {
  margin: 0;
  min-height: 1.4em;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.viz-result.win {
  color: var(--ok);
  text-shadow: 0 0 16px rgba(61, 220, 138, 0.35);
  animation: result-pop 0.45s ease;
}
.viz-result.lose { color: var(--bad); }
.viz-result.push {
  color: #f0c14b;
  animation: result-pop 0.4s ease;
}
@keyframes result-pop {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}

.viz-float {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}
.viz-float.show {
  animation: float-up 1.1s ease forwards;
}
.viz-float.win { color: #7dffa8; }
.viz-float.lose { color: #ff8a95; }
.viz-float.push { color: #ffe08a; }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(0.95); }
}

/* Slots cabinet */
.slot-machine-form {
  width: min(100%, 380px);
  margin: 0 auto;
}

.slot-cabinet {
  position: relative;
  width: 100%;
  padding: 0.7rem 0.85rem 0.55rem;
  border-radius: 22px 22px 14px 14px;
  border: 4px solid #6a7f9e;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 18%),
    linear-gradient(145deg, #3a4f6e 0%, #1a273c 28%, #0d1524 70%, #080e18 100%);
  box-shadow:
    0 0 0 3px rgba(240, 193, 75, 0.28),
    0 0 0 6px rgba(20, 28, 42, 0.9),
    0 22px 48px rgba(0, 0, 0, 0.65),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 24px rgba(0, 0, 0, 0.35);
}

.slot-hood {
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.5rem 0.55rem;
  border-radius: 14px 14px 8px 8px;
  background:
    linear-gradient(180deg, #2a3d5a 0%, #152235 100%);
  border: 1px solid rgba(240, 193, 75, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 4px 12px rgba(0,0,0,0.35);
}

.slot-top-gems {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}
.slot-top-gems i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6d6, #f0c14b 55%, #8a6a1a);
  box-shadow: 0 0 8px rgba(240, 193, 75, 0.55);
}

.slot-cabinet.is-spinning {
  box-shadow:
    0 0 0 3px rgba(62, 199, 255, 0.55),
    0 0 0 6px rgba(20, 28, 42, 0.9),
    0 0 36px rgba(62, 199, 255, 0.28),
    0 22px 48px rgba(0, 0, 0, 0.65),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
.slot-cabinet.is-spinning .slot-spin-ring {
  animation: spin-ring 0.7s linear infinite;
}

.slot-cabinet.is-win {
  animation: slot-win-pulse 0.35s ease-in-out 3;
}
.slot-cabinet.is-win .slot-top-gems i {
  animation: gem-flash 0.35s ease infinite alternate;
}
@keyframes gem-flash {
  to { transform: scale(1.25); box-shadow: 0 0 14px rgba(240, 193, 75, 0.9); }
}

@keyframes slot-win-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(240, 193, 75, 0.35),
      0 0 0 6px rgba(20, 28, 42, 0.9),
      0 22px 48px rgba(0, 0, 0, 0.65);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(240, 193, 75, 0.9),
      0 0 0 6px rgba(20, 28, 42, 0.9),
      0 0 40px rgba(240, 193, 75, 0.45),
      0 22px 48px rgba(0, 0, 0, 0.65);
  }
}

.slot-marquee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent, rgba(240, 193, 75, 0.14), transparent),
    linear-gradient(90deg, #061018, #142848, #061018);
  border: 1px solid rgba(240, 193, 75, 0.5);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0c14b;
  animation: marquee-glow 2.8s ease-in-out infinite alternate;
}
@keyframes marquee-glow {
  from { box-shadow: inset 0 0 0 rgba(240, 193, 75, 0); }
  to { box-shadow: inset 0 0 18px rgba(240, 193, 75, 0.14); }
}

.slot-marquee strong {
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: #fff6d6;
  text-shadow: 0 0 12px rgba(240, 193, 75, 0.55);
}

.slot-body {
  position: relative;
  padding: 0.15rem 0.2rem;
}

.slot-glass {
  position: relative;
  padding: 0.85rem 0.7rem;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 30%),
    radial-gradient(ellipse at 50% 120%, rgba(62, 199, 255, 0.1), transparent 50%),
    #03070e;
  border: 3px solid #8a9bb8;
  box-shadow:
    inset 0 0 32px rgba(0, 0, 0, 0.85),
    0 0 0 2px #1a2436,
    0 8px 16px rgba(0,0,0,0.4);
  overflow: hidden;
}

.slot-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  top: -30%;
  background: linear-gradient(180deg, transparent, rgba(62, 199, 255, 0.08), transparent);
  z-index: 2;
  pointer-events: none;
  animation: scan-sweep 2.8s linear infinite;
}
.slot-cabinet.is-spinning .slot-scan {
  animation-duration: 0.7s;
  background: linear-gradient(180deg, transparent, rgba(62, 199, 255, 0.16), transparent);
}
@keyframes scan-sweep {
  to { top: 110%; }
}

.slot-payline {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(255, 93, 108, 0.9), transparent);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 93, 108, 0.55);
}

.slot-winburst {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 193, 75, 0.35), transparent 55%);
}

.slot-winburst.show {
  animation: burst-flash 1.2s ease;
}

@keyframes burst-flash {
  0%, 100% { opacity: 0; }
  20%, 50% { opacity: 1; }
}

.slot-reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.slot-reel {
  height: 88px;
  border-radius: 8px;
  border: 1px solid rgba(62, 199, 255, 0.32);
  background:
    linear-gradient(180deg, #141c2a, #0a1018);
  overflow: hidden;
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.55),
    inset 0 -8px 12px rgba(0, 0, 0, 0.35);
  position: relative;
}

.slot-reel::before,
.slot-reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 2;
  pointer-events: none;
}
.slot-reel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.7), transparent);
}
.slot-reel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
}

.slot-strip {
  will-change: transform;
}

.slot-cell {
  height: 88px;
  display: grid;
  place-items: center;
  font-size: 2.55rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
  user-select: none;
}

.slot-cell.jackpot {
  filter:
    drop-shadow(0 0 10px rgba(240, 193, 75, 0.65))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.slot-cabinet.is-win .slot-cell.jackpot {
  animation: jackpot-bounce 0.35s ease infinite alternate;
}
@keyframes jackpot-bounce {
  to { transform: scale(1.12); }
}

.slot-reel.spinning .slot-strip {
  filter: blur(0.6px);
}

.slot-reel.stopped {
  animation: reel-thud 0.2s ease;
}

@keyframes reel-thud {
  0% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

.slot-belly {
  margin-top: 0.65rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #1c2a40 0%, #101a2a 55%, #0a121e 100%);
  border: 1px solid rgba(240, 193, 75, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -8px 18px rgba(0,0,0,0.35);
}

.slot-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
  margin: 0.15rem 0 0.55rem;
}

.slot-bet-panel {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
}

.slot-bet-label {
  display: grid;
  gap: 0.25rem;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9d4e6;
}

.slot-bet-label input {
  width: 100%;
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
  border: 2px solid #3a4f6e;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #061018, #0c1624);
  color: #fff6d6;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.55rem;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.55),
    0 0 0 1px rgba(240, 193, 75, 0.15);
}

.slot-bet-label input:focus {
  outline: none;
  border-color: #f0c14b;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.55),
    0 0 0 2px rgba(240, 193, 75, 0.35);
}

.slot-bet-label input::-webkit-outer-spin-button,
.slot-bet-label input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.slot-bet-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.slot-bet-quick button {
  appearance: none;
  flex: 1 1 auto;
  min-width: 2.6rem;
  border: 1px solid rgba(62, 199, 255, 0.35);
  background: linear-gradient(180deg, rgba(62, 199, 255, 0.16), rgba(62, 199, 255, 0.05));
  color: var(--text);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.32rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.slot-bet-quick button:hover:not(:disabled) {
  border-color: rgba(240, 193, 75, 0.55);
  color: #fff6d6;
}

.slot-bet-quick button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slot-spin-btn {
  appearance: none;
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #f0c14b;
  background:
    radial-gradient(circle at 35% 30%, #ff6b78, #d62839 55%, #7a1020 100%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 3px #1a2436,
    0 8px 0 #5a0e18,
    0 12px 18px rgba(0,0,0,0.45),
    inset 0 2px 0 rgba(255,255,255,0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  flex-shrink: 0;
}

.slot-spin-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.slot-spin-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow:
    0 0 0 3px #1a2436,
    0 4px 0 #5a0e18,
    0 6px 10px rgba(0,0,0,0.4),
    inset 0 2px 0 rgba(255,255,255,0.2);
}

.slot-spin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.slot-spin-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.35);
  pointer-events: none;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.slot-spin-label {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

.chip-stack {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.2rem;
  height: 28px;
  margin: 0.35rem 0 0.15rem;
}

.chip-stack i {
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: #3a4d6d;
  opacity: 0.35;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.chip-stack[data-level="1"] i:nth-child(-n+1),
.chip-stack[data-level="2"] i:nth-child(-n+2),
.chip-stack[data-level="3"] i:nth-child(-n+3),
.chip-stack[data-level="4"] i:nth-child(-n+4),
.chip-stack[data-level="5"] i:nth-child(-n+5) {
  opacity: 1;
  background: linear-gradient(90deg, #3ec7ff, #2a8fb8);
}

.chip-stack.pulse-up { animation: stack-up 0.35s ease; }
.chip-stack.pulse-down { animation: stack-down 0.35s ease; }
@keyframes stack-up {
  50% { transform: translateY(-4px) scale(1.05); }
}
@keyframes stack-down {
  50% { transform: translateY(3px) scale(0.96); }
}

.slot-lights {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  margin: 0 0 0.55rem;
}

.slot-lights i {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #243249;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.slot-cabinet.is-spinning .slot-lights i,
.slot-cabinet.is-win .slot-lights i {
  animation: light-chase 0.7s linear infinite;
}

.slot-cabinet.is-spinning .slot-lights i:nth-child(2),
.slot-cabinet.is-win .slot-lights i:nth-child(2) { animation-delay: 0.08s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(3),
.slot-cabinet.is-win .slot-lights i:nth-child(3) { animation-delay: 0.16s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(4),
.slot-cabinet.is-win .slot-lights i:nth-child(4) { animation-delay: 0.24s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(5),
.slot-cabinet.is-win .slot-lights i:nth-child(5) { animation-delay: 0.32s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(6),
.slot-cabinet.is-win .slot-lights i:nth-child(6) { animation-delay: 0.4s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(7),
.slot-cabinet.is-win .slot-lights i:nth-child(7) { animation-delay: 0.48s; }
.slot-cabinet.is-spinning .slot-lights i:nth-child(8),
.slot-cabinet.is-win .slot-lights i:nth-child(8) { animation-delay: 0.56s; }

@keyframes light-chase {
  0%, 100% { background: #243249; }
  40% { background: #3ec7ff; box-shadow: 0 0 8px rgba(62, 199, 255, 0.7); }
  70% { background: #f0c14b; box-shadow: 0 0 8px rgba(240, 193, 75, 0.55); }
}

.slot-paytable {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  justify-content: center;
  font-size: 0.68rem;
  color: #9aabbf;
  font-family: var(--display);
  letter-spacing: 0.02em;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.slot-feet {
  display: flex;
  justify-content: space-between;
  margin: 0.45rem 0.4rem 0;
  pointer-events: none;
}
.slot-feet i {
  width: 42px;
  height: 10px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #4a5f7c, #1a2436);
  box-shadow: 0 3px 0 #0a1018;
}

@media (max-width: 420px) {
  .slot-controls {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .slot-spin-btn {
    width: 100%;
    height: 52px;
    border-radius: 10px;
  }
  .slot-spin-ring {
    display: none;
  }
}

/* Roulette table */
.roulette-table {
  width: min(100%, 380px);
  padding: 0.9rem 1rem 1.1rem;
  border-radius: 16px;
  border: 3px solid #3a4f6e;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(62, 199, 255, 0.1), transparent 55%),
    linear-gradient(145deg, rgba(255,255,255,0.04), transparent 40%),
    linear-gradient(180deg, #1a2a42 0%, #0d1522 55%, #0a101a 100%);
  box-shadow:
    0 0 0 2px rgba(240, 193, 75, 0.15),
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.roulette-table.is-spinning {
  box-shadow:
    0 0 0 2px rgba(62, 199, 255, 0.45),
    0 0 34px rgba(62, 199, 255, 0.2),
    0 18px 40px rgba(0, 0, 0, 0.55);
}
.roulette-table.is-spinning .roulette-glow {
  opacity: 1;
  animation: wheel-aura 0.8s ease-in-out infinite alternate;
}

.roulette-table.landed.color-red {
  box-shadow: 0 0 0 2px rgba(214, 69, 80, 0.55), 0 0 24px rgba(214, 69, 80, 0.25);
}
.roulette-table.landed.color-black {
  box-shadow: 0 0 0 2px rgba(180, 190, 210, 0.4), 0 0 24px rgba(180, 190, 210, 0.15);
}
.roulette-table.landed.color-green {
  box-shadow: 0 0 0 2px rgba(61, 206, 122, 0.5), 0 0 24px rgba(61, 206, 122, 0.22);
}

.roulette-marquee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #0a1528, #14233a, #0a1528);
  border: 1px solid rgba(240, 193, 75, 0.35);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c14b;
}

.roulette-marquee strong {
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  color: #fff6d6;
  text-shadow: 0 0 10px rgba(240, 193, 75, 0.4);
}

.roulette-history {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  min-height: 1.6rem;
  margin-bottom: 0.65rem;
}

.hist {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.25rem;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}
.hist-red { background: #b1323c; }
.hist-black { background: #2a3344; border: 1px solid #6a768c; }
.hist-green { background: #1f6b3a; }

.roulette-stage {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 0.75rem;
}

.roulette-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 193, 75, 0.18), transparent 65%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
@keyframes wheel-aura {
  from { opacity: 0.4; transform: scale(0.98); }
  to { opacity: 0.85; transform: scale(1.04); }
}

.roulette-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  margin-left: -10px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #f0c14b;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.roulette-rim {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0,0,0,0.35) 59%, rgba(0,0,0,0.35) 68%, transparent 69%),
    conic-gradient(from 0deg, #c9a227, #3a4d6d, #c9a227, #1a2436, #c9a227, #3a4d6d, #c9a227);
  box-shadow:
    inset 0 0 0 2px rgba(240, 193, 75, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(240, 193, 75, 0.08);
}

.roulette-ball-track {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
}

.roulette-ball {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #c5cddc 70%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
}

.roulette-ball-track.spinning .roulette-ball {
  box-shadow: 0 0 10px rgba(62, 199, 255, 0.7);
}

.roulette-ball-track.dropped {
  transition: transform 0.35s ease !important;
}

.roulette-svg .pocket.winner {
  filter: brightness(1.35) saturate(1.2);
  stroke: #f0c14b !important;
  stroke-width: 1.8 !important;
}

.roulette-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  will-change: transform;
}

.roulette-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.roulette-hub {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #243552, #0d1522 70%);
  border: 2px solid rgba(62, 199, 255, 0.45);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.1rem;
  z-index: 3;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.roulette-hub-num {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.roulette-hub-color {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.roulette-table.color-red .roulette-hub,
.roulette-result-plaque.color-red {
  border-color: rgba(214, 69, 80, 0.7);
}
.roulette-table.color-black .roulette-hub {
  border-color: rgba(180, 190, 210, 0.55);
}
.roulette-table.color-green .roulette-hub,
.roulette-result-plaque.color-green {
  border-color: rgba(61, 206, 122, 0.7);
}

.roulette-result-plaque {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 0.65rem;
  max-width: 220px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(42, 59, 85, 0.95);
  background: rgba(8, 14, 24, 0.75);
  opacity: 0.7;
}

.roulette-result-plaque.show {
  opacity: 1;
}

.plaque-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: var(--display);
}

#plaque-number {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

#plaque-color {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.roulette-result-plaque.color-red #plaque-number,
.roulette-result-plaque.color-red #plaque-color { color: #ffb3bb; }
.roulette-result-plaque.color-black #plaque-number,
.roulette-result-plaque.color-black #plaque-color { color: #e8eef8; }
.roulette-result-plaque.color-green #plaque-number,
.roulette-result-plaque.color-green #plaque-color { color: #9dffc2; }

.roulette-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.7rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--display);
}

.leg::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.3rem;
  border-radius: 2px;
  vertical-align: -1px;
}
.leg-red::before { background: #b1323c; }
.leg-black::before { background: #8a96a8; }
.leg-green::before { background: #1f6b3a; }

.roulette-felt {
  position: relative;
  display: grid;
  gap: 0.45rem;
  width: min(100%, 420px);
  margin: 0.75rem auto 0;
  padding: 0.65rem;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120, 230, 170, 0.12), transparent 50%),
    linear-gradient(180deg, #14532d, #0d3b20);
  border: 1px solid rgba(61, 206, 122, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.felt-colors {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 0.35rem;
}

.felt-zone {
  appearance: none;
  min-height: 44px;
  border-radius: 6px;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--display);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.felt-zone span {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.felt-zone small {
  font-size: 0.68rem;
  opacity: 0.8;
}

.felt-zone:hover:not(:disabled) {
  transform: translateY(-1px);
}
.felt-zone:disabled,
.felt-num:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.felt-red { background: rgba(177, 50, 60, 0.85); }
.felt-black { background: rgba(18, 24, 32, 0.9); }
.felt-green { background: rgba(31, 107, 58, 0.95); }

.felt-zone.active,
.felt-num.active {
  box-shadow: 0 0 0 2px #f0c14b, 0 0 14px rgba(240, 193, 75, 0.35);
  z-index: 1;
}

.felt-hint {
  margin: 0;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.felt-numbers {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.25rem;
  align-items: stretch;
}

.felt-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(3, 1.7rem);
  grid-auto-flow: column;
  gap: 2px;
}

.felt-num {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.felt-num:hover:not(:disabled) {
  transform: scale(1.06);
  z-index: 1;
}

.felt-num-0 {
  grid-row: 1 / -1;
  background: #1f6b3a;
  font-size: 0.85rem;
  border-radius: 4px;
}

.felt-num.num-red { background: #b1323c; }
.felt-num.num-black { background: #121820; }

.felt-chip {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.55);
  background: radial-gradient(circle at 35% 30%, #fff, #d7deea 70%);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.2s ease, top 0.2s ease;
}

/* Blackjack */
.bj-table {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 1rem 0.9rem 1.15rem;
  border-radius: 18px;
  border: 3px solid #1f6b3a;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120, 230, 170, 0.14), transparent 45%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.015) 18px,
      rgba(255,255,255,0.015) 19px
    ),
    linear-gradient(180deg, #14532d, #0d3b20 55%, #082616);
  box-shadow:
    0 0 0 2px rgba(240, 193, 75, 0.15),
    0 18px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 50px rgba(0, 0, 0, 0.35);
}

.bj-rail {
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px dashed rgba(240, 193, 75, 0.22);
  pointer-events: none;
}

.bj-shoe {
  position: absolute;
  right: 0.75rem;
  top: 3.2rem;
  width: 2.4rem;
  height: 3.2rem;
  border-radius: 4px 6px 6px 4px;
  background: linear-gradient(135deg, #1a2740, #0c121c);
  border: 1px solid rgba(62, 199, 255, 0.3);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.35);
  opacity: 0.85;
}
.bj-shoe span {
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.55);
}

.bj-marquee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(240, 193, 75, 0.28);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255, 246, 214, 0.8);
  text-transform: uppercase;
}

.bj-marquee strong {
  font-size: 1rem;
  color: #fff6d6;
  letter-spacing: 0.18em;
  text-shadow: 0 0 12px rgba(240, 193, 75, 0.35);
}

.bj-hand {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem 0.35rem;
  border-radius: 8px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bj-hand.winner {
  background: rgba(61, 206, 122, 0.12);
  box-shadow: 0 0 0 1px rgba(61, 206, 122, 0.4);
}

.bj-hand.loser {
  opacity: 0.65;
}

.bj-hand.push {
  background: rgba(240, 193, 75, 0.1);
  box-shadow: 0 0 0 1px rgba(240, 193, 75, 0.35);
}

.bj-hand-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0.15rem;
}

.bj-hand-label {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.bj-hand-value {
  font-family: var(--display);
  font-size: 1.05rem;
  color: #fff6d6;
}

.bj-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 5.2rem;
  align-items: center;
}

.bj-card {
  width: 3.25rem;
  height: 4.6rem;
  border-radius: 7px;
  background: linear-gradient(160deg, #ffffff, #e8eef7);
  border: 1px solid rgba(18, 24, 32, 0.12);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.8);
  display: grid;
  place-content: center;
  gap: 0.05rem;
  font-family: var(--display);
  color: #121820;
  animation: bj-deal 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bj-card .rank {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.bj-card .suit {
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
}

.bj-card.red { color: #b1323c; }
.bj-card.black { color: #121820; }

.bj-card.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(62, 199, 255, 0.15), transparent 55%),
    repeating-linear-gradient(
      -45deg,
      #1a2740,
      #1a2740 6px,
      #243556 6px,
      #243556 12px
    );
  border-color: rgba(62, 199, 255, 0.3);
}

.bj-card.back .rank,
.bj-card.back .suit {
  display: none;
}

.bj-card.bj-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  box-shadow: none;
  animation: none;
}

@keyframes bj-deal {
  from {
    transform: translate(40px, -28px) rotate(18deg) scale(0.85);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.bj-felt-line {
  margin: 0.4rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 246, 214, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.15rem;
}

.bj-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.45rem;
  width: min(100%, 420px);
}

.bj-btn-hit,
.bj-btn-stand {
  border: 1px solid rgba(62, 199, 255, 0.4);
  background: linear-gradient(180deg, rgba(62, 199, 255, 0.18), rgba(62, 199, 255, 0.08));
  color: #d7f6ff;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.bj-btn-stand {
  border-color: rgba(240, 193, 75, 0.45);
  background: linear-gradient(180deg, rgba(240, 193, 75, 0.2), rgba(240, 193, 75, 0.08));
  color: #fff0c2;
}

.bj-btn-hit:hover:not(:disabled),
.bj-btn-stand:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.bj-btn-hit:disabled,
.bj-btn-stand:disabled,
#bj-deal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bj-table.is-playing {
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(62, 199, 255, 0.25);
}

/* Dice duel */
.duel-arena {
  position: relative;
  width: min(100%, 400px);
  padding: 1.15rem 0.85rem 1rem;
  border-radius: 16px;
  border: 3px solid #3a4f6e;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(62, 199, 255, 0.16), transparent 45%),
    linear-gradient(180deg, #152033, #0a101a);
  box-shadow:
    0 0 0 2px rgba(62, 199, 255, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.duel-spot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 220px;
  height: 120px;
  margin-left: -110px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 246, 214, 0.16), transparent 70%);
  pointer-events: none;
}

.duel-floor {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0.55rem;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.45), transparent 70%);
  pointer-events: none;
}

.duel-countdown {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff6d6;
  text-shadow: 0 0 20px rgba(240, 193, 75, 0.55);
  background: rgba(5, 10, 18, 0.55);
  border-radius: 12px;
  opacity: 0;
}

.duel-countdown.show {
  opacity: 1;
  animation: count-pop 0.4s ease;
}

.duel-countdown.go {
  color: var(--accent);
  font-size: 2.4rem;
}

@keyframes count-pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.duel-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: center;
}

.duel-side {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.duel-side.winner {
  border-color: rgba(61, 206, 122, 0.55);
  background: rgba(61, 206, 122, 0.1);
  transform: scale(1.04);
}

.duel-side.loser {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.duel-side.push {
  border-color: rgba(240, 193, 75, 0.45);
  background: rgba(240, 193, 75, 0.08);
}

.duel-label {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.duel-score {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  min-height: 1.2em;
}

.duel-vs {
  font-family: var(--display);
  font-weight: 800;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.duel-vs.pulse {
  animation: vs-pulse 0.35s ease infinite alternate;
}

@keyframes vs-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); color: #f0c14b; }
}

.duel-impact {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(62, 199, 255, 0.5);
  opacity: 0;
  pointer-events: none;
}

.duel-impact.show {
  animation: impact-ring 0.45s ease-out;
}

@keyframes impact-ring {
  0% { opacity: 0.8; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(12); }
}

.dice-wrap {
  perspective: 420px;
}

.dice {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #d5ddea);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.12s ease;
  transform-style: preserve-3d;
}

.dice.dice-3d {
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.45),
    inset -3px -3px 8px rgba(0, 0, 0, 0.14),
    inset 3px 3px 10px rgba(255, 255, 255, 0.65);
}

.dice.rolling {
  animation: dice-roll 0.12s linear infinite;
}

.dice.slam {
  animation: dice-slam 0.28s ease;
}

@keyframes dice-roll {
  0% { transform: rotateX(12deg) rotateY(-18deg) rotateZ(8deg) scale(0.96); }
  50% { transform: rotateX(-20deg) rotateY(24deg) rotateZ(-12deg) scale(1.02); }
  100% { transform: rotateX(16deg) rotateY(-10deg) rotateZ(18deg) scale(0.97); }
}

@keyframes dice-slam {
  0% { transform: translateY(-18px) scale(1.1) rotateZ(-8deg); }
  60% { transform: translateY(4px) scale(0.96) rotateZ(3deg); }
  100% { transform: translateY(0) scale(1) rotateZ(0); }
}

.dice.landed {
  transform: scale(1.08);
}

.dice::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #1a2436 18%, transparent 19%);
  background-repeat: no-repeat;
}

.dice[data-value="1"]::before {
  background-position: center;
  background-size: 18px 18px;
}
.dice[data-value="2"]::before {
  background-position: 18% 18%, 82% 82%;
  background-size: 16px 16px, 16px 16px;
  background-image:
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%);
}
.dice[data-value="3"]::before {
  background-position: 18% 18%, center, 82% 82%;
  background-size: 15px 15px, 15px 15px, 15px 15px;
  background-image:
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%);
}
.dice[data-value="4"]::before {
  background-position: 20% 20%, 80% 20%, 20% 80%, 80% 80%;
  background-size: 15px 15px, 15px 15px, 15px 15px, 15px 15px;
  background-image:
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%);
}
.dice[data-value="5"]::before {
  background-position: 20% 20%, 80% 20%, center, 20% 80%, 80% 80%;
  background-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, 14px 14px;
  background-image:
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%);
}
.dice[data-value="6"]::before {
  background-position: 20% 18%, 80% 18%, 20% 50%, 80% 50%, 20% 82%, 80% 82%;
  background-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, 14px 14px, 14px 14px;
  background-image:
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%),
    radial-gradient(circle, #1a2436 18%, transparent 19%);
}

/* Horse race */
.race-track {
  width: min(100%, 440px);
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 16px;
  border: 3px solid #3a5a46;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 30%),
    linear-gradient(180deg, #1a2e22 0%, #0d1812 55%, #0a1010 100%);
  box-shadow:
    0 0 0 2px rgba(240, 193, 75, 0.16),
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.race-track.is-racing {
  box-shadow:
    0 0 0 2px rgba(97, 206, 122, 0.45),
    0 0 28px rgba(97, 206, 122, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.race-track.is-win {
  box-shadow:
    0 0 0 2px rgba(240, 193, 75, 0.7),
    0 0 32px rgba(240, 193, 75, 0.28),
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.race-marquee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #0a1810, #163024, #0a1810);
  border: 1px solid rgba(240, 193, 75, 0.35);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c14b;
}

.race-marquee strong {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: #fff6d6;
  text-shadow: 0 0 10px rgba(240, 193, 75, 0.4);
}

.race-field {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(97, 206, 122, 0.25);
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 11px,
      rgba(255,255,255,0.03) 11px,
      rgba(255,255,255,0.03) 12px
    ),
    #07110c;
  overflow: hidden;
}

.race-finish-line {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  right: 2.35rem;
  width: 10px;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    #f2f5fa 0 4px,
    #121820 4px 8px
  );
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.race-finish-line span {
  position: absolute;
  top: -0.05rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff6d6;
  background: #121820;
  padding: 0.05rem 0.2rem;
  border-radius: 3px;
  white-space: nowrap;
}

.race-lanes {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem 0.45rem 0.45rem;
  position: relative;
  z-index: 1;
}

.race-countdown {
  display: none;
  text-align: center;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #fff6d6;
  text-shadow: 0 0 18px rgba(240, 193, 75, 0.55);
  margin: 0.2rem 0 0.55rem;
  min-height: 1.4em;
}
.race-countdown.show {
  display: block;
  animation: race-count-pop 0.45s ease;
}
.race-countdown.go {
  color: #61ce7a;
  letter-spacing: 0.22em;
}
@keyframes race-count-pop {
  from { transform: scale(0.7); opacity: 0.3; }
  to { transform: scale(1); opacity: 1; }
}

.race-lane {
  position: relative;
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr) 1.7rem;
  align-items: center;
  gap: 0.3rem;
  height: 44px;
  padding-right: 0.15rem;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent 40%);
  border-left: 3px solid var(--horse-color, #61ce7a);
  transition: opacity 0.35s ease, filter 0.35s ease, box-shadow 0.35s ease;
}

.race-lane.is-picked {
  background: linear-gradient(90deg, color-mix(in srgb, var(--horse-color) 22%, transparent), transparent 55%);
}

.race-lane.is-winner {
  z-index: 2;
  box-shadow:
    inset 0 0 0 1px rgba(240, 193, 75, 0.85),
    0 0 18px rgba(240, 193, 75, 0.25);
  background: linear-gradient(90deg, rgba(240, 193, 75, 0.28), rgba(240, 193, 75, 0.06) 70%);
  animation: race-winner-pulse 0.7s ease-in-out 3;
}

.race-lane.is-loser {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.race-lane.is-winner .race-horse-name {
  color: #fff6d6;
  font-weight: 800;
  font-size: 0.78rem;
}

.race-lane.is-winner .race-horse-emoji {
  font-size: 1.5rem;
  filter:
    drop-shadow(0 0 8px rgba(240, 193, 75, 0.7))
    drop-shadow(0 2px 2px rgba(0,0,0,0.45));
}

@keyframes race-winner-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(240, 193, 75, 0.7), 0 0 12px rgba(240, 193, 75, 0.2); }
  50% { box-shadow: inset 0 0 0 2px rgba(240, 193, 75, 1), 0 0 22px rgba(240, 193, 75, 0.45); }
}

.race-lane-num {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #9ab0a0;
  text-align: center;
}

.race-trackbed {
  position: relative;
  height: 100%;
  min-width: 0;
  overflow: visible;
}

.race-runner {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: max-content;
  max-width: none;
  transform: translateX(0);
  will-change: transform;
  z-index: 2;
}

.race-runner.galloping .race-horse-emoji {
  animation: race-gallop 0.28s ease-in-out infinite;
}

.race-runner.crossed-finish .race-horse-emoji {
  animation: none;
}

@keyframes race-gallop {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(6deg); }
}

.race-horse-emoji {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45));
}

.race-horse-name {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #e8f2ea;
  white-space: nowrap;
  background: rgba(6, 14, 10, 0.72);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
}

.race-place {
  justify-self: end;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  color: #c5d4c8;
  min-width: 1.4rem;
  text-align: right;
}

.race-place.gold {
  color: #f0c14b;
  font-size: 0.95rem;
  text-shadow: 0 0 10px rgba(240, 193, 75, 0.55);
}

.race-result-plaque {
  margin-top: 0.7rem;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(240, 193, 75, 0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.race-result-plaque.reveal {
  animation: race-plaque-in 0.4s ease;
}

.race-result-plaque.win {
  border-color: rgba(240, 193, 75, 0.75);
  background: linear-gradient(180deg, rgba(240, 193, 75, 0.16), rgba(0,0,0,0.4));
  box-shadow: 0 0 20px rgba(240, 193, 75, 0.2);
}

.race-result-plaque.lose {
  border-color: rgba(255, 122, 89, 0.45);
  background: linear-gradient(180deg, rgba(255, 122, 89, 0.1), rgba(0,0,0,0.4));
}

@keyframes race-plaque-in {
  from { transform: translateY(6px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.race-result-plaque .plaque-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--display);
}

.race-result-plaque strong {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: #fff6d6;
  text-shadow: 0 0 14px rgba(240, 193, 75, 0.35);
}

.race-result-plaque #race-winner-odds {
  font-size: 0.78rem;
  color: #9ab0a0;
}

.race-your-result {
  margin-top: 0.2rem;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.race-your-result.hit {
  color: #7dffa8;
}

.race-your-result.miss {
  color: #ff8a95;
}

.race-track.is-lose {
  box-shadow:
    0 0 0 2px rgba(255, 122, 89, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.race-picks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 420px) {
  .race-picks {
    grid-template-columns: 1fr 1fr;
  }
}

.race-pick {
  appearance: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--horse-color, #61ce7a) 55%, #2a3b55);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--horse-color, #61ce7a) 18%, transparent), rgba(6, 12, 10, 0.85));
  color: var(--text);
  cursor: pointer;
  font-family: var(--display);
  text-align: left;
}

.race-pick:hover:not(:disabled) {
  border-color: var(--horse-color, #f0c14b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--horse-color) 40%, transparent);
}

.race-pick:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.race-pick-name {
  font-size: 0.82rem;
  font-weight: 700;
}

.race-pick small {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff6d6;
  letter-spacing: 0.04em;
}

.viz-form:has(.race-picks) {
  max-width: 440px;
  width: 100%;
}

@media (max-width: 980px) {
  .casino-games,
  .casino-games-3,
  .casino-games-4,
  .casino-games-5 {
    grid-template-columns: 1fr;
  }
  .stat-tiles.tiles-4 {
    grid-template-columns: 1fr 1fr;
  }
  .jackpot-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .jackpot-hint {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .casino-choices-3 {
    grid-template-columns: 1fr;
  }
  .slot-cabinet {
    width: 100%;
  }
  .slot-cell {
    font-size: 1.85rem;
  }
  .duel-board {
    gap: 0.7rem;
  }
  .roulette-stage,
  .roulette-rim {
    width: 210px;
    height: 210px;
  }
  .roulette-hub {
    width: 68px;
    height: 68px;
  }
  .roulette-felt {
    width: 100%;
  }
  .felt-grid {
    grid-template-rows: repeat(3, 1.55rem);
  }
  .felt-num {
    font-size: 0.62rem;
  }
  .viz-form {
    max-width: none;
    justify-items: center;
  }
}

.banner {
  border: 1px solid rgba(62, 199, 255, 0.35);
  background: rgba(62, 199, 255, 0.08);
  color: #bfefff;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
}

.banner-jail {
  border-color: rgba(255, 93, 108, 0.45);
  background: rgba(255, 93, 108, 0.08);
  color: #ffb3bb;
}

.progress-block { margin: 0.9rem 0 1.1rem; }

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-bar {
  height: 10px;
  background: #0a1018;
  border: 1px solid #243247;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b8860b, var(--gold));
  box-shadow: 0 0 12px rgba(240, 193, 75, 0.35);
}

.character .avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 0.65rem;
  border: 2px solid var(--accent);
  background:
    radial-gradient(circle at 30% 25%, rgba(62, 199, 255, 0.35), transparent 50%),
    #0d1624;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(62, 199, 255, 0.2);
}

.info-name {
  text-align: center;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.rank-badge {
  display: block;
  width: fit-content;
  margin: 0.45rem auto 0.9rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(240, 193, 75, 0.45);
  background: rgba(240, 193, 75, 0.1);
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-rows {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.stat-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(42, 59, 85, 0.8);
  font-size: 0.9rem;
}

.stat-rows span { color: var(--muted); }
.stat-rows .money { color: var(--gold); }
.stat-rows .xp { color: var(--accent); }

.stat-bar-label {
  margin: 0.2rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.jail-note {
  margin: 0.75rem 0 0;
  color: var(--bad);
  font-weight: 700;
  font-size: 0.88rem;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(42, 59, 85, 0.85);
}

.log-list li:last-child { border-bottom: 0; }
.log-list li > div:first-child { display: grid; gap: 0.15rem; }
.log-list .ok { color: var(--ok); }
.log-list .fail { color: var(--bad); }

.crime-list {
  display: grid;
  gap: 0.7rem;
}

.crime {
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(62, 199, 255, 0.06), transparent 42%),
    var(--panel-2);
  padding: 0.9rem 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.crime.status-ready {
  border-color: rgba(62, 199, 255, 0.45);
  box-shadow: 0 0 18px rgba(62, 199, 255, 0.08);
}

.crime.status-locked,
.crime.status-jail {
  opacity: 0.55;
  filter: grayscale(0.25);
}

.crime.status-ready:hover {
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(62, 199, 255, 0.16);
}

.crime-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.district-chip,
.status-chip {
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border: 1px solid;
}

.district-chip {
  color: var(--accent);
  border-color: rgba(62, 199, 255, 0.35);
  background: rgba(62, 199, 255, 0.08);
}

.status-chip.status-ready { color: var(--ok); border-color: rgba(61, 220, 138, 0.4); background: rgba(61, 220, 138, 0.1); }
.status-chip.status-locked { color: var(--muted); border-color: var(--line); background: transparent; }
.status-chip.status-cooldown { color: var(--warn); border-color: rgba(255, 176, 32, 0.4); background: rgba(255, 176, 32, 0.1); }
.status-chip.status-energy { color: var(--accent); border-color: rgba(62, 199, 255, 0.35); background: rgba(62, 199, 255, 0.08); }
.status-chip.status-jail { color: var(--bad); border-color: rgba(255, 93, 108, 0.4); background: rgba(255, 93, 108, 0.1); }

.crime-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.crime h2 { margin: 0; }
.crime p { color: var(--muted); margin: 0.4rem 0 0; }

.tag {
  color: var(--warn);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.85rem 0 0.4rem;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.meter-bar {
  height: 7px;
  background: #0a1018;
  border: 1px solid #243247;
  overflow: hidden;
}

.meter-fill.risk {
  height: 100%;
  background: linear-gradient(90deg, #a33, var(--bad));
}

.meter-fill.success {
  height: 100%;
  background: linear-gradient(90deg, #178f55, var(--ok));
}

.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0;
}

.meta dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.meta dd {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-weight: 700;
  font-family: var(--display);
}

.btn-mission {
  min-width: 10rem;
}

.game-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.1rem 1.15rem 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  background:
    linear-gradient(180deg, #0d1522, #0a111c);
}

.game-footer-compact {
  padding: 0.55rem 0.85rem;
}

.game-footer-compact .footer-bottom {
  padding-top: 0;
  border-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.footer-brand p {
  margin: 0.45rem 0 0;
  max-width: 22rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-logo strong {
  font-family: var(--display);
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-footer h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.game-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.game-footer a {
  color: var(--muted);
}

.game-footer a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(42, 59, 85, 0.85);
  font-size: 0.78rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-legal-links a {
  color: var(--muted);
}

.footer-legal-links a:hover {
  color: var(--accent);
}

.legal-body {
  max-width: 42rem;
}

.legal-body h2 {
  margin: 1.35rem 0 0.45rem;
  font-family: var(--display);
  font-size: 1rem;
}

.legal-body p,
.legal-body li {
  color: var(--muted);
  line-height: 1.55;
}

.legal-body ul {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.legal-body strong {
  color: var(--text);
}

@media (max-width: 980px) {
  .bank-actions { grid-template-columns: 1fr; }
  .game-body-play { grid-template-columns: 168px minmax(0, 1fr); }
  .sidebar-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .sidebar-right .nav-block { margin-bottom: 0; }
  .stat-tiles,
  .stat-tiles.tiles-5,
  .stat-tiles.tiles-6,
  .quick-grid,
  .home-split { grid-template-columns: 1fr 1fr; }
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 1.25rem;
}

.kit-grid-profile {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kit-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(12, 20, 30, 0.55);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.kit-card:hover {
  text-decoration: none;
  border-color: rgba(62, 199, 255, 0.45);
  background: rgba(62, 199, 255, 0.06);
}

.kit-label {
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.kit-card strong {
  font-size: 0.98rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kit-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.kit-card.kit-ok {
  border-color: rgba(80, 200, 120, 0.45);
}

.kit-card.kit-ok strong {
  color: var(--ok);
}

.kit-card.kit-warn {
  border-color: rgba(230, 170, 70, 0.45);
}

.kit-card.kit-warn strong {
  color: #e6aa46;
}

@media (max-width: 900px) {
  .kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .kit-grid,
  .kit-grid-profile { grid-template-columns: 1fr; }
}

.page-hero,
.property-hero {
  position: relative;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #0a1218;
  overflow: hidden;
  max-height: 280px;
}

.page-hero.page-hero-has-copy {
  max-height: 320px;
}

.page-hero img,
.property-hero img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
}

.page-hero.page-hero-has-copy img {
  height: 320px;
}

.page-hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7, 13, 20, 0.15) 0%,
      rgba(7, 13, 20, 0.35) 40%,
      rgba(7, 13, 20, 0.88) 100%
    );
}

.page-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.1rem 1.15rem 1rem;
  margin: 0;
}

.page-hero-copy .mission-label {
  margin: 0 0 0.2rem;
  color: rgba(220, 230, 240, 0.78);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.page-hero-copy h1 {
  margin: 0;
  color: #f4f7fb;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.page-hero-lede {
  margin: 0.45rem 0 0;
  max-width: 40rem;
  color: rgba(210, 220, 230, 0.88);
  font-size: 0.95rem;
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.page-hero-lede a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.property-hero-next {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  max-height: 200px;
}

.property-hero-next img {
  height: 200px;
}

.property-panel .panel-body {
  padding-top: 0.85rem;
}

.property-compact .stat-tiles {
  margin: 0 0 0.85rem;
}

/* Property hero: image is background; copy in-flow so nothing is clipped. */
.property-hero-live.page-hero.page-hero-has-copy {
  max-height: none;
  height: auto;
  min-height: 320px;
  overflow: hidden;
}

.property-hero-live.page-hero.page-hero-has-copy > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.property-hero-live .page-hero-fade,
.property-hero-live .property-hero-fade {
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(7, 13, 20, 0.12) 0%,
      rgba(7, 13, 20, 0.35) 35%,
      rgba(7, 13, 20, 0.78) 62%,
      rgba(7, 13, 20, 0.94) 100%
    );
}

.property-hero-live .property-hero-copy.page-hero-copy {
  position: relative;
  z-index: 2;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 7.5rem 1.15rem 1.15rem;
  isolation: isolate;
}

.property-hero-live .property-hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 18%;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(7, 13, 20, 0) 0%,
    rgba(7, 13, 20, 0.45) 22%,
    rgba(7, 13, 20, 0.78) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%);
}

.property-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  margin: 0.8rem 0 0.75rem;
}

.property-hero-meta > div {
  min-width: 0;
}

.property-hero-meta dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(220, 230, 240, 0.78);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.property-hero-meta dd {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.3;
  color: #f4f7fb;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.property-hero-meta dd.money {
  color: var(--money, #9dffa8);
}

.property-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}

.property-hero-actions form {
  margin: 0;
}

.property-hero-live .property-hero-next {
  margin: 0.55rem 0 0;
  max-height: none;
  border: 0;
  color: rgba(210, 220, 230, 0.88) !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.property-hero-live .property-hero-next strong {
  color: #f4f7fb;
}

.property-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
}

.property-action-grid .admin-block {
  padding: 0.7rem 0.75rem;
}

.property-action-grid .admin-block h2 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.property-action-grid .admin-block p {
  margin: 0 0 0.55rem;
}

.property-action-grid form {
  margin: 0;
}

.property-next-line {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.property-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.property-people {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.property-people:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.property-people .section-sub {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.property-people-list {
  list-style: none;
  margin: 0.4rem 0 0.55rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.property-people-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 22, 0.55);
  font-size: 0.9rem;
}

.property-people-list li .inline {
  margin-left: auto;
}

.property-invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 28rem;
  margin: 0.35rem 0 0;
}

.property-invite-form input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a111c;
  color: inherit;
}

@media (max-width: 900px) {
  .property-hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .property-action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .property-hero-live .property-hero-copy.page-hero-copy {
    padding-top: 5.5rem;
  }

  .property-hero-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .property-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-hero,
  .page-hero img,
  .property-hero,
  .property-hero img { max-height: 180px; height: 180px; }
  .page-hero.page-hero-has-copy,
  .page-hero.page-hero-has-copy img { max-height: 220px; height: 220px; }
  .page-hero-copy { padding: 0.85rem 0.9rem 0.8rem; }
  .page-hero-lede { font-size: 0.88rem; }
  .property-hero-next,
  .property-hero-next img { max-height: 140px; height: 140px; }
  .game { width: min(var(--max), calc(100% - 1rem)); margin-top: 0.6rem; }
  .game-top-bar {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
  }
  .game-top-actions { align-items: stretch; }
  .header-actions { justify-content: flex-start; }
  .game-body-play,
  .sidebar-right,
  .stat-tiles,
  .stat-tiles.tiles-5,
  .stat-tiles.tiles-6,
  .quick-grid,
  .feature-grid,
  .home-split,
  .meter-row { grid-template-columns: 1fr; }
  .status-alert { flex-direction: column; align-items: flex-start; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-list li { flex-direction: column; }
  .lede.tight { text-align: left; max-width: none; }
  .landing-hero { padding: 1.5rem 0.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

.notify-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.notify-item {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(62, 199, 255, 0.18);
  background: rgba(10, 18, 28, 0.55);
}

.notify-item.is-unread {
  border-color: rgba(240, 193, 75, 0.4);
  background: rgba(240, 193, 75, 0.06);
}

.notify-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.notify-type { color: var(--accent); font-weight: 700; }

.notify-title {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.notify-body {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Gang territories */
.terr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.1rem;
}
.terr-filters .btn.active {
  border-color: rgba(240, 193, 75, 0.55);
  color: #fff6d6;
  background: rgba(240, 193, 75, 0.1);
}
.terr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.terr-card {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(62, 199, 255, 0.22);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.03), transparent 40%),
    rgba(8, 14, 22, 0.85);
}
.terr-card.terr-owned {
  border-color: rgba(97, 206, 122, 0.45);
  box-shadow: inset 0 0 0 1px rgba(97, 206, 122, 0.12);
}
.terr-card.terr-hot {
  border-color: rgba(255, 122, 89, 0.5);
}
.terr-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}
.terr-card-head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
}
.terr-income {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  font-family: var(--display);
  font-size: 0.72rem;
  color: #c9d4e6;
  white-space: nowrap;
}
.terr-owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.55rem 0 0.35rem;
  font-size: 0.88rem;
}
.terr-contest {
  margin: 0.4rem 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 122, 89, 0.1);
  border: 1px solid rgba(255, 122, 89, 0.3);
  font-size: 0.82rem;
}
.terr-pending {
  margin: 0.35rem 0;
  font-family: var(--display);
  font-size: 0.85rem;
  color: #fff6d6;
}
.terr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.terr-actions form { margin: 0; }

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.admin-block {
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(62, 199, 255, 0.22);
  background: rgba(8, 14, 22, 0.85);
}
.admin-block h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.admin-form {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  max-width: none;
}
.admin-form:last-child { margin-bottom: 0; }
.admin-form-row {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-items: end;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
  border-radius: 0;
  box-sizing: border-box;
}
.admin-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) calc(50% - 0.15rem),
    calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
  cursor: pointer;
}
.admin-form select option {
  background: #0a111c;
  color: var(--text);
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 199, 255, 0.15);
}
.admin-form input::placeholder,
.admin-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.admin-form input:disabled,
.admin-form select:disabled,
.admin-form textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.admin-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.admin-lookup {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  font-size: 0.88rem;
}

.admin-login-mini {
  margin-top: 0.35rem;
}

.admin-audit li {
  align-items: flex-start;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
}

.admin-tabs a {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.55);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-tabs a:hover {
  color: var(--ink, #eef2f6);
  border-color: rgba(62, 199, 255, 0.35);
}

.admin-tabs a.active {
  color: #0b1220;
  background: linear-gradient(90deg, #f0c14b, #ffe08a);
  border-color: transparent;
}

.admin-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.admin-hub-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(62, 199, 255, 0.22);
  background: rgba(8, 14, 22, 0.85);
  text-decoration: none;
  color: inherit;
}

.admin-hub-card strong {
  font-family: var(--display);
  font-size: 1.05rem;
}

.admin-hub-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.admin-hub-card:hover {
  border-color: rgba(240, 193, 75, 0.55);
}

.admin-grid-overview {
  margin-top: 0.25rem;
}

.stocks-board {
  margin: 0.85rem 0 1rem;
}

.stocks-chart-panel {
  border: 1px solid rgba(62, 199, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 24, 38, 0.95), rgba(8, 13, 22, 0.98));
  padding: 0.75rem 0.85rem 0.9rem;
}

.stocks-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.stocks-ticker-tabs,
.stocks-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.stocks-tab,
.stocks-range-btn {
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--muted);
  font: inherit;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.stocks-tab.is-active,
.stocks-range-btn.is-active {
  color: var(--text);
  border-color: rgba(62, 199, 255, 0.55);
  background: rgba(62, 199, 255, 0.12);
}

.stocks-chart-meta {
  margin: 0 0 0.45rem;
  min-height: 1.2em;
}

.stocks-main-chart {
  display: block;
  width: 100%;
  height: 220px;
  max-width: 100%;
}

.stocks-table-wrap {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid rgba(62, 199, 255, 0.12);
  background: rgba(7, 11, 18, 0.35);
}

.stocks-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.86rem;
}

.stocks-table th,
.stocks-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
}

.stocks-table th {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(62, 199, 255, 0.06);
}

.stocks-table th:nth-child(1),
.stocks-table td:nth-child(1) {
  width: 34%;
}

.stocks-table th:nth-child(2),
.stocks-table td:nth-child(2) {
  width: 16%;
}

.stocks-table th:nth-child(3),
.stocks-table td:nth-child(3) {
  width: 12%;
}

.stocks-table th:nth-child(4),
.stocks-table td:nth-child(4) {
  width: 14%;
}

.stocks-table th:nth-child(5),
.stocks-table td:nth-child(5) {
  width: 24%;
}

.stocks-table tr[data-stocks-row] {
  cursor: pointer;
}

.stocks-table tr[data-stocks-row].is-active td {
  background: rgba(62, 199, 255, 0.07);
}

.stocks-spark-cell {
  padding-right: 0.35rem;
}

.stocks-spark {
  display: block;
  width: 88px;
  height: 28px;
  max-width: 100%;
}

.stocks-company {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.stocks-company-name {
  font-weight: 600;
}

.stocks-blurb {
  margin-top: 0.2rem;
}

.stocks-ticker {
  letter-spacing: 0.04em;
  color: var(--accent);
}

.stocks-up {
  color: #6dcea0;
}

.stocks-down {
  color: #e07a7a;
}

.stocks-price .mini,
.stocks-hold .mini {
  margin-top: 0.15rem;
  font-size: 0.78rem;
}

.stocks-actions {
  text-align: center;
}

.stocks-trade {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}

.stocks-trade-form {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.stocks-trade-form input[type="number"] {
  width: 3.4rem;
  padding: 0.35rem 0.4rem;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  border-radius: 0;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stocks-trade-form input[type="number"]::-webkit-outer-spin-button,
.stocks-trade-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stocks-trade-form input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.stocks-trade-form input[type="number"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stocks-trade-form .btn {
  min-width: 3.6rem;
}

.stocks-recent {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.stocks-feed {
  margin: 0.85rem 0 1.1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(10, 17, 28, 0.55);
}

.stocks-feed .section-sub {
  margin: 0 0 0.45rem;
}

.stocks-feed-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.stocks-feed-list li {
  line-height: 1.35;
}

.stocks-row-state td {
  background: rgba(120, 180, 140, 0.05);
}

.tag-state {
  color: #8fd4a8;
  border-color: rgba(143, 212, 168, 0.4);
  background: rgba(143, 212, 168, 0.1);
}

/* Svartemarked listings */
.market-table-wrap {
  margin: 0.5rem 0 1rem;
}

.market-table {
  margin: 0;
}

.market-table th,
.market-table td {
  vertical-align: middle;
}

.market-table th.market-actions-col,
.market-table td.market-actions {
  width: 11.5rem;
  text-align: center;
}

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

.market-item-name {
  font-weight: 700;
}

.market-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.market-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.market-seller {
  color: var(--muted);
  font-size: 0.88rem;
}

.market-row-own td {
  background: rgba(62, 199, 255, 0.04);
}

.market-action {
  display: flex;
  justify-content: center;
  align-items: center;
}

.market-action-form {
  display: grid;
  grid-template-columns: 3.6rem 5.5rem;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.market-qty-slot {
  display: block;
  width: 3.6rem;
  height: 1px;
  visibility: hidden;
}

.market-qty {
  width: 3.6rem;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  padding: 0.4rem 0.35rem;
  font: inherit;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 0;
}

.market-action-btn {
  width: 5.5rem;
  min-width: 0;
  justify-content: center;
}

.market-table .btn-mission.market-action-btn {
  min-width: 0;
}

.tag-warn {
  color: #f0b35a;
  border-color: rgba(240, 179, 90, 0.45);
  background: rgba(240, 179, 90, 0.12);
}

@media (max-width: 720px) {
  .market-table th.market-actions-col,
  .market-table td.market-actions {
    width: auto;
  }

  .market-action-form {
    grid-template-columns: 3.2rem 4.8rem;
  }

  .market-qty,
  .market-qty-slot {
    width: 3.2rem;
  }

  .market-action-btn {
    width: 4.8rem;
  }
}

/* Trening / skills */
.skill-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 1rem;
}

.skill-card {
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid #2a3a52;
  background: linear-gradient(165deg, rgba(18, 28, 42, 0.95), rgba(10, 14, 22, 0.9));
}

.skill-card.is-training {
  border-color: rgba(240, 193, 75, 0.45);
}

.skill-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.skill-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.skill-card-head strong {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.skill-card .stat-bar {
  margin: 0.55rem 0 0.65rem;
}

.skill-meta {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.skill-card .btn {
  width: 100%;
}


/* Forum */
.forum-board {
  --forum-row-a: #0c121c;
  --forum-row-b: #141c2a;
}

.forum-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.forum-crumb a {
  color: var(--accent);
  text-decoration: none;
}

.forum-crumb a:hover {
  text-decoration: underline;
}

.forum-crumb-current {
  color: var(--text);
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.forum-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  background: #0a111c;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.forum-tab:hover {
  color: var(--text);
  border-color: rgba(62, 199, 255, 0.45);
}

.forum-tab.is-active {
  color: var(--text);
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, rgba(62, 199, 255, 0.14), rgba(10, 17, 28, 0.95));
}

.forum-tab.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.forum-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
}

.forum-cat-meta {
  min-width: 0;
  flex: 1;
}

.forum-cat-blurb {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
}

.forum-cat-stats {
  margin: 0;
}

.forum-unread-pill {
  color: var(--accent);
  font-weight: 700;
}

.forum-create-btn {
  flex-shrink: 0;
  min-width: 9rem;
  justify-content: center;
  box-sizing: border-box;
}

.forum-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.9rem;
}

.forum-search {
  flex: 1 1 14rem;
  margin: 0;
}

.forum-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  font: inherit;
}

.forum-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.forum-sort {
  margin: 0;
}

.forum-sort select {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  font: inherit;
}

.forum-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080e16;
}

.forum-board-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, rgba(62, 199, 255, 0.22), rgba(26, 143, 184, 0.35));
  border-bottom: 1px solid rgba(62, 199, 255, 0.35);
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.forum-banner-q {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(231, 238, 248, 0.85);
  font-size: 0.82rem;
}

.forum-empty {
  margin: 0;
  padding: 1.75rem 1rem;
  text-align: center;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
}

.forum-empty-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--text);
}

.forum-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.forum-thread-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(7rem, 9.5rem);
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid rgba(42, 59, 85, 0.85);
  background: var(--forum-row-a);
}

.forum-thread-row:nth-child(even) {
  background: var(--forum-row-b);
}

.forum-thread-row:hover {
  background: rgba(62, 199, 255, 0.06);
}

.forum-thread-row.is-sticky {
  background: rgba(62, 199, 255, 0.08);
}

.forum-thread-row.is-unread .forum-topic-title {
  color: var(--text);
  font-weight: 800;
}

.forum-thread-avatar {
  display: block;
  flex-shrink: 0;
}

.forum-thread-avatar img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #080e16;
  display: block;
}

.forum-thread-main {
  min-width: 0;
}

.forum-thread-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.3rem;
}

.forum-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.forum-badge-new {
  border-color: rgba(62, 199, 255, 0.55);
  color: var(--accent);
  background: rgba(62, 199, 255, 0.12);
}

.forum-badge-sticky {
  border-color: rgba(62, 199, 255, 0.45);
  color: var(--accent);
}

.forum-badge-locked {
  color: var(--muted);
}

.forum-topic-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
}

.forum-topic-title:hover {
  color: var(--accent);
}

.forum-thread-preview {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-thread-meta {
  margin: 0.35rem 0 0;
}

.forum-thread-meta a {
  color: var(--accent);
  text-decoration: none;
}

.forum-thread-meta a:hover {
  text-decoration: underline;
}

.forum-thread-stats {
  display: grid;
  gap: 0.35rem;
  text-align: right;
  color: var(--muted);
  font-size: 0.78rem;
  min-width: 4.5rem;
}

.forum-thread-stats strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.forum-thread-stats span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.forum-thread-last {
  min-width: 0;
  text-align: right;
}

.forum-last-jump {
  display: grid;
  gap: 0.2rem;
  color: inherit;
  text-decoration: none;
}

.forum-last-jump:hover strong {
  color: var(--accent);
}

.forum-last-jump strong {
  color: var(--text);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-last-jump time {
  color: var(--muted);
  font-size: 0.78rem;
}

.forum-sticky-label {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.forum-locked-label {
  color: var(--muted);
  font-weight: 700;
  margin-right: 0.25rem;
}

.forum-back {
  margin: 0 0 0.75rem;
}

.forum-compose-title {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.35rem;
}

.forum-thread-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.forum-thread-title h1 {
  margin: 0.25rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.forum-thread-sub {
  margin: 0.4rem 0 0;
}

.forum-thread-sub a {
  color: var(--accent);
  text-decoration: none;
}

.forum-thread-sub a:hover {
  text-decoration: underline;
}

.forum-posts {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.forum-post-card {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.forum-post-card.is-op {
  border-color: rgba(62, 199, 255, 0.35);
}

.forum-post-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.7rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.65);
  text-align: center;
}

.forum-post-user {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.forum-post-user:hover {
  text-decoration: underline;
}

.forum-post-rank {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
}

.forum-post-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #080e16;
}

.forum-post-count {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.forum-like-form {
  margin: 0.25rem 0 0;
  width: 100%;
}

.forum-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.forum-side-btn:hover {
  border-color: rgba(62, 199, 255, 0.45);
}

.forum-side-btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

.forum-btn-danger {
  color: var(--bad) !important;
  border-color: rgba(255, 93, 108, 0.45) !important;
}

.forum-btn-danger:hover {
  border-color: var(--bad) !important;
}

.forum-like-meta {
  margin: 0;
  min-height: 1.1em;
}

.forum-post-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.forum-post-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.55);
  color: var(--muted);
  font-size: 0.82rem;
}

.forum-post-when {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: baseline;
}

.forum-edited {
  color: var(--muted);
  font-size: 0.78rem;
}

.forum-post-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.forum-post-tools .forum-side-btn,
.forum-post-tools form {
  width: auto;
  margin: 0;
}

.forum-post-tools .forum-side-btn {
  padding: 0.3rem 0.55rem;
}

.forum-post-body {
  margin: 0;
  padding: 0.9rem 0.95rem 1.05rem;
  word-break: break-word;
  line-height: 1.55;
  color: var(--text);
}

.forum-compose {
  max-width: 44rem;
  margin-top: 0.5rem;
}

.forum-mod {
  margin: 0;
}

.forum-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.forum-pager-top {
  margin-top: 0;
}

.forum-pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.forum-pager-num {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 0.35rem;
  box-sizing: border-box;
}

.forum-pager-num:hover {
  border-color: rgba(62, 199, 255, 0.45);
  color: var(--accent);
}

.forum-pager-num.is-current {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(62, 199, 255, 0.12);
}

.forum-pager-gap {
  color: var(--muted);
  padding: 0 0.15rem;
}

@media (max-width: 860px) {
  .forum-thread-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .forum-thread-stats,
  .forum-thread-last {
    display: none;
  }
}

@media (max-width: 720px) {
  .forum-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .forum-create-btn {
    width: 100%;
  }

  .forum-post-card {
    grid-template-columns: 1fr;
  }

  .forum-post-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Rich text editor */
.forum-field {
  display: grid;
  gap: 0.35rem;
}

.forum-field-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.forum-editor {
  display: grid;
  gap: 0.45rem;
}

.forum-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.65);
}

.forum-tool {
  min-width: 2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.forum-tool:hover {
  border-color: rgba(62, 199, 255, 0.45);
  color: var(--accent);
}

.forum-charcount {
  margin-left: auto;
  padding-right: 0.25rem;
}

.forum-emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  background: #0a111c;
  max-height: 8.5rem;
  overflow: auto;
}

.forum-emoji-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

.forum-emoji-btn:hover {
  border-color: var(--line);
  background: var(--panel-2);
}

.forum-editor-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a111c;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
  border-radius: 0;
  box-sizing: border-box;
  resize: vertical;
  min-height: 8rem;
}

.forum-editor-input:focus {
  outline: none;
  border-color: var(--accent);
}

.forum-editor-hint {
  margin: 0;
}

.forum-post-rich {
  white-space: normal;
}

.forum-post-rich a {
  color: var(--accent);
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

.forum-quote {
  margin: 0.55rem 0;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: rgba(62, 199, 255, 0.08);
  color: var(--text);
}

.forum-quote cite {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
}

.forum-code {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--line);
  background: #0a111c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

