/* Copilot · the callers' site: a working panel with a gazette's manners.

   Paper and ink (the night edition inverts them), square corners, rules
   instead of cards, dense ruled tables. Color is rationed: vermilion only
   for the main action and Aberto, highlighter yellow only for what waits
   for someone, category colors as small squares. Only the chosen slot,
   the chosen request, the split and a few forms are boxes, with a small
   offset shadow.

   Type: Fraunces only for the page title, section titles and the few
   numbers that matter; Instrument Sans for everything else; IBM Plex Mono
   for silver, dates and numbers in a column.

   No inline style anywhere (CSP): every color is a token below, defined
   twice (paper and night). Mobile first; 44px targets. */

/* ---------- Fonts (SIL OFL 1.1, latin subset; licenses in fonts/) ---------- */

@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/fraunces-latin-full-normal.9d53fa41cb.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/fraunces-latin-full-italic.09a19f7d05.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/instrument-sans-latin-wght-normal.5a50d66839.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-latin-400-normal.3c5a451f9e.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-latin-600-normal.c4d3deb734.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;
  /* Surfaces, darkest to lightest: the page, the boxes, what sits on
     top (hover, badges). Neutral greys, no tint. */
  --paper: #121417;
  --paper-2: #1d2026;
  --sheet: #181b20;
  --ink: #e6e8eb;
  --ink-2: #bcc2ca;
  --muted: #8b929d;
  --faint: #5f6672;
  --hair: rgba(230, 232, 235, .09);
  --hair-2: rgba(230, 232, 235, .18);
  --on-ink: #121417;

  /* The brand blue: the main action, where you are, the chosen row,
     Aberto. Yellow: what waits for someone. Green: done or paid. Red:
     problems only. */
  --signal: #5b9cff;
  --signal-text: #82b4ff;
  --on-signal: #08111f;
  --signal-soft: rgba(91, 156, 255, .13);
  --mark: #f2c94c;
  --mark-soft: rgba(242, 201, 76, .16);
  --on-mark: #1a1505;
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, .13);
  --bad: #f26d6d;
  --bad-soft: rgba(242, 109, 109, .12);
  --info: #9aa3ae;

  --tank: #6ea8f7;
  --healer: #3fcf8e;
  --support: #b59af8;
  --dps: #f26d6d;
  --deftank: #a9c443;
  --debuff: #e46fc8;
  --mount: #f0913a;
  --looter: #45c8c8;
  --none: #7f8894;
  --on-cat: #0f1115;
  --on-bad: #0f1115;
  --discord: #5865f2;
  --on-discord: #ffffff;
  --dc-bg: #313338;
  --dc-bg-2: #1e1f22;
  --dc-text: #dbdee1;
  --dc-strong: #ffffff;
  --dc-muted: #949ba4;

  --shadow-c: rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .6);
  --shadow: 3px 3px 0 var(--shadow-c);
  --shadow-sm: 2px 2px 0 var(--shadow-c);
  --grain: none;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --tap: 44px;
  --gutter: 16px;
  --max: 1320px;
  --bar-top: 92px;
  --sticky-top: calc(var(--bar-top) + 12px);
  --bar-h: 0px;
}

/* The light theme (cookie tema=claro): the same roles. */
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f5f7;
  --paper-2: #e9ebef;
  --sheet: #ffffff;
  --ink: #16191e;
  --ink-2: #3b414b;
  --muted: #5f6773;
  --faint: #9ba2ac;
  --hair: rgba(22, 25, 30, .09);
  --hair-2: rgba(22, 25, 30, .18);
  --on-ink: #ffffff;

  --signal: #2f6fca;
  --signal-text: #2560b3;
  --on-signal: #ffffff;
  --signal-soft: rgba(47, 111, 202, .1);
  --mark: #f5c518;
  --mark-soft: rgba(245, 197, 24, .2);
  --on-mark: #1a1505;
  --ok: #14885a;
  --ok-soft: rgba(20, 136, 90, .1);
  --bad: #c93434;
  --bad-soft: rgba(201, 52, 52, .08);
  --info: #6b7584;

  --tank: #2f6fca;
  --healer: #14885a;
  --support: #7a52d4;
  --dps: #d23f3f;
  --deftank: #637a0c;
  --debuff: #a83a90;
  --mount: #c2620c;
  --looter: #11807f;
  --none: #6b7584;
  --on-cat: #ffffff;
  --on-bad: #ffffff;

  --shadow-c: rgba(22, 25, 30, .16);
  --scrim: rgba(22, 25, 30, .4);
}

@media (min-width: 720px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --bar-top: 52px; } }
/* With a mouse the targets can be smaller; touch screens keep 44px. */
@media (min-width: 1024px) and (pointer: fine) { :root { --tap: 38px; } }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper) var(--grain); color: var(--ink);
  font: 400 1rem/1.5 var(--f-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--signal-text); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
p { margin: 0 0 .8rem; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--f-display); font-weight: 700; line-height: 1.15; letter-spacing: -.005em; }
h1 { font-size: clamp(1.55rem, 4.5vw, 2rem); font-variation-settings: "opsz" 48; letter-spacing: -.015em; line-height: 1.1; }
h2 { font-size: 1.15rem; font-variation-settings: "opsz" 24; }
h3 { font-size: 1rem; font-variation-settings: "opsz" 18; }
small { font-size: .85em; }
code { padding: 0 .3em; background: var(--paper-2); font: .88em/1.4 var(--f-mono); }
kbd { display: inline-block; padding: 0 .35em; margin: .1em 0; line-height: 1.3 !important; border: 1px solid var(--hair-2); background: var(--sheet); font: 600 .82em/1.45 var(--f-mono); }
img { max-width: 100%; }
ul, ol { padding-left: 1.2rem; }

/* Figures of the same width, so columns of numbers line up. */
.num { font-variant-numeric: tabular-nums lining-nums; }
/* Labels, column heads, notes. */
.label, .card-note, .sec-note, .ledger-note, .ledger-head, dt {
  font-family: var(--f-text); font-weight: 500; font-size: .8rem; line-height: 1.3; color: var(--muted);
}
.hint { color: var(--muted); font-size: .9rem; }
.hint a { color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--signal); color: var(--on-signal); font: 600 .8rem var(--f-mono); }
.skip-link:focus { top: 1rem; }
/* Highlighter: what waits for someone ("começou há…", "sem nick"). */
.hl { padding: 0 .25em; color: var(--mark); background: var(--mark-soft); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:root[data-theme="light"] .hl { color: var(--on-mark); }

/* ---------- Top bar ---------- */

/* One sticky bar: the name, the five areas, the search, the account.
   Below 1024px the areas take a second line of five equal cells. */
.mast { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--hair-2); }
.mast-bar {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: .5rem;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.mast-brand { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--ink); text-decoration: none; }
.mast-brand img { width: 18px; height: 23px; }
.mast-name { font: 800 1.25rem/1 var(--f-display); font-variation-settings: "opsz" 48; letter-spacing: -.01em; }
.mast-brand:hover { color: var(--ink); }
.mast-search { display: none; }
.mast-tools { display: flex; align-items: center; margin-left: auto; }
.mast-tools form { margin: 0; }
.tool {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); min-height: 0; padding: 0;
  border: 0; background: none; color: var(--ink-2); cursor: pointer;
}
.tool:hover { background: var(--paper-2); color: var(--ink); }
.tool svg, .icon { width: 18px; height: 18px; }
.mast-user { display: none; }

.sections {
  order: 3; flex: 1 0 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  margin: 0 calc(-1 * var(--gutter)); border-top: 1px solid var(--hair-2);
}
.section-link {
  position: relative; display: flex; align-items: center; justify-content: center; gap: .3rem;
  min-height: 44px; padding: 0 .2rem; color: var(--ink-2); text-decoration: none;
  font: 500 .8rem/1.1 var(--f-text); white-space: nowrap;
}
.section-link:hover { color: var(--ink); background: var(--paper-2); }
.section-link[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--signal); }
.nav-badge {
  display: inline-grid; place-items: center; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem;
  background: var(--paper-2); color: var(--ink-2); font: 600 .66rem/1 var(--f-mono);
}
.nav-badge.is-attn { background: var(--mark); color: var(--on-mark); }
@media (max-width: 420px) { .section-link { font-size: .74rem; gap: .2rem; } .section-link .nav-badge { min-width: .95rem; height: .95rem; padding: 0 .15rem; font-size: .6rem; } }
@media (max-width: 359.98px) { .section-link .nav-badge { display: none; } }

