/* Cube 171 pilot: the tester's styles, plus the pilot's additions at the end. */
:root { box-sizing: border-box; }
body { margin: 0; padding: 0; }
[hidden]:not([hidden=until-found i]) { display: none !important; }

/* Layout: full-bleed 3D stage; a compact instrument card on top, a thumb bar at the bottom, a test-tools sheet above the bar */
:root {
  --bg: #eef0ec;          /* page ground */
  --stage: #e3e6e0;       /* 3D scene background */
  --panel: rgba(250, 251, 248, 0.9);
  --panel-solid: #fafbf8;   /* the panel without its see-through, for things pinned over scrolling content */
  --fg: #1b1f1c;
  --muted: #5d655f;
  --line: #cfd4cc;
  --accent: #2346d6;      /* cobalt, the "dig" colour */
  --accent-fg: #ffffff;
  --ok: #1f8a4c;
  --lock: #c2372b;
  --shadow: 0 6px 24px rgba(20, 30, 24, 0.12);
  /* hidden cube reward colours: the same in both themes, drawn over the 3D scene with a dark outline */
  --pop-1: #ffffff; --pop-2: #3ddc84; --pop-3: #4d8dff; --pop-4: #b46cff; --pop-5: #ff9a1f;
  /* tool rarity tiers */
  --r1: #6b7570; --r2: #2f8f5b; --r3: #2a62d9; --r4: #8a3fd1; --r5: #c98a12;
  /* crew colours */
  --crew-1: #0f8b8d; --crew-2: #c2410c; --crew-3: #a16207; --crew-4: #7c3aed;
  --crew-5: #be185d; --crew-6: #15803d; --crew-7: #1d4ed8; --crew-8: #57534e;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Geode amethyst, the same in both themes */
  --gd-a: #7c3aed; --gd-b: #c4b5fd; --gd-c: #4c1d95; --gd: #8b5cf6;
  /* gold, amethyst and green as text: darker than their fills, so small text reads (4.5:1) on light tints */
  --r5-text: #8a5a00; --gd-text: #6d28d9; --ok-text: #17733f;
  /* the thumb bar's height on phones, without the safe area */
  --barh: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
/* safe areas a wallet's in-app browser reports from the phone's bars when the page doesn't reach them (insets.js) */
:root.noinsets { --safe-b: 0px; --safe-t: 0px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111412; --stage: #161a18; --panel: rgba(28, 33, 30, 0.9); --panel-solid: #1c211e;
    --fg: #e8ece7; --muted: #99a39c; --line: #2e3531;
    --accent: #6f8cff; --accent-fg: #0b1030; --ok: #4cc47f; --lock: #ff6b5e;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    --r1: #9aa39e; --r2: #4cc47f; --r3: #6f9bff; --r4: #b98af0; --r5: #f0b43c;
    --r5-text: #f0b43c; --gd-text: #a78bfa; --ok-text: #4cc47f;
    --crew-1: #34d1c6; --crew-2: #fb923c; --crew-3: #facc15; --crew-4: #a78bfa;
    --crew-5: #f472b6; --crew-6: #4ade80; --crew-7: #60a5fa; --crew-8: #d6d3d1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111412; --stage: #161a18; --panel: rgba(28, 33, 30, 0.9); --panel-solid: #1c211e;
  --fg: #e8ece7; --muted: #99a39c; --line: #2e3531;
  --accent: #6f8cff; --accent-fg: #0b1030; --ok: #4cc47f; --lock: #ff6b5e;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --r1: #9aa39e; --r2: #4cc47f; --r3: #6f9bff; --r4: #b98af0; --r5: #f0b43c;
  --r5-text: #f0b43c; --gd-text: #a78bfa; --ok-text: #4cc47f;
  --crew-1: #34d1c6; --crew-2: #fb923c; --crew-3: #facc15; --crew-4: #a78bfa;
  --crew-5: #f472b6; --crew-6: #4ade80; --crew-7: #60a5fa; --crew-8: #d6d3d1;
  color-scheme: dark;
}
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
.stage { position: fixed; inset: 0; background: var(--stage); }
#cv { position: relative; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sheet, .sheet * { -webkit-user-select: text; user-select: text; }
#cv.dragging { cursor: grabbing; }

.leftcol {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2;
  padding: calc(var(--safe-t) + 10px) 10px 0;
  pointer-events: none;
}
.hud { display: flex; justify-content: flex-start; }
.card {
  pointer-events: auto;
  width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 12px 14px; display: grid; gap: 10px;
  /* never wider than its column, whatever the foot holds */
  min-width: 0; grid-template-columns: minmax(0, 1fr);
}
.titlerow { display: flex; align-items: baseline; gap: 8px; }
/* on a narrow column the layer line wraps under itself rather than squeezing the title */
.titlerow .layer { margin-left: auto; min-width: 0; white-space: normal; text-align: right; }
.helpbtn { flex: none; align-self: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 700 13px/1 var(--f-body); cursor: pointer; padding: 0; }
.helpbtn:hover { border-color: var(--accent); color: var(--accent); }
.title { font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; margin: 0; white-space: nowrap; }
.layer { font-family: var(--f-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.layer b { color: var(--fg); font-weight: 500; }
.prog { position: relative; height: 16px; border-radius: 8px; background: var(--line); overflow: hidden; }
.prog > i { display: block; height: 100%; width: 0%; background: var(--accent); transition: width 0.2s ease; }
/* cubes left, written across the bar: a second copy in the fill's colours shows only over the fill */
.prog .pl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog .pl.on { color: var(--accent-fg); clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); transition: clip-path 0.2s ease; }
.sponsorline { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sponsorline b { color: var(--fg); font-weight: 600; }
.sponsorline.go::after { content: " ↗"; }
.sponsorline.go:hover b { text-decoration: underline; }
/* the Final Cube prize: the one line that says what everyone is digging toward */
.prize { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left; font: inherit;
  border: 1px solid color-mix(in srgb, var(--r5) 40%, transparent); background: color-mix(in srgb, var(--r5) 12%, transparent); color: var(--fg); }
.prize:hover { border-color: var(--r5); }
.prize .pt { font-size: 12.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize b { margin-left: auto; font-family: var(--f-mono); font-size: 14px; color: var(--r5-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pu { font-family: var(--f-mono); font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* what you hold and what you dig with */
.you { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bal { display: inline-flex; align-items: baseline; gap: 5px; flex: none; padding: 0; border: 0; background: none; color: var(--fg); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.bal b { font-family: var(--f-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.you .equip { flex: 1; justify-content: flex-end; }
.you .equip .sub { margin-left: 0; }
/* the dashboard's switches */
.toggles { display: flex; align-items: center; gap: 6px; }
.autopill { --on: var(--ok); --ont: var(--ok-text); display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 28px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0 11px 0 9px; cursor: pointer; white-space: nowrap; }
.autopill.dust { --on: var(--gd); --ont: var(--gd-text); }
.autopill i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.autopill[aria-pressed="true"] { color: var(--ont); background: color-mix(in srgb, var(--on) 14%, transparent); border-color: color-mix(in srgb, var(--on) 45%, transparent); }
.autopill[aria-pressed="true"] i { background: var(--on); box-shadow: 0 0 6px var(--on); }
.autopill:disabled { opacity: 0.5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Bottom messages size to their text, centred: left/right 0 with auto margins rather than left: 50%,
   which capped them at half the screen. Balanced wrapping keeps a two-line message's lines even. */
.toast {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 21;
  bottom: calc(var(--safe-b) + var(--barh) + 16px);
  box-sizing: border-box; max-width: min(440px, calc(100% - 32px));
  background: var(--fg); color: var(--bg);
  padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1.4;
  box-shadow: var(--shadow); pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease; text-align: center; text-wrap: balance;
}
.toast .ph, .banner .ph { display: inline-block; }
.toast.show { opacity: 1; }
.gacha-open .toast { top: calc(var(--safe-t) + 12px); bottom: auto; }
.toast.lock { background: var(--lock); color: #fff; }
.toast.geode { background: var(--gd-a); color: #fff; }

.hint {
  position: fixed; left: 16px; right: 16px; text-align: center;
  bottom: calc(var(--safe-b) + var(--barh) + 12px);
  color: var(--muted); font-size: 12px; pointer-events: none; transition: opacity 0.4s ease;
  text-shadow: 0 0 6px var(--stage), 0 0 2px var(--stage); text-wrap: balance;
}
/* each instruction stays whole, so a wrap falls between them */
.hint .ph { white-space: nowrap; }
.hint.gone { opacity: 0; }
.hovertip { position: fixed; z-index: 5; font-family: var(--f-mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--fg); color: var(--bg); pointer-events: none; white-space: nowrap; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  height: var(--barh); padding: 0 6px var(--safe-b); box-sizing: content-box;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch;
  background: var(--panel); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tab {
  position: relative; font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer;
  display: grid; justify-items: center; align-content: center; gap: 3px; padding: 0; min-width: 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.tab svg { width: 40px; height: 26px; padding: 2px 8px; box-sizing: border-box; border-radius: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transition: background 0.15s ease; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab[aria-expanded="true"] { color: var(--fg); }
.tab[aria-expanded="true"] svg { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
#shopBtn svg { color: var(--accent); }
#geodeBtn svg { color: var(--gd-text); }
#geodeBtn[aria-expanded="true"] svg { background: color-mix(in srgb, var(--gd) 20%, transparent); }
.tab:active svg { transform: scale(0.94); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 10px; }
.tabbadge.shopdot { background: var(--lock); animation: dotpulse 1.4s ease-in-out infinite; }
@keyframes dotpulse { 50% { transform: scale(1.5); } }
.tabbadge { position: absolute; top: 8px; left: calc(50% + 10px); width: 8px; height: 8px; border-radius: 50%; background: var(--gd); box-shadow: 0 0 0 2px var(--panel); }
.btn {
  pointer-events: auto; font: inherit; font-weight: 600; font-size: 14px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--fg);
  box-shadow: var(--shadow); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn:focus-visible, .linkbtn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.sheet {
  position: fixed; left: 0; right: 0; z-index: 4;
  bottom: calc(var(--safe-b) + var(--barh));
  margin: 0 auto; max-width: 600px; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding: 20px 16px 16px; display: grid; gap: 14px; align-content: start;
  max-height: calc(100dvh - var(--safe-b) - var(--barh) - var(--safe-t) - 78px); overflow-y: auto; overscroll-behavior: contain;
  pointer-events: auto; animation: sheetup 0.22s cubic-bezier(.2, .8, .3, 1);
}
.sheet::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { font-family: var(--f-display); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin: 0; }
.group { display: grid; gap: 8px; }
.group label, .glabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
/* section headings: a step above the field labels and stat names under them */
.glabel.sechead { color: var(--fg); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; padding-left: 8px; border-left: 3px solid var(--accent); line-height: 1.3; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row .btn { box-shadow: none; min-height: 40px; padding: 0 14px; font-size: 13px; flex: 1 1 auto; }
select, input[type=range] { font: inherit; }
select { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 10px; width: 100%; }
input[type=range] { flex: 1 1 140px; accent-color: var(--accent); min-width: 0; }
output { font-family: var(--f-mono); font-size: 13px; min-width: 3ch; font-variant-numeric: tabular-nums; }
.perf { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* equipped tool line in the status card */
.equip { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.equip .name { flex: 0 1 auto; min-width: 4em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equip .sub { color: var(--muted); font-family: var(--f-mono); font-size: 12px; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.gem { width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); background: var(--rc, var(--r1)); flex: 0 0 auto; }

/* packs sheet */
.sheethead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { font-family: var(--f-mono); font-size: 12.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pack { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.pack h3 { margin: 0; font-family: var(--f-display); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.pack p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
/* a pack's figures: a value over a few words, in one row */
.podium .callcard { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.pack .row .btn { flex: 1 1 120px; }
.btn.roll { display: grid; place-content: center; gap: 1px; min-height: 52px; line-height: 1.2; }
.qtyrow { align-items: center; flex-wrap: nowrap; }
.pack .qtyrow .btn.step { flex: 0 0 40px; min-height: 40px; padding: 0; font-size: 18px; font-weight: 700; }
.qty { flex: 0 0 34px; text-align: center; font-family: var(--f-mono); font-size: 14px; font-weight: 600; }
.pack .qtyrow .btn.roll { flex: 1 1 auto; }
.pack .qtyrow .btn.step.max { flex-basis: 48px; font-size: 12px; letter-spacing: 0.02em; }
.btn.roll small { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tcard {
  --rc: var(--r1);
  border: 2px solid var(--rc); border-radius: 10px; padding: 8px; background: var(--bg);
  display: grid; gap: 2px; min-width: 0;
  animation: flipin 0.42s cubic-bezier(.2,.8,.3,1.2) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.tcard .tier { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rc); font-weight: 600; }
.tcard .nm { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .st { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tcard.t4, .tcard.t5 { box-shadow: 0 0 14px -2px var(--rc); }
@keyframes flipin { from { opacity: 0; transform: perspective(400px) rotateY(80deg) scale(0.9); } to { opacity: 1; transform: none; } }
.tablewrap { overflow-x: auto; }
.rates { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rates th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; padding: 0 6px 6px 0; }
.rates td { padding: 5px 6px 5px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.rates td.n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.rates .tiername { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.inv { display: grid; gap: 6px; }
.autocard { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 6px; }
.autocard.on { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.autocard .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.autocard .nm { display: block; font-weight: 700; font-size: 13.5px; }
.autocard .st { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.autocard.on .top .st { color: var(--ok-text); }
.autocard .what { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.forge { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 6px; }
.forge > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.forge > summary::-webkit-details-marker { display: none; }
.forge > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform 0.15s; }
.forge[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.forge .nm { display: block; font-weight: 700; font-size: 13.5px; }
.forge .st { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.forge .what { margin: 0; padding: 0 12px 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 12px 10px; }
.ftarget { --rc: var(--r2); font: inherit; color: inherit; display: grid; justify-items: center; gap: 3px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; min-width: 0; }
.ftarget .ic { width: 28px; height: 28px; }
.ftarget .ic svg { width: 100%; height: 100%; }
.ftarget .nm { font-size: 12px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftarget .dur { width: 100%; }
.ftarget:not(.ok) .ic { opacity: 0.55; }
.ftarget.ok .st { color: var(--ok-text); }
.ftarget.on { border-color: var(--rc); box-shadow: inset 0 0 0 1px var(--rc); }
.ftarget:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fplan { --rc: var(--r2); display: grid; gap: 6px; margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--rc); border-radius: 10px; background: var(--panel); }
.fplan .ftop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fplan .ftop .st { flex: 1; min-width: 0; }
/* wide enough for its longest label, so "Tap again to forge" doesn't nudge the button */
.fplan .btn { flex: none; min-height: 36px; min-width: 11.5em; white-space: nowrap; }
/* a long list scrolls in place rather than pushing the rest of the card down */
.fplan .takes { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 12.5px; max-height: 8.6em; overflow-y: auto; overscroll-behavior: contain; }
/* the dashboard's quick switches: Auto-dig and Autospend Dust */
.item { --rc: var(--r1); display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.item.on { border-color: var(--rc); box-shadow: inset 3px 0 0 var(--rc); }
.item .meta { flex: 1; min-width: 0; display: grid; gap: 4px; }
.item .top { display: flex; gap: 8px; align-items: center; min-width: 0; }
.item .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .cnt { flex: none; font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 18%, transparent); color: var(--fg); }
.item .st { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dur { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.dur > i { display: block; height: 100%; background: var(--rc); }
.item .what { color: var(--muted); font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.item.on .what { -webkit-line-clamp: unset; }
.item .btn { box-shadow: none; min-height: 34px; padding: 0 12px; font-size: 12.5px; flex: 0 0 auto; }
.empty { color: var(--muted); font-size: 12.5px; margin: 0; }
.rate { --rc: var(--r1); display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.rate .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rate .nm { font-weight: 600; font-size: 13px; }
.rate .tier { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rc); font-weight: 600; }
.rate .pct { margin-left: auto; font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.rate .what { color: var(--muted); font-size: 12px; line-height: 1.4; }
.pops { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.pop {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.01em;
  color: var(--pc, var(--pop-1));
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.5);
  /* every pop rises at the same speed, 40px a second; the rarer it is, the longer it lasts (--life, in
     seconds), so the higher it goes. It pops in and fades out the same way whatever its life. */
  --life: 1;
  animation: popin 0.36s cubic-bezier(.2, .7, .3, 1), poprise calc(var(--life) * 1s) linear forwards, popout 0.3s linear calc(var(--life) * 1s - 0.3s) forwards;
  translate: -50% -50%;
}
.pop small { display: block; text-align: center; font-size: 0.62em; letter-spacing: 0.12em; }
.pop.p2 { --pc: var(--pop-2); font-size: 15px; --life: 1.2; }
.pop.p3 { --pc: var(--pop-3); font-size: 17px; --life: 1.4; }
.pop.p4 { --pc: var(--pop-4); font-size: 20px; --life: 1.6; }
.pop.p5 { --pc: var(--pop-5); font-size: 25px; --life: 1.8; }
/* a Geode: pale crystal with an amethyst glow, apart from Epic's purple and Legendary's orange */
.pop.pgd { --pc: #ede9fe; font-size: 24px; --life: 2; text-shadow: 0 0 3px #2e1065, 0 1px 2px #2e1065, 0 0 12px #8b5cf6, 0 0 22px rgba(139, 92, 246, 0.8); }
/* a Geode's SOL, under the CUBE it paid: gold, as the panel shows it */
.pop.pgd small.gdsolpop { margin-top: 2px; font-size: 0.58em; letter-spacing: 0.04em; color: #ffd977; }
@keyframes popin {
  0% { opacity: 0; scale: 0.6; }
  50% { scale: 1.15; }
  100% { scale: 1; }
}
@keyframes poprise { from { transform: translateY(0); } to { transform: translateY(calc(var(--life) * -40px)); } }
@keyframes popout { to { opacity: 0; } }
.deck { display: grid; gap: 6px; }
.deckrow { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; font-size: 12.5px; }
.deckrow .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--pc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35); }
.deckrow .n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.deckrow .n b { color: var(--fg); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .pop { animation: popfade calc(var(--life) * 1s + 0.4s) linear forwards; }
  @keyframes popfade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
}
.pop.bot { font-size: 11px; opacity: 0.9; }
.pop.bot.p3 { font-size: 13px; } .pop.bot.p4 { font-size: 15px; } .pop.bot.p5 { font-size: 18px; }
/* live panel: a sheet on phones, a fixed column on the right on wide screens */
.livehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feed { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; }
.feed li.none { display: block; color: var(--muted); border-style: dashed; }
.feed li.mine { border-color: var(--accent); }
.feed .who { min-width: 0; display: grid; }
.feed .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the line under a name wraps rather than hiding what it says */
.feed .meta { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.feed .amt { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
/* a SOL Geode's SOL, under the CUBE it paid (game.js amtCol) */
.feed .amt, .gdrow .amt, .gdold > summary .amt { display: grid; justify-items: end; line-height: 1.25; }
.amt .sol { font-size: 10.5px; color: var(--r5); }
.tchip { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--pc); color: var(--fg); background: color-mix(in srgb, var(--pc) 22%, transparent); white-space: nowrap; }
.lbctl { justify-content: space-between; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; padding: 0 10px; min-height: 32px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lb th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; padding: 0 4px 6px; }
.lb th.n, .lb td.n { text-align: right; }
.lb td { padding: 5px 4px; border-top: 1px solid var(--line); white-space: nowrap; }
.lb td.n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.lb td.rk { color: var(--muted); font-family: var(--f-mono); width: 2ch; }
.lb td.nmcell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.lb tr.me td { font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lbname { vertical-align: middle; }
.lbsub { color: var(--muted); font-size: 11px; font-weight: 400; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--ok); }
.crewtag { font-family: var(--f-mono); font-size: 10px; padding: 1px 4px; border-radius: 4px; border: 1px solid var(--cc, var(--line)); color: var(--muted); margin-left: 6px; vertical-align: middle; }
@media (min-width: 900px) {
  :root { --colw: 380px; --livew: 350px; --gut: 16px; }
  .leftcol {
    top: calc(var(--safe-t) + var(--gut)); left: var(--gut); right: auto; bottom: calc(var(--safe-b) + 92px);
    width: var(--colw); padding: 0; display: flex; flex-direction: column; gap: 12px;
  }
  .leftcol > .hud { flex: none; }
  .leftcol > .sheet {
    position: static; flex: 0 1 auto; min-height: 0; max-height: none; max-width: none; margin: 0;
    border-radius: 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px;
    animation: sidein 0.2s cubic-bezier(.2, .8, .3, 1);
  }
  .leftcol > .sheet::before { display: none; }
  #live, #live[hidden] {
    display: grid !important; left: auto; right: var(--gut); margin: 0; animation: none;
    top: calc(var(--safe-t) + var(--gut)); bottom: calc(var(--safe-b) + 92px); width: var(--livew); max-width: none;
    max-height: none; gap: 12px; border-radius: 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px;
  }
  #live::before { display: none; }
  /* the chat fills the column, the box to type in at the bottom */
  #live.chatmode { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  #live.chatmode .chatlog { max-height: none; }
  #liveBtn { display: none; }
  .bar {
    left: 50%; right: auto; bottom: calc(var(--safe-b) + 16px); transform: translateX(-50%);
    height: 60px; padding: 0 6px; gap: 2px; grid-auto-columns: 84px;
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  }
  /* between the columns, but never squeezed under 320px on a narrow desktop */
  .toast { bottom: calc(var(--safe-b) + 92px); max-width: clamp(320px, calc(100% - 2 * var(--colw) - 80px), 560px); }
  .hint { bottom: calc(var(--safe-b) + 88px); left: calc(var(--colw) + 32px); right: calc(var(--livew) + 32px); }
}
@media (min-width: 900px) and (max-width: 1180px) { :root { --colw: 340px; --livew: 300px; } }
@keyframes sidein { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.tabpanel { display: grid; gap: 14px; }
/* chat: the switches, the log (which scrolls, and takes any spare height), the box to type in, a note */
.chatpanel { grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 8px; min-height: 0; }
.chatlog { display: grid; align-content: start; gap: 2px; margin: 0; padding: 0 2px; list-style: none; overflow-y: auto; overscroll-behavior: contain; min-height: 180px; max-height: min(52dvh, 520px); }
.chatlog li { padding: 5px 8px; border-radius: 8px; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.chatlog li.mine { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chatlog li.atme { background: color-mix(in srgb, var(--gd) 16%, transparent); }
.chatlog li.none { color: var(--muted); }
.chatlog .nm { font-weight: 700; margin-right: 6px; }
.chatlog .tg { color: var(--muted); font-weight: 600; font-size: 11px; margin-right: 6px; }
.chatlog .at { float: right; margin-left: 8px; color: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.chatform { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.chatform input { font: inherit; font-size: 16px; min-height: 40px; min-width: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 10px; }
.chatform input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chatnote { margin: 0; font-size: 12px; }
.chatbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.chatfilter { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chatlog li.other { cursor: pointer; }
.chatlog .acts { display: flex; gap: 6px; margin-top: 5px; }
.chatlog .acts button { font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
/* emotes (src/shared/emotes.ts): inline in a message, large when a message is nothing else, the picker and the
   suggestions that come up while typing a :code:, both floating just above the box to type in */
.emo { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.42em; margin: 0 1px; }
.emo svg { display: block; width: 100%; height: 100%; }
.chatlog .tx.jumbo { display: block; margin-top: 2px; font-size: 26px; line-height: 1.2; }
.chatlog .tx.jumbo .emo { width: 1.35em; height: 1.35em; vertical-align: -0.3em; margin-right: 3px; }
.chatform { position: relative; grid-template-columns: minmax(0, 1fr) auto auto; }
.emobtn { display: grid; place-items: center; min-width: 40px; padding: 0 8px; }
.emobtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.emobtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.emopick, .emosug {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 6;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.emopick { display: flex; flex-direction: column; max-height: min(300px, 44dvh); }
.emopick[hidden], .emosug[hidden] { display: none; }
.emoscroll { overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; min-height: 0; }
.emopick h3 { margin: 8px 4px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.emogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.emogrid button { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 4px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.emogrid button:hover, .emogrid button:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.emogrid .emo { width: 28px; height: 28px; margin: 0; vertical-align: 0; }
.emofoot { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.emofoot .emo { width: 22px; height: 22px; vertical-align: 0; }
.emofoot b { color: var(--fg); font-weight: 600; }
.emofoot code { font-family: var(--f-mono); font-size: 12px; }
.emosug { display: flex; gap: 4px; padding: 5px; overflow-x: auto; }
.emosug button { display: flex; flex: none; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-family: var(--f-mono); font-size: 12px; cursor: pointer; }
.emosug button .emo { width: 22px; height: 22px; vertical-align: 0; }
.emosug button[aria-selected="true"], .emosug button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rpquote { margin: 0; padding: 8px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.rpreasons { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; font-size: 13.5px; }
.rpreasons legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.rpreasons label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
#rpNote { font: inherit; font-size: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 8px 10px; resize: vertical; }
.bllist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
/* linking a wallet */
.wl { width: min(440px, calc(100vw - 24px)); }
.wlbody { display: grid; gap: 12px; }
.wlwarn { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; background: color-mix(in srgb, var(--lock) 12%, transparent); border: 1px solid color-mix(in srgb, var(--lock) 35%, transparent); }
.wl .ack { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.wl .ack input { margin-top: 3px; }
.wlist { display: grid; gap: 8px; }
.wbtn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.wbtn img { border-radius: 6px; }
.wbtn.get { color: var(--muted); font-weight: 400; justify-content: center; border-style: dashed; }
.wlist .small { margin: 0; font-size: 12.5px; color: var(--muted); }
.bllist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.bllist li.none { color: var(--muted); border-style: dashed; }
.chatcount { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: var(--gd-a); color: #fff; font-size: 10px; line-height: 1; }
.tabs { justify-self: start; }
.mkhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mkprice { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.mkchg { font-family: var(--f-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mkchg.up { color: var(--ok-text); } .mkchg.down { color: var(--lock); }
.chartbox { position: relative; height: 150px; }
#mkChart { width: 100%; height: 150px; display: block; touch-action: pan-y; }
.mktip { position: absolute; top: 0; font-family: var(--f-mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--fg); color: var(--bg); pointer-events: none; white-space: nowrap; }
.mkstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.mkstats div { min-width: 0; }
.mkstats dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; }
.mkstats dd { margin: 2px 0 0; color: var(--fg); font-weight: 600; font-family: var(--f-mono); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkbtns .btn { min-height: 36px; font-size: 12.5px; padding: 0 10px; flex: 1 1 auto; }

/* dig effects layer */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.badge { display: inline-block; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px; border-radius: 8px; background: var(--lock); color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; vertical-align: 1px; text-align: center; }
.badge[hidden] { display: none; }
.sheethead { flex-wrap: wrap; }
.ptabs button { padding: 0 9px; }
/* shop */
.packart { position: relative; height: 64px; border-radius: 9px; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.packart .pt { display: grid; gap: 2px; min-width: 0; }
.packart .pn { font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.packart .ps { font-size: 11.5px; opacity: 0.92; }
.packart svg { width: 40px; height: 40px; flex: 0 0 auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.pa-tool { background: linear-gradient(135deg, #1e40af, #0f172a); }
.pa-cos { background: linear-gradient(135deg, #6d28d9, #db2777); }
.pa-crate { background: linear-gradient(135deg, #b45309, #431407); }
.pack details summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.pack details[open] summary { margin-bottom: 8px; }
.odds { display: grid; gap: 6px; }
/* title cards and emblems */
.emb, .ic { display: inline-block; flex: 0 0 auto; line-height: 0; }
.emb svg, .ic svg { width: 100%; height: 100%; display: block; }
/* Gear's Tools / Locker / Challenges bar stays pinned to the top of the sheet, with the Locker's callsign
   under it, so every equip shows at once. One pinned block: two stacked ones leave a seam scrolled tiles show through.
   (sticky measures from inside the sheet's padding, so it pins at minus that padding: flush with the sheet's top edge) */
#gear > .sheethead { position: sticky; top: -20px; z-index: 4; flex-wrap: wrap; margin: -20px -16px 0; padding: 16px 16px 10px; background: var(--panel-solid); border-radius: 18px 18px 0 0; border-bottom: 1px solid var(--line); }
.callpin { flex: 1 0 100%; display: grid; gap: 8px; }
.callpin[hidden] { display: none; }
@media (min-width: 900px) {
  #gear > .sheethead { top: -14px; margin: -14px -14px 0; padding: 12px 14px 10px; border-radius: 14px 14px 0 0; }
}
/* on a phone, Live's Live / Exchange / Chat bar (and the online count beside it) stays pinned to the top of the sheet
   as it scrolls, the same way as Gear's: flush with the sheet's top edge, on a solid panel so nothing shows through */
@media (max-width: 899px) {
  #live > .livehead { position: sticky; top: -20px; z-index: 4; margin: -20px -16px 0; padding: 16px 16px 10px; background: var(--panel-solid); border-radius: 18px 18px 0 0; border-bottom: 1px solid var(--line); }
}
.callcard { position: relative; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 10px 6px 8px; border-radius: 9px; overflow: hidden; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35); isolation: isolate; }
.callcard.me { box-shadow: 0 0 0 2px var(--accent); }
.callcard .ctxt { min-width: 0; display: grid; gap: 1px; flex: 1; }
.callcard .cnrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.callcard .cn { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.callcard .ct { font-family: var(--f-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callcard .cs { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.callcard .cs.split { display: grid; justify-items: end; line-height: 1.15; }
.callcard .cs.split b { font-weight: 500; font-size: 13px; }
.callcard .cs.split small { font-family: var(--f-display); font-size: 8.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; }
.callcard .crk { font-family: var(--f-display); font-weight: 700; font-size: 15px; min-width: 1.2em; text-align: center; }
.callcard .crew { flex: 0 0 auto; font-family: var(--f-mono); font-size: 10px; font-weight: 500; padding: 0 4px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.55); }
/* the game's own team crew: a tick and the team's green wherever its tag shows (game.js markTeam) */
.team::before { content: "✓ "; }
.crewtag.team, .chatlog .tg.team { color: var(--ok-text); border: 1px solid var(--ok); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.callcard .crew.team { border-color: #4ade80; color: #4ade80; font-weight: 700; }
.callcard.t5::after, .cardprev.t5::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: translateX(-150%) skewX(-20deg); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 45% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(350%) skewX(-20deg); } }
.podium { display: grid; gap: 6px; }
.podium[hidden] { display: none; }
.lb td.nmcell { max-width: 180px; }
.lbline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lbline .dot { margin: 0; flex: 0 0 auto; }
.lbline .lbname { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lbtitle { display: block; color: var(--muted); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; margin-left: 39px; overflow: hidden; text-overflow: ellipsis; }
/* locker */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.litem { --rc: var(--r1); position: relative; font: inherit; color: inherit; text-align: center; display: grid; gap: 4px; justify-items: center; align-content: start; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; min-width: 0; }
.litem.owned { border: 2px solid var(--rc); padding: 7px 5px; }
.litem.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }
.litem.locked .prev { opacity: 0.35; filter: grayscale(1); }
.litem .prev { width: 100%; height: 44px; display: grid; place-items: center; }
.litem .prev .emb, .litem .prev .ic { width: 40px; height: 40px; }
.litem .nm { font-size: 11.5px; font-weight: 600; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.litem .src { font-size: 10px; color: var(--muted); line-height: 1.25; }
.litem .new { position: absolute; top: -6px; right: -4px; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: var(--lock); color: #fff; }
.litem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cardprev { position: relative; isolation: isolate; overflow: hidden; width: 100%; height: 40px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); padding: 0 4px; text-align: center; line-height: 1.2; }
.fxprev { width: 100%; height: 96px; display: block; border-radius: 10px; background: var(--stage); border: 1px solid var(--line); }
/* challenges */
.chalhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chalhide { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); cursor: pointer; user-select: none; }
.chalhide input[type=checkbox][role=switch] { width: 30px; height: 18px; }
.chalhide input[type=checkbox][role=switch]::after { top: 2px; left: 2px; width: 14px; height: 14px; }
.chalhide input[type=checkbox][role=switch]:checked::after { transform: translateX(12px); }
.chal { display: grid; gap: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.chal.done { border-color: var(--ok); }
.chal .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chal .nm { font-weight: 600; font-size: 13px; }
.chal .pr { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chal.done .pr { color: var(--ok-text); }
.chal .what { color: var(--muted); font-size: 12px; }
.chal .rw { display: flex; align-items: center; gap: 8px; font-size: 11.5px; min-width: 0; }
.chal .rw .emb, .chal .rw .ic { width: 22px; height: 22px; }
.chal .rw .cardprev { width: 78px; height: 22px; font-size: 7px; flex: 0 0 auto; }
/* pack opening */
.gacha { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; padding: max(16px, 6vh) 16px 16px; background: rgba(6, 8, 7, 0.78); z-index: 20; overflow: hidden; }
.gacha[hidden] { display: none; }
.gfx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.gbox { position: relative; z-index: 1; width: min(100%, 560px); max-height: calc(100vh - max(16px, 6vh) - 16px); max-height: calc(100dvh - max(16px, 6vh) - 16px); overflow-y: auto; box-sizing: border-box; display: grid; gap: 14px; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.gbox h2 { margin: 0; font-family: var(--f-display); font-size: 14px; letter-spacing: 0.04em; }
.ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ghead .btn { box-shadow: none; min-height: 36px; font-size: 13px; }
.gtitle { display: grid; gap: 2px; min-width: 0; }
/* holds its line while the reels spin, so the reels and buttons don't move when the summary arrives */
.gsub { margin: 0; min-height: 1.45em; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.gsub[hidden] { display: none; }
.gbox.land .gtitle h2 { font-size: 16px; }
.reel { position: relative; height: 140px; overflow: hidden; border-radius: 12px; background: var(--stage); border: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reels { display: grid; gap: 6px; }
/* several rows share the screen's height: each as tall as fits, from 64 to 96px (--rows is set by the page); 250px is
   everything else: the padding, the title and its summary line, and the buttons */
.reels.multi { --rowh: clamp(64px, calc((100vh - 250px) / var(--rows, 5) - 6px), 96px); --rowh: clamp(64px, calc((100dvh - 250px) / var(--rows, 5) - 6px), 96px); }
.reels.multi .reel { height: var(--rowh); }
.reels.multi .strip { top: 4px; gap: 6px; }
/* the words take the height they need and the icon gets what's left, so a landed card's name, rarity and uses are never squashed in a short row */
.reels.multi .ritem { flex-basis: 72px; width: 72px; height: calc(var(--rowh) - 8px); grid-template-rows: minmax(0, 1fr) auto auto auto; align-content: stretch; gap: 1px; padding: 4px; border-radius: 8px; }
.reels.multi .ritem .ic, .reels.multi .ritem .emb { width: auto; height: 100%; min-height: 0; max-height: clamp(20px, calc(var(--rowh) * 0.29), 28px); aspect-ratio: 1; }
.reels.multi .ritem .cardprev { height: calc(var(--rowh) * 0.25); font-size: 6px; }
.reels.multi .ritem .nm { font-size: 8.5px; line-height: 1.1; }
.reels.multi .ritem .tier, .reels.multi .ritem .uses { font-size: 7.5px; line-height: 1.15; }
/* a smaller +50% in the corner, clear of the icon */
.reels.multi .ritem .boost { top: 2px; right: 2px; padding: 0 3px; font-size: 6.5px; }
/* on a phone a landed card keeps the three lines it spun with: the uses are in the summary under the reels */
@media (max-width: 899px) { .reels.multi .ritem .uses { display: none; } }
.strip { position: absolute; left: 0; top: 12px; display: flex; gap: 8px; will-change: transform; }
.marker { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: var(--accent); box-shadow: 0 0 10px var(--accent); z-index: 1; }
.marker::before, .marker::after { content: ""; position: absolute; left: 50%; margin-left: -7px; border: 7px solid transparent; }
.marker::before { top: 0; border-top-color: var(--accent); }
.marker::after { bottom: 0; border-bottom-color: var(--accent); }
.marker { transition: background 0.3s ease, box-shadow 0.3s ease; }
.reel.landed .marker { background: transparent; box-shadow: none; }
.ritem { --rc: var(--r1); flex: 0 0 104px; width: 104px; height: 116px; box-sizing: border-box; border-radius: 10px; border: 2px solid var(--rc); background: color-mix(in srgb, var(--rc) 16%, var(--panel)); display: grid; grid-template-rows: 52px auto auto; justify-items: center; align-content: center; gap: 3px; padding: 6px; text-align: center; transition: transform 0.08s ease; }
.ritem .ic, .ritem .emb { width: 46px; height: 46px; align-self: center; }
.ritem .cardprev { box-sizing: border-box; width: 100%; max-width: 88px; height: 34px; align-self: center; font-size: 7.5px; }
.ritem .nm { font-size: 11px; font-weight: 600; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ritem .tier { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rc); }
.ritem .uses { font-family: var(--f-mono); font-size: 9px; font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ritem.t4, .ritem.t5 { box-shadow: 0 0 14px -3px var(--rc); }
.ritem.under { transform: translateY(-3px); }
/* an Elite tool, shown once its reel lands: a gold edge, a +50% badge and sparks */
.ritem { position: relative; }
.ritem.elite { box-shadow: 0 0 0 1px #fcd34d, 0 0 22px -2px #f59e0b; }
.ritem .boost { position: absolute; top: 3px; right: 3px; padding: 1px 4px; border-radius: 5px; font-size: 7.5px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.3; color: #2a1800; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 0 8px rgba(245, 158, 11, 0.8); animation: boostin 0.5s cubic-bezier(.2, .8, .3, 1.5) both; }
.ritem .spark { position: absolute; color: #fde68a; font-size: 11px; line-height: 1; pointer-events: none; text-shadow: 0 0 6px #f59e0b; animation: twinkle 1.6s ease-in-out infinite both; }
.ritem .spark.s1 { top: 14%; left: 8%; }
.ritem .spark.s2 { top: 46%; right: 6%; font-size: 8px; animation-delay: 0.5s; }
.ritem .spark.s3 { bottom: 10%; left: 18%; font-size: 9px; animation-delay: 1s; }
@keyframes boostin { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 40% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0.25; transform: scale(0.8) rotate(70deg); } }
.ritem.win { animation: winpop 0.6s cubic-bezier(.2, .8, .3, 1.3) both; box-shadow: 0 0 26px 2px var(--rc); }
@keyframes winpop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1.06); } }
.ritem.rbig { width: 136px; height: 156px; flex-basis: 136px; grid-template-rows: 72px auto auto; animation: flipin 0.45s cubic-bezier(.2, .8, .3, 1.2) both; box-shadow: 0 0 24px -2px var(--rc); }
.ritem.rbig .ic, .ritem.rbig .emb { width: 64px; height: 64px; }
.ritem.rbig .cardprev { max-width: 116px; height: 48px; font-size: 9.5px; }
.ritem.rbig .nm { font-size: 13px; }
.gres { display: grid; justify-items: center; gap: 8px; text-align: center; }
.gres .big { font-family: var(--f-display); font-size: 16px; font-weight: 700; }
.gres p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; max-width: 46ch; }
.gres .btn { box-shadow: none; min-height: 40px; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; justify-items: center; }
.ggrid .ritem { animation: flipin 0.42s cubic-bezier(.2, .8, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 60ms); }
.gbox.land.f4 { animation: gflash 1s ease-out; --fc: var(--r4); }
.gbox.land.f5 { animation: gflash 1.4s ease-out; --fc: var(--r5); }
@keyframes gflash { 0% { box-shadow: 0 0 0 0 var(--fc), 0 20px 60px rgba(0, 0, 0, 0.5); } 30% { box-shadow: 0 0 60px 14px var(--fc), 0 20px 60px rgba(0, 0, 0, 0.5); } 100% { box-shadow: 0 0 0 0 transparent, 0 20px 60px rgba(0, 0, 0, 0.5); } }
.gbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.gbtns .btn { flex: 1 1 140px; box-shadow: none; min-height: 44px; }
/* Done needs little room: Open again gets it, with its price and your balance on one line each */
#gDone { flex: 0 1 104px; }
#gAgain { display: grid; place-content: center; gap: 1px; line-height: 1.2; }
#gAgain[hidden] { display: none; }
#gAgain small { font-size: 11px; font-weight: 500; color: var(--muted); }
.gbtns[hidden], .gres[hidden], .ggrid[hidden] { display: none; }
@media (max-height: 760px) {
  .gacha { padding-top: max(10px, 2vh); }
  .gbox { padding: 12px; gap: 10px; max-height: calc(100vh - max(10px, 2vh) - 16px); max-height: calc(100dvh - max(10px, 2vh) - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .ritem, .ritem.win, .ritem.rbig, .ggrid .ritem, .marker, .gbox.land.f4, .gbox.land.f5, .callcard.t5::after, .cardprev.t5::after, .ritem .boost, .ritem .spark { animation: none; transition: none; }
}

/* password sign-in is going away: players without a linked wallet are asked to link one (game.js renderWalletWarn) */
.walletwarn { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4;
  background: color-mix(in srgb, var(--gd) 12%, var(--panel-solid)); border: 1px solid color-mix(in srgb, var(--gd) 55%, var(--line)); }
.walletwarn p { margin: 0; }
.walletwarn b { color: var(--gd-text); }
.walletwarn .wwrow { display: flex; align-items: center; gap: 8px; }
.walletwarn .btn { min-height: 36px; padding: 0 14px; font-size: 13px; box-shadow: none; }
.walletwarn .wwhide { font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 4px; min-height: 36px; }
.walletwarn .wwhide:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 899px) {
  .card { padding: 10px 12px; gap: 8px; border-radius: 14px; }
  .title { font-size: 15px; }
  .sheet-open .card .prize, .sheet-open .card .you, .sheet-open .card .toggles, .sheet-open .card .walletwarn { display: none; }
}
@media (max-width: 360px) {
  .prize .pt { font-size: 12px; }
  .tab { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .prog > i, .prog .pl.on, .toast, .hint { transition: none; }
  .sheet, .leftcol > .sheet, .gdgem svg { animation: none; }
  .tcard { animation: none; }
}

/* ---------- pilot additions ---------- */
.banner {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content;
  top: calc(var(--safe-t) + 12px); z-index: 15;
  box-sizing: border-box; max-width: min(440px, calc(100% - 32px)); padding: 8px 14px; border-radius: 10px;
  background: var(--lock); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow); text-align: center; text-wrap: balance;
}
.banner.info { background: var(--fg); color: var(--bg); }
@media (max-width: 899px) { .banner { top: auto; bottom: calc(var(--safe-b) + var(--barh) + 56px); } }
/* typing in chat on a phone (game.js keyboardFit): the bar steps aside and Live fills the screen above the keyboard,
   the log taking the height and the box to type in at the bottom */
@media (max-width: 899px) {
  .typing .bar { display: none; }
  .typing #live { bottom: var(--kb, 0px); height: calc(var(--vvh, 100dvh) - var(--safe-t) - 8px); max-height: none; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 10px; animation: none; }
  .typing #live > * { flex: none; }
  .typing #tabChat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .typing .chatlog { flex: 1 1 auto; min-height: 0; max-height: none; }
  .typing .toast { top: calc(var(--safe-t) + 12px); bottom: auto; }
}
/* during the tour a phone's panel stops short, leaving room above it for the tour's card (tour.js) */
@media (max-width: 899px) { .touring .sheet { max-height: max(220px, calc(100dvh - var(--safe-b) - var(--barh) - var(--safe-t) - 290px)); } }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.botchip { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 4px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.callcard .botchip { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--f-mono); font-size: 12px; overflow-wrap: anywhere; }
.invlist { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.invlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: 12.5px; }
.invlist .code { font-family: var(--f-mono); font-size: 12.5px; }
.invlist .meta { color: var(--muted); font-size: 11.5px; }
.invlist .btn, .crewrow .btn { box-shadow: none; min-height: 32px; padding: 0 10px; font-size: 12px; }
.field { display: grid; gap: 4px; }
.field input { font: inherit; min-height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 10px; min-width: 0; }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.crewrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: 12.5px; }
.crewrow .meta { color: var(--muted); font-size: 11.5px; }
.crewlist { display: grid; gap: 6px; }
.mkbtns .btn:disabled { opacity: 0.45; }

/* ---------- Geode ---------- */
.gdhero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #a78bfa 0%, #6d28d9 45%, #2e1065 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
/* the gem grows a little and glows brighter with each step the pot passes (fx.js geodeSize, --gdk from 0 to 1): the
   same steps that size the show when it cracks */
.gdgem { flex: 0 0 auto; width: 58px; height: 58px; transform: scale(calc(1 + 0.16 * var(--gdk, 0))); transition: transform 0.6s ease, filter 0.6s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 calc(2px + 10px * var(--gdk, 0)) rgba(255, 255, 255, calc(0.9 * var(--gdk, 0))))
    drop-shadow(0 0 calc(4px + 26px * var(--gdk, 0)) rgba(255, 217, 119, calc(0.75 * var(--gdk, 0)))); }
.gdgem svg { width: 100%; height: 100%; display: block; animation: gdfloat 3.2s ease-in-out infinite; }
@keyframes gdfloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.gdpot { display: grid; gap: 1px; min-width: 0; }
.gdpot .glabel { color: rgba(255, 255, 255, 0.75); }
.gdpot b { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the two pots, one line each: CUBE, and under it the SOL in gold, each with its unit small beside it */
.gdpot b small { font-family: var(--f-body); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; opacity: 0.8; margin-left: 5px; }
.gdpot b.gdsol { font-size: 20px; color: #ffd977; text-shadow: 0 1px 2px rgba(46, 16, 101, 0.6); }
.gdpot b.gdsol[hidden] { display: none; }
.gdsub { font-size: 12px; opacity: 0.85; }
.gdenter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.gdenter input { font: inherit; font-family: var(--f-mono); min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 12px; min-width: 0; }
.gdenter input:focus-visible { outline: 2px solid var(--gd); outline-offset: 1px; }
.gdenter input { -moz-appearance: textfield; appearance: textfield; }
.gdenter input::-webkit-outer-spin-button, .gdenter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gdenter .btn { box-shadow: none; min-height: 44px; background: var(--gd-a); color: #fff; border-color: transparent; }
/* Autospend Dust: a switch and its filter, under the manual entry */
.autodust { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.autodust.on { border-color: var(--gd); box-shadow: inset 3px 0 0 var(--gd); }
.autodust .adon { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--fg); cursor: pointer; }
.autodust .adon input { width: 18px; height: 18px; accent-color: var(--gd); margin: 0; }
.autodust .admin { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.autodust .admin input { width: 9em; font: inherit; font-family: var(--f-mono); min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 8px; }
.autodust .admin input:focus-visible { outline: 2px solid var(--gd); outline-offset: 1px; }
.autodust .note { margin: 0; }
.autodust .adsplit { display: grid; gap: 2px; }
.autodust .adsplit-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.autodust .adsplit-head b { font-family: var(--f-mono); font-weight: 700; }
.autodust .adgeo b { color: var(--gd-text); }
.autodust .adfin b { color: var(--r5-text); }
.autodust .adsplit input[type=range] { width: 100%; margin: 0; min-height: 28px; accent-color: var(--gd); }
.gdlast { display: grid; gap: 6px; }
/* Previous Geodes: a section that opens into one per Geode, each opening into its winners */
.gdprev > summary { cursor: pointer; }
#gdPrev { display: grid; gap: 6px; margin-top: 8px; }
.gdold { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.gdold > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 8px 10px; cursor: pointer; font-size: 12.5px; }
.gdold > summary .nm { font-weight: 600; }
.gdold > summary .meta { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gdold > summary .amt { font-family: var(--f-mono); font-size: 12px; color: var(--gd-text); }
.gdold[open] > summary { border-bottom: 1px solid var(--line); }
.gdold > .gdlast { padding: 8px; }
.gdrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; }
.gdrow.mine { border-color: var(--gd); box-shadow: inset 3px 0 0 var(--gd); }
.gdrow .rk { font-family: var(--f-mono); color: var(--muted); font-size: 11.5px; }
.gdrow .who { display: grid; min-width: 0; }
.gdrow .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gdrow .meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.gdrow .amt { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
#geode .sheethead h2 span { color: var(--gd-text); }
#sGeode { color: var(--gd-text); }

/* ---------- walkthrough ---------- */
/* the shade and the ring catch presses; a step's own button (.tring.tap) can be pressed through the hole */
.tour { position: fixed; inset: 0; z-index: 30; animation: tfade 0.25s ease; pointer-events: none; }
.tshade, .tcard { pointer-events: auto; }
.tring.tap { pointer-events: none; }
.tour.tout { opacity: 0; transition: opacity 0.2s ease; }
.tshade {
  position: fixed; inset: 0; background: rgba(6, 9, 8, 0.58);
  -webkit-backdrop-filter: blur(4px) saturate(0.8); backdrop-filter: blur(4px) saturate(0.8);
  transition: clip-path 0.35s cubic-bezier(.2, .8, .3, 1);
}
.tring {
  position: fixed; border-radius: 14px; pointer-events: auto;
  box-shadow: 0 0 0 2px var(--accent), 0 0 22px 4px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 18px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: left 0.35s cubic-bezier(.2, .8, .3, 1), top 0.35s cubic-bezier(.2, .8, .3, 1), width 0.35s cubic-bezier(.2, .8, .3, 1), height 0.35s cubic-bezier(.2, .8, .3, 1);
  animation: tglow 1.8s ease-in-out infinite;
}
.tcard {
  position: fixed; width: min(360px, calc(100vw - 24px)); box-sizing: border-box;
  display: grid; gap: 10px; padding: 16px 16px 14px; border-radius: 16px;
  background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: left 0.35s cubic-bezier(.2, .8, .3, 1), top 0.35s cubic-bezier(.2, .8, .3, 1);
}
.tcard.tin { animation: tpop 0.3s cubic-bezier(.2, .8, .3, 1.15); }
.tcard h2 { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.tcard p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.thead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tstep { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.tskip { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.tskip:hover { color: var(--fg); border-color: var(--muted); }
.tdots { display: flex; gap: 5px; }
.tdots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width 0.25s ease, background 0.25s ease; }
.tdots i.done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tdots i.on { width: 18px; background: var(--accent); }
.tbtns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tbtns .btn { box-shadow: none; min-height: 40px; font-size: 13.5px; }
.tskip:focus-visible, .tbtns .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes tglow {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 18px 2px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 14px color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--accent), 0 0 30px 8px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent); }
}
@keyframes tpop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes tfade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tour, .tring, .tcard.tin { animation: none; }
  .tshade, .tring, .tcard { transition: none; }
}

/* ---------- Beta Registry and the feedback form ---------- */
.fb { width: min(560px, calc(100vw - 24px)); max-height: min(86dvh, 820px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--fg); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.fb::backdrop { background: rgba(6, 9, 8, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fb[open] { animation: tpop 0.25s cubic-bezier(.2, .8, .3, 1.1); }
.fb form { display: grid; gap: 14px; padding: 18px 18px 16px; }
.fbhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fbhead h2 { margin: 0; font-family: var(--f-display); font-size: 16px; letter-spacing: 0.02em; }
.fbqs { display: grid; gap: 12px; }
.fbq { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: grid; gap: 8px; min-width: 0; }
.fbq legend { float: left; width: 100%; padding: 0; font-weight: 600; font-size: 13.5px; line-height: 1.35; margin-bottom: 2px; }
.fbscale { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; clear: both; }
.fbscale label, .fbchips label { position: relative; cursor: pointer; }
.fbscale input, .fbchips input { position: absolute; opacity: 0; pointer-events: none; }
.fbscale span { display: grid; place-items: center; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-family: var(--f-mono); font-size: 13px; transition: background 0.12s ease, color 0.12s ease; }
.fbscale input:checked + span, .fbchips input:checked + span { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.fbscale input:focus-visible + span, .fbchips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fbends { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11.5px; }
.fbchips { display: flex; flex-wrap: wrap; gap: 6px; clear: both; }
.fbchips span { display: inline-block; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; }
.fbq textarea { clear: both; font: inherit; font-size: 13.5px; min-height: 64px; resize: vertical; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 8px 10px; }
.fbq textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb .msg { margin: 0; font-size: 13px; padding: 8px 10px; border-radius: 9px; }
.fb .msg.err { background: color-mix(in srgb, var(--lock) 14%, transparent); color: var(--lock); }

.confirm { width: min(380px, calc(100vw - 24px)); }
/* the season's end: the Final Cube's two prizes and the top 10 */
.fin { width: min(440px, calc(100vw - 24px)); }
.fin form { overflow-y: auto; max-height: min(86dvh, 820px); }
.finprizes { display: grid; gap: 8px; }
.finprize { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.finprize .what { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.finprize b { font-size: 15px; overflow-wrap: anywhere; }
.finprize .amt { font-family: var(--f-mono); font-size: 13.5px; align-self: center; }
.finprize.me { border-color: var(--accent); }
.finh { margin: 2px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.finboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.finboard li { display: grid; grid-template-columns: 22px auto 1fr auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 13.5px; }
.finboard li:nth-child(-n+3) { font-weight: 600; }
.finboard li.me { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.finboard .rk { font-family: var(--f-mono); color: var(--muted); text-align: right; }
.finboard .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finboard .n { font-family: var(--f-mono); font-size: 12.5px; }
/* the first-visit intro: why to play, in three lines */
.intro form { gap: 16px; padding: 22px 20px 18px; }
/* out of tools: what to do next, one tap away */
.ot .ottext { margin: 0; font-size: 15px; line-height: 1.45; }
.ot .ottext b { font-family: var(--f-mono); }
.ot .note { margin: 0; }
/* the card's tool line, when there's nothing to dig with: a button to get some */
.equip.cta { justify-content: center; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 700; animation: ctapulse 1.6s ease-in-out infinite; }
.equip.cta .gem, .equip.cta .sub { display: none; }
@keyframes ctapulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); } }
.introtitle { margin: 0; font-family: var(--f-display); font-size: 22px; letter-spacing: 0.02em; }
.introsteps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: st; }
.introsteps li { counter-increment: st; display: grid; grid-template-columns: 26px 1fr; align-items: baseline; font-size: 15px; line-height: 1.4; }
.introsteps li::before { content: counter(st); width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font: 700 12px/20px var(--f-mono); text-align: center; }
.introsteps li:last-child::before { background: var(--r5); color: #1a1200; }
.introsteps b { font-weight: 700; }
#introPot { color: var(--r5-text); font-weight: 600; }
.intro .note { margin: 0; }

/* the human check */
.hc { width: min(380px, calc(100vw - 24px)); }
.hcbody { display: grid; gap: 12px; padding: 18px 18px 16px; }
.hcbody .note { margin: 0; }
/* above the controls bar */
.tspanel { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 60; width: min(340px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-solid); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 0.2s, transform 0.2s; }
.tspanel.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.tspanel p { margin: 0; }
.tspanel .msg { font-size: 13px; padding: 6px 9px; border-radius: 9px; background: color-mix(in srgb, var(--lock) 14%, transparent); color: var(--lock); }
.tsbox { display: flex; justify-content: center; }
.hcprompt { margin: 0; text-align: center; font-family: var(--f-display); font-size: 20px; letter-spacing: 0.02em; }
.hcpuzzle { display: grid; gap: 10px; }
.hctiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hctiles button { padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #f1f1f1; aspect-ratio: 1; overflow: hidden; cursor: pointer; touch-action: manipulation; transition: opacity 0.2s; }
.hctiles button:disabled { opacity: 0.5; cursor: default; }
.hc:focus { outline: none; }
.hctiles button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hctiles img { width: 100%; height: 100%; display: block; pointer-events: none; }
.hcfoot { font-size: 12px; opacity: 0.75; }
@media (max-width: 380px) { .fbscale span { min-height: 32px; font-size: 12px; } }

/* the grand prize line under the layer bar */
/* the Guide: a contents strip over a scrolling body */
.guide[open] { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); width: min(760px, calc(100vw - 24px)); height: min(88dvh, 900px); }
.guidehead { padding: 16px 18px 8px; }
.guidenav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 18px 12px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.guidenav button { flex: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.guidenav button[aria-current="true"] { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.guidebody { overflow-y: auto; padding: 4px 18px 24px; scroll-behavior: smooth; }
.guidebody section { padding-top: 14px; scroll-margin-top: 4px; }
.guidebody h3 { margin: 0 0 8px; font-family: var(--f-display); font-size: 14px; letter-spacing: 0.02em; }
.guidebody p, .guidebody li { font-size: 13px; line-height: 1.55; color: var(--fg); }
.guidebody p { margin: 0 0 8px; }
.guidebody ul { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.guidebody .tablewrap { margin: 2px 0 10px; }
.guidebody .lb td { white-space: normal; vertical-align: top; padding: 6px 6px; }
.guidebody .lb th { padding: 0 6px 6px; }
.guidebody dl { margin: 0 0 10px; display: grid; gap: 8px; }
.guidebody dt { font-weight: 700; font-size: 12.5px; }
.guidebody dd { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.guidebody a { color: var(--accent); }
.sptable td, .sptable th { padding: 7px 8px; }
.sptable tr.here td { color: var(--fg); font-weight: 600; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sptable td.n { font-family: var(--f-mono); }

/* sound: the mute button beside the ?; Me → Sound and Controls */
.sndbtn { display: grid; place-items: center; }
.sndbtn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sndbtn[aria-pressed="true"] { color: var(--lock); border-color: var(--lock); }
.prefs .prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); cursor: pointer; }
.prefs .prow.vol { grid-template-columns: 4.5em minmax(0, 1fr) 3em; }
.prefs .prow input[type=range] { width: 100%; margin: 0; }
.prefs .prow output { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--muted); text-align: right; }
/* switches: a track and a knob, not a tick box */
.prefs input[type=checkbox][role=switch], .chalhide input[type=checkbox][role=switch] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background 0.15s; }
.prefs input[type=checkbox][role=switch]::after, .chalhide input[type=checkbox][role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.prefs input[type=checkbox][role=switch]:checked, .chalhide input[type=checkbox][role=switch]:checked { background: var(--accent); }
.prefs input[type=checkbox][role=switch]:checked::after, .chalhide input[type=checkbox][role=switch]:checked::after { transform: translateX(16px); }
.prefs input[type=checkbox][role=switch]:focus-visible, .chalhide input[type=checkbox][role=switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prefs .tracks { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.prefs .tracks button { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 600; min-height: 34px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; -webkit-appearance: none; appearance: none; }
.prefs .tracks button[aria-pressed="true"] { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); }
.prefs .tracks button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* off: an empty ring; on: a filled disc with a tick */
.prefs .tracks .mark { position: relative; flex: none; width: 15px; height: 15px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid currentColor; }
.prefs .tracks button[aria-pressed="true"] .mark { background: var(--accent-fg); border-color: var(--accent-fg); }
.prefs .tracks button[aria-pressed="true"] .mark::after { content: ""; position: absolute; left: 4.2px; top: 1.6px; width: 3.4px; height: 7px; border: solid var(--accent); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
/* the loop playing now: three moving bars */
.prefs .tracks .eq { display: none; align-items: flex-end; gap: 2px; height: 11px; }
.prefs .tracks button.playing .eq { display: inline-flex; }
.prefs .tracks .eq i { width: 2.5px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; animation: eqbar 0.9s ease-in-out infinite alternate; }
.prefs .tracks .eq i:nth-child(2) { animation-delay: -0.3s; }
.prefs .tracks .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eqbar { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .prefs .tracks .eq i { animation: none; } .prefs .tracks .eq i:nth-child(2) { transform: scaleY(0.6); } }
/* the settings window */
.sets[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(520px, calc(100vw - 24px)); max-height: min(88dvh, 860px); }
.sethead { padding: 16px 18px 10px; }
.settabs { margin: 0 18px 10px; justify-self: start; }
.setbody { overflow-y: auto; padding: 2px 18px 18px; }
.setpage { display: grid; gap: 14px; }
.setsec { display: grid; gap: 4px; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.setsec h3.sechead { margin: 4px 0 2px; }
.setpage.muted .dims { opacity: 0.5; }
.sgroups { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.sgrow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.sgrow .prow { min-height: 44px; }
.sgrow.off .prow span { color: var(--muted); }
.sgplay { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.sgplay svg { width: 10px; height: 10px; margin-left: 2px; }
.sgplay:hover { border-color: var(--accent); }
.sgplay.hit { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.sgplay:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Me: Profile, Crew and Friends tabs */
#me .sheethead { flex-wrap: nowrap; }
#me .mtabs { margin-right: auto; }
.mpanel { display: grid; gap: 14px; align-content: start; }
.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.pstats > * { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; color: inherit; text-align: left; }
button.tile { cursor: pointer; }
button.tile:hover { border-color: var(--accent); }
.pstats .k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstats .v { display: block; margin-top: 3px; font-family: var(--f-mono); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstats .v.dim { color: var(--muted); font-family: var(--f-body); font-weight: 500; font-size: 12.5px; }
.menulist { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.mrow { font: inherit; color: inherit; text-align: left; background: none; border: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; text-decoration: none; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mrow .t { display: block; font-weight: 600; font-size: 13.5px; }
.mrow .s { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.mrow::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 3px; }
.mrow.ext::after { content: "↗"; width: auto; height: auto; border: 0; transform: none; margin: 0; color: var(--muted); font-size: 13px; }
.quiet { justify-self: center; }
.quiet.danger { color: var(--lock); }
.more { justify-self: start; }
.crewrow .nmline { display: flex; align-items: center; min-width: 0; font-weight: 600; }
.crewrow .nmline .crewtag, .crewhero .crewtag { margin-left: 6px; }
.crewrow .nmline .dot { flex: none; }
.crewrow .cubes { color: var(--muted); font-size: 11.5px; font-family: var(--f-mono); white-space: nowrap; }
.crewhero { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--cc, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--cc, var(--line)) 12%, var(--bg)); }
.crewhero .big { display: flex; align-items: center; min-width: 0; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: 0.01em; }
.crewhero .big .crewtag { font-family: var(--f-mono); font-size: 11px; padding: 2px 6px; color: var(--fg); letter-spacing: 0; }
.crewhero .meta { color: var(--muted); font-size: 12.5px; }
.crewstart form { padding: 0 12px 12px; }
.reflink { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.reflink .code { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.mpanel form.row .btn, .setsec form.row .btn { flex: 0 0 auto; }
/* a dialog's forms are padded grids; the seed form in Settings is a plain row */
.setsec form.row { display: flex; padding: 0; gap: 8px; }
/* the Beta Tester challenge: a wallet field instead of a progress bar */
.chal.beta { border-color: color-mix(in srgb, var(--gd) 60%, var(--line)); background: color-mix(in srgb, var(--gd) 8%, var(--bg)); }
.chal.beta .pr { color: var(--gd-text); }
.chal.beta.done { border-color: var(--ok); background: var(--bg); }
.chal.beta.done .pr { color: var(--ok-text); }
.chal.beta form { margin: 2px 0; }
.chal.beta .gdenter input { font-size: 12.5px; }
.chal .rw .pair { display: flex; gap: 6px; align-items: center; flex: none; }
/* Settings → Fair play */
.hashrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; }
.hashrow + .hashrow { border-top: 1px solid var(--line); }
.hashrow .k { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.hashrow .v { display: block; font-family: var(--f-mono); font-size: 12.5px; }
.hashrow .btn { box-shadow: none; min-height: 30px; padding: 0 10px; font-size: 12px; }
.setsec .note { margin: 0 0 6px; }

/* what the cube floats in front of (backdrop.js): ours are layered gradients over generated stars and grain, or the player's own picture */
.backdrop { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.backdrop::before { content: ""; position: absolute; inset: 0; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--dim, 0)); }
#backdrop[data-bg="void"] { display: none; }
.backdrop[data-bg="void"]::before { background: var(--stage); }
.backdrop[data-bg="stars"]::before { background: var(--stars-near) 0 0 / 768px, var(--stars-far) 0 0 / 512px, radial-gradient(120% 80% at 50% 110%, #13254d 0%, #070b18 55%, #03040a 100%); }
.backdrop[data-bg="nebula"]::before {
  background: var(--stars-near) 0 0 / 768px, var(--stars-far) 0 0 / 512px,
    radial-gradient(38% 30% at 28% 32%, rgba(139, 92, 246, 0.55), transparent 70%), radial-gradient(42% 34% at 72% 62%, rgba(20, 184, 166, 0.4), transparent 70%),
    radial-gradient(28% 24% at 58% 22%, rgba(236, 72, 153, 0.3), transparent 70%), radial-gradient(60% 50% at 40% 78%, rgba(59, 130, 246, 0.25), transparent 75%), #06050f;
}
.backdrop[data-bg="mine"]::before {
  background: var(--grain) 0 0 / 256px, radial-gradient(70% 45% at 50% 105%, rgba(251, 146, 60, 0.35), transparent 70%),
    radial-gradient(40% 30% at 15% 20%, rgba(120, 85, 50, 0.35), transparent 70%), radial-gradient(45% 35% at 85% 30%, rgba(100, 70, 45, 0.3), transparent 70%),
    linear-gradient(180deg, #1b130c 0%, #120c07 60%, #0b0704 100%);
}
.backdrop[data-bg="dusk"]::before { background: radial-gradient(60% 30% at 50% 100%, rgba(253, 186, 116, 0.6), transparent 70%), linear-gradient(180deg, #1e1b4b 0%, #4c1d95 35%, #be185d 66%, #f97316 90%, #fdba74 100%); }
.backdrop[data-bg="aurora"]::before {
  background: var(--stars-far) 0 0 / 512px, radial-gradient(70% 22% at 30% 30%, rgba(52, 211, 153, 0.45), transparent 70%),
    radial-gradient(60% 18% at 70% 22%, rgba(45, 212, 191, 0.35), transparent 70%), radial-gradient(50% 16% at 50% 40%, rgba(167, 139, 250, 0.3), transparent 70%),
    linear-gradient(180deg, #020617 0%, #06202a 55%, #0b1d17 100%);
}
.backdrop[data-bg="picture"]::before { background: var(--pic) center / cover no-repeat, #000; filter: blur(var(--blur, 0px)); transform: scale(var(--bgscale, 1)); }
/* the hint under the cube reads on a dark backdrop, whatever the theme */
.backdrop-on .hint { color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9); }

/* Settings → Look: a preview of each */
.bggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 2px 0 8px; }
.bgtile { display: grid; gap: 4px; padding: 4px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.bgtile .backdrop { position: relative; display: block; height: 58px; border-radius: 8px; }
.bgtile .backdrop::before, .bgtile .backdrop::after { border-radius: 8px; }
.bgtile .backdrop[data-bg="add"]::before { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border: 1px dashed var(--line); }
.bgtile .backdrop[data-bg="add"]::after { content: "+"; display: grid; place-items: center; background: none; color: var(--accent); font-size: 26px; font-weight: 500; }
.bgtile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bgtile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bgname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bgPicActs { padding-top: 4px; }
.setlinks { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 2px 0; }
/* the Guide's own buttons, under its title */
.guideacts { display: flex; gap: 8px; padding: 0 18px 10px; }
.guideacts .btn { box-shadow: none; min-height: 36px; font-size: 13px; flex: 1 1 0; }
/* Live → Crews: tap a crew to pick it, then Join under the table */
.lb tr.pick { cursor: pointer; }
.lb tr.sel td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lb tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
#lbJoin .crewrow { border-color: var(--accent); }
#lbJoin .btn { white-space: nowrap; }

/* sharing a moment (cards.js): the picture and its words in a box, a pill that offers it the moment it happens,
   and the player's own moments under Me, in the feed's rows with a share button on the end */
.fb.share { width: min(460px, calc(100vw - 24px)); }
.shimg { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #0a0f24; }
.shimg img { display: block; width: 100%; height: 100%; }
.shwait { color: #c9d1ff; font-size: 13px; padding: 0 16px; text-align: center; }
.shcap { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.fb.share a.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.sharepill {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); z-index: 21;
  bottom: calc(var(--safe-b) + var(--barh) + 66px);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg); font: inherit; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); cursor: pointer;
  animation: tpop 0.3s cubic-bezier(.2, .8, .3, 1.15);
}
.sharepill svg, .feed .fsh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sharepill:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.gacha-open .sharepill { top: calc(var(--safe-t) + 66px); bottom: auto; }
.meshare .livehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meshare .btn { min-height: 34px; font-size: 13px; padding: 0 12px; }
.feed li.shr { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.feed .fsh { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-solid); color: var(--accent); cursor: pointer; }
.feed .fsh:hover { border-color: var(--accent); }
.feed .fsh:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* the Geode's pot, shared from its banner */
.gdsharebtn { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; margin-left: auto; padding: 0; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; }
.gdsharebtn:hover { background: rgba(255, 255, 255, 0.24); }
.gdsharebtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gdsharebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
