/* guildle's styles, part 3 of 10 (screens.css). Home modes, the party, the collection, overlays, sign-in, the account menu, leaderboards,
   card tags, the quest board and the quest sheet.
   The parts load in order (index.html) and later rules build on earlier ones. */

/* ---------- Home modes ---------- */
.draw.mode-party { padding-top: 28px; }
.draw.mode-party > .flavour, .draw.mode-party > .reply-wrap, .draw.mode-party > .stage,
.draw.mode-party > .recruit-wrap, .draw.mode-party > .result { display: none; }
.draw.revealed > .recruit-wrap { display: none; }
.draw.revealed > .result { margin-top: 10px; }
.draw.mode-party .party { margin-top: 0; }
.draw.mode-party .party > :not(.party-hold) { animation: fadein .6s ease-out both; } /* the cards come and go on their own (partydock.js) */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.draw.settle, .draw.settle * { transition: none !important; }
.party-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.next-in { font-size: .9rem; color: var(--text-dim); }
.next-in b { color: var(--gold); font-variant-numeric: tabular-nums; }
.recruit-wrap.mini { margin-top: 0; }
.recruit-wrap.mini .recruit { font-size: 1.05rem; padding: 8px 18px 8px 14px; gap: 8px; }
.party-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.king-btn { border-style: solid !important; border-color: var(--brass) !important; color: var(--gold) !important; }
.fly { position: fixed; z-index: 9; pointer-events: none; transform-origin: 0 0; }

/* ---------- Party ---------- */
.party { width: 100%; margin-top: 34px; display: grid; gap: 14px; text-align: left; }
.party-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; border-bottom: 1px solid var(--felt-line); padding-bottom: 8px; }
.party-head h2 { font: 400 1.9rem/1 var(--display); margin: 0; }
.perk-line { margin: 0; font-size: .88rem; color: var(--text-dim); }
.perk-line b { color: var(--gold); font-weight: 700; }
.party-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .party-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .party-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pslot { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 14px; text-align: left; transition: transform .15s; }
.pslot:hover { transform: translateY(-3px); }
.pslot .num { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2; font: 800 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--gold-hi); border-radius: 5px; padding: 4px 8px; }
.pslot.vacant { aspect-ratio: 5 / 7; border: 2px dashed var(--brass-dim); background: rgba(var(--panel-rgb), .45); color: var(--text-dim); display: grid; place-content: center; justify-items: center; gap: 6px; font: italic 1rem var(--serif); }
.pslot.vacant .plus { font: 400 2.4rem/1 var(--display); color: var(--brass); }
.pslot.vacant:hover { border-color: var(--brass); color: var(--text); }
.pslot.vacant.locked { cursor: default; text-align: center; padding: 0 14%; line-height: 1.35; border-color: rgba(143, 108, 52, .45); background: rgba(var(--panel-rgb), .3); }
.pslot.vacant.locked .plus { font-size: 1.4rem; color: var(--brass-dim); }
.pslot.vacant.locked:hover { border-color: rgba(143, 108, 52, .45); color: var(--text-dim); transform: none; }
.pbadge { position: absolute; top: -8px; right: 10px; z-index: 2; font: 800 .64rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--gold-hi); border-radius: 5px; padding: 4px 8px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.slot { position: relative; }
.picker-sheet { width: min(1040px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; }
.picker-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.picker-actions { display: flex; gap: 14px; align-items: center; }
.picker-note { margin: 0; font-size: .88rem; }
.picker-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; padding-top: 8px; }
/* Under an open card, in a column as wide as the card: its record line (card.js), then the party (what's true, then
   what can be done), then Compare and Close along the foot. */
/* (the card stands to the left of its page tabs, so the column is the card's width and moves left by half the tabs and
   their gap: centred under the card, not under card and tabs together. Tab sizes: css/card-pages.css) */