@media (min-width: 1024px) {
  .mast-bar { flex-wrap: nowrap; column-gap: 1.25rem; min-height: 52px; }
  .sections { order: 0; flex: 0 1 auto; display: flex; margin: 0 0 0 .5rem; border: 0; align-self: stretch; }
  .section-link { padding: 0 .8rem; font-size: .9rem; }
  .mast-search { position: relative; display: block; flex: 0 1 17rem; margin: 0 0 0 auto; }
  .mast-search input { min-height: 34px; padding: .3rem 2rem .3rem .6rem; font-size: .88rem; border-width: 1px; border-color: var(--hair-2); }
  .mast-search input:focus { border-color: var(--ink); box-shadow: none; }
  .mast-search .icon { position: absolute; right: .55rem; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
  .mast-search + .mast-tools { margin-left: 0; }
  .tool-search { display: none; }
  .mast-user { display: inline-flex; padding: 0 .35rem; }
  .mast-user .avatar { width: 24px; height: 24px; font-size: .75rem; }
}

/* ---------- Page ---------- */

main.page { max-width: var(--max); margin: 0 auto; padding: 1rem var(--gutter) 3rem; }
main.page-form { max-width: calc(1040px + 2 * var(--gutter)); }
.colophon {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; padding: 1rem 0 2rem;
  border-top: 1px solid var(--hair-2);
  font: 500 .78rem/1.3 var(--f-text); color: var(--faint);
}

/* The page head: the area's lists (or the crumbs), then the title and
   its buttons on one line, over a rule. */
.ph { margin: 0 0 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--hair-2); }
.ph-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; margin: 0 0 .5rem; }
.ph-kicker:empty { display: none; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.tabs a {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 .6rem;
  color: var(--muted); text-decoration: none; font: 500 .85rem/1 var(--f-text);
}
.tabs a:hover { color: var(--ink); background: var(--paper-2); }
.tabs a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--signal); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; font: 500 .85rem/1.4 var(--f-text); color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs > span:last-child { color: var(--ink-2); }
.ph-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; }
.ph-row h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; min-width: 0; overflow-wrap: anywhere; }
.ph-row h1 .avatar-lg { width: 40px; height: 40px; font-size: 1.1rem; }
.ph-row h1 .chip { font-size: .72rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.page-actions form { margin: 0; }

/* ---------- Buttons and forms ---------- */

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: .45rem 1.05rem; margin: 0;
  border: 1px solid var(--hair-2); border-radius: 0;
  background: var(--paper-2); color: var(--ink);
  font: 600 .88rem/1.15 var(--f-text); text-decoration: none; text-align: center;
  cursor: pointer;
}
button:hover, .button:hover { color: var(--ink); background: var(--paper-2); border-color: var(--muted); }
.primary, button.primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.primary:hover, button.primary:hover { color: var(--on-signal); background: var(--signal-text); border-color: var(--signal-text); }
.quiet, button.quiet { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.quiet:hover, button.quiet:hover { color: var(--ink); background: var(--paper-2); border-color: var(--ink); }
.danger, button.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.danger:hover, button.danger:hover { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
button[disabled] { opacity: .45; cursor: not-allowed; }
button.add { background: transparent; color: var(--ink); border-style: dashed; }
button.add:hover { border-style: solid; background: var(--sheet); color: var(--ink); }
.button svg, button svg { width: 1rem; height: 1rem; }

label { display: grid; gap: .35rem; margin: 0 0 .9rem; font: 600 .81rem/1.3 var(--f-text); color: var(--ink-2); }
label small { text-transform: none; letter-spacing: 0; font: 400 .8rem var(--f-text); color: var(--muted); }
input:where(:not([type="checkbox"], [type="radio"], [type="hidden"])), select, textarea {
  width: 100%; min-height: var(--tap); margin: 0; padding: .5rem .7rem;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--hair-2); border-radius: 0;
  font: 400 16px/1.35 var(--f-text); text-transform: none; letter-spacing: 0;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
input[disabled], select[disabled] { opacity: .5; }
textarea { min-height: 6rem; max-height: 60vh; resize: none; field-sizing: content; }
select {
  appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
/* Checkboxes and radios are drawn by the site, not by the browser. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none;
  display: inline-grid; place-content: center; width: 20px; height: 20px; margin: 0;
  background: var(--sheet); border: 1px solid var(--muted); border-radius: 0; cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ""; width: 10px; height: 5px; margin-top: -2px;
  border: solid var(--on-signal); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0);
}
input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); transform: scale(0); }
input[type="checkbox"]:checked { background: var(--signal); border-color: var(--signal); }
input[type="radio"]:checked { border-color: var(--signal); }
input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--ink); }
input[type="checkbox"]:checked:hover { border-color: var(--signal); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; box-shadow: none; }
input[type="checkbox"][disabled], input[type="radio"][disabled] { cursor: not-allowed; }
fieldset { min-width: 0; margin: 0 0 .9rem; padding: .7rem .8rem .3rem; border: 1px solid var(--hair-2); }
legend { padding: 0 .35rem; font: 600 .81rem/1.3 var(--f-text); color: var(--ink-2); }
legend small { text-transform: none; letter-spacing: 0; font: 400 .8rem var(--f-text); color: var(--muted); }
.check, .choice {
  display: flex; align-items: center; gap: .55rem; min-height: var(--tap); margin: 0;
  font: 400 .95rem/1.3 var(--f-text); text-transform: none; letter-spacing: 0; color: var(--ink); cursor: pointer;
}
.check.disabled { color: var(--faint); cursor: not-allowed; }
@media (min-width: 1024px) and (pointer: fine) {
  input:where(:not([type="checkbox"], [type="radio"], [type="hidden"])), select, textarea { font-size: .95rem; padding: .4rem .65rem; }
}

/* Tier and enchantment: a segmented control of square cells. */
.seg { display: flex; flex-wrap: wrap; gap: 0; padding: 0; border: 0; margin: 0 0 .9rem; }
.seg > legend { width: 100%; padding: 0 0 .35rem; }
.seg-opt { position: relative; display: block; margin: 0 -1px 0 0; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg-opt {
  display: inline-grid; place-items: center; min-width: 3.4rem; min-height: var(--tap); padding: 0 .7rem;
  border: 1px solid var(--hair-2); background: var(--sheet);
  font: 600 .85rem/1 var(--f-mono); letter-spacing: .04em; color: var(--ink); cursor: pointer;
}
.seg-opt:has(input:checked) { background: var(--signal-soft); color: var(--signal-text); border-color: var(--signal); z-index: 1; }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: 1px; z-index: 1; }
.tier { color: var(--ink); }

/* Filters: the options as a row of words; the current one inverted. */
.segmented { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.25rem; border: 1px solid var(--hair-2); width: max-content; max-width: 100%; }
.segmented a, .segmented strong {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .9rem;
  font: 600 .83rem/1 var(--f-text); text-decoration: none; color: var(--ink);
}
.segmented > * + * { border-left: 1px solid var(--hair-2); }
.segmented a:hover { background: var(--sheet); color: var(--signal-text); }
.segmented strong { background: var(--signal-soft); color: var(--signal-text); }

/* Search fields of the lists. */
.search { display: flex; gap: 0; margin: 0 0 1.25rem; max-width: 34rem; }
.search input { flex: 1; min-width: 0; }
.search button { flex: none; margin-left: -1px; }
.search-big { max-width: none; margin-bottom: 1.75rem; }
.search-big input { min-height: 60px; font: 500 1.3rem var(--f-display) !important; font-variation-settings: "opsz" 24; }
.search-big button { min-height: 60px; padding: 0 1.5rem; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: start; margin: 0; }
.dates label { margin: 0; }
.dates button { grid-column: 1 / -1; }

/* Collapsible blocks: a ruled line with a sign. */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.block, .fold-card, .history-card, .add-presence, .adjust-box, .manual-box, .role-list, .split-fix, .split-calc, .profile-more, .reject, .refresh-detail { margin: 0; }
:is(.block, .fold-card, .history-card, .add-presence, .adjust-box, .manual-box, .role-list, .profile-more) > summary {
  list-style: none; display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: .35rem 0;
}
:is(.block, .fold-card, .history-card, .add-presence, .adjust-box, .manual-box, .role-list, .profile-more) > summary::after {
  content: "+"; margin-left: auto; font: 400 1.4rem/1 var(--f-display); color: var(--ink);
}
:is(.block, .fold-card, .history-card, .add-presence, .adjust-box, .manual-box, .role-list, .profile-more)[open] > summary::after { content: "−"; }
.block-title { font: 700 1.2rem/1.1 var(--f-display); font-variation-settings: "opsz" 36; color: var(--ink); }
.block-count { font: 600 .72rem var(--f-mono); color: var(--muted); }
.block-hint { font: 400 .85rem var(--f-text); color: var(--muted); }

/* ---------- Messages ---------- */

.flash, .errors, .notice, .warning, .alert {
  margin: 0 0 1.25rem; padding: .75rem 1rem .75rem 1rem;
  border: 1px solid var(--hair-2); background: var(--sheet);
}
.flash p, .errors p, .notice p, .warning p, .alert p { margin: 0 0 .35rem; }
.flash > :last-child, .errors > :last-child, .notice > :last-child, .warning > :last-child, .alert > :last-child { margin-bottom: 0; }
.flash { position: relative; padding-left: 3rem; box-shadow: var(--shadow-sm); }
.flash::before { content: "✓"; position: absolute; left: 0; top: 0; bottom: 0; width: 2.1rem; display: grid; place-items: center; background: var(--ok); color: var(--sheet); font: 700 1rem var(--f-mono); }
.errors { border-color: var(--bad); background: var(--bad-soft); color: var(--ink); }
.errors ul { margin: 0; padding-left: 1.1rem; }
.errors li::marker { color: var(--bad); }
.notice { border-style: dashed; }
.warning { background: var(--mark-soft); border-color: var(--ink); }
.alert { border-color: var(--bad); border-left-width: 6px; }
.alert ul { margin: .2rem 0 0; }
.note { display: flex; gap: .6rem; align-items: flex-start; margin: 0; color: var(--muted); font-size: .9rem; }
.note svg { flex: none; width: 18px; height: 18px; margin-top: .1rem; color: var(--ink); }
.card-notice { margin: 0 0 1rem; padding: .6rem .8rem; border-left: 4px solid var(--ink); background: var(--paper-2); color: var(--ink-2); }
.card-hint { margin: 0 0 .8rem; }
.top-missing { margin: 0; font-size: .95rem; }
.missing-label { font: 600 .81rem var(--f-text); color: var(--bad); margin-right: .4rem; }
.top-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin: -.75rem 0 1.5rem; color: var(--muted); font-size: .95rem; }
.top-facts strong { color: var(--ink); }

/* ---------- Status, chips, categories ---------- */

/* A CTA's status: a square and the word, in mono. Aberto is on air. */
.status {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  font: 600 .79rem/1 var(--f-text); color: var(--ink);
}
.status::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--muted); }
.status-aberto { color: var(--signal-text); }
.status-aberto::before { background: var(--signal); }
.status-fechado { color: var(--info); }
.status-fechado::before { background: none; box-shadow: inset 0 0 0 2px var(--info); }
.status-finalizado { color: var(--ok); }
.status-finalizado::before { background: var(--ok); }
.status-cancelado { color: var(--faint); text-decoration: line-through; }
.status-cancelado::before { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }

