/* Link Logs officer site.
   Dark, with the Warcraft Logs parse colours (purple, orange, pink, gold) as the brand accents.
   Layout: a fixed sidebar on desktop, an icon rail on tablets, a top bar + bottom tab bar on phones. */

:root {
  color-scheme: dark;
  --bg: #0a0910; --bg-2: #0e0d15;
  --surface: #14121c; --surface-2: #1a1826; --surface-3: #221f30; --hover: #1f1c2b;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13); --line-3: rgba(255, 255, 255, .2);
  --text: #f2f0f8; --muted: #a8a4b9; --dim: #716d82;
  --purple: #a335ee; --orange: #ff8000; --pink: #e268a8; --gold: #e5cc80; --blue: #4f8edb;
  --green: #3fbf6f; --red: #e5534b; --amber: #e0a526; --discord: #5865f2;
  --ok: #86e3a6; --ok-bg: rgba(63, 191, 111, .14); --ok-line: rgba(63, 191, 111, .35);
  --warn: #f5cd6e; --warn-bg: rgba(224, 165, 38, .14); --warn-line: rgba(224, 165, 38, .35);
  --bad: #f6a19c; --bad-bg: rgba(229, 83, 75, .14); --bad-line: rgba(229, 83, 75, .4);
  --info: #9cc3f7; --info-bg: rgba(79, 142, 219, .14); --info-line: rgba(79, 142, 219, .35);
  --r-tank: #4f8edb; --r-healer: #3fbf6f; --r-melee: #e0a526; --r-ranged: #aad372; --r-caster: #b57cf2;
  --parse: linear-gradient(90deg, var(--purple), var(--pink) 55%, var(--gold));
  --parse-4: linear-gradient(90deg, var(--purple) 0 25%, var(--orange) 25% 50%, var(--pink) 50% 75%, var(--gold) 75%);
  --radius: 16px; --radius-s: 10px; --radius-xs: 7px;
  --shadow: 0 12px 32px -14px rgba(0, 0, 0, .7);
  --glow: 0 0 0 1px rgba(226, 104, 168, .35), 0 0 24px -6px rgba(226, 104, 168, .45);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Sora, Inter, system-ui, sans-serif;
  --side: 248px; --tabbar: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── base ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.55 var(--font); overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 0% -10%, rgba(163, 53, 238, .16), transparent 62%),
    radial-gradient(800px 460px at 100% -5%, rgba(226, 104, 168, .10), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  font-feature-settings: "cv11", "ss01";
}
a { color: #b9c3ff; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
b, strong { font-weight: 600; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.15; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 36px 0 12px; font-family: var(--font); display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 .count { font-weight: 500; color: var(--dim); text-transform: none; letter-spacing: 0; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.sub, .muted { color: var(--muted); }
.dim { color: var(--dim); font-weight: 400; }
.small { font-size: 13px; }
.ic.star { width: 1em; height: 1em; color: var(--gold); fill: var(--gold); stroke: none; vertical-align: -.15em; }
.num { font-variant-numeric: tabular-nums; }
code { background: var(--surface-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 13px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
p { margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(163, 53, 238, .45); }
img { max-width: 100%; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.22em; }
.ic.fill { fill: currentColor; stroke: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── app shell ──────────────────────────────────────────── */
main {
  display: grid; grid-template-columns: minmax(0, 1180px); justify-content: center; align-content: start;
  padding: 36px clamp(16px, 3.4vw, 48px) 72px; min-width: 0;
}
.side ~ main { margin-left: var(--side); }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px; border-right: 1px solid var(--line);
  background:
    radial-gradient(360px 240px at 0% 100%, rgba(163, 53, 238, .18), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 40%), var(--bg-2);
}
.side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px); background-size: 18px 18px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 55%);
}
.side > * { position: relative; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; padding: 6px 8px 18px; font-family: var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 18px -8px rgba(226, 104, 168, .7); }
.brand span { font-size: 17px; color: var(--dim); font-weight: 600; }
.brand b { font-weight: 700; background: var(--parse); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu { display: flex; flex-direction: column; gap: 3px; }
.menu .link, .tabbar .link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.menu .link:hover { color: var(--text); background: rgba(255, 255, 255, .05); text-decoration: none; }
.menu .link .ic { width: 20px; height: 20px; opacity: .85; }
.menu .link.on { color: var(--text); background: linear-gradient(90deg, rgba(163, 53, 238, .22), rgba(226, 104, 168, .08)); box-shadow: inset 0 0 0 1px rgba(226, 104, 168, .18); }
.menu .link.on .ic { color: var(--pink); opacity: 1; }
.menu .link.on::before { content: ""; width: 3px; height: 18px; border-radius: 3px; background: var(--parse); margin-left: -12px; margin-right: 1px; background: linear-gradient(180deg, var(--purple), var(--pink), var(--gold)); }
.side .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); min-width: 0; }
.who img { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface-3); }
.who .name { min-width: 0; flex: 1; line-height: 1.2; }
.who .name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.who .name small { color: var(--dim); font-size: 12px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; color: var(--muted);
  border: 1px solid transparent; background: transparent; cursor: pointer; flex: none; transition: background .15s, color .15s, border-color .15s;
}
.iconbtn:hover { color: var(--text); background: rgba(255, 255, 255, .06); border-color: var(--line-2); text-decoration: none; }
.iconbtn .ic { width: 18px; height: 18px; }

