/* SCDO Ledger Tycoon — polished prototype styles (UX: larger type + EN|華語) */
:root {
  --bg: #0b1220;
  --bg-2: #121a2b;
  --panel: #162033;
  --panel-2: #1c2940;
  --border: #2a3a55;
  --text: #e8eef8;
  --muted: #93a4bf;
  --accent: #3dd6c6;
  --accent-2: #5b8cff;
  --warn: #f0b429;
  --danger: #ff6b7a;
  --ok: #4ade80;
  --chip: #f5d76e;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --font: "Segoe UI", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body: 17px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a3a4a 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a2a55 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--body);
}

body { padding: 14px; }

.app {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #041018;
  letter-spacing: -0.5px;
  box-shadow: 0 0 20px rgba(61,214,198,.35);
}
.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
}
.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pill {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.95rem;
  color: var(--muted);
}
.pill strong { color: var(--text); }

/* Language switch — EN | 華語 (owner UX rule) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(61,214,198,.1);
  box-shadow: 0 0 0 1px rgba(61,214,198,.15);
}
.lang-sep { color: var(--muted); font-weight: 700; user-select: none; }
.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.lang-btn[aria-pressed="true"] {
  color: #041018;
  background: var(--accent);
}
.lang-btn:hover:not([aria-pressed="true"]) {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

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

.board-wrap {
  position: relative;
  background: linear-gradient(160deg, #142033, #0f1828);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Floating next-step bubble — centered over board's hollow center (not over track tiles) */
.ops-bubble {
  display: none;
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, 0);
  width: min(92%, 300px);
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(61, 214, 198, 0.65);
  background: linear-gradient(180deg, rgba(20,32,51,.97), #0f1828 60%);
  box-shadow: 0 12px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(61,214,198,.22);
  text-align: left;
  z-index: 6;
  pointer-events: auto;
}
.ops-bubble.show { display: block; }
.ops-bubble[hidden] { display: none !important; }
.ops-bubble .ops-bubble-prompt {
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}
.ops-bubble .ops-bubble-prompt:not(.show) { display: none; }
.ops-bubble .actions { gap: 8px; }
.ops-bubble .btn {
  padding: 10px 12px;
  font-size: 0.92rem;
  min-height: 40px;
}

/* Click-to-roll affordance on dice */
.dice-row.dice-armed {
  cursor: pointer;
  border-radius: 16px;
  padding: 6px 10px;
  outline: 2px solid rgba(61,214,198,.45);
  outline-offset: 4px;
  background: rgba(61,214,198,.08);
  animation: diceArmPulse 1.6s ease-in-out infinite;
}
.dice-row.dice-armed:hover {
  outline-color: var(--accent);
  background: rgba(61,214,198,.14);
}
.dice-row.dice-armed:focus-visible {
  outline: 2px solid var(--accent);
}
.dice-hint {
  margin: 2px 0 0;
  min-height: 1.2em;
  color: var(--accent);
  font-weight: 750;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.dice-hint:empty { display: none; }
@keyframes diceArmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,214,198,.25); }
  50% { box-shadow: 0 0 18px 2px rgba(61,214,198,.35); }
}