/* A request's or a presence's state: same grammar, smaller. */
.st {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  font: 600 .77rem/1 var(--f-text); color: var(--muted);
}
.st::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--faint); }
.st-pendente { color: var(--ink); }
.st-pendente::before { background: var(--mark); box-shadow: inset 0 0 0 1px var(--ink); }
.st-aprovado { color: var(--ok); }
.st-aprovado::before { background: var(--ok); }
.st-pago { color: var(--ink); }
.st-pago::before { background: var(--ok); }
.st-recusado { color: var(--faint); }
.st-recusado::before { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
.st-faltou { color: var(--bad); }
.st-faltou::before { background: var(--bad); }

/* Chips: a word in a thin frame. */
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .45rem; white-space: nowrap;
  border: 1px solid currentColor; color: var(--ink-2);
  font: 600 .74rem/1.1 var(--f-text);
}
.chip-comp { color: var(--ink); border-color: var(--ink); background: var(--sheet); }
.chip-custom { color: var(--support); }
.chip-pendente, .chip-death-missing, .chip-wrong { color: var(--mark); background: var(--mark-soft); border-color: transparent; }
:root[data-theme="light"] :is(.chip-pendente, .chip-death-missing, .chip-wrong, .no-nick) { color: var(--on-mark); }
.chip-death-ok, .chip-ready { color: var(--ok); }
.chip-death-wait { color: var(--info); border-style: dashed; }
.chip-done { color: var(--muted); }
.chip-paid { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.chip-absent { color: var(--bad); }
.chip-trash { color: var(--support); }
.chip-window-aberto { color: var(--signal-text); }
.chip-window-fechado, .chip-window-encerrado { color: var(--muted); }
.chip-entry-split { color: var(--ok); }
.chip-entry-regear { color: var(--tank); }
.chip-entry-saque { color: var(--ink); }
.chip-entry-ajuste { color: var(--support); }
.chip-entry-estorno { color: var(--bad); }
.chip-short { display: none; }

/* .cat sets the color; the tag is a stamp in it. */
.cat { --c: var(--none); }
.cat-tank { --c: var(--tank); }
.cat-deftank { --c: var(--deftank); }
.cat-healer { --c: var(--healer); }
.cat-suporte { --c: var(--support); }
.cat-debuff { --c: var(--debuff); }
.cat-dps { --c: var(--dps); }
.cat-battle_mount { --c: var(--mount); }
.cat-looter { --c: var(--looter); }
.cat-tag {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  color: var(--ink-2); font: 500 .78rem/1.1 var(--f-text);
}
.cat-tag::before { content: ""; flex: none; width: .55rem; height: .55rem; background: var(--c, var(--none)); }
.cat-tag:empty { display: none; }
.inv-tag, .chip { font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 0; padding: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font: 600 .78rem var(--f-mono); }
.pill .num { color: var(--ink); }

/* ---------- Images ---------- */

/* Members: a square portrait in grey, colored on hover; the initial in
   the display serif behind it. */
.avatar {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 32px; height: 32px; background: var(--paper-2); color: var(--ink-2);
  font: 800 .95rem/1 var(--f-display);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar img.img-failed { display: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.8rem; }

.weapon-icon { flex: none; display: block; width: 36px; height: 36px; object-fit: contain; }
.weapon-none { background: repeating-linear-gradient(135deg, var(--hair) 0 2px, transparent 2px 6px); }
img.weapon-icon.img-failed { visibility: hidden; }

/* A build's equipment row: one framed square per slot, tier in the corner. */
.gear { display: flex; flex-wrap: wrap; gap: 4px; }
.gear-cell { position: relative; display: block; width: 44px; height: 44px; background: var(--sheet); outline: 1px solid var(--hair-2); }
.gear-cell img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gear-empty { background: repeating-linear-gradient(135deg, var(--hair) 0 2px, transparent 2px 7px); }
.gear-tier { position: absolute; right: 0; bottom: 0; padding: 1px 3px; background: rgba(0, 0, 0, .72); color: #fff; font: 600 .6rem/1 var(--f-mono); }

/* Progress: an ink bar over a hatch. */
progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 0; border: 0;
  background: var(--paper-2);
  color: var(--muted);
}
progress::-webkit-progress-bar { background: transparent; }
progress::-webkit-progress-value { background: var(--muted); }
progress::-moz-progress-bar { background: var(--muted); }

/* ---------- Sections (what used to be cards) ---------- */

/* A section opens with a heavy rule and a headline; no box. */
.card { position: relative; margin: 0 0 1.75rem; padding: .7rem 0 0; border-top: 1.5px solid var(--ink); background: none; scroll-margin-top: var(--sticky-top); }
.card-head, .sec-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin: 0 0 .75rem;
}
.card-head h2, .sec-head h2 { margin: 0; }
.sec-head { padding-top: .85rem; border-top: 1.5px solid var(--ink); }
.card-note, .sec-note { margin-left: auto; }
.card-note strong, .card-note .num { color: var(--ink); }
.card-link, .sec-link {
  margin-left: auto; color: var(--ink); text-decoration: none;
  font: 600 .85rem/1.3 var(--f-text); color: var(--signal-text);
}
.card-link::after, .sec-link::after { content: " →"; }
.card-link:hover, .sec-link:hover { color: var(--signal-text); }
.card-actions { margin: 1rem 0 0; display: flex; }
.card-actions .card-link { margin-left: 0; }
.card-empty, .empty { padding: 1.5rem 0; }
.card-empty p, .empty p { margin: 0 0 .4rem; }
.empty-big { font: 600 1.05rem/1.3 var(--f-text); color: var(--ink-2); max-width: 50ch; }
.empty .button { margin-top: .8rem; }
.card-empty-line { margin: 0; color: var(--muted); }
.empty.compact { padding: 1rem 0; }
.empty.compact p { margin: 0; color: var(--muted); }
.unknown-member { color: var(--muted); font-style: italic; }
.side-body { margin: 0; }
.panel { margin: 0 0 2rem; }
.danger-zone { display: grid; gap: .6rem; margin: 1.25rem 0 0; padding: .9rem 1rem; border: 1.5px dashed var(--bad); background: var(--bad-soft); }
.danger-zone > * { margin: 0; }
.danger-zone .hint { color: var(--ink-2); }

/* Facts: label above, value below. */
.facts { display: grid; gap: .9rem; margin: 0; }
.facts div { min-width: 0; }
.facts dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.tally { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin: 0; padding: 0; list-style: none; }
.tally li { display: inline-flex; align-items: baseline; gap: .35rem; }
.tally .num { font: 600 .8rem var(--f-mono); color: var(--muted); }
.tally-cats li::before { content: ""; width: .6rem; height: .6rem; background: var(--c); align-self: center; }

/* ---------- Numbers: a page's key figures in one ruled row ---------- */

.ticker {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1.5rem; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2);
}
.tick {
  display: grid; align-content: start; gap: .15rem; min-width: 0;
  padding: .6rem .8rem .7rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--hair);
}
.tick:nth-child(odd) { border-right: 1px solid var(--hair); padding-left: 0; }
a.tick:hover { background: var(--paper-2); color: var(--ink); }
.tick-big { font: 700 1.55rem/1.1 var(--f-display); font-variation-settings: "opsz" 48; overflow-wrap: anywhere; }
.tick-sub { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.tick.is-attn .tick-big { color: var(--mark); }
:root[data-theme="light"] .tick.is-attn .tick-big { color: var(--on-mark); justify-self: start; padding: 0 .15em; background: var(--mark-soft); }
.tick.is-owed .label { color: var(--ink-2); }
.ticker-3 .tick:first-child { grid-column: 1 / -1; border-right: 0; }
@media (max-width: 719.98px) {
  .ticker-3 .tick:nth-child(2) { padding-left: 0; border-right: 1px solid var(--hair); }
  .ticker-3 .tick:nth-child(3) { padding-left: .8rem; border-right: 0; }
}
@media (min-width: 720px) {
  .ticker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ticker-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ticker-3 .tick:first-child { grid-column: auto; border-right: 1px solid var(--hair); }
  .tick, .tick:nth-child(odd) { border-bottom: 0; border-right: 1px solid var(--hair); padding: .7rem 1rem .8rem; }
  .tick:first-child { padding-left: 0; }
  .tick:last-child { border-right: 0; }
}

/* ---------- Agora ---------- */

.front { margin: 0 0 1.25rem; padding-bottom: .75rem; border-bottom: 1.5px solid var(--ink); }
.front .ph-kicker { display: none; }
.front-date { margin: 0 0 .2rem; font: 500 .85rem/1.3 var(--f-text); color: var(--muted); }
.front-head { font: 700 clamp(1.55rem, 4.5vw, 2rem)/1.1 var(--f-display); font-variation-settings: "opsz" 48; letter-spacing: -.015em; }
.front-head .num { color: var(--mark); }
:root[data-theme="light"] .front-head .num { color: inherit; background: var(--mark-soft); padding: 0 .1em; }
.front-grid { display: grid; gap: 0 2.5rem; align-items: start; }
@media (min-width: 960px) { .front-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

.todo-list, .timetable { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.todo-list li + li, .timetable li + li { border-top: 1px solid var(--hair); }
.todo {
  --k: var(--mark);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; align-items: center;
  padding: .65rem .5rem .65rem .8rem; color: var(--ink); text-decoration: none; box-shadow: inset 3px 0 0 var(--k);
}
.todo-n { display: none; }
.todo-decidir { --k: var(--mark); }
.todo-fechar { --k: var(--ok); }
.todo-passa { --k: var(--bad); }
.todo-loot { --k: var(--muted); }
.todo-saiu { --k: var(--faint); }
.todo-finalizar { --k: var(--mark); }
.todo-text { display: grid; gap: .15rem; min-width: 0; }
.todo-title { font: 500 .98rem/1.3 var(--f-text); overflow-wrap: anywhere; }
.todo-title strong { font-weight: 600; }
.todo-cta { color: var(--muted); }
.todo-sub { color: var(--muted); font-size: .85rem; }
.todo-go { font: 600 .85rem/1 var(--f-text); color: var(--signal-text); white-space: nowrap; }
.todo-go::after { content: " →"; }
.todo:hover { background: var(--paper-2); color: var(--ink); }
.front-clear { padding-top: .5rem; }

.tt-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .8rem; padding: .65rem 0; color: var(--ink); text-decoration: none; }
.tt-row:hover { background: var(--paper-2); color: var(--ink); }
.tt-time { display: grid; align-content: start; gap: .1rem; }
.tt-time strong { font: 600 1.05rem/1.1 var(--f-mono); }
.tt-time small { font: 500 .75rem var(--f-text); color: var(--muted); }
.tt-text { display: grid; gap: .25rem; min-width: 0; }
.tt-title { font: 600 .98rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.tt-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; color: var(--muted); font-size: .85rem; }
.tt-fill { display: flex; align-items: center; gap: .6rem; font: 500 .8rem var(--f-mono); color: var(--ink-2); }
.tt-fill progress { flex: 1; max-width: 12rem; }

/* ---------- Ledgers: CTA lists, members, presets ---------- */

.ledger { margin: 0 0 2rem; border-top: 1.5px solid var(--ink); }
.ledger-note { margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--ink); }
.ledger-head { display: none; }
.cta-rows { list-style: none; margin: 0; padding: 0; }
.cta-rows > li { border-bottom: 1px solid var(--hair-2); }
.cta-row {
  position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  grid-template-areas: "date main status" "date metric metric" "date next next";
  gap: .3rem .9rem; align-items: start; padding: .95rem 0;
  color: var(--ink); text-decoration: none;
}
.cta-row:hover { background: var(--sheet); color: var(--ink); }
.cta-row:hover .cta-row-title { color: var(--signal-text); }
.date-badge { grid-area: date; display: grid; justify-items: start; gap: .15rem; }
.date-badge strong { font: 700 1.35rem/1 var(--f-display); font-variation-settings: "opsz" 36; }
.date-badge small { font: 500 .75rem var(--f-text); color: var(--muted); }
.cta-row-main { grid-area: main; display: grid; gap: .25rem; min-width: 0; }
.cta-row-title { font: 600 1rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.cta-row-sub { color: var(--ink-2); font-size: .88rem; }
.cta-row-sub .num { font-family: var(--f-mono); font-size: .82rem; }
.cta-row-main .pills { display: none; }
.cta-row-status { grid-area: status; justify-self: end; padding-top: .3rem; }
.cta-row-metric { grid-area: metric; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font: 600 .8rem var(--f-mono); }
.cta-row-metric progress { flex: 0 1 9rem; }
.cta-row-next { grid-area: next; font-size: .85rem; color: var(--ink-2); }
.cta-row-none { color: var(--faint); font: 400 .85rem var(--f-text); }
.cta-row.is-cancelled .cta-row-title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.window-aberto { color: var(--signal-text); }
.window-fechado { color: var(--muted); }
@media (min-width: 900px) {
  .ledger-head {
    display: grid; gap: 1.2rem; padding: .55rem 0; border-bottom: 1px solid var(--ink);
  }
  .cta-cols, .cta-row { grid-template-columns: 3.2rem minmax(0, 1fr) 9.5rem 13rem 8.5rem; }
  .cta-cols-4, .cta-rows:has(.cta-row:not(:has(.cta-row-next))) .cta-row { grid-template-columns: 3.2rem minmax(0, 1fr) 10rem 15rem; }
  .cta-row { grid-template-areas: "date main status metric next"; gap: 0 1.2rem; align-items: center; padding: 1.05rem 0; }
  .cta-row-status { justify-self: start; padding: 0; }
  .cta-row-main .pills { display: flex; gap: .2rem .8rem; margin-top: .2rem; }
  .cta-row-main .pill { font-size: .72rem; }
  .cta-row-main .pill .cat-tag { font-size: .56rem; }
}

/* Pages of a list. */
.pages { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; }
.pages .next { margin-left: auto; }

/* ---------- The CTA header (every page of one CTA) ---------- */

.poster { margin: 0 0 1.25rem; padding-bottom: .75rem; border-bottom: 1.5px solid var(--ink); }
.poster .crumbs { margin-bottom: .45rem; }
.poster-main { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time text" "actions actions"; gap: .6rem 1rem; align-items: center; }
.poster-time { grid-area: time; display: grid; justify-items: center; gap: .1rem; margin: 0; padding: .35rem .6rem; border: 1px solid var(--hair-2); background: var(--sheet); }
.poster-time strong { font: 600 1.25rem/1 var(--f-mono); }
.poster-time span { font: 500 .72rem/1 var(--f-text); color: var(--muted); }
.poster-text { grid-area: text; min-width: 0; }
.poster-text h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; overflow-wrap: anywhere; }
.poster-text h1 .chip { font-size: .72rem; }
.poster-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }
.poster-facts > .num { font-family: var(--f-mono); font-size: .82rem; }
.poster-facts .sep { color: var(--faint); }
.poster-when { font-weight: 600; color: var(--ink-2); }
.poster-when.hl { color: var(--mark); background: var(--mark-soft); }
:root[data-theme="light"] .poster-when.hl { color: var(--on-mark); }
.poster .page-actions { grid-area: actions; }
@media (min-width: 900px) {
  .poster-main { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time text actions"; }
}

/* The steps: a thin row; done ones checked, the current one in blue. */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .75rem 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: .4rem; color: var(--faint); font-size: .85rem; }
.step-num {
  display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem;
  border: 1px solid currentColor; font: 600 .72rem/1 var(--f-mono);
}
.steps .is-done { color: var(--ink-2); }
.steps .is-done .step-num { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.steps .is-current { color: var(--ink); font-weight: 600; }
.steps .is-current .step-num { border-color: var(--signal); background: var(--signal); color: var(--on-signal); }
@media (max-width: 719.98px) {
  .steps li:not(.is-current) .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .steps { gap: .4rem; }
}

/* The pages of a finished CTA. */
.cta-pages { display: flex; gap: 1rem; margin: .75rem 0 0; }
.cta-pages a {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px;
  color: var(--muted); text-decoration: none; font: 500 .9rem/1 var(--f-text);
}
.cta-pages a:hover { color: var(--ink); }
.cta-pages a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--signal); }

/* ---------- CTA page: the roster ---------- */

.cta-top { margin: 0 0 1.25rem; }
.description { margin: 0; max-width: 80ch; white-space: pre-line; color: var(--ink-2); }
.cta-grid { display: grid; gap: 2rem; align-items: start; }
.cta-main, .cta-side { display: grid; gap: 2rem; min-width: 0; }
.cta-main > .card, .cta-side > .card { margin: 0; }

.slot-card-head { align-items: center; }
.slot-card-head .card-note { font-size: .75rem; }
.slot-progress { flex: 1 1 100%; height: 6px; }
.slot-card-head .pills { flex-basis: 100%; }
.slot-group, .party-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 1.1rem 0 .4rem; font: 700 1rem var(--f-display);
}
.party-head .count { font: 600 .74rem var(--f-mono); color: var(--muted); }

/* The slots: compact rows, in two columns when there is room. The
   category is the left edge; the chosen slot is tinted, with a blue edge. */
