:root {
  --bg: #121014; --panel: #1c1920; --panel-2: #25212a; --line: #36303d;
  --text: #ece6dc; --muted: #9a92a3; --accent: #c8102e; --accent-2: #e8b04a;
  --ok: #4caf7a; --warn: #e8b04a; --bad: #d9534f;
  --tank: #6aa5ff; --healer: #5fd38d; --melee: #ff8f5a; --ranged: #c38bff;
  --epic: #a335ee; --legendary: #ff8000; --rare: #0070dd; --uncommon: #1eff00;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
.topbar { background: #0b0a0d; border-bottom: 2px solid var(--accent); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: .04em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); } .nav a.on, .nav a:hover { color: var(--text); text-decoration: none; }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.me img { width: 28px; height: 28px; border-radius: 50%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.btn, button { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover, button:hover { border-color: var(--accent-2); text-decoration: none; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger, button.danger { color: var(--bad); }
.btn.sm, button.sm { padding: 3px 8px; font-size: .85rem; }
.discord { background: #5865f2; border-color: #5865f2; color: #fff; font-size: 1.05rem; padding: 10px 18px; }
input, select, textarea { background: #0f0d12; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; max-width: 100%; }
form p { margin: 0 0 12px; } form label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 3px; }
.helptext { display: block; color: var(--muted); font-size: .8rem; }
.errorlist { color: var(--bad); margin: 0; padding-left: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.icon { width: 22px; height: 22px; border-radius: 4px; vertical-align: middle; border: 1px solid #000; background: #000; }
.icon.lg { width: 36px; height: 36px; }
.toon { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: .75rem; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.confirmed, .badge.done, .badge.imported, .badge.yes { color: var(--ok); border-color: var(--ok); }
.badge.late, .badge.tentative, .badge.queued, .badge.running { color: var(--warn); border-color: var(--warn); }
.badge.absent, .badge.failed, .badge.no { color: var(--bad); border-color: var(--bad); }
.badge.bench { color: var(--muted); }
.role-col { border-top: 3px solid var(--line); }
.role-col.tank { border-top-color: var(--tank); } .role-col.healer { border-top-color: var(--healer); }
.role-col.melee { border-top-color: var(--melee); } .role-col.ranged { border-top-color: var(--ranged); }
.role-col h2 { display: flex; align-items: center; gap: 8px; }
.signup { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.signup:last-child { border-bottom: 0; }
.signup .srs { margin-left: auto; display: flex; gap: 3px; }
.q-epic { color: var(--epic); } .q-legendary { color: var(--legendary); } .q-rare { color: var(--rare); } .q-uncommon { color: var(--uncommon); }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 6px; margin-bottom: 6px; background: var(--panel-2); border-left: 4px solid var(--accent-2); }
.messages .error { border-left-color: var(--bad); } .messages .success { border-left-color: var(--ok); }
.raid-card { display: block; color: var(--text); }
.raid-card:hover { text-decoration: none; border-color: var(--accent-2); }
.raid-card .when { font-size: 1.05rem; font-weight: 600; }
.stat { font-size: 1.6rem; font-weight: 700; }
.boss { margin-bottom: 14px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
.item-pick { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 4px; cursor: pointer; color: var(--text); margin: 0; font-size: .9rem; }
.item-pick:hover { background: var(--panel-2); }
.item-pick .n { color: var(--muted); font-size: .75rem; margin-left: auto; }
.export { width: 100%; min-height: 140px; font-family: ui-monospace, monospace; font-size: .8rem; }
.comps { display: grid; gap: 16px; grid-template-columns: 260px 1fr; align-items: start; }
@media (max-width: 800px) { .comps { grid-template-columns: 1fr; } }
.comp-groups { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.group { background: var(--panel-2); border-radius: 6px; padding: 8px; min-height: 60px; }
.group h4 { margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.drop { min-height: 40px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 4px 6px; margin-bottom: 4px; background: #0f0d12; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 4px; font-size: .88rem; }
.manager .chip { cursor: grab; }
.chip.tank { border-left-color: var(--tank); } .chip.healer { border-left-color: var(--healer); }
.chip.melee { border-left-color: var(--melee); } .chip.ranged { border-left-color: var(--ranged); }
.sortable-ghost { opacity: .35; }
.role-tally { display: flex; gap: 10px; font-size: .85rem; }
.sr-picker summary { list-style: none; }
.sr-picker summary::-webkit-details-marker { display: none; }
.sr-picker[open] summary { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.field legend { color: var(--muted); font-size: .85rem; margin-bottom: 6px; padding: 0; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 16px; color: var(--muted); }
.segmented label + label span { border-left: 1px solid var(--line); }
.segmented input:checked + span { background: var(--accent); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.class-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.class-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 8px 4px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--muted); font-size: .8rem; background: #0f0d12; }
.class-option[hidden] { display: none; }
.class-option input { position: absolute; opacity: 0; pointer-events: none; }
.class-option img { width: 40px; height: 40px; border-radius: 6px; border: 1px solid #000; filter: grayscale(.6) brightness(.8); transition: filter .1s; }
.class-option:hover img { filter: none; }
.class-option:has(input:checked) { border-color: var(--class-color); color: var(--class-color); background: var(--panel-2); }
.class-option:has(input:checked) img { filter: none; }
.class-option:has(input:focus-visible) { outline: 2px solid var(--accent-2); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; color: var(--text); font-size: .95rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { position: relative; width: 40px; height: 22px; border-radius: 99px; background: var(--line); transition: background .15s; flex: none; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.status-filter button.badge { cursor: pointer; font: inherit; font-size: .75rem; padding: 1px 9px; }
.status-filter button.badge:hover { filter: brightness(1.25); }
.status-filter button[aria-pressed="true"] { background: currentColor; }
.status-filter button[aria-pressed="true"] { color: var(--bg) !important; }
.status-filter button.confirmed[aria-pressed="true"] { background: var(--ok); }
.status-filter button.late[aria-pressed="true"], .status-filter button.tentative[aria-pressed="true"] { background: var(--warn); }
.status-filter button.absent[aria-pressed="true"] { background: var(--bad); }
.status-filter button.bench[aria-pressed="true"] { background: var(--muted); }
.signup[hidden] { display: none; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre, .markdown table { margin: 0 0 .7em; }
.markdown ul, .markdown ol { padding-left: 1.3em; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { font-size: 1rem; margin: .8em 0 .4em; color: var(--accent-2); text-transform: none; letter-spacing: 0; }
.markdown code { background: #0f0d12; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: .9em; }
.markdown pre { background: #0f0d12; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-x: auto; }
.markdown pre code { border: 0; padding: 0; }
.markdown blockquote { border-left: 3px solid var(--accent); padding-left: 10px; color: var(--muted); }
.markdown hr { border: 0; border-top: 1px solid var(--line); }
.item-pick .item-link { color: inherit; }
.item-pick .item-link.q-epic { color: var(--epic); } .item-pick .item-link.q-legendary { color: var(--legendary); } .item-pick .item-link.q-rare { color: var(--rare); }
.item-pick .item-link:hover { text-decoration: none; }
dialog.modal { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
dialog.modal::backdrop { background: rgba(5, 4, 8, .7); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.1rem; padding: 4px 8px; }
.toon-picker, .spec-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick-card, .spec-option { position: relative; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; margin: 0; padding: 8px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: #0f0d12; color: var(--text); }
.pick-card[hidden], .spec-option[hidden] { display: none; }
.pick-card input, .spec-option input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card > img, .spec-option > img { grid-row: span 2; width: 36px; height: 36px; border-radius: 6px; border: 1px solid #000; }
.pick-name { font-weight: 600; color: var(--class-color, var(--text)); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-sub { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.pick-sub .icon { width: 14px; height: 14px; }
.pick-card:hover, .spec-option:hover { border-color: var(--muted); }
.pick-card:has(input:checked), .spec-option:has(input:checked) { border-color: var(--class-color, var(--accent-2)); background: var(--panel-2); }
.pick-card:has(input:focus-visible), .spec-option:has(input:focus-visible) { outline: 2px solid var(--accent-2); }
.new-card .plus { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border: 1px dashed var(--muted); border-radius: 6px; color: var(--muted); font-size: 1.3rem; }
.new-card:has(input:checked) { border-color: var(--accent-2); }
.new-toon { border-left: 3px solid var(--accent-2); padding-left: 12px; margin-bottom: 14px; }
.segmented { flex-wrap: wrap; }
.item-pick { cursor: default; }
.item-pick .item-link { cursor: pointer; }
.item-pick.picked { background: var(--panel-2); outline: 1px solid var(--accent-2); }
.stepper { display: inline-flex; align-items: center; margin-left: 4px; flex: none; }
.stepper .step { padding: 0 7px; line-height: 20px; border-radius: 4px; font-size: .9rem; }
.stepper .step:disabled { opacity: .3; cursor: default; }
.stepper input { width: 34px; padding: 1px 2px; text-align: center; margin: 0 3px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.item-pick:not(.picked) .stepper input { color: var(--muted); }
.sr-icon { position: relative; display: inline-block; }
.sr-x { position: absolute; right: -4px; bottom: -4px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700; line-height: 1; padding: 2px 3px; border-radius: 4px; }
.signup-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; }
.signup-head .toon { gap: 8px; }
.signup-head .toon .icon { width: 28px; height: 28px; }
.signup-meta { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.signup-meta .icon { width: 18px; height: 18px; }
.signup-head .badge { font-size: .75rem; font-weight: 500; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on, .tabs a:hover { color: var(--text); border-bottom-color: var(--accent); text-decoration: none; }
.person { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 6px; color: var(--text); }
.person:hover { background: var(--panel-2); text-decoration: none; }
.person .badge { margin-left: 4px; }
.person-toons { display: block; font-size: .85rem; margin-top: 2px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.avatar.lg { width: 64px; height: 64px; }
.contest .bar-col { width: 34%; min-width: 160px; }
.bar-wrap { display: flex; align-items: center; gap: 8px; }
.bar { display: block; height: 12px; min-width: 2px; background: var(--accent-2); border-radius: 0 4px 4px 0; }
.bar-value { color: var(--text); font-variant-numeric: tabular-nums; font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { display: block; }
.brand:hover { text-decoration: none; }
.segmented a { text-decoration: none; }
.segmented a span { display: block; padding: 8px 16px; color: var(--muted); }
.segmented a + a span { border-left: 1px solid var(--line); }
.segmented a span.on { background: var(--accent); color: #fff; }
.btn.current { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pagination [aria-disabled="true"] { opacity: .4; cursor: default; }
/* A toon (icon + name) followed by extra text/badges in a table cell, all on one centred line. */
.toon-line { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.raid-art { flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.raid-card.has-art { display: flex; gap: 14px; align-items: center; }
.raid-card.has-art > div { flex: 1; min-width: 0; }
.raid-art { border-radius: 12px; border: 2px solid #8a5a1a; object-fit: cover; }
.raid-hero { height: 200px; margin: -4px 0 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background-size: cover; background-position: center 40%; position: relative; overflow: hidden; }
.raid-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgba(18, 16, 20, .75)); }
@media (max-width: 600px) { .raid-hero { height: 120px; } }
.brand img { border-radius: 7px; }
.login-logo { display: block; margin: 0 auto 10px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.player { color: var(--muted); font-weight: 400; font-size: .9em; margin-left: 4px; }
.signed-as { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 3px; font-size: .85rem; font-weight: 600; background: var(--panel-2); }
.signed-as .icon { width: 20px; height: 20px; border-radius: 50%; }
