/* ══════════════════════════════════════════════════════════════════════════
   Kith LFG — app shell: "The Departures Board". Owns ONLY app.html.

   Register redesign 2026-07-16: layered on lfg/css/kith-base.css (which
   redefines the old site.css token names in Kith values — nightfall panels,
   mist/rain text, Archivo everywhere; there is no monospace). This file keeps
   the component geometry and re-grounds the accents: lamplight is the
   interactive voice, hearth is urgency, patina carries quiet live info.
   Nothing glows that doesn't have a person behind it. The "Kith register"
   section at the very END of this file de-consoles the survivors — it must
   stay last.
   ══════════════════════════════════════════════════════════════════════════ */

.lfg-page {
  /* the accents, regrounded (kith-base.css owns the palette) */
  --lfg-ion:  var(--lamplight);
  --lfg-burn: var(--rain);
  --lfg-teal: var(--rain);
  /* run states (web tags AND Discord container accents share these) */
  --st-forming: var(--rain);
  --st-boarding: var(--rain);
  --st-departed: var(--rain);
  --st-debrief:  var(--lamplight);
  --st-scrubbed: var(--rain);
  --st-lapsed: var(--rain);
  /* per-instance plate tint (overridden inline per row/hero) */
  --accent: var(--lfg-ion);
  /* geometry: the notched corners were console language — zeroed, every
     .clip/.clip-sm polygon is now a rectangle */
  --notch: 0px;
  --notch-sm: 0px;
  --nav-h: 0px;   /* the appbar scrolls away; sticky strips pin to the viewport top */
}

/* Drop 1: compact batch distribution + ordered wants. */
.wants-panel { padding: 16px 18px; }
.wants-list { display: grid; gap: 6px; margin: 10px 0; }
.want-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.want-row b { color: var(--lfg-ion); min-width: 24px; }
.want-row span { flex: 1; }
.wants-badge { cursor: help; }
.rank-panel { padding: 16px 18px; }
.rank-list,.rank-unranked { display: grid; gap: 6px; margin-top: 12px; }
.rank-unranked h4 { margin: 12px 0 2px; }
.rank-row { display: grid; grid-template-columns: auto minmax(0,1fr) repeat(3,36px); align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-height: 48px; }
.rank-row[draggable="true"] { cursor: grab; }
.rank-row.dragging { opacity: .55; }
.rank-row b { color: var(--lfg-ion); min-width: 24px; }
.rank-row span { min-width: 0; }
.rank-row strong,.rank-row small { display: block; }
.rank-row small { color: var(--dim-2); margin-top: 2px; }
.rank-row.unranked { grid-template-columns: minmax(0,1fr) auto; }
.rank-auto { margin-top: 10px; }
.wrapup { padding: 18px; }
.wrap-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.wrap-row small { display: block; color: var(--dim); margin-top: 4px; }
.wrap-choices,.wrap-override { display: flex; gap: 6px; margin-top: 8px; }
.wrap-choices button { min-height: 36px; }
.wrap-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0 0; background: var(--panel); }
.held-note { color: var(--lfg-burn); }
@media (max-width: 600px) { .wrap-row { grid-template-columns: 1fr; } .wrap-actions .btn { flex: 1; min-height: 46px; } }

/* ── subnav (ion accent, reclaimed) ─────────────────────────────────────── */
.lfg-subnav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 16px auto 6px; max-width: var(--max); padding: 0 24px;
}
.lfg-subnav a {
  color: var(--dim); text-decoration: none; padding: 9px 15px;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0;
  font-size: 14px; border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.lfg-subnav a:hover { color: var(--ice); background: var(--panel-2); }
.lfg-subnav a.on { color: var(--ice); background: var(--panel-2); border-color: var(--line-bright); }
.help-mark { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; padding:0; margin-left:5px; border:1px solid var(--line-bright); border-radius:50%; background:transparent; color:var(--muted); font:600 11px sans-serif; cursor:pointer; vertical-align:middle; }
.help-popover { position:fixed; z-index:500; max-width:260px; padding:10px 12px; border:1px solid var(--line-bright); border-radius:4px; background:var(--panel); color:var(--ice); box-shadow:0 8px 22px #0008; font-size:13px; line-height:1.4; }
.help-popover a { display:block; margin-top:7px; color:var(--gold); }
.lfg-subnav .lfg-spacer { flex: 1; }
#lfg-auth .lfg-user { display: inline-flex; align-items: center; gap: 8px; color: var(--ice); font-family: var(--sans); font-size: 13px; }
#lfg-auth img, .lfg-user img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-bright); }

#lfg-view { max-width: var(--max); margin: 0 auto 90px; padding: 8px 24px 0; min-height: 62vh; }

/* ── shared type / primitives ───────────────────────────────────────────── */
.mono { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.lfg-h { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; margin: 0; }
.lfg-kicker { font-family: var(--sans); font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--lfg-ion); }
.lfg-panel { background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); }

.lfg-hint { color: var(--dim-2); font-size: 13px; line-height: 1.6; }
.lfg-muted { color: var(--dim); }
a.lfg-inline { color: var(--lfg-teal); }
a.lfg-inline:hover { color: var(--lfg-ion); }

/* Buttons — inherit site.css .btn geometry; add LFG variants. */
.lfg-page .btn-ion { background: linear-gradient(100deg, var(--lfg-ion), var(--lfg-burn)); color: var(--nightfall); }
.lfg-page .btn-ion:hover { }
.lfg-page .btn-burn { background: linear-gradient(100deg, var(--lfg-burn), var(--lamplight)); color: var(--nightfall); }
.lfg-page .btn-burn:hover { }
.btn-danger { background: transparent; color: var(--st-scrubbed); }
.btn-danger:hover { }
.btn-mini { padding: 7px 13px; font-size: 10.5px; letter-spacing: 0; }

/* icon buttons */
.icon-btn { background: none; border: 1px solid var(--line); color: var(--dim); cursor: pointer;
  border-radius: 7px; padding: 5px 9px; font: inherit; transition: color .15s, border-color .15s; line-height: 1; }
.icon-btn:hover { color: var(--ice); border-color: var(--line-bright); }
.icon-btn.danger:hover { color: var(--st-scrubbed); border-color: var(--st-scrubbed); }

/* form controls */
.lfg-page select, .lfg-page input, .lfg-page textarea {
  background: var(--panel-2); color: var(--ice); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font: inherit; min-height: 42px;
}
.lfg-page textarea { min-height: 80px; resize: vertical; line-height: 1.55; }
.lfg-page select:focus, .lfg-page input:focus, .lfg-page textarea:focus {
  outline: none; border-color: var(--lfg-ion);
}
:where(.lfg-page) :focus-visible { outline: 2px solid var(--lfg-ion); outline-offset: 2px; }

.run-state {
  display: inline-block; color: var(--rain); font: 600 14px/1.3 var(--sans);
  white-space: nowrap;
}
/* tier chip */
.tier { font-family: var(--sans); font-size: 11px; padding: 3px 8px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--tc,var(--dim)) 55%, transparent); color: var(--tc,var(--dim));
  white-space: nowrap; }