.slot-rows { list-style: none; margin: 0; padding: 0; }
.slot-card .slot-rows {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 23rem), 1fr)); column-gap: 1.5rem;
  border-top: 1px solid var(--hair-2);
}
.slot-card .slot-item { position: relative; min-width: 0; border-bottom: 1px solid var(--hair); }
.slot-card .slot-line {
  position: relative; display: grid; grid-template-columns: 1.7rem 32px minmax(0, 1fr) minmax(0, auto);
  grid-template-areas: "num icon text member"; align-items: center; gap: .1rem .6rem;
  min-height: 50px; padding: .35rem .5rem .35rem .6rem;
  color: var(--ink); text-decoration: none; box-shadow: inset 3px 0 0 var(--c);
}
.slot-card a.slot-line:hover { background: var(--paper-2); color: var(--ink); }
.slot-card .slot-line[aria-current] { background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--signal); }
.slot-num { grid-area: num; font: 600 .9rem/1 var(--f-mono); color: var(--muted); text-align: right; }
.slot-line > .weapon-icon { grid-area: icon; width: 32px; height: 32px; }
.slot-text { grid-area: text; display: grid; gap: .1rem; min-width: 0; }
.slot-role { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; font: 600 .93rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.slot-role .chip { font-size: .66rem; padding: .08rem .3rem; }
.slot-role .chip-long { display: none; }
.slot-role .chip-short { display: inline; }
.slot-card .slot-role .cat-tag { display: none; }
.slot-build { color: var(--muted); font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
.slot-build.none { font-style: italic; }
.slot-member { grid-area: member; justify-self: end; display: flex; align-items: center; gap: .4rem; min-width: 0; font: 500 .88rem/1.2 var(--f-text); text-align: right; overflow-wrap: anywhere; }
.slot-member .avatar { width: 22px; height: 22px; font-size: .68rem; }
.vacant { font: 600 .78rem/1 var(--f-text); color: var(--muted); }
.slot-card .vacant { padding: .2rem .4rem; background: var(--mark-soft); color: var(--mark); }
:root[data-theme="light"] .slot-card .vacant { color: var(--on-mark); }
/* Narrow rows: the member under the role. */
@media (max-width: 520px) {
  .slot-card .slot-line { grid-template-columns: 1.7rem 32px minmax(0, 1fr); grid-template-areas: "num icon text" ". . member"; }
  .slot-member { justify-self: start; text-align: left; }
}
@media (min-width: 720px) {
  .slot-role .chip-long { display: inline; }
  .slot-role .chip-short { display: none; }
}

/* Attendance: a ruled checklist; the whole row toggles the checkbox. */
.presence-card .slot-rows { border-top: 1px solid var(--hair-2); }
.presence-card .slot-item { border-bottom: 1px solid var(--hair-2); }
.presence-row {
  display: grid; grid-template-columns: 2.2rem 32px minmax(0, 1fr) auto; align-items: center; gap: .2rem .7rem;
  min-height: 3rem; padding: .35rem .3rem .35rem 0; color: var(--ink); box-shadow: inset 3px 0 0 var(--c);
}
.presence-row .slot-num { padding-left: .55rem; text-align: left; }
.presence-row > :is(.slot-num, .weapon-icon, .slot-text, .presence) { grid-area: auto; }
.presence-row .slot-text { gap: .1rem; }
.presence-row .slot-member { grid-area: auto; padding: 0; border: 0; font-weight: 400; }
.presence-row .slot-member a { font-weight: 600; }
label.presence-row { margin: 0; cursor: pointer; font: inherit; text-transform: none; letter-spacing: 0; }
label.presence-row:hover { background: var(--sheet); }
.presence { display: flex; align-items: center; gap: .55rem; }
.presence input { width: 26px; height: 26px; }
.presence-text { min-width: 4.6rem; font: 600 .79rem/1 var(--f-text); }
.presence-text::after { content: "Faltou"; color: var(--bad); }
.presence input:checked + .presence-text::after { content: "Presente"; color: var(--ok); }
.slot-item:has(.presence input:not(:checked)) .slot-member a, .slot-item.is-absent .slot-member a { text-decoration: line-through; color: var(--muted); }
.slot-item:has(.presence input:focus-visible) { outline: 3px solid var(--signal); outline-offset: -3px; }
.presence-added { padding: 0 0 .6rem calc(2.4rem + 36px + 1.6rem); }
.presence-added button { min-height: 32px; padding: 0 .7rem; font-size: .68rem; }
.sticky-actions { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; padding: .7rem 0; background: var(--paper) var(--grain); border-top: 1px solid var(--hair-2); }

/* The chosen slot: a dossier box. */
.slot-detail, .req-detail, .signup-card, .split-card {
  position: relative; margin: 0; padding: 1.1rem 1.1rem 1.2rem;
  background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow);
}
.slot-detail { border-top: 4px solid var(--c, var(--none)); scroll-margin-top: var(--sticky-top); }
.slot-detail:focus { outline: none; }
.slot-detail .card-head { align-items: center; margin-bottom: .6rem; }
.slot-detail .card-head h2 { font-size: 1.3rem; }
.slot-detail .card-head .cat-tag { font-size: .66rem; padding: .25rem .5rem; }
.slot-back { display: none; margin: 0 0 .6rem; font: 600 .83rem var(--f-text); color: var(--ink); text-decoration: none; }
.detail-body { display: grid; gap: .7rem; }
.detail-role { margin: 0; font: 600 1.1rem/1.2 var(--f-text); }
.detail-build { display: grid; gap: .55rem; }
.detail-build-name { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.detail-alts { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .9rem; }
.detail-alt-item { font-weight: 600; color: var(--ink); }
.detail-notes { margin: 0; padding: .55rem .7rem; border-left: 1.5px solid var(--ink); background: var(--paper); white-space: pre-line; font-size: .92rem; }
.detail-none { margin: 0; color: var(--muted); font-style: italic; }
.detail-custom { margin: 0; font-size: .88rem; color: var(--ink-2); }
.detail-edit { justify-self: start; }
.detail-member { display: grid; gap: .6rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--hair-2); }
.detail-member .hint { margin: 0; font-size: .86rem; }
.detail-who { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.detail-who .avatar { width: 44px; height: 44px; font-size: 1.2rem; }
.detail-who > span:last-child { display: grid; gap: .1rem; }
.detail-who strong { font: 600 1rem/1.2 var(--f-text); }
.detail-who small { font: 400 .78rem var(--f-mono); color: var(--muted); }
.detail-free { margin: 0; font: 600 .85rem var(--f-text); color: var(--muted); }
.detail-leave { margin: 0; }

/* Signing up from the site: the slot, the member, the button. */
.signup-card { border-top: 4px solid var(--signal); }
.signup-form { display: grid; gap: 0; }
.signup-form button { justify-self: start; }
.signup-form .hint { margin: .7rem 0 0; font-size: .85rem; }
.signup-card .card-head h2 { font-size: 1.15rem; }

/* Signup history: a column of times and words. */
.history-card, .add-presence { padding-top: .35rem; }
.history-body, .add-presence-body { padding: .3rem 0 .6rem; }
.add-presence-body .hint { margin: 0 0 .8rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.event { display: block; padding: .4rem 0 .4rem .9rem; border-left: 3px solid var(--hair-2); font-size: .92rem; }
.event + .event { border-top: 1px dotted var(--hair-2); }
.event-entrou { border-left-color: var(--ok); }
.event-trocou { border-left-color: var(--mark); }
.event-saiu, .event-removido { border-left-color: var(--bad); }
.event-when { font: 600 .74rem var(--f-mono); color: var(--muted); }
.event a { font-weight: 600; }
.event-actor { color: var(--muted); font-size: .86rem; }

/* Phones: the board, or the chosen slot alone with a link back. */
@media (max-width: 959.98px) {
  .cta-page:not(.is-focused) .slot-detail { display: none; }
  .cta-page.is-focused :is(.cta-top, .cta-main, .history-card) { display: none; }
  .cta-page.is-focused .slot-back { display: inline-block; }
  .cta-page:not(.is-focused) .slot-line[aria-current] { background: none; box-shadow: inset 3px 0 0 var(--c); }
}
@media (min-width: 960px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr) 21rem; gap: 2.25rem; }
  .cta-side { position: sticky; top: var(--sticky-top); max-height: calc(100vh - var(--sticky-top) - 1rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px 0; }
}
@media (min-width: 1200px) { .cta-grid { grid-template-columns: minmax(0, 1fr) 24rem; } }

/* ---------- Atualizar builds ---------- */

.refresh-list { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--hair-2); }
.refresh-list > .slot { padding: .8rem 0 .8rem 1rem; border-bottom: 1px solid var(--hair-2); box-shadow: inset 4px 0 0 var(--c); }
.refresh-head { margin: 0 0 .25rem; }
.refresh-head small { color: var(--muted); }
.refresh-who { margin: 0; color: var(--muted); font-size: .9rem; }
.refresh-custom { margin: 0 0 2rem; }
.page-form > h2, main > h2 { margin: 2rem 0 .8rem; padding-top: .8rem; border-top: 1.5px solid var(--ink); }
h2 .count, h3 .count { font: 600 .74rem var(--f-mono); color: var(--muted); letter-spacing: .06em; }

/* ---------- Library ---------- */

.library-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 1.25rem; }
.library-tools .search { flex: 1 1 18rem; }
.library-filters { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 1.25rem; min-width: 0; max-width: 100%; }
.library-filters .segmented { margin: 0; }
.build-group { margin: 0 0 2.5rem; }
.cat-heading {
  display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .8rem; padding-top: .6rem;
  border-top: 1.5px solid var(--ink); font-size: 1.15rem;
}
.cat-heading::before { content: ""; width: .8rem; height: .8rem; background: var(--c); align-self: center; }
.cat-heading .count { font-size: .8rem; }
.build-grid {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.build-card { display: grid; gap: .7rem; align-content: start; padding: .9rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.build-card:hover { background: var(--sheet); }
.build-card-main { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: var(--ink); text-decoration: none; }
.build-card-name { font: 600 1rem/1.25 var(--f-text); }
.build-card-main:hover .build-card-name { color: var(--signal-text); text-decoration: underline; text-decoration-thickness: 1.5px; }
.build-card .gear-cell { width: 40px; height: 40px; }
.build-card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.build-use { font: 600 .77rem var(--f-text); color: var(--muted); }
.build-card-foot .card-link { margin-left: 0; }

.preset-rows, .deleted-rows, .comp-types, .result-rows, .uses, .profile-rows, .entry-rows, .member-rows, .req-rows { list-style: none; margin: 0; padding: 0; }
.list-card { border-top: 1.5px solid var(--ink); padding-top: 0; }
.preset-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main copy" "comp comp";
  gap: .6rem 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--hair-2);
}
.preset-main { grid-area: main; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; min-width: 0; }
.preset-name { font: 600 1.02rem/1.25 var(--f-text); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.preset-name:hover { color: var(--signal-text); text-decoration: underline; }
.preset-sub { flex-basis: 100%; font: 600 .81rem var(--f-text); color: var(--muted); }
.preset-comp { grid-area: comp; display: grid; gap: .4rem; min-width: 0; }
.preset-copy { grid-area: copy; }
.catbar { display: block; width: 100%; height: 14px; outline: 1px solid var(--hair-2); }
.catbar rect { fill: var(--c, var(--none)); }
.catbar-legend { font: 600 .7rem/1.4 var(--f-mono); color: var(--muted); }
.catbar-legend .cat { color: var(--c); }
.catbar-legend .num { color: var(--ink); }
@media (min-width: 900px) {
  .preset-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; grid-template-areas: "main comp copy"; gap: 1.5rem; }
}
.deleted-row { display: grid; gap: .2rem; padding: .9rem 0; border-bottom: 1px solid var(--hair-2); color: var(--ink); text-decoration: none; }
.deleted-row:hover { background: var(--sheet); color: var(--ink); }
.deleted-name { font: 600 1rem var(--f-text); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.deleted-by { color: var(--muted); font-size: .88rem; }

/* Comp types: the creation first, then one row per type. */
.comp-type-card { padding-top: 1rem; }
.comp-type-new { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin: 0 0 1rem; }
.comp-type-new label { flex: 1 1 16rem; margin: 0; }
.comp-type { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--hair-2); }
.comp-type-rename { display: flex; gap: 0; margin: 0; grid-column: 1 / -1; }
.comp-type-rename input { flex: 1; min-width: 0; font: 600 1.05rem var(--f-display) !important; }
.comp-type-rename button { margin-left: -1px; }
.comp-type-use { font: 600 .81rem var(--f-text); color: var(--muted); }
.comp-type-delete { margin: 0; justify-self: end; }
@media (min-width: 720px) {
  .comp-type { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr) auto; }
  .comp-type-rename { grid-column: auto; }
}

/* History of a build or preset. */
.library-history { margin-top: 2rem; border-top: 1.5px solid var(--ink); padding-top: .4rem; }
.block-body { padding: .5rem 0 1rem; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-entry { padding: .8rem 0 .8rem 1rem; border-left: 3px solid var(--hair-2); }
.history-entry + .history-entry { border-top: 1px dotted var(--hair-2); }
.history-criou, .history-duplicou { border-left-color: var(--ok); }
.history-excluiu { border-left-color: var(--bad); }
.history-head { margin: 0 0 .3rem; font-size: .92rem; }
.history-head strong { font: 700 1rem var(--f-display); }
.history-kicker { margin: 0 0 .2rem; font: 600 .77rem var(--f-text); color: var(--muted); }
.history-changes { margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--ink-2); }
.change-field { font-weight: 600; color: var(--ink); }
.change-note { color: var(--muted); }

