:root {
  --gold: #e8c547;
  --gold-dim: #b8860b;
  --blood: #c4161c;
  --crimson: #7a0c12;
  --bg: #070605;
  --card: #120e0c;
  --elevated: #1a1410;
  --fg: #f4ead8;
  --muted: #b9a58a;
  --subtle: #7d6f5d;
  --line: color-mix(in oklab, var(--gold) 18%, transparent);
  --felt: #0c3b28;
  --felt-hi: #16543a;
  --rail: #3a2414;
  --display: "Oswald", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; border-color: var(--line); }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--bg); }
.display { font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; }
.gold { color: var(--gold); }
.blood { color: var(--blood); }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.mono { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; width: 100%; }
.glass { background: color-mix(in oklab, var(--card) 86%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--line); }
.nav-blur { position: fixed; inset: 0 0 auto; z-index: 50; min-height: 72px; height: auto; overflow: visible; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
header.nav-blur .inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); color: var(--gold); font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 0; background: transparent; }
nav.desk { display: none; gap: 12px; align-items: center; }
nav.desk a { font-size: 13px; font-weight: 600; color: var(--muted); }
nav.desk a:hover, nav.desk a.on { color: var(--gold); }
main { padding-top: 88px; min-height: 70vh; }
footer.site { border-top: 1px solid var(--line); padding: 40px 16px; margin-top: 48px; }
footer.site .inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 700; font-size: 14px; background: var(--gold); color: var(--bg); }
.btn:hover { background: var(--gold-dim); }
.btn.out { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 12px; }
input, select, textarea { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 12px; font: inherit; }
textarea { height: auto; min-height: 88px; padding: 10px 12px; }
.wallet-wrap { position: relative; }
.wallet-btn { font-family: var(--mono); font-size: 12px; }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(280px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; z-index: 60; display: none; }
.wallet-menu.open { display: block; }
.wallet-menu button { width: 100%; justify-content: flex-start; background: transparent; color: var(--fg); border: 0; min-height: 40px; border-radius: 8px; padding: 0 8px; text-align: left; }
.wallet-menu button:hover { background: var(--elevated); }
.wallet-menu .danger { color: #f87171; }
.hero { display: grid; gap: 40px; padding: 48px 0 32px; align-items: center; }
.hero h1 { font-family: var(--display); font-size: clamp(48px, 8vw, 80px); line-height: .95; margin: 8px 0; text-transform: uppercase; }
.hero p.lead { max-width: 440px; color: var(--muted); }
.logo-aura {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
}
.logo-aura img {
  width: min(540px, 100%);
  height: auto;
}
.grid-2 { display: grid; gap: 16px; }
.grid-4 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.card { border-radius: 16px; padding: 20px; }
.troop img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 16px; border: 1px solid color-mix(in oklab, var(--gold) 20%, transparent); }
.felt-card { display: block; min-height: 150px; border-radius: 20px; padding: 20px; background: radial-gradient(90% 80% at 50% 0%, var(--felt-hi), var(--felt)); border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent); }
.felt { position: relative; min-height: 520px; overflow: hidden; border-radius: 999px; background: radial-gradient(80% 70% at 50% 45%, var(--felt-hi) 0%, var(--felt) 58%, #071910 100%); box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--gold) 55%, transparent), inset 0 0 90px rgb(0 0 0 / .45); padding: 20px 12px 28px; }
.felt-rail { position: absolute; inset: 14px; border-radius: 999px; border: 10px solid var(--rail); pointer-events: none; z-index: 1; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; z-index: 2; }
.seat { border-radius: 12px; background: rgb(7 6 5 / .7); padding: 10px; text-align: center; border: 1px solid color-mix(in oklab, var(--gold) 20%, transparent); }
.seat.turn { border-color: var(--gold); }
.seat img.pfp { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; margin: 0 auto; }
.cards { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.cards img { height: 56px; border-radius: 4px; }
.board { display: flex; justify-content: center; gap: 8px; position: relative; z-index: 2; padding-top: 40px; }
.board img { height: 84px; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tabs button { min-height: 44px; border-radius: 999px; border: 0; padding: 0 16px; background: var(--elevated); color: var(--muted); font-weight: 700; }
.tabs button.on { background: var(--gold); color: var(--bg); }
.id-stage { perspective: 1400px; }
.id-card { transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -10deg)); transform-style: preserve-3d; transition: transform 160ms cubic-bezier(.22,1,.36,1); }
.id-face { border-radius: 16px; padding: 20px; border: 1px solid var(--gold); background: radial-gradient(120% 80% at 20% 0%, color-mix(in oklab, var(--blood) 35%, transparent), transparent 50%), linear-gradient(160deg, #2a1a12, #0d0a08 60%); box-shadow: 0 0 32px color-mix(in oklab, var(--gold) 28%, transparent); }
.xp-bar { height: 10px; border-radius: 999px; background: color-mix(in oklab, var(--gold) 12%, transparent); overflow: hidden; }
.xp-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blood), var(--gold)); }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; margin-top: 16px; }
.stats div { background: rgb(7 6 5 / .4); border-radius: 8px; padding: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--subtle); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 12px 16px; background: var(--elevated); }
.table td { padding: 12px 16px; border-top: 1px solid color-mix(in oklab, var(--gold) 10%, transparent); }
.ape { display: flex; align-items: center; gap: 12px; }
.ape img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.ape b { display: inline-flex; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 10px 12px; background: var(--elevated); border: 0; color: var(--muted); font-weight: 700; font-size: 12px; min-height: 44px; }
.chip.on { background: var(--gold); color: var(--bg); }
.trait { border-radius: 12px; padding: 12px; text-align: left; background: var(--card); border: 1px solid color-mix(in oklab, var(--gold) 15%, transparent); color: var(--fg); }
.trait.on { border-color: var(--gold); background: color-mix(in oklab, var(--gold) 10%, transparent); }
.rank-marquee { overflow: hidden; border-block: 1px solid var(--line); background: color-mix(in oklab, var(--elevated) 40%, transparent); padding: 18px 0; }
.rank-track { display: flex; width: max-content; animation: marquee 80s linear infinite; }
.rank-track span { padding: 0 24px; color: color-mix(in oklab, var(--gold) 80%, transparent); font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; }
.level-up { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in oklab, var(--bg) 55%, transparent); backdrop-filter: blur(8px); }
.level-up-card { min-width: 280px; border-radius: 24px; padding: 32px 40px; text-align: center; background: var(--card); border: 1px solid var(--gold); }
.mob-nav { display: none; flex-direction: column; border-top: 1px solid var(--line); padding: 4px 16px 12px; background: color-mix(in oklab, var(--bg) 96%, transparent); }
.mob-nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 4px; font-weight: 700; border-bottom: 1px solid var(--line); color: var(--fg); }
.mob-nav a:last-child { border-bottom: 0; }
.hidden { display: none !important; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (min-width: 800px) {
  nav.desk { display: flex; }
  .hero { grid-template-columns: 1fr 1fr; padding: 72px 0 40px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .menu-btn { display: none; }
  .mob-nav { display: none !important; }
  .seats { display: none; }
  .seats-abs { display: block; }
}
@media (max-width: 799px) {
  .seats-abs { display: none; }
  .menu-btn { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--fg); font-size: 20px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .mob-nav:not(.hidden) { display: flex; }
}
.seats-abs { position: absolute; inset: 0; pointer-events: none; }
.seats-abs .seat-pos { position: absolute; width: 148px; transform: translate(-50%, -50%); pointer-events: auto; }
.s0 { left: 50%; top: 86%; }
.s1 { left: 86%; top: 58%; }
.s2 { left: 72%; top: 14%; }
.s3 { left: 28%; top: 14%; }
.s4 { left: 14%; top: 58%; }
@media (prefers-reduced-motion: reduce) {
  .rank-track, .id-card { animation: none !important; transition: none !important; }
}

.pfp-cube {
  width: 48px; height: 48px; object-fit: cover; flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 1px #000, 0 0 10px color-mix(in oklab, var(--blood) 45%, transparent);
  background: #1a1410;
}
.pfp-cube.lg { width: 72px; height: 72px; border-radius: 10px; }
.ape img.pfp-cube { width: 44px; height: 44px; border-radius: 8px; }
.ape img.lb-flag { width: 22px; height: 16px; border-radius: 2px; }
.seat img.pfp, .seat .pfp-cube { width: 40px; height: 40px; border-radius: 8px; margin: 0 auto; border: 2px solid var(--gold); box-shadow: 0 0 0 1px #000; }

.table-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 980px) {
  .table-stage { grid-template-columns: 1fr; }
}
.felt-logo {
  position: absolute; left: 50%; top: 46%;
  width: 168px; height: 168px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  opacity: .22;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / .55));
}
.pit-chat {
  display: flex; flex-direction: column;
  min-height: 420px; max-height: 640px;
  border-radius: 22px;
  background: linear-gradient(180deg, #2a1810 0%, #140c0a 100%);
  border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,220,160,.12);
  overflow: hidden;
}
.pit-chat h3 {
  margin: 0; padding: 12px 14px 10px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid color-mix(in oklab, var(--gold) 25%, transparent);
  background: rgba(80,20,16,.35); font-family: var(--display);
}
#chatLog {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 180px;
}
.chat-row { display: flex; gap: 8px; align-items: flex-start; }
.chat-row .pfp-cube { width: 28px; height: 28px; border-width: 1px; }
.chat-row .pfp.ph {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 900;
  color: var(--gold); background: #3a2418; border: 1px solid var(--gold);
}
.chat-bubble { flex: 1; min-width: 0; }
.chat-bubble .who { font-size: 10px; font-weight: 800; color: #c49a4a; }
.chat-bubble .txt { font-size: 13px; color: #f3ead8; line-height: 1.35; word-wrap: break-word; white-space: pre-wrap; }
.chat-emoji { display: none; flex-wrap: wrap; gap: 4px; padding: 4px 10px 8px; }
.chat-emoji.open { display: flex; }
.chat-emoji button {
  width: 36px; height: 36px; border-radius: 8px; font-size: 18px;
  background: transparent; border: 0; color: var(--fg);
}
.chat-emoji button:hover { background: color-mix(in oklab, var(--gold) 15%, transparent); }
.pit-chat-form {
  display: flex; gap: 6px; padding: 8px 10px 12px; align-items: center;
  border-top: 1px solid color-mix(in oklab, var(--gold) 20%, transparent);
}
.pit-chat-form input {
  flex: 1; min-width: 0; border-radius: 12px; padding: 10px 12px; height: 44px;
  background: rgba(0,0,0,.45); border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent);
  color: #f3ead8; font-size: 13px;
}
.pit-chat-form input:focus { outline: none; border-color: var(--gold); }
.pit-chat-form button.send {
  padding: 10px 14px; border-radius: 12px; font-weight: 800; font-size: 12px;
  background: var(--gold); color: var(--bg); letter-spacing: .06em; text-transform: uppercase; border: 0; min-height: 44px;
}
.pit-chat-form button.emo {
  width: 44px; height: 44px; border-radius: 12px; font-size: 18px;
  background: rgba(0,0,0,.35); border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent); color: var(--fg);
}
.chat-hint { font-size: 10px; color: #8a7460; padding: 0 12px 10px; }

.gtd-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (min-width: 960px) { .gtd-grid { grid-template-columns: 1fr 1fr 1fr; } }
.gtd-card { border-radius: 16px; padding: 16px; border: 1px solid var(--line); background: var(--card); min-width: 0; overflow: hidden; }
.gtd-card.ok { border-color: var(--gold); box-shadow: 0 0 18px color-mix(in oklab, var(--gold) 18%, transparent); }
.gtd-card .n { font-family: var(--display); font-size: 32px; color: var(--gold); }
.serum-hero { display: flex; gap: 16px; align-items: center; }
.serum-hero img { width: 88px; height: 130px; object-fit: contain; filter: drop-shadow(0 0 16px color-mix(in oklab, var(--gold) 50%, transparent)); }
.level-up-card img.serum-drop { width: 72px; height: 108px; object-fit: contain; margin: 8px auto; }
.ape-stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent); background: #0b0908; }
.ape-stage canvas, .ape-stage img#apeImg { width: 100%; height: auto; display: block; }
.trait { display: flex; flex-direction: column; gap: 6px; min-height: 44px; }
.trait img.thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #0b0908; }
.inv-item { display: flex; gap: 14px; align-items: center; }
.mut-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 12px; }
.mut-ape .btn { width: 100%; margin-top: 8px; }
.mut-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid color-mix(in oklab, var(--gold) 12%, transparent); flex-wrap: wrap; }
.admin-grid { display: grid; gap: 16px; }
@media (min-width: 980px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-card h2 { font-size: 28px; margin: 4px 0 8px; }
.admin-log { margin-top: 12px; max-height: 420px; overflow: auto; display: grid; gap: 0; }
.log-row { display: grid; grid-template-columns: 72px 72px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid color-mix(in oklab, var(--gold) 12%, transparent); font-size: 13px; }
.log-row time { color: var(--subtle); font-family: var(--mono); font-size: 11px; }
.log-row b { color: var(--gold); font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.log-row span { color: var(--muted); overflow-wrap: anywhere; }
.ban-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid color-mix(in oklab, var(--gold) 12%, transparent); }
.ban-who { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ban-who b { color: var(--gold); font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; font-size: 15px; line-height: 1.15; overflow-wrap: anywhere; }
.ban-who .mono { color: var(--subtle); font-size: 12px; line-height: 1.2; }
.ban-row .btn { flex: 0 0 auto; margin: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .log-row { grid-template-columns: 64px minmax(0, 1fr); }
  .log-row b { grid-column: 2; }
  .log-row span { grid-column: 2; }
}
.serum-hero img.potara, .level-up-card img.potara { width: 96px; height: 96px; object-fit: contain; }
.serum-hero img.lava, .level-up-card img.lava { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 0 16px rgb(255 90 0 / .55)); }
.item-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .item-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .item-row { grid-template-columns: 1fr 1fr 1fr; } }
.ape-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); margin-top: 16px; }
.ape-tile { border: 1px solid var(--line); border-radius: 16px; padding: 8px; background: #0b0908; min-width: 0; }
.ape-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #070605; display: block; }
.ape-tile b { display: block; margin-top: 8px; font-family: var(--display); color: var(--gold); }
.ape-tile .subtle { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ape-tile.serum { border-color: var(--gold); box-shadow: 0 0 16px color-mix(in oklab, var(--gold) 28%, transparent); }
.ape-tile.lava { border-color: #ff6a1a; box-shadow: 0 0 16px rgb(255 90 0 / .35); }
.ape-tile.keep { outline: 2px solid #7dffb3; }
.ape-tile.burn { outline: 2px solid #e23b32; }
.ape-acts { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.ape-acts button { flex: 1 1 46%; min-width: 0; height: 22px; padding: 0 2px; border-radius: 6px; border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent); background: transparent; color: var(--fg); font-size: 9px; font-weight: 700; letter-spacing: 0; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.ape-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.ape-pager:empty { display: none; }
.ape-pager span { font-size: 13px; color: var(--muted); }
.ape-pager button:disabled { opacity: .35; }
.fuse-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bj-res { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bj-res.win, .bj-res.blackjack { color: var(--gold); }
.bj-res.bust, .bj-res.lose { color: #f87171; }
.bj-res.push { color: var(--muted); }
.hint-line { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; position: relative; z-index: 2; }

/* —— Wallet menu —— */
.wallet-menu { width: min(280px, calc(100vw - 24px)); padding: 14px; }
.wm-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.wm-head .pfp-cube { width: 44px; height: 44px; }
.wm-head .who { min-width: 0; }
.wm-head .who p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#menuHandle { font-weight: 700; font-size: 14px; color: var(--gold); }
#menuLevel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
#menuPape { font-size: 16px; margin: 0 0 6px; }
.wallet-menu hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

/* —— Credit-card identity (ISO/IEC 7810 ID-1 ≈ 1.586:1) —— */
.id-stage { perspective: 1400px; max-width: 480px; width: 100%; }
.id-card {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -10deg));
  transform-style: preserve-3d;
  transition: transform 160ms cubic-bezier(.22,1,.36,1);
}
.id-face {
  height: 100%;
  border-radius: 14px;
  padding: 14px 18px 12px;
  border: 1px solid var(--gold);
  background:
    radial-gradient(120% 90% at 8% 0%, color-mix(in oklab, var(--blood) 42%, transparent), transparent 48%),
    linear-gradient(160deg, #2c1a12 0%, #0c0908 62%);
  box-shadow: 0 0 28px color-mix(in oklab, var(--gold) 26%, transparent), inset 0 1px 0 color-mix(in oklab, var(--gold) 35%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.id-top { display: flex; justify-content: space-between; align-items: center; }
.id-mark {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.id-chip {
  width: 28px; height: 20px; border-radius: 4px;
  background: linear-gradient(135deg, #f3e2a0, #b8860b 45%, #f6e7b0 70%, #8a6a12);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}
.id-flag-wrap {
  width: 44px; height: 32px; border-radius: 4px; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent);
  background: #1a1410; flex-shrink: 0;
  box-shadow: 0 0 0 1px #000;
}
.id-flag-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-country { font-size: 12px; color: var(--muted); margin: 4px 0 0; display: flex; align-items: center; gap: 6px; }
.id-country img, .lb-flag {
  width: 22px; height: 16px; border-radius: 2px; object-fit: cover; flex-shrink: 0;
  border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent);
}
.id-mid { display: flex; gap: 12px; align-items: center; min-height: 0; }
.id-who { min-width: 0; }
.id-who .display { font-size: clamp(18px, 3.2vw, 26px); margin: 0; line-height: 1.05; }
.id-handle { font-size: 13px; margin: 2px 0 0; color: var(--gold); }
.id-bot { display: flex; flex-direction: column; gap: 6px; }
.id-rank { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; align-items: baseline; }
.id-foot { display: flex; align-items: baseline; gap: 8px; font-size: 11px; }
.id-foot .display { font-size: 18px; }
.id-foot #cardWallet { margin-left: auto; font-size: 9px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }

/* —— Dashboard layout —— */
.dash-page { padding-top: 104px; padding-bottom: 72px; max-width: 1280px; }
.dash-shell {
  display: grid;
  gap: 18px;
  align-items: start;
  min-width: 0;
}
.dash-main { min-width: 0; max-width: 100%; }
@media (min-width: 960px) {
  .dash-shell { grid-template-columns: 220px minmax(0, 1fr); }
}
.dash-nav-box {
  border-radius: 20px;
  padding: 12px 10px 14px;
}
@media (min-width: 960px) {
  .dash-nav-box { position: sticky; top: 92px; }
}
.dash-nav-box .panel-kicker { padding: 6px 12px 8px; }
#dashNav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
}
@media (min-width: 960px) {
  #dashNav { flex-direction: column; overflow: visible; }
}
.dash-nav {
  display: block;
  width: auto;
  flex: 0 0 auto;
  text-align: left;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.dash-nav .sub {
  display: none;
  font-size: 10px;
  color: var(--subtle);
  font-weight: 400;
  margin-top: 2px;
  white-space: normal;
}
@media (min-width: 960px) {
  .dash-nav { width: 100%; white-space: normal; }
  .dash-nav .sub { display: block; }
}
.dash-nav:hover { color: var(--gold); background: color-mix(in oklab, var(--gold) 8%, transparent); }
.dash-nav.on { background: color-mix(in oklab, var(--gold) 16%, transparent); color: var(--gold); font-weight: 800; }
.dash-nav.on .sub { color: color-mix(in oklab, var(--gold) 70%, transparent); }
.dash-pane.hidden { display: none !important; }
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 22px; }
.dash-top h1 { font-size: clamp(32px, 5vw, 44px); margin: 4px 0 0; }
.kicker { font-family: var(--display); color: var(--gold); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin: 0; }
.dash-lede { max-width: 320px; font-size: 14px; }
.dash-hero {
  display: grid;
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}
@media (min-width: 900px) {
  .dash-hero { grid-template-columns: minmax(280px, 480px) minmax(0, 1fr); }
}
.dash-side { display: grid; gap: 12px; }
.dash-side .panel { position: relative; z-index: 1; }
.dash-side .panel.country-open { z-index: 40; }
.panel { border-radius: 18px; padding: 16px 18px; }
.panel-kicker { font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.panel select, .panel .btn { margin-top: 10px; }
.country-picker { position: relative; margin-top: 10px; }
.country-btn {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; text-align: left;
}
.country-btn-flag {
  width: 28px; height: 20px; border-radius: 3px; overflow: hidden; flex-shrink: 0;
  background: var(--elevated); border: 1px solid color-mix(in oklab, var(--gold) 25%, transparent);
}
.country-btn-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.country-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 8px;
}
.country-menu input {
  width: 100%; height: 40px; margin: 0 0 8px;
}
.country-list {
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
}
.country-opt {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 6px 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--fg); font: inherit; text-align: left;
}
.country-opt:hover, .country-opt.on { background: var(--elevated); color: var(--gold); }
.country-opt img {
  width: 22px; height: 16px; border-radius: 2px; object-fit: cover; flex-shrink: 0;
  border: 1px solid color-mix(in oklab, var(--gold) 22%, transparent);
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0 28px;
}
@media (min-width: 800px) { .metric-row { grid-template-columns: repeat(4, 1fr); } }
.metric {
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.metric .n { font-family: var(--display); font-size: 28px; color: var(--gold); margin: 4px 0 0; line-height: 1; }
.sec-head { margin-bottom: 12px; }
.sec-head h2 { font-size: 18px; margin: 0 0 4px; }

.tree-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.tree-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .tree-shell { grid-template-columns: 1fr; } }
.tree-stage {
  position: relative;
  min-height: 520px;
  height: min(70vh, 640px);
  border-radius: 18px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(1200px 400px at 50% 0%, color-mix(in oklab, var(--gold) 8%, transparent), transparent 55%),
    var(--card);
}
.tree-stage:active { cursor: grabbing; }
.tree-board {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.tree-lines { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.tree-dot {
  position: absolute; z-index: 2;
  width: 80px; height: 80px;
  transform: translate(-50%, -50%);
  background: transparent; border: 0; padding: 0; cursor: pointer;
}
.tree-dot.you { width: 96px; height: 96px; }
.tree-dot .ring {
  display: block; width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0c0a08;
  border: 2px solid color-mix(in oklab, var(--gold) 70%, #fff);
  box-shadow: 0 8px 24px rgb(0 0 0 / .45), inset 0 0 0 1px rgb(0 0 0 / .4);
  clip-path: circle(50%);
}
.tree-dot.you .ring {
  border-color: var(--blood);
  box-shadow: 0 0 0 3px var(--gold), 0 10px 28px rgb(0 0 0 / .5);
}
.tree-dot .ring img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 50%;
  clip-path: circle(50%);
  display: block;
}
.tree-dot .flag {
  position: absolute; right: -2px; bottom: -2px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  overflow: hidden; border: 2px solid #0c0a08;
  background: #1a1410; pointer-events: none;
}
.tree-dot .flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tree-dot.on .ring, .tree-dot:hover .ring {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 0 0 22px color-mix(in oklab, var(--gold) 45%, transparent);
}
.tree-dot:hover { z-index: 4; }
.tree-empty { position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); max-width: 320px; color: var(--muted); font-size: 13px; z-index: 5; pointer-events: none; text-align: center; }
.tree-empty.hidden { display: none; }
.tree-tools {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  display: flex; gap: 6px;
}
.tree-tools button {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: rgb(7 6 5 / .8);
  color: var(--gold); font-size: 18px; font-weight: 700;
}
.tree-tools button:hover { background: var(--elevated); }
.tree-nav-hint {
  position: absolute; left: 14px; top: 14px; z-index: 6;
  margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--subtle); pointer-events: none;
}
.tree-inspect { border-radius: 18px; padding: 22px; min-height: 280px; }
.tree-inspect .insp-pfp {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); margin: 0 auto 14px; display: block; background: #1a1410;
  clip-path: circle(50%);
}
.tree-inspect h3 { text-align: center; margin: 0 0 14px; }
.insp-rows { display: grid; gap: 8px; }
.insp-rows a { color: var(--gold); }
.insp-rows div {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: var(--elevated);
  font-size: 13px;
}
.insp-rows b { color: var(--gold); font-weight: 700; text-align: right; }

/* —— Casino table (photo felt + 5 seats) —— */
.pit-page { padding-top: 100px; padding-bottom: 40px; max-width: 1280px; }
.pit-hud {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; align-items: center;
}
.pit-hud .hud-mid { display: flex; gap: 10px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--gold) 22%, transparent);
  background: rgba(0,0,0,.4);
  font-size: 12px; font-weight: 700;
}
.clock-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 14px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent);
  background: #120e0c;
  min-width: 132px;
}
.clock-lab {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.clock-num { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--gold); min-width: 1.4em; text-align: right; }
.clock-chip.hot { border-color: #f87171; }
.clock-chip.hot .clock-num { color: #f87171; }
.felt-clock {
  position: absolute; left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  z-index: 6; text-align: center; pointer-events: none;
  min-width: 120px;
}
.felt-clock-label {
  display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 2px;
  text-shadow: 0 2px 8px #000;
}
.felt-clock-num {
  display: block; font-family: var(--display); font-size: 52px; line-height: .9;
  color: #fff6d0; text-shadow: 0 0 18px rgba(232,197,71,.55), 0 4px 12px #000;
}
.felt-clock.hot .felt-clock-num { color: #fca5a5; text-shadow: 0 0 18px rgba(248,113,113,.55); }
.felt-clock.idle { opacity: .35; }
.win-banner {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  z-index: 8; text-align: center; pointer-events: none;
  min-width: min(420px, 86%);
  padding: 16px 22px;
  border-radius: 18px;
  background: rgba(7,6,5,.9);
  border: 1px solid var(--gold);
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.win-banner .win-head {
  font-family: var(--display); font-size: 22px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 6px;
}
.win-banner .win-hand { margin: 0; color: var(--fg); font-size: 16px; font-weight: 700; }
.win-banner .win-next { margin: 8px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.table-wrap .seat.winner { border-color: var(--gold); box-shadow: 0 0 22px color-mix(in oklab, var(--gold) 55%, transparent); }
.seat-hand { font-size: 11px; color: var(--gold); margin: 4px 0 0; font-weight: 700; }
.seat-win { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 2px 0 0; }
.pit-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 980px) { .pit-stage { grid-template-columns: 1fr; } }

.table-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 880;
  min-height: 380px;
  background: #050505;
  overflow: hidden;
}
.felt-art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
.dealer-spot {
  position: absolute;
  left: 50%; top: 7%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  min-width: 240px;
}
.dealer-label {
  font-family: var(--display);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 6px; font-weight: 600;
}
.dealer-meta { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.table-status { display: none; }
.poker-board .table-status { top: auto; }

.seats-stack { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.table-wrap .seat {
  position: absolute;
  pointer-events: auto;
  width: 168px;
  min-height: 118px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(7,6,5,.72);
  border: 1px solid color-mix(in oklab, var(--gold) 28%, transparent);
  backdrop-filter: blur(6px);
  text-align: center;
}
.table-wrap .seat.you { border-color: var(--gold); box-shadow: 0 0 18px color-mix(in oklab, var(--gold) 28%, transparent); }
.table-wrap .seat.turn { border-color: var(--gold); box-shadow: 0 0 22px color-mix(in oklab, var(--gold) 45%, transparent); }
.table-wrap .seat.empty { background: transparent; border: 0; box-shadow: none; min-height: 0; padding: 0; }
.sit-btn {
  width: 72px; height: 72px; border-radius: 999px;
  border: 2px dashed color-mix(in oklab, var(--gold) 55%, transparent);
  background: rgba(7,6,5,.35);
  color: var(--gold);
  font-family: var(--display);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.sit-btn:hover { background: color-mix(in oklab, var(--gold) 16%, transparent); }

/* 5 seats on the gold rings of table.png (skip top-center = dealer) */
.seat0 { left: 3%; top: 42%; }
.seat1 { left: 12%; bottom: 6%; }
.seat2 { left: 50%; bottom: 2%; transform: translateX(-50%); }
.seat3 { right: 12%; bottom: 6%; left: auto; }
.seat4 { right: 3%; top: 42%; left: auto; }

.seat-top { display: flex; gap: 8px; align-items: center; text-align: left; }
.seat-name { font-size: 12px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.seat-stack { font-family: var(--mono); font-size: 10px; color: var(--gold); margin: 0; }
.seat-tag { font-size: 10px; color: var(--subtle); margin-top: 6px; letter-spacing: .12em; text-transform: uppercase; }
.house-tag { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.hand { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: flex-end; min-height: 52px; }
.bj-card {
  width: 42px; height: 62px; border-radius: 5px; overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
  background: #f7f4ee;
}
.bj-card.fresh { animation: dealIn .35s cubic-bezier(.2,.8,.2,1) both; }
.bj-card img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.dealer-spot .bj-card { width: 52px; height: 78px; }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-18px) rotate(-8deg) scale(.86); }
  to { opacity: 1; transform: none; }
}

.bet-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 12px; }
.chip-btn {
  min-width: 56px; min-height: 44px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  background: radial-gradient(circle at 30% 30%, #3a2414, #1a100c);
  color: var(--gold); font-weight: 800; font-family: var(--mono); font-size: 12px;
}
.chip-btn.on { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.actions button:disabled { opacity: .35; }

@media (max-width: 860px) {
  .table-wrap { aspect-ratio: auto; min-height: 720px; }
  .seats-stack { position: relative; inset: auto; padding: 8px 8px 12px; display: grid; gap: 8px; }
  .table-wrap .seat {
    position: relative !important; left: auto !important; right: auto !important;
    top: auto !important; bottom: auto !important; transform: none !important;
    width: 100%;
  }
  .dealer-spot { position: relative; left: auto; top: auto; transform: none; padding: 12px 0 8px; }
  .table-status { position: relative; left: auto; top: auto; transform: none; max-width: none; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .bj-card { animation: none; }
}

.lvl-task .lvl-bar, .lvl-bar {
  height: 8px; border-radius: 999px; background: color-mix(in oklab, var(--gold) 12%, transparent);
  overflow: hidden; margin-top: 12px;
}
.lvl-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blood), var(--gold)); }
.lvl-task.ok { border: 1px solid var(--gold); }

.mint-page {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 112px 20px 64px;
  box-sizing: border-box;
}
body[data-page="mint"] { overflow-x: hidden; }
.mint-steps { padding: 0; list-style: none; margin: 12px 0 0; display: grid; gap: 14px; }
.mint-step { max-width: 100%; overflow: hidden; }
.mint-check { display: flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 10px; }
.mint-copy {
  white-space: pre-wrap; margin: 12px 0 0; padding: 14px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.45; color: var(--fg); word-break: break-word;
}
.campaign-wrap {
  margin-top: 12px; border-radius: 16px; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--gold) 28%, transparent);
  background: #0b0908; max-width: 100%;
}
.campaign-wrap canvas {
  width: 100% !important; height: auto !important; display: block; max-width: 100%;
}
.drop-post {
  display: flex; gap: 12px; align-items: center;
  margin-top: 12px; padding: 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg);
}
.drop-post img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 10px; flex-shrink: 0;
}
.drop-post:hover { border-color: var(--gold); }

/* —— Phone only. Desktop card stays 480px with 3D tilt. —— */
@media (max-width: 799px) {
  .dash-page,
  .dash-shell,
  .dash-main,
  .dash-hero,
  .dash-side,
  .panel,
  .glass,
  .gtd-grid,
  .metric-row,
  .id-stage,
  .wrap {
    max-width: 100%;
    min-width: 0;
  }
  #dashNav {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .id-stage {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    perspective: none;
  }
  .id-card {
    transform: none !important;
  }
  .pfp-cube.lg { width: 52px; height: 52px; }
  .id-face { padding: 12px 14px 10px; }
  .id-who .display { font-size: 20px; }
  .gtd-grid { grid-template-columns: minmax(0, 1fr); }
  .gtd-card .muted,
  .gtd-card .subtle { overflow-wrap: anywhere; word-break: break-word; }
  .table { width: 100%; }
  .dash-top h1 { font-size: 32px; }
  .dash-lede { max-width: 100%; }
  .panel { padding: 14px; }
  .metric .n { font-size: 22px; }
  .refUrl, #refUrl { overflow-wrap: anywhere; }
}

.wp-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgb(0 0 0 / .62);
  display: grid; place-items: center;
  padding: 16px;
}
.wp-sheet {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  display: flex; flex-direction: column;
  background: #120e0c;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgb(0 0 0 / .55);
}
.wp-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 18px 0; }
.wp-head h2 { margin: 4px 0 0; font-size: 28px; }
.wp-x {
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: var(--elevated); color: var(--gold); font-size: 28px; line-height: 1;
}
.wp-lede { margin: 8px 18px 0; font-size: 13px; }
.wp-search { margin: 14px 18px 8px; width: calc(100% - 36px); }
.wp-scroll { overflow: auto; padding: 8px 18px 18px; }
.wp-sec {
  margin: 14px 0 8px; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
}
.wp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .wp-grid { grid-template-columns: 1fr; } }
.wp-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 56px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--elevated); color: var(--fg);
}
.wp-card:hover, .wp-card.in { border-color: var(--gold); }
.wp-card b { display: block; font-size: 13px; }
.wp-card em { display: block; font-style: normal; font-size: 11px; color: var(--subtle); }
.wp-card.in em { color: var(--gold); }
.wp-ico {
  width: 36px; height: 36px; border-radius: 10px; overflow: hidden;
  background: #0b0908; flex: none; position: relative;
}
.wp-ico img { width: 100%; height: 100%; object-fit: cover; }
.wp-ico i {
  display: none; place-items: center; position: absolute; inset: 0;
  font-family: var(--display); color: var(--gold); font-size: 16px;
}
.wp-wc {
  display: flex; align-items: center; gap: 12px; text-align: left;
  margin: 12px 18px 0; width: calc(100% - 36px); min-height: 64px;
  padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--gold); background: #1c1612; color: var(--fg);
}
.wp-wc b { display: block; font-size: 15px; }
.wp-wc em { display: block; font-style: normal; font-size: 12px; color: var(--subtle); }
.wp-phones { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 18px 0; }
.wp-phone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 78px; padding: 10px 6px; border-radius: 14px; text-decoration: none;
  border: 1px solid var(--gold); background: #1c1612; color: var(--fg);
}
.wp-phone img { width: 28px; height: 28px; border-radius: 8px; }
.wp-phone b { font-size: 12px; font-weight: 700; }