.board {
  --cell: min(104px, 13.5vw);
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  grid-template-rows: repeat(7, var(--cell));
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.tile {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.tile .stripe {
  height: 10px;
  flex-shrink: 0;
}
.tile .body {
  flex: 1;
  padding: 5px 6px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  min-height: 0;
}
.tile .name {
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}
.tile .price {
  font-size: 0.75rem;
  color: var(--chip);
  font-family: var(--mono);
}
.tile.corner .name { font-size: 0.88rem; }
.tile.special { background: #18263c; }
.tile.chance { background: linear-gradient(160deg, #1a2740, #24355a); }
.tile.fee { background: linear-gradient(160deg, #2a1c28, #3a2432); }
.tile.go { background: linear-gradient(145deg, #12352f, #1a4a40); border-color: #2a7a6a; }
.tile.jail { background: linear-gradient(145deg, #2a2438, #3a3050); }
.tile.park { background: linear-gradient(145deg, #1e2a3a, #243448); }

.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 14px;
  align-items: flex-end;
}
.token {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.token.p0 { background: #3dd6c6; }
.token.p1 { background: #ff8a5b; }
.token.p2 { background: #a78bfa; }

.owner-dot {
  position: absolute;
  top: 12px; right: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7);
}
.level-marks {
  position: absolute;
  bottom: 3px; right: 4px;
  display: flex; gap: 2px;
}
.level-marks i {
  width: 5px; height: 5px;
  border-radius: 1px;
  background: var(--warn);
  display: block;
}

.center {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  border-radius: 12px;
  border: 1px dashed #334866;
  background:
    radial-gradient(circle at 30% 30%, rgba(61,214,198,.12), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(91,140,255,.12), transparent 40%),
    #101828;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  text-align: center;
}
.center h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
.center .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.4;
}

.dice-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.die {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  padding: 7px;
  gap: 2px;
  box-sizing: border-box;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.25);
  transform-style: preserve-3d;
  user-select: none;
}
.die .pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .05s linear, transform .05s linear;
}
.die[data-v] .pip { transform: scale(1); }
/* Classic pip layouts (3×3 cells, 1=TL … 9=BR) */
.die[data-v="1"] .pip:nth-child(5),
.die[data-v="2"] .pip:nth-child(1),
.die[data-v="2"] .pip:nth-child(9),
.die[data-v="3"] .pip:nth-child(1),
.die[data-v="3"] .pip:nth-child(5),
.die[data-v="3"] .pip:nth-child(9),
.die[data-v="4"] .pip:nth-child(1),
.die[data-v="4"] .pip:nth-child(3),
.die[data-v="4"] .pip:nth-child(7),
.die[data-v="4"] .pip:nth-child(9),
.die[data-v="5"] .pip:nth-child(1),
.die[data-v="5"] .pip:nth-child(3),
.die[data-v="5"] .pip:nth-child(5),
.die[data-v="5"] .pip:nth-child(7),
.die[data-v="5"] .pip:nth-child(9),
.die[data-v="6"] .pip:nth-child(1),
.die[data-v="6"] .pip:nth-child(3),
.die[data-v="6"] .pip:nth-child(4),
.die[data-v="6"] .pip:nth-child(6),
.die[data-v="6"] .pip:nth-child(7),
.die[data-v="6"] .pip:nth-child(9) {
  opacity: 1;
}
.die.rolling {
  animation: die-tumble .18s linear infinite;
}
.die.settle {
  animation: die-settle .14s ease-out;
}
@keyframes die-tumble {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  25%  { transform: translateY(-7px) rotate(-14deg) scale(1.06); }
  50%  { transform: translateY(2px) rotate(10deg) scale(0.96); }
  75%  { transform: translateY(-5px) rotate(16deg) scale(1.05); }
  100% { transform: translateY(0) rotate(-6deg) scale(1); }
}
@keyframes die-settle {
  0%   { transform: scale(1.12) rotate(-4deg); }
  60%  { transform: scale(0.96) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.players { display: flex; flex-direction: column; gap: 10px; }
.player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid transparent;
}
.player.active {
  border-color: var(--accent);
  background: rgba(61,214,198,.08);
  box-shadow: 0 0 0 1px rgba(61,214,198,.15);
}
.player.bankrupt { opacity: 0.45; filter: grayscale(.4); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.avatar.p0 { background: #3dd6c6; }
.avatar.p1 { background: #ff8a5b; }
.avatar.p2 { background: #a78bfa; }
.player .who { font-weight: 700; font-size: 1.05rem; }
.player .role { color: var(--muted); font-size: 0.88rem; }
.chips {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--chip);
  font-size: 1.05rem;
  white-space: nowrap;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.actions .wide { grid-column: 1 / -1; }

button.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
  font-family: inherit;
}
button.btn:hover:not(:disabled) {
  background: #243552;
  border-color: #3d5377;
}
button.btn:active:not(:disabled) { transform: scale(.98); }
button.btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  filter: grayscale(0.55);
  box-shadow: none;
  pointer-events: none;
}
button.btn.primary:disabled,
button.btn.warn:disabled {
  background: #2a3548;
  color: #7a8699;
  border-color: var(--border);
  filter: grayscale(0.7);
}
button.btn.primary {
  background: linear-gradient(135deg, #2bbfaf, #3dd6c6);
  color: #042018;
  border-color: transparent;
}
button.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d0bf, #55e0d1);
}
button.btn.ghost { background: transparent; }
button.btn.warn {
  background: linear-gradient(135deg, #d4a017, #f0b429);
  color: #2a1c00;
  border-color: transparent;
}

.log {
  max-height: 260px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.92rem;
  line-height: 1.4;
}
.log .entry {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border-left: 3px solid var(--border);
  color: #c5d0e2;
}
.log .entry.gain { border-left-color: var(--ok); }
.log .entry.lose { border-left-color: var(--danger); }
.log .entry.info { border-left-color: var(--accent-2); }
.log .entry.sys { border-left-color: var(--warn); }

.prompt {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(91,140,255,.1);
  border: 1px solid rgba(91,140,255,.35);
  font-size: 0.98rem;
  line-height: 1.45;
}
.prompt.show { display: block; }
.prompt strong { color: var(--accent); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4,8,16,.72);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 16px;
}
.modal-backdrop.show { display: grid; }
.modal {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal h2 { margin: 0 0 10px; font-size: 1.35rem; }
.modal p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; font-size: 1.02rem; }
.modal .row { display: flex; gap: 8px; flex-wrap: wrap; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  justify-content: center;
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--muted);
}
.swatch i {
  width: 12px; height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 4px 0 8px;
}

/* Color groups */
.c-brown { background: #8b5e3c; }
.c-cyan { background: #38bdf8; }
.c-pink { background: #f472b6; }
.c-orange { background: #fb923c; }
.c-red { background: #f87171; }
.c-yellow { background: #facc15; }
.c-green { background: #4ade80; }
.c-blue { background: #60a5fa; }
.c-util { background: #94a3b8; }
.c-hub { background: #a78bfa; }

@media (max-width: 560px) {
  :root { --body: 15px; }
  .board { --cell: min(52px, 13.5vw); gap: 3px; }
  .tile .name { font-size: 0.58rem; }
  .tile .price { font-size: 0.55rem; }
  .die { width: 44px; height: 44px; padding: 5px; }
  .die .pip { width: 7px; height: 7px; }
  .center h2 { font-size: 1rem; }
  .center .tagline { font-size: 0.8rem; }
  .brand h1 { font-size: 1.15rem; }
  .lang-btn { font-size: 0.95rem; }
}

.rules-banner {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(61,214,198,.4);
  background: linear-gradient(135deg, rgba(61,214,198,.14), rgba(91,140,255,.1));
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.rules-banner.hidden { display: none; }
.rules-banner em { color: var(--accent); font-style: normal; font-weight: 700; }
.banner-dismiss {
  margin-left: auto;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
}
.banner-dismiss:hover { border-color: var(--accent); }

.chip-amt {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--chip);
  font-size: 1.05em;
}
.chip-amt::before { content: "◆ "; opacity: .85; }

@media (max-width: 420px) {
  .board { --cell: min(54px, 14vw); gap: 3px; }
  .tile .name { font-size: 0.56rem; }
  .tile .price { font-size: 0.52rem; }
  .layout { gap: 10px; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .btn { min-height: 44px; }
}

.log-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0 0 10px; font-size: 0.85rem; color: var(--muted);
}
.log-legend span { display: inline-flex; align-items: center; gap: 5px; }
.log-legend i {
  width: 9px; height: 9px; border-radius: 2px; display: inline-block;
}
.log-legend .lg-sys { background: var(--warn); }
.log-legend .lg-info { background: var(--accent-2); }
.log-legend .lg-gain { background: var(--ok); }
.log-legend .lg-lose { background: var(--danger); }
.tile[title] { cursor: help; }

html[lang="zh-Hant"] .tile .name {
  font-size: 0.78rem;
  letter-spacing: 0;
}


/* Atlas Ledger panel */
.atlas-card .atlas-tag,
.atlas-modal .atlas-tag {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.atlas-status {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--warn);
  font-family: var(--mono);
}
.atlas-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.atlas-who { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.atlas-n { font-size: 1.25rem; font-weight: 800; }
.atlas-n span { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.atlas-sub { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.atlas-mid { text-align: center; padding: 0 6px; }
.atlas-h2h { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.atlas-scoreline { font-size: 1.6rem; font-weight: 800; color: var(--chip); line-height: 1.2; }
.atlas-lead { font-size: 0.85rem; color: var(--ok); margin-top: 4px; }
.atlas-recent {
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}
.atlas-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0,0,0,.18);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.atlas-hash { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); }
.atlas-tx { font-size: 0.78rem; color: var(--muted); margin-left: auto; }
.atlas-empty { color: var(--muted); margin: 0; }
.atlas-modal { max-width: 560px; width: min(560px, 94vw); }
.atlas-modal h3 { margin: 0 0 8px; font-size: 1rem; color: var(--muted); font-weight: 600; }


/* Live ledger records (always-visible sidebar + modal) */
.atlas-top-btn {
  padding: 8px 16px !important;
  border-radius: 999px !important;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(61, 214, 198, 0.35), 0 0 18px rgba(61, 214, 198, 0.25);
}
.atlas-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.atlas-live-head h3,
.atlas-live-head h2 {
  margin: 0;
}
.atlas-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #041018;
  background: var(--ok, #3dd6a5);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}
.atlas-live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #041018;
  box-shadow: 0 0 0 0 rgba(4, 16, 24, 0.5);
  animation: atlasPulse 1.4s infinite;
}
.atlas-live-badge.flash {
  animation: atlasFlash 0.6s ease;
}
@keyframes atlasPulse {
  0% { box-shadow: 0 0 0 0 rgba(4, 16, 24, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(4, 16, 24, 0); }
  100% { box-shadow: 0 0 0 0 rgba(4, 16, 24, 0); }
}
@keyframes atlasFlash {
  0% { filter: brightness(1.4); }
  100% { filter: brightness(1); }
}
.atlas-card {
  border: 1px solid rgba(61, 214, 198, 0.35);
  background: linear-gradient(180deg, rgba(61, 214, 198, 0.08), transparent 48%), var(--bg-1, #121a28);
}
.atlas-subhead {
  margin: 8px 0 6px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}
.atlas-score-mini .atlas-vs {
  padding: 8px;
  gap: 8px;
  margin-bottom: 8px;
}
.atlas-score-mini .atlas-n { font-size: 1.05rem; }
.atlas-score-mini .atlas-scoreline { font-size: 1.25rem; }
.atlas-recent-live {
  max-height: 160px;
}
.atlas-row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.atlas-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
  font-size: 0.75rem;
}
.atlas-roll { font-family: var(--mono); font-weight: 700; }
.atlas-chipstat { color: var(--muted); font-size: 0.82rem; }
a.atlas-status-pill { text-decoration: none; cursor: pointer; }
a.atlas-status-pill:hover { filter: brightness(1.12); }
.atlas-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: lowercase;
}
.atlas-status-pill.ok {
  color: #041018;
  background: var(--ok, #3dd6a5);
  border-color: transparent;
}
.atlas-status-pill.pending {
  color: var(--warn, #f0c674);
  background: rgba(240, 198, 116, 0.12);
  border-color: rgba(240, 198, 116, 0.35);
}
.atlas-tx.muted { color: var(--muted); }
.atlas-mini-actions { margin-top: 10px; }
.atlas-modal { max-width: 640px; width: min(640px, 96vw); }
.atlas-modal .atlas-recent-live { max-height: 360px; }
@media (max-width: 900px) {
  .atlas-recent-live { max-height: 220px; }
}


/* History discoverability when current game has 0 rolls (2026-10-24b) */
.atlas-hist-cta { margin: 8px 0 4px; }
.atlas-hist-link {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.atlas-hist-link.primary {
  display: inline-block;
  background: #f59e0b22;
  border: 1px solid #f59e0b88;
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
}
.atlas-hist-link.primary:hover { background: #f59e0b33; }
.atlas-hist-label {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.atlas-hist-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.atlas-hist-list a { font-weight: 600; }


/* 打赏爪爪 tip rail + x402 seal (2026-10-24) */
.tip-card {
  background: linear-gradient(160deg, rgba(240,180,41,.10), rgba(61,214,198,.06));
  border: 1px solid rgba(240,180,41,.32);
}
.tip-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.tip-cat { font-size: 1.8rem; line-height: 1; }
.tip-head strong { display: block; font-size: 1.05rem; }
.tip-sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.tip-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tip-chip {
  min-width: 64px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(240,180,41,.45); background: #1a1408; color: #f0b429;
  font-weight: 800; font-size: 1.05rem;
}
.tip-chip:hover { border-color: #f0b429; box-shadow: 0 0 12px rgba(240,180,41,.28); }
.tip-chip:disabled { opacity: .45; cursor: not-allowed; }
.tip-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tip-seal, .btn.seal {
  background: linear-gradient(135deg, #5b8cff, #7c5cff); color: #fff; border: 0;
  box-shadow: 0 6px 18px rgba(91,140,255,.28); font-weight: 700;
}
.tip-x402 { width: 100%; font-size: .85rem; }
.tip-msg { margin: 8px 0 0; font-size: .88rem; color: #3dd6c6; }
.tip-msg.err { color: #f87171; }
.paywall-body {
  margin: 0; padding: 12px; max-height: 50vh; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .75rem; white-space: pre-wrap; word-break: break-word;
  background: #0a1220; border-radius: 10px; border: 1px solid #2a3a55;
}