/* ---------- Search ---------- */

.result-card { margin-bottom: 2rem; }
.result-row { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--hair-2); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 transparent; }
.result-row.cat { box-shadow: inset 4px 0 0 var(--c); padding-left: .9rem; }
.result-row:hover { background: var(--sheet); color: var(--ink); }
.result-main { display: grid; gap: .1rem; min-width: 0; }
.result-name { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; font: 600 1rem/1.25 var(--f-text); }
.result-sub { color: var(--muted); font-size: .86rem; }
.count { font: 600 .74rem var(--f-mono); color: var(--muted); }

/* ---------- Build editor ---------- */

.build-facts { margin-top: -.8rem; }
.build-page { display: grid; gap: 2rem; align-items: start; }
.build-main, .build-side { display: grid; gap: 2rem; min-width: 0; }
.build-main > .card, .build-side > .card { margin: 0; }
.build-data-grid { display: grid; gap: 0 1rem; align-items: start; }
@media (min-width: 720px) {
  .build-data-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .build-notes { grid-column: 1 / -1; }
  .build-page .build-data-grid.preset-head { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.equip { display: grid; gap: 1.25rem; }
.slot-panels { display: grid; gap: 1rem; min-width: 0; }
.slot-panels-hint { margin: 0; }
.slot-panel { margin: 0; padding: 1rem 1rem .4rem; background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow-sm); scroll-margin-top: var(--sticky-top); }
.slot-panel > legend { padding: .2rem .5rem; color: var(--ink); font: 700 1rem var(--f-display); text-transform: none; letter-spacing: 0; }
.has-js .slot-panel:not(.is-current) { display: none; }
.slot-field { margin-bottom: .9rem; }
.slot-alts { display: grid; gap: .45rem; padding: .7rem .8rem .8rem; }
.slot-alts input { margin: 0; }
.alt-row { display: flex; gap: .45rem; align-items: center; }
.alt-row[hidden] { display: none; }
.alt-row > :first-child { flex: 1 1 auto; min-width: 0; }
.alt-row .select, .alt-row select { flex: 0 0 6.5rem; }
.alt-add { justify-self: start; }
.hint-2h { display: none; margin: 0 0 .8rem; }
.side-body > p { margin: 0 0 .5rem; }
.price-value { margin: 0 0 .4rem; font: 700 1.7rem/1 var(--f-display); font-variation-settings: "opsz" 48; }
.price-none { margin: 0 0 .4rem; font: 700 1.3rem var(--f-display); color: var(--muted); }
.price-missing { color: var(--bad); }
.uses-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--hair-2); color: var(--ink); text-decoration: none; }
.uses-row:hover { color: var(--signal-text); }
.uses-name { font-weight: 600; }
.uses-slots { font: 600 .74rem var(--f-mono); color: var(--muted); }
.uses-card .hint { margin-top: .6rem; }
.slot-build-card .side-body, .price-card .side-body { display: grid; gap: .4rem; }
.slot-same { margin: .4rem 0; }
.slot-revert { display: flex; padding-top: 1rem; border-top: 1px dashed var(--hair-2); }
.slot-revert form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0; }
.slot-revert .hint { margin: 0; flex: 1 1 18rem; }

/* The save bar stays within reach while scrolling the long form. */
.savebar {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem;
  margin: 0 calc(-1 * var(--gutter)); padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: var(--sheet); color: var(--ink); border-top: 1px solid var(--hair-2);
}
.savebar-status { margin-right: auto; font: 600 .81rem var(--f-text); }
/* With the script, the bar waits for the first change (build-form.js,
   preset-form.js); without it, it is always there. */
.savebar.is-clean { display: none; }
.savebar.is-shown { animation: savebar-in .16s ease-out; }
@keyframes savebar-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .savebar.is-shown { animation: none; } }
.savebar-status.is-dirty, .savebar-status[data-unsaved] { color: var(--ink); background: var(--mark-soft); padding: .2rem .45rem; }
.savebar button { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.savebar button:hover { background: var(--signal-text); border-color: var(--signal-text); color: var(--on-signal); }
.savebar .quiet, .savebar button.quiet { background: transparent; border-color: var(--hair-2); color: var(--ink); }
.savebar .quiet:hover { background: var(--paper-2); color: var(--ink); border-color: var(--muted); }
.build-page :is(input, select, textarea) { scroll-margin-bottom: 6rem; }

@media (min-width: 720px) {
  .equip { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; }
  .dummy { position: sticky; top: var(--sticky-top); }
}
@media (min-width: 960px) {
  .build-page { grid-template-columns: minmax(0, 1fr) 19rem; gap: 2rem 2.25rem; }
  .build-side { position: sticky; top: var(--sticky-top); }
  .savebar { grid-column: 1 / -1; margin: 0; padding: .7rem 1rem; box-shadow: var(--shadow); }
}
@media (min-width: 1180px) {
  .build-page { grid-template-columns: minmax(0, 1fr) 22rem; }
  .equip { grid-template-columns: 19rem minmax(0, 1fr); }
}

/* Item search: suggestions under the field. */
.combo { position: relative; }
.combo:focus-within { z-index: 30; }
.combo-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  max-height: min(18rem, 50vh); overflow-y: auto; overscroll-behavior: contain;
  list-style: none; margin: 0; padding: 0;
  background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow-sm);
}
.combo-list [role="option"] { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; min-height: var(--tap); padding: .35rem .7rem; cursor: pointer; color: var(--ink); text-transform: none; letter-spacing: 0; font: 400 .95rem var(--f-text); }
.combo-list [role="option"] + [role="option"] { border-top: 1px solid var(--hair); }
.combo-list [role="option"]:hover, .combo-list [role="option"][aria-selected="true"] { background: var(--signal-soft); color: var(--ink); }
.combo-pt { color: var(--muted); }
.combo-sub { flex-basis: 100%; color: var(--muted); font-size: .85rem; }
.combo-note { padding: .6rem .7rem; color: var(--muted); font-size: .9rem; }

/* ---------- Inventory (regear and the build preview) ---------- */

/* The game's grid: bag, head, cape / main hand, armor, off-hand / potion,
   shoes, food / mount under the shoes. Slots outside the regear are
   dashed and dim. */
.inventory {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "bag head cape" "main armor off" "potion shoes food" ". mount .";
  gap: .55rem; width: 100%; max-width: 22rem; margin: 0; padding: .7rem;
  background: var(--paper-2); border: 1px solid var(--hair-2);
}
.inv-bag { grid-area: bag; } .inv-head { grid-area: head; } .inv-cape { grid-area: cape; }
.inv-main { grid-area: main; } .inv-armor { grid-area: armor; } .inv-offhand { grid-area: off; }
.inv-potion { grid-area: potion; } .inv-shoes { grid-area: shoes; } .inv-food { grid-area: food; }
.inv-mount { grid-area: mount; }
.inv-cell { position: relative; display: grid; justify-items: center; align-content: start; gap: .25rem; min-width: 0; }
.inv-cell:hover, .inv-cell:focus-within { z-index: 16; }
.inv-btn, .inv-empty {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 0; padding: 0;
  background: var(--sheet); border: 1px solid var(--hair-2); color: var(--ink);
  font: inherit; text-transform: none; letter-spacing: 0; transform: none;
}
.inv-btn { cursor: pointer; }
.inv-btn:hover, .inv-btn[aria-expanded="true"] { color: var(--ink); background: var(--sheet); transform: none; box-shadow: var(--shadow-sm); }
.inv-icon { display: block; width: 100%; height: 100%; object-fit: contain; }
.inv-empty { background: transparent; border-style: dashed; border-color: var(--hair-2); }
.inv-label { position: absolute; inset: auto 0 .35rem; text-align: center; font: 600 .66rem/1 var(--f-text); color: var(--muted); }
.inv-ghost { opacity: .28; filter: grayscale(1); }
.inv-name { display: none; padding: .3rem; font-size: .76rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.inv-failed .inv-icon { display: none; }
.inv-failed .inv-name { display: block; }
.inv-price { font: 600 .74rem var(--f-mono); white-space: nowrap; }
.inv-missing .inv-btn { border: 2px solid var(--bad); background: var(--bad-soft); }
.inv-missing .inv-price { color: var(--bad); }
.inv-dim .inv-empty { opacity: .55; }
.inv-wrong .inv-btn { border: 2px dashed var(--bad); background: repeating-linear-gradient(135deg, var(--bad-soft) 0 6px, transparent 6px 12px), var(--sheet); }
.inv-tag { position: absolute; top: .2rem; left: 50%; transform: translateX(-50%); padding: .1rem .3rem; white-space: nowrap; background: var(--bad); color: var(--on-bad); font: 600 .66rem/1.2 var(--f-text); }
.inv-wrong .inv-price { color: var(--muted); }
.inv-wrong .inv-price s { text-decoration-thickness: 2px; text-decoration-color: var(--bad); }
.inv-tip {
  display: none; position: absolute; top: calc(100% + .35rem); left: 50%; transform: translateX(-50%); z-index: 17;
  width: max-content; max-width: min(17rem, calc(100vw - 2rem)); padding: .7rem .8rem;
  background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow-sm); text-align: left; font-size: .88rem;
}
.inv-bag .inv-tip, .inv-main .inv-tip, .inv-potion .inv-tip { left: 0; transform: none; }
.inv-cape .inv-tip, .inv-offhand .inv-tip, .inv-food .inv-tip { left: auto; right: 0; transform: none; }
.inv-btn[aria-expanded="true"] ~ .inv-tip, .inv-btn:focus-visible ~ .inv-tip, .inv-tip:focus-within { display: block; }
@media (hover: hover) { .inv-cell:hover .inv-tip { display: block; } }
.inv-tip-name { margin: 0 0 .45rem; font: 700 1rem/1.2 var(--f-display); }
.inv-tip dl { display: grid; gap: .25rem; margin: 0; }
.inv-tip dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.inv-tip dd { margin: 0; text-align: right; }
.inv-tip-missing dd { color: var(--bad); }
.inv-tip-kicker { margin-right: .2rem; font: 600 .72rem var(--f-text); color: var(--muted); }
.inv-tip-check { display: grid; gap: .35rem; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--hair-2); }
.inv-tip-check p, .inv-tip-check form { margin: 0; }
.inv-tip-wrong { color: var(--bad); }
.inv-tip-ok { color: var(--ok); }
.inv-tip-check button { width: 100%; }
/* The caller's price of an item ("preço na loja"). */
.inv-manual .inv-price { color: var(--signal-text); }
.inv-manual .inv-price::after { content: " ✎"; font-family: var(--f-text); }
.inv-tip-manual dd { color: var(--signal-text); }
.inv-tip-price { display: grid; gap: .35rem; margin: .55rem 0 0; padding-top: .5rem; border-top: 1px dashed var(--hair-2); }
.inv-tip-price + .inv-tip-price { margin-top: .35rem; padding-top: 0; border-top: 0; }
.inv-tip-price label { margin: 0; }
.inv-tip-price button { width: 100%; }

