:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --sidebar: #10141b;
  --panel: #151a23;
  --panel-2: #1c2430;
  --field: #0e1218;
  --line: #2a3443;
  --text: #eef3f8;
  --muted: #94a1b2;
  --gold: #d8a84f;
  --teal: #40b8aa;
  --blue: #75a7ff;
  --green: #8acf72;
  --red: #ee6d62;
  --amber: #e2bc66;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.33);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 168, 79, 0.55);
  background: #211b12;
  color: var(--gold);
  font-weight: 900;
  font-size: 13px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.eyebrow,
.subhead,
.panel-head p,
.summary-card span,
.run-metrics span,
.card-title span {
  color: var(--muted);
}

.brand span,
.eyebrow,
.panel-head p,
.summary-card span,
.run-metrics span {
  font-size: 12px;
}

.tool-nav {
  display: grid;
  gap: 7px;
  margin: 30px 0;
}

.tool-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
}

.tool-button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tool-button.active,
.tool-button:hover {
  color: var(--text);
  background: rgba(216, 168, 79, 0.08);
  border-left-color: var(--gold);
}

.tool-button.active span {
  color: var(--gold);
  border-color: rgba(216, 168, 79, 0.58);
}

.sidebar-card,
.panel,
.summary-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-title,
.node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title b {
  color: var(--teal);
  font-size: 12px;
}

.node-row {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.node-row b {
  color: var(--text);
}

.main {
  min-width: 0;
  padding: 28px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

.subhead {
  margin-top: 8px;
  max-width: 720px;
}

.header-actions,
.segmented {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-button,
.secondary-button,
.danger-button,
.primary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
}

.ghost-button,
.secondary-button {
  background: var(--panel-2);
}

.danger-button {
  width: 100%;
  background: transparent;
  color: var(--red);
}

.primary-button {
  width: 100%;
  border: 0;
  background: var(--gold);
  color: #17120a;
  font-weight: 900;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 78px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 14px;
}

.summary-card b {
  font-size: 18px;
}

.workflow-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.workflow-step {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 0 14px;
  text-align: left;
  cursor: default;
  user-select: none;
}

.workflow-step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.workflow-step.active {
  border-color: rgba(216, 168, 79, 0.68);
  background: rgba(216, 168, 79, 0.08);
  color: var(--text);
}

.workflow-step.active span {
  border-color: var(--gold);
  color: var(--gold);
}

.app-page {
  display: none;
}

.app-page.active {
  display: block;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  min-width: 0;
}

.panel-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  min-height: 62px;
}

.segmented {
  gap: 0;
  border: 1px solid var(--line);
  background: var(--field);
}

.segmented button {
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.segmented .selected {
  background: var(--panel-2);
  color: var(--text);
}

.input-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 18px 0;
}

.input-mode-tab {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #20242c;
  color: var(--muted);
  padding: 10px 12px;
  text-align: left;
}

.input-mode-tab .mode-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(64, 184, 170, 0.42);
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.06);
  font-size: 20px;
  font-weight: 900;
}

.input-mode-tab strong,
.input-mode-tab small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-mode-tab strong {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-mode-tab small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.input-mode-tab.selected {
  border-color: rgba(216, 168, 79, 0.75);
  background: rgba(216, 168, 79, 0.1);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.input-mode-tab.selected .mode-icon {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(216, 168, 79, 0.12);
}

.input-mode-tab.locked {
  opacity: 0.42;
  cursor: not-allowed;
}

.input-source-section {
  margin: 18px;
  border: 1px solid #303946;
  background: #202226;
  padding: 16px;
}

.input-source-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #00d9ff;
  border: 1px solid rgba(0, 217, 255, 0.52);
  font-size: 18px;
  font-weight: 900;
}

.input-source-title h3 {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-source-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.input-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.input-source-note span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(64, 184, 170, 0.36);
  background: rgba(64, 184, 170, 0.08);
  color: #9de9e0;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
}

.input-source-section textarea {
  width: 100%;
  margin: 12px 0 0;
}

.input-source-section .armory-grid {
  padding: 14px 0 0;
}

.armory-grid,
.option-strip {
  display: grid;
  grid-template-columns: 110px 1fr 1fr 150px;
  gap: 12px;
  padding: 18px 18px 0;
  align-items: end;
}

.option-strip {
  grid-template-columns: 1fr 140px 130px 100px;
  padding-bottom: 18px;
}

.run-option-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 18px;
}

