:root {
  color-scheme: dark;
  --bg: #0b1018;
  --surface: #111925;
  --surface-raised: #172231;
  --surface-soft: #1d2a3b;
  --line: #2a394b;
  --text: #f0f4f8;
  --mute: #97a8ba;
  --acc: #e4b44c;
  --acc-bright: #f1c96e;
  --brain: #62c7e7;
  --bad: #fa7c70;
  --good: #70d4a0;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .16);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% -280px, #1c3042 0, var(--bg) 680px); color: var(--text); font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
nav { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
button, .btn { appearance: none; color: var(--text); background: #172231; border: 1px solid #2a394b; border-radius: 9px; padding: 8px 13px; cursor: pointer; font: inherit; font-weight: 550; transition: background .15s, border-color .15s, color .15s, transform .15s; }
button:hover, .btn:hover { border-color: #65788c; background: #202e40; }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .btn:focus-within { outline: 2px solid var(--brain); outline-offset: 2px; }
.page-tabs button { border-color: transparent; background: transparent; color: #a9b7c6; padding: 9px 13px; white-space: nowrap; }
.page-tabs button:hover { border-color: transparent; background: rgba(255, 255, 255, .06); color: var(--text); }
.page-tabs button.on { color: var(--acc-bright); border-color: rgba(228, 180, 76, .24); background: rgba(228, 180, 76, .1); }
button.on { background: rgba(228, 180, 76, .16); border-color: rgba(228, 180, 76, .65); color: var(--acc-bright); }
button.primary { color: #1b160b; border-color: var(--acc); background: linear-gradient(135deg, var(--acc-bright), var(--acc)); font-weight: 750; box-shadow: 0 5px 18px rgba(228, 180, 76, .15); }
button.primary:hover { background: #f4cb70; border-color: #f4cb70; }
button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
button.x { padding: 3px 9px; }
main { width: min(100%, 1320px); margin: auto; padding: 28px 28px 64px; }
.card { background: linear-gradient(145deg, rgba(23, 34, 49, .98), rgba(17, 25, 37, .98)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
h1, h2, h3, h4 { line-height: 1.25; }
h2 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.01em; }
h2 small { color: var(--mute); font-weight: 400; }
h3 { margin: 14px 0 7px; font-size: 14px; }
.page-masthead { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin: 2px 0 22px; padding: 0 2px 17px; border-bottom: 1px solid rgba(151, 168, 186, .17); }
.page-heading-copy { min-width: 0; }
.page-heading-copy .eyebrow { display: block; color: var(--acc); font-size: 11px; font-weight: 800; letter-spacing: .16em; margin: 0 0 5px; }
.page-heading-copy h1 { margin: 0; font-size: clamp(24px, 3vw, 31px); letter-spacing: -.035em; line-height: 1.25; }
.page-heading-copy p { color: var(--mute); margin: 5px 0 0; }
.page-tabs { flex: 0 0 auto; padding: 4px; border: 1px solid rgba(151,168,186,.14); border-radius: 12px; background: rgba(11,16,24,.32); }
.picker-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.picker-title > b { font-size: 13px; }
.manual-choice { margin: 12px 0; padding: 12px; border: 1px solid rgba(151, 168, 186, .16); border-radius: 11px; background: rgba(11, 16, 24, .25); }
.manual-choice > b { font-size: 13px; }
.manual-choice .row { margin: 8px 0 3px; }
.step-progress { margin-left: auto; border: 1px solid var(--line); background: rgba(11, 16, 24, .35); color: var(--mute); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-variant-numeric: tabular-nums; }
.phase-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 250px; margin: 0; padding: 5px 9px 7px; border: 1px solid var(--line); border-radius: 9px; }
.phase-picker legend { padding: 0 4px; color: #bdc9d5; font-size: 11px; font-weight: 650; }
.phase-picker label { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 11px; white-space: nowrap; cursor: pointer; }
.row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.lbl { display: inline-flex; gap: 8px; align-items: center; color: #bdc9d5; font-size: 12px; font-weight: 600; }
input, select { min-height: 38px; color: var(--text); background: #0c131d; border: 1px solid #344457; border-radius: 8px; padding: 7px 10px; font: inherit; }
input::placeholder { color: #74869a; }
input[type="checkbox"] { min-height: auto; accent-color: var(--acc); }
input[type="range"] { min-height: auto; padding: 0; accent-color: var(--acc); }
input.wide { flex: 1; min-width: 260px; }
input.dup { border-color: var(--bad); background: #321c1d; }
.hint { color: var(--mute); font-size: 12px; margin: 4px 0; }
.warn { color: var(--bad); font-size: 12px; margin: 6px 0; }
.note { color: var(--acc); font-size: 12px; margin: 8px 0 0; }
.skip { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; color: var(--mute); padding: 1px 2px; }
.skip b { color: var(--text); }
.skip-reason { padding-left: 8px; border-left: 1px solid var(--line); color: #8fa0b2; font-size: 12px; }
.chip { border-radius: 999px; padding: 7px 13px; }
.chip.x { background: rgba(250, 124, 112, .12); border-color: rgba(250, 124, 112, .4); color: #ffaaa2; }
.exclude-row { border-top: 1px solid rgba(151, 168, 186, .12); margin-top: 15px; padding-top: 13px; }
.exclude-row summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.exclude-row summary::-webkit-details-marker { display: none; }
.exclude-row summary::before { content: "＋"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 6px; color: var(--mute); font-size: 12px; }
.exclude-row[open] summary::before { content: "−"; }
.exclude-row summary .hint { margin-left: auto; }
.exclude-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.fights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr)); gap: 15px; align-items: start; }
.fight { padding: 0 18px 17px; margin: 0; overflow: hidden; border-top: 2px solid var(--acc); }
.fight.brainiac { border-top-color: var(--brain); }
.fight > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -18px 12px; padding: 14px 18px 12px; border-bottom: 1px solid rgba(151, 168, 186, .13); background: rgba(255,255,255,.018); }
.fight h3 { margin: 0; font-size: 16px; }
.lock { display: inline-flex; gap: 6px; align-items: center; color: var(--mute); font-size: 11px; cursor: pointer; }
.lock:has(input:checked) { color: var(--acc-bright); }
.tag { display: flex; align-items: baseline; gap: 7px; color: #cbd5df; font-size: 12px; margin: 0 0 11px; }
.team-source { color: var(--acc); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.slot, .slot-head { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 5px; align-items: center; }
.slot { grid-template-rows: auto auto; margin: 7px 0 9px; }
.slot-head { grid-template-rows: auto auto; margin: 11px 0 0; color: var(--mute); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.slot-head span:first-child { grid-column: 1 / -1; }
.slot-head span:last-child { text-align: center; }
.slot select[data-p="0"] { grid-column: 1 / -1; }
.slot select[data-p="1"] { grid-column: 1; grid-row: 2; }
.slot .gl { grid-column: 2; grid-row: 2; }
.fight .slot-head, .fight .slot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; grid-template-rows: auto; }
.fight .slot-head span:first-child { grid-column: auto; }
.fight .slot select[data-p="0"], .fight .slot select[data-p="1"], .fight .slot .gl { grid-column: auto; grid-row: auto; }
.result-log .slot-head, .result-log .slot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; grid-template-rows: auto; }
.result-log .slot-head span:first-child { grid-column: auto; }
.result-log .slot select[data-p="0"], .result-log .slot select[data-p="1"], .result-log .slot .gl { grid-column: auto; grid-row: auto; }
.slot [data-p="0"] { font-weight: 650; }
.slot > input, .slot > select { min-width: 0; width: 100%; }
.slot select { padding-inline: 7px; font-size: 12px; }
.gl { color: var(--mute); display: flex; justify-content: center; align-items: center; min-height: 36px; }
.steps { margin: 8px 0; padding: 9px 12px 9px 30px; color: #c3d0dc; font-size: 12px; border-radius: 9px; background: rgba(98, 199, 231, .06); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 9px; border-bottom: 1px solid rgba(151, 168, 186, .14); vertical-align: top; }
th { color: var(--mute); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td i { color: var(--mute); font-style: normal; font-size: 11px; }
.result-team { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; }
.result-team-line { display: inline-flex; align-items: baseline; gap: 6px; width: fit-content; margin: 2px 0 5px; padding: 3px 0; white-space: nowrap; }
.result-divider { color: #65768a; }
.result-artifact { color: #b1bfce; font-size: 12px; }
.result-gearless { border: 1px solid rgba(228, 180, 76, .27); border-radius: 999px; padding: 1px 6px; color: var(--acc); font-size: 9px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--good); } .down { color: var(--bad); }
.bar { width: 100px; height: 6px; background: #09111a; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #be8b2b, var(--acc-bright)); border-radius: inherit; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cols > div { border: 1px solid rgba(151, 168, 186, .14); border-radius: 11px; padding: 13px 15px; background: rgba(11, 16, 24, .24); }
.cols ul { margin: 0; padding-left: 18px; color: #c3d0dc; }
.cols li { margin: 4px 0; }
.gteam { border-top: 1px solid var(--line); padding: 12px 0; }
.community-section { margin: 10px 0 22px; padding: 15px; border: 1px solid rgba(151,168,186,.16); border-radius: 12px; background: rgba(11,16,24,.22); }
.community-section-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.community-section-heading h2 { margin: 0; }
.community-section-heading .hint { margin: 4px 0 0; }
.community-submit { flex: 0 0 auto; }
.community-submit > summary { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; padding: 8px 13px; border: 1px solid var(--acc); border-radius: 9px; color: #1b160b; background: linear-gradient(135deg, var(--acc-bright), var(--acc)); font-weight: 750; }
.community-submit > summary::-webkit-details-marker { display: none; }
.community-submit[open] { flex: 1 0 100%; margin-top: 5px; }
.community-submit[open] > summary { margin-bottom: 14px; }
.community-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.community-form-grid label, .community-character-row label, .community-guide-text { display: grid; gap: 5px; color: #bdc9d5; font-size: 12px; font-weight: 650; }
.community-form-grid input, .community-form-grid select, .community-character-row select, .community-guide-text textarea { width: 100%; min-width: 0; }
.community-characters { margin: 14px 0; padding: 11px; border: 1px solid rgba(151,168,186,.16); border-radius: 9px; }
.community-characters legend { padding: 0 5px; color: #bdc9d5; font-size: 12px; font-weight: 700; }
.community-character-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr); gap: 9px; margin: 7px 0; }
.community-guide-text textarea { min-height: 130px; resize: vertical; color: var(--text); background: #0c131d; border: 1px solid #344457; border-radius: 8px; padding: 10px; font: inherit; font-weight: 400; }
.community-guides { display: grid; gap: 10px; margin-top: 13px; }
.community-guide { padding: 13px 14px; border: 1px solid rgba(151,168,186,.16); border-radius: 10px; background: rgba(23,34,49,.52); }
.community-guide > header, .community-guide > footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.community-guide > header h3 { margin: 0; font-size: 14px; }
.community-conditional { display: inline-block; margin-left: 5px; padding: 1px 6px; border: 1px solid rgba(228,180,76,.32); border-radius: 999px; color: var(--acc-bright); font-size: 9px; font-weight: 700; vertical-align: middle; }
.community-unverified { color: var(--acc); font-size: 10px; }
.community-guide > header .hint { margin: 2px 0 0; }
.community-score { flex: 0 0 auto; min-width: 32px; text-align: center; color: var(--acc-bright); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.community-team { margin-top: 9px; color: #d3dde7; font-size: 12px; font-weight: 650; }
.community-body { margin: 7px 0 12px; color: #c3d0dc; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-guide > footer { flex-wrap: wrap; }
.community-vote { display: flex; gap: 6px; }
.vote { padding: 5px 8px; color: var(--mute); font-size: 11px; }
.vote.voted { color: var(--acc-bright); border-color: rgba(228,180,76,.5); background: rgba(228,180,76,.12); }
.community-use { padding: 6px 10px; font-size: 11px; }
.qlog { border: 1px solid rgba(151, 168, 186, .14); border-radius: 11px; margin-top: 13px; padding: 11px; background: rgba(11, 16, 24, .28); }
.qlog .row { margin: 4px 0 8px; } .qlog input.wide { width: 100%; min-width: 0; }
h4 { margin: 12px 0 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
h4 em, .sh em { text-transform: none; font-style: normal; color: var(--acc); font-size: 10px; letter-spacing: 0; }
.strats { border-top: 1px solid rgba(151, 168, 186, .14); margin-top: 13px; padding-top: 10px; }
.strats summary { cursor: pointer; color: #c0ccd8; font-weight: 650; padding: 3px 0; }
.strats summary::marker { color: var(--acc); }
.strat { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 9px 10px; background: rgba(11, 16, 24, .36); }
.strat.on { background: rgba(228, 180, 76, .11); color: var(--text); border-color: rgba(228, 180, 76, .6); }
.strat .sh { display: block; } .strat .sc { display: block; color: var(--mute); font-size: 11px; margin-top: 3px; }
.strat .clash { display: block; color: var(--bad); font-size: 11px; margin-top: 4px; }
.ok { color: var(--good); }
.qlog .row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) auto; gap: 6px; }
.qlog .row input { min-width: 0; width: 100%; }
.qlog > input.wide { min-height: 36px; }
label.btn { display: inline-flex; align-items: center; cursor: pointer; }
.results-heading { justify-content: space-between; }
.artifact-limit { display: flex; align-items: center; gap: 8px; margin: 14px 0; padding: 10px 12px; border: 1px solid rgba(151,168,186,.14); border-radius: 9px; color: #bdc9d5; font-size: 12px; cursor: pointer; }
.guide-boss-select { display: grid; gap: 11px; margin: -2px 0 18px; padding-bottom: 15px; border-bottom: 1px solid rgba(151,168,186,.14); }
.guide-boss-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.guide-boss-row > span { flex: 0 0 120px; color: var(--mute); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.guide-boss-row .chip { padding: 6px 11px; font-size: 12px; }
.history-title { margin: 22px 0 8px; }
.history-title h2 { margin: 0; font-size: 17px; }
.history-grid { display: grid; grid-template-columns: 1fr; gap: 0; align-items: start; }
.history-grid .card { min-width: 0; }
.third-slot-hint { margin: -7px 0 10px; }
.results-heading h2 { margin: 0; }
.roster-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.roster-toolbar input[type="search"] { flex: 1; min-width: 220px; }
.roster-count { margin-left: auto; color: var(--mute); font-size: 12px; white-space: nowrap; }
.roster-count b { color: var(--text); font-size: 14px; }
.rarity-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.rarity-legend-item { border: 1px solid currentColor; border-radius: 999px; padding: 4px 10px; font-size: 10px; font-weight: 750; }
.rarity-heading { display: flex; align-items: center; gap: 8px; margin: 20px 0 9px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.rarity-heading small { color: var(--mute); font-size: 10px; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
.roster-item { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border: 1px solid rgba(151, 168, 186, .15); border-radius: 8px; background: rgba(11, 16, 24, .3); cursor: pointer; font-size: 12px; transition: background .15s, border-color .15s; }
.roster-item:hover { background: rgba(255,255,255,.05); border-color: #63758a; }
.roster-item:has(input:checked) { border-color: color-mix(in srgb, currentColor 45%, transparent); }
.roster-item input { flex: 0 0 auto; }
.rarity-legendary { color: #c996f4; }
.rarity-gold { color: #e9bd5d; }
.rarity-silver { color: #c1ccda; }
.roster-item.rarity-legendary { color: #d4a9f7; }
.roster-item.rarity-gold { color: #e7c878; }
.roster-item.rarity-silver { color: #c5d1df; }
.roster-group[hidden], .roster-item[hidden] { display: none; }
@media (max-width: 700px) {
  main { padding: 20px 15px 48px; }
  .page-masthead { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .page-tabs button { flex: 1 0 auto; padding: 8px 10px; }
  .history-grid { grid-template-columns: 1fr; }
  .card { padding: 15px; }
  .fight { padding: 0 14px 14px; }
  .fight > header { margin: 0 -14px 12px; padding: 13px 14px 11px; }
}
@media (max-width: 470px) {
  .guide-boss-row > span { flex-basis: 100%; }
  .phase-picker { min-width: 0; width: 100%; }
  .exclude-row summary { align-items: flex-start; flex-wrap: wrap; }
  .exclude-row summary .hint { margin-left: 0; }
  .qlog .row { grid-template-columns: 1fr 1fr; }
  .qlog .row button { grid-column: 1 / -1; }
  table { font-size: 11px; }
  th, td { padding: 8px 5px; }
  .community-section { padding: 12px; }
  .community-character-row { grid-template-columns: 1fr; }
}