/* The build preview ("manequim"): a square opens its slot's panel. */
.dummy { min-width: 0; }
.dummy .inventory { max-width: 19rem; }
.dummy-btn { text-decoration: none; }
.dummy .is-on .inv-btn { border-color: var(--signal); box-shadow: inset 0 0 0 2px var(--signal); }
.dummy-tier { position: absolute; right: 0; bottom: 0; padding: 1px 4px; background: rgba(0, 0, 0, .72); color: #fff; font: 600 .66rem/1.3 var(--f-mono); }
.inv-unknown .inv-btn { border: 2px solid var(--bad); background: var(--bad-soft); }
.dummy-warn { padding: .15rem; color: var(--bad); text-align: center; font: 600 .66rem/1.1 var(--f-text); }

/* ---------- Preset editor ---------- */

#roles { list-style: none; margin: 0; padding: 0; counter-reset: role party; display: grid; border-top: 1px solid var(--hair-2); }
.role {
  counter-increment: role; position: relative;
  display: grid; grid-template-columns: 2.4rem 2rem minmax(0, 1fr) var(--tap);
  column-gap: .4rem; row-gap: .45rem; align-items: center;
  padding: .55rem .2rem .6rem 0; border-bottom: 1px solid var(--hair-2); box-shadow: inset 4px 0 0 var(--c, var(--none));
}
.role:hover { background: var(--sheet); }
.role-num { grid-column: 2; grid-row: 1; text-align: right; font: 800 1.25rem/1 var(--f-display); font-variation-settings: "opsz" 144; }
.role-num::before { content: counter(role); }
.role-handle {
  grid-column: 1; grid-row: 1; width: 100%; min-height: var(--tap); padding: 0;
  border: 0; background: none; color: var(--muted); font: 700 1rem/1 var(--f-text); letter-spacing: -.15em;
  cursor: grab; touch-action: none; text-transform: none;
}
.role-handle:hover, .role-handle:focus-visible { color: var(--ink); transform: none; box-shadow: none; background: none; }
.role.dragging { background: var(--signal-soft); outline: 1.5px dashed var(--signal); outline-offset: -1.5px; box-shadow: none; }
.role.dragging > * { visibility: hidden; }
body.dragging-role { user-select: none; cursor: grabbing; }
body.dragging-role * { cursor: grabbing !important; }
.role-fields { grid-column: 3; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; }
.role-fields > input[name="role_name"] { flex: 1 1 100%; min-width: 0; font-weight: 600; }
.role-fields > input[name="role_build"], .role-fields > .combo { flex: 1 1 10rem; min-width: 0; }
.role-fields > .combo input { width: 100%; }
.role-fields select { flex: none; width: auto; max-width: 100%; }
.role-fields .build-category { flex: none; }
.cat-missing .build-category { background: var(--bad); }
.role-tools { grid-column: 4; grid-row: 1; align-self: start; display: flex; justify-content: end; }
.role-tools button { width: var(--tap); padding: 0; font: 600 .95rem/1 var(--f-text); }
.role-missing { box-shadow: inset 4px 0 0 var(--mark); background: var(--mark-soft); }
.role-missing-note, .role-gear { grid-column: 1 / -1; grid-row: 2; margin: 0 0 0 .6rem; }
.role-missing-note { font: 600 .81rem var(--f-text); }
.role-gear:empty { display: none; }
.role:nth-child(20n+1) { counter-increment: role party; }
.role:nth-child(20n+21), .role:first-child:nth-last-child(n+21) { margin-top: 3.2rem; border-top: 1px solid var(--hair-2); }
.role:nth-child(20n+21)::after, .role:first-child:nth-last-child(n+21)::after {
  content: "Party " counter(party); position: absolute; left: 0; bottom: 100%; margin-bottom: .55rem;
  font: 800 1.4rem/1 var(--f-display); font-variation-settings: "opsz" 144;
}
.role[data-count]:nth-child(20n+21)::before, .role[data-count]:first-child:nth-last-child(n+21)::before {
  content: attr(data-count) " vagas"; position: absolute; right: 0; bottom: 100%; margin-bottom: .6rem;
  font: 600 .81rem/1 var(--f-text); color: var(--muted);
}
.role.role-ghost {
  position: fixed; z-index: 50; margin: 0; pointer-events: none;
  background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow); opacity: .97;
}
.role.role-ghost::before, .role.role-ghost::after { content: none; }
.role-ghost .role-num::before { content: attr(data-n); }
@media (min-width: 720px) {
  .role-fields > input[name="role_name"] { flex: 2 1 6rem; }
  .role-fields > input[name="role_build"], .role-fields > .combo { flex: 3 1 9rem; }
  .role-missing-note, .role-gear { grid-column: 3 / -1; margin: 0; }
}
.roles-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: 1rem 0; }
.roles-foot .hint { flex: 1 1 18rem; margin: 0; }
#add-role { min-width: 9rem; }
.role-list { border-top: 1px solid var(--hair-2); }
.role-list-body { display: grid; gap: .6rem; padding-bottom: 1rem; }
.role-list-body label, .role-list-body .hint { margin: 0; }
.role-list-body #generate { justify-self: start; }
.preset-auto-hint { margin: .2rem 0 .8rem; }
.reapply-preview { margin: .5rem 0 0; }
.reapply-preview li { overflow-wrap: anywhere; }
.comp-card .catbar { height: 18px; margin-bottom: .9rem; }
.comp-legend { list-style: none; display: grid; gap: .3rem; margin: 0; padding: 0; }
.comp-legend li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-bottom: 1px dotted var(--hair-2); }
.comp-legend .cat { display: inline-flex; align-items: center; gap: .45rem; }
.comp-legend .cat::before { content: ""; width: .7rem; height: .7rem; background: var(--c, var(--none)); }
.comp-legend .num { font: 600 .82rem var(--f-mono); }
.dc-msg { margin: 0 0 .6rem; padding: .8rem .9rem; background: var(--dc-bg); color: var(--dc-text); border-left: 4px solid var(--discord); font: .9rem/1.5 system-ui, sans-serif; }
.dc-msg p { margin: 0; overflow-wrap: anywhere; }
.dc-field { color: var(--dc-strong); font-weight: 700; margin-bottom: .2rem !important; }
.dc-line code { padding: 0 .3rem; background: var(--dc-bg-2); color: var(--dc-text); font: .82rem/1.4 ui-monospace, monospace; }
.dc-more { color: var(--dc-muted); }

/* ---------- Regear ---------- */

.regear-page { display: grid; gap: 2rem; }
/* The split: a receipt in a box. */
.split-card { scroll-margin-top: var(--sticky-top); }
.split-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--hair-2); }
.split-head h2 { font-size: 1.25rem; }
.split-kind { font: 600 .77rem var(--f-text); color: var(--muted); vertical-align: middle; }
.split-status { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.split-card .top-missing { margin: .7rem 0 0; }
.split-body { display: grid; gap: 1.25rem; margin-top: 1rem; }
.split-main, .split-side { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.split-main > *, .split-side > * { margin: 0; }
.split-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .55rem; color: var(--muted); font-size: .92rem; }
.split-step strong { font: 600 1.05rem var(--f-mono); color: var(--ink); }
.split-arrow { color: var(--signal); font-weight: 700; }
.split-result { flex-basis: 100%; margin-top: .4rem; color: var(--ink); }
.split-result strong { font: 700 1.8rem/1 var(--f-display); font-variation-settings: "opsz" 48; }
.split-unpaid { color: var(--bad); font-style: normal; }
.split-calc > summary { display: inline-flex; min-height: 36px; align-items: center; font: 600 .81rem var(--f-text); border-bottom: 1.5px solid var(--signal); }
.split-numbers { display: grid; gap: 0; margin: .7rem 0 0; font-size: .9rem; }
.split-numbers div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding: .35rem 0; border-bottom: 1px dotted var(--hair-2); }
.split-numbers dt { flex: 1 1 auto; }
.split-numbers dd { margin: 0; text-align: right; font-family: var(--f-mono); font-size: .86rem; }
.split-numbers dd small { font-family: var(--f-text); color: var(--muted); }
.split-per { border-bottom: 3px double var(--ink) !important; }
.split-per dd { font: 700 1.1rem var(--f-display); }
.split-ready { font: 600 .85rem var(--f-text); color: var(--ok); }
.split-close { display: grid; gap: .35rem; }
.split-close button { width: 100%; min-height: 52px; font-size: .9rem; background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.split-close-note { color: var(--muted); font-size: .82rem; }
.split-loot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.split-loot label { flex: 1 1 11rem; margin: 0; }
.split-fix > summary { display: inline-flex; min-height: 36px; align-items: center; font: 600 .81rem var(--f-text); color: var(--muted); }
.split-fix[open] > summary { margin-bottom: .5rem; }
.split-skip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding-top: .8rem; border-top: 1px dashed var(--hair-2); }
.split-skip form, .split-skip .hint { margin: 0; }
.split-skip .hint { font-size: .82rem; }
.split-undo { margin: 0; }
/* How to close the CTA: one choice, then only its panel. */
.close-seg { flex-wrap: nowrap; margin: 0; }
.close-seg > legend { padding-bottom: .45rem; }
.close-seg .seg-opt { flex: 1 1 0; min-width: 0; padding: .35rem .45rem; text-align: center; font: 600 .78rem/1.2 var(--f-text); letter-spacing: 0; }
.mode-panel { display: none; gap: .6rem; align-content: start; }
.mode-panel > * { margin: 0; }
.close-modes:has(#modo-split:checked) .mode-split,
.close-modes:has(#modo-soregear:checked) .mode-soregear,
.close-modes:has(#modo-sem:checked) .mode-sem { display: grid; }
@supports not selector(:has(*)) { .mode-panel { display: grid; } }
.mode-panel .split-skip { padding-top: 0; border-top: 0; }
@media (min-width: 960px) {
  .split-body.has-numbers { grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem); gap: 2rem; }
  .has-numbers .split-side { padding-left: 2rem; border-left: 1px dashed var(--hair-2); }
  .split-body:not(.has-numbers) .split-loot { max-width: 44rem; flex-wrap: nowrap; }
}

/* The requests: a ledger beside a dossier. */
.regear-grid { display: grid; gap: 2rem; align-items: start; scroll-margin-top: var(--sticky-top); }
.req-list { margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.req-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem .75rem; padding: .8rem 0 .9rem; }
.req-list-head h2 { margin: 0; }
.req-progress-text { font: 600 .81rem var(--f-text); color: var(--muted); }
.req-progress { flex-basis: 100%; height: 8px; }
.req-group { margin: 0; padding: .9rem 0 .4rem; border-bottom: 1px solid var(--hair-2); font: 600 .81rem/1.2 var(--f-text); color: var(--ink); }
.req-group .count { color: var(--muted); }
.req-row {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .2rem .75rem;
  padding: .7rem .2rem .7rem .5rem; border-bottom: 1px solid var(--hair-2);
  color: var(--ink); text-decoration: none; scroll-margin-top: var(--sticky-top);
}
.req-row:hover { background: var(--sheet); color: var(--ink); }
.req-row[aria-current] { background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--signal); }
.req-row > .weapon-icon { width: 38px; height: 38px; }
.req-who { display: grid; gap: .1rem; min-width: 0; }
.req-member { font: 600 .95rem/1.2 var(--f-text); }
.req-slot { color: var(--muted); font-size: .84rem; }
.req-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin-top: .25rem; }
.req-tags .chip { font-size: .56rem; padding: .14rem .3rem; }
.req-value { font: 600 .86rem var(--f-mono); text-align: right; white-space: nowrap; }
.req-value small { font: 400 .78rem var(--f-text); color: var(--muted); }
.partial-tag { color: var(--bad) !important; }
.req-none { color: var(--faint); }
.req-recusado .req-member { text-decoration: line-through; text-decoration-thickness: 1px; }
.manual-box { margin-top: .5rem; }
.manual-box > summary { font: 600 .85rem var(--f-text); }
.manual-box > summary::after { content: none !important; }
.manual-body { padding: .3rem 0 1rem; }
.manual { display: grid; gap: 0; }
.manual > .hint { margin: 0 0 .8rem; }
.manual button { justify-self: start; }
.manual-trash { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.manual-trash[hidden] { display: none; }

.req-detail { border-top: 4px solid var(--mark); scroll-margin-top: var(--sticky-top); }
.req-detail:focus { outline: none; }
.req-aprovado.req-detail { border-top-color: var(--ok); }
.req-recusado.req-detail { border-top-color: var(--faint); }
.req-detail.regear-absent { border-color: var(--bad); }
.req-back { display: none; margin: 0 0 .7rem; font: 600 .83rem var(--f-text); color: var(--ink); text-decoration: none; }
.req-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .5rem .9rem; margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--hair-2); }
.req-head > .weapon-icon { width: 44px; height: 44px; }
.req-head-text { min-width: 0; }
.req-name { margin: 0 0 .2rem; font-size: 1.35rem; overflow-wrap: anywhere; }
.req-sub { margin: 0; color: var(--ink-2); font-size: .92rem; }
.req-meta { margin: .25rem 0 0; font: 400 .74rem var(--f-mono); color: var(--muted); }
.req-profile { grid-column: 1 / -1; justify-self: start; min-height: 34px; font-size: .68rem; }
.req-detail > .errors, .req-detail > .alert { margin: 0 0 .8rem; }
.req-detail :is(.notice, .warning, .alert) { margin: 0; padding: .6rem .8rem; font-size: .9rem; box-shadow: none; }
.req-detail .hint { margin: 0; font-size: .86rem; }
.regear-detail { display: grid; gap: 1.1rem; }
.regear-side { display: grid; gap: .7rem; align-content: start; min-width: 0; }
.regear-side > p { margin: 0; }
.regear-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin: 0; padding-top: .7rem; border-top: 3px double var(--ink); font: 600 .81rem var(--f-text); }
.regear-total strong { font: 700 1.6rem/1 var(--f-display); font-variation-settings: "opsz" 48; }
.regear-sets { margin: 0; font: 400 .82rem var(--f-mono); color: var(--muted); }
.regear-discount { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 .5rem; color: var(--bad); font: 600 .9rem var(--f-text); }
.regear-discount strong { font-family: var(--f-mono); }
.regear-discount .hint { width: 100%; }
.regear-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin-top: .6rem; padding-top: .9rem; border-top: 1px solid var(--hair-2); }
.regear-actions > .warning, .regear-actions > .approve-full, .regear-actions > .reject { flex: 1 1 100%; }
.regear-actions form, .regear-actions label { margin: 0; }
.approve { flex: 1 1 15rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0; }
.approve input { font: 600 1.15rem var(--f-mono) !important; }
.approve button { margin-left: -1px; background: var(--ok); border-color: var(--ok); color: var(--on-cat); min-width: 7.5rem; }
.approve-full { display: grid; gap: .35rem; justify-items: start; }
.approve-full .hint { margin: 0; }
.reject > summary { display: inline-flex; align-items: center; min-height: var(--tap); font: 600 .85rem var(--f-text); color: var(--bad); }
.reject form { display: grid; gap: .5rem; padding-top: .3rem; max-width: 36rem; }
.reject form button { justify-self: start; }
.req-decision { display: grid; gap: .55rem; }
.req-decision > p { margin: 0; }
.req-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.req-result strong { font: 700 1.6rem/1 var(--f-display); font-variation-settings: "opsz" 48; }
.req-reason { overflow-wrap: anywhere; font-size: 1.05rem; }
.req-reopen { margin: .3rem 0 0; }
.req-prints-head { margin: .5rem 0 .4rem; font: 600 .81rem var(--f-text); color: var(--muted); }
.death { display: grid; gap: .4rem; padding: .7rem .8rem; background: var(--paper); border: 1px solid var(--hair-2); border-left-width: 6px; font-size: .92rem; }
.death p, .death form { margin: 0; }
.death .hint { font-size: .82rem; }
.death-encontrada, .prints-ok { border-left-color: var(--ok); }
.death-nao_encontrada, .death-sem_nick, .prints-missing { border-left-color: var(--mark); }
.death-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .5rem; font: 600 .81rem var(--f-text); }
.death-title { color: var(--muted); }
.death-list { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.death-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.death-state { margin-left: auto; font: 600 .77rem var(--f-text); color: var(--ok); }
.death-off { color: var(--muted); }
.death-off .death-state { color: var(--muted); }
.death > form button { width: 100%; }
.death-grids { display: grid; gap: .5rem; min-width: 0; }
.death-grid { display: grid; gap: .4rem; }
.death-grid[hidden] { display: none; }
.death-grid-note { margin: 0; font-size: .84rem; color: var(--muted); }
.death-tabs { display: flex; flex-wrap: wrap; gap: 0; }
.death-tab { display: grid; gap: .1rem; min-height: var(--tap); padding: .35rem .7rem; align-content: center; border: 1px solid var(--hair-2); margin-right: -1px; color: var(--ink); text-decoration: none; font: 600 .74rem/1.15 var(--f-mono); }
.death-tab small { font: 400 .7rem var(--f-text); color: var(--muted); }
.death-tab[aria-selected="true"] { background: var(--signal-soft); color: var(--ink); border-color: var(--signal); position: relative; }
.death-tab-off { opacity: .6; }
.print-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .4rem; margin: 0; padding: 0; list-style: none; }
.print-list a { display: block; border: 1px solid var(--hair-2); }
.print-list img { display: block; width: 100%; height: auto; }
@media (min-width: 720px) {
  .regear-detail:has(.inventory) { grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); align-items: start; }
  .req-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .req-profile { grid-column: 3; grid-row: 1; }
  .manual { grid-template-columns: minmax(12rem, 1fr) minmax(10rem, 14rem); gap: 0 .8rem; align-items: end; }
  .manual > .hint, .manual .manual-trash, .manual button { grid-column: 1 / -1; }
}
@media (max-width: 959.98px) {
  .regear-page:not(.is-focused) .req-detail { display: none; }
  .regear-page:not(.is-focused) .req-row[aria-current] { background: none; box-shadow: none; }
  .regear-page.is-focused :is(.req-list, .split-card) { display: none; }
  .regear-page.is-focused .req-back { display: inline-block; }
}
@media (min-width: 960px) {
  .regear-grid { grid-template-columns: 21rem minmax(0, 1fr); gap: 2.25rem; }
  .req-list { position: sticky; top: var(--sticky-top); max-height: calc(100vh - var(--sticky-top) - 1rem); overflow-y: auto; }
}
@media (min-width: 1200px) { .regear-grid { grid-template-columns: 24rem minmax(0, 1fr); } }

