/* Only the guided form and its dialogs have new tokens. Site chrome stays in site.css. */
.combat-lab .comparison-guide,
.combat-lab .lab-help-dialog {
  --panel: #fff;
  --panel-solid: #fff;
  --panel-soft: #f5f8fb;
  --line: #e1e9ef;
  --line-strong: #cbd8e3;
  --text: #152438;
  --ink: var(--text);
  --muted: #64758a;
  --accent: #07818a;
  --accent-strong: #087f86;
  --guide-selected: #e3f4f4;
  --guide-button-ink: #fff;
  --guide-shadow: 0 12px 40px #233f5910;
  --radius: 8px;
}
.combat-lab.night-mode .comparison-guide,
.combat-lab.night-mode .lab-help-dialog {
  --panel: #102c39;
  --panel-solid: #102c39;
  --panel-soft: #0b2330;
  --line: #234452;
  --line-strong: #476d80;
  --text: #eef7fc;
  --ink: var(--text);
  --muted: #a5bdcf;
  --accent: #43dce0;
  --accent-strong: #64e0e3;
  --guide-selected: #103641;
  --guide-button-ink: #05232d;
  --guide-shadow: 0 16px 50px #0002;
}
.combat-lab .comparison-guide .ghost::after { display: none; }
.combat-lab .comparison-guide .ghost { background: transparent !important; font-weight: 500; }
.combat-lab .comparison-guide .ghost:hover { background: var(--panel-soft) !important; }

/* Main stages stay available; secondary stages read as a lighter tab strip. */
.combat-lab .guide-nav { padding: 8px 20px; margin: 0 0 20px; gap: 0; flex-wrap: nowrap; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; }
.combat-lab .guide-tab { position: relative; padding: 12px 20px !important; gap: 13px; font-size: 16px; font-weight: 600; border: 0 !important; background: transparent !important; color: var(--muted) !important; }
.combat-lab .guide-tab:first-child { padding-left: 0 !important; }
.combat-lab .guide-tab.active { color: var(--text) !important; }
.combat-lab .guide-tab.active:hover { background: transparent !important; }
.combat-lab .guide-tab small { display: none; }
.combat-lab .step-number { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--line-strong); color: var(--muted); background: transparent; font-size: 16px; font-weight: 500; }
.combat-lab .guide-tab.active .step-number { color: var(--guide-button-ink); background: var(--accent); border-color: var(--accent); }
.combat-lab .guide-subnav { max-width: 1024px; gap: 12px; margin: 0 auto 24px; border: 1px solid var(--line); padding: 0 14px; background: var(--panel-solid); border-radius: 8px; }
.combat-lab .guide-subtab { position: relative; min-height: 49px; padding: 12px 20px !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; background: transparent !important; color: var(--muted) !important; font-size: 15px; font-weight: 500; }
.combat-lab .guide-subtab > span { font-size: inherit; opacity: 1; }
.combat-lab .guide-subtab.active { color: var(--accent-strong) !important; background: transparent !important; border-bottom-color: var(--accent) !important; font-weight: 600; }