header.top, .tabbar { display: none; }
header.top {
  position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px;
  background: rgba(10, 9, 16, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
header.top .brand { padding: 0; }
header.top .brand img { width: 30px; height: 30px; }
header.top .who { border: none; background: none; padding: 0; gap: 4px; }
header.top .who img { width: 30px; height: 30px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
  background: rgba(14, 13, 21, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  justify-content: space-around; align-items: stretch;
}
.tabbar .link { flex: 1; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px; font-weight: 500; border-radius: 10px; justify-content: center; }
.tabbar .link .ic { width: 22px; height: 22px; }
.tabbar .link.on { color: var(--pink); }
.tabbar .link.on .ic { filter: drop-shadow(0 0 8px rgba(226, 104, 168, .6)); }

@media (max-width: 1099px) {
  :root { --side: 78px; }
  .side { padding: 16px 12px; align-items: stretch; }
  .brand { justify-content: center; padding: 4px 0 16px; }
  .brand span, .menu .link span, .who .name { display: none; }
  .menu .link { justify-content: center; padding: 11px 0; }
  .menu .link.on::before { display: none; }
  .who { flex-direction: column; padding: 8px 6px; gap: 6px; }
}
@media (max-width: 759px) {
  .side { display: none; }
  .side ~ main { margin-left: 0; padding: 20px 16px calc(var(--tabbar) + 40px); }
  header.top, .tabbar { display: flex; }
  header.top .brand span { display: inline; font-size: 16px; }
  header.top .who { flex-direction: row; }
}

/* ── buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-2); padding: 9px 15px; border-radius: 11px; font: inherit; font-weight: 500; font-size: 14px; cursor: pointer;
  white-space: nowrap; line-height: 1.3; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { border-color: var(--line-3); background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn.primary { background: linear-gradient(135deg, #b23ef0, #d04aa6 60%, #e0659d); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(214, 71, 170, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 8px 22px -8px rgba(214, 71, 170, 1), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.discord { background: linear-gradient(180deg, #6873ff, #5865f2); border-color: transparent; color: #fff; }
.btn.discord:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: transparent; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.small .ic { width: 15px; height: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── cards, grids, hero ─────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  position: relative; display: block; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 45%), var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}
a.card { transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
a.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.hero h1 { margin-bottom: 4px; }
.hero .sub { margin: 0; max-width: 60ch; }
.hero .meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; color: var(--muted); margin: 0; }
.hero .meta .ic { width: 15px; height: 15px; color: var(--dim); }

/* stat tiles */
.stat {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "val ic" "lbl ic"; align-items: center; gap: 0 12px; padding: 16px 18px;
  --accent: var(--pink); overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--accent); opacity: .08; filter: blur(18px); }
.stat b { grid-area: val; font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { grid-area: lbl; color: var(--muted); font-size: 13.5px; }
.stat .stat-ic { grid-area: ic; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); }
.stat .stat-ic .ic { width: 21px; height: 21px; }

/* next raid */
.next { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; padding: 14px 18px; min-width: min(100%, 340px); background: linear-gradient(135deg, rgba(163, 53, 238, .18), rgba(226, 104, 168, .06) 60%, transparent), var(--surface); }
.next .leaf { grid-row: span 3; }
.next .eyebrow { color: var(--pink); }
.next b { font-family: var(--display); font-size: 17px; }
.next .count { font-size: 13px; color: var(--muted); }
.next .count em { font-style: normal; color: var(--gold); font-weight: 600; }

/* calendar leaf */
.leaf {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 56px; border-radius: 12px; flex: none;
  background: var(--surface-3); border: 1px solid var(--line-2); font-family: var(--display); overflow: hidden; line-height: 1;
}
.leaf b { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.leaf span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--pink); font-weight: 600; margin-top: 3px; }
.leaf.past { opacity: .7; } .leaf.past span { color: var(--dim); }
.leaf.sm { width: 42px; height: 46px; } .leaf.sm b { font-size: 18px; } .leaf.sm span { font-size: 9.5px; }

/* raid cards */
.grid.raids { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.raid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.raid .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.raid .top b { font-size: 16px; font-family: var(--display); letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.raid .line { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.raid .line .in { color: var(--gold); font-weight: 500; }
.bar { height: 6px; background: rgba(255, 255, 255, .07); border-radius: 6px; overflow: hidden; margin: 10px 0 0; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--parse); width: var(--w, 0%); transform-origin: left; }
.ring { width: 54px; height: 54px; flex: none; }
.ring circle { fill: none; stroke-width: 4.5; }
.ring .track { stroke: rgba(255, 255, 255, .08); }
.ring .fill { stroke: url(#parse); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dasharray .8s var(--ease); }
.ring text { font: 600 12px var(--display); fill: var(--text); dominant-baseline: central; text-anchor: middle; }
.minibar { display: inline-block; width: 64px; height: 5px; background: rgba(255, 255, 255, .08); border-radius: 5px; overflow: hidden; vertical-align: middle; margin-left: 8px; }
.minibar i { display: block; height: 100%; background: var(--parse); width: var(--w, 0%); transform-origin: left; }

/* two-column dashboard area */
.dash { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 14px 24px; align-items: start; }
.dash > section { min-width: 0; }
.dash h2:first-child { margin-top: 0; }
@media (max-width: 980px) { .dash { grid-template-columns: 1fr; } .dash h2:first-child { margin-top: 36px; } .dash > section:first-child h2:first-child { margin-top: 0; } }

/* recruitment needs */
.needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.needs li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.needs li:last-child { border-bottom: none; }
.needs .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--pink)); box-shadow: 0 0 10px color-mix(in srgb, var(--c, var(--pink)) 60%, transparent); }
.needs .n { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--c, var(--pink)); font-variant-numeric: tabular-nums; }
.needs .blocks { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.needs .blocks i { width: 7px; height: 14px; border-radius: 2px; background: var(--c, var(--pink)); opacity: .85; }
.needs .label { font-weight: 500; }
.needs-foot { margin: 12px 0 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.needs-full { display: flex; align-items: center; gap: 12px; padding: 8px 0 4px; }
.needs-full .ic { width: 26px; height: 26px; color: var(--ok); }

/* pills, tags */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
.pill .ic { width: 12px; height: 12px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.pill.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.miss { background: transparent; color: var(--dim); border: 1px dashed var(--line-3); }
.pill.extra { background: rgba(163, 53, 238, .12); color: #cfaaf3; border-color: rgba(163, 53, 238, .3); }
.pill.ok.buff::before, .pill.miss::before { content: ""; width: 11px; height: 11px; background: currentColor; flex: none; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.pill.ok.buff::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.pill.miss::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }
.role { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--rc, var(--dim)) 16%, transparent); color: var(--rc, var(--muted)); text-transform: capitalize; letter-spacing: .01em; white-space: nowrap; }
.role-tank { --rc: var(--r-tank); } .role-healer { --rc: var(--r-healer); } .role-melee { --rc: var(--r-melee); } .role-ranged { --rc: var(--r-ranged); } .role-caster { --rc: var(--r-caster); }
.role-tank { color: #8fbcf5; } .role-healer { color: #86e3a6; } .role-melee { color: #f5cd6e; } .role-ranged { color: #cce9a3; } .role-caster { color: #d0b0f8; }
.char { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin: 2px 10px 2px 0; }
.char .star { width: 13px; height: 13px; color: var(--gold); fill: var(--gold); stroke: none; }
img.icon { width: 22px; height: 22px; border-radius: 6px; vertical-align: -6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .06); background: var(--surface-3); }
.avatar { width: 34px; height: 34px; border-radius: 50%; }

/* ── tables ─────────────────────────────────────────────── */
.scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; background: rgba(255, 255, 255, .02); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, .025); }
td .leaf { margin: -4px 0; }
td.actions-cell { white-space: nowrap; text-align: right; }
td.actions-cell .btn { margin-left: 4px; }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 18px; flex-wrap: wrap; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, .04); }
.tabs a.on { color: var(--text); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 rgba(255, 255, 255, .04) inset; }
.tabs a .n { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); min-width: 20px; text-align: center; line-height: 18px; font-variant-numeric: tabular-nums; }
.tabs a.on .n { background: var(--pink); color: #fff; }

/* empty states and notices */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 38px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); background: rgba(255, 255, 255, .012); }
.empty .ic { width: 34px; height: 34px; color: var(--dim); margin-bottom: 6px; stroke-width: 1.5; }
.empty b { color: var(--text); font-family: var(--display); font-size: 15px; }
.empty p { margin: 0; font-size: 13.5px; max-width: 46ch; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; margin-bottom: 18px; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); font-weight: 500; }
.notice .ic { width: 18px; height: 18px; margin-top: 2px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.hint { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.hint .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--dim); }