/* ---------- Members ---------- */

.member-card { border-top: 1.5px solid var(--ink); }
.member-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 1rem; padding: 1rem 0 .3rem; }
.member-tools .segmented, .member-tools .search { margin: 0 0 .6rem; }
.member-tools .dates { margin: 0 0 .6rem; }
.member-head { display: none; }
.member-rows { border-top: 1px solid var(--hair-2); }
.member-rows li { border-bottom: 1px solid var(--hair-2); }
.member-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas: "avatar main balance" "avatar presence presence" "avatar last last";
  align-items: center; gap: .2rem .8rem; padding: .5rem 0;
  color: var(--ink); text-decoration: none;
}
.member-row.has-pos { grid-template-columns: 2.6rem 36px minmax(0, 1fr) auto; grid-template-areas: "pos avatar main balance" "pos avatar presence presence" "pos avatar last last"; }
.member-row:hover { background: var(--sheet); color: var(--ink); }
.member-row > .avatar { grid-area: avatar; align-self: start; width: 30px; height: 30px; }
.pos { grid-area: pos; align-self: start; font: 600 1rem/1.2 var(--f-mono); color: var(--faint); }
.top .pos { color: var(--ink); }
.top-1 .pos { color: var(--mark); }
.member-main { grid-area: main; display: grid; min-width: 0; }
.member-name { font: 600 .98rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.member-nick { font: 400 .78rem var(--f-mono); color: var(--muted); overflow-wrap: anywhere; }
.no-nick { color: var(--mark); background: var(--mark-soft); padding: 0 .25em; font-family: var(--f-text); }
a.no-nick { font-weight: 600; text-decoration: none; }
.member-departed { color: var(--bad); }
.member-presence { grid-area: presence; display: flex; align-items: center; gap: .6rem; font: 400 .8rem var(--f-mono); color: var(--ink-2); }
.member-presence progress { flex: 0 1 7rem; }
.member-presence .rate { font-weight: 600; color: var(--ink); }
.member-none { color: var(--faint); font-family: var(--f-text); }
.member-last { grid-area: last; font: 400 .76rem var(--f-mono); color: var(--muted); }
.member-balance { grid-area: balance; justify-self: end; font: 600 .95rem var(--f-mono); }
.member-balance.is-zero { color: var(--faint); font-weight: 400; }
.list-foot { margin-top: 1rem; font-size: .84rem; max-width: 80ch; }
@media (min-width: 960px) {
  .member-tools { grid-template-columns: auto auto minmax(14rem, 1fr); align-items: start; }
  .member-tools .dates { grid-column: 1 / -1; grid-template-columns: 12rem 12rem auto; justify-content: start; }
  /* Beside the fields, below their labels (a message under a field does
     not move it). */
  .member-tools .dates button { grid-column: auto; margin-top: calc(.81rem * 1.3 + .35rem); }
  .member-head, .member-row { grid-template-columns: 36px minmax(0, 1fr) 15rem 8rem 9rem; grid-template-areas: "avatar main presence last balance"; }
  .member-head.has-pos, .member-row.has-pos { grid-template-columns: 2.6rem 36px minmax(0, 1fr) 15rem 8rem 9rem; grid-template-areas: "pos avatar main presence last balance"; }
  .member-head {
    display: grid; column-gap: .8rem; padding: .55rem 0;
    font: 600 .77rem/1.2 var(--f-text); color: var(--muted);
  }
  .member-head-name { grid-column: 1 / 3; }
  .member-head.has-pos .member-head-name { grid-column: 2 / 4; }
  .num-head { text-align: right; }
  .member-rows { border-top-width: 1px; }
  .member-row > .avatar, .member-row > .pos { align-self: center; }
  .member-last-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .member-balance { text-align: right; }
}

/* Member profile: the balance as a headline, the statement as a bank
   statement; beside them the presence, the regears, the data and the
   character. */
.profile-facts { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: -.8rem 0 1.75rem; font: 400 .94rem var(--f-text); color: var(--muted); }
.profile-facts strong { color: var(--ink); }
.nick { text-transform: none; letter-spacing: normal; }
.departure { margin-bottom: 2rem; }
.departure-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.departure-actions form { margin: 0; }
.profile-grid { display: grid; gap: 2rem; align-items: start; }
.profile-main, .profile-side { display: grid; gap: 2rem; min-width: 0; }
.profile-grid .card { margin: 0; }
.balance-card { display: grid; gap: 1.2rem; }
.balance-top p { margin: 0; }
.balance-value { margin: .2rem 0 .1rem !important; font: 700 clamp(1.9rem, 6vw, 2.5rem)/1 var(--f-display); font-variation-settings: "opsz" 72; overflow-wrap: anywhere; }
.balance-sub { color: var(--muted); font-size: .88rem; }
.balance-form { display: grid; gap: 0; align-content: start; }
.balance-form h2 { font-size: 1.25rem; margin-bottom: .3rem; }
.balance-form > .hint { margin: 0 0 .8rem; }
.balance-form button { justify-self: start; }
.withdraw-form { padding: 1rem; background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow); }
.adjust-box { border-top: 1px solid var(--hair-2); }
.adjust-box .balance-form { padding: .4rem 0 1rem; }
.direction { display: flex; gap: 1rem; }
.choice-credito { color: var(--ok); }
.choice-debito { color: var(--bad); }
@media (min-width: 720px) { .balance-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 .8rem; align-items: end; } }
@media (min-width: 1180px) {
  .balance-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 1.2rem 2rem; }
  .adjust-box { grid-column: 1 / -1; }
}

.entry-head { display: none; }
.entry-rows { border-top: 1px solid var(--hair-2); }
.entry-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amount" "date after";
  gap: .2rem 1rem; padding: .7rem 0; border-bottom: 1px dotted var(--hair-2);
}
.entry-date { grid-area: date; font: 400 .74rem var(--f-mono); color: var(--muted); }
.entry-what { grid-area: what; display: grid; gap: .15rem; min-width: 0; }
.entry-kind { display: flex; align-items: center; gap: .4rem; }
.entry-kind small { font: 600 .72rem var(--f-text); color: var(--bad); }
.entry-detail { font-weight: 600; overflow-wrap: anywhere; }
.entry-by { font-size: .8rem; color: var(--muted); }
.entry-amount { grid-area: amount; justify-self: end; font: 600 1rem var(--f-mono); }
.amount-in { color: var(--ok); }
.amount-out { color: var(--bad); }
.entry-after { grid-area: after; justify-self: end; font: 400 .78rem var(--f-mono); color: var(--muted); }
.is-reversed { opacity: .6; }
.is-reversed .entry-amount { text-decoration: line-through; }
@media (min-width: 900px) {
  .entry-head, .entry-row { grid-template-columns: 9.5rem minmax(0, 1fr) 9rem 9rem; grid-template-areas: "date what amount after"; gap: 0 1rem; }
  .entry-head { display: grid; padding: .5rem 0; font: 600 .77rem var(--f-text); color: var(--muted); }
  .entry-row { align-items: center; }
  .entry-amount, .entry-after { text-align: right; }
  .entry-after-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .entry-after { color: var(--ink); font-size: .86rem; }
}