/* role pips */
.pips { display: flex; gap: 6px; flex-wrap: wrap; }
.pip { display: inline-flex; align-items: center; gap: 4px; background: var(--panel);
  border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.pip.full { color: var(--st-debrief); border-color: rgba(216,184,117,.4); }
.pip.need { color: var(--lfg-burn); border-color: rgba(147,169,165,.45); }
.pip .ic { font-size: 12px; line-height: 1; }

/* ── page header row (per-view) ─────────────────────────────────────────── */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 6px 0 18px; }
.view-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0; margin: 2px 0 0; }
.view-head .lfg-kicker { display: block; margin-bottom: 4px; }

/* ── NEXT DEPARTURE strip (sticky, live 1s countdown) ───────────────────── */
.next-strip {
  position: sticky; top: var(--nav-h); z-index: 40;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 4px 0 16px; padding: 12px 18px;
  background: linear-gradient(100deg, rgba(9,26,33,.96), rgba(9,26,33,.96));
  border: 1px solid var(--line-bright);
}
.next-strip .ns-label { font-family: var(--sans); font-size: 10px; letter-spacing: 0;
  text-transform: none; color: var(--lfg-teal); }
.next-strip .ns-flight { font-family: var(--sans); color: var(--lfg-teal); font-size: 13px; letter-spacing: 0; }
.next-strip .ns-dest { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; font-size: 16px; }
.next-strip .ns-count {
  margin-left: auto; font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: 22px; letter-spacing: 0; color: var(--ice);
}
.next-strip .ns-count.boarding { color: var(--lfg-burn); }
.next-strip a.ns-go { color: var(--dim); font-family: var(--sans); font-size: 11px; letter-spacing: 0; }
.next-strip a.ns-go:hover { color: var(--lfg-ion); }

/* ── role-scarcity banner ───────────────────────────────────────────────── */
.scarcity {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 11px 16px;
  border: 1px solid rgba(147,169,165,.35);
  background: linear-gradient(100deg, rgba(147,169,165,.08), rgba(147,169,165,.02));
}
.scarcity .sc-ic { font-size: 17px; }
.scarcity b { font-family: var(--font-display); color: var(--lfg-burn); letter-spacing: 0; }
.scarcity .sc-mine { margin-left: auto; }

/* ── filter bar ─────────────────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.filter-bar select { min-width: 190px; }
.tabs { display: inline-flex; gap: 3px; background: var(--panel); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.tabs .tab { background: none; border: 0; color: var(--dim); padding: 8px 15px; border-radius: 7px;
  cursor: pointer; font-family: var(--font-display); font-weight: 600; letter-spacing: 0;
  text-decoration: none; font-size: 13.5px; }
.tabs .tab.on { background: var(--panel-3); color: var(--ice); }
.toggle-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  color: var(--dim); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; }
.toggle-btn.on { color: var(--lfg-burn); border-color: rgba(147,169,165,.45); }
.filter-bar .spacer { flex: 1; }

/* ── departures list ────────────────────────────────────────────────────── */
.dep-list { display: flex; flex-direction: column; gap: 12px; }

.dep-row {
  position: relative; display: grid; align-items: stretch;
  grid-template-columns: 104px 132px minmax(0,1fr) auto;
  grid-template-areas: "plate time main state";
  gap: 0; text-decoration: none; color: var(--ice);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: transform .16s cubic-bezier(.16,1,.3,1), border-color .16s;
  overflow: hidden;
}
.dep-row:hover { transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line-bright)); }
.dep-row:focus-visible { outline: 2px solid var(--lfg-ion); outline-offset: 2px; }

/* planet plate (destination art or CSS deep-space) */
.dep-plate { grid-area: plate; position: relative; min-height: 92px;
  background-size: cover; background-position: center;
  background-color: var(--panel-3); overflow: hidden; }
.dep-plate::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(9,26,33,.15) 0%, rgba(9,26,33,.55) 62%, var(--panel) 100%); }
.dep-plate.no-art {
  background:
    radial-gradient(120% 90% at 18% 24%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 60%),
    radial-gradient(70% 120% at 88% 82%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    repeating-linear-gradient(115deg, rgba(220,232,228,.04) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, var(--panel-3), var(--space-deep));
}
.dep-plate .plate-emoji { position: absolute; left: 10px; bottom: 8px; z-index: 1; font-size: 20px; }
.dep-plate .plate-short { position: absolute; right: 8px; top: 7px; z-index: 1; font-family: var(--sans);
  font-size: 9px; letter-spacing: 0; color: var(--ice); opacity: .82; }

/* mono time block */
.dep-time { grid-area: time; display: flex; flex-direction: column; justify-content: center;
  padding: 12px 14px; border-left: 1px solid var(--line); gap: 3px; }
.dep-time .t-main { font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: 15px; letter-spacing: 0; color: var(--ice); }
.dep-time .t-day { font-family: var(--sans); font-size: 10px; letter-spacing: 0;
  text-transform: none; color: var(--dim); }
.dep-time .t-rel { font-family: var(--sans); font-size: 11px; color: var(--lfg-teal); font-variant-numeric: tabular-nums; }
.dep-time .t-rel.soon { color: var(--lfg-burn); }

/* main column */
.dep-main { grid-area: main; display: flex; flex-direction: column; justify-content: center;
  gap: 7px; padding: 12px 16px; min-width: 0; border-left: 1px solid var(--line); }
.dep-main .d-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dep-main .d-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0;
  color: var(--ice); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-main .d-flight { font-family: var(--sans); font-size: 11px; letter-spacing: 0; color: var(--dim-2); }
.dep-main .d-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leader-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.leader-chip .lc-led { font-family: var(--sans); font-variant-numeric: tabular-nums; color: var(--dim-2); }
.dep-main .d-notes { color: var(--dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* state rail */
.dep-state { grid-area: state; display: flex; flex-direction: column; align-items: flex-end;
  justify-content: center; gap: 8px; padding: 12px 16px; border-left: 1px solid var(--line); }
.dep-state .tag-row { display: flex; gap: 5px; }

/* ── skeleton shimmer (loading — never a spinner) ───────────────────────── */
.lfg-skeleton { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.sk-strip, .sk-row { border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-3) 50%, var(--panel) 70%);
  background-size: 220% 100%; animation: shimmer 1.35s linear infinite; }
.sk-strip { height: 52px; }
.sk-row { height: 94px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -20% 0; } }

/* ── empty states (with personality) ────────────────────────────────────── */
.lfg-empty { text-align: center; color: var(--dim); padding: 64px 24px; background: var(--panel);
  border: 1px dashed var(--line); }
.lfg-empty .em-ic { font-size: 40px; display: block; margin-bottom: 14px; }
.lfg-empty h3 { font-family: var(--font-display); color: var(--ice); font-size: 20px; margin: 0 0 8px; letter-spacing: 0; }
.lfg-empty p { max-width: 460px; margin: 0 auto 6px; line-height: 1.7; }
.lfg-empty .btn { margin-top: 18px; }

/* ══ RUN PAGE ═══════════════════════════════════════════════════════════ */
.run-back { display: inline-flex; align-items: center; gap: 7px; color: var(--dim);
  font-family: var(--sans); font-size: 12px; letter-spacing: 0; margin-bottom: 12px; }
.run-back:hover { color: var(--lfg-ion); }

.run-hero { position: relative; overflow: hidden; border: 1px solid var(--line-bright);
  min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 26px 22px; }
.run-hero .hero-art { position: absolute; inset: 0; background-size: cover; background-position: center 34%; z-index: 0; }
.run-hero .hero-wash { position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(9,26,33,.35) 0%, rgba(9,26,33,.72) 62%, rgba(9,26,33,.94) 100%),
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 34%, transparent), transparent 58%); }
.run-hero.no-art .hero-art { background:
    radial-gradient(120% 90% at 20% 20%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%),
    repeating-linear-gradient(115deg, rgba(220,232,228,.04) 0 1px, transparent 1px 8px),
    linear-gradient(160deg, var(--panel-3), var(--space-deep)); }