/* ── login ──────────────────────────────────────────────── */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; width: min(100%, 940px); border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.login-brand { position: relative; padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; min-height: 420px; overflow: hidden;
  background: radial-gradient(500px 320px at 20% 10%, rgba(163, 53, 238, .35), transparent 65%), radial-gradient(400px 300px at 90% 90%, rgba(229, 204, 128, .12), transparent 60%), var(--bg-2); }
.login-brand::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px); background-size: 20px 20px; mask-image: radial-gradient(60% 60% at 50% 40%, rgba(0, 0, 0, .8), transparent); opacity: .6; }
.login-brand > * { position: relative; }
.login-brand h1 { font-size: 34px; margin: 0; color: var(--dim); font-weight: 600; }
.login-brand h1 b { background: var(--parse); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.login-brand p { margin: 0; color: var(--muted); max-width: 40ch; font-size: 15px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin-bottom: auto; }
.bars i { width: 20px; border-radius: 6px 6px 3px 3px; display: block; transform-origin: bottom; }
.bars i:nth-child(1) { height: 36%; background: var(--purple); } .bars i:nth-child(2) { height: 54%; background: var(--orange); }
.bars i:nth-child(3) { height: 74%; background: var(--pink); } .bars i:nth-child(4) { height: 100%; background: var(--gold); }
.feat { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feat li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-size: 13px; color: var(--muted); }
.feat li .ic { width: 15px; height: 15px; color: var(--pink); }
.login-card { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }
.login-card img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 8px; box-shadow: 0 10px 30px -10px rgba(226, 104, 168, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.login-card h2 { margin: 0; font: 700 24px/1.2 var(--display); text-transform: none; letter-spacing: -.02em; color: var(--text); }
.login-card h2::after { display: none; }
.login-card .sub { margin: 0 0 10px; }
.login-card .btn { padding: 12px 18px; font-size: 15px; border-radius: 12px; width: 100%; }
.login-card .btn.primary { background: linear-gradient(180deg, #6873ff, #5865f2); box-shadow: 0 8px 22px -10px rgba(88, 101, 242, .9), inset 0 1px 0 rgba(255, 255, 255, .16); }
.login-card .btn.primary::before { content: ""; width: 20px; height: 20px; background: #fff; -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z'/%3E%3C/svg%3E"); mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z'/%3E%3C/svg%3E"); }
.login-card .fine { color: var(--dim); font-size: 12.5px; margin: 6px 0 0; line-height: 1.5; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 0; padding: 30px 26px 26px; }
  .bars { height: 64px; margin-bottom: 10px; } .bars i { width: 14px; }
  .login-brand h1 { font-size: 28px; }
  .login-card { padding: 28px 26px 30px; }
}

/* ── raid group editor ──────────────────────────────────── */
.toolbar {
  position: sticky; top: 12px; z-index: 10; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; padding: 10px 12px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(20, 18, 28, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.toolbar .sep { flex: 1; min-width: 4px; }
#status { color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; min-height: 20px; }
#status:empty { display: none; }
#status[data-kind="ok"] { color: var(--ok); } #status[data-kind="bad"] { color: var(--bad); } #status[data-kind="warn"] { color: var(--warn); }
#status .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--pink); animation: spin .8s linear infinite; }
#summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; color: var(--muted); font-size: 13px; min-height: 26px; }
#summary .pill { font-size: 12px; }
#summary .pill.main { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
#summary .pill.main b { font-family: var(--display); }
#summary .r { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 12%, transparent); color: var(--rc); font-weight: 500; font-size: 12px; }
#summary .r::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 12px; }
.group, #bench {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), var(--surface); transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.group.over, #bench.over { border-color: var(--pink); background: rgba(226, 104, 168, .07); box-shadow: var(--glow); }
.group.full { border-color: rgba(229, 204, 128, .25); }
body.picking .group:not(.over), body.picking #bench:not(.over) { border-style: dashed; border-color: var(--line-3); cursor: pointer; }
body.picking .group:hover, body.picking #bench:hover { border-color: var(--pink); background: rgba(226, 104, 168, .05); }
.ghead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.ghead b { font-size: 14px; color: var(--text); font-family: var(--display); display: inline-flex; align-items: center; gap: 8px; }
.ghead .gn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--muted); }
.ghead .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ghead .kind .fill { font-variant-numeric: tabular-nums; color: var(--muted); }
.ghead .kind.melee::before, .ghead .kind.caster::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.ghead .kind.melee::before { background: var(--r-melee); } .ghead .kind.caster::before { background: var(--r-caster); }
.chip {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px 7px 8px; border-radius: 11px; background: var(--surface-2); margin-bottom: 6px; border: 1px solid var(--line);
  cursor: grab; user-select: none; -webkit-user-select: none; box-shadow: inset 3px 0 0 var(--rc, var(--line-2)); transition: background .12s, transform .12s, box-shadow .12s, border-color .12s, opacity .12s;
  touch-action: manipulation;
}
.chip:hover { background: var(--hover); border-color: var(--line-2); }
.chip:active { cursor: grabbing; }
.chip img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); flex: none; background: var(--surface-3); }
.chip .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.chip .sub { display: block; font-size: 11px; color: var(--dim); font-weight: 400; margin-top: -1px; overflow: hidden; text-overflow: ellipsis; }
.chip.sel { border-color: var(--pink); box-shadow: inset 3px 0 0 var(--rc, var(--line-2)), 0 0 0 2px rgba(226, 104, 168, .35); background: rgba(226, 104, 168, .08); }
.chip.dragging { opacity: .35; transform: scale(.98); }
.chip .tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); padding: 1px 6px; border-radius: 5px; background: var(--warn-bg); }
.chip .tag.standby { color: var(--info); background: var(--info-bg); }
.chip .tag.note { color: var(--muted); background: var(--surface-3); }
.chip .pri { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.chip .pri.up { color: var(--info); background: var(--info-bg); } .chip .pri.down { color: var(--bad); background: var(--bad-bg); }
.r-tank { --rc: var(--r-tank); } .r-healer { --rc: var(--r-healer); } .r-melee { --rc: var(--r-melee); } .r-ranged { --rc: var(--r-ranged); } .r-caster { --rc: var(--r-caster); }
.slot { padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 11px; margin-bottom: 6px; color: var(--dim); font-size: 12.5px; min-height: 42px; display: flex; align-items: center; gap: 8px; transition: border-color .15s, color .15s; }
.slot::before { content: ""; width: 20px; height: 20px; border-radius: 6px; border: 1px dashed var(--line-2); flex: none; }
.group.over .slot { border-color: rgba(226, 104, 168, .5); color: var(--pink); }
.pills { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.pills:empty { display: none; }
#bench { margin-top: 16px; min-height: 90px; background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 40%), var(--bg-2); }
#bench .ghead { margin-bottom: 8px; }
.benchrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.benchrow .chip { margin-bottom: 0; }
.bench-empty { color: var(--dim); font-size: 13px; padding: 10px 4px 4px; display: flex; align-items: center; gap: 8px; }
.others { margin-top: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 13.5px; }
.others b { color: var(--text); font-weight: 600; margin-right: 4px; }

/* ── application detail ─────────────────────────────────── */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px 24px; align-items: start; }
.cols > div { min-width: 0; }
.applicant { display: flex; align-items: center; gap: 14px; }
.applicant img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; }
.facts div span { display: block; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 3px; }
.facts div { font-weight: 500; }
.fit { display: flex; gap: 10px; align-items: center; margin: 16px -20px -18px; padding: 12px 20px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); border-radius: 0 0 var(--radius) var(--radius); font-size: 14px; }
.fit .ic { color: var(--gold); width: 18px; height: 18px; }
.answer { white-space: pre-wrap; margin: 0; line-height: 1.65; font-size: 15px; }
.qa { position: relative; padding-left: 22px; }
.qa::before { content: ""; position: absolute; left: 20px; top: 20px; bottom: 20px; width: 3px; border-radius: 3px; background: var(--parse-4); opacity: .55; }
.qa .answer { padding-left: 12px; }
.profile { margin-bottom: 14px; }
.profile .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile .top img.icon { width: 30px; height: 30px; border-radius: 8px; }
.profile .top a { font-weight: 700; font-size: 16px; }
.profile .verdict { margin: 12px 0 8px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.notes { margin: 0 0 12px; padding: 0; list-style: none; color: var(--muted); display: grid; gap: 4px; }
.notes li { position: relative; padding-left: 16px; }
.notes li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); }
.notes li.warn { color: var(--warn); } .notes li.warn::before { background: var(--warn); }
.parse { display: inline-block; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-family: var(--display); font-size: 13px; line-height: 20px; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--dim); border-bottom: 1.8px solid var(--dim); transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .15s; }
details[open] summary::before { transform: rotate(45deg); }
table.bosses { margin-top: 10px; font-size: 14px; } table.bosses td, table.bosses th { padding: 7px 12px; }
.sticky { position: sticky; top: 24px; }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:nth-child(1) { width: 45%; height: 20px; } .skeleton i:nth-child(2) { width: 85%; } .skeleton i:nth-child(3) { width: 70%; } .skeleton i:nth-child(4) { width: 55%; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; } .sticky { position: static; } }

