/* Campfire dashboard: the streamer's and admin's side of the hosted site. Deliberately NOT the game's pixel style:
   a plain, quiet tool. One sidebar (js/shell.js builds it), one content column, a small set of parts every page uses.
   Parts: .card  .pagehead  .btn  .field  .switch  .seg  .tabs  .table  .pill  .list/.item  .empty  .grid2/.grid3  .row
          .ln-menu (a "..." menu)  .popover (a small settings panel)  .iconbtn */
:root {
  --bg: #14161a; --surface: #1c1f25; --raised: #262a33; --line: #343a47; --line2: #454c5c;
  --text: #e8eaef; --dim: #9aa2b1; --faint: #8b93a2;   /* was #6c7484 (3.5:1 on --surface); now 5.3:1 on --surface, 4.7:1 on --raised */
  --accent: #f2a23a; --accent-ink: #1d1405; --good: #57c27a; --warn: #e8b04a; --bad: #ef6a5e; --info: #6aa7f5;
  --r: 8px; --font: Bahnschrift, "DIN Alternate", "Avenir Next", "Segoe UI Variable Text", "Segoe UI", "Trebuchet MS", sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body.dash { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
body.dash [hidden] { display: none !important; }
body.dash a { color: var(--accent); }
body.dash h1, body.dash h2, body.dash h3 { margin: 0; font-weight: 600; letter-spacing: 0.01em; }
body.dash p { margin: 0; }
body.dash code { font: 0.92em var(--mono); background: var(--raised); padding: 1px 5px; border-radius: 4px; color: var(--text); }
body.dash :focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/* ---------- frame
   The layout system. The content column is fluid from 1280 to 2560+ wide: no page is capped, only running text is
   (--measure). Pages lay out with the grids below, which add columns as the column gets wider:
     .grid2  two equal columns (one on narrow screens)      .grid3  as many 260px+ columns as fit
     .cols   as many --col (default 360px) columns as fit   .split  a fixed side list + the rest
     .flow   cards poured into newspaper columns (--col wide), for pages of uneven cards (Game settings)
   .main is a size container named "main", so a page can also ask @container main (min-width: 1500px) { ... }.
   Page header (built by js/shell.js): title and one-line purpose on the left, the page's actions and its save state
   on the right (#pageActions). The sidebar scrolls inside itself; the account block at its foot always shows. */
:root { --side: 232px; --pad: clamp(18px, 1.8vw, 40px); --measure: 78ch; --gap: 16px; }
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { background: #101216; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 0; }
.side .brand { display: flex; align-items: baseline; gap: 8px; padding: 18px 20px 8px; flex: none; }
.side .brand b { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.side .brand span { font-size: 12px; color: var(--faint); }
.side .navlist { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.side h4 { margin: 14px 8px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.side h4.admin { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.side a.nav { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 10px; border-radius: 6px; color: var(--dim); text-decoration: none; font-size: 14.5px; }
.side a.nav:hover { background: var(--surface); color: var(--text); }
.side a.nav[aria-current=page] { background: var(--raised); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side a.nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-left: auto; }
.side a.nav .dot.on { background: var(--good); box-shadow: 0 0 0 3px #57c27a33; }
.side .foot { flex: none; padding: 12px 14px 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--dim); background: #101216; }
.side .foot .acct { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.side .foot b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot .av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line2); color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; }
.side .foot .btn { flex: none; }
.main { min-width: 0; width: 100%; padding: 22px var(--pad) 64px; display: flex; flex-direction: column; gap: 20px; container: main / inline-size; }
.pagehead { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pagehead .ttl { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pagehead h1 { font-size: 26px; line-height: 1.2; }
.pagehead .sub { color: var(--dim); max-width: var(--measure); }
.pagehead .sub:empty { display: none; }
.pagehead .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.savestate { font-size: 13px; color: var(--faint); min-width: 70px; text-align: right; order: -1; }
.savestate.busy { color: var(--warn); } .savestate.ok { color: var(--good); } .savestate.bad { color: var(--bad); }
.banner { padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--warn); background: #e8b04a14; color: #f3d9a4; }
.banner.bad { border-color: var(--bad); background: #ef6a5e14; color: #ffc9c2; }
.banner.info { border-color: var(--info); background: #6aa7f514; color: #cfe2ff; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side .navlist { display: contents; }
  .side h4, .side .brand span, .side .foot .av { display: none; } .side .brand { padding: 0 8px; } .side .foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; background: none; }
  .side .foot .acct { flex-direction: row; gap: 8px; }
  .main { padding: 14px 12px 40px; }
  .pagehead { padding-bottom: 12px; }
  .app { align-content: start; }   /* (a short page stretched the top bar's rows to fill the screen: players.html) */
}
/* phones: body text at 16px, captions no smaller than 13px, and every control at least 44px tall to tap */
@media (max-width: 600px) {
  html, body.dash { font-size: 16px; }
  .help, .pagehead .sub, .who .names p, .do > .switch small, .often p { font-size: 15px; }
  .item .s, .pill, .table th, .stat .k, .side .foot, .savestate, .legend, .sec, .count, .pick .label small, .chip, .sw { font-size: 13px; }
  .field > label, .label, .field .labelrow label { font-size: 15px; }
  body.dash input[type=text], body.dash input[type=number], body.dash input[type=search], body.dash input:not([type]), body.dash select, body.dash textarea { font-size: 16px; min-height: 44px; }
  .btn, .btn.sm, .seg button, .tabs button, .side a.nav { min-height: 44px; }
  .btn, .seg button, .tabs button, .side a.nav, .switch { font-size: 15px; }
  .btn.sm { font-size: 14px; }
  .switch { min-height: 44px; }
  .x { width: 44px; height: 44px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; } .toast { max-width: none; font-size: 15px; }
}

/* ---------- parts */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card > h2 { font-size: 17px; } .card > h2 + .help { margin-top: -8px; }
.card > p.help, .card > p:not([class]) { max-width: var(--measure); }
.card.flat { background: none; }
.cardhead { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; } .cardhead > h2 { font-size: 17px; flex: 1 1 auto; }
.help { color: var(--dim); font-size: 13.5px; line-height: 1.45; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); align-items: start; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--col, 360px)), 1fr)); gap: var(--gap); align-items: start; }
.split { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.flow { columns: var(--n, 3) var(--col, 560px); column-gap: var(--gap); }
.flow > * { break-inside: avoid; margin-bottom: var(--gap); } .flow > .span { column-span: all; }
.flow > :last-child { margin-bottom: 0; }
@container main (min-width: 1700px) { .split { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 980px) { .grid2, .split { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; } .row.end { justify-content: flex-end; } .grow { flex: 1 1 auto; min-width: 0; }
.measure { max-width: var(--measure); }
/* a link that reads as "go there": text, an arrow, no box (a button is for doing something on this page) */
a.go { font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; } a.go::after { content: " →"; } a.go:hover { text-decoration: underline; }

.btn { font: 600 14.5px/1 var(--font); color: var(--text); background: var(--raised); border: 1px solid var(--line2); border-radius: 6px; padding: 9px 14px; min-height: 36px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--dim); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--accent); }
.btn.danger { color: #ffb3aa; border-color: #7a3a35; } .btn.danger:hover:not(:disabled) { border-color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; color: var(--dim); } .btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--line2); }
.btn.sm { padding: 6px 11px; font-size: 13.5px; min-height: 32px; }
.btn.big { padding: 13px 20px; font-size: 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
body.dash a.btn { color: var(--text); } body.dash a.btn.primary { color: var(--accent-ink); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--text); }
body.dash input[type=text], body.dash input[type=number], body.dash input[type=search], body.dash input:not([type]), body.dash select, body.dash textarea {
  font: 15px/1.35 var(--font); color: var(--text); background: #12141a; border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
body.dash textarea { resize: vertical; min-height: 76px; }
body.dash input:hover, body.dash select:hover, body.dash textarea:hover { border-color: var(--dim); }
body.dash input[type=number] { width: 92px; }
body.dash input[type=range] { accent-color: var(--accent); width: 100%; }
body.dash input[type=color] { width: 44px; height: 34px; padding: 2px; background: #12141a; border: 1px solid var(--line2); border-radius: 6px; }
body.dash ::placeholder { color: var(--faint); }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 38px; height: 22px; border-radius: 11px; background: var(--line2); position: relative; cursor: pointer; flex: none; transition: background 0.12s; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.12s; }
.switch input:checked { background: var(--good); } .switch input:checked::after { transform: translateX(16px); }
.switch { min-height: 32px; }
.switch input:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.seg button { font: 600 14px/1 var(--font); color: var(--dim); background: none; border: 0; border-left: 1px solid var(--line2); padding: 8px 13px; min-height: 34px; cursor: pointer; }
.seg button:focus-visible { outline-offset: -3px; }
.seg button:first-child { border-left: 0; } .seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { font: 600 14.5px/1 var(--font); color: var(--dim); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; }
.tabs button:hover { color: var(--text); } .tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }

table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th[data-sort] { cursor: pointer; } .table th[data-sort]:hover { color: var(--text); }
.table th[data-sort]:not([aria-sort])::after { content: "↕"; margin-left: 4px; opacity: 0.45; }   /* says "this column sorts" before anyone hovers */
.table td { padding: 8px 10px; border-bottom: 1px solid #262a33; vertical-align: middle; }
.table tr:hover td { background: #ffffff05; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--raised); color: var(--dim); white-space: nowrap; }
.pill.good { background: #57c27a22; color: #8fe0a9; } .pill.warn { background: #e8b04a22; color: #f1cd84; } .pill.bad { background: #ef6a5e22; color: #ff9d94; } .pill.info { background: #6aa7f522; color: #a9cbfb; }
.list { display: flex; flex-direction: column; gap: 4px; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%; min-width: 0; }
.item:hover { background: var(--raised); } .item.on, .item[aria-current=true] { background: var(--raised); border-color: var(--accent); }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .s { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.off { opacity: 0.5; }
.empty { padding: 26px 16px; text-align: center; color: var(--dim); border: 1px dashed var(--line2); border-radius: var(--r); }
.stat { display: flex; flex-direction: column; gap: 2px; } .stat .k { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); } .stat .v { font-size: 20px; font-weight: 600; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--raised); border: 1px solid var(--line2); border-left: 4px solid var(--good); border-radius: 6px; padding: 10px 14px; max-width: 420px; box-shadow: 0 8px 24px #0008; display: flex; align-items: center; gap: 12px; }
.toast .btn { margin-left: auto; flex: none; }
.toast.bad { border-left-color: var(--bad); } .toast.warn { border-left-color: var(--warn); }
/* the inline "are you sure" that stands in for a button that cannot be taken back (Shell.ask) */
.ask { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #ef6a5e14; border: 1px solid #7a3a35; border-radius: 6px; padding: 6px 8px 6px 12px; }
.ask .q { font-weight: 600; color: #ffc9c2; font-size: 14px; }
.btn.solid { background: #c94a3e; border-color: #c94a3e; color: #fff; } .btn.solid:hover:not(:disabled) { border-color: #fff; }
canvas.pix, img.pix { image-rendering: pixelated; }

/* ---------- loading: pages start with <body data-wait> and stay hidden until framed (js/shell.js) or booted (js/cloud.js) */
body[data-wait] > :not(.app):not(.toasts) { visibility: hidden; }
body[data-wait]::after { content: ""; position: fixed; left: 50%; top: 42%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 3px solid #343a47; border-top-color: #f2a23a; opacity: 0; animation: cf-wait 0s linear .3s forwards, cf-spin .8s linear infinite; }
@keyframes cf-wait { to { opacity: 1; } }
@keyframes cf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body[data-wait]::after { animation: cf-wait 0s linear .3s forwards; } }
/* sidebar numbers: heroes at camp beside Live control, unread tickets beside Feedback for Hangry */
.side a.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--raised); color: var(--text); font: 700 12px/20px var(--font); text-align: center; flex: none; }
.side a.nav .badge.hot { background: var(--accent); color: var(--accent-ink); }
.side a.nav .badge:not([hidden]) + .dot { margin-left: 8px; }
/* ---------- lineup: Active and Bench, cards dragged between them (js/lineup.js; the Bosses and Visitors pages).
   A page sets --ln-col (the narrowest card). Open places in Active: one slim .ln-open tile after the cards (as tall as
   the row when it shares one with cards, short when it starts a row of its own). A grouped bench: .ln-group rows. */
.ln-sec { display: flex; flex-direction: column; gap: 10px; } .ln-sec + .ln-sec { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.ln-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; } .ln-head h3 { font-size: 17px; }
.ln-count { font: 600 14px/1 var(--font); color: var(--text); background: var(--raised); border-radius: 99px; padding: 4px 10px; }
.ln-count.full { background: #57c27a22; color: #8fe0a9; } .ln-count.none { background: #e8b04a22; color: #f1cd84; }
.ln-note { color: var(--dim); font-size: 14px; }
.ln-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ln-col, 188px), 1fr)); gap: 10px; min-height: 60px; border-radius: 10px; outline: 2px dashed transparent; outline-offset: 5px; transition: outline-color .12s; }
.ln-grid > * { min-width: 0; }
.ln-card { touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.ln-dragging .ln-card .pick { cursor: grabbing; }
.ln-card.ln-src { opacity: .35; }
.ln-card.ln-target { outline: 2px solid var(--accent); outline-offset: 2px; }
.ln-grid.ln-over { outline-color: var(--accent); }
.ln-grid.ln-full { outline-color: var(--bad); }
.ln-open { min-height: 56px; border: 1px dashed var(--line2); border-radius: 8px; display: grid; place-items: center; color: var(--faint); font-size: 13.5px; text-align: center; padding: 10px; }
.ln-grid.ln-over .ln-open { border-color: var(--accent); color: var(--text); }
.ln-open.wide { grid-column: 1 / -1; min-height: 72px; }
.ln-group { display: flex; flex-direction: column; gap: 8px; } .ln-group + .ln-group { margin-top: 14px; }
.ln-ghead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.ln-ghead h4 { font: 600 14px/1.2 var(--font); color: var(--text); letter-spacing: .02em; }
.ln-gcount { font: 600 12.5px/1 var(--font); color: #8fe0a9; background: #57c27a1a; border-radius: 99px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.ln-ghead .ln-note { font-size: 13.5px; }
.ln-none { color: var(--faint); font-size: 14px; padding: 8px 2px; }
.ln-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body > .ln-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; margin: 0; box-shadow: 0 14px 34px #000a; will-change: transform; }
html.ln-busy, html.ln-busy * { cursor: grabbing !important; }
/* a card's "..." button and its menu */
.ln-more { position: absolute; top: 4px; right: 4px; width: 30px; height: 28px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--dim); font: 700 16px/1 var(--font); cursor: pointer; }
.ln-more:hover, .ln-more[aria-expanded=true] { color: var(--text); border-color: var(--line2); background: var(--raised); }
.ln-menu { position: absolute; top: 34px; right: 4px; z-index: 5; display: flex; flex-direction: column; min-width: 160px; background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px #0008; }
.ln-menu > button { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 6px; font-size: 14px; } .ln-menu > button:hover, .ln-menu > button:focus-visible { background: var(--raised); }
.ln-menu button.danger { color: #ffb3aa; }
.ln-menu button:disabled { color: var(--faint); cursor: default; } .ln-menu button:disabled:hover { background: none; }
.ln-menu button .n { color: var(--faint); margin-left: 6px; font-variant-numeric: tabular-nums; }
/* a small panel of settings that opens under the button that names them (the Visitors page's "Visits"): the same skin
   as .ln-menu, holding a .setlist. The page positions it (it sits in a position: relative parent). */
.popover { position: absolute; z-index: 6; width: min(520px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 12px 16px 10px; box-shadow: 0 10px 28px #000a; }
.popover .setrow .ctl .seg button { min-width: 40px; }
.popover .pfoot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.popover .pfoot a { font-weight: 600; }
/* a square button holding one symbol (a "..." that opens a menu) */
.iconbtn { flex: none; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line2); background: var(--raised); color: var(--dim); font: 700 16px/1 var(--font); cursor: pointer; }
.iconbtn:hover, .iconbtn[aria-expanded=true] { color: var(--text); border-color: var(--dim); }
@media (max-width: 600px) { .iconbtn { width: 44px; height: 44px; } }
/* tier as a word (the Bosses page, Live control) */
.pill.diff-1 { background: #57c27a22; color: #8fe0a9; } .pill.diff-2 { background: #6aa7f522; color: #a9cbfb; } .pill.diff-3 { background: #e8b04a22; color: #f1cd84; } .pill.diff-4 { background: #ef6a5e2e; color: #ffb0a6; }
.ln-card .foot { flex-wrap: wrap; } .ln-card .foot > span { white-space: nowrap; }
/* phones: two columns */
@media (max-width: 520px) { .ln-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ln-open { min-height: 48px; } }
/* ---------- settings parts (Game settings; .tools and .fchip also on Players)
   .tools        a page's search box, filter chips and a match count, in one row
   .fchip        a round on/off filter button (aria-pressed)
   .setlist      a list of .setrow: label and one-line help on the left, the control on the right at a fixed width
   .setrow.stack the control goes under the label (segmented choices that need the room)
   .numpair      a slider, its number box and a unit, each a fixed width (never stretched across a wide card)
   .linkbtn      a button that reads as a link (Back to default, Open Fine tuning)
   .card.flash   a card someone was sent to (settings.html#chest-odds) glows for a moment
   Shell.seg()   builds a .seg (js/shell.js) */
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tools .find { flex: 1 1 260px; max-width: 420px; }
body.dash .tools select { width: auto; }
.tools .count { color: var(--faint); font-size: 13.5px; margin-left: auto; }
.fchip { font: 600 13.5px/1 var(--font); color: var(--dim); background: none; border: 1px solid var(--line2); border-radius: 99px; padding: 8px 13px; min-height: 34px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.fchip:hover:not(:disabled) { color: var(--text); border-color: var(--dim); }
.fchip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fchip:disabled { opacity: 0.45; cursor: not-allowed; }
.fchip .n { font-variant-numeric: tabular-nums; opacity: 0.8; }
.setlist { display: flex; flex-direction: column; }
.setrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.setlist > .setrow.first, .setlist > .setrow:first-child { border-top: 0; padding-top: 2px; }
.setlist > .setrow:last-child { padding-bottom: 2px; }
.setrow .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setrow .what > label, .setrow .what > .name { font-size: 15px; font-weight: 600; }
.setrow .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; justify-content: flex-end; min-width: 0; }
body.dash .setrow .ctl select { width: 200px; } body.dash .setrow .ctl input[type=text] { width: 220px; }
.setrow.stack { grid-template-columns: minmax(0, 1fr); } .setrow.stack .ctl { justify-content: flex-start; }
.setrow .meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
.setrow .msg { grid-column: 1 / -1; font-size: 13.5px; color: #f1cd84; background: #e8b04a14; border: 1px solid #e8b04a55; border-radius: 6px; padding: 6px 10px; }
.setrow .msg.bad { color: #ffc9c2; background: #ef6a5e14; border-color: #ef6a5e66; }
.setrow .onoff { min-width: 26px; color: var(--dim); font-weight: 600; font-size: 14px; }
.numpair { display: inline-flex; align-items: center; gap: 10px; }
body.dash .numpair input[type=range] { width: 150px; flex: none; }
body.dash .numpair input[type=number] { width: 84px; flex: none; text-align: right; }
.numpair .unit { color: var(--dim); font-size: 13.5px; min-width: 24px; }
.linkbtn { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--text); }
.card.flash { animation: cf-flash 1.8s ease-out; }
@keyframes cf-flash { 0%, 35% { border-color: var(--accent); box-shadow: 0 0 0 3px #f2a23a44; } 100% { border-color: var(--line); box-shadow: none; } }
@media (max-width: 760px) { .setrow { grid-template-columns: minmax(0, 1fr); } .setrow .ctl { justify-content: flex-start; } }
@media (max-width: 600px) { .fchip { font-size: 14.5px; min-height: 44px; } .tools .count, .setrow .msg { font-size: 15px; } .setrow .meta { font-size: 13px; } .linkbtn { min-height: 32px; }
  body.dash .numpair input[type=range] { width: 120px; } }

/* ---------- ability look editor (js/abilityed.js: Bosses and Classes pages). Recipe | stage | gallery: three fluid
   columns from 1500px of main, the gallery below them narrower, one column (stage first) on a phone. Controls keep
   their size; only the columns grow.
   .atabs/.atab   an ability's (or class move's) tab: fixed size, a kind pill, .dot when edited
   .aed           the editor: .ae-recipe (.ae-step rows, .ae-knobs), .ae-stagecol (.ae-chat, canvas, .ae-tl, .ae-ctl),
                  .ae-gal (.ae-tiles of .ae-tile, .ae-presets) */
.atabs { display: flex; flex-wrap: wrap; gap: 8px; }
.atab { all: unset; box-sizing: border-box; cursor: pointer; width: 236px; min-height: 58px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #12141a; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 10px; align-items: center; position: relative; }
.atab:hover { border-color: var(--line2); } .atab:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.atab[aria-selected=true] { border-color: var(--accent); background: #1d2129; box-shadow: inset 0 -3px 0 var(--accent); }
.atab .num { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.atab .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.atab .k { font-size: 12.5px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.atab .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.atab.add { grid-template-columns: 1fr; place-items: center; color: var(--dim); border-style: dashed; width: 160px; font-weight: 600; font-size: 14px; }
.pill.k-heavy { background: #4a2620; color: #ffb8a8; } .pill.k-sweep { background: #3c3320; color: #f5d38a; } .pill.k-drain { background: #3a2033; color: #f0a8d8; }
.pill.k-stun { background: #2a2a44; color: #b8b8ff; } .pill.k-steal { background: #3a3520; color: #fed171; } .pill.k-armor { background: #2a3036; color: #c6d2dc; } .pill.k-single { background: #23302a; color: #a8e0b8; }
.pill.k-attack { background: #23302a; color: #a8e0b8; } .pill.k-skill { background: #1f2d3d; color: #a9cbfb; } .pill.k-ult { background: #3a2a14; color: #f2c27a; } .pill.k-sys { background: #2c2536; color: #d6bdf5; }

.aed { display: grid; gap: var(--gap); align-items: start; grid-template-columns: 380px minmax(0, 1fr); }
.aed > .ae-gal { grid-column: 1 / -1; }
.aed.ro { grid-template-columns: minmax(0, 1100px); }
@container main (min-width: 1500px) { .aed { grid-template-columns: 380px minmax(600px, 1.25fr) minmax(440px, 1fr); } .aed > .ae-gal { grid-column: auto; } }
@container main (min-width: 2600px) { .aed { grid-template-columns: 400px minmax(900px, 1.3fr) minmax(640px, 1fr); } }
@container main (max-width: 760px) { .aed { grid-template-columns: minmax(0, 1fr); } .aed > .ae-stagecol { order: -1; } }

.ae-rhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ae-rhead h2 { font-size: 17px; flex: 1 1 auto; min-width: 0; }
.ae-vars { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.ae-vars .seg button { min-width: 34px; padding: 6px 9px; min-height: 30px; }
.ae-steps { display: flex; flex-direction: column; gap: 6px; }
.ae-step { border: 1px solid var(--line); border-radius: 8px; background: #12141a; }
.ae-step > .sh { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 24px 92px minmax(0, 1fr) 14px; gap: 10px; align-items: center; padding: 6px 10px; min-height: 50px; }
.ae-step > div.sh { cursor: default; grid-template-columns: 24px 70px minmax(0, 1fr); }
.ae-step > .sh:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; border-radius: 8px; }
.ae-step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.ae-step .lbl { font-weight: 600; font-size: 14.5px; } .ae-step .lbl small { display: block; font-weight: 400; font-size: 12px; color: var(--faint); }
.ae-step .pickd { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.ae-step .none { color: var(--faint); font-size: 13.5px; white-space: nowrap; }
.ae-step .pickd .seg button { padding: 6px 9px; min-height: 30px; font-size: 13px; }
.ae-step .chev { color: var(--faint); font-size: 13px; }
.ae-step.on { border-color: var(--accent); background: #191c23; } .ae-step.on .n { background: var(--accent); color: var(--accent-ink); }
.ae-thumb { width: 44px; height: 44px; flex: none; border-radius: 6px; background: #0d0f13; border: 1px solid var(--line); image-rendering: pixelated; display: block; }
.ae-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 8px; padding: 4px 4px 4px 4px; background: var(--raised); font-size: 13.5px; font-weight: 600; max-width: 100%; cursor: pointer; }
.ae-chip:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.ae-chip.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ae-chip .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.ae-chip .rm { all: unset; cursor: pointer; color: var(--faint); font-size: 17px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.ae-chip .rm:hover, .ae-chip .rm:focus-visible { color: var(--text); background: #ffffff12; }
.ae-knobs { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ae-krow { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; align-items: center; }
.ae-krow > span:first-child { font-size: 12.5px; color: var(--faint); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ae-krow .seg button { padding: 6px 8px; min-height: 30px; font-size: 13px; } .ae-krow > .seg, .ae-krow > .numpair, .ae-krow > .ae-sw { justify-self: start; }
.ae-layers { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .ae-layers .ae-chip { width: 100%; }
.ae-sw { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ae-sw button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #0007; cursor: pointer; padding: 0; flex: none; }
.ae-sw button[aria-pressed=true] { outline: 2px solid var(--text); outline-offset: 2px; }
.ae-sw .lab { font-size: 12px; color: var(--faint); margin: 0 2px; }
.ae-sw .none { background: repeating-linear-gradient(45deg, #2a2f39 0 4px, #1c1f25 4px 8px); }
body.dash .aed input[type=range].ms { width: 170px; flex: none; } body.dash .aed input[type=range].sz { width: 116px; flex: none; }
.ae-msv { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 66px; }
.ae-krow .numpair { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ae-krow .numpair .ae-msv { min-width: 26px; }
.ae-krow small, .ae-posrow small { flex-basis: 100%; font-size: 12px; color: var(--faint); }
.ae-chip .ln { width: 20px; height: 20px; border-radius: 50%; background: #0d0f13; color: var(--dim); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; margin-left: 2px; }
.ae-chip.sel .ln { background: var(--accent); color: var(--accent-ink); }
.ae-chip .t small { display: block; font-weight: 400; font-size: 12px; color: var(--faint); }
.ae-lacts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ae-anch { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-self: start; }
.ae-posrow { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-self: start; }
.ae-pos { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--text); min-width: 96px; }
.ae-rfoot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; position: relative; }
.ae-copy { position: absolute; bottom: 46px; left: 0; z-index: 6; width: 340px; max-width: calc(100vw - 40px); background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 12px; box-shadow: 0 8px 24px #0008; display: flex; flex-direction: column; gap: 8px; }
body.dash .ae-copy select { width: 100%; }

.ae-stagecol { position: sticky; top: 12px; }
.ae-chat { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: #0d0f13; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-height: 50px; }
.ae-chat .who { font-weight: 600; color: var(--dim); font-size: 14px; }
.ae-chat .mv { font: 700 18px/1 var(--font); letter-spacing: .06em; color: #ffd38a; text-transform: uppercase; }
.ae-chat .at { color: var(--text); font-size: 14px; }
.ae-chat .cmd { font: 600 13px var(--mono, monospace); color: #6cc4c9; background: #6cc4c914; padding: 3px 7px; border-radius: 4px; }
.ae-dice { display: inline-flex; gap: 4px; }
.ae-die { width: 32px; height: 32px; background-image: url(../assets/ui/dice6.png); background-size: 192px 480px; image-rendering: pixelated; }
.ae-chat .verdict { font: 700 15px/1 var(--font); letter-spacing: .06em; padding: 5px 8px; border-radius: 4px; background: #57c27a22; color: #8fe0a9; }
.ae-chat .verdict.miss { background: #9aa2b122; color: #cfd3dc; } .ae-chat .verdict.crit { background: #f2a23a2e; color: #ffd38a; }
.ae-chat .dmg { font: 700 18px/1 var(--font); color: #ffb0a6; min-width: 34px; } .ae-chat .dmg.heal { color: #8fe0a9; }
canvas.ae-stage { width: 100%; aspect-ratio: 1000 / 400; display: block; background: #111318; border: 1px solid var(--line); border-radius: 8px; }
.aed:not(.ro) canvas.ae-stage { touch-action: none; }
.aed:not(.ro) canvas.ae-stage:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.ae-tl { position: relative; height: 70px; border: 1px solid var(--line); border-radius: 8px; background: #0f1115; overflow: hidden; }
.ae-tl .blk { position: absolute; top: 8px; height: 22px; border-radius: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 6px; white-space: nowrap; overflow: hidden; color: #0d0f13; box-sizing: border-box; }
.ae-tl .b1 { background: #c9a2e6; } .ae-tl .b2 { background: #6aa7f5; } .ae-tl .b3 { background: #f2a23a; } .ae-tl .b4 { background: #57c27a; } .ae-tl .dim { background: #262a33; color: var(--faint); }
.ae-tl .hit { position: absolute; top: 4px; bottom: 4px; width: 2px; background: #ffb0a6; }
.ae-tl .hitl { position: absolute; top: 32px; margin-left: 4px; font-size: 11px; color: #ffb0a6; font-weight: 600; }
.ae-tl .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); box-shadow: 0 0 0 1px #000a; pointer-events: none; }
.ae-tl .selm { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); cursor: ew-resize; touch-action: none; z-index: 2; }
.ae-tl .selm::before { content: ''; position: absolute; inset: 0 -10px; }
.ae-tl .selm span { position: absolute; bottom: 3px; left: 3px; font: 700 11px/1 var(--font); white-space: nowrap; background: var(--accent); color: var(--accent-ink); border-radius: 3px; padding: 3px 5px; }
.ae-tl .selm:hover, .ae-tl .selm.on { box-shadow: 0 0 0 2px #f2a23a55; }
.ae-ctl { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.ae-ctl .lab { font-size: 12.5px; color: var(--faint); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ae-trying { font-size: 13px; color: var(--accent); font-weight: 600; }

.ae-gtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body.dash .ae-gtools input[type=search] { flex: 1 1 200px; max-width: 360px; width: auto; } body.dash .ae-gtools select { width: 190px; }
.ae-gtools .count { color: var(--faint); font-size: 13px; margin-left: auto; }
.ae-cats { display: flex; flex-wrap: wrap; gap: 6px; } .ae-cats .fchip { padding: 6px 11px; min-height: 30px; font-size: 13px; }
.ae-for { font-size: 13.5px; color: var(--dim); background: #f2a23a12; border: 1px solid #f2a23a44; border-radius: 6px; padding: 6px 10px; } .ae-for b { color: var(--text); }
.ae-tiles { display: grid; grid-template-columns: repeat(auto-fill, 124px); gap: 8px; justify-content: start; max-height: 980px; overflow-y: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ae-tile { all: unset; box-sizing: border-box; cursor: pointer; width: 124px; border: 1px solid var(--line); border-radius: 8px; background: #0d0f13; position: relative; display: flex; flex-direction: column; }
.ae-tile:hover, .ae-tile.hov, .ae-tile:focus-visible { border-color: var(--accent); }
.ae-tile.cur { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.ae-th { display: block; background-repeat: no-repeat; image-rendering: pixelated; --ts: 44px;
  background-size: calc(var(--ts) * var(--tc, 16)) auto; background-position: calc(var(--tx, 0) * var(--ts) * -1) calc(var(--ty, 0) * var(--ts) * -1); }
span.ae-thumb { width: 46px; height: 46px; }
.ae-tile .pic { width: 122px; height: 96px; position: relative; display: grid; place-items: center; border-radius: 8px 8px 0 0; overflow: hidden; }
.ae-tile .th { width: 96px; height: 96px; --ts: 96px; }
.ae-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ae-tile .tn { font-size: 12.5px; font-weight: 600; padding: 5px 7px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-tile .tp { font-size: 11px; color: var(--faint); padding: 0 7px 6px; display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; }
.ae-tile .tp i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid #0008; flex: none; }
.ae-tile .star { all: unset; cursor: pointer; position: absolute; top: 2px; right: 2px; font-size: 15px; color: #ffffff40; width: 26px; height: 26px; display: grid; place-items: center; }
.ae-tile .star.on { color: var(--accent); } .ae-tile .star:hover { color: var(--text); }
.ae-tile .use { position: absolute; top: 5px; left: 6px; font: 700 10.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; background: var(--good); color: #0d1a12; border-radius: 3px; padding: 3px 4px; }
.ae-tile .lic { position: absolute; top: 74px; left: 6px; font: 600 10.5px/1 var(--font); background: #e8b04a33; color: #f1cd84; border-radius: 3px; padding: 2px 4px; }
.ae-gfoot { font-size: 12.5px; color: var(--faint); }
.ae-presets { display: grid; grid-template-columns: repeat(auto-fill, 236px); gap: 8px; max-height: 980px; overflow-y: auto; padding: 2px; }
.ae-preset { all: unset; box-sizing: border-box; cursor: pointer; width: 236px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #0d0f13; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 10px; align-items: center; }
.ae-preset:hover, .ae-preset:focus-visible { border-color: var(--accent); } .ae-preset .ae-thumb { grid-row: 1 / 3; }
.ae-preset .pn { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ae-preset .pf { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-ro { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) {
  .atab { width: calc(50% - 4px); } .atab.add { width: 100%; }
  .ae-tiles { grid-template-columns: repeat(auto-fill, 104px); max-height: 640px; } .ae-tile { width: 104px; } .ae-tile .pic { width: 102px; height: 80px; } .ae-tile .th { width: 80px; height: 80px; --ts: 80px; } .ae-tile .lic { top: 60px; }
  .ae-step > .sh { grid-template-columns: 24px 80px minmax(0, 1fr) 14px; min-height: 60px; }
  .ae-krow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ae-presets { grid-template-columns: 1fr; } .ae-preset { width: 100%; }
  .ae-sw button { width: 30px; height: 30px; } .ae-chip .rm { width: 40px; height: 40px; }
}
.ae-flipb[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