.run-hero > * { position: relative; z-index: 2; }
.run-hero .rh-top { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.run-hero .rh-idblock { display: flex; flex-direction: column; gap: 4px; }
.run-hero .rh-flight { font-family: var(--sans); font-size: 34px; letter-spacing: 0;
  font-variant-numeric: tabular-nums; color: var(--ice); line-height: 1; }
.run-hero .rh-dest { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0; color: var(--ice); }
.run-hero .rh-planet { font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--lfg-teal); }
.run-hero .rh-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px;
  font-family: var(--sans); font-size: 13px; color: var(--ice); }
.run-hero .rh-meta .m-rel { color: var(--lfg-teal); font-variant-numeric: tabular-nums; }
.run-hero .rh-notes { margin-top: 12px; color: var(--ice); font-family: var(--font-display); max-width: 70ch; line-height: 1.6; opacity: .92; }
.run-hero .rh-actions { display: flex; gap: 8px; margin-left: auto; align-self: flex-start; }

/* section shell */
.run-sec { margin: 22px 0; }
.run-sec > h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; font-size: 17px;
  margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.run-sec > h3 .count { font-family: var(--sans); font-size: 13px; color: var(--dim-2); font-variant-numeric: tabular-nums; }

/* roster columns */
.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 14px; }
.role-col { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px 8px; }
.role-col h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; color: var(--dim);
  display: flex; align-items: center; gap: 8px; letter-spacing: 0; }
.role-col h4 .rc-n { margin-left: auto; font-family: var(--sans); font-size: 12px; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.role-col h4.full .rc-n { color: var(--st-debrief); }
.member { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; grid-template-rows: auto auto;
  align-items: center; column-gap: 9px; row-gap: 5px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; min-height: 56px; }
.member:first-of-type { border-top: none; }
.member img { grid-column: 1; grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.member .m-name { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
.member .m-name b { font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.member .m-name i { color: var(--dim-2); font-size: 11.5px; font-style: normal; }
.member .m-identity { grid-column: 3; grid-row: 1; align-self: start; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.member .m-tags { grid-column: 2 / -1; grid-row: 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member .chip.toggle { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border: 1px solid var(--line-bright); border-radius: 999px; color: var(--dim); background: transparent;
  font-family: var(--sans); font-size: 11px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.member .chip.toggle input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; opacity: 0; }
.member .chip.toggle:has(input:checked) { color: var(--nightfall); border-color: var(--lamplight); background: var(--lamplight); }
.member .chip.toggle:has(input:focus-visible) { outline: 2px solid var(--lfg-ion); outline-offset: 2px; }
.member .chip.toggle:has(input:disabled) { cursor: default; opacity: .6; }
.member.tentative .m-name b { color: var(--lfg-teal); }
.member.late .m-name b { color: var(--lfg-burn); }
.member.noshow { opacity: .48; }
.member.noshow .m-name b { text-decoration: line-through; }
.member.waitlist .m-name b { text-decoration: line-through; color: var(--dim); }
.member .m-pos { font-family: var(--sans); font-size: 10.5px; color: var(--dim-2); }
.m-lead { font-family: var(--sans); font-size: 9.5px; letter-spacing: 0; color: var(--lfg-burn);
  border: 1px solid rgba(147,169,165,.5); padding: 1px 6px; border-radius: 3px; }
.openslot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 0;
  border-top: 1px dashed var(--line); color: var(--dim-2); font-family: var(--sans); font-size: 11px;
  letter-spacing: 0; min-height: 56px; }

.waitlist-col { margin-top: 14px; }
.waitlist-col h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--dim); margin: 0 0 8px; }

/* action bar */
.action-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; margin: 16px 0; }
.action-bar .ab-you { display: inline-flex; align-items: center; gap: 8px; }
.action-bar input { min-width: 150px; }
.action-bar .ab-opts { display: flex; align-items: center; gap: 14px; flex-basis: 100%; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; cursor: pointer; }
.check input { min-height: 0; width: 16px; height: 16px; accent-color: var(--lfg-ion); }
.detail-fields { flex-basis: 100%; display: none; gap: 10px; flex-wrap: wrap; }
.detail-fields.open { display: flex; }
.detail-fields input { flex: 1; min-width: 200px; }

/* leader console */
.console { border: 1px solid var(--line-bright); background: linear-gradient(160deg, rgba(216,184,117,.05), var(--panel)); }
.console > summary { cursor: pointer; list-style: none; padding: 14px 18px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0; color: var(--ice); }
.console > summary::-webkit-details-marker { display: none; }
.console > summary .chev { margin-left: auto; color: var(--dim); transition: transform .2s; font-family: var(--sans); }
.console[open] > summary .chev { transform: rotate(90deg); }
.console .console-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 18px; }
.console-block { border-top: 1px solid var(--line); padding-top: 16px; }
.console-block > h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none;
  color: var(--lfg-teal); margin: 0 0 12px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--dim); font-size: 12.5px; flex: 1; min-width: 180px; }
.time-echo { font-family: var(--sans); font-size: 12px; color: var(--lfg-teal); min-height: 16px; letter-spacing: 0; }

/* slot steppers */
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; justify-content: space-between; align-items: center; background: var(--panel-2);
  border: 1px solid var(--line); padding: 8px 12px; }
.stepper .st-label { display: flex; align-items: center; gap: 7px; color: var(--ice); font-size: 13.5px; }
.stepper .st-ctl { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel-3);
  color: var(--ice); cursor: pointer; font-size: 16px; line-height: 1; border-radius: 6px; }
