:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #070a11;
  color: #e8edf7;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 90px;
}

.bg-orb {
  position: fixed;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

.bg-orb-one {
  top: -220px;
  left: -160px;
  background: radial-gradient(circle, #1b4b8f, transparent 65%);
}

.bg-orb-two {
  bottom: -260px;
  right: -180px;
  background: radial-gradient(circle, #7a5a12, transparent 65%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 54px 54px;
  z-index: 0;
  pointer-events: none;
}

h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
  color: #b9c4d8;
}

p {
  margin: 0 0 12px;
}

code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
}

.muted {
  color: #94a1b8;
}

.small {
  font-size: 13px;
}

.gold {
  color: #e0bd55;
}

.empty {
  color: #75839b;
  font-size: 14px;
  list-style: none;
}

/* ================================================================ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 30px;
  background: rgba(7, 10, 17, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0a0d14;
  background: linear-gradient(140deg, #f4d67a, #c9a227 55%, #8f6f12);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
}

.brand-text span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8d7a3f;
}

.nav {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #a6b2c6;
  font: inherit;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-link[hidden] {
  display: none;
}

.nav-link:hover {
  color: #e8edf7;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #f6e3a4;
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.32);
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-chip img,
.account-chip .avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #0a0d14;
  background: linear-gradient(140deg, #f4d67a, #c9a227);
}

.account-chip strong {
  font-size: 13px;
  font-weight: 600;
}

.account-chip span {
  display: block;
  font-size: 11px;
  color: #93a0b5;
}

/* ================================================================== shell */

.shell {
  position: relative;
  z-index: 5;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 24px 40px;
}

.view {
  display: none;
  animation: rise 260ms ease both;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass {
  background: linear-gradient(160deg, rgba(24, 31, 45, 0.86), rgba(13, 18, 28, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.card {
  padding: 22px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 34px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.hero:after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.18), transparent 65%);
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: #a48b45;
  margin-bottom: 8px;
}

.hero-actions,
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.stat {
  min-width: 128px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8f9cb2;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a9b5c8;
}

.pill strong {
  color: #f2d784;
  font-variant-numeric: tabular-nums;
}

/* ================================================================= inputs */

.btn {
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  color: #141002;
  background: linear-gradient(140deg, #f2d784, #c9a227);
  box-shadow: 0 10px 26px rgba(201, 162, 39, 0.24);
}

.btn-gold:hover {
  background: linear-gradient(140deg, #ffe9a6, #d8b033);
}

.btn-ghost {
  color: #d7dfee;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.11);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-danger {
  color: #ffd9d9;
  background: rgba(190, 66, 66, 0.18);
  border-color: rgba(190, 66, 66, 0.4);
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field span {
  display: block;
  font-size: 12px;
  color: #94a1b8;
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: #eef2fa;
  background: rgba(6, 10, 17, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.14);
}

textarea {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  margin-top: 6px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #a9b5c8;
  margin-bottom: 6px;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.inline-form input,
.inline-form select {
  flex: 1;
  min-width: 140px;
}

.rule {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 20px 0;
}

/* ==================================================================  data */

.kv {
  margin: 0;
  display: grid;
  gap: 2px;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.kv div:last-child {
  border-bottom: 0;
}

.kv dt {
  color: #94a1b8;
  font-size: 13px;
}

.kv dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.rank-list li {
  counter-increment: rank;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.rank-list li.empty {
  counter-increment: none;
  color: #8d9ab0;
}

.rank-list li.empty:before {
  display: none;
}

.rank-list li:before {
  content: counter(rank);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #e7c765;
  background: rgba(201, 162, 39, 0.14);
}

.rank-list li span.name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list li span.amount {
  font-variant-numeric: tabular-nums;
  color: #d9e2f1;
  font-size: 13px;
}

.ticker {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow: auto;
}

.ticker li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.ticker li .t-main {
  color: #c9d4e6;
}

.ticker li .t-meta {
  color: #7f8ca3;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

/* ================================================================== list  */

.job-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.job .job-name {
  font-weight: 600;
  font-size: 14px;
}

.job .job-meta {
  font-size: 12px;
  color: #8b98af;
}

.job .job-level {
  font-size: 11px;
  color: #d6b955;
}

.shop-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  appearance: none;
  font: inherit;
  font-size: 12px;
  color: #a6b2c6;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.chip.active {
  color: #f4dfa0;
  border-color: rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.12);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  max-height: 500px;
  overflow: auto;
  padding-right: 4px;
}

.item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item .item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.item .item-name {
  font-weight: 600;
  font-size: 14px;
}

.item .item-price {
  font-size: 13px;
  color: #f0d585;
  font-variant-numeric: tabular-nums;
}

.item .item-desc {
  font-size: 12px;
  color: #8e9bb2;
  min-height: 32px;
}

.item .item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #7f8ca3;
}

.badge-rarity {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #b9c4d8;
}

.inventory-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.inv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.inv-row .inv-actions {
  display: flex;
  gap: 6px;
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b98af;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table td {
  padding: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: #c9d4e6;
}

.table td.num {
  font-variant-numeric: tabular-nums;
}

/* ================================================================= police */

.stock-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.stock-row .stock-name {
  font-weight: 600;
}

.stock-row .stock-meta {
  font-size: 11px;
  color: #8b98af;
}

.stock-row .stock-count {
  font-variant-numeric: tabular-nums;
  color: #9fd3b4;
}

.wanted-list {
  display: grid;
  gap: 8px;
}

.wanted-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(190, 66, 66, 0.08);
  border: 1px solid rgba(190, 66, 66, 0.22);
  font-size: 13px;
}

.guild-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.guild-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

/* ================================================================= arcade */

.disclaimer {
  border: 1px solid rgba(201, 162, 39, 0.34);
  background: rgba(201, 162, 39, 0.1);
  color: #f0dea4;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.disclaimer.small {
  font-size: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.game-grid {
  display: block;
  margin-bottom: 18px;
}

.game-stage {
  margin-bottom: 18px;
  min-height: 220px;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.game-tabs[hidden] {
  display: none;
}

.game-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: #cfd7e6;
  padding: 7px 10px 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.game-tab:hover {
  border-color: rgba(201, 162, 39, 0.45);
}

.game-tab.active {
  border-color: rgba(201, 162, 39, 0.65);
  background: rgba(201, 162, 39, 0.14);
  color: #f4e7bd;
}

.game-tab .tab-close {
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  color: #8e9bb2;
}

.game-tab .tab-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.stage-panel[hidden] {
  display: none;
}

.wager-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.wager-row input {
  max-width: 170px;
}

.board-ttt {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 8px;
  margin: 12px 0;
}

.ttt-cell {
  width: 76px;
  height: 76px;
  font-size: 30px;
  font-weight: 700;
  color: #f2d784;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.ttt-cell:disabled {
  cursor: default;
  opacity: 0.85;
}

.board-c4 {
  display: grid;
  grid-template-columns: repeat(7, 44px);
  gap: 6px;
  margin: 12px 0;
}

.c4-cell {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.c4-cell.p1 {
  background: radial-gradient(circle at 35% 30%, #ffdf8a, #c9a227);
}

.c4-cell.p2 {
  background: radial-gradient(circle at 35% 30%, #9fd6ff, #2f6fb0);
}

.c4-cell.full {
  cursor: default;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 52px);
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
  width: max-content;
}

.chess-cell {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  color: #10151f;
}

.chess-cell.light {
  background: #d9d3c3;
}

.chess-cell.dark {
  background: #7c8a7a;
}

.chess-cell.sel {
  box-shadow: inset 0 0 0 3px #c9a227;
}

.chess-cell .pw {
  color: #ffffff;
  text-shadow: 0 0 2px #0b0f17, 0 0 3px #0b0f17;
}

.chess-cell .pb {
  color: #0b0f17;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.35);
}

.chess-cell.legal {
  box-shadow: inset 0 0 0 3px rgba(201, 162, 39, 0.55);
}


.chess-cell.legal:after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(20, 30, 20, 0.35);
}

.cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.playing-card {
  min-width: 52px;
  padding: 10px 12px;
  text-align: center;
  border-radius: 10px;
  background: #f4f1e8;
  color: #16181d;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.playing-card.red {
  color: #b3332f;
}

.reels {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.reel {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0d585;
}

.roulette-wheel {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  margin: 12px 0;
  border: 6px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 7px;
  margin: 12px 0;
}

.mine-cell {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f0d585;
  font-weight: 700;
  cursor: pointer;
}

.mine-cell.open {
  background: rgba(110, 201, 154, 0.18);
  border-color: rgba(110, 201, 154, 0.4);
  cursor: default;
}

.mine-cell.boom {
  background: rgba(190, 66, 66, 0.28);
  border-color: rgba(190, 66, 66, 0.6);
}

.crash-wrap {
  padding: 8px 0 14px;
}

.crash-multiplier {
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f2d784;
  line-height: 1.1;
}

.crash-multiplier.crashed {
  color: #e2706f;
}

.crash-phase {
  font-size: 13px;
  color: #94a1b8;
  margin-bottom: 10px;
}

.crash-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.crash-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7ac9a1, #f2d784, #e2706f);
  transition: width 300ms linear;
}

.lobby-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
}

.lobby-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.lobby-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lobby-strip .pill {
  font-size: 12px;
}

.match-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.07);
  border: 1px solid rgba(201, 162, 39, 0.28);
}

.rps-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.plinko-path {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #8e9bb2;
  letter-spacing: 0.3em;
}

/* ================================================================== toast */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #eaf0fa;
  background: rgba(21, 28, 41, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  animation: rise 200ms ease both;
}

.toast.ok {
  border-color: rgba(110, 201, 154, 0.4);
}

.toast.bad {
  border-color: rgba(190, 66, 66, 0.5);
}

.footer {
  position: relative;
  z-index: 5;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: #8b98af;
  flex-wrap: wrap;
}

/* ============================================================= responsive */

@media (max-width: 980px) {
  .grid-three {
    grid-template-columns: 1fr;
  }

  .grid-four {
    grid-template-columns: 1fr;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    width: 100%;
    flex-wrap: wrap;
  }

  .stat {
    flex: 1;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .account {
    margin-left: auto;
  }

  .shell {
    padding: 20px 14px 30px;
  }

  .chess-cell {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .chess-board {
    grid-template-columns: repeat(8, 38px);
  }
}

/* Admin Studio tabs, dispatch feed and recent wins */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-tab {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.admin-tab:hover {
  border-color: rgba(201, 162, 39, 0.6);
}

.admin-tab.active {
  background: linear-gradient(135deg, #e0bd55, #b98c1d);
  border-color: transparent;
  color: #0b0f17;
  font-weight: 600;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-panel[hidden] {
  display: none;
}

[data-admin-panel] .grid {
  align-items: start;
}

#dispatch-feed .dispatch-row,
#pd-dispatch .dispatch-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#dispatch-feed .dispatch-row:last-child,
#pd-dispatch .dispatch-row:last-child {
  border-bottom: 0;
}

#recent-wins .t-main strong,
#admin-games .t-main {
  color: #f4e4a6;
}

#config-dirty,
#config-json-dirty {
  background: rgba(201, 162, 39, 0.18);
  border-color: rgba(201, 162, 39, 0.5);
}

.config-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.config-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0 8px;
}

.config-toolbar input,
.config-toolbar select {
  width: 100%;
}

.config-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.config-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.config-group[hidden] {
  display: none;
}

.config-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.config-group summary::-webkit-details-marker {
  display: none;
}

.config-group summary span:first-child::before {
  content: '\25B8';
  display: inline-block;
  margin-right: 8px;
  color: #c9a227;
  transition: transform 0.15s ease;
}

.config-group[open] summary span:first-child::before {
  transform: rotate(90deg);
}

.config-group-body {
  display: grid;
  padding: 0 14px 10px;
}

.config-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 260px);
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.config-option[hidden] {
  display: none;
}

.config-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.config-option-label {
  font-size: 14px;
}

.config-option-text code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 11px;
  color: #8b93a5;
  overflow-wrap: anywhere;
}

.config-option-help {
  font-size: 12px;
  color: #8b93a5;
}

.config-option-control {
  display: flex;
  justify-content: flex-end;
}

.config-option-control input[type="text"],
.config-option-control input[type="number"],
.config-option-control select {
  padding: 7px 9px;
  font-size: 13px;
}

.config-option-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #c9a227;
}

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

  .config-option {
    grid-template-columns: 1fr;
  }

  .config-option-control {
    justify-content: flex-start;
  }
}

#sound-toggle {
  margin-right: 8px;
}

@media (max-width: 720px) {
  .admin-tabs {
    gap: 6px;
  }

  .admin-tab {
    padding: 7px 11px;
    font-size: 12px;
  }
}

/* 5x3 slots */
.slots-jackpot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 8px 0 14px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.slots-jackpot strong {
  color: #f4e4a6;
  font-size: 18px;
  letter-spacing: 0;
}

.slots-reels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 0, rgba(201, 162, 39, 0.16), rgba(8, 11, 17, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slot-column {
  display: grid;
  gap: 6px;
}

.slot-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.slot-symbol.empty {
  opacity: 0.35;
}

.slot-symbol.win {
  border-color: rgba(224, 189, 85, 0.9);
  background: linear-gradient(160deg, rgba(224, 189, 85, 0.32), rgba(224, 189, 85, 0.08));
  box-shadow: 0 0 18px rgba(224, 189, 85, 0.35);
  transform: translateY(-2px);
}

.slot-symbol.sym-slot-jackpot {
  color: #ffe9a8;
  background: linear-gradient(160deg, rgba(201, 162, 39, 0.4), rgba(143, 47, 47, 0.35));
}

.slot-symbol.sym-slot-diamond { color: #bfe6ff; }
.slot-symbol.sym-slot-seven { color: #ffb3b3; }
.slot-symbol.sym-slot-bell { color: #ffe08a; }
.slot-symbol.sym-slot-cherry { color: #ff9b9b; }
.slot-symbol.sym-slot-clover { color: #a8e6b0; }
.slot-symbol.sym-slot-bar { color: #d8d8d8; }

.slots-reels.spinning .slot-symbol {
  animation: slot-blur 0.32s linear infinite;
}

@keyframes slot-blur {
  0% { transform: translateY(-2px); opacity: 0.7; }
  50% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(-2px); opacity: 0.7; }
}

.slots-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  min-height: 24px;
}

.win-pill {
  border-color: rgba(224, 189, 85, 0.6);
  color: #f4e4a6;
}

/* Roulette felt */
.roulette-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
}

.roulette-wheel-wrap {
  text-align: center;
}

.roulette-wheel-large {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  border: 8px solid #2a2115;
  background:
    radial-gradient(circle at 50% 50%, #10151f 0 34%, transparent 35%),
    repeating-conic-gradient(from -4.8deg, #8f2f2f 0deg 9.72deg, #14181f 9.72deg 19.44deg);
  box-shadow: inset 0 0 0 2px rgba(224, 189, 85, 0.4), 0 12px 30px rgba(0, 0, 0, 0.45);
}

.roulette-wheel-large:after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #e0bd55;
  box-shadow: 0 0 10px rgba(224, 189, 85, 0.8);
}

.roulette-landing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  color: #f4e4a6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.roulette-status {
  margin-top: 10px;
  font-size: 12px;
  color: #9aa4b2;
}

.roulette-felt {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0d3b2a, #092e21);
  border: 1px solid rgba(224, 189, 85, 0.35);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.35);
}

.felt-top {
  display: flex;
  gap: 6px;
}

.felt-zero {
  display: flex;
  width: 46px;
}

.felt-zero .felt-spot {
  flex: 1;
  min-height: 100%;
  font-size: 16px;
}

.felt-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}

.felt-spot {
  position: relative;
  min-height: 38px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #f7f3e8;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.felt-spot:hover {
  border-color: rgba(224, 189, 85, 0.75);
}

.felt-spot.red { background: #8f2f2f; }
.felt-spot.black { background: #151a22; }
.felt-spot.green { background: #2f7a4a; }

.felt-spot.has-chip {
  border-color: #e0bd55;
  box-shadow: 0 0 12px rgba(224, 189, 85, 0.45);
}

.felt-spot.wide {
  min-height: 34px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.felt-columns {
  display: grid;
  gap: 4px;
  width: 46px;
}

.felt-columns .felt-spot {
  min-height: 38px;
  font-size: 11px;
}

.felt-dozens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.felt-outside {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.chip-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e0bd55;
  color: #0b0f17;
  font-size: 10px;
  font-weight: 800;
}

.roulette-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  background: #151a22;
  color: #f7f3e8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  border-color: #e0bd55;
  background: radial-gradient(circle at 50% 40%, #3b3320, #151a22);
  box-shadow: 0 0 14px rgba(224, 189, 85, 0.45);
}

.roulette-result {
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roulette-result.red { color: #ff9b9b; }
.roulette-result.black { color: #cfd6e2; }
.roulette-result.green { color: #8ee3a4; }

@media (max-width: 820px) {
  .roulette-layout { grid-template-columns: 1fr; }
  .roulette-wheel-large { width: 160px; height: 160px; }
  .felt-grid { grid-template-columns: repeat(12, minmax(28px, 1fr)); overflow-x: auto; }
}

/* Chess clocks, captured tray and notation */
.chess-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.chess-clocks {
  display: flex;
  gap: 8px;
}

.clock-chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
}

.clock-chip.active {
  background: linear-gradient(135deg, #e0bd55, #b98c1d);
  border-color: transparent;
  color: #0b0f17;
}

.chess-captured {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #9aa4b2;
  margin: 8px 0;
}

.cap {
  display: inline-block;
  min-width: 16px;
  margin-left: 2px;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  color: #e9e2cf;
  font-style: normal;
  text-align: center;
}

.chess-notation {
  max-height: 110px;
  overflow: auto;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
}

.move-no {
  margin-right: 3px;
  color: #c9a227;
  font-weight: 700;
}

.move-san {
  margin-right: 7px;
  color: #e6e0d2;
}

/* Mines states */
.mine-cell.open {
  background: rgba(47, 122, 74, 0.28);
  border-color: rgba(110, 220, 150, 0.5);
}

.mine-cell.boom {
  background: rgba(143, 47, 47, 0.55);
  border-color: rgba(255, 120, 120, 0.6);
}

.mine-cell.hit {
  outline: 2px solid #e0bd55;
}

@media (max-width: 720px) {
  .slots-reels { gap: 4px; padding: 8px; }
  .slot-symbol { min-height: 48px; font-size: 10px; }
  .felt-spot { min-height: 32px; font-size: 10px; }
}

.roulette-bets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 26px;
}

.placed-bet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(224, 189, 85, 0.16);
  border: 1px solid rgba(224, 189, 85, 0.45);
  color: #f4e4a6;
  font-size: 11px;
  text-transform: capitalize;
}

.placed-bet strong {
  font-size: 11px;
}

.bet-remove {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #f4e4a6;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.bet-remove:hover {
  background: #8f2f2f;
  color: #fff;
}

/* ======================================================== theme foundation */

:root {
  --bg: #07080b;
  --panel: rgba(22, 24, 31, 0.96);
  --panel-deep: rgba(12, 13, 18, 0.98);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eceef3;
  --muted: #98a0b0;
  --accent: #e6c268;
  --accent-2: #b8863f;
  --accent-rgb: 230, 194, 104;
  --accent-2-rgb: 184, 134, 63;
  --glow: #1b3b6f;
  --glow-rgb: 27, 59, 111;
  --radius: 14px;
}

body {
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 10% -12%, rgba(var(--glow-rgb), 0.4), transparent 62%),
    radial-gradient(900px 520px at 94% 2%, rgba(var(--accent-rgb), 0.1), transparent 58%),
    linear-gradient(180deg, #0a0b0f 0%, #07080b 55%, #060709 100%);
  background-attachment: fixed;
  color: var(--text);
  letter-spacing: 0.005em;
}

.bg-orb,
.bg-grid {
  display: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

h1 {
  font-weight: 650;
}

.muted {
  color: var(--muted);
}

.gold {
  color: var(--accent);
}

.brand-text strong,
.section-head h1,
.hero h1,
.preview-title {
  background: linear-gradient(94deg, #f5f7fb 0%, var(--accent) 56%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* =============================================================== top chrome */

.topbar {
  gap: 14px;
  padding: 12px 24px;
  background: rgba(8, 9, 13, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), 0.45) 50%, transparent 100%);
  pointer-events: none;
}

.topbar .brand {
  min-width: 0;
}

.brand-mark {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.22);
  border-radius: 11px;
}

.brand-text span {
  color: rgba(var(--accent-rgb), 0.62);
  letter-spacing: 0.16em;
}

.account {
  margin-left: auto;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #dfe4ee;
  transition: transform 220ms ease, opacity 220ms ease;
}

.menu-toggle:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.42);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ================================================================== drawer */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 5, 8, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

body.drawer-open .drawer-scrim {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(318px, 86vw);
  padding: 20px 18px 22px;
  background: linear-gradient(180deg, #101218 0%, #0a0b0f 68%, #08090c 100%);
  border-right: 1px solid var(--line);
  box-shadow: 26px 0 70px rgba(0, 0, 0, 0.6);
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform 300ms cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s linear 300ms;
}

body.drawer-open .drawer {
  transform: none;
  visibility: visible;
  transition: transform 300ms cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-head .brand {
  flex: 1;
  min-width: 0;
}

.drawer-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #cfd6e2;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.09);
}

.drawer-label {
  margin: 2px 0 0;
  padding: 0 4px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7f8797;
}

.drawer .nav {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 4px;
  overflow: visible;
}

.drawer .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #aeb6c6;
  font-size: 14px;
  text-align: left;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.drawer .nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 150ms ease, box-shadow 150ms ease;
}

.drawer .nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #eef1f7;
}

.drawer .nav-link.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--accent);
}

.drawer .nav-link.active::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.drawer-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-note {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #7f8797;
}

.drawer-sign {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.55);
}

/* ============================================================ surfaces */

.shell {
  padding-top: 34px;
}

.glass {
  background: linear-gradient(168deg, var(--panel), var(--panel-deep));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
}

.card {
  padding: 24px 26px;
}

.card > h2 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9aa3b4;
}

.section-head {
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  margin-bottom: 0;
}

.hero {
  padding: 38px;
  border-radius: 16px;
  background: linear-gradient(152deg, rgba(24, 26, 34, 0.97), rgba(11, 12, 17, 0.98));
}

.hero h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
}

.hero:after {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.17), transparent 68%);
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.18em;
  opacity: 0.92;
}

.stat-value.gold {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================== controls */

.btn {
  border-radius: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-gold {
  color: #0b0c10;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.18);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: brightness(1.09);
}

.btn-ghost {
  color: #d7dce6;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.pill {
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: #b9c1cf;
}

.pill strong {
  color: var(--accent);
}

.chip.active,
.admin-tab.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.3);
}

input,
select,
textarea {
  background: #0b0d12;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #e9edf4;
  border-radius: 9px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.footer {
  border-top: 1px solid var(--line);
}

/* =============================================================== settings */

.profile-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-avatar {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #0b0c10;
  background-color: var(--accent);
  background-image: linear-gradient(140deg, var(--accent), var(--accent-2));
  background-size: cover;
  background-position: center;
}

.profile-block strong {
  display: block;
  font-size: 15px;
}

.profile-block p {
  margin: 2px 0 0;
}

.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.color-field span {
  font-size: 13px;
  color: #b7bfcd;
}

.color-field input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 54px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-field input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.preset {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: #dfe4ed;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.preset:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
}

.preset-swatch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--swatch-a), var(--swatch-b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.theme-preview {
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: radial-gradient(620px 240px at 0% 0%, rgba(var(--accent-rgb), 0.14), transparent 62%);
}

.preview-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.preview-title {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

@media (max-width: 720px) {
  .topbar {
    padding: 10px 14px;
    gap: 10px;
  }

  .account .btn.small {
    padding: 6px 9px;
  }

  .hero {
    padding: 26px;
  }

  .card {
    padding: 18px;
  }
}

/* Keep card rows from stretching short widgets to the tallest neighbour. */
.grid {
  align-items: start;
}

/* Drawer navigation must stay above the footer even when the old mobile
   navigation rule sets order: 3. */
.drawer {
  overflow-y: auto;
}

.drawer .nav {
  order: 0;
  width: 100%;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .topbar .brand-text,
  #account [data-goto="settings"] {
    display: none;
  }

  .topbar .brand {
    flex: 0 0 auto;
  }

  .account {
    gap: 8px;
  }

  .account .btn-gold {
    padding: 9px 12px;
    font-size: 13px;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: nowrap;
  }

  #account [data-goto="settings"] {
    display: none;
  }
}

/* The tall network pulse card pairs with the two short widgets stacked
   beside it, so no column is left with a large empty area. */
@media (min-width: 981px) {
  #view-overview .overview-top {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: stretch;
  }

  #view-overview .overview-top > .card:first-child {
    grid-row: span 2;
  }
}