.run-option-strip label:first-child {
  grid-column: 1 / -1;
}

.run-option-strip select,
.run-option-strip input {
  min-width: 0;
}

.parse-strip {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 18px 18px;
}

.parse-strip.summary-only {
  grid-template-columns: 1fr;
}

.parse-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.parse-summary b {
  color: var(--gold);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  outline: none;
}

textarea:focus,
select:focus,
input:focus {
  border-color: var(--gold);
}

textarea {
  display: block;
  width: calc(100% - 36px);
  min-height: 330px;
  margin: 18px;
  resize: vertical;
  padding: 14px;
  font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.simc-editor {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  height: 330px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #15161c;
  overflow: hidden;
}

.simc-line-numbers,
.simc-highlight,
.simc-editor textarea {
  font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.35;
  tab-size: 2;
}

.simc-line-numbers {
  grid-column: 1;
  padding: 14px 8px;
  border-right: 1px solid rgba(42, 52, 67, 0.8);
  background: #111219;
  color: #697283;
  text-align: right;
  overflow: hidden;
  user-select: none;
}

.simc-line-numbers span {
  display: block;
  min-height: 16.2px;
}

.simc-highlight {
  grid-column: 2;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  white-space: pre;
  color: #cfd7e6;
  pointer-events: none;
}

.simc-editor textarea,
.input-source-section .simc-editor textarea {
  position: absolute;
  inset: 0 0 0 44px;
  width: calc(100% - 44px);
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: var(--text);
  resize: none;
  overflow: auto;
  white-space: pre;
}

.simc-editor textarea:focus {
  border: 0;
  outline: 1px solid rgba(216, 168, 79, 0.65);
  outline-offset: -1px;
}

.simc-editor textarea::selection {
  background: rgba(117, 167, 255, 0.35);
  color: transparent;
}

.simc-comment {
  color: #7ea085;
  font-style: italic;
}

.simc-key {
  color: #00d9ff;
  font-weight: 800;
}

.simc-slot-key {
  color: var(--gold);
  font-weight: 800;
}

.simc-talent-key {
  color: #c586ff;
  font-weight: 800;
}

.simc-operator {
  color: #7f8999;
}

.simc-attr {
  color: var(--blue);
}

.simc-number {
  color: var(--amber);
}

.simc-string {
  color: #47e5be;
}

select,
input {
  height: 40px;
  padding: 0 10px;
}

.right-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.low,
.badge.done,
.badge.live {
  color: var(--green);
}

.badge.medium,
.badge.running {
  color: var(--amber);
}

.badge.high,
.badge.failed {
  color: var(--red);
}

.badge.queued {
  color: var(--blue);
}

.run-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 18px;
}

.run-metrics div {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--field);
}

.run-metrics b {
  font-size: 18px;
}

.run-panel {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.run-panel .primary-button,
.run-panel .danger-button {
  width: calc(100% - 36px);
  margin: 0 18px;
}

.progress-block {
  padding: 18px 18px 8px;
}

.queue-panel {
  max-width: 980px;
  margin: 0 auto 18px;
}

.queue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  padding: 18px;
}

.queue-layout .progress-block {
  padding: 0;
}

.queue-summary {
  display: grid;
  gap: 1px;
}

.queue-summary div {
  display: grid;
  gap: 6px;
  background: var(--field);
  padding: 12px;
}

.queue-summary span {
  color: var(--muted);
  font-size: 12px;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.page-actions .danger-button,
.page-actions .secondary-button {
  width: auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  overflow: hidden;
}

.progress div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--gold));
  transition: width 0.35s ease;
}

.timeline {
  margin: 0;
  padding: 8px 18px 18px 38px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.timeline li.done {
  color: var(--green);
}

.timeline li.active {
  color: var(--gold);
}

.live-log-panel {
  margin: 0 18px 18px;
  border: 1px solid #3b4658;
  background: #050609;
}

.live-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #252b36;
  background: #111620;
  color: #dce3ee;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-log-head b {
  color: var(--gold);
}