.stepper button:hover { border-color: var(--lfg-ion); color: var(--lfg-ion); }
.stepper b { display: inline-block; min-width: 26px; text-align: center; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.total-line { color: var(--dim); font-family: var(--sans); font-size: 13px; margin-top: 4px; }
.total-line b { color: var(--ice); }

/* ── timeline rail ──────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 6px; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 7px 0 7px 22px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-item:first-child::before { top: 14px; }
.tl-item:last-child::before { bottom: calc(100% - 14px); }
.tl-ic { position: absolute; left: 0; top: 6px; width: 15px; height: 15px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line-bright); border-radius: 50%; font-size: 8px; z-index: 1; }
.tl-body { font-size: 13px; color: var(--ice); }
.tl-body .tl-who { color: var(--lfg-teal); }
.tl-time { font-family: var(--sans); font-size: 11px; color: var(--dim-2); font-variant-numeric: tabular-nums; margin-left: 8px; }

/* ── loot ───────────────────────────────────────────────────────────────── */
.loot-table-scroll { max-height: min(52vh, 520px); overflow: auto; overscroll-behavior: contain; border-block: 1px solid var(--line); }
.loot-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--sans); font-size: 12px; }
.loot-table thead { position: sticky; top: 0; z-index: 3; background: var(--panel-2); }
.loot-table th { padding: 8px 9px; border-bottom: 1px solid var(--line-bright); color: var(--dim); font-size: 10px;
  font-weight: 600; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.loot-table td { padding: 6px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.loot-table tbody tr:last-child td { border-bottom: 0; }
.loot-col-number, .loot-number { width: 42px; text-align: right !important; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.loot-col-looter { width: 112px; }
.loot-col-with { width: 70px; }
.loot-col-value { width: 118px; }
.loot-col-pick { width: 42%; text-align: right !important; }
.loot-item { min-width: 180px; }
.loot-name { font-weight: 600; color: var(--ice); overflow: hidden; text-overflow: ellipsis; }
.loot-item-sub { margin-top: 2px; }
.loot-item-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; min-height: 18px; }
.loot-item-tools:empty { display: none; }
.loot-view3d { color: var(--lfg-teal); font-size: 10px; white-space: nowrap; }
.loot-boss, .loot-looter { color: var(--dim-2); font-size: 11px; }
.loot-stats { padding: 1px 6px; font-size: 10px; text-transform: none; }
.loot-stat-toggle { padding: 2px 6px; min-height: 0; }
.loot-with { border: 0; background: transparent; color: var(--rain); cursor: pointer; font: inherit; padding: 4px; white-space: nowrap; }
.loot-with:hover { color: var(--lfg-ion); }
.loot-empty { color: var(--dim-2); }
.loot-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.loot-price-refresh { width: 26px; height: 26px; margin-left: 4px; }
.loot-state { position: relative; text-align: right; white-space: nowrap; }
.loot-state > .chip, .loot-state > .run-state, .loot-state > .loot-win { margin-left: 5px; }
.loot-row.settled { opacity: .64; }
.loot-row.settled .loot-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.loot-win { font-family: var(--sans); font-size: 12.5px; color: var(--st-debrief); font-variant-numeric: tabular-nums; }
.loot-win .dice { color: var(--lfg-burn); }
.loot-ctl { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; margin-left: 6px; white-space: nowrap; }
.loot-menu-toggle { width: 28px; height: 28px; font-size: 18px; line-height: 1; }
.loot-menu { position: absolute; z-index: 8; top: calc(100% + 5px); right: 0; display: grid; min-width: 150px;
  padding: 6px; gap: 3px; background: var(--panel-2); border: 1px solid var(--line-bright); box-shadow: 0 8px 24px rgba(0,0,0,.38); }
.loot-menu[hidden] { display: none; }
.loot-menu button { min-height: 30px; padding: 5px 8px; border: 1px solid transparent; background: transparent;
  color: var(--ice); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.loot-menu button:hover, .loot-menu button:focus-visible { border-color: var(--lfg-ion); color: var(--lfg-ion); }
.loot-menu button.danger { color: var(--danger); }
.loot-members td, .loot-editor td, .loot-flow td { background: var(--panel-2); color: var(--dim); padding: 9px 14px; }
.loot-members strong { color: var(--rain); }
.loot-stat-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.loot-stat-fields label { display: grid; gap: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.loot-stat-fields input, .loot-stat-fields select { width: 68px; min-height: 34px; background: var(--panel-2); color: var(--ice); border: 1px solid var(--line); border-radius: 3px; padding: 5px 7px; font-size: 12px; }
.loot-stat-fields select { width: auto; min-width: 86px; max-width: 220px; }
.loot-ctl select { min-height: 30px; padding: 4px 7px; max-width: 140px; }

@media (max-width: 719px) {
  .loot-table-scroll { max-height: min(58vh, 480px); }
  .loot-table, .loot-table tbody { display: block; width: 100%; }
  .loot-table thead { display: none; }
  .loot-table tr.loot-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto minmax(90px, auto);
    grid-template-areas: "number item item pick pick" ". looter with value value"; gap: 3px 8px; padding: 7px 6px; }
  .loot-table .loot-row td { display: block; width: auto; min-width: 0; padding: 2px 3px; border: 0; }
  .loot-number { grid-area: number; }
  .loot-item { grid-area: item; }
  .loot-looter { grid-area: looter; }
  .loot-with-cell { grid-area: with; }
  .loot-value { grid-area: value; }
  .loot-state { grid-area: pick; align-self: start; }
  .loot-looter, .loot-with-cell, .loot-value { color: var(--dim-2); font-size: 10px; }
  .loot-item-sub, .loot-item-tools { display: inline-flex; margin: 0 0 0 6px; vertical-align: baseline; }
  .loot-ctl { gap: 3px; }
  .loot-ctl select { max-width: 112px; min-height: 28px; }
  .loot-members, .loot-editor, .loot-flow { display: block; width: 100%; }
  .loot-members td, .loot-editor td, .loot-flow td { display: block; width: 100%; }
}

/* staged roll reveal */
.rolls { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.roll-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans);
  font-size: 12px; font-variant-numeric: tabular-nums; padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 4px; color: var(--dim); background: var(--panel-2); }
.roll-chip b { color: var(--ice); }
.roll-chip.win { color: var(--lfg-burn); border-color: rgba(147,169,165,.55); }
.roll-chip.win b { color: var(--lfg-burn); }
.rounds-sep { font-family: var(--sans); font-size: 10px; color: var(--dim-2); letter-spacing: 0; align-self: center; }
.rolling .roll-chip { opacity: 0; animation: rollIn .42s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i,0) * .12s); }
.rolling .roll-chip.win { animation: rollIn .42s cubic-bezier(.22,1,.36,1) both; }
@keyframes rollIn { 0% { opacity: 0; transform: translateY(6px) rotateX(70deg); } 100% { opacity: 1; transform: none; } }
30% { } }