/* ================================================= phone navigation */

/* Reels settle column by column so a spin reads as a spin. */
@keyframes slot-settle {
  from { transform: translateY(-14px); opacity: 0.25; }
  to { transform: none; opacity: 1; }
}

.slot-column.settle .slot-symbol {
  animation: slot-settle 240ms cubic-bezier(0.22, 0.9, 0.24, 1) backwards;
}

.tabbar {
  display: none;
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  /* The header keeps only the avatar so a phone has room for the bar. */
  .account-chip {
    padding: 3px;
    gap: 0;
  }

  .account-chip > div:not(.avatar-fallback) {
    display: none;
  }

  .account .btn {
    white-space: nowrap;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 4px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(7, 10, 17, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
  }

  .tabbar .tabbar-link {
    flex: 1 1 0;
    min-height: 54px;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #93a0b5;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
  }

  .tabbar .tabbar-link:hover {
    color: #e8edf7;
    background: rgba(255, 255, 255, 0.05);
  }

  .tabbar .tabbar-link.active {
    color: #f6e3a4;
    background: rgba(201, 162, 39, 0.14);
    border-color: rgba(201, 162, 39, 0.34);
  }

  /* Phones reach every view from the tab bar, so the hamburger goes away. */
  .menu-toggle {
    display: none;
  }

  .shell {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 24px;
  }

  .btn,
  .game-tab,
  .chip {
    min-height: 46px;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  /* Open tables scroll sideways instead of wrapping into three rows. */
  .game-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px 12px;
    padding: 0 14px 4px;
  }

  .game-tabs::-webkit-scrollbar {
    display: none;
  }

  .game-tab {
    flex: 0 0 auto;
  }

  .toast-stack {
    right: 12px;
    left: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: none;
  }
}

/* ============================================================ arcade floor */

.floor-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.floor-summary strong {
  color: var(--accent);
}

.floor-section {
  margin-bottom: 24px;
}

.floor-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.floor-head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.floor-head span {
  color: var(--muted);
  font-size: 12px;
}

.floor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.table-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.table-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
}

