/* Ambition standings chips (Ambitions panel) */
.amb li { flex-direction: column; align-items: stretch; gap: 2px; }
.amb .amb-head { display: flex; align-items: center; gap: 6px; }
.amb .amb-head span:first-child { flex: 1; }
.st-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 3px; }
.st-chip { position: relative; display: inline-flex; align-items: center; gap: 3px; min-width: 26px; height: 20px; padding: 0 6px;
  border-radius: 10px; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--text, #eee); font: 700 12px/18px var(--display, sans-serif); }
.st-chip.zero { opacity: .38; }
.st-chip.p1 { background: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 0 2px #f2c14e; }
.st-chip.p2 { box-shadow: 0 0 0 2px #b9c2d0; }
.st-chip.me { outline: 1px dashed currentColor; outline-offset: 2px; }
.st-rank { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-size: 9px; line-height: 1;
  background: #f2c14e; color: #2a1d05; }
.st-chip.p2 .st-rank { background: #b9c2d0; color: #1c2230; }
.st-pow { font-style: normal; font-size: 11px; color: #ffd57a; margin-left: 1px; }
@media (max-width: 860px) { .st-chip { height: 18px; font-size: 11px; min-width: 22px; padding: 0 5px; } }
.amb li .st-strip .st-chip, .amb li .st-strip span:first-child { flex: 0 0 auto; }

/* Real-art action cards: keep number/suit/pips legible at hand/played sizes */
.action-art { position: relative; overflow: hidden; }
.action-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.action-art .aa-badge { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; align-items: center; gap: 4px;
  padding: 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--suit) 85%, #000); color: #fff;
  font: 700 10px/16px var(--display, sans-serif); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
.action-art .aa-badge b { font-size: 14px; }
.action-art .aa-badge i { margin-left: auto; font-style: normal; letter-spacing: -1px; }
.card-lg.action-art .aa-badge, #card-zoom .action-art .aa-badge { display: none; }

/* Player board: real resource tokens + Outrage track */
.pboard .rslots, .pboard .outs { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.pboard .rslot { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: none !important; border: none; }
.pboard .rslot.tok img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.pboard .rslot.empty { border: 1.5px dashed rgba(255,255,255,.28); }
.pboard .rslot.empty small { font: 600 9px/1 var(--display, sans-serif); color: rgba(255,255,255,.45); }
.pboard .out { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); background: none !important; display: inline-grid; place-items: center; }
.pboard .out.on { border-color: #ff5a4f; }
.pboard .out.on img { width: 18px; height: 18px; object-fit: contain; }
.pboard .out .x { position: absolute; inset: 0; width: 100%; height: 100%; }
.pboard .out .x path { stroke: #ff3b30; stroke-width: 3; stroke-linecap: round; }
.pboard .out-agent { position: absolute; right: -5px; bottom: -4px; width: 10px; height: 12px; background: var(--c);
  clip-path: polygon(50% 0, 75% 15%, 75% 45%, 100% 100%, 0 100%, 25% 45%, 25% 15%); border-radius: 2px; }

/* Discards viewer */
#discards-dlg { max-width: min(920px, 94vw); width: 100%; max-height: 86vh; overflow: auto; padding: 0; border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px; background: var(--panel, #171427); color: var(--text, #eee); }
#discards-dlg::backdrop { background: rgba(5,4,12,.7); }
#discards-dlg .disc-wrap { padding: 16px 18px; }
#discards-dlg header { display: flex; align-items: center; justify-content: space-between; }
#discards-dlg h3 { margin: 0; font-family: var(--display, sans-serif); }
#discards-dlg h4 { margin: 14px 0 8px; font-family: var(--display, sans-serif); }
#discards-dlg h4 small { color: var(--dim, #999); font-weight: 400; margin-left: 6px; }
#discards-dlg .disc-grid { display: flex; flex-wrap: wrap; gap: 8px; }
#discards-dlg .icon-btn { background: none; border: 1px solid rgba(255,255,255,.2); color: inherit; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.decks .linkish { background: none; border: none; color: var(--flare, #f2c14e); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Official dice + ambition marker art */
.die.die-art { background: none !important; padding: 0; width: 32px; height: 32px; }
.die.die-art img { width: 100%; height: 100%; border-radius: 6px; display: block; }
.amb-marker.art { background: none !important; padding: 0; min-width: 0; width: 30px; height: 34px; }
.amb-marker.art img { width: 30px; height: 34px; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }

/* Compact one-line ambition rows: name | standings chips | marker */
#hud-ambitions .amb { gap: 4px; }
#hud-ambitions .amb li { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 4px; min-height: 0; }
#hud-ambitions .amb li .amb-head { display: contents; }
#hud-ambitions .amb li .amb-head > span:first-child { grid-column: 1; grid-row: 1; font-size: 13px; }
#hud-ambitions .amb li .amb-head > .amb-marker { grid-column: 3; grid-row: 1; width: 22px; height: 25px; }
#hud-ambitions .amb li .amb-head > .amb-marker img { width: 22px; height: 25px; }
#hud-ambitions .amb li .st-strip { grid-column: 2; grid-row: 1; margin: 0; gap: 3px; }
#hud-ambitions .st-chip { height: 17px; min-width: 20px; padding: 0 4px; font-size: 11px; border-width: 1px; }
#hud-ambitions .st-chip.zero { display: none; }
#hud-ambitions .st-rank { width: 11px; height: 11px; font-size: 8px; }
#hud-ambitions .amb-avail .amb-marker.art, #hud-ambitions .amb-avail .amb-marker.art img { width: 24px; height: 27px; }

/* legend is redundant on the real board art (planets show their resource) */
.map-legend[hidden] { display: none !important; }

/* Top-bar scoreboard */
.scoreboard { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: 12px; }
.sb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 12px; border: 1.5px solid var(--c);
  background: color-mix(in srgb, var(--c) 18%, transparent); font: 600 13px/18px var(--display, sans-serif); white-space: nowrap; }
.sb-chip b { font-size: 15px; color: var(--c); }
.sb-chip.me { box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
.sb-goal { font: 500 12px/18px var(--display, sans-serif); color: var(--dim, #aaa); white-space: nowrap; }
@media (max-width: 860px) { .scoreboard { order: 5; width: 100%; margin: 4px 0 0; } .sb-chip { font-size: 12px; padding: 1px 7px; } }
/* Hover card preview (desktop) */
.card-hover { position: fixed; z-index: 1000; width: 300px; pointer-events: none; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.card-hover img { width: 300px; height: auto; border-radius: 14px; display: block; }
.card-hover .card { width: 300px !important; height: 420px !important; }
.card-hover .aa-badge { display: none; }
.camp-roll { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.camp-roll img { width: 28px; height: 28px; object-fit: contain; }

/* ---- Summit panel (campaign; public/js/summit.js) ---- */
.prompt.summit { display: flex; flex-direction: column; gap: 8px; }
.summit .sm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.summit .sm-head .ms-title { margin: 0; }
.summit .sm-quick { flex-wrap: wrap; }
.summit .sm-big { min-height: 40px; font-weight: 600; }
.summit .sm-builder { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 8px; background: #ffffff08; }
.summit .sm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.summit .chip-btn { border-left: 4px solid var(--c); }
.summit .chip-btn.on { border-color: var(--flare); border-left-color: var(--c); background: #f2a83b22; }
.summit .sm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summit .sm-col h5 { margin: 0 0 4px; font-family: var(--display); letter-spacing: .04em; color: var(--dim); text-transform: uppercase; font-size: 12px; }
.summit .sm-items { display: flex; flex-wrap: wrap; gap: 4px; }
.summit .sm-item { min-height: 36px; text-align: left; }
.summit .sm-favors { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.summit .sm-fav { font-size: 12px; }
.summit .sm-ledger summary { cursor: pointer; color: var(--dim); }
.summit .sm-ledger ol { margin: 4px 0 0; padding-left: 20px; font-size: 13px; max-height: 160px; overflow: auto; }
.sm-status { font-size: 13px; padding: 4px 0; }
@media (max-width: 640px) {
  .summit .sm-cols { grid-template-columns: 1fr; }
  .summit .btn { font-size: 15px; }
  .summit .sm-item, .summit .chip-btn { flex: 1 1 calc(50% - 4px); }
}

/* Player board resource track: keys above each slot, locked slots covered by a city */
.pboard .rslots { gap: 4px; align-items: flex-end; }
.pboard .rcell { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.pboard .rcell .keys { display: flex; gap: 1px; height: 11px; }
.pboard .rcell .keys i { width: 8px; height: 11px; background: url(/assets/official/icon-dice-key-white.png) center/contain no-repeat; opacity: .8; }
.pboard .rcell.is-locked .keys i { opacity: .35; }
.pboard .rslot.locked { width: 24px; height: 24px; border-radius: 4px; display: inline-grid; place-items: center; border: none; opacity: .9; }
.pboard .rslot.locked img { width: 24px; height: 22px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.pboard .rslot.locked.small img { width: 20px; height: 18px; }
.pboard .city-glyph { width: 18px; height: 16px; background: var(--c); clip-path: polygon(50% 0, 100% 100%, 0 100%); display: block; }
.pboard .rsep { width: 1px; align-self: stretch; background: rgba(255,255,255,.15); margin: 0 2px; }
.pboard .bonus-chip { display: inline-grid; place-items: center; height: 22px; min-width: 24px; padding: 0 4px; border-radius: 6px;
  background: #f2c14e; color: #2a1d05; font: 800 12px/1 var(--display, sans-serif); }
.pboard .rcell.extra .rslot { outline: 1px dashed rgba(242,193,78,.6); }

/* Summit Negotiations: open offers, done chips, slot rearranging */
.summit .sm-donerow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.summit .sm-done-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); border-left: 4px solid var(--c); font-size: 13px; opacity: .65; }
.summit .sm-done-chip::before { content: none !important; }
.summit .sm-done-chip.is-done { opacity: 1; background: #ffffff10; }
.summit .sm-offerlist h5 { margin: 6px 0 4px; font-family: var(--display); letter-spacing: .04em; color: var(--dim); text-transform: uppercase; font-size: 12px; }
.summit .sm-offers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.summit .sm-offer { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 6px 8px; background: #ffffff08; display: flex; flex-direction: column; gap: 4px; }
.summit .sm-offer.need { border-color: var(--flare); background: #f2a83b14; }
.summit .sm-offer-top { font-size: 13px; }
.summit .sm-oid { color: var(--dim); font-variant-numeric: tabular-nums; margin-right: 2px; }
.summit .sm-offer-body { font-size: 14px; line-height: 1.35; }
.summit .sm-offer-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.summit .sm-offer-foot .btn { min-height: 36px; }
.summit .sm-none { margin: 2px 0; }
.summit details.sm-builder > summary, .summit .sm-arrange > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.summit details.sm-builder[open] > summary { margin-bottom: 6px; }
.summit .sm-ret { border-style: dashed; }
.summit .sm-slots { display: flex; flex-wrap: wrap; gap: 4px; }
.summit .sm-slot { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }
.summit .sm-slot img { width: 22px; height: 22px; }
.summit .sm-slot.on { border-color: var(--flare); background: #f2a83b22; }
@media (max-width: 640px) {
  .summit .sm-offer-foot .btn { flex: 1 1 40%; }
}
.summit .sm-dtag { font-size: 11px; color: var(--dim); margin-left: 4px; }
.summit .sm-done-chip { opacity: 1; }
.summit .sm-done-chip.is-done { border-style: dashed; border-left-style: solid; }

/* Rearranging resources after a gain (action panel strip) */
.rearrange { border: 1px dashed var(--gold, #f2a93b); border-radius: 10px; padding: 6px 8px; margin: 0 0 8px; }
.rearrange p { margin: 0 0 6px; }
.rr-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rr-slot { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 46px; min-height: 52px; padding: 4px 6px; }
.rr-slot img { width: 26px; height: 26px; object-fit: contain; }
.rr-slot.on { outline: 2px solid var(--gold, #f2a93b); outline-offset: 1px; }
.rr-keys { display: flex; gap: 2px; height: 8px; }
.rr-keys i { width: 6px; height: 8px; border-radius: 2px; background: currentColor; opacity: .55; }

/* Lobby: bot seats */
.seat { grid-template-columns: 14px minmax(0, 1fr) minmax(80px, 110px) auto; }
.seat .bot-check { display: inline-flex; align-items: center; gap: 4px; font-size: .9em; white-space: nowrap; cursor: pointer; }
.seat .bot-check input { width: auto; min-width: 0; margin: 0; }
.ab-msg.bot-thinking { opacity: .85; }

/* Fate choice: card art + Path to Power text */
.fate-choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fate-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(0,0,0,.18); }
.fate-art { flex: 0 0 auto; width: 96px; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.fate-art img { display: block; width: 100%; height: auto; }
.fate-body { min-width: 0; flex: 1; }
.fate-body h4 { margin: 0 0 4px; font-family: 'Saira Condensed', sans-serif; font-size: 1.15rem; }
.fate-text { font-size: .86rem; line-height: 1.35; max-height: 11.5em; overflow: auto; }
.fate-text p { margin: 0 0 .4em; }
.fate-body .btn { margin-top: 6px; }

/* text shown only when a card's art fails to load */
.img-card > .fb-name, .img-card > .fb-text { display: none; }

/* phones: the art credit lives in the Log tab instead of covering the bottom of the map */
.credit-line { font: 500 11px var(--body); color: #cfc6f0; opacity: .7; margin: 8px 4px 4px; }
/* the credit sits in the Log tab and the lobby; on the map it covered planet labels */
.map-credit { display: none !important; }

/* ship symbols docked by each planet's label */
.ship-n { font-family: var(--display); font-weight: 800; fill: #fff; stroke: #120f24; stroke-width: 3px; paint-order: stroke; }
.ship-dock .ship-sym.dmg .ship-n { fill: #ffd9cf; }

/* every marker on an ambition shows side by side (they used to stack in one grid cell) */
.amb .amb-ms { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
#hud-ambitions .amb li .amb-head > .amb-ms { grid-column: 3; grid-row: 1; }
#hud-ambitions .amb li .amb-ms .amb-marker, #hud-ambitions .amb li .amb-ms .amb-marker img { width: 26px; height: 30px; }
.amb-sum { font: 800 12px var(--display); color: var(--flare, #f2a83b); margin-left: 2px; white-space: nowrap; }

/* text-drawn cards: suit band on top, then the name */
.text-card .fb-suit { display: flex; align-items: center; gap: 4px; margin: -2px -2px 3px; padding: 2px 5px; border-radius: 4px; background: color-mix(in srgb, var(--sc) 30%, #120f24); border-top: 3px solid var(--sc); font: 700 10px var(--display); letter-spacing: .02em; color: #fff; text-transform: uppercase; }
.text-card .fb-suit i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.img-card > .fb-suit { display: none; }
.text-card > .fb-name, .text-card > .fb-text { display: block; }

/* ---- God mode (sandbox games) ---- */
.god { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 16px; }
.god-head { margin: 0; }
.god-sec { border: 1px solid var(--line, #3a3360); border-radius: 10px; background: var(--panel, #1f1a3a); }
.god-sec > summary { cursor: pointer; padding: 9px 12px; font: 700 15px var(--display); list-style: none; }
.god-sec > summary::-webkit-details-marker { display: none; }
.god-sec > summary::before { content: '▸ '; opacity: .6; }
.god-sec[open] > summary::before { content: '▾ '; }
.god-body { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.god-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.god-row select, .god-row input[type=number], .god-row input[type=search], .god-row input:not([type]) { min-height: 34px; background: #120f24; color: inherit; border: 1px solid var(--line, #3a3360); border-radius: 8px; padding: 4px 8px; font: inherit; }
.god-row input[type=number] { width: 4.2em; }
.god-row .grow { flex: 1 1 200px; min-width: 0; }
.god-row .chk, .god-row .num { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.god-row .num input { width: 3.6em; }
.god-actas .chip-btn { border-color: var(--c, #6f6890); }
.god-actas .chip-btn.on { background: var(--c, #f2a83b); color: #120f24; }
.god-slots .slot { display: inline-flex; flex-direction: column; align-items: center; }
.god-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow: auto; }
.god-cards li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 2px; border-bottom: 1px solid rgba(255,255,255,.06); }
.god-cards .god-cname { font-weight: 700; text-align: left; }
.god-cards li .btn.sm { margin-left: auto; }
.btn.sm { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.god-badge { font: 700 10px var(--display); text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; }
.god-badge.ok { background: #2f6b45; color: #d6ffe4; }
.god-badge.part { background: #6b5a2f; color: #fff1cf; }
.god-badge.none { background: #4a4560; color: #ddd8f0; }
.god-info { border: 1px solid #f2a83b55; border-radius: 10px; padding: 8px; background: #17132e; }
.god-info-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.god-info-head .icon-btn { margin-left: auto; }
.god-info-text { max-height: 30vh; overflow: auto; }
.god-snaps { list-style: none; margin: 0; padding: 0; }
.god-snaps li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.god-snaps li b { flex: 1; }
.god-pre { max-height: 22vh; overflow: auto; font-size: 11px; background: #120f24; border-radius: 8px; padding: 6px; white-space: pre-wrap; word-break: break-word; }
.god-log { font-size: 12px; max-height: 26vh; overflow: auto; padding-left: 18px; margin: 0; }
.god-pickbar { border: 1px dashed #f2a83b; border-radius: 10px; padding: 6px 8px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.god-actbar { margin: 0 0 4px; }
.god-check span b { color: #f2a83b; }

/* campaign Flagship board on player boards (Upgrades bottom row, Armor above) */
.fs-row { align-items: flex-start; }
.fs-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fs-meta { font-size: 12px; color: var(--dim, #b8b0d8); }
.fs-board { display: grid; grid-template-columns: repeat(6, minmax(34px, 1fr)); gap: 4px; padding: 4px; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, #120f24); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.fs-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.fs-slot small { font: 600 9px var(--display); color: var(--dim, #b8b0d8); text-align: center; line-height: 1.05; }
.fs-pc { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font: 700 9px var(--display); color: #8f87b3; border: 1px dashed #5b5480; }
.fs-pc svg { width: 20px; height: 20px; fill: var(--c); stroke: #120f24; stroke-width: 1.2; }
.fs-pc.city, .fs-pc.starport { border: 1px solid #f2a83b; background: #1c1736; }
.fs-pc.dmg { background: repeating-linear-gradient(135deg, #1c1736 0 4px, #3a1a1a 4px 8px); border-color: #ff8c6a; }
.fs-pc.dmg svg { opacity: .65; }
.god-jump { border-top: 1px solid var(--line, #3a3360); padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.god-seat { border-left: 3px solid rgba(255,255,255,.15); padding-left: 8px; display: flex; flex-direction: column; gap: 4px; }
.god-anyfate { margin-top: 8px; }

/* Gate Wraith: the Twisted Passage (map centre) and Passage tokens */
.tp-zone { fill: rgba(70, 30, 110, .55); stroke: #b98cff; stroke-width: 4; stroke-dasharray: 14 8; }
.tp-label { font: 800 28px var(--display, sans-serif); fill: #e9dcff; paint-order: stroke; stroke: #120f24; stroke-width: 6px; }
.tp-die { fill: #f5f0e4; stroke: #120f24; stroke-width: 3; }
.tp-exit-label { font: 800 24px var(--display, sans-serif); fill: #fff3c4; paint-order: stroke; stroke: #120f24; stroke-width: 6px; }
.tp-exit, .tp-pieces { pointer-events: none; }
.passage-token circle { fill: #1d1030; stroke: #b98cff; stroke-width: 5; }
.passage-token path { stroke: #e9dcff; stroke-width: 5; stroke-linecap: round; }
.rr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.rearrange .btn.sm { padding: 2px 10px; font-size: 12px; margin-left: 6px; }
.rr-warn { font: 600 12px var(--body); color: var(--flare, #f2a83b); margin: 0 0 8px; }
.rr-chips .rr-warn { margin: 0; align-self: center; }
.tag.rr-tag { background: color-mix(in srgb, var(--flare, #f2a83b) 25%, transparent); color: var(--flare, #f2a83b); }

/* what sits on a card (Hoard, Levy, Court tokens, Green Vault…): chips at the card's bottom edge */
.card { position: relative; }
.ctok { position: absolute; left: 2px; right: 2px; bottom: 2px; display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; pointer-events: none; z-index: 2; }
.ctok i { font: 800 10px/14px var(--display); font-style: normal; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--tc, #e8c76a); color: #120f24; border: 1px solid #120f24; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ctok i sub { font-size: 8px; vertical-align: baseline; opacity: .8; }
.ctok b { color: #e8c76a; text-shadow: 0 0 3px #000; }
.card-md .ctok i, .card-lg .ctok i { font-size: 12px; line-height: 17px; height: 17px; min-width: 17px; border-radius: 9px; }
.zoom-tokens { background: color-mix(in srgb, #e8c76a 18%, transparent); border-radius: 6px; padding: 6px 8px; margin: 6px 0; }

/* ---------- Card tests (tracker) ---------- */
.cardtests { max-width: 980px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ct-head h1 { font-family: var(--display); font-size: 34px; margin: 8px 0 4px; }
.ct-head p { margin: 0 0 10px; }
.ct-total { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ct-meter { display: inline-flex; width: 90px; height: 8px; border-radius: 999px; background: var(--void-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rule); flex: none; }
.ct-meter.big { width: min(320px, 100%); height: 10px; }
.ct-meter i { display: block; height: 100%; }
.ct-meter .w { background: var(--ok); } .ct-meter .x { background: var(--alert); } .ct-meter .s { background: var(--dim); opacity: .6; }
.bad { color: var(--alert); }
.ct-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ct-tools input[type=search] { flex: 1 1 240px; min-width: 0; min-height: 38px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--rule); background: var(--void-2); color: var(--text); font: inherit; }
.ct-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.ct-f { font: inherit; font-size: 14px; min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--dim); cursor: pointer; }
.ct-f.on { background: var(--panel-2); color: var(--text); border-color: var(--dim); }
.ct-group { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-md); }
.ct-group > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; list-style: none; }
.ct-group > summary::-webkit-details-marker { display: none; }
.ct-group > summary::before { content: '▸'; color: var(--dim); transition: transform .15s; }
.ct-group[open] > summary::before { transform: rotate(90deg); }
.ct-gt { font-family: var(--display); font-size: 20px; flex: 1 1 auto; }
.ct-list { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.ct-card { border-radius: var(--r-sm); background: var(--void-2); border-left: 3px solid transparent; }
.ct-card.is-works { border-left-color: var(--ok); } .ct-card.is-wrong { border-left-color: var(--alert); } .ct-card.is-skip { border-left-color: var(--dim); opacity: .8; }
.ct-line { display: flex; align-items: center; gap: 8px; padding: 6px 8px; flex-wrap: wrap; }
.ct-name { flex: 1 1 220px; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 4px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ct-tag { font-family: var(--display); font-size: 12px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--dim); }
.ct-tag.warn { color: var(--flare); } .ct-tag.note { color: var(--text); }
.ct-status { display: inline-flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.ct-s { font: inherit; font-size: 13px; min-height: 32px; min-width: 52px; padding: 0 8px; border: 1px solid var(--rule); background: transparent; color: var(--dim); cursor: pointer; }
.ct-s:first-child { border-radius: 999px 0 0 999px; } .ct-s:nth-child(3) { border-radius: 0 999px 999px 0; }
.ct-s.ct-works.on { background: var(--ok); color: #10241a; border-color: var(--ok); }
.ct-s.ct-wrong.on { background: var(--alert); color: #2a0b14; border-color: var(--alert); }
.ct-s.ct-skip.on { background: var(--dim); color: var(--void-2); border-color: var(--dim); }
.ct-test { min-height: 32px; }
.ct-more { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.ct-text { font-size: 14px; line-height: 1.45; background: var(--panel); border-radius: var(--r-sm); padding: 8px 10px; }
.ct-note { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
.ct-note textarea, .god-report textarea { width: 100%; box-sizing: border-box; background: var(--void-2); color: var(--text); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 6px 8px; font: inherit; font-size: 14px; resize: vertical; }
.ct-id { font-size: 12px; }
.ct-reports ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ct-report { background: var(--void-2); border-radius: var(--r-sm); padding: 8px 10px; border-left: 3px solid var(--alert); display: flex; flex-direction: column; gap: 4px; }
.ct-report .row { display: flex; gap: 6px; flex-wrap: wrap; }
.god-test { background: var(--panel-2); border: 1px solid var(--flare); border-radius: var(--r-md); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.god-test .ct-status { gap: 2px; }
.god-test .btn.small { margin-left: 8px; min-height: 32px; }
.god-report { margin-top: 6px; border-top: 1px solid var(--rule); padding-top: 10px; }
.god-report p { margin: 0 0 6px; }
.btn.danger { background: var(--alert); color: #2a0b14; border-color: var(--alert); font-weight: 600; }
@media (max-width: 560px) {
  .ct-line { gap: 6px; }
  .ct-name { flex-basis: 100%; }
  .ct-s { min-width: 48px; }
}