.loot-add { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.loot-add input, .loot-add select { flex: 1 1 240px; min-width: 200px; }
.loot-add input.boss { flex: 0 1 160px; }

/* ══ CREATE / COMPOSER ══════════════════════════════════════════════════ */
.composer { max-width: 640px; margin: 6px auto 40px; display: flex; flex-direction: column; gap: 18px; }
.composer .lfg-panel { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.field-label { display: flex; flex-direction: column; gap: 7px; color: var(--dim); font-size: 13px; }
.field-label > span:first-child { font-weight: 600; color: var(--ice); font-family: var(--font-display); letter-spacing: 0; }
.tpl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ice); padding: 8px 13px; cursor: pointer; font: inherit; font-size: 13px; }
.tpl-chip:hover, .tpl-chip.on { border-color: var(--lfg-ion); color: var(--lfg-ion); }
.plate-preview { position: relative; height: 96px; border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: flex-end; padding: 12px; }
.plate-preview .pp-art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.plate-preview .pp-wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,26,33,.3), rgba(9,26,33,.8)); }
.plate-preview .pp-label { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; }
.tz-hint { font-family: var(--sans); font-size: 11px; color: var(--dim-2); }
.seg { display: inline-flex; gap: 3px; background: var(--panel); border: 1px solid var(--line); padding: 3px; border-radius: 9px; }
.seg button { background: none; border: 0; color: var(--dim); padding: 8px 14px; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 13px; }
.seg button.on { background: var(--panel-3); color: var(--ice); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch-row .sw-txt { color: var(--ice); font-family: var(--font-display); }
.switch-row .sw-txt small { display: block; color: var(--dim-2); font-family: var(--font-display); font-size: 12px; margin-top: 2px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; min-height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--panel-3); border: 1px solid var(--line); border-radius: 999px; transition: .18s; pointer-events: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--dim); transition: .18s; }
.switch input:checked + .track { background: rgba(216,184,117,.22); border-color: var(--lfg-ion); }
.switch input:checked + .track::after { left: 22px; background: var(--lfg-ion); }

/* ══ CALENDAR ═══════════════════════════════════════════════════════════ */
.cal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cal-head h2 { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 20px; letter-spacing: 0; margin: 0; min-width: 220px; text-align: center; }
.cal-nav { background: var(--panel); border: 1px solid var(--line); color: var(--ice); cursor: pointer;
  width: 40px; height: 40px; border-radius: 8px; font-size: 16px; }
.cal-nav:hover { border-color: var(--lfg-ion); color: var(--lfg-ion); }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cal-dow { background: var(--panel); padding: 8px; text-align: center; font-family: var(--sans); font-size: 10px;
  letter-spacing: 0; text-transform: none; color: var(--dim-2); }
.cal-cell { background: var(--panel); min-height: 104px; padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.other { background: var(--space-deep); }
.cal-cell .cc-n { font-family: var(--sans); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cal-cell.today .cc-n { color: var(--lfg-ion); font-weight: 700; }
.cal-cell.today { }
.cal-chip { display: block; font-family: var(--sans); font-size: 10.5px; padding: 3px 6px; border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); color: var(--ice);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip:hover { background: color-mix(in srgb, var(--accent) 26%, var(--panel-2)); }
.cal-chip .cc-t { color: var(--dim); }
.subscribe-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 14px; margin-top: 22px; }
.sub-card { border: 1px solid var(--line); background: var(--panel); padding: 18px; }
.sub-card h4 { font-family: var(--font-display); margin: 0 0 6px; letter-spacing: 0; }
.sub-card p { color: var(--dim); font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.sub-card .sc-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══ LEADERBOARD ════════════════════════════════════════════════════════ */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin-bottom: 22px; }
.podium .pod { border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 18px 14px; text-align: center; position: relative; text-decoration: none; }
.podium .pod .pod-rank { font-family: var(--sans); font-size: 26px; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.podium .pod img { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line-bright); margin: 6px 0; }
.podium .pod .pod-name { font-family: var(--font-display); font-weight: 700; color: var(--ice); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pod .pod-stat { font-family: var(--sans); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; margin-top: 4px; }
.podium .pod.p1 { border-color: rgba(147,169,165,.55); transform: translateY(-8px); }
.podium .pod.p1 .pod-rank { color: var(--lfg-burn); }
.podium .pod.p2 .pod-rank { color: var(--lfg-teal); }
.podium .pod.p3 .pod-rank { color: var(--dim); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.lfg-table { width: 100%; border-collapse: collapse; background: var(--panel); min-width: 520px; }
.lfg-table th, .lfg-table td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); }
.lfg-table thead th { border-top: none; color: var(--dim-2); font-family: var(--sans); font-size: 11px;
  letter-spacing: 0; text-transform: none; font-weight: 400; }
.lfg-table td.num, .lfg-table th.num { text-align: right; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.lfg-table .r-rank { font-family: var(--sans); color: var(--dim); font-variant-numeric: tabular-nums; width: 46px; }
.lfg-table tr.me td { background: rgba(216,184,117,.07); }
.lfg-table tbody tr:hover td { background: var(--panel-2); }
.lfg-table .u-cell { display: inline-flex; align-items: center; gap: 9px; color: var(--ice); }
.lfg-table .u-cell img { width: 26px; height: 26px; border-radius: 50%; }

/* ══ LEDGER ═════════════════════════════════════════════════════════════ */
.ledger-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ledger-filters input { flex: 1; min-width: 200px; }
.ledger-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center;
  padding: 11px 14px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 8px; }
.ledger-row .lg-when { font-family: var(--sans); font-size: 11px; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.pager .pg-info { font-family: var(--sans); font-size: 12px; color: var(--dim); }

/* ══ PROFILE ════════════════════════════════════════════════════════════ */
.profile-top { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-bottom: 22px; }
@media (max-width: 620px) { .profile-top { grid-template-columns: 1fr; text-align: center; } }
.rank-card-wrap { display: flex; flex-direction: column; gap: 10px; align-items: center; }
canvas.rank-card { max-width: 100%; height: auto; border: 1px solid var(--line-bright); background: var(--space-deep); }
.profile-id h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin: 0 0 6px; }
.progress-ring { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.ring { width: 66px; height: 66px; flex: none; }
.ring .ring-txt { font-family: var(--sans); font-size: 13px; fill: var(--ice); font-variant-numeric: tabular-nums; }
.next-tier { font-size: 13px; color: var(--dim); }
.next-tier b { color: var(--ice); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 20px 0; }
.stat-grid .s { background: var(--panel); padding: 18px 14px; text-align: center; }
.stat-grid .s b { display: block; font-family: var(--sans); font-size: 26px; color: var(--lfg-ion);
  font-variant-numeric: tabular-nums; }
.stat-grid .s span { font-family: var(--sans); font-size: 9.5px; letter-spacing: 0; text-transform: none; color: var(--dim-2); }

.badge-wrap { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  padding: 9px 13px; border-radius: 8px; }
.badge .b-ic { font-size: 18px; }
.badge .b-txt { display: flex; flex-direction: column; }
.badge .b-txt b { font-family: var(--font-display); font-size: 13px; letter-spacing: 0; }
.badge .b-txt span { font-size: 11px; color: var(--dim-2); }

.clears-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px,1fr)); gap: 8px; }
.clear-cell { position: relative; overflow: hidden; border: 1px solid var(--line); min-height: 74px; padding: 8px;
  display: flex; flex-direction: column; justify-content: space-between; }
.clear-cell .cell-art { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; }
.clear-cell.no-art .cell-art { background:
    radial-gradient(120% 100% at 20% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%),
    linear-gradient(160deg, var(--panel-3), var(--space-deep)); opacity: 1; }