/* ── forms ──────────────────────────────────────────────── */
label.f { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(226, 104, 168, .18); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a4b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
input[type="date"], input[type="time"] { color-scheme: dark; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 18px; }
.form-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span { display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; padding: 10px 6px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; transition: border-color .15s, background .15s, color .15s, transform .08s; }
.choice span .ic { width: 16px; height: 16px; }
.choice span:hover { border-color: var(--line-3); }
.choice label:active span { transform: scale(.98); }
.choice input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
.choice input:checked + span.acc { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.choice input:checked + span.tri { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.choice input:checked + span.dec { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.choice.two { grid-template-columns: repeat(2, 1fr); }

/* ── recruitment ────────────────────────────────────────── */
.recruit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.rclass { padding: 14px 16px 8px; border-top: 3px solid var(--c); }
.rhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rhead .name { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--c); }
.rhead .name img { width: 26px; height: 26px; border-radius: 7px; }
select.mini { width: auto; padding: 5px 28px 5px 10px; font-size: 12.5px; border-radius: 8px; background-position: right 8px center; background-size: 14px; }
.rrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.rrow .spec { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; font-weight: 500; }
.rrow .spec img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.rrow .spec small { display: block; color: var(--dim); font-size: 11.5px; font-weight: 400; }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--bg-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; min-width: 38px; text-align: center; padding: 5px 7px; font-size: 12px; font-weight: 600; color: var(--dim); cursor: pointer; border-left: 1px solid var(--line); transition: background .15s, color .15s; }
.seg label:first-child span { border-left: none; }
.seg span:hover { color: var(--muted); }
.seg input:checked + span { color: var(--text); background: var(--surface-3); }
.seg input:checked + span.l-high { color: #f8b4d6; background: rgba(226, 104, 168, .22); }
.seg input:checked + span.l-medium { color: var(--warn); background: var(--warn-bg); }
.seg input:checked + span.l-low { color: var(--info); background: var(--info-bg); }
.seg input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: -2px; }
.lvl { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.lvl-high { color: #f8b4d6; background: rgba(226, 104, 168, .16); border-color: rgba(226, 104, 168, .4); }
.lvl-medium { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.lvl-low { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }

.copyrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.danger-zone { margin-top: 22px; padding: 14px 18px; border: 1px dashed var(--bad-line); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.danger-zone p { margin: 0; color: var(--muted); font-size: 13.5px; }
.sticky-foot { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(20, 18, 28, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
td select { min-width: 190px; padding: 7px 34px 7px 10px; font-size: 14px; }

/* ── roster ─────────────────────────────────────────────── */
.comp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr); gap: 14px; align-items: stretch; }
@media (max-width: 900px) { .comp { grid-template-columns: 1fr; } }
.stack { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 14px 0 12px; background: rgba(255, 255, 255, .05); }
.stack i { display: block; height: 100%; background: var(--c); flex: var(--n) 1 0; min-width: 2px; transform-origin: left; }
.stack i:first-child { border-radius: 8px 0 0 8px; } .stack i:last-child { border-radius: 0 8px 8px 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 10px 8px; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; min-width: 0; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); grid-row: span 2; align-self: center; }
.legend b { font-family: var(--display); font-size: 20px; letter-spacing: -.02em; line-height: 1; }
.legend span { color: var(--muted); font-size: 12px; text-transform: capitalize; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.legend span .ic { width: 12px; height: 12px; color: var(--c); }
.legend small { color: var(--dim); font-size: 11px; }
.classes { display: grid; grid-template-columns: auto 1fr auto; gap: 7px 10px; align-items: center; margin-top: 12px; font-size: 13.5px; }
.classes .cn { font-weight: 600; white-space: nowrap; }
.classes .cb { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.classes .cb i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 5px; transform-origin: left; opacity: .9; }
.classes .cc { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 2ch; text-align: right; }
.att { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.att .minibar { margin-left: 0; width: 56px; }
.att .minibar i { background: var(--c, var(--ok)); }

/* ── the picture picker: a raid's banner and icon ───────── */
.pick-row { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 12px; align-items: start; }
.pics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.pic { position: relative; flex: none; }
.pic label { position: relative; display: block; cursor: pointer; border-radius: 10px; border: 2px solid var(--line-2); background: var(--bg-2); overflow: hidden; line-height: 0; transition: border-color .15s, box-shadow .15s; }
.pic label:hover { border-color: var(--line-3); }
.pic input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.pic img { display: block; width: 44px; height: 44px; object-fit: cover; font-size: 9px; line-height: 1.2; color: var(--dim); overflow: hidden; }
.picker[data-picker="banner"] .pic img { width: 132px; }
.pic.gone img { visibility: hidden; }
.pic.gone label::before { content: "does not open"; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 10.5px; line-height: 1.2; color: var(--dim); padding: 2px; }
.pic.word label { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; line-height: 1.25; font-size: 13px; font-weight: 500; color: var(--muted); border-style: dashed; }
.pic.word img { border-radius: 6px; height: 32px; width: 32px; }
.pic.word small { display: block; font-size: 11px; font-weight: 400; color: var(--dim); }
.picker[data-picker="banner"] .pic.word img { width: 96px; }
.pic label:has(input:checked) { border-color: var(--pink); border-style: solid; color: var(--text); box-shadow: 0 0 0 3px rgba(226, 104, 168, .2); }
.pic:not(.word) label:has(input:checked)::after {
  content: ""; position: absolute; left: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--pink) center / 11px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 2px rgba(10, 9, 16, .7);
}
.pic label:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
.pic-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--line-3); background: var(--surface-3); color: var(--muted); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s, color .12s, border-color .12s; }
.pic-del .ic { width: 11px; height: 11px; stroke-width: 2.6; }
.pic:hover .pic-del, .pic-del:focus-visible { opacity: 1; }
.pic-del:hover { color: var(--bad); border-color: var(--bad-line); }
.dropzone { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1.5px dashed var(--line-3); border-radius: 12px; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1.35; background: rgba(255, 255, 255, .02); transition: border-color .15s, background .15s, box-shadow .15s, color .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--pink); color: var(--text); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; border: 0; }
.dropzone .ic { width: 22px; height: 22px; color: var(--pink); }
.dropzone b { display: block; color: var(--text); font-weight: 600; }
.dropzone small { display: block; font-size: 11.5px; color: var(--dim); }
.dz-phone { display: none; }
body.dropping .dropzone { border-color: var(--pink); background: rgba(226, 104, 168, .06); }
.picker.over .dropzone { border-style: solid; box-shadow: var(--glow); color: var(--text); }
.picker.busy .dropzone { opacity: .55; pointer-events: none; }
.pick-said { white-space: pre-line; }
.pick-said.ok { color: var(--ok); }
.pick-said.bad { color: var(--bad); }
.pick-link { display: flex; gap: 8px; margin-top: 8px; max-width: 560px; }
.pick-link input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
@media (max-width: 640px), (hover: none) {
  /* no dragging on a phone: the box is a button */
  .pick-row { grid-template-columns: 1fr; }
  .dropzone { justify-content: center; min-height: 44px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); }
  .dz-wide { display: none; }
  .dz-phone { display: inline; }
  .pics { gap: 12px; }
  .pic-del { opacity: 1; top: -8px; right: -8px; width: 22px; height: 22px; }   /* nothing hovers on a phone: always there */
}

/* ── raid setup, and what a raid still needs ────────────── */
[hidden] { display: none !important; }
.help { margin: 6px 0 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.help.bad { color: var(--bad); }
h3.formhead { font-family: var(--font); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
.formgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sizeblock { border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 2px 16px 16px; margin: 12px 0; background: rgba(255, 255, 255, .02); }
.sizehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; min-height: 30px; }
.sizehead b { font-family: var(--display); font-size: 16px; }
.dpsline { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.dpsline b { color: var(--text); }
.needlist { display: grid; gap: 8px; margin-bottom: 10px; }
.needlist:empty { display: none; }
.needrow { display: grid; grid-template-columns: 62px auto minmax(0, 1.5fr) minmax(0, 1fr) 156px 34px 34px; gap: 6px; align-items: center; }
.needrow .x { color: var(--dim); }
.needrow input, .needrow select { padding: 8px 10px; font-size: 14px; }
.needrow select { padding-right: 32px; text-overflow: ellipsis; }
.needcols { color: var(--dim); font-size: 12px; margin-bottom: 6px; }
.needcols:has(+ .needlist:empty) { display: none; }
.phone-only { display: none; }
.postlook { --c: var(--pink); margin-top: 14px; max-width: 440px; border-radius: 6px; background: #2b2d31; border-left: 4px solid var(--c); padding: 12px 14px; display: grid; gap: 10px; }
.postlook .pl-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.postlook .pl-top > div { display: grid; gap: 2px; min-width: 0; }
.postlook .pl-eyebrow { font-size: 12px; color: #dbdee1; font-weight: 600; }
.postlook b { font-size: 16px; color: #fff; overflow-wrap: anywhere; }
.postlook [data-icon] { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex: none; }
.postlook [data-banner] { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; display: block; }
.rname { display: inline-flex; align-items: center; gap: 9px; color: inherit; margin-right: 8px; min-width: 0; }
.rname b, .hero h1 { overflow-wrap: anywhere; }  /* a long name without a space wraps, it does not push the page wide */
.hero > div { min-width: 0; }
.swatch { width: 22px; height: 22px; border-radius: 6px; background: var(--c); flex: none; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.bannerthumb { width: 120px; height: 40px; object-fit: cover; border-radius: 6px; display: block; background: var(--surface-3); }
.needline { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--warn); line-height: 1.5; }
.needline .ic { width: 14px; height: 14px; margin-right: 6px; vertical-align: -.2em; }
.needline.ok { color: var(--ok); font-weight: 400; }
td .needline { min-width: 180px; }  /* in a narrow table column on a phone: two lines, not four */
/* the need line is a link to that raid's numbers: it says so with a small "Change" in the links' own colour. The line
   is running text, so in a narrow card it wraps like a sentence and "Change" stays in one piece. */
a.needline:hover { text-decoration: none; }
.needline .chg { display: inline-block; margin-left: 10px; color: #b9c3ff; font-weight: 500; white-space: nowrap; }
.needline .chg .ic { width: 12px; height: 12px; margin-right: 4px; }
a.needline:hover .chg { text-decoration: underline; text-underline-offset: 3px; }
/* a card that opens its raid as a whole (the title's link stretched over it), with a link of its own on top */
.card.linked { transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.card.linked:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.stretch { color: inherit; min-width: 0; }
.stretch:hover { text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card.linked .needline { position: relative; z-index: 1; width: fit-content; max-width: 100%; }
.needbox { margin-bottom: 14px; border-color: var(--warn-line); scroll-margin-top: 76px; }
.needbox.done { border-color: var(--ok-line); }
.needtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.needtop .needhead { margin: 0; flex: 1 1 320px; min-width: 0; }
.needchange { flex: none; border-color: var(--warn-line); background: var(--warn-bg); color: var(--text); font-weight: 600; }
.needchange:hover { border-color: var(--warn); background: rgba(224, 165, 38, .22); }
.needbox.done .needchange { border-color: var(--line-2); background: var(--surface-2); }
.needchange[aria-expanded="true"] { background: var(--surface-3); border-color: var(--line-3); }
.needsource { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.needsource > .ic { width: 16px; height: 16px; color: var(--dim); }
.needsource > span { flex: 1 1 280px; min-width: 0; }
.needsource b { color: var(--text); }
.needsource.own > .ic { color: var(--warn); }
.needsource form { margin: 0; flex: none; }
.needsedit { margin-top: 12px; }
.needsedit .notice { margin: 0 0 4px; }
.needsedit h3.formhead { margin-top: 0; }
.sizeblock.oneraid { border: none; padding: 0; margin: 4px 0 0; background: none; }
.sizeblock:target { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(226, 104, 168, .18); scroll-margin-top: 76px; }
label.tick { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; font-size: 13.5px; color: var(--muted); cursor: pointer; line-height: 1.5; }
label.tick input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; padding: 0; accent-color: var(--pink); cursor: pointer; }
label.tick b { color: var(--text); }
.needhead { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.needhead b { font-family: var(--display); font-size: 16px; color: var(--warn); }
.needbox.done .needhead b { color: var(--ok); }
.needhead .also { color: var(--muted); }
.needpills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.needpills .pill { font-size: 12.5px; padding: 3px 10px; }
.needpills .pill b { font-variant-numeric: tabular-nums; font-weight: 600; }
.needpills a.pill { cursor: pointer; transition: filter .15s, border-color .15s; }  /* a press on a number opens the raid's numbers */
.needpills a.pill:hover { text-decoration: none; filter: brightness(1.2); }
.needpills a.pill.miss:hover { border-color: var(--muted); color: var(--muted); }
@media (max-width: 640px) {
  .formgrid.three { grid-template-columns: 1fr; }
  .sizeblock { padding: 2px 12px 14px; }
  .needchange { width: 100%; }
  .needsource form, .needsource form .btn { width: 100%; }
  /* one raid's numbers on a phone: players, tanks and healers side by side, so all three are read at one glance */
  .sizeblock.oneraid .formgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
  .sizeblock.oneraid .formgrid.three .help { display: none; }
  /* a need on a phone: how many and what on one line, its short name on the next, then Auto-build's choice and the two buttons */
  .needrow { grid-template-columns: 56px auto minmax(0, 1fr) 34px 34px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .needrow:last-child { border-bottom: none; padding-bottom: 0; }
  .needrow select { grid-column: 3 / -1; }
  .needrow .lbl { grid-column: 1 / -1; }
  .needrow select.auto { grid-column: 1 / 4; }
  .needcols { display: none; }
  .phone-only { display: block; }
}

/* ── motion ─────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes bar-rise { from { transform: scaleY(.15); } }
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .45s var(--ease) both; }
  main > *:nth-child(2) { animation-delay: .04s; } main > *:nth-child(3) { animation-delay: .08s; } main > *:nth-child(4) { animation-delay: .12s; }
  main > *:nth-child(5) { animation-delay: .16s; } main > *:nth-child(n+6) { animation-delay: .2s; }
  .bar i, .minibar i, .stack i, .classes .cb i { animation: grow .9s var(--ease) both; }
  .bars i { animation: bar-rise 1.1s var(--ease) both; }
  .bars i:nth-child(2) { animation-delay: .08s; } .bars i:nth-child(3) { animation-delay: .16s; } .bars i:nth-child(4) { animation-delay: .24s; }
  .login { animation: rise .5s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── small screens ──────────────────────────────────────── */
@media (max-width: 640px) {
  th.opt, td.opt { display: none; }
  th, td { padding: 10px 12px; }
  .hero { margin-bottom: 20px; }
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 14px 14px 16px; gap: 0 8px; }
  .stat b { font-size: 28px; } .stat span { font-size: 12.5px; line-height: 1.3; }
  .stat .stat-ic { width: 34px; height: 34px; border-radius: 10px; } .stat .stat-ic .ic { width: 17px; height: 17px; }
  .next { min-width: 100%; }
  .raid { grid-template-columns: auto minmax(0, 1fr); }
  .raid .ring { display: none; }
  .choice { grid-template-columns: 1fr 1fr 1fr; }
  .choice span { font-size: 13px; padding: 9px 4px; }
  .toolbar { top: 62px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fit { margin: 16px -16px -16px; padding: 12px 16px; }
  .card { padding: 16px; }
  .qa::before { left: 16px; }
}
@media (max-width: 380px) {
  .choice { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .tabbar .link span { font-size: 10px; }
}
@media print { .side, header.top, .tabbar, .toolbar, .btn { display: none !important; } .side ~ main { margin: 0; } }