.table-card.active {
  border-color: rgba(var(--accent-rgb), 0.65);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.table-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.table-card-top strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
}

.table-presence {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.table-presence.busy {
  color: #0f2417;
  background: #7fd6a0;
  border-color: transparent;
  font-weight: 700;
}

.table-blurb {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.table-tag {
  color: var(--muted);
}

.table-open {
  color: var(--accent);
}

/* ken o */

.keno-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0;
}

.keno-cell {
  font: inherit;
  font-size: 12px;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.keno-cell:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.keno-cell.picked {
  color: #16181d;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.keno-cell.drawn {
  border-color: rgba(127, 214, 160, 0.55);
  color: var(--text);
}

.keno-cell.hit {
  background: #7fd6a0;
  border-color: #7fd6a0;
  color: #0f2417;
  font-weight: 700;
}

/* dice */

.dice-stage {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

.dice-face {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  border-radius: 16px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

/* baccarat */

.baccarat-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.baccarat-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.baccarat-side .cards {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.baccarat-side strong {
  font-size: 20px;
  color: var(--accent);
}

/* video poker */

.vp-hand {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin: 14px 0 10px;
}

.vp-card {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  background: transparent;
  border: 1px solid transparent;
  transition: border-color 120ms ease, background 120ms ease;
}

.vp-card .playing-card {
  width: 100%;
  min-width: 0;
  padding: 10px 4px;
}

.vp-card.held {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.08);
}

.vp-card.held .playing-card {
  box-shadow: 0 0 0 2px var(--accent);
}

.vp-card.held .vp-hold {
  color: var(--accent);
}

.vp-hold {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.vp-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 560px) {
  .floor-cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .keno-board {
    gap: 3px;
  }

  .keno-cell {
    padding: 7px 0;
    font-size: 11px;
  }

  .baccarat-table {
    grid-template-columns: 1fr;
  }
}

/* ============================================================== page layout */

/* Every page is a twelve column grid so the Developer panel can move and size
   its blocks. With no saved choices each block takes the full row. */
.view.active.layout-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--page-gap, 20px);
  align-items: start;
}

.view.layout-grid > * {
  grid-column: span 12;
  min-width: 0;
  margin-bottom: 0;
}

.view.layout-grid > .section-head {
  order: -1;
  margin-bottom: 2px;
}

.view.layout-grid > .grid {
  gap: var(--card-gap, 18px);
  margin-bottom: 0;
}

.layout-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 4px;
}

.layout-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.layout-row.dragging {
  opacity: 0.5;
}

.layout-row.drop-before {
  box-shadow: inset 0 2px 0 var(--accent);
}

.layout-grip {
  color: var(--muted);
  letter-spacing: 0.1em;
  cursor: grab;
  font-size: 11px;
}

.layout-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-name small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 10px;
}