.clear-cell .cell-wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,26,33,.2), rgba(9,26,33,.82)); }
.clear-cell > * { position: relative; z-index: 1; }
.clear-cell .cell-emoji { font-size: 17px; }
.clear-cell .cell-name { font-family: var(--sans); font-size: 9.5px; letter-spacing: 0; color: var(--ice);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clear-cell .cell-n { font-family: var(--sans); font-size: 13px; color: var(--lfg-teal); font-variant-numeric: tabular-nums; }
.clear-cell.zero { opacity: .4; }
.clear-cell.zero .cell-n { color: var(--dim-2); }

/* settings blocks */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 16px; }
.dm-prefs { display: flex; flex-direction: column; gap: 4px; }
.sub-list, .tpl-list { display: flex; flex-direction: column; gap: 8px; }
.sub-item, .tpl-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); }
.sub-item .si-txt, .tpl-item .ti-txt { flex: 1; min-width: 0; }
.sub-item .si-txt b, .tpl-item .ti-txt b { font-family: var(--font-display); }
.sub-item .si-txt span, .tpl-item .ti-txt span { display: block; font-size: 12px; color: var(--dim-2); font-family: var(--sans); }
.calendar-links { display: flex; flex-direction: column; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-row code { flex: 1; min-width: 200px; font-family: var(--sans); font-size: 11px; color: var(--lfg-teal);
  background: var(--panel-2); border: 1px solid var(--line); padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── toast (v1 pattern) ─────────────────────────────────────────────────── */
#lfg-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--panel-3); color: var(--ice); border: 1px solid var(--st-debrief);
  padding: 11px 20px; z-index: 300; transition: all .25s; pointer-events: none; max-width: 92vw;
  font-family: var(--sans); font-size: 13px; }
#lfg-toast.show { opacity: 1; transform: translate(-50%, 0); }
#lfg-toast.bad { border-color: var(--line-bright); color: var(--rain); }

/* ── modal (focus-trapped; replaces native confirm/prompt) ──────────────── */
#lfg-modal-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(9,26,33,.92); display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .16s ease; }
.lfg-modal { width: min(480px, 100%); background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-bright); padding: 22px 24px; max-height: 88vh; overflow: auto;
  animation: modalIn .22s cubic-bezier(.16,1,.3,1); }
.lfg-modal h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; margin: 0 0 12px; font-size: 19px; }
.lfg-modal p { color: var(--dim); line-height: 1.65; margin-bottom: 14px; }
.lfg-modal .m-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; color: var(--dim); font-size: 13px; }
.lfg-modal .m-field input, .lfg-modal .m-field select, .lfg-modal .m-field textarea { width: 100%; }
.setout-log-check { display: grid; gap: 10px; margin: 4px 0 16px; padding: 14px; background: var(--panel-3); border: 1px solid var(--line-bright); }
.setout-log-check b { font-size: 13px; line-height: 1.45; }
.setout-log-check code { display: block; padding: 10px 12px; overflow-wrap: anywhere; color: var(--cyan); background: var(--space-deep); border: 1px solid var(--line); font-size: 14px; }
.setout-log-check span { color: var(--dim); font-size: 12px; line-height: 1.5; }
.lfg-modal .m-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── sign-in cta ────────────────────────────────────────────────────────── */
.signin-cta { text-align: center; padding: 8px 0; }

/* ══ MOBILE ═════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  #lfg-view { padding: 6px 14px 0; }
  .lfg-subnav { padding: 0 14px; gap: 4px; }
  .lfg-subnav a { padding: 8px 11px; font-size: 13px; }

  /* board rows → stacked cards */
  .dep-row { grid-template-columns: 84px 1fr; grid-template-areas: "plate main" "plate time" "state state"; }
  .dep-plate { min-height: 100%; }
  .dep-time { border-left: 1px solid var(--line); flex-direction: row; align-items: baseline; gap: 8px; padding: 0 16px 12px; }
  .dep-main { border-left: 1px solid var(--line); padding-bottom: 8px; }
  .dep-state { border-left: 1px solid var(--line); border-top: 1px solid var(--line); flex-direction: row;
    align-items: center; justify-content: space-between; }

  .next-strip { top: 0; }
  .next-strip .ns-count { font-size: 19px; }
  .steppers { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; }
  .podium .pod.p1 { transform: none; order: -1; }
  .run-hero .rh-flight { font-size: 26px; }
  .run-hero .rh-actions { margin-left: 0; }

  /* run action bar → sticky bottom (v1 pattern), 44px targets */
  .action-bar { position: sticky; bottom: 0; z-index: 30; }
  .action-bar .btn { min-height: 46px; flex: 1; justify-content: center; }
  .icon-btn { min-height: 40px; min-width: 40px; }
}

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sk-strip, .sk-row { animation: none; }
  .rolling .roll-chip { opacity: 1; animation: none; }
  .dep-row { transition: border-color .16s; }
  .dep-row:hover { transform: none; }
  #lfg-modal-backdrop, .lfg-modal { animation: none; }
}

/* ══ My Characters (#/character) ══════════════════════════════════════════ */
.char-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.char-head h2 { font-family: var(--font-display); color: var(--ice); font-size: 20px; letter-spacing: 0; }
.char-head .row { display: flex; gap: 8px; flex-wrap: wrap; }
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.char-card { background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.char-card.is-default { border-color: var(--line-bright); }
.char-card .cc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.char-card .cc-name { color: var(--ice); font-family: var(--font-display); font-size: 15px; }
.char-card .cc-def { font-size: 9px; letter-spacing: 0; text-transform: none; color: var(--lfg-ion); border: 1px solid var(--lfg-ion); border-radius: 10px; padding: 1px 7px; }
.char-card .cc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.char-card .cc-gear { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0 0; }
.char-card .cg-th { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); }
.char-card .cc-notes { margin-top: 10px; }
.char-card .cc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.char-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.char-form .cf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.char-form .cf-err { color: var(--lfg-burn); font-size: 12px; }
.pair-code { font-family: var(--sans); font-size: 26px; letter-spacing: normal; color: var(--lfg-ion); text-align: center; padding: 14px; margin: 12px 0; border: 1px solid var(--line-bright); border-radius: 8px; }
@media (max-width: 520px) { .char-form .cf-two { grid-template-columns: 1fr; } }

/* ══ Loot modes · private runs · pick-order draft ═════════════════════════ */
.chip.lm { color: var(--lfg-ion); border-color: rgba(216,184,117,.45); }
.chip.private { color: var(--lfg-burn); border-color: rgba(147,169,165,.45); }
.chip.invited { color: var(--lfg-ion); border-color: rgba(216,184,117,.4); }
.member.invited .m-name b { color: var(--dim); }
.run-hero .rh-extra { font-family: var(--sans); font-size: 12px; letter-spacing: 0; color: var(--lfg-teal); }
/* composer: "Team session" accordion + extra-heroics checklist */
.also-covers > summary { cursor: pointer; list-style: none; font-family: var(--sans); font-size: 11px;
  letter-spacing: 0; text-transform: none; color: var(--dim); padding: 10px 0 2px; }