#zoom { --cd-tab: 72px; --cd-gap: 24px; }
@media (max-width: 480px) { #zoom { --cd-tab: 58px; --cd-gap: 16px; } }
@media (min-width: 900px) { #zoom { --cd-tab: 140px; } }
#zoom .cd-below, #zoom .zoom-acts { width: min(380px, calc(100vw - 32px - var(--cd-gap) - 72px)); position: relative; left: calc((var(--cd-tab) + var(--cd-gap)) / -2); }
@media (max-width: 480px) { #zoom .cd-below, #zoom .zoom-acts { width: min(380px, calc(100vw - 32px - var(--cd-gap) - var(--cd-tab))); } }
.zoom-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 10px; }
.zoom-party { display: contents; }
.zp-sec { grid-column: 1 / -1; display: grid; gap: 8px; padding: 12px 0 14px; border-block: 1px solid var(--felt-line); text-align: left; }
.zp-h { margin: 0; font: 800 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.zp-note { margin: 0; font-size: .88rem; color: var(--text-dim); text-wrap: pretty; }
.zp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.zoom-acts .dev-btn { border-style: solid; }
.zoom-acts .cmp-btn { grid-column: 1; justify-self: start; }
#zoom-close { grid-column: 2; justify-self: end; }
/* (a phone: the arrows to the heroes either side come into the foot, either side of Close, instead of floating over it) */
@media (max-width: 760px) {
  .zoom-acts { grid-template-columns: auto minmax(0, 1fr) auto; }
  .zoom-acts .cmp-btn { grid-column: 1 / -1; justify-self: stretch; }
  .zoom-acts .zoom-step { position: static; grid-row: 3; margin: 0; }
  .zoom-acts .zoom-step.prev { grid-column: 1; } .zoom-acts .zoom-step.next { grid-column: 3; }
  #zoom-close { grid-row: 3; grid-column: 2; justify-self: center; min-width: 120px; }
}
.king { margin-top: 6px; }
.king .dev-btn { border-style: solid; border-color: var(--brass); color: var(--gold); }

/* ---------- Roster view ---------- */
.roster { max-width: var(--page-w); margin: 0 auto; padding-block: 18px 64px; display: grid; gap: 22px; }
.roster-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; }
.roster-head h2 { font: 400 2.2rem/1 var(--display); margin: 0; }
.ledger { display: flex; gap: 20px; font-variant-numeric: tabular-nums; }
.ledger div { display: grid; text-align: right; }
.ledger b { font-size: 1.4rem; font-weight: 800; color: var(--brass); line-height: 1.1; }
.ledger span { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.roster-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.tally { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 .76rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 5px; background: rgba(var(--panel-rgb),.7); border: 1px solid var(--felt-line); color: var(--text); font-variant-numeric: tabular-nums; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.controls { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: .85rem; }
/* fields (selects, search boxes): one look */
select { min-height: 38px; font: 500 .9rem var(--sans); background: rgba(var(--panel-rgb), .7); color: var(--text); border: 1px solid var(--felt-line); border-radius: var(--btn-r); padding: 6px 8px; }
select:focus-visible { outline: none; border-color: var(--brass); }
select option { background: var(--felt); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.slot { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 14px; text-align: left; transition: transform .15s; }
.slot:hover { transform: translateY(-4px) rotate(-.6deg); }
.empty { grid-column: 1 / -1; border: 2px dashed var(--felt-line); border-radius: 14px; padding: 40px 20px; text-align: center; color: var(--text-dim); font: italic 1.05rem var(--serif); background: rgba(var(--panel-rgb),.5); }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; background: none; isolation: isolate; display: grid; justify-items: center; align-items: start; padding: 24px 16px; z-index: 10; overflow-y: auto; }
.overlay > * { margin-block: auto; } /* centred when it fits, scrollable from the top when it doesn't */
.zoom-inner { width: min(360px, 100%); display: grid; gap: 14px; justify-items: center; }
.link { background: none; border: 0; color: var(--text-dim); font: 500 .9rem var(--sans); cursor: pointer; text-decoration: underline; }
.sheet { width: min(640px, 100%); background: var(--felt-deep); border: 1px solid var(--felt-line); border-radius: 12px; padding: 22px 22px 18px; display: grid; gap: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.sheet h2 { font: 400 1.7rem/1.1 var(--serif); margin: 0; }
.sheet h3:not(.c-name) { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; font-weight: 700; }
.sheet p { margin: 0; color: var(--text-dim); max-width: 60ch; }
.key { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.key div { background: rgba(0,0,0,.18); border: 1px solid var(--felt-line); border-left: 4px solid var(--c); border-radius: 4px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.key b { display: block; font: 700 .76rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.key span { font-size: .8rem; color: var(--text-dim); display: block; }
.key span.lv { font-size: .72rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 18px; font-size: .88rem; font-variant-numeric: tabular-nums; }
.classes div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--felt-line); padding-block: 4px; }
.tlist summary { cursor: pointer; color: var(--text); font-weight: 700; margin-top: 8px; }
.tlist .tier { margin-top: 10px; border-left: 3px solid var(--c); padding-left: 10px; }
.tlist h4 { margin: 0 0 4px; font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.tlist .tier div { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; padding-block: 2px; border-bottom: 1px solid var(--felt-line); }
.tlist .tier span { color: var(--text-dim); text-align: right; }
.classes span { color: var(--text-dim); font-size: .78rem; letter-spacing: .04em; text-align: right; }
.rolls { margin-top: 14px; background: var(--felt-deep); border: 1px solid var(--felt-line); border-radius: 6px; padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-variant-numeric: tabular-nums; font-size: .88rem; }
.rolls p { grid-column: 1 / -1; margin: 0 0 4px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.rolls div { display: grid; grid-template-columns: 3em 1fr auto; gap: 6px; }
.rolls span { color: var(--text-dim); }
.rolls s { opacity: .6; }
.rolls .hp-head { margin-top: 8px; }
.rolls .tb { font-style: normal; font-weight: 800; color: #6fcf8f; }
.rolls .rb { font-style: normal; font-weight: 800; color: #e0a860; }
.rolls p.key-note { text-transform: none; letter-spacing: 0; font-size: .8rem; margin-top: -2px; }
.rolls .t-row { grid-column: 1 / -1; grid-template-columns: 7.5em 1fr; }
.rolls .t-row b { color: var(--text); }
.rolls .t-row i { color: var(--text-dim); opacity: .8; }
.rolls .hp-row { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
.rolls em { font-style: normal; font-weight: 800; color: var(--brass); }


.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--felt-deep); border: 1px solid var(--brass-dim); color: var(--text); padding: 10px 16px; border-radius: 8px; font-size: .9rem; z-index: 20; max-width: calc(100% - 32px); }

@media (prefers-reduced-motion: reduce) {
  .flipper, .slot { transition: none; }
  .flavour.fresh, .flipper.shake, .draw.arrive .stage, .draw.arrive .recruit-wrap, .draw.intro .reply-wrap { animation: none; }
  .draw, .flavour { transition: none; }
}

/* ---------------------------------------------------------------- the way in (sign-in, maintenance, a failed load)
   The name, a line, the way in, centred on the page. Signed out, this week's map is drawn bare behind it (just the
   land: roadout.js drawBackdrop, html.ro-backdrop once it's painted), faded back evenly under the page's colour so
   the words read; until then, and on the maintenance screen, the page's own colour, darkened at the edges. */
.booting main { visibility: hidden; }
.gate { position: fixed; inset: 0; z-index: 30; isolation: isolate; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(var(--shade-rgb), .5) 100%), var(--felt); }
.gate[hidden] { display: none; }
html:has(.gate:not([hidden])) { overflow: hidden; scrollbar-gutter: auto; }
html.ro-backdrop #signin { background: rgba(var(--panel-rgb), .85); } /* (the whole map faded back, evenly) */
html.ro-backdrop #ro-beta.ro-still { animation: fadein .8s ease-out both; }
/* (the map behind it, and nothing of the game on it: no bar, quests, parties, seals or buttons) */
#ro-beta.ro-still > :not(.qmap), #ro-beta.ro-still :is(.map-ui, #ro-cards) { display: none !important; }
#ro-beta.ro-still :is(.layer-areas, .layer-labels, .layer-pins, .layer-towns text, .feature-name, .town-name) { display: none !important; } /* (no seals, region or town names: just the land) */
html:not(.ro-backdrop) #ro-beta.ro-still { visibility: hidden; }
.gate-card { width: min(34em, 100%); box-sizing: border-box; display: grid; gap: 22px; justify-items: center; color: var(--text); text-align: center; }
.gate-mark { margin: 0; font: 400 clamp(2.6rem, 7vw, 4rem)/1 var(--serif); color: var(--text); }
.gate-lead { margin: 0; font: italic clamp(1.2rem, 2.6vw, 1.5rem)/1.45 var(--serif); color: var(--text-dim); text-wrap: balance; }
.gate .gbtn { min-height: 44px; display: grid; place-items: center; color-scheme: light; } /* Google's button is a light-scheme iframe; matching it stops the browser painting a white box behind it */
.gate-fine { margin: 0; max-width: 30em; font-size: .8rem; color: var(--text-dim); }
.gate .err, .gate-err { margin: 0; font: 600 .88rem/1.35 var(--sans); color: #e8a0a0; }
:root[data-theme="light"] :is(.gate .err, .gate-err) { color: #a33a32; }
.gate-err { position: fixed; z-index: 31; top: 50%; left: 50%; translate: -50% -50%; width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px 22px;
  border-radius: 14px; border: 1px solid var(--brass-dim); background: rgb(var(--panel-rgb)); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); text-align: left; }
.gate-err[hidden] { display: none; }
.dev-login { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dev-login input { min-width: 220px; font: 500 .9rem/1 var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--brass-dim); background: rgba(var(--shade-rgb), .35); color: var(--text); }
:root[data-theme="light"] .dev-login input { background: rgba(255, 255, 255, .5); }
.dev-login input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 207, 142, .25); }
/* maintenance: the admin's message, and their way in */
.gate .maint-msg { margin: 0; max-width: 30em; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--felt-line); background: rgba(201, 153, 74, .08); font: italic 1.02rem/1.45 var(--serif); color: var(--text); overflow-wrap: anywhere; }
.gate .maint-admin { padding: 0; font-size: .82rem; opacity: .75; }

/* ---------------------------------------------------------------- account menu */
.acct { position: relative; }
.acct .ibtn { overflow: hidden; padding: 0; }
.acct .ibtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct .ibtn .initial { font: 700 .9rem/1 var(--sans); color: var(--gold); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; min-width: 220px; background: var(--felt-deep); border: 1px solid var(--felt-line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.acct-menu .who { display: grid; gap: 2px; }
.acct-menu .who b { font-weight: 700; }
.acct-menu .who span { font-size: .8rem; color: var(--text-dim); overflow-wrap: anywhere; }
.acct-menu .dev-btn { text-align: center; }

/* A small spinner while the server works. */
.busy-note { font-size: .85rem; color: var(--text-dim); }


/* ---------------------------------------------------------------- party strength */
.party-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.strength {
  display: inline-flex; align-items: baseline; gap: 7px; cursor: pointer;
  background: rgba(var(--panel-rgb), .6); border: 1px solid var(--brass-dim); border-radius: 5px; padding: 5px 12px;
  color: var(--text-dim); font: 700 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
}
.strength b { font: 800 1.05rem/1 var(--sans); letter-spacing: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.strength:hover { border-color: var(--gold); }
.strength-line { margin-top: -6px; }

/* ---------------------------------------------------------------- leaderboard */
.lb-intro { margin: -8px 0 0; color: var(--text-dim); font-size: .92rem; }
.lb-intro .link { font-size: inherit; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb-row {
  width: 100%; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  background: rgba(var(--panel-rgb), .55); border: 1px solid var(--felt-line); border-radius: 10px; padding: 10px 14px;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.lb-row:hover { border-color: var(--brass-dim); }
.lb-row.me { border-color: var(--brass); background: rgba(201, 153, 74, .12); }
.lb-rank { font: 400 1.5rem/1 var(--display); color: var(--text-dim); text-align: center; font-variant-numeric: tabular-nums; }
li.top1 > .lb-row .lb-rank { color: #ffd166; }
li.top2 > .lb-row .lb-rank { color: #d9dde3; }
li.top3 > .lb-row .lb-rank { color: #d19a66; }
:root[data-theme="light"] li.top1 > .lb-row .lb-rank { color: #9a6c00; }
:root[data-theme="light"] li.top2 > .lb-row .lb-rank { color: #5d6672; }
:root[data-theme="light"] li.top3 > .lb-row .lb-rank { color: #8d4f1c; }
.lb-name { font: 400 1.25rem/1.15 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { font: 700 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-left: 8px; }
.lb-pips { display: flex; gap: 4px; }
.lb-pips i { width: 10px; height: 14px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.lb-pips i.none { background: transparent; box-shadow: inset 0 0 0 1px var(--felt-line); }
.lb-score { font: 800 1.2rem/1 var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; min-width: 3.5ch; text-align: right; }
.lb-gap { text-align: center; color: var(--text-dim); letter-spacing: .3em; }
.lb-empty { color: var(--text-dim); text-align: center; padding: 30px 0; margin: 0; }
@media (max-width: 520px) {
  .lb-row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 10px; }
  .lb-pips { grid-column: 2; grid-row: 2; }
  .lb-score { grid-column: 3; grid-row: 1 / span 2; }
}
.power-row em { color: var(--gold); }
.strength-help { display: grid; gap: 8px; }
.strength-help code { font: 700 .85rem/1.5 var(--sans); color: var(--text); background: rgba(var(--panel-rgb), .6); border-radius: 6px; padding: 8px 10px; display: block; white-space: pre-wrap; }
.lb-sheet { width: min(1080px, 100%); }
.lb-sheet .picker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .lb-sheet .picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lb-sheet .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.lb-pips i.none { box-shadow: inset 0 0 0 1px rgba(239, 230, 210, .28); }

/* ---------------------------------------------------------------- card tags */
.card-detail { display: grid; gap: 10px; width: 100%; }
.card-detail .rolls { margin-top: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 6px; }
.tag {
  /* Same look as the tooltip: dark leather, cream bold text, bronze edge. */
  display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap;
  background: #1b120a; color: #f6ecd6; border: 1px solid #6b4f2a; border-radius: 6px; padding: 6px 10px;
  font: 700 .82rem/1.3 var(--sans); letter-spacing: .03em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transition: border-color .15s;
}
.tag:hover, .tag:focus-visible { border-color: #b08a4f; outline: none; }
.tag.k-perk.on  { border-color: #c9994a; }
.tag.k-perk.off { border-style: dashed; color: var(--text-dim); }
.tag.k-skill { border-color: rgba(183, 124, 255, .55); color: #e2c9ff; }
.tag.k-skill:hover, .tag.k-skill:focus-visible { border-color: #b77cff; }
.tag-dice { margin-left: auto; }
.dice-toggle {
  width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; padding: 0;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-line); border-radius: var(--btn-r); box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.dice-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.dice-toggle:hover, .dice-toggle[aria-expanded="true"] { background: var(--btn-bg-hi); border-color: var(--brass); }
.lb-sheet .tag { font-size: .72rem; padding: 5px 8px; white-space: normal; }

.card-meta { margin: -2px 0 0; font-size: .78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- gold */

/* ---------------------------------------------------------------- level-up bonus on stat bars */
.bar .lboon { background: #4a7fb0 !important; }
.rolls .lb { font-style: normal; font-weight: 800; color: #7fb2e0; }

/* ---------------------------------------------------------------- quest board */
.quests { margin-top: 18px; display: grid; gap: 12px; }
.quests-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-bottom: 1px solid var(--felt-line); padding-bottom: 8px; }
.quests-head h2 { font: 400 1.9rem/1 var(--display); margin: 0; }
.quests-note { margin: 0; font-size: .88rem; color: var(--text-dim); }
.quests-note b { color: var(--gold); }
.orders { display: inline-flex; align-items: center; gap: 4px; background: rgba(var(--panel-rgb), .6); border: 1px solid var(--felt-line); border-radius: 10px; padding: 3px; }
.orders-label { font: 700 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); padding: 0 6px 0 8px; }
.order { font: 700 .82rem/1 var(--sans); color: var(--text-dim); background: none; border: 0; border-radius: 7px; padding: 8px 12px; cursor: pointer; }
.order:hover { color: var(--text); }
.order[aria-checked="true"] { background: #1b120a; color: var(--gold-hi); box-shadow: inset 0 0 0 1px #6b4f2a; }
.order[data-order="reckless"][aria-checked="true"] { color: #f0a39b; box-shadow: inset 0 0 0 1px #8a3a30; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: eight notices, two a row, pared down to fit (quests.js noticeHTML). */
@media (max-width: 560px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .board .notice { padding: 10px 9px 9px; gap: 6px; border-top-width: 5px; }
  .board .notice h3 { font-size: 1rem; line-height: 1.12; }
  .board .n-tier { font-size: .6rem; letter-spacing: .1em; }
  .board .n-blurb { font-size: .76rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .board .n-tests li { font-size: .6rem; padding: 3px 5px; }
  .board .n-meta { font-size: .64rem; gap: 2px 8px; }
  .board .n-odds { font-size: .66rem; gap: 3px 6px; padding-top: 6px; }
  .board .n-odds b { font-size: 1.1rem; }
  .board .danger { font-size: .6rem; padding: 2px 4px; margin-left: 0; }
  .board .n-reward { font-size: .64rem; }
  .board .n-done { font-size: .7rem; padding: 4px 6px; border-width: 2px; }
  .board .cr { font-size: .6rem; }
  .board .q-diff { font-size: .6rem; padding: 3px 4px; margin-right: 2px; }
}
.notice {
  --tc: var(--r-common);
  position: relative; display: grid; align-content: start; gap: 8px; text-align: left; cursor: pointer;
  background: linear-gradient(170deg, var(--card) 0%, var(--card-edge) 100%); color: var(--ink);
  border: 1px solid rgba(0, 0, 0, .25); border-top: 6px solid var(--tc); border-radius: 6px 6px 10px 10px;
  padding: 14px 14px 12px; box-shadow: 0 10px 22px rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s;
  font: inherit;
}
.notice::before { /* the pin */
  content: ""; position: absolute; top: -11px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9c77a, #8f6c34 70%); box-shadow: 0 2px 3px rgba(0, 0, 0, .5);
}
.notice:hover:not([disabled]) { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 16px 28px rgba(0, 0, 0, .45); }
.notice[disabled] { cursor: default; opacity: .55; filter: grayscale(.5); }
.t-easy { --tc: var(--r-uncommon); }
.t-moderate { --tc: var(--r-rare); }
.t-hard { --tc: var(--r-epic); }
.t-deadly { --tc: #b0302a; }
.n-tier { font: 800 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--tc); }
.notice h3 { margin: 0; font: 400 1.3rem/1.1 var(--display); color: var(--ink); }
.n-blurb { margin: 0; font: italic .92rem/1.35 var(--serif); color: var(--ink-soft); }
.n-tests { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.n-tests li { font: 700 .7rem/1 var(--sans); padding: 4px 7px; border-radius: 5px; background: rgba(43, 33, 24, .08); color: var(--ink-soft); border: 1px solid rgba(43, 33, 24, .14); }
.n-tests li.spec { background: rgba(138, 72, 194, .12); color: #5b2b85; border-color: rgba(138, 72, 194, .35); }
.n-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 600 .76rem/1.3 var(--sans); color: var(--ink-soft); }
.n-odds { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-top: 1px dashed rgba(43, 33, 24, .25); padding-top: 8px; font: 600 .82rem/1.2 var(--sans); color: var(--ink-soft); }
.n-odds b { font: 800 1.35rem/1 var(--sans); color: var(--ink); }
.danger { font: 800 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; margin-left: auto; }
.d-none { color: #2f6d43; background: rgba(63, 143, 85, .14); }
.d-low { color: #6b5a1c; background: rgba(210, 154, 18, .16); }
.d-real { color: #8a4a12; background: rgba(214, 120, 30, .2); }
.d-grave { color: #fff; background: #9e2a22; }
.n-reward { font: 700 .76rem/1.2 var(--sans); color: #6b4c0c; }
.n-done { position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); font: 800 1rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #9e2a22; border: 3px solid #9e2a22; padding: 6px 10px; border-radius: 6px; }

/* ---------------------------------------------------------------- away / returned */
.away { margin-top: 26px; }
.away-card { display: grid; gap: 6px; justify-items: start; background: rgba(var(--panel-rgb), .6); border: 1px solid var(--felt-line); border-left: 5px solid var(--tc); border-radius: 10px; padding: 16px 18px; }
.away-card h3 { margin: 0; font: 400 1.5rem/1.1 var(--display); }
.away-card p { margin: 0; color: var(--text-dim); }
.away-card p b { color: var(--gold); font-variant-numeric: tabular-nums; }
.away-card.returned { border-color: var(--brass); box-shadow: 0 0 24px rgba(240, 207, 142, .15); }
.away-card .recruit { font-size: 1.15rem; margin-top: 4px; }

/* party cards while away or resting */
.pstate { position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); white-space: nowrap; font: 800 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 5px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.pstate.away { background: #1b120a; color: var(--gold-hi); border: 1px solid #6b4f2a; }
.pstate.rest { background: #1d2b3a; color: #b9d4ee; border: 1px solid #3c5a78; }
.pslot:has(.pstate) .card { filter: saturate(.55) brightness(.85); }

/* fallen heroes */
.card.fallen { filter: grayscale(1) brightness(.72) contrast(.95); }
.card.fallen .frame { box-shadow: inset 0 0 0 2.2cqw #1a1a1a !important; }
.pbadge.fallen { background: #1a1a1a; color: #ddd; }
.pbadge.rest { right: auto; left: 10px; background: #1d2b3a; color: #b9d4ee; box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1px #3c5a78; }
.pbadge.away { background: #3a2a14; color: #f1d9a6; }
.fallen-note { color: #f0a39b; }

/* ---------------------------------------------------------------- quest sheet */
.quest-sheet { width: min(620px, 100%); }
.qs { --tc: var(--r-rare); display: grid; gap: 10px; }
.qs h2 { margin: 0; font: 400 1.9rem/1.05 var(--display); }
.qs h3 { margin: 6px 0 0; }
.qs-blurb { font: italic 1.02rem/1.4 var(--serif) !important; color: var(--text-dim); }
.qs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qs-grid > div { display: grid; gap: 3px; background: rgba(0, 0, 0, .22); border: 1px solid var(--felt-line); border-radius: 8px; padding: 10px 12px; }
.qs-grid span { font: 700 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.qs-grid b { font: 800 1.1rem/1.1 var(--sans); color: var(--text); }
.qs-grid b.big { font-size: 1.8rem; color: var(--gold); }
.qs-grid b.danger { justify-self: start; margin: 2px 0 0; font-size: .8rem; }
.qs-grid small { font-size: .78rem; color: var(--text-dim); }
.qs .n-tests li { background: rgba(0, 0, 0, .25); color: var(--text); border-color: var(--felt-line); }
.qs .n-tests li.spec { background: rgba(138, 72, 194, .22); color: #e2c9ff; border-color: rgba(183, 124, 255, .45); }
.qs-order-note { margin: 0; font-size: .88rem; color: var(--text-dim); }
.sheet-orders { justify-self: start; }
.qs-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qs-actions .recruit { font-size: 1.15rem; margin-left: auto; }

/* ---------------------------------------------------------------- replay */
.replay-sheet { width: min(700px, 100%); }
.rp { display: grid; gap: 10px; }
.rp h2 { margin: 0; font: 400 1.9rem/1.05 var(--display); }
.rp-stages { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.rp-stage { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; background: rgba(0, 0, 0, .22); border: 1px solid var(--felt-line); border-radius: 8px; padding: 9px 10px; }
.rp-stage.enter { animation: fadeup .45s ease-out both; }
.rp-mark { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 800 .9rem/1 var(--sans); }
.rp-stage.pass .rp-mark { background: rgba(63, 143, 85, .25); color: #7fdc9a; }
.rp-stage.fail .rp-mark { background: rgba(176, 48, 42, .25); color: #f0a39b; }
.rp-stage.cost .rp-mark { background: rgba(214, 150, 40, .25); color: #f3c76b; }
.rp-stage.extra .rp-mark { background: rgba(255, 255, 255, .06); color: var(--text-dim); }
.rp-stage.end .rp-mark { background: #1a1a1a; color: #ddd; }
.rp-stage.boss { border-color: var(--brass-dim); }
.rp-text { display: grid; gap: 2px; min-width: 0; }
.rp-text b { font-weight: 700; }
.rp-text > span { font-size: .9rem; color: var(--text-dim); }
.rp-lines { margin-top: 6px; display: grid; gap: 2px; font-size: .8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; border-left: 2px solid var(--felt-line); padding-left: 8px; }
.rp-lines p { margin: 0; max-width: none; }
/* The quest log: injuries and failures in red, deaths in bold red, healing in green, loot in gold. */
.rp-lines .log-bad { color: var(--bad); }
.rp-lines .log-dead { color: #ff5a4a; font-weight: 800; }
.rp-lines .log-good { color: #8fdca6; }
.rp-lines .log-loot { color: var(--gold); font-weight: 700; }
.rp-lines .log-crit { color: #ffe08a; font-weight: 700; }
.rp-lines .log-round { margin-top: 6px; font: 800 .64rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text); opacity: .75; }
.rp-lines .log-round:first-child { margin-top: 0; }
.rp-dice { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 4px 9px 4px 6px; border-radius: 5px; border: 1px solid var(--felt-line); background: rgba(0, 0, 0, .25); color: var(--text-dim); font: 700 .72rem/1 var(--sans); letter-spacing: .04em; cursor: pointer; }
.rp-dice svg { width: 15px; height: 15px; fill: currentColor; }
.rp-dice:hover, .rp-dice[aria-expanded="true"] { color: var(--gold); border-color: var(--brass-dim); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.rp-chips .chip { font: 700 .72rem/1 var(--sans); padding: 4px 8px; border-radius: 5px; border: 1px solid; font-variant-numeric: tabular-nums; }
.chip.hurt { color: var(--bad); border-color: rgba(255, 110, 95, .45); background: rgba(176, 48, 42, .16); }
.chip.hurt.down { color: var(--bad); background: rgba(176, 48, 42, .28); }
.chip.hurt.dead { color: #fff; border-color: #c0392b; background: #8e1f16; }
.chip.loot { color: var(--gold); border-color: var(--brass-dim); background: rgba(240, 207, 142, .08); }
.chip.xp { color: var(--good); border-color: rgba(63, 143, 85, .5); background: rgba(63, 143, 85, .12); }
.rp-outcome { margin-top: 10px; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px; border-radius: 10px; }
.rp-outcome b { font: 400 2rem/1 var(--display); }
.rp-outcome span { font-size: .9rem; color: var(--text-dim); }
.rp-outcome.good { background: rgba(63, 143, 85, .15); border: 1px solid rgba(63, 143, 85, .4); }
.rp-outcome.good b { color: var(--good); }
.rp-outcome.bad { background: rgba(176, 48, 42, .12); border: 1px solid rgba(176, 48, 42, .4); }
.rp-outcome.bad b { color: #f0a39b; }
.rp-outcome.o-triumph b { color: var(--gold); }
.rp-gold { justify-self: center; display: grid; justify-items: center; gap: 4px; margin: 4px 0 2px; font: 800 1.2rem/1 var(--sans); color: var(--gold); }
.rp-gold small { font: 600 .78rem/1.2 var(--sans); color: var(--text-dim); }
.rp-rest { color: var(--bad) !important; font-weight: 700; }
.rp-why { font-size: .78rem; line-height: 1.35; color: var(--text-dim); }
.qs-xp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qs-xp li { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(0, 0, 0, .22); border: 1px solid var(--felt-line); border-radius: 8px; padding: 7px 10px; font-size: .88rem; }
.qs-xp li span { min-width: 0; overflow-wrap: anywhere; }
.qs-xp li b { color: var(--good); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qs-xp-note { margin: 0; font-size: .8rem; color: var(--text-dim); }
.q-resting { display: block; margin-top: 6px; color: var(--bad); }
.q-resting b { color: var(--bad) !important; }
.q-rest-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.q-rest-list li { display: block; }
.q-rest-list li b { color: var(--text) !important; }
.q-rest-list small { display: block; font-size: .78rem; color: var(--text-dim); }
.rest-note { color: var(--bad); }
.rest-note b { font-weight: 800; }
.rp-heroes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .rp-heroes { grid-template-columns: 1fr; } }
.rp-heroes li { display: grid; gap: 2px; background: rgba(0, 0, 0, .22); border: 1px solid var(--felt-line); border-radius: 8px; padding: 9px 11px; }
.rp-heroes li > span { font-size: .84rem; color: var(--text-dim); }
.rp-heroes li.dead { border-color: #5a2020; background: rgba(40, 8, 8, .5); }
.rp-mvp { color: var(--gold) !important; font: 800 .66rem/1 var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; }
.rp-level { color: var(--good) !important; font-weight: 700; }
.rp-dead { color: #f0a39b !important; font-weight: 700; }
.rp-down { color: #e8c07a !important; }

/* ---------------------------------------------------------------- leaderboard tabs */
.lb-tabs { display: inline-flex; gap: 4px; background: rgba(var(--panel-rgb), .6); border: 1px solid var(--felt-line); border-radius: 10px; padding: 3px; justify-self: start; margin-top: -8px; }
.lb-tab { font: 700 .88rem/1 var(--sans); color: var(--text-dim); background: none; border: 0; border-radius: 7px; padding: 9px 16px; cursor: pointer; }
.lb-tab[aria-selected="true"] { background: #1b120a; color: var(--gold-hi); box-shadow: inset 0 0 0 1px #6b4f2a; }
.loot-row { grid-template-columns: 3.2rem minmax(0, 1fr) auto; }
.loot-row .lb-name em { display: block; font: italic .88rem/1.2 var(--serif); color: var(--tc); margin-top: 2px; }
.lb-score small { display: block; font: 700 .6rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
@media (max-width: 520px) { .loot-row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; } }

.dev-btn:disabled { opacity: .45; cursor: not-allowed; }
.qs-xp-total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--text-dim); }
.qs-xp-total b { font: 800 1.3rem/1 var(--sans); color: var(--good); }
.qs-xp-total small { font: 700 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(255, 255, 255, .07); }
.qs-xp li small { color: var(--text-dim); font-size: .76rem; white-space: nowrap; }
.qs-xp li b { color: var(--text-dim); font-weight: 700; text-align: right; }
.qs-xp li b.up { color: var(--good); }
.qs-tests-note { margin: -4px 0 0 !important; font-size: .76rem; color: var(--text-dim); }
.qs .n-tests .t-name { --tc: var(--gold); }
.tip.long { white-space: normal; width: max-content; max-width: min(320px, calc(100vw - 24px)); text-align: left; font-weight: 600; }

/* ---------- The info sheet (infosheet.js): an item's card, a hero's titles, two heroes side by side ---------- */
.info-sheet { width: min(440px, 100%); gap: 12px; padding: 20px 20px 14px; }
.info-sheet.wide { width: min(860px, 100%); }
.info-foot { display: flex; justify-content: center; }
.info-sheet h2 { font: 400 1.5rem/1.1 var(--serif); margin: 0; }
.info-sheet .qs-actions { display: flex; justify-content: flex-end; gap: 10px; }
/* an item's card */
.gi-head { display: flex; align-items: center; gap: 14px; }
.gi-head .rar-tag { margin: 6px 0 0; }
.gi-pic { flex: none; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid var(--felt-line); }
.gi-pic.r-uncommon { box-shadow: 0 0 0 2px var(--r-uncommon); } .gi-pic.r-rare { box-shadow: 0 0 0 2px var(--r-rare); }
.gi-pic.r-epic { box-shadow: 0 0 0 2px var(--r-epic); } .gi-pic.r-legendary { box-shadow: 0 0 0 2px var(--r-legendary), 0 0 18px rgba(210, 154, 18, .35); }
.info-sheet h2.eq-r-uncommon { color: var(--r-uncommon); } .info-sheet h2.eq-r-rare { color: var(--r-rare); }
.info-sheet h2.eq-r-epic { color: var(--r-epic); } .info-sheet h2.eq-r-legendary { color: var(--r-legendary); }
.gi-flav { font: italic 1rem/1.45 var(--serif) !important; color: var(--text) !important; opacity: .9; border-left: 3px solid var(--felt-line); padding-left: 12px; }
.gi-does { color: var(--text) !important; font-size: .92rem; }
.gi-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.gi-box { display: grid; gap: 3px; padding: 8px 10px; border-radius: 5px; background: rgba(0, 0, 0, .18); border: 1px solid var(--felt-line); }
.gi-box span { font: 700 .62rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.gi-box b { font: 700 1.05rem/1.2 var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.gi-box b small { font-weight: 500; font-size: .78rem; color: var(--text-dim); }
.info-sheet h3.gi-h { margin: 4px 0 0 !important; }
.gi-who { color: var(--text) !important; }
.gi-note { font-size: .86rem; }
.gi-fit { font-weight: 700; color: #6fbf86 !important; font-size: .9rem; } .gi-fit.no { color: #e07a6a !important; }
:root[data-theme="light"] .gi-fit { color: #2f7343 !important; } :root[data-theme="light"] .gi-fit.no { color: #a5372a !important; }
:root[data-theme="light"] .gi-box, :root[data-theme="light"] .gi-pic { background: rgba(var(--panel-rgb), .7); }
/* things with a card of their own: tap them */
.has-gi, .eq-slot[data-gi] { cursor: pointer; }
/* choosing a hero's title (the pen on their Stats page) */
.title-pick { display: grid; gap: 8px; }
.title-opt { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 5px; border: 1px solid var(--felt-line); border-left: 4px solid var(--tc); background: rgba(0, 0, 0, .18); color: var(--text); cursor: pointer; font: inherit; }
.title-opt b { font: 400 1.15rem/1.15 var(--serif); }
.title-opt small { color: var(--text-dim); font-size: .82rem; }
.title-opt.on { border-color: var(--tc); box-shadow: inset 0 0 0 1px var(--tc); }
.title-opt:hover, .title-opt:focus-visible { border-color: var(--tc); }
:root[data-theme="light"] .title-opt { background: rgba(var(--panel-rgb), .7); }
/* the collection's filters: a chosen one stands out */
.controls select.on { border-color: var(--brass); color: var(--brass); }
.controls { flex-wrap: wrap; justify-content: flex-end; }
/* phones: three across, cards the size of the party's hand */
@media (max-width: 560px) {
  .roster .controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .roster .controls .roster-q { grid-column: 1 / -1; }
  .roster .controls select { min-width: 0; width: 100%; font-size: .8rem; padding: 6px 4px; }
  #grid.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  #grid .slot:hover { transform: none; }
  #grid .slot .pbadge { top: -6px; right: 4px; font-size: .58rem; letter-spacing: .06em; padding: 3px 5px; }
  #grid .slot .pbadge.rest { left: 4px; right: auto; }
  #grid .slot .pick-label { font-size: .62rem; padding: 4px 6px; }
}
/* two heroes side by side (Compare): one row of tabs turns both */
.cmp-title { text-align: center; } .cmp-title small { font-size: .9rem; color: var(--text-dim); }
.cmp-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cmp-tab { padding: 6px 12px; border-radius: 5px; border: 1px solid var(--felt-line); background: rgba(0, 0, 0, .18); color: var(--text-dim); font: 800 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.cmp-tab[aria-selected="true"] { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--brass); }
.cmp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cmp-card .cd-row { display: block; }
.cmp-card .cd-tabs { display: none; }
.cmp-card .deck { width: 100%; max-width: 380px; margin-inline: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font: 500 .88rem/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { padding: 5px 8px; border-bottom: 1px solid var(--felt-line); text-align: center; }
.cmp-table thead th { font: 700 .82rem/1.2 var(--serif); color: var(--text); }
.cmp-table tbody th { text-align: left; font: 700 .66rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.cmp-table td.up { color: #6fbf86; font-weight: 800; }
:root[data-theme="light"] .cmp-table td.up { color: #2f7343; }
:root[data-theme="light"] .cmp-tab { background: rgba(var(--panel-rgb), .7); }
@media (max-width: 560px) { .info-sheet.wide { padding: 16px 10px 12px; } .cmp-pair { gap: 8px; } .cmp-tab { padding: 6px 8px; font-size: .62rem; } }

/* ================================================================ the founders fallen (fallen.js) */
.fallen { display: grid; gap: 10px; text-align: center; }
.fallen-kicker { font: 600 .68rem/1 var(--sans, inherit); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.info-sheet h2.fallen-title { font: 400 1.9rem/1.1 var(--serif); color: var(--gold); }
.fallen-text { margin: 0; font: italic 1rem/1.5 var(--serif); color: var(--text); }
.fallen-item { display: flex; gap: 12px; align-items: center; text-align: left; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--r-legendary); border-radius: 5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--r-legendary) 18%, transparent), transparent); }
.fallen-item .inv-ic { width: 48px; height: 48px; flex: none; }
.fallen-item small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, var(--brass)); }
.fallen-item b { color: var(--r-legendary); font: 400 1.15rem/1.2 var(--serif); }
.fallen-item p { margin: 3px 0 0; font-size: .86rem; line-height: 1.35; }