.layout-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.layout-actions select {
  padding: 6px 8px;
  width: auto;
  min-width: 0;
  font-size: 12px;
}

.layout-actions .btn {
  padding: 6px 10px;
}

@media (max-width: 760px) {
  .view.layout-grid > * {
    grid-column: span 12 !important;
  }

  .layout-row {
    flex-wrap: wrap;
  }

  .layout-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.field.inline {
  flex: 0 1 auto;
  min-width: 120px;
  margin-bottom: 0;
}

.field.inline input,
.field.inline select {
  width: 100%;
  min-width: 0;
}

.layout-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px 26px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.layout-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line);
}

.layout-card-row .layout-name {
  font-size: 12px;
}

.layout-card-row .btn {
  padding: 4px 8px;
}

.layout-card-row.dragging {
  opacity: 0.5;
}

.layout-card-row.drop-before {
  box-shadow: inset 0 2px 0 var(--accent);
}

/* Card widths are column spans, so a narrow screen stacks them again. */
@media (max-width: 980px) {
  .view.layout-grid .grid > * {
    grid-column: span 1 !important;
  }
}

@media (max-width: 760px) {
  .layout-card-row {
    flex-wrap: wrap;
  }

  .layout-card-row .layout-name {
    flex: 1 1 100%;
    white-space: normal;
  }

  .layout-card-row .layout-actions {
    width: 100%;
  }
}