.also-covers > summary::-webkit-details-marker { display: none; }
.also-covers > summary::before { content: "▸ "; color: var(--lfg-ion); }
.also-covers[open] > summary::before { content: "▾ "; }
.also-covers > summary:hover { color: var(--ice); }
.extra-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; padding: 10px 0 4px; }
.session-instances { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px; }
.session-instances .chip { display: inline-flex; align-items: center; gap: 5px; }
.session-instances .icon-btn { min-width: 22px; width: 22px; height: 22px; padding: 0; font-size: 10px; }
/* need/greed live tally */
.ng-tally .roll-chip.waiting { opacity: .55; }
/* draft panel */
.draft-list { display: flex; flex-direction: column; }
.draft-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.draft-row:first-child { border-top: none; }
.draft-row .dr-pos { font-size: 11px; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.draft-row.cur .dr-pos { color: var(--lfg-ion); }
.draft-row.cur .dr-name { color: var(--lfg-ion); font-weight: 600; }

/* ══ Action parity pass 2: claims · draft actions · invites ═══════════════ */
/* need/greed claim buttons (under the live tally) */
.ng-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; padding-bottom: 4px; }
/* draft panel action row (current picker / leader skip) */
.draft-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.draft-actions select { min-width: 180px; flex: 1 1 220px; }
/* invited-viewer banner on the run page */
.invite-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0;
  padding: 12px 16px; border: 1px solid rgba(216,184,117,.45);
  background: linear-gradient(160deg, rgba(216,184,117,.12), var(--panel)); }
.invite-banner .ib-ic { font-size: 17px; }
.invite-banner .ib-txt { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; color: var(--ice); }
.invite-banner .spacer { flex: 1; }
/* leader invite box (collapsed near the roster; reuses .console summary chrome) */
.invite-box { margin: 14px 0; }
.invite-box .invite-body { padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.invite-box .invite-body input { width: 100%; }
.invite-results { display: flex; flex-direction: column; }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.invite-row:first-child { border-top: none; }
.invite-row img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-bright); }
.invite-row .iv-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.invite-row .iv-name b { color: var(--ice); }
.invite-row .iv-name i { font-style: normal; font-size: 12px; color: var(--dim); }
.invite-row .spacer { flex: 1; }

/* ══ KITH REGISTER (2026-07-16) — KEEP THIS SECTION LAST ══════════════════
   De-consoles the survivors above: serif view headings, mixed case where a
   machine used to shout, no tracked-caps eyebrows, no glow on controls, no
   clipped corners. The component geometry above is untouched. */

/* view headings speak Vollkorn; UI labels stay Archivo */
.view-head h2, .lfg-empty h3, .lfg-modal h3, .profile-id h2,
.run-hero .rh-dest, .char-head h2, .sub-card h4 {
  font-family: var(--serif); letter-spacing: -0.01em;
}
.view-head h2 { font-size: 28px; }
.cal-head h2 { font-family: var(--serif); letter-spacing: -0.01em; }

/* the eyebrow dies; the heading was already doing the work */
.lfg-kicker { display: none; }

/* state tags: mixed case, plain rectangle, no glowing dot */