.crash-page { padding-top: 96px; padding-bottom: 48px; }
.crash-layout { display: grid; gap: 16px; }
@media (min-width: 980px) {
  .crash-layout { grid-template-columns: 1fr 320px; align-items: start; }
}
.crash-stage {
  position: relative; border-radius: 20px; overflow: hidden; min-height: 420px;
  background:
    radial-gradient(80% 60% at 50% 100%, #1a3a22 0%, transparent 55%),
    linear-gradient(180deg, #1b120c 0%, #070605 70%);
  border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent);
}
.crash-stage canvas { width: 100%; height: 460px; display: block; }
.crash-mult {
  position: absolute; left: 20px; top: 16px; z-index: 2;
  font-family: var(--display); font-size: clamp(56px, 8vw, 92px); line-height: .9;
  color: var(--gold); text-shadow: 0 8px 30px rgb(0 0 0 / .55);
}
.crash-stage.bust .crash-mult { color: var(--blood); }
.crash-phase {
  position: absolute; right: 16px; top: 18px; z-index: 2;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.crash-hist { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.crash-hist span {
  font-family: var(--mono); font-size: 12px; padding: 4px 8px; border-radius: 999px;
  background: var(--elevated); border: 1px solid var(--line);
}
.crash-hist .hot { color: var(--gold); border-color: var(--gold); }
.crash-hist .dead { color: var(--blood); }
.crash-panel .row { display: flex; gap: 8px; margin-top: 10px; }
.crash-panel label { display: block; }
.crash-panel input { width: 100%; margin-top: 6px; }
.crash-bets { margin-top: 14px; display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.crash-bet {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px;
  background: rgb(0 0 0 / .25); border: 1px solid var(--line);
}
.crash-bet img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.crash-bet .ok { color: var(--gold); }
.crash-ape-note { font-size: 13px; color: var(--muted); margin-top: 8px; }

.planet-main { padding: 104px 0 48px; }
.planet-hero { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.planet-hero h1 { font-size: clamp(48px, 7vw, 76px); line-height: .9; margin: 6px 0 8px; }
.planet-lede { max-width: 480px; margin: 0; }
.planet-stats { display: flex; gap: 10px; }
.planet-stats .card { min-width: 112px; padding: 14px 16px; }
.planet-num { font-family: var(--display); font-size: 36px; line-height: 1; margin: 6px 0 0; color: var(--gold); }
.planet-stage {
  position: relative;
  z-index: 1;
  height: min(82vh, 860px);
  min-height: 560px;
  margin: 0 16px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--gold) 32%, transparent);
  background:
    radial-gradient(55% 48% at 50% 46%, rgba(196, 22, 28, .16), transparent 62%),
    radial-gradient(70% 60% at 50% 50%, rgba(232, 197, 71, .07), transparent 58%),
    #050403;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 90px rgba(0, 0, 0, .45);
}
#planetGlobe { position: absolute; inset: 0; }
.planet-stage canvas { display: block; }
.planet-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(68% 62% at 50% 48%, transparent 42%, rgba(5, 4, 3, .62) 100%),
    linear-gradient(180deg, rgba(5, 4, 3, .28), transparent 18%, transparent 78%, rgba(5, 4, 3, .45));
}
.planet-frame {
  position: absolute; inset: 14px; z-index: 3; pointer-events: none;
  border: 1px solid rgba(232, 197, 71, .16);
  border-radius: 18px;
}
.planet-frame:before,
.planet-frame:after {
  content: "";
  position: absolute; width: 22px; height: 22px;
  border: 1px solid var(--gold);
}
.planet-frame:before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.planet-frame:after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.planet-load {
  position: absolute; inset: 0; z-index: 4; margin: 0;
  display: grid; place-items: center;
  font-family: var(--display); letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-size: 13px;
  background: radial-gradient(40% 40% at 50% 50%, rgba(232, 197, 71, .08), transparent 70%);
}
.planet-hint {
  position: absolute; left: 28px; bottom: 22px; margin: 0; z-index: 1000;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle);
  pointer-events: none;
}
.planet-tip {
  position: absolute; z-index: 1001; display: flex; gap: 10px; align-items: center;
  min-width: 196px; padding: 10px 12px; border-radius: 16px; pointer-events: none;
  background: color-mix(in oklab, var(--card) 92%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 55%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(232, 197, 71, .12);
  backdrop-filter: blur(12px);
}
.planet-tip img { width: 42px; height: 28px; object-fit: cover; border-radius: 4px; }
.planet-tip b { display: block; font-family: var(--display); letter-spacing: .05em; text-transform: uppercase; font-size: 16px; }
.planet-tip span, .planet-tip em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.planet-tip em { color: var(--gold); margin-top: 2px; letter-spacing: .04em; }
.planet-pin {
  padding: 0; border: 0; background: transparent; color: var(--gold);
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.planet-pins { z-index: 4 !important; pointer-events: none !important; }
.planet-pin { pointer-events: auto !important; }
.planet-pin-face {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 3px; border-radius: 999px;
  background: rgba(7, 6, 5, .88);
  border: 1px solid #e8c547;
  box-shadow: 0 0 18px rgba(232, 197, 71, .35);
  transition: transform .16s ease, box-shadow .16s ease;
}
.planet-pin img { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; }
.planet-pin.hot .planet-pin-face,
.planet-pin.open .planet-pin-face {
  transform: scale(1.14);
  box-shadow: 0 0 26px rgba(232, 197, 71, .7);
}
.planet-drawer {
  position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 1002;
  width: min(400px, calc(100% - 24px));
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(232, 197, 71, .07), transparent 72px),
    #120e0c;
  border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: planet-in .28s cubic-bezier(.22,1,.36,1) both;
}
@keyframes planet-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.planet-drawer header { display: flex; gap: 12px; align-items: center; padding: 14px 14px 10px; }
.planet-drawer header img { width: 52px; height: 34px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(232,197,71,.35); }
.planet-drawer h2 { font-size: 28px; margin: 0; line-height: 1; }
.planet-drawer header .subtle { margin: 2px 0 0; }
.planet-x {
  margin-left: auto; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--fg); font-size: 22px;
}
.planet-x:hover { border-color: var(--gold); color: var(--gold); }
.planet-body { overflow: auto; padding: 0 14px 16px; display: grid; gap: 12px; }
.planet-holder { display: grid; grid-template-columns: 42px 1fr; gap: 8px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.planet-holder .pfp-cube { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.planet-holder b { display: block; }
.planet-holder .subtle { margin: 0; font-size: 12px; }
.planet-apes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.planet-ape { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #050403; }
.planet-ape:hover { border-color: var(--gold); }
.planet-ape img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.planet-ape b { display: block; padding: 4px 6px 6px; font-size: 12px; color: var(--gold); font-family: var(--mono); }
.planet-wait { grid-column: 1 / -1; margin: 0; font-size: 12px; }
.planet-rail { margin-top: 22px; }
.planet-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.planet-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit;
}
.planet-chip img { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; }
.planet-chip b { font-weight: 700; font-size: 13px; }
.planet-chip span { color: var(--gold); font-family: var(--mono); font-size: 12px; }
.planet-chip:hover, .planet-chip.on { border-color: var(--gold); }
.planet-chip.on { background: color-mix(in oklab, var(--gold) 12%, var(--card)); }
@media (max-width: 720px) {
  .planet-stage { margin: 0; border-radius: 0; min-height: 620px; height: 86vh; }
  .planet-frame { inset: 8px; }
  .planet-drawer { top: auto; height: 52%; width: auto; left: 8px; right: 8px; bottom: 8px; }
  .planet-hint { left: 16px; bottom: 12px; }
  .planet-apes { grid-template-columns: repeat(3, 1fr); }
}