.live-log {
  height: 320px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #cfd7e6;
  background: #030405;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.live-log .log-muted {
  color: #7f8999;
}

.tool-panel {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.tool-panel.active {
  display: block;
}

.result-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.dps-card {
  min-height: 180px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 22px;
}

.dps-card span {
  color: var(--gold);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.dps-card small {
  color: var(--muted);
}

.result-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}

.result-metadata div {
  border: 1px solid var(--line);
  background: #171a20;
  padding: 10px;
}

.result-metadata dt {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 4px;
}

.result-metadata dd {
  color: var(--text);
  font-weight: 800;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-card,
.worker-meter {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 18px;
}

.chart-card div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.chart-card a,
.chart-card span {
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-card a:hover {
  color: var(--gold);
}

.chart-card i {
  height: 9px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--teal) var(--bar), #0a0d12 var(--bar));
}

.chart-card b {
  color: var(--text);
  text-align: right;
}

.quick-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
}

.quick-report-main,
.quick-report-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.quick-hero,
.report-section,
.report-side-card {
  border: 1px solid #555967;
  background: #050505;
  box-shadow: var(--shadow);
}

.quick-hero {
  min-height: 170px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.quick-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: #f28bc0;
}

.result-portrait {
  position: relative;
  height: 116px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 62% 35%, rgba(216, 168, 79, 0.32), transparent 36%),
    linear-gradient(135deg, #25222d, #131016 60%, #2c1116);
  border: 1px solid #393d49;
  overflow: hidden;
}

.result-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.result-portrait span {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 42px;
  font-weight: 900;
}

.result-portrait.has-image span {
  display: none;
}

.result-title-block h2 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.result-title-block strong {
  display: block;
  margin-top: 8px;
  color: #fff0c8;
  font-size: 24px;
  letter-spacing: 4px;
}

.result-title-block p {
  margin: 8px 0 0;
  color: #c9ced8;
}

.constant-buff-icons {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 14px;
  border-top: 1px solid #333743;
}

.spell-icon-link {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #524f5d;
  background: #12141a;
  color: var(--gold);
  font-size: 11px;
  text-decoration: none;
  overflow: hidden;
}

.report-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #66666c;
  color: #151515;
}

.collapsible-report-section summary {
  cursor: pointer;
  list-style: none;
}

.collapsible-report-section summary::-webkit-details-marker {
  display: none;
}

.collapse-indicator {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: #25272d;
  color: #f1f3f8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.collapsible-report-section[open] .collapse-indicator {
  background: #15171c;
}

.collapsible-report-section[open] .collapse-indicator {
  font-size: 0;
}

.collapsible-report-section[open] .collapse-indicator::after {
  content: "접기";
  font-size: 12px;
}

.report-section-head h3,
.report-side-card h3 {
  margin: 0;
  font-size: 15px;
}

.report-bars {
  display: grid;
  gap: 1px;
  padding: 18px 20px;
}

.report-bar-row {
  display: grid;
  grid-template-columns: 230px 52px minmax(120px, 1fr) 90px 64px;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  color: #d9dce5;
  font-size: 13px;
}

.damage-tree-row {
  --indent: 0px;
}

.damage-tree-row[data-depth]:not([data-depth="0"]) {
  background: rgba(255, 255, 255, 0.025);
}

.damage-bars:not(.show-zero-damage) .zero-damage-row {
  display: none;
}

.report-head-action {
  min-height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: #25272d;
  color: #f1f3f8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.report-head-action:hover {
  background: #15171c;
}

.buff-bars .report-bar-row {
  grid-template-columns: 280px 62px minmax(120px, 1fr) 72px;
}

.raid-summary-bars .report-bar-row {
  grid-template-columns: 240px 88px minmax(120px, 1fr) 78px;
}

.raid-actor-row.support .report-spell {
  color: #ff5db4;
}

.raid-actor-row.player .report-spell {
  color: var(--teal);
}

.raid-actor-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
}