/* Heading, field, contextual help and navigation share a single surface. */
.combat-lab .guide-surface { max-width: 1024px; margin: 0 auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--guide-shadow); padding: 32px 36px 0; }
.combat-lab .guide-heading,
.combat-lab .guide-panel,
.combat-lab .guide-footer { max-width: none; margin: 0; border: 0; background: transparent; box-shadow: none; }
.combat-lab .guide-panel { background: transparent !important; box-shadow: none !important; backdrop-filter: none; }
.combat-lab .guide-heading { display: block; padding: 0 0 28px; }
.combat-lab .guide-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.combat-lab .guide-context { display: flex; align-items: center; gap: 18px; font-size: 16px; line-height: 1.5; margin: 0; font-weight: 500; }
.combat-lab #guideCategory { color: var(--accent-strong); }
.combat-lab #guidePosition { color: var(--muted); padding-left: 18px; border-left: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.combat-lab .guide-autosave { display: block; color: var(--muted); font-size: 12px; text-align: right; max-width: 45%; }
.combat-lab .guide-autosave #saveStatus { color: inherit; font-size: inherit; }
.combat-lab .guide-heading h2 { font-size: 36px; line-height: 1.5; margin: 0; letter-spacing: -.025em; font-weight: 700; }
.combat-lab #guideDescription { margin-top: 12px; font-size: 14px; }
.combat-lab .guide-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.combat-lab .guide-panel > .card,
.combat-lab .guide-panel > .comparison-grid,
.combat-lab .guide-panel .compare-side,
.combat-lab .guide-panel .result-stack > .card { padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.combat-lab .guide-panel #characterCard > h2 { display: none; }
.combat-lab .guide-panel .compare-heading { justify-content: flex-end; margin-bottom: 20px; }
.combat-lab #importHeading { margin: 0 0 16px; font-size: 20px; }
.combat-lab #importArea > .section-head { gap: 16px; margin-bottom: 20px; }
.combat-lab #importIntro { margin: 0; }
.combat-lab #guideEquipmentSource > a { display: inline-block; margin-bottom: 20px; }
.combat-lab #debuffControls { min-width: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.combat-lab #debuffControls > legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.combat-lab .guide-dps-entry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.combat-lab .guide-text-link.ghost { padding: 0; min-height: 28px; border: 0; border-radius: 2px; color: var(--accent-strong); font-size: inherit; text-decoration: underline; text-underline-offset: 4px; }
.combat-lab #guideDpsImport { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.combat-lab #guideDpsImport .section-head { gap: 16px; flex-wrap: wrap; }
.combat-lab #guideDpsImport .section-head p { flex: 1 1 240px; margin: 0; }
.combat-lab #guideDpsSource { margin-top: 4px; }
.combat-lab .guide-panel .profession-bar { display: block; }
.combat-lab .profession-bar > label { max-width: 460px; }
.combat-lab .guide-question { gap: 24px; }
.combat-lab .guide-question > * { min-width: 0; }
.combat-lab .guide-question label,
.combat-lab .guide-question .character-critical-field { font-size: 18px; font-weight: 600; gap: 10px; }
.combat-lab .guide-question .field-label-row { max-width: 520px; justify-content: flex-start; gap: 18px; }
.combat-lab .guide-question .field-help { color: var(--accent-strong) !important; font-size: 14px; min-height: 28px; border: 0 !important; margin-left: 0; }
.combat-lab .guide-question .field-hint { max-width: 850px; font-size: 15px; line-height: 1.8; margin-top: 4px; }
.combat-lab .guide-question input { min-height: 58px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 12px 16px; }
.combat-lab .guide-question > label:only-child > input,
.combat-lab .guide-question .character-critical-field > input { max-width: 460px; }
.combat-lab :is(.comparison-guide, .lab-help-dialog) input,
.combat-lab :is(.comparison-guide, .lab-help-dialog) select { background: var(--panel-soft) !important; border-color: var(--line-strong) !important; border-radius: 7px; color: var(--text); }
.combat-lab .guide-input-unit { display: flex; align-items: center; width: 460px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel-soft); }
.combat-lab .guide-input-unit > input { flex: 1; width: 0; border: 0 !important; background: transparent !important; box-shadow: none; }
.combat-lab .guide-input-unit > span { padding: 0 18px; font-size: 18px; color: var(--muted); font-weight: 500; }
.combat-lab .guide-panel #characterCard > details { margin: 28px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.combat-lab .guide-panel #characterCard > details > summary { color: var(--accent-strong); font-weight: 500; font-size: 16px; min-height: 32px; line-height: 1.8; display: flex; align-items: center; gap: 14px; list-style: none; }
.combat-lab .guide-panel #characterCard > details > summary::-webkit-details-marker { display: none; }
.combat-lab .reading-guide p,
.combat-lab .reading-steps,
.combat-lab .guide-panel .muted { font-size: 13px; line-height: 1.8; }
.combat-lab .reading-guide p { margin: 18px 0; }
.combat-lab .guide-panel .compare-heading { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.combat-lab .guide-panel .guide-result-notes { margin-bottom: 24px; }
.combat-lab .guide-footer { padding: 22px 0 26px; margin-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; align-items: stretch; min-height: 0; }
.combat-lab .guide-footer #guideMessage { max-width: none; font-size: 14px; color: var(--danger); line-height: 1.7; }
.combat-lab #guideMessage:empty { display: none; }
.combat-lab .guide-footer .actions { justify-content: space-between; width: 100%; margin: 0; gap: 16px; }
.combat-lab .guide-footer button { font-size: 16px; min-height: 50px; min-width: 114px; padding: 12px 22px; flex: none; font-weight: 600; }
.combat-lab #guideNext { color: var(--guide-button-ink); background: var(--accent); border-color: var(--accent); min-width: 136px; }
.combat-lab #guidePrevious { border-color: var(--line-strong) !important; }

/* Unmodified Phosphor regular SVG assets, tinted by the active theme. */
.combat-lab .field-help::before,
.combat-lab #guideNext::after,
.combat-lab #characterCard > details > summary::before,
.combat-lab #characterCard > details > summary::after {
  content: "";
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask-image: var(--guide-icon);
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}
.combat-lab .field-help { gap: 7px; --guide-icon: url("../assets/combat-lab/icons/link.svg"); }
.combat-lab .field-help::before { width: 17px; height: 17px; flex-basis: 17px; }
.combat-lab #guideNext { gap: 12px; --guide-icon: url("../assets/combat-lab/icons/arrow-right.svg"); }
.combat-lab #characterCard > details > summary::before { --guide-icon: url("../assets/combat-lab/icons/question.svg"); width: 24px; height: 24px; flex-basis: 24px; }
.combat-lab #characterCard > details > summary::after { --guide-icon: url("../assets/combat-lab/icons/caret-down.svg"); margin-left: auto; width: 18px; height: 18px; flex-basis: 18px; }
.combat-lab #characterCard > details[open] > summary::after { transform: rotate(180deg); }
.combat-lab .comparison-guide .section-head h2::before { display: none; }
.combat-lab .comparison-guide :is(button, a, input, select, summary):focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 4px; }