/* Page content: blocks the developer adds on top of a page. */
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  /* Keep the buttons beside the heading instead of under the blurb. */
  flex: 0 0 auto;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 12px;
}

.content-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.content-row.editing {
  border-color: rgba(230, 194, 104, 0.45);
}

.content-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.content-kind {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.content-name {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-fields {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.content-fields .field {
  margin-bottom: 10px;
}

.content-fields textarea {
  min-height: 74px;
  resize: vertical;
}

/* Free blocks live on the view itself, so it has to be the anchor. */
.view.layout-grid {
  position: relative;
}

.custom-block {
  grid-column: span 12;
  justify-self: start;
  min-width: 0;
  outline-offset: 6px;
}

.custom-block.editable {
  user-select: none;
}

.custom-block.editable:hover,
.custom-block.editable:focus,
.custom-block.editable:focus-within {
  outline: 1px dashed rgba(230, 194, 104, 0.55);
}

.custom-block.editable:focus-visible {
  outline: 2px solid var(--accent);
}

.custom-block.dragging {
  opacity: 0.94;
}

/* Handles are the only drag surface on touch, so the page still scrolls. */
.content-grip {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #14161c;
  color: #94a1b8;
  font-size: 10px;
  letter-spacing: -1px;
  line-height: 1;
  cursor: grab;
  opacity: 0;
  touch-action: none;
  transition: opacity 0.15s ease;
}

.custom-block:hover .content-grip,
.custom-block:focus .content-grip,
.custom-block:focus-within .content-grip,
.custom-block.free .content-grip {
  opacity: 1;
}

.content-grip:focus-visible {
  outline: 2px solid var(--accent);
}

.content-grip:active {
  cursor: grabbing;
}

.custom-block.free {
  position: absolute;
  z-index: 4;
  /* Let clicks reach the page under a placed block; the grip still takes input. */
  pointer-events: none;
}

.custom-block.free .content-grip {
  pointer-events: auto;
}

.custom-text p {
  margin: 0;
  font-family: var(--custom-font, inherit);
  font-size: var(--custom-size, 20px);
  font-weight: var(--custom-weight, 500);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.custom-text.gradient p {
  background: linear-gradient(var(--grad-angle, 90deg), var(--grad-from, #e6c268), var(--grad-to, #b8863f));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.custom-image {
  margin: 0;
}

.custom-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--custom-radius, 16px);
}

@media (max-width: 760px) {
  .content-name {
    flex: 1 1 100%;
    white-space: normal;
  }
}

/* Phones get the same undo controls, sized for a thumb. */
@media (max-width: 640px) {
  .panel-actions {
    width: 100%;
  }

  .panel-actions .btn {
    flex: 1 1 0;
    min-height: 44px;
  }
}