.report-bar-fill.raid {
  background: linear-gradient(90deg, #f25aa9, #b83b85);
}

.raid-actor-row.player .report-bar-fill.raid {
  background: linear-gradient(90deg, var(--teal), #287e74);
}

.report-spell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-left: var(--indent, 0px);
  color: #ffd100;
  text-decoration: none;
}

.tree-marker {
  width: 16px;
  flex: 0 0 16px;
  color: #9aa6ba;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.report-spell span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-metric {
  color: #f5f7fb;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-bar-track {
  height: 12px;
  border: 1px solid #111;
  background: #111;
  overflow: hidden;
}

.report-bar-fill {
  display: block;
  width: var(--bar);
  height: 100%;
  background: linear-gradient(90deg, #ffd100, #f2b318);
}

.report-bar-fill.buff {
  background: #d7ae79;
}

.report-bar-fill.cool {
  background: #7ec8e3;
}

.report-bar-fill.green {
  background: #9fd163;
}

.sample-note {
  margin: 10px 20px 0;
  padding: 13px 16px;
  background: #f2b62d;
  color: #111;
  font-weight: 800;
}

.sample-log {
  display: grid;
  gap: 1px;
  max-height: 420px;
  overflow: auto;
  padding: 14px 20px 18px;
}

.empty-report-row {
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
}

.sample-row {
  display: grid;
  grid-template-columns: 72px 210px 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 31px;
  color: #dce0e8;
  font-size: 13px;
}

.sample-time {
  color: #8d94a4;
  font-variant-numeric: tabular-nums;
}

.sample-buffs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.sample-buffs .spell-icon-link,
.constant-buff-icons .spell-icon-link,
.report-spell .spell-icon-link {
  flex: 0 0 auto;
}

.quick-report-side {
  position: sticky;
  top: 18px;
}

.report-side-card {
  padding: 12px;
}

.report-side-card h3 {
  color: #171717;
  background: #66666c;
  margin: -12px -12px 12px;
  padding: 12px;
}

.detail-banner {
  padding: 14px 8px;
  border-bottom: 1px solid #2b2b2b;
}

.detail-banner b {
  display: block;
  color: #fff;
  letter-spacing: 3px;
}

.detail-banner span {
  color: #e5e8ef;
  font-size: 13px;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid #2b2b2b;
}

.detail-list dt {
  color: #c7ccd6;
  font-size: 12px;
}

.detail-list dd {
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.report-side-card input {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid #555967;
  background: #1d2029;
  color: #fff;
  padding: 10px;
}

.builder-section,
.compare-card {
  border: 1px solid var(--line);
  background: var(--field);
  padding: 16px;
}

.topgear-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 18px;
}

.gear-workbench {
  min-width: 0;
}

.workbench-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.talent-loadouts {
  border: 0;
  background: transparent;
  margin-top: 18px;
  margin-bottom: 0;
  padding: 0;
}

.talent-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.talent-card {
  min-width: 0;
  height: 292px;
  display: grid;
  grid-template-rows: 16px 24px 124px 46px 14px 24px;
  align-items: start;
  justify-items: center;
  gap: 3px;
  border: 1px solid #4a4650;
  background: #242424;
  color: var(--text);
  padding: 10px 8px 8px;
  text-align: center;
}

.talent-card:hover {
  border-color: rgba(216, 168, 79, 0.72);
  background: #302e36;
}

.talent-card.selected {
  border-color: rgba(240, 180, 41, 0.72);
  background: #272521;
}

.talent-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  color: #d8d8d8;
  font-size: 18px;
  line-height: 22px;
}

.talent-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.talent-card small {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.talent-preview {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.talent-tree-svg {
  width: 47%;
  max-width: 112px;
  height: 124px;
  overflow: visible;
}

.talent-tree-svg line {
  stroke: rgba(95, 103, 118, 0.34);
  stroke-width: 1.1;
  stroke-linecap: round;
}

.talent-tree-svg line.active {
  stroke: rgba(255, 210, 0, 0.72);
}

.talent-tree-svg line.gate {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.8;
  stroke-dasharray: 3 3;
}

.talent-tree-svg circle {
  fill: #444;
  stroke: rgba(20, 20, 20, 0.75);
  stroke-width: 0.8;
}

.talent-tree-svg circle.active {
  fill: #ffd200;
  stroke: rgba(255, 226, 93, 0.85);
}

.talent-tree-svg.muted {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.talent-tree-svg text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.talent-icons {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 3px;
  height: 46px;
  overflow: hidden;
}

.talent-icons .iconsmall {
  margin: 0;
  transform: scale(0.84);
  transform-origin: center;
}

.talent-api-status {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

.talent-copy {
  min-width: 44px;
  border: 0;
  background: #4a4a4a;
  color: #dedede;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-tabs,
.toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button,
.text-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 0 11px;
}

.filter-tabs button.selected,
.filter-tabs button:hover {
  color: var(--text);
  border-color: rgba(216, 168, 79, 0.62);
  background: rgba(216, 168, 79, 0.08);
}

.slot-grid {
  display: grid;
  gap: 10px;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.slot-cell {
  min-width: 0;
}

.slot-group {
  height: 100%;
  border: 0;
  background: transparent;
}

.slot-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 4px;
  border-bottom: 0;
  background: transparent;
}

.slot-head h3 {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}

.slot-head span {
  font-size: 12px;
  color: var(--muted);
}

.item-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0;
}

.item-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  height: 86px;
  border: 1px solid #4a4650;
  background: #29282f;
  overflow: hidden;
  padding: 7px 8px;
  position: relative;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.item-card:last-child {
  border-bottom: 1px solid #4a4650;
}

.item-card:hover {
  border-color: rgba(216, 168, 79, 0.72);
  background: #302e36;
}

.item-card.selected {
  border-color: #f0b429;
  background: #202024;
}

.item-card.focused {
  box-shadow: inset 0 0 0 1px rgba(117, 167, 255, 0.72);
  outline: 0;
}

.item-card.disabled {
  opacity: 0.72;
}

.item-settings-button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #5f6776;
  background: #171b22;
  color: var(--gold);
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.item-settings-button:hover,
.item-settings-button:focus-visible {
  border-color: var(--gold);
  background: #2a2416;
  background: var(--gold);
  color: #17120a;
}

.item-icon-link {
  grid-column: 1;
  width: 52px;
  height: 52px;
  display: block;
  overflow: hidden;
  align-self: start;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
}

.item-icon-link .iconmedium {
  margin: 0;
  vertical-align: top;
  transform: scale(1.45);
  transform-origin: top left;
}

.low-level-notice {
  padding: 2px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.low-level-notice button {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font: inherit;
}

.low-level-notice button:hover {
  text-decoration: underline;
}

.item-info {
  grid-column: 2;
  display: grid;
  grid-template-rows: 18px 15px 22px;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.item-name-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #f0b429;
  text-decoration: none;
  font-weight: 800;
}

.wowhead-item-link .iconmedium,
.chart-card .iconsmall {
  margin-right: 8px;
  vertical-align: middle;
}

.item-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9c1d7;
  font-size: 11px;
}

.item-meta span + span::before {
  content: " · ";
}

.item-state {
  grid-column: 3;
  display: block;
  justify-self: end;
  align-self: start;
}

.item-state b,
.item-state small {
  font-size: 11px;
}

.item-state b {
  color: var(--text);
}

.item-state small {
  color: var(--muted);
  display: none;
}

.state-pill {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
}

.state-pill.enabled {
  border-color: rgba(216, 168, 79, 0.58);
  color: var(--gold);
}

.state-pill.disabled {
  color: var(--muted);
}

.item-card-actions {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.item-detail-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 0;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: transparent;
}

.item-context-menu {
  position: fixed;
  z-index: 40;
  width: min(330px, calc(100vw - 24px));
  border: 1px solid rgba(216, 168, 79, 0.55);
  background: #111720;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.menu-head {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.menu-head a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.menu-head button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
}

.menu-actions {
  display: block;
  padding: 12px;
}

.menu-toggle-row {
  height: 40px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
}

.menu-toggle-row input {
  width: 16px;
  height: 16px;
}

.menu-form {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.menu-form label {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.menu-form input[readonly] {
  color: var(--gold);
}

.menu-form select:disabled {
  opacity: 0.55;
}

.gem-field-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.gem-field-list select {
  width: 100%;
}

.menu-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.menu-footer .primary-button,
.menu-footer .secondary-button {
  width: 100%;
}

.item-detail-tags em {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(64, 184, 170, 0.38);
  background: rgba(64, 184, 170, 0.09);
  color: #62dfc9;
  font-style: normal;
  font-size: 10px;
  line-height: 16px;
  padding: 0 5px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.toggle-stack,
.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.switch-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}

.switch-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.choice-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}

.choice-list input {
  width: 16px;
  height: 16px;
}

.upgrade-control {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.upgrade-control input {
  padding: 0;
}

.upgrade-control div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.check-list,
.stage-list,
.advanced-grid {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.check-list label,
.advanced-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.check-list input,
.advanced-grid input {
  width: 16px;
  height: 16px;
}

.stage-list div {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}

.stage-list span {
  color: var(--muted);
  font-size: 12px;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ranking-table th,
.ranking-table td {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.ranking-table th {
  color: var(--muted);
  font-weight: 600;
}

.topgear-result-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.topgear-result-cell.icon-only {
  gap: 0;
}

.topgear-result-cell strong {
  min-width: 94px;
  color: var(--text);
  font-weight: 800;
}

.topgear-result-cell small {
  color: var(--muted);
}

.topgear-result-cell.equipped {
  display: grid;
  gap: 3px;
}

.topgear-change-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.topgear-change-icons em {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid #4b5362;
  color: var(--gold);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.topgear-change-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #5c6472;
  background: #11151c;
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  text-decoration: none;
}

.topgear-change-icon .iconmedium,
.topgear-change-icon .iconsmall {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  display: block !important;
  position: static !important;
  vertical-align: top;
}

.topgear-change-icon .iconmedium ins,
.topgear-change-icon .iconsmall ins {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
  position: static !important;
  background-size: 28px 28px !important;
}

.topgear-change-icon .tinyicon,
.topgear-change-icon span:not(.iconmedium):not(.iconsmall),
.topgear-change-icon b {
  display: none !important;
}

.topgear-change-chip {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #5c6472;
  background: #151b26;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.compare-card {
  display: grid;
  gap: 12px;
}

.wowhead-item-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  min-height: 42px;
}

.wowhead-item-link:hover {
  color: var(--gold);
}

.compare-card span {
  color: var(--green);
  font-weight: 800;
}

.dungeon-grid,
.advanced-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}

.dungeon-grid {
  display: grid;
  gap: 12px;
}

.dungeon-grid button {
  min-height: 74px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  text-align: left;
  padding: 0 18px;
}

.dungeon-grid button:hover {
  border-color: rgba(216, 168, 79, 0.6);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
}

.status-dot.done {
  background: var(--green);
}

.status-dot.running {
  background: var(--amber);
}

.status-dot.queued {
  background: var(--blue);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tool-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .topgear-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .compare-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .header {
    align-items: start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 28px;
  }

  .tool-nav,
  .workflow-nav,
  .input-mode-tabs,
  .queue-layout,
  .slot-row,
  .talent-list,
  .summary-grid,
  .armory-grid,
  .option-strip,
  .parse-strip,
  .right-rail,
  .result-grid,
  .topgear-layout,
  .item-options,
  .compare-grid,
  .dungeon-grid,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 260px;
  }

  .simc-editor {
    height: 260px;
  }

  .chart-card div {
    grid-template-columns: 1fr 56px;
  }

  .chart-card div a {
    grid-column: 1 / -1;
  }

  .quick-report-layout,
  .quick-hero,
  .report-bar-row,
  .buff-bars .report-bar-row,
  .sample-row {
    grid-template-columns: 1fr;
  }

  .quick-report-side {
    position: static;
  }

  .constant-buff-icons {
    grid-column: auto;
  }

  .report-metric {
    text-align: left;
  }

  .report-spell {
    padding-left: 0;
  }

  .item-card {
    grid-template-columns: 52px minmax(0, 1fr) 44px;
  }

  .item-state {
    grid-column: 3;
  }

  .slot-cell:empty {
    display: none;
  }
}