/* Reading preparation asks for one concrete confirmation at a time. */
.combat-lab .guide-panel .reading-guide { padding: 0; margin: 0; border: 0; background: transparent; }
.combat-lab .reading-guide .reading-check-position { margin: 0 0 18px; font-size: 13px; color: var(--accent-strong); font-weight: 600; }
.combat-lab #readingCheckContent { padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.combat-lab #readingCheckTitle { margin: 0; font-size: 23px; line-height: 1.5; }
.combat-lab #readingCheckDescription { margin: 12px 0 0; font-size: 16px; line-height: 1.9; max-width: 780px; }
.combat-lab .reading-confirm { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; margin-top: 22px; font-size: 15px; line-height: 1.8; cursor: pointer; }
.combat-lab .reading-confirm input { appearance: auto; flex: 0 0 20px; width: 20px; height: 20px; min-height: 0; margin: 4px 0 0; padding: 0; accent-color: var(--accent); }
.combat-lab .comparison-guide .reading-review-link.ghost { display: inline-flex; width: fit-content; margin-top: 8px; padding: 6px 0; min-height: 32px; border: 0; color: var(--accent-strong); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.combat-lab .mastery-fields { grid-template-columns: minmax(0,1fr); gap: 24px; }
.combat-lab .mastery-fields label { font-size: 17px; gap: 10px; }
.combat-lab .mastery-fields select { min-height: 52px; font-size: 17px; }
.combat-lab .mastery-fields .field-hint { font-size: 14px; font-weight: 400; line-height: 1.7; }
.combat-lab #characterMore { grid-template-columns: minmax(0,1fr); gap: 26px; }
.combat-lab #characterMore label { min-width: 0; display: grid; gap: 10px; font-size: 18px; font-weight: 600; }
.combat-lab #characterMore input { width: 100%; min-height: 54px; padding: 12px 16px; font-size: 23px; font-weight: 600; }
.combat-lab #characterMore .field-hint { font-size: 14px; font-weight: 400; line-height: 1.8; margin-top: 0; }
.combat-lab #characterMore .field-hint strong { color: var(--text); font-weight: 700; }

/* One complete skill list, with an explicit total before the inputs. */
.combat-lab #guideWeightTotal { margin: 0 0 22px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-soft); }
.combat-lab .guide-weight-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.combat-lab .guide-weight-overview > strong { font-size: 15px; color: var(--text); }
.combat-lab .guide-weight-overview b { margin-left: 6px; font-size: 26px; font-variant-numeric: tabular-nums; }
.combat-lab .guide-weight-overview strong > span { color: var(--muted); font-size: 13px; font-weight: 400; }
.combat-lab .guide-weight-status { font-size: 14px; font-weight: 600; color: var(--accent-strong); }
.combat-lab #guideWeightTotal[data-status="partial"] .guide-weight-status,
.combat-lab #guideWeightTotal[data-status="over"] .guide-weight-status { color: #975300; }
.combat-lab.night-mode #guideWeightTotal[data-status="partial"] .guide-weight-status,
.combat-lab.night-mode #guideWeightTotal[data-status="over"] .guide-weight-status { color: #ffcb85; }
.combat-lab #guideWeightTotal progress { display: block; width: 100%; height: 6px; margin-top: 12px; accent-color: var(--accent); }
.combat-lab #guideWeightTotal p { font-size: 12px; font-weight: 400; color: var(--muted); margin: 10px 0 0; line-height: 1.7; }
.combat-lab .guide-panel .guide-weights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.combat-lab .guide-panel .guide-weights > label { min-width: 0; margin: 0; min-height: 80px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 15px; }
.combat-lab .guide-weight-input input { width: 76px; min-height: 44px; padding: 8px 10px; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
.combat-lab .guide-weights small { font-size: 11px; line-height: 1.5; }

/* Stable summary columns; calculations expand into their own full-width row. */
.combat-lab .comparison-guide .skills { width: 100%; min-width: 880px; table-layout: fixed; font-size: 13px; }
.combat-lab .skills .skill-column-name { width: 28%; }
.combat-lab .skills .skill-column-weight { width: 10%; }
.combat-lab .skills .skill-column-kind { width: 16%; }
.combat-lab .skills .skill-column-result { width: 23%; }
.combat-lab .skills th:first-child { width: auto; }
.combat-lab .skills th { padding: 12px 10px; background: var(--panel-soft); font-size: 12px; }
.combat-lab .skills td { padding: 18px 10px; vertical-align: top; min-width: 0; }
.combat-lab .skills .skill-main-row > td:not(:first-child) { padding-top: 50px; }
.combat-lab .skills .skill-name { display: flex; align-items: center; min-height: 32px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.combat-lab .skills :is(input[type="number"],select) { min-width: 0; width: 100%; height: 44px; margin: 0; padding: 8px; font-size: 13px; }
.combat-lab .skills td:first-child > select { margin-top: 10px; }
.combat-lab .skills label { font-size: 12px; margin-bottom: 10px; }
.combat-lab .skills label input { margin-top: 6px; }
.combat-lab .skill-model-switch { display: flex; width: 100%; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); }
.combat-lab .skill-model-switch button.ghost { flex: 1; min-width: 0; min-height: 36px; padding: 7px 4px; border: 1px solid transparent !important; border-radius: 5px; font-size: 12px; white-space: normal; color: var(--muted); line-height: 1.5; }
.combat-lab .skill-model-switch button.ghost[aria-pressed="true"] { background: var(--guide-selected) !important; border-color: var(--accent) !important; color: var(--accent-strong); font-weight: 600; }
.combat-lab .skill-model-switch button:disabled { opacity: .45; cursor: not-allowed; }
.combat-lab .skills .native-formula { min-width: 0; gap: 6px; }
.combat-lab .skills .native-formula > strong { display: flex; align-items: center; min-height: 44px; font-size: 24px; line-height: 1.5; overflow-wrap: anywhere; }
.combat-lab .skills .native-formula .muted { font-size: 12px; }
.combat-lab .skills .formula-toggle { display: inline-flex; padding: 6px 0; margin-top: 8px; min-height: 36px; border: 0; border-radius: 0; color: var(--accent-strong); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.combat-lab .skills .skill-detail-row > td { padding: 0 16px 22px; background: var(--panel-soft); }
.combat-lab .skill-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.combat-lab .skill-detail-heading button { min-height: 36px; padding: 6px 10px; font-size: 12px; border-color: var(--line-strong); }
.combat-lab .skill-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
.combat-lab .skill-detail-grid section { min-width: 0; overflow-wrap: anywhere; }
.combat-lab .skill-detail-grid section + section { border-left: 1px solid var(--line); padding-left: 28px; }
.combat-lab .skill-detail-grid h4 { margin: 0 0 12px; color: var(--accent-strong); font-size: 14px; }
.combat-lab .skill-detail-grid p { margin: 8px 0; font-size: 13px; line-height: 1.8; }
.combat-lab .skill-detail-grid small { display: block; font-size: 12px; color: var(--muted); line-height: 1.8; }

@media (max-width: 1100px) {
  .combat-lab .guide-subnav { gap: 4px; }
  .combat-lab .guide-subtab { padding-inline: 16px !important; }
  .combat-lab .guide-tab { padding-inline: 8px !important; font-size: 14px; gap: 9px; }
}
@media (max-width: 760px) {
  .combat-lab #readingCheckContent { padding: 18px; }
  .combat-lab #readingCheckTitle { font-size: 20px; }
  .combat-lab #readingCheckDescription,.combat-lab .reading-confirm { font-size: 14px; }
  .combat-lab #characterMore label { font-size: 16px; }
  .combat-lab .guide-panel .guide-weights { grid-template-columns: minmax(0,1fr); }
  .combat-lab #guideWeightTotal { padding: 16px; }
  .combat-lab .guide-weight-overview b { font-size: 23px; }
  .combat-lab .comparison-guide .skills { min-width: 0; display: block; }
  .combat-lab .skills :is(colgroup,thead) { display: none; }
  .combat-lab .skills tbody { display: block; }
  .combat-lab .skills .skill-main-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .combat-lab .skills .skill-main-row > td { display: block; padding: 0; border: 0; }
  .combat-lab .skills .skill-main-row > td:not(:first-child) { padding-top: 0; }
  .combat-lab .skills .skill-main-row > td:first-child { grid-column: 1 / -1; }
  .combat-lab .skills .skill-main-row > td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
  .combat-lab .skills .skill-name { min-height: 30px; margin-bottom: 10px; }
  .combat-lab .skills .native-formula > strong { font-size: 21px; }
  .combat-lab .skills .skill-detail-row:not([hidden]) { display: block; }
  .combat-lab .skills .skill-detail-row > td { display: block; padding: 0 14px 20px; }
  .combat-lab .skill-detail-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .combat-lab .skill-detail-grid section + section { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .combat-lab .guide-nav { gap: 4px; margin-bottom: 14px; padding: 6px 4px; }
  .combat-lab .guide-tab { flex: 1 1 0; flex-direction: column; gap: 7px; padding: 8px 0 !important; font-size: 12px; white-space: nowrap; }
  .combat-lab .step-number { width: 30px; height: 30px; flex-basis: 30px; font-size: 14px; }
  .combat-lab .guide-subnav { gap: 2px; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 22px; }
  .combat-lab .guide-subtab { flex: none; min-height: 44px; font-size: 12px; padding: 10px 12px !important; gap: 6px; }
  .combat-lab .guide-surface { padding: 24px 22px 0; border-radius: 10px; }
  .combat-lab .guide-heading { padding-bottom: 24px; }
  .combat-lab .guide-heading h2 { font-size: 25px; }
  .combat-lab .guide-meta { margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
  .combat-lab .guide-context { font-size: 13px; gap: 12px; }
  .combat-lab #guidePosition { padding-left: 12px; }
  .combat-lab .guide-autosave { max-width: none; font-size: 11px; margin: 0; text-align: left; }
  .combat-lab .guide-question { grid-template-columns: minmax(0, 1fr); }
  .combat-lab .guide-question label,
  .combat-lab .guide-question .character-critical-field { font-size: 14px; }
  .combat-lab .guide-question input { min-height: 54px; font-size: 24px; }
  .combat-lab .guide-question .field-hint { font-size: 13px; }
  .combat-lab .guide-panel #characterCard > details > summary { font-size: 14px; gap: 10px; }
  .combat-lab .guide-panel #characterCard > details { margin-top: 24px; padding-top: 20px; }
  .combat-lab .guide-footer { margin-top: 22px; padding: 20px 0; }
  .combat-lab .guide-footer button { min-width: 94px; min-height: 46px; padding: 10px 16px; font-size: 13px; }
  .combat-lab #guideNext { min-width: 108px; }
}
@media (max-width: 420px) {
  .combat-lab .guide-surface { padding-inline: 20px; }
  .combat-lab .guide-heading h2 { font-size: 23px; }
  .combat-lab .guide-question .field-label-row { gap: 8px; }
}

.combat-lab .weapon-grade { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.combat-lab .weapon-grade-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; margin-bottom:14px; }
.combat-lab .weapon-grade-heading > span { font-size:13px; color:var(--muted); }
.combat-lab .weapon-grade-row { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 0; }
.combat-lab .weapon-grade-row > strong { font-size:20px; font-variant-numeric:tabular-nums; }
.combat-lab .weapon-grade-row small { display:block; color:var(--muted); margin-top:4px; }
.combat-lab .weapon-grade-value { display:flex; flex-direction:row; align-items:center; gap:6px; }
.combat-lab .weapon-grade-value input { width:108px; min-height:44px; }
.combat-lab .weapon-grade-total { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; border-top:1px solid var(--line); padding-top:16px; margin-top:10px; }
.combat-lab .weapon-grade-total > strong { color:var(--accent); font-size:28px; font-variant-numeric:tabular-nums; }
.combat-lab .weapon-grade-total small { color:var(--muted); font-size:14px; font-weight:400; margin-left:12px; }
.combat-lab .weapon-grade-confirm { display:flex; flex-direction:row; align-items:center; gap:10px; margin-top:16px; font-size:14px; font-weight:400; }
.combat-lab .weapon-grade-confirm input { width:18px; height:18px; min-height:0; margin:0; flex:none; accent-color:var(--accent); }
.combat-lab .weapon-grade-legacy { border-left:3px solid var(--accent); padding-left:16px; margin:18px 0; }
@media(max-width:600px) {
 .combat-lab .weapon-grade-row { grid-template-columns:30px minmax(0,1fr) auto; gap:8px; font-size:14px; }
 .combat-lab .weapon-grade-value input { width:90px; }
 .combat-lab .weapon-grade-total > strong { font-size:24px; }
}
/* The final stage is a report; the preceding stages keep their guided cards. */
.combat-lab .report-view .guide-surface { max-width: 1280px; }
.combat-lab .report-view #guidePosition { display: none; }
.combat-lab .report-toolbar { display:flex; align-items:center; justify-content:flex-start; gap:12px 20px; margin-bottom:28px; flex-wrap:wrap; }
.combat-lab .report-toolbar .report-scope { display:flex; flex-wrap:wrap; gap:4px; min-width:0; margin:0; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--panel-soft); }
.combat-lab .report-scope legend { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.combat-lab .report-scope label { position:relative; display:block; margin:0; cursor:pointer; font-size:13px; font-weight:500; }
.combat-lab .report-scope input { position:absolute; width:1px; height:1px; min-height:0; padding:0; margin:0; opacity:0; }
.combat-lab .report-scope label span { display:block; padding:10px 14px; border-radius:7px; color:var(--muted); line-height:20px; }
.combat-lab .report-scope input:checked + span { background:var(--accent); color:var(--guide-button-ink); }
.combat-lab .report-scope input:focus-visible + span { outline:2px solid var(--accent-strong); outline-offset:3px; }
.combat-lab .report-toolbar .actions { gap:8px; margin:0; }
.combat-lab .report-toolbar button { padding:10px 16px; min-height:44px; font-size:14px; }
.combat-lab .report-toolbar #comparisonImageStatus { flex-basis:100%; }
.combat-lab .report-toolbar p { margin:0; font-size:13px; }
.combat-lab #comparisonReport { min-width:0; }
.combat-lab #comparisonReport :is(.card,.result-card,.differences) { padding:0; margin:0; border:0; background:transparent; box-shadow:none; }
.combat-lab #comparisonReport .report-section-title,.combat-lab #comparisonReport .differences > h2 { font-size:21px; margin:0 0 22px; color:var(--accent-strong); }
.combat-lab #comparisonReport :is(.report-section,.differences,.result-card) { margin-top:32px; padding-top:28px; border-top:1px solid var(--line); }
.combat-lab #comparisonReport > .result-card:first-child { margin-top:0; padding-top:0; border-top:0; }
.combat-lab #comparisonReport .report-contributions { margin-top:32px; padding-top:28px; border-top:1px solid var(--line); }
.combat-lab #comparisonReport .report-contributions > details { margin:0; padding:0; border:0; }
.combat-lab #comparisonReport .equipment-diff-part + .equipment-diff-part { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.combat-lab #comparisonReport .equipment-diff-part > strong { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.combat-lab #comparisonReport .equipment-diff-part > p { margin:0; white-space:pre-line; line-height:1.8; }
.combat-lab #comparisonReport td:has(.equipment-diff-part) { vertical-align:top; padding-block:20px; }
.combat-lab #comparisonReport .report-sources { display:block; white-space:pre-line; color:var(--muted); font-size:12px; line-height:1.75; margin-top:6px; }
.combat-lab .report-input-grid,.combat-lab .report-equipment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.combat-lab .report-input-group,.combat-lab .report-profile { min-width:0; padding:20px; background:var(--panel-soft); border:1px solid var(--line); border-radius:8px; }
.combat-lab .report-input-group:first-child:nth-last-child(4) { grid-row:span 3; }
.combat-lab .report-input-group:first-child:nth-last-child(3) { grid-row:span 2; }
.combat-lab .report-input-group h3,.combat-lab .report-profile h3 { margin:0 0 14px; font-size:17px; overflow-wrap:anywhere; }
.combat-lab .report-profile:last-child { border-top:3px solid var(--accent); }
.combat-lab .report-profile-mode { margin:0 0 18px; font-size:12px; color:var(--muted); }
.combat-lab .report-profile dd { white-space:pre-line; }
.combat-lab #comparisonReport dl { margin:0; font-size:13px; line-height:1.65; }
.combat-lab #comparisonReport dl > div { display:grid; grid-template-columns:minmax(90px, .8fr) minmax(0,1.4fr); align-items:baseline; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); }
.combat-lab #comparisonReport dl > div:last-child { border-bottom:0; }
.combat-lab #comparisonReport dt { color:var(--muted); overflow-wrap:anywhere; }
.combat-lab #comparisonReport dd { margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.combat-lab #comparisonReport #guideResultNotes { padding-top:24px; font-size:13px; }
.combat-lab #comparisonReport .table-scroll { overflow:visible; }
.combat-lab #comparisonReport table { table-layout:fixed; width:100%; min-width:0; }
.combat-lab #comparisonReport th,.combat-lab #comparisonReport td { font-size:13px; overflow-wrap:anywhere; }
.combat-lab #comparisonReport #differences th:first-child { width:19%; }
.combat-lab #comparisonReport #differences th:last-child { width:13%; }
.combat-lab #comparisonReport #resultTitle { font-size:23px; }
.combat-lab #comparisonReport .big-result { font-size:64px; }
.combat-lab .report-view #upgradeCard,.combat-lab .report-view #dpsCard,.combat-lab .report-view #formulas { margin-top:36px; padding-top:28px; border-top:1px solid var(--line); }
.combat-lab #guidePanel4 #upgradeRows { max-height:none; overflow:visible; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; }
.combat-lab .formula-final { padding:16px; background:var(--panel-soft); border-left:3px solid var(--accent); margin-bottom:20px; }
.combat-lab .formula-final > b { color:var(--accent-strong); font-size:20px; }
@media(max-width:760px) {
 .combat-lab .report-input-grid,.combat-lab .report-equipment-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
 .combat-lab .report-input-group,.combat-lab .report-profile { padding:16px; }
 .combat-lab .report-input-group:first-child:nth-last-child(n) { grid-row:auto; }
 .combat-lab #guidePanel4 #upgradeRows { grid-template-columns:minmax(0,1fr); }
 .combat-lab #comparisonReport .table-scroll { overflow-x:auto; }
 .combat-lab #comparisonReport #differences table { min-width:560px; }
 .combat-lab #comparisonReport .big-result { font-size:48px; }
 .combat-lab .report-toolbar .actions { width:100%; }
 .combat-lab .report-toolbar button { flex:1; }
}