.profile-rate { margin-left: auto; font: 700 1.3rem/1 var(--f-display); }
.profile-body { display: grid; gap: .6rem; }
.profile-body > * { margin: 0; }
.presence-dots { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; }
.dot-cta { display: block; aspect-ratio: 1; border: 1px solid var(--hair-2); }
.dot-cta.is-present { background: var(--ok); border-color: var(--ok); }
.dot-cta.is-absent { background: repeating-linear-gradient(135deg, var(--bad) 0 1.5px, transparent 1.5px 5px); border-color: var(--bad); }
.dot-cta:hover { outline: 2px solid var(--signal); outline-offset: 1px; }
.profile-count { font: 400 .82rem var(--f-mono); color: var(--ink-2); }
.profile-sub { margin: 1rem 0 .4rem; font: 600 .81rem var(--f-text); color: var(--muted); }
.profile-rows { border-top: 1px solid var(--ink); }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--hair-2); color: var(--ink); text-decoration: none; }
.profile-row.cat { box-shadow: inset 3px 0 0 var(--c); padding-left: .7rem; }
.profile-row:hover { background: var(--sheet); color: var(--ink); }
.profile-row-main { display: grid; gap: .1rem; min-width: 0; }
.profile-row-title { font: 600 .95rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.profile-row-sub { font-size: .8rem; color: var(--muted); }
.profile-row-end { display: grid; justify-items: end; gap: .2rem; text-align: right; }
.profile-row-value { font: 600 .82rem var(--f-mono); }
.profile-row-value small { font: 400 .76rem var(--f-text); color: var(--muted); }
.profile-more > summary { font: 600 .81rem var(--f-text); }
.profile-none { color: var(--muted); }
.facts-tight { gap: .9rem; }
.fold-body { padding: .3rem 0 1rem; }
.albion-card { display: grid; gap: .8rem; }
.albion-card > * { margin: 0; }
.albion-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.albion-form label { flex: 1 1 14rem; margin: 0; }
.albion-id { font-family: var(--f-mono); font-size: .8rem; }
.albion-outside form { margin-top: .5rem; }
@media (min-width: 960px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.25rem; }
}
@media (min-width: 1200px) { .profile-grid { grid-template-columns: minmax(0, 1fr) 25rem; } }

/* ---------- Login (public page) ---------- */

body.public main { min-height: 100vh; display: grid; }
.login { display: grid; align-content: center; gap: 2rem; padding: 2rem var(--gutter); max-width: 1200px; margin: 0 auto; width: 100%; }
.login-art { display: grid; line-height: .78; }
.login-art-line {
  font: 900 clamp(4.6rem, 22vw, 13rem)/.8 var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -.05em; color: var(--ink);
}
.login-art-to { margin-left: .9em; font-style: italic; font-weight: 400; color: var(--signal); }
.login-box { display: grid; gap: .5rem; justify-items: start; max-width: 26rem; padding: 1.5rem; background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow); }
.login-box > * { margin: 0; }
.login-logo { width: 44px; height: 56px; }
.login-title { font: 900 2rem/1 var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.login-heading { font: 600 .85rem var(--f-text); color: var(--signal-text); }
.login-text { color: var(--ink-2); margin-bottom: .6rem; }
.login-errors { width: 100%; margin: .2rem 0 .4rem; }
.login-discord { width: 100%; min-height: 52px; margin-top: .3rem; background: var(--discord); border-color: var(--discord); color: var(--on-discord); }
.login-discord:hover { color: var(--on-discord); box-shadow: 4px 4px 0 var(--ink); }
.login-hint { color: var(--muted); font-size: .84rem; }
@media (min-width: 900px) {
  .login { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 3rem; }
}

/* ---------- Message pages (404, errors, actions that do not apply) ---------- */

.message { display: grid; gap: 1.5rem; padding: 1rem 0 2rem; }
.message-code {
  margin: 0; font: 700 clamp(3.5rem, 14vw, 6rem)/.9 var(--f-display); font-variation-settings: "opsz" 144;
  color: var(--faint);
}
.message:not(.is-404) .message-code { font-size: clamp(2.5rem, 10vw, 4rem); }
.message-body { max-width: 40rem; padding-top: 1rem; border-top: 1.5px solid var(--ink); }
.message-text { font: 600 1.15rem/1.35 var(--f-text); }
.message-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 0; }
@media (min-width: 900px) { .message { grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 3rem; } }

/* ---------- Print ---------- */

@media print {
  .mast, .sections, .colophon, .savebar, .page-actions { display: none; }
  body { background: none; }
}

/* ---------- Zerg: what the guild plays ---------- */

.zerg-tools { padding: .2rem 0 .9rem; }
.zerg-tools .segmented { margin: 0; }
.zerg-facts { margin: 0 0 1.25rem; }
.zerg-sec { margin: 0 0 2rem; }
.zerg-bar { height: 10px; margin: .9rem 0 .3rem; }
.zerg-head { display: none; }
.zerg-rows { list-style: none; margin: 0; padding: 0; }
.zerg-rows > li { border-bottom: 1px solid var(--hair-2); }
.zerg-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .6rem 0; }
.zerg-row > .zerg-name, .zerg-weapon, .zerg-top { flex: 1 0 100%; }
.zerg-name.cat-tag { font: 600 .95rem/1.25 var(--f-text); color: var(--ink); }
.zerg-n { font: 400 .82rem var(--f-mono); color: var(--ink-2); }
.zerg-n > .num:first-child { font-weight: 600; color: var(--ink); }
.zerg-share { color: var(--muted); }
.zerg-unit { font-family: var(--f-text); color: var(--muted); }
.zerg-weapon { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.zerg-weapon .weapon-icon { flex: none; width: 32px; height: 32px; }
.zerg-weapon-text { display: grid; gap: .1rem; min-width: 0; }
.zerg-weapon-text strong { font: 600 .95rem/1.25 var(--f-text); overflow-wrap: anywhere; }
.zerg-weapon-text small { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .35rem; font-size: .78rem; color: var(--muted); }
.zerg-weapon-text .cat-tag { font-size: .74rem; color: var(--muted); }
.zerg-top { font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; }
/* On phones the numbers and the players line up with the weapon's name. */
.zerg-weapon-cols { padding-left: calc(32px + .7rem); }
.zerg-weapon-cols > .zerg-weapon { margin-left: calc(-32px - .7rem); }
.zerg-top a { color: var(--ink); text-decoration: none; }
.zerg-top a:hover { color: var(--signal-text); text-decoration: underline; }
.zerg-top .num { font: 400 .76rem var(--f-mono); color: var(--muted); }
@media (min-width: 900px) {
  .zerg-head { display: grid; gap: 1.2rem; padding: .5rem 0; border-bottom: 1px solid var(--ink); font-size: .8rem; color: var(--muted); }
  .zerg-row { display: grid; gap: 0 1.2rem; padding: .55rem 0; }
  .zerg-row > .zerg-name, .zerg-weapon, .zerg-top { flex: none; }
  .zerg-cat-cols { grid-template-columns: minmax(0, 1fr) 11rem 8rem 8rem; }
  .zerg-weapon-cols { grid-template-columns: minmax(0, 1.2fr) 7rem 7rem minmax(0, 1.5fr); padding-left: 0; }
  .zerg-weapon-cols > .zerg-weapon { margin-left: 0; }
  .zerg-cat-cols .zerg-unit, .zerg-weapon-cols .zerg-unit { display: none; }
}

/* The preset editor's "Conferência": what may go wrong in a CTA. */
.check-list { list-style: none; display: grid; gap: .45rem; margin: 0; padding: 0; }
.check-list li { position: relative; padding: .1rem 0 .1rem .9rem; font-size: .86rem; line-height: 1.4; color: var(--ink-2); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: .45rem; height: .45rem; background: var(--mark); }
.check-ok { margin: 0; font-size: .86rem; color: var(--ok); }

/* ---------- Nothing native: the site draws its own controls ---------- */

/* Scroll bars: a thin square thumb, no arrows. Chromium and Safari take
   the ::-webkit rules (which a scrollbar-color would switch off), Firefox
   the standard properties. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hair-2); border: 2px solid transparent; background-clip: padding-box; border-radius: 0; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--muted); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
}
::selection { background: var(--signal-soft); color: var(--ink); }
html { -webkit-tap-highlight-color: transparent; }
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  box-shadow: inset 0 0 0 100px var(--sheet), inset 0 0 0 1px var(--hair-2);
}

/* Select boxes (js/ui.js): the <select> keeps the value, out of sight. */
.select-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.select { position: relative; display: block; width: 100%; min-width: 0; }
.select.is-open { z-index: 40; }
select[hidden] + .select { display: none; }
select:disabled + .select { opacity: .5; pointer-events: none; }
.select-button, .select-button:hover {
  display: grid; justify-items: start; align-items: center; justify-content: stretch;
  width: 100%; min-height: var(--tap); padding: .5rem 2.2rem .5rem .7rem;
  background-color: var(--sheet); color: var(--ink); border: 1px solid var(--hair-2);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
  font: 400 16px/1.35 var(--f-text); text-align: left;
}
.select-button:hover { border-color: var(--muted); }
.select-button:focus-visible, .select.is-open .select-button { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.select-button > span { grid-area: 1 / 1; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.select-size { height: 0; visibility: hidden; }
.select-list {
  position: absolute; left: 0; top: calc(100% - 1px); min-width: 100%; width: max-content; max-width: max(100%, 20rem);
  max-height: min(18rem, 50vh); overflow-y: auto; overscroll-behavior: contain;
  list-style: none; margin: 0; padding: 0;
  background: var(--sheet); border: 1px solid var(--ink); box-shadow: var(--shadow-sm);
}
.select.opens-up .select-list { top: auto; bottom: calc(100% - 1px); }
.select-list [role="option"] {
  display: flex; align-items: center; min-height: var(--tap); padding: .35rem .7rem;
  font: 400 .95rem/1.3 var(--f-text); color: var(--ink); cursor: pointer; overflow-wrap: anywhere;
}
.select-list [role="option"] + [role="option"] { border-top: 1px solid var(--hair); }
.select-list [role="option"].is-active { background: var(--paper-2); }
.select-list [role="option"][aria-selected="true"] { background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.select-list [role="option"][aria-disabled="true"] { color: var(--faint); cursor: not-allowed; }
.role-fields .select { flex: none; width: auto; max-width: 100%; }
@media (min-width: 1024px) and (pointer: fine) {
  .select-button, .select-button:hover { font-size: .95rem; padding: .4rem 2.2rem .4rem .65rem; }
  .select-list [role="option"] { min-height: 2.1rem; padding: .3rem .65rem; }
}

/* Tooltips (js/ui.js), in place of the browser's title. */
.tip {
  position: fixed; z-index: 300; max-width: min(22rem, calc(100vw - 8px)); padding: .3rem .55rem;
  background: var(--sheet); color: var(--ink); border: 1px solid var(--muted); box-shadow: var(--shadow-sm);
  font: 500 .78rem/1.35 var(--f-text); pointer-events: none; overflow-wrap: anywhere;
}

/* The confirmation dialog (js/ui.js), in place of confirm(). */
.has-modal { overflow: hidden; }
.modal-back { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 1rem; background: var(--scrim); }
.modal { width: min(100%, 26rem); padding: 1.25rem 1.25rem 1rem; background: var(--sheet); border: 1px solid var(--hair-2); border-top: 1.5px solid var(--ink); box-shadow: var(--shadow); }
.modal-text { margin: 0 0 1.1rem; font: 400 1rem/1.45 var(--f-text); color: var(--ink); overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }

/* Validation messages (js/ui.js), in place of the browser's bubble. */
.field-error { display: block; margin-top: .3rem; font: 500 .8rem/1.3 var(--f-text); color: var(--bad); }
[aria-invalid="true"]:where(input, textarea), .select-native[aria-invalid="true"] + .select .select-button { border-color: var(--bad); }

/* ---------- Split avulso (spec 9.10) ---------- */

/* The content and the members on the left, the split box beside them
   from 960px. */
.loot-split { display: grid; gap: 1.25rem; }
.loot-split-main { min-width: 0; }
.loot-split-fields { display: grid; gap: 0 1rem; }
.loot-split-side .split-card, .run-split, .run-split form { display: grid; gap: .8rem; }
.loot-split-side .split-card > * { margin: 0; }
.loot-split-side .split-numbers { margin: 0; }
.pick-filter { margin: 0 0 .6rem; }
.pick-list { list-style: none; display: grid; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.pick-list > li { border-bottom: 1px solid var(--hair-2); }
.pick-row {
  display: flex; align-items: center; gap: .7rem; min-height: var(--tap, 44px); margin: 0; padding: .35rem .55rem;
  font: 600 .92rem/1.3 var(--f-text); color: var(--ink); text-decoration: none; cursor: pointer;
}
label.pick-row:hover, a.pick-row:hover { background: var(--sheet); color: var(--ink); }
.pick-row:has(input:checked) { background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--signal); }
.pick-row:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: -3px; }
.pick-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pick-row input { flex: none; width: 22px; height: 22px; margin: 0; }
.pick-amount { flex: none; font: 600 .86rem var(--f-mono); color: var(--ok); }
.pick-amount.is-reversed { color: var(--muted); text-decoration: line-through; }
.pick-none { padding: .8rem 0; color: var(--muted); }
.pick-empty { margin: .6rem 0 0; }
.split-undo-form { margin: 0; }
@media (min-width: 720px) {
  .loot-split-fields { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .pick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
}
@media (min-width: 960px) {
  .loot-split { grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem); gap: 2rem; align-items: start; }
  .loot-split-side { position: sticky; top: calc(var(--sticky-top) + 1rem); }
}