/* nav + labels: mixed case, no tracking */
.lfg-subnav a { border-radius: 3px; letter-spacing: 0; }
.next-strip { background: linear-gradient(100deg, var(--panel-2), var(--panel)); }
.next-strip .ns-label { letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--dim); }
.next-strip .ns-flight { letter-spacing: 0; }
.next-strip .ns-count { letter-spacing: 0; }
.next-strip .ns-count.boarding { }
.dep-time .t-day { letter-spacing: 0; text-transform: none; font-size: 11px; }
.dep-plate .plate-short { letter-spacing: 0; }
.run-hero .rh-planet { letter-spacing: 0; text-transform: none; font-size: 12px; }
.run-back { letter-spacing: 0; }
.waitlist-col h4, .console-block > h4, .also-covers > summary { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.lfg-table thead th { letter-spacing: 0; text-transform: none; font-size: 12px; }
.cal-dow { letter-spacing: 0; text-transform: none; font-size: 11px; }
.stat-grid .s span { letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.openslot { letter-spacing: 0; }
.m-lead { letter-spacing: 0; }
.rounds-sep { letter-spacing: 0; }
.clear-cell .cell-name { letter-spacing: 0; font-size: 11px; }
.char-card .cc-def { letter-spacing: 0; text-transform: none; font-size: 10.5px; }
.btn-mini { letter-spacing: 0; font-size: 12px; }

/* no glowing UI — light means people. Solid warm doors instead of gradients. */
.lfg-page .btn-ion { background: var(--lamplight); color: var(--nightfall); }
.lfg-page .btn-ion:hover { background: var(--lamplight); }
.lfg-page .btn-burn { background: transparent; color: var(--mist); }
.lfg-page .btn-burn:hover { background: transparent; }
.btn-danger:hover { }
.podium .pod.p1 { }
.stat-grid .s b { }

/* clipped corners → plain rectangles */
.tpl-chip { border-radius: 3px; }
#lfg-toast { border-radius: 3px; }
.lfg-modal { border-radius: 3px; }


/* Drop 2 — the §11 product register. */
.lfg-page {
  --serif: var(--font-serif, 'Vollkorn', Georgia, serif);
  --sans: var(--font-body, 'Archivo', system-ui, sans-serif);
  --font-display: var(--serif, var(--font-serif, Georgia, serif));
  --panel: color-mix(in srgb, var(--nightfall) 94%, var(--mist));
  --panel-2: color-mix(in srgb, var(--nightfall) 89%, var(--mist));
  --panel-3: color-mix(in srgb, var(--nightfall) 84%, var(--mist));
  --space-deep: var(--nightfall);
  --line: color-mix(in srgb, var(--mist) 12%, transparent);
  --line-bright: color-mix(in srgb, var(--mist) 26%, transparent);
  --ice: var(--mist);
  --dim: var(--rain);
  --dim-2: var(--rain);
  --accent: var(--lamplight) !important;
  font-variant-numeric: lining-nums;
}
.lfg-page, .lfg-page input, .lfg-page select, .lfg-page textarea,
.lfg-page button { font-family: var(--sans, var(--font-body, Archivo, system-ui, sans-serif)); }
.lfg-h, .view-head h2, .lfg-empty h3, .lfg-modal h3, .profile-id h2,
.run-sec > h3, .run-hero .rh-dest, .console summary, .sub-card h4,
.podium .pod .pod-name, .settings-heading, .board-guide h2 {
  font-family: var(--serif, var(--font-serif, Georgia, serif));
  letter-spacing: normal; text-transform: none;
}
.lfg-subnav a, .lfg-kicker, .next-strip .ns-label, .next-strip .ns-flight,
.dep-time .t-day, .dep-time .t-main, .dep-time .t-rel, .dep-main .d-flight,
.plate-short, .chip, .tier, .pip, .mono, code, .btn-mini, .field-label > span,
.tz-hint, .cal-chip, .clear-cell .cell-name {
  letter-spacing: normal; text-transform: none;
}
.lfg-panel, .dep-row, .run-hero, .console, .char-card, .podium .pod,
.lfg-modal, .next-strip, .scarcity, .invite-banner {
  background-color: var(--panel);
  background-image: none;
}
.lfg-page .btn-ion {
  background: var(--lamplight); color: var(--nightfall); border-color: var(--lamplight);
}
.lfg-page .btn-ion:hover { background: var(--mist); color: var(--nightfall); }
.lfg-page .btn-burn {
  background: transparent; color: var(--mist); border: 1px solid var(--line-bright);
}
.lfg-page .btn-burn:hover { color: var(--lamplight); border-color: var(--lamplight); }
.btn-danger, .btn-danger:hover { color: var(--rain); border: 1px solid var(--line-bright); background: transparent; }
.lfg-page select:focus, .lfg-page input:focus, .lfg-page textarea:focus {
  outline: 2px solid var(--lamplight); outline-offset: 2px; border-color: var(--lamplight);
}
.chip, .tier, .pip, .chip.learning, .chip.hot, .chip.ok, .chip.lm,
.chip.private, .chip.invited, .pip.full, .pip.need {
  color: var(--rain); border-color: var(--line-bright); background: transparent;
}
.run-state { color: var(--rain); }
.run-hero .run-state { color: var(--mist); }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.board-guide {
  max-width: var(--max); margin: 12px auto 8px; padding: 16px 24px;
  display: flex; gap: 24px; align-items: flex-start; justify-content: space-between;
  border-block: 1px solid var(--line); color: var(--rain);
}
.board-guide[hidden] { display: none; }
.board-guide-dismiss, #board-guide-dismiss { white-space: nowrap; min-width: 5.25rem; }
.board-guide h2 { margin: 0 0 4px; color: var(--mist); font-size: 20px; }
.board-guide p { margin: 0; max-width: 72ch; }
.state-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; margin: 14px 0 0; }
.state-guide div { min-width: 0; }
.state-guide dt { color: var(--mist); font-weight: 600; }
.state-guide dd { margin: 2px 0 0; font-size: 13px; line-height: 1.45; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.settings-heading { color: var(--mist); font-size: 16px; margin: 0 0 12px; }
.text-action {
  border: 0; padding: 0; background: none; color: var(--mist); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.wrap-promise { color: var(--rain); }
.wrap-promise time { font-variant-numeric: tabular-nums; }
.wrapup { border-color: var(--line-bright); }
.wrap-row { min-height: 56px; }
.wrap-actions { background: var(--nightfall); padding: 12px 0; }
.wants-panel { border-color: var(--line-bright); }
.want-row { min-height: 44px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.action-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  background: var(--panel); border-color: var(--line-bright);
}
.join-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.join-next { grid-column: 1 / -1; margin: 0; color: var(--rain); font-size: 13px; }
.choice-explainer { color: var(--rain); font-size: 13px; line-height: 1.45; margin: -8px 0 2px; max-width: 68ch; }
.composer { max-width: none; gap: 14px; }
.composer .lfg-panel { padding: 16px 18px; border-color: var(--line-bright); }
.composer-submit {
  position: sticky; bottom: 0; z-index: 35; grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: flex-end; gap: 18px;
  padding: 10px 0; background: var(--nightfall); color: var(--rain); font-size: 13px;
}
.composer-submit .btn { flex: 0 0 auto; }
.plate-preview { min-height: 86px; }
.steppers { gap: 6px 10px; }
.stepper { min-height: 38px; }
.switch-row { padding: 7px 0; }
.also-covers { margin-top: 6px; }
@media (min-width: 1100px) {
  .composer {
    display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    grid-template-rows: auto auto auto; align-items: start; margin-top: 0;
  }
  .composer-main { grid-column: 1; grid-row: 1; }
  .composer-leader { grid-column: 1; grid-row: 2; }
  .composer-options { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 700px) {
  #lfg-view { padding-inline: 14px; margin-bottom: 54px; }
  .lfg-subnav { padding-inline: 14px; overflow-x: auto; flex-wrap: nowrap; }
  .lfg-subnav a { flex: 0 0 auto; padding: 8px 10px; }
  .board-guide { margin-inline: 14px; padding: 14px 0; flex-direction: column; gap: 12px; }
  .state-guide { grid-template-columns: 1fr 1fr; }
  .run-hero { min-height: 0; padding: 16px 14px; }
  .run-hero .hero-art, .run-hero .hero-wash { display: none; }
  .run-hero .rh-dest { font-size: 22px; }
  .run-hero .rh-actions { width: 100%; }
  .run-hero .rh-actions .btn { flex: 1; min-height: 46px; }
  .roster { grid-template-columns: 1fr; }
  .action-bar {
    position: sticky; bottom: 0; z-index: 35; grid-template-columns: 1fr;
    padding: 12px; margin-inline: -14px; background: var(--nightfall);
  }
  .join-fields { grid-template-columns: 1fr; }
  .action-bar > .btn-ion { width: 100%; min-height: 48px; }
  .console { margin-inline: -14px; border-inline: 0; }
  .console summary { min-height: 48px; padding-inline: 14px; }
  .console-body { padding: 0 14px 14px; }
  .console-block { padding-block: 14px; }
  .loot-add, .field-row { align-items: stretch; }
  .loot-add input, .loot-add select, .loot-add .boss, .loot-add .btn { flex: 1 1 100%; min-width: 0; min-height: 46px; }
  .wrap-row { grid-template-columns: 1fr; min-height: 56px; gap: 8px; }
  .wrapup, .wants-panel, .rank-panel { margin-inline: -14px; border-inline: 0; padding-inline: 14px; }
  .wrap-choices, .wrap-override { display: grid; grid-template-columns: repeat(3, 1fr); }
  .wrap-choices button, .wrap-override select { min-height: 46px; width: 100%; }
  .wrap-actions {
    position: sticky; bottom: 0; z-index: 40; margin-inline: -14px; padding: 10px 14px;
  }
  .wrap-actions .btn { width: 100%; min-height: 48px; }
  .want-row { display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(3, 44px); padding-inline: 0; }
  .want-row .icon-btn { min-height: 44px; }
  .rank-row { grid-template-columns: auto minmax(0,1fr) repeat(3,44px); padding-inline: 0; }
  .composer .lfg-panel { padding-inline: 14px; }
  .composer-submit { margin-inline: -14px; padding: 10px 14px; flex-direction: column; align-items: stretch; }
  .composer-submit .btn { min-height: 48px; }
}
@media (max-width: 420px) {
  .state-guide { grid-template-columns: 1fr; }
  .dep-row { grid-template-columns: 72px minmax(0, 1fr); }
  .dep-plate { min-height: 80px; }
  .dep-time { border: 0; padding: 8px 12px; }
  .dep-state { border: 0; padding: 8px 12px; align-items: flex-start; }
  .rh-meta { gap: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* leader move-seat menu */
.move-menu {
  grid-column: 2 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
  margin: 2px 0 4px; padding: 7px; background: var(--panel-2); border: 1px solid var(--line-bright);
}
.move-menu[hidden] { display: none; }
.move-menu button {
  min-height: 32px; padding: 5px 7px; border: 1px solid var(--line); background: var(--panel-3);
  color: var(--ice); font: inherit; font-size: 12px; text-align: left; cursor: pointer;
}
.move-menu button:hover, .move-menu button:focus-visible { border-color: var(--lfg-ion); color: var(--lfg-ion); }
