: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);
  --soft-gold: rgba(216, 168, 79, 0.08);
  --soft-teal: rgba(64, 184, 170, 0.1);
  --control: #111720;
  --control-hover: #1c2430;
  --canvas: #05080d;
  --rio-item-link: #ffd75a;
  --rio-stat-strong: #f2d28a;
  --rio-progress-start: #d8a84f;
  --rio-progress-end: #65c7b9;
  --rio-rate-core: #ffd86f;
  --rio-rate-core-rgb: 255, 216, 111;
  --rio-rate-high: #78df8e;
  --rio-rate-high-rgb: 120, 223, 142;
  --rio-rate-mid: #65c7b9;
  --rio-rate-mid-rgb: 101, 199, 185;
  --rio-rate-low: #7f9ce7;
  --rio-rate-low-rgb: 127, 156, 231;
  --rio-rate-none: #354154;
  --rio-rate-none-rgb: 53, 65, 84;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --field: #f8fafc;
  --line: #d7e0ea;
  --text: #17202c;
  --muted: #5d6b7e;
  --gold: #a76713;
  --teal: #087d76;
  --blue: #2868d8;
  --green: #34843d;
  --red: #c9403b;
  --amber: #b7791f;
  --shadow: 0 18px 42px rgba(31, 45, 61, 0.12);
  --soft-gold: rgba(167, 103, 19, 0.1);
  --soft-teal: rgba(8, 125, 118, 0.1);
  --control: #eef3f8;
  --control-hover: #e4ebf3;
  --canvas: #edf2f7;
  --rio-item-link: #6f4300;
  --rio-stat-strong: #744500;
  --rio-progress-start: #a76713;
  --rio-progress-end: #087d76;
  --rio-rate-core: #8a5300;
  --rio-rate-core-rgb: 138, 83, 0;
  --rio-rate-high: #247634;
  --rio-rate-high-rgb: 36, 118, 52;
  --rio-rate-mid: #087d76;
  --rio-rate-mid-rgb: 8, 125, 118;
  --rio-rate-low: #285faf;
  --rio-rate-low-rgb: 40, 95, 175;
  --rio-rate-none: #667085;
  --rio-rate-none-rgb: 102, 112, 133;
}

* {
  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;
}

html {
  background: var(--bg);
}

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;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: block;
  min-height: 46px;
}

.brand strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
}

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

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

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

.theme-switch {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--field);
}

.theme-switch button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.theme-switch button.active,
.theme-switch button:hover {
  border-color: color-mix(in srgb, var(--gold) 54%, var(--line));
  background: var(--soft-gold);
  color: var(--text);
}

.nav-section {
  display: grid;
  gap: 7px;
}

.nav-section p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group {
  display: grid;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--field) 72%, transparent);
  padding: 7px;
}

.nav-group-title {
  min-height: 40px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 0 6px;
}

.nav-group-title span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 44%, var(--line));
  background: var(--soft-gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.nav-group-title strong {
  min-width: 0;
  font-size: 14px;
}

.nav-subnav {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.nav-sub-button {
  min-height: 36px;
  padding-left: 9px;
}

.nav-sub-button span {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.nav-group.active {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
  background: color-mix(in srgb, var(--soft-gold) 76%, var(--field));
}

.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.compact {
  min-height: 40px;
}

.tool-button strong {
  font-size: 14px;
}

.tool-button span,
.roadmap-link 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;
}

.roadmap-link {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  border: 1px solid rgba(42, 52, 67, 0.8);
  background: rgba(14, 18, 24, 0.72);
  padding: 8px 10px;
  color: var(--muted);
}

.roadmap-link span {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  background: var(--control);
}

.roadmap-link strong,
.roadmap-link small {
  display: block;
  min-width: 0;
}

.roadmap-link strong {
  color: var(--text);
  font-size: 13px;
}

.roadmap-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.tool-button.active,
.tool-button:hover {
  color: var(--text);
  background: var(--soft-gold);
  border-left-color: var(--gold);
}

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

.roadmap-link:hover {
  border-color: rgba(64, 184, 170, 0.45);
}

.sidebar-card,
.panel {
  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;
  width: 100%;
  max-width: 1800px;
  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,
.auth-actions,
.segmented {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-user-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 0 12px;
  color: var(--text);
  font-weight: 800;
}

.auth-user-chip:hover {
  border-color: rgba(216, 168, 79, 0.56);
  color: var(--gold);
}

.auth-user-chip:focus-visible {
  outline: 2px solid rgba(216, 168, 79, 0.75);
  outline-offset: 2px;
}

.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;
}

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

.workflow-nav[hidden],
.workflow-nav.is-hidden {
  display: none !important;
}

.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(auto-fit, minmax(min(100%, 190px), 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: var(--panel-2);
  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: var(--soft-gold);
  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 var(--line);
  background: var(--panel-2);
  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-section textarea {
  width: 100%;
  margin: 12px 0 0;
}

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

.my-character-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: end;
  padding: 14px 0 0;
}

.my-character-picker label {
  min-width: 0;
}

.my-character-picker .select2-container {
  width: 100% !important;
}

.my-character-picker .select2-container--default .select2-selection--single {
  height: 54px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 0;
}

.my-character-picker .select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 52px;
  padding: 4px 38px 4px 8px;
  color: var(--text);
  line-height: 1.1;
}

.my-character-picker .select2-container--default .select2-selection--single .select2-selection__placeholder {
  display: block;
  padding: 16px 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.my-character-picker .select2-container--default .select2-selection--single .select2-selection__arrow {
  width: 34px;
  height: 52px;
}

.my-character-picker .select2-container--default.select2-container--open .select2-selection--single,
.my-character-picker .select2-container--default .select2-selection--single:focus {
  border-color: rgba(216, 168, 79, 0.72);
}

.select2-container--default .select2-dropdown {
  overflow: hidden;
  border: 1px solid rgba(216, 168, 79, 0.45);
  background: var(--panel);
  color: var(--text);
  border-radius: 0;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.select2-container--default .select2-search--dropdown {
  padding: 8px;
  background: var(--panel-2);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  min-height: 34px;
}

.select2-container--default .select2-results__option {
  padding: 0;
}

.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(216, 168, 79, 0.14);
  color: var(--text);
}

.my-character-select-option {
  min-height: 64px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: var(--text);
}

.my-character-select-option.compact {
  min-height: 42px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 0;
}

.my-character-select-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--select-class-color, #d8a84f) 54%, var(--line));
  background: rgba(255, 255, 255, 0.05);
}

.my-character-select-option.compact .my-character-select-icon {
  width: 34px;
  height: 34px;
}

.my-character-select-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-character-select-icon span {
  color: var(--select-class-color, var(--gold));
  font-weight: 900;
}

.my-character-select-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.my-character-select-main strong,
.my-character-select-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-character-select-main strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--select-class-color, var(--text));
  font-size: 13px;
}

.my-character-select-main strong em {
  border: 1px solid rgba(216, 168, 79, 0.5);
  color: var(--gold);
  padding: 2px 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.my-character-select-main small {
  color: var(--muted);
  font-size: 12px;
}

.my-character-select-guild {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

.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 .wide-option {
  grid-column: 1 / -1;
}

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

.runner-selector {
  display: grid;
  gap: 8px;
  margin: 14px 18px 18px;
}

.runner-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.runner-option {
  min-height: 54px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 10px 12px;
  cursor: pointer;
}

.runner-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--gold);
}

.runner-option b,
.runner-option small {
  display: block;
}

.runner-option b {
  color: var(--text);
  font-size: 13px;
}

.runner-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.runner-option.selected {
  border-color: rgba(216, 168, 79, 0.7);
  background: rgba(216, 168, 79, 0.08);
}

.runner-option.disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.local-runner-download {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(216, 168, 79, 0.32);
  background: rgba(216, 168, 79, 0.07);
  padding: 12px;
}

.local-runner-download[hidden] {
  display: none;
}

.local-runner-download b {
  color: var(--gold);
  font-size: 13px;
}

.local-runner-download p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.download-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 168, 79, 0.72);
  background: rgba(216, 168, 79, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.download-button:hover {
  background: rgba(216, 168, 79, 0.2);
}

.profile-summary {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin: 14px 0 0;
  padding: 14px;
  color: var(--muted);
}

.profile-summary-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-summary-title b {
  color: var(--text);
  font-size: 16px;
}

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

.profile-summary-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.profile-summary-icons.talent {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-summary-icons a,
.profile-summary-icons .iconmedium,
.profile-summary-icons .iconsmall {
  line-height: 1;
}

.profile-summary-icons > a {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  color: transparent;
  font-size: 0;
  text-decoration: none;
}

.profile-summary-talent-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.profile-summary-talent-list > a {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  color: transparent;
  font-size: 0;
  text-decoration: none;
}

.profile-summary-icons > a .iconmedium,
.profile-summary-icons > a .iconsmall,
.profile-summary-talent-list > a .iconmedium,
.profile-summary-talent-list > a .iconsmall {
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  display: block !important;
  position: static !important;
}

.profile-summary-icons > a .iconmedium ins,
.profile-summary-icons > a .iconsmall ins,
.profile-summary-talent-list > a .iconmedium ins,
.profile-summary-talent-list > a .iconsmall ins {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  position: static !important;
  background-size: 22px 22px !important;
}

.profile-summary-icons > a .iconmedium del,
.profile-summary-icons > a .iconsmall del,
.profile-summary-talent-list > a .iconmedium del,
.profile-summary-talent-list > a .iconsmall del {
  display: none !important;
}

.profile-summary-icons > a span:not(.iconmedium):not(.iconsmall),
.profile-summary-icons > a b,
.profile-summary-icons > a small,
.profile-summary-talent-list > a span:not(.iconmedium):not(.iconsmall),
.profile-summary-talent-list > a b,
.profile-summary-talent-list > a small {
  display: none !important;
}

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

.profile-summary .talent-api-status {
  color: var(--gold);
  font-size: 12px;
}

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: 100%;
  min-height: 330px;
  margin: 0;
  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;
}

:root[data-theme="light"] .simc-editor {
  background: #f7f9fc;
}

:root[data-theme="light"] .simc-line-numbers {
  border-right-color: var(--line);
  background: #edf2f7;
  color: #6b7788;
}

:root[data-theme="light"] .simc-highlight {
  color: #243143;
}

:root[data-theme="light"] .simc-comment {
  color: #3f7a51;
}

:root[data-theme="light"] .simc-key,
:root[data-theme="light"] .simc-string {
  color: #087d76;
}

:root[data-theme="light"] .simc-talent-key {
  color: #8b48bd;
}

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 {
  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(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  justify-content: stretch;
}

.talent-card {
  min-width: 0;
  min-height: 332px;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 70px;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px;
  text-align: center;
}

.talent-card:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background: color-mix(in srgb, var(--gold) 8%, var(--panel-2));
}

.talent-card.selected {
  border-color: color-mix(in srgb, var(--gold) 74%, var(--line));
  background: var(--soft-gold);
}

.talent-card-head {
  display: grid;
  grid-template-rows: 14px 22px;
  align-items: start;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

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

.talent-status {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.talent-preview {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow: hidden;
}

.talent-tree-panel {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.talent-tree-svg {
  width: 100%;
  height: 196px;
  overflow: visible;
}

.talent-tree-svg line {
  stroke: rgba(95, 103, 118, 0.46);
  stroke-width: 1.25;
  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: color-mix(in srgb, var(--muted) 42%, var(--panel-2));
  stroke: color-mix(in srgb, var(--text) 32%, var(--panel-2));
  stroke-width: 0.9;
}

.talent-tree-svg circle.active {
  fill: var(--gold);
  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-spell-icons,
.talent-icons {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 3px;
  overflow: hidden;
}

.talent-spell-icons {
  max-height: 78px;
}

.talent-icons {
  justify-content: center;
  align-content: center;
  height: 46px;
}

.talent-empty,
.talent-extra {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
}

.talent-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.talent-card-icons {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}

.talent-card-icon-row {
  min-width: 0;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.talent-card-icons a,
.talent-card-icons .iconsmall {
  flex: 0 0 auto;
  margin: 0;
}

.talent-card-icons > a .iconsmall {
  display: block;
}

.talent-card-icons a span:not(.iconsmall),
.talent-card-icons a b,
.talent-card-icons a small {
  display: none !important;
}

.talent-card-icons-empty {
  width: 1px;
  height: 1px;
}

.talent-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.talent-extra {
  min-width: 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

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

.talent-api-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  align-self: center;
}

.talent-copy {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 0;
  background: #4a4a4a;
  color: #dedede;
  padding: 0;
  border-radius: 4px;
  font-size: 16px;
  line-height: 28px;
  font-weight: 800;
  text-align: center;
}

.talent-copy::before {
  content: "⧉";
}

.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: 56px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  height: 86px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: visible;
  padding: 7px 8px 7px 10px;
  position: relative;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.item-card:last-child {
  border-bottom: 1px solid var(--line);
}

.item-card:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background: color-mix(in srgb, var(--gold) 8%, var(--panel-2));
}

.item-card.selected {
  border-color: var(--gold);
  background: var(--soft-gold);
}

.item-card.focused {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 72%, transparent);
  outline: 0;
}

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

.item-settings-button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  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: var(--gold);
  color: #17120a;
}

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

.item-icon-link .iconmedium {
  margin: 0;
  display: block;
  transform: scale(1.33);
  transform-origin: center;
}

.item-icon-link .iconmedium ins {
  display: block;
}

.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: var(--rio-item-link);
  text-decoration: none;
  font-weight: 800;
}

.chart-card .iconsmall {
  margin-right: 8px;
  vertical-align: middle;
}

.item-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

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

.item-ilvl-meta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  vertical-align: top;
}

.ilvl-paren {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.ilvl-plus {
  color: var(--quiet);
  font-size: 10px;
  line-height: 1;
}

.craft-quality-icon {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: -4px;
}

.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;
}

.inline-item-search {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--field) 74%, transparent);
}

.inline-item-search-main,
.inline-item-selected,
.inline-item-options {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.inline-item-selected {
  grid-template-columns: minmax(220px, 1fr) 150px;
}

.inline-item-options {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.inline-item-options .menu-toggle-row {
  align-self: end;
}

.inline-item-options .add-item-toggle {
  display: flex;
  min-height: 38px;
  height: auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  line-height: 1.25;
  white-space: normal;
}

.inline-item-options .add-item-toggle input {
  flex: 0 0 auto;
}

.inline-item-options .add-item-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-item-options .add-item-gems {
  grid-column: span 2;
}

.inline-item-options .primary-button {
  align-self: end;
}

.inline-item-search label,
.inline-item-selected label,
.inline-item-options label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inline-item-search input,
.inline-item-search select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 10px;
}

.inline-item-options .gem-field-list {
  display: grid;
  gap: 6px;
}

.item-combobox-label {
  position: relative;
}

.item-combobox {
  position: relative;
}

.item-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 38;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.item-search-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.item-search-result:last-child {
  border-bottom: 0;
}

.item-search-result:hover,
.item-search-result:focus {
  outline: 0;
  background: var(--soft-gold);
}

.item-search-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line));
  background: var(--field);
}

.item-search-icon,
.item-search-icon * {
  pointer-events: none;
}

.item-search-icon img,
.item-search-icon a,
.item-search-icon .wowhead-tooltip-icon,
.item-search-icon-fallback {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.item-search-icon img {
  object-fit: cover;
}

.item-search-icon-fallback {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 30%, transparent), transparent 48%),
    var(--field);
}

.item-search-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.item-search-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.quality-poor {
  color: #9d9d9d;
}

.quality-common {
  color: #ffffff;
}

.quality-uncommon {
  color: #1eff00;
}

.quality-rare {
  color: #0070dd;
}

.quality-epic {
  color: #a335ee;
}

.quality-legendary {
  color: #ff8000;
}

.quality-artifact {
  color: #e6cc80;
}

.quality-heirloom {
  color: #00ccff;
}

.selected-item-preview a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gold);
  text-decoration: none;
  font-weight: 800;
}

.item-search-meta,
.selected-item-preview span,
.item-search-empty,
.inline-message {
  color: var(--muted);
  font-size: 12px;
}

.item-search-empty {
  margin: 0;
  padding: 10px 12px;
}

.selected-item-preview {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 7px 9px;
}

.selected-item-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.inline-message {
  min-height: 16px;
}

.inline-message.error {
  color: var(--red);
}

.inline-message.success {
  color: var(--green);
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.62);
}

.auth-modal,
.add-item-modal,
.item-edit-modal,
.wcl-note-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  width: min(440px, calc(100vw - 28px));
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  background: #15181f;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
}

.item-edit-modal {
  width: min(520px, calc(100vw - 28px));
}

.wcl-note-modal {
  width: min(680px, calc(100vw - 28px));
}

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

.modal-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.modal-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 18px 0;
}

.auth-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.selected {
  border-color: rgba(216, 168, 79, 0.72);
  color: var(--gold);
  background: rgba(216, 168, 79, 0.1);
}

.auth-register-only[hidden],
.auth-login-only[hidden] {
  display: none !important;
}

.wcl-note-body {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
}

.wcl-note-format-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wcl-note-format-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-weight: 900;
}

.wcl-note-format-tabs button.selected {
  border-color: rgba(216, 168, 79, 0.72);
  background: rgba(216, 168, 79, 0.1);
  color: var(--gold);
}

.wcl-note-body textarea {
  width: 100%;
  min-height: 260px;
  max-height: 46vh;
  resize: vertical;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.wcl-note-actions {
  display: flex;
  justify-content: flex-end;
}

.auth-form,
.add-item-form,
.item-edit-form {
  display: grid;
  gap: 10px;
  padding: 14px 18px 0;
}

.auth-form label,
.add-item-form label,
.item-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-form input,
.add-item-form input,
.add-item-form select,
.item-edit-form input,
.item-edit-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 11px;
}

.add-item-form {
  padding-bottom: 18px;
}

.item-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}

.item-edit-form label:nth-child(6) {
  grid-column: 1 / -1;
}

.item-edit-form .item-edit-toggle {
  display: flex;
  align-self: end;
  min-height: 40px;
}

.auth-form .menu-toggle-row {
  display: flex;
  color: var(--text);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.external-logins {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
}

.auth-switch p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-switch button {
  min-height: 36px;
  white-space: nowrap;
}

.battle-net-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(77, 167, 255, 0.64);
  background:
    linear-gradient(135deg, rgba(28, 126, 214, 0.24), rgba(27, 31, 42, 0.95) 58%),
    #101722;
  color: #eef8ff;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(21, 102, 184, 0.2);
}

.battle-net-button:hover {
  border-color: rgba(106, 190, 255, 0.88);
  background:
    linear-gradient(135deg, rgba(45, 148, 235, 0.34), rgba(27, 31, 42, 0.95) 58%),
    #111a27;
}

.battle-net-button:focus-visible {
  outline: 2px solid rgba(118, 198, 255, 0.9);
  outline-offset: 2px;
}

.battle-net-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(141, 215, 255, 0.34);
  background: radial-gradient(circle at 50% 45%, rgba(89, 194, 255, 0.32), rgba(16, 36, 56, 0.78) 68%);
}

.battle-net-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #8bd7ff;
  stroke-width: 2.6;
}

.battle-net-icon circle {
  fill: #8bd7ff;
  stroke: none;
}

.battle-net-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.battle-net-copy span {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-net-copy small {
  color: #9fc8e8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-message {
  min-height: 34px;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 13px;
}

.auth-message.error {
  color: var(--red);
}

.auth-message.success {
  color: var(--green);
}

.history-list {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.history-item,
.history-empty {
  border: 1px solid var(--line);
  background: var(--field);
  padding: 12px;
}

.history-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-align: left;
}

.history-item + .history-item {
  margin-top: 0;
}

.history-item strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item small {
  grid-column: 1 / -1;
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.history-item span {
  color: var(--gold);
  font-weight: 900;
}

.history-empty {
  color: var(--muted);
  font-size: 13px;
}

.battle-net-account {
  display: grid;
  gap: 12px;
  padding: 18px 18px 0;
}

.battle-net-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.battle-net-account-head h3 {
  font-size: 15px;
}

.battle-net-account-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.battle-net-account-content {
  display: grid;
  gap: 8px;
}

.battle-net-link-card,
.battle-net-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 12px;
}

.battle-net-link-card div,
.battle-net-empty {
  min-width: 0;
}

.battle-net-link-card b,
.battle-net-empty b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.battle-net-link-card span,
.battle-net-empty span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.battle-net-link-button {
  min-height: 38px;
  border: 1px solid rgba(77, 167, 255, 0.64);
  background: rgba(28, 126, 214, 0.18);
  color: #b9e5ff;
  padding: 0 14px;
  font-weight: 900;
  white-space: nowrap;
}

.battle-net-character-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 8px;
}

.battle-net-character {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 84px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.battle-net-character.selected {
  border-color: rgba(216, 168, 79, 0.74);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bnet-class-color, #d8a84f) 10%, transparent), transparent 64%),
    rgba(216, 168, 79, 0.08);
}

.battle-net-character:hover {
  border-color: color-mix(in srgb, var(--bnet-class-color, #76c6ff) 70%, var(--line));
}

.battle-net-character-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--bnet-class-color, #d8a84f) 50%, var(--line));
  background: rgba(255, 255, 255, 0.04);
}

.battle-net-character-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-net-character-icon span {
  color: var(--bnet-class-color, var(--gold));
  font-size: 17px;
  font-weight: 900;
}

.battle-net-character-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.battle-net-character-main strong,
.battle-net-character-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-net-character-main strong {
  color: var(--bnet-class-color, var(--text));
  font-size: 14px;
}

.battle-net-character-main small {
  color: var(--muted);
  font-size: 12px;
}

.battle-net-character-guild {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

.battle-net-character-badge {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.battle-net-character.selected .battle-net-character-badge {
  border-color: rgba(216, 168, 79, 0.64);
  color: var(--gold);
}

.rio-page {
  display: grid;
  gap: 16px;
}

.rio-meta-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--soft-gold), transparent 34%),
    linear-gradient(135deg, var(--panel-2), var(--panel) 72%);
}

.rio-meta-title {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.rio-season-pill {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(244, 200, 78, 0.42);
  background: rgba(244, 200, 78, 0.1);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.rio-meta-title h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  color: var(--text);
}

.rio-meta-title p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.rio-meta-source {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--field);
  text-align: right;
}

.rio-meta-source span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.rio-meta-source b {
  color: var(--text);
  font-size: 18px;
}

.rio-meta-source small {
  color: var(--muted);
  font-size: 12px;
}

.rio-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--field);
}

.rio-filter-bar label {
  min-width: 180px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rio-filter-bar select {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}

.rio-dungeon-filter-bar {
  display: block;
  padding: 10px 12px 12px;
}

.rio-hidden-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.rio-spec-filter-bar {
  align-items: end;
}

.rio-filter-dungeon-picker {
  flex: 1 1 100%;
  min-width: 0;
}

.rio-affix-filter {
  flex: 0 1 220px;
}

.rio-dungeon-picker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.rio-dungeon-option {
  position: relative;
  flex: 0 0 124px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090d14;
  color: var(--text);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.rio-dungeon-option img,
.rio-dungeon-option > span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.rio-dungeon-option::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 8, 13, 0.05), rgba(5, 8, 13, 0.82)),
    linear-gradient(90deg, rgba(5, 8, 13, 0.48), rgba(5, 8, 13, 0.12));
}

.rio-dungeon-option b {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  z-index: 1;
  color: #f4f7fb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.rio-dungeon-option.active {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 2px rgba(246, 205, 111, 0.44),
    0 0 0 1px rgba(246, 205, 111, 0.12);
}

.rio-dungeon-option.all-stats {
  background:
    linear-gradient(135deg, rgba(216, 168, 79, 0.24), rgba(64, 184, 170, 0.12)),
    var(--panel-2);
}

.rio-dungeon-option.all-stats > span {
  color: var(--gold);
  font-size: 24px;
}

.rio-dungeon-option.all-stats::after {
  background:
    linear-gradient(180deg, rgba(5, 8, 13, 0.08), rgba(5, 8, 13, 0.72)),
    linear-gradient(90deg, rgba(216, 168, 79, 0.24), rgba(64, 184, 170, 0.1));
}

.rio-dungeon-option.active::after {
  background:
    linear-gradient(180deg, rgba(246, 205, 111, 0.02), rgba(5, 8, 13, 0.72)),
    linear-gradient(90deg, rgba(5, 8, 13, 0.42), rgba(5, 8, 13, 0.08));
}

.wcl-encounter-filter-bar {
  display: block;
  padding: 10px 12px 12px;
}

.wcl-encounter-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  min-width: 0;
  overflow: visible;
  padding: 2px;
}

.wcl-encounter-option {
  position: relative;
  min-width: 0;
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(34px, 1fr) auto;
  gap: 5px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--teal));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 13%, transparent), transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), var(--field));
  color: var(--text);
  padding: 6px;
  text-align: left;
  cursor: pointer;
}

.wcl-encounter-option::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid transparent;
  pointer-events: none;
}

.wcl-encounter-option:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 13%, transparent), transparent 54%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent), var(--field));
}

.wcl-encounter-option.active {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--gold) 36%, transparent),
    0 8px 24px color-mix(in srgb, var(--gold) 13%, transparent);
}

.wcl-encounter-option.active::before {
  border-top-color: var(--gold);
}

.wcl-encounter-option.all-stats {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--teal) 7%, var(--panel)), var(--field));
}

.wcl-encounter-option-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  min-height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
}

.wcl-encounter-option-art > b {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.wcl-encounter-option-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1px;
  align-content: center;
  max-height: 18px;
  overflow: hidden;
}

.wcl-encounter-option-icons .rio-spec-icon,
.wcl-encounter-option-icons .rio-spec-icon-fallback {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  margin-right: 0;
  font-size: 9px;
}

.wcl-encounter-option-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
}

.wcl-encounter-option-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.wcl-encounter-option-copy strong {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wcl-encounter-option-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-self: end;
}

.wcl-encounter-option-meta em {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel-2) 68%, transparent);
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  padding: 0 3px;
  overflow: hidden;
  font-style: normal;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-status,
.rio-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: var(--field);
}

.rio-content {
  display: grid;
  gap: 16px;
}

.rio-spec-landing,
.rio-spec-detail {
  display: grid;
  gap: 14px;
}

.rio-spec-landing-head {
  display: grid;
  gap: 4px;
}

.rio-spec-landing-head h3,
.rio-spec-detail-head h3 {
  margin: 0;
  color: var(--text);
}

.rio-spec-landing-head p,
.rio-spec-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.rio-spec-detail-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.rio-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rio-class-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, #d8a84f) 38%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--rio-class-color, #d8a84f) 11%, transparent), transparent 45%),
    var(--panel);
}

.rio-class-card header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.rio-class-token {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, #d8a84f) 62%, var(--line));
  background: var(--field);
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
}

.rio-class-token img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rio-class-token b {
  color: var(--gold);
  font-size: 18px;
}

.rio-class-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.rio-class-card small {
  color: var(--muted);
  font-size: 11px;
}

.rio-class-specs {
  display: grid;
  gap: 7px;
}

.rio-class-spec {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
}

.rio-class-spec:hover {
  border-color: color-mix(in srgb, var(--rio-class-color, #d8a84f) 74%, #d8a84f);
  background: color-mix(in srgb, var(--rio-class-color, #d8a84f) 12%, var(--panel-2));
}

.rio-class-spec .rio-spec-icon {
  width: 34px;
  height: 34px;
  margin-right: 0;
}

.rio-class-spec span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rio-class-spec strong,
.rio-class-spec small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-class-spec strong {
  font-size: 13px;
}

.rio-meta-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rio-meta-stat {
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rio-meta-stat span {
  color: #90a0b6;
  font-size: 11px;
  font-weight: 900;
}

.rio-meta-stat strong {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--rio-stat-strong);
  font-size: 18px;
  line-height: 1.12;
  white-space: nowrap;
}

.rio-meta-stat strong .rio-spec-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-right: 0;
}

.rio-meta-stat small {
  min-width: 0;
  overflow: hidden;
  color: #8490a4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.rio-kpi,
.rio-card {
  border: 1px solid var(--line);
  background: var(--panel);
}

.rio-kpi {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
}

.rio-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rio-kpi strong {
  color: var(--rio-stat-strong);
  font-size: 20px;
  line-height: 1.1;
}

.rio-grid {
  display: grid;
  gap: 14px;
}

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

.rio-spec-detail-titlebar {
  align-items: start;
}

.rio-spec-detail-titlebar .compact-button {
  justify-self: end;
}

.rio-spec-gear-grid {
  align-items: start;
}

.rio-spec-gear-grid > .rio-card {
  min-width: 0;
  overflow: hidden;
}

.rio-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.rio-tier-card {
  gap: 14px;
}

.rio-tier-card .rio-card-title-row {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.rio-tier-card .rio-role-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rio-tier-card .rio-card-title-row p {
  margin: 5px 0 0;
  color: #8e9aab;
  font-size: 12px;
}

.rio-tier-list {
  display: grid;
  gap: 8px;
}

.rio-tier-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 72px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rio-tier-label {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.rio-tier-label b {
  font-size: 30px;
  line-height: 1;
}

.rio-tier-label span {
  color: #8793a6;
  font-size: 11px;
  font-weight: 900;
}

.rio-tier-row[data-tier="S"] .rio-tier-label b {
  color: var(--rio-rate-core);
}

.rio-tier-row[data-tier="A"] .rio-tier-label b {
  color: var(--rio-rate-high);
}

.rio-tier-row[data-tier="B"] .rio-tier-label b {
  color: var(--rio-rate-low);
}

.rio-tier-row[data-tier="C"] .rio-tier-label b {
  color: #b3becf;
}

.rio-tier-specs {
  --rio-tier-spec-width: 220px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--rio-tier-spec-width));
  align-content: center;
  justify-content: start;
  gap: 8px;
  padding: 10px;
}

.rio-tier-spec {
  width: var(--rio-tier-spec-width);
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 6px 8px;
  text-align: left;
}

.rio-tier-spec:hover {
  border-color: var(--gold);
  background: var(--soft-gold);
}

.rio-tier-spec .rio-spec-icon {
  width: 32px;
  height: 32px;
  margin-right: 0;
}

.rio-tier-spec span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rio-tier-spec strong,
.rio-tier-spec small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-tier-spec strong {
  color: var(--text);
  font-size: 13px;
}

.rio-tier-spec small {
  color: var(--muted);
  font-size: 11px;
}

.rio-tier-empty {
  align-self: center;
  color: #6f7b8e;
  font-size: 12px;
  font-weight: 900;
}

.rio-dungeon-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.rio-dungeon-card .rio-table-list {
  align-self: stretch;
  align-content: center;
}

.rio-role-card {
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.rio-card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 10px;
}

.home-page {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.home-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  align-items: stretch;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 45%),
    linear-gradient(315deg, color-mix(in srgb, var(--teal) 12%, transparent), transparent 42%),
    var(--panel);
}

.home-community-hero {
  border-color: color-mix(in srgb, var(--gold) 30%, var(--line));
}

.home-hero-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 0;
}

.home-hero h2 {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
}

.home-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 18px;
}

.home-community-snapshot {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.home-community-snapshot span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--field) 74%, transparent);
  padding: 13px;
}

.home-community-snapshot b {
  color: var(--text);
  font-size: 15px;
}

.home-community-snapshot small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-content {
  display: grid;
  gap: 16px;
}

.home-community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.home-community-feed {
  min-height: 100%;
}

.home-community-directory {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-board-card {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 11px;
  text-align: left;
}

.home-board-card.featured {
  grid-column: 1 / -1;
  min-height: 104px;
  border-color: color-mix(in srgb, var(--gold) 44%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 48%),
    var(--panel);
}

.home-board-card:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background: var(--soft-gold);
}

.home-board-card span:not(.home-board-icon) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-board-card strong,
.home-board-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-board-card strong {
  color: var(--text);
  font-size: 13px;
}

.home-board-card.featured strong {
  font-size: 16px;
}

.home-board-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.home-board-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  color: var(--gold);
}

.home-board-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-grid,
.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.home-feed-card,
.home-meta-card {
  min-width: 0;
  align-content: start;
}

.home-list,
.home-spec-list {
  display: grid;
  gap: 8px;
}

.home-list {
  align-content: start;
}

.home-community-feed .home-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.home-board-feed {
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--field) 58%, transparent);
  padding: 10px;
}

.home-board-feed header {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.home-board-feed .home-board-icon {
  width: 32px;
  height: 32px;
}

.home-board-feed header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-board-feed header button {
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.home-board-feed header button:hover {
  border-color: color-mix(in srgb, var(--gold) 48%, var(--line));
  background: var(--soft-gold);
  color: var(--text);
}

.home-board-feed-posts {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.home-board-feed-empty {
  border: 1px dashed var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 12px;
}

.home-list-item,
.home-spec-item {
  width: 100%;
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.home-list-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-spec-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.home-list-item:hover,
.home-spec-item:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background: var(--soft-gold);
}

.home-list-item:disabled {
  cursor: default;
  opacity: 0.68;
}

.home-list-item:disabled:hover {
  border-color: var(--line);
  background: var(--panel-2);
}

.home-list-item span,
.home-spec-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-list-item strong,
.home-list-item small,
.home-spec-item strong,
.home-spec-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-list-item strong,
.home-spec-item strong {
  color: var(--text);
  font-size: 13px;
}

.home-list-item small,
.home-spec-item small {
  color: var(--muted);
  font-size: 11px;
}

.home-list-item p {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-list-item.compact {
  min-height: 52px;
  padding: 8px 9px;
}

.home-list-item.home-class-post-item {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.home-class-prefix {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--class-color, var(--gold)) 64%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--class-color, var(--gold)) 14%, var(--panel-2));
  color: color-mix(in srgb, var(--class-color, var(--gold)) 82%, var(--text));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-class-prefix img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-class-prefix b {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.home-list-item em,
.home-spec-item b {
  min-width: 38px;
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  background: color-mix(in srgb, var(--gold) 13%, var(--panel-2));
  color: var(--gold);
  padding: 4px 7px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.home-spec-item .rio-spec-icon {
  width: 34px;
  height: 34px;
  margin-right: 0;
}

.rio-card h3,
.rio-role-group h4,
.rio-talent-spec h4 {
  margin: 0;
  color: var(--text);
}

.rio-table-list,
.rio-role-list,
.rio-composition-list,
.rio-talent-list {
  display: grid;
  gap: 8px;
}

.rio-role-list {
  max-height: clamp(260px, 45vh, 420px);
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.rio-table-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 62px 74px minmax(120px, 0.9fr);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.rio-table-row span,
.rio-table-row small {
  min-width: 0;
}

.rio-table-row small {
  color: var(--muted);
  overflow: visible;
  white-space: normal;
}

.rio-table-row > span:not(.rio-dungeon-name),
.rio-table-row > small {
  align-self: center;
  justify-self: center;
  text-align: center;
}

.rio-dungeon-name {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  align-self: center;
  line-height: 1.2;
}

.rio-dungeon-name img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid #3b4658;
}

.rio-role-group {
  display: none;
  gap: 6px;
}

.rio-role-group.active {
  display: grid;
}

.rio-role-group h4,
.rio-talent-spec h4 {
  color: var(--teal);
  font-size: 13px;
}

.rio-role-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.rio-role-tabs button {
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

.rio-role-tabs button.active {
  border-color: var(--gold);
  background: var(--soft-gold);
  color: var(--gold);
}

.rio-share-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1.4fr) 58px 48px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  font-size: 12px;
}

.rio-share-row span {
  min-width: 0;
}

.rio-share-row i {
  height: 10px;
  background: var(--field);
  border: 1px solid var(--line);
}

.rio-share-row i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rio-progress-start), var(--rio-progress-end));
}

.rio-share-row strong,
.rio-share-row small {
  text-align: right;
}

.rio-composition {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

#rioSpecCraftedItems,
#rioSpecTrinkets,
#rioSpecComps {
  max-width: 100%;
  max-height: clamp(260px, 45vh, 420px);
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.wcl-filter-bar {
  align-items: end;
}

.wcl-filter-bar label {
  flex: 0 1 260px;
}

.wcl-dashboard-secondary > .rio-card,
.wcl-spec-grid > .rio-card {
  min-width: 0;
  overflow: hidden;
}

.wcl-encounter-list,
.wcl-ranking-list,
.wcl-talent-list,
#wclSpecCraftedItems,
#wclSpecTrinkets,
#wclSpecGear {
  max-width: 100%;
  max-height: clamp(260px, 45vh, 420px);
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.wcl-encounter-list,
.wcl-ranking-list,
.wcl-talent-list {
  display: grid;
  gap: 8px;
}

.wcl-talent-list {
  --wcl-talent-width: 300px;
  grid-template-columns: repeat(auto-fill, minmax(var(--wcl-talent-width), var(--wcl-talent-width)));
  justify-content: start;
}

.wcl-encounter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 104px minmax(116px, 0.7fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.wcl-encounter-row > span {
  min-width: 0;
}

.wcl-encounter-row > span:first-child {
  display: grid;
  gap: 3px;
}

.wcl-encounter-row b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-encounter-row small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-encounter-row strong {
  color: var(--rio-stat-strong);
  font-size: 13px;
  text-align: right;
}

.wcl-encounter-icons {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.wcl-encounter-icons .rio-spec-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  margin-right: 0;
}

.wcl-ranking-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px 30px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
  color: var(--text);
  text-decoration: none;
}

.wcl-ranking-row:hover {
  color: var(--text);
}

.wcl-ranking-row > b {
  color: var(--gold);
  text-align: center;
}

.wcl-ranking-row .rio-spec-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-right: 0;
}

.wcl-ranking-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wcl-ranking-row strong,
.wcl-ranking-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-ranking-row strong {
  color: var(--text);
  font-size: 13px;
}

.wcl-ranking-row small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-ranking-row em {
  color: var(--rio-stat-strong);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.wcl-talent-row {
  min-width: 0;
  width: var(--wcl-talent-width, 300px);
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(138px, 1fr) 72px 48px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.wcl-talent-link {
  width: var(--wcl-talent-width, 300px);
  max-width: 100%;
  display: block;
  color: inherit;
  text-decoration: none;
}

.wcl-talent-row .wcl-talent-name {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}

.wcl-talent-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.wcl-talent-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wcl-talent-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wcl-talent-row b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-talent-row small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-talent-row i {
  height: 10px;
  border: 1px solid var(--line);
  background: var(--field);
}

.wcl-talent-row i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rio-progress-start), var(--rio-progress-end));
}

.wcl-talent-row strong {
  color: var(--rio-stat-strong);
  text-align: right;
}

.wcl-timeline-filter-bar {
  align-items: end;
}

.wcl-timeline-native-controls {
  display: none;
}

.wcl-lorrgs-filter {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--panel-2));
  padding: 9px;
}

.wcl-lorrgs-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
}

.wcl-lorrgs-filter-label {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wcl-lorrgs-boss-list,
.wcl-lorrgs-icon-list,
.wcl-lorrgs-options {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.wcl-lorrgs-boss-button,
.wcl-lorrgs-icon-button,
.wcl-lorrgs-spec-button,
.wcl-lorrgs-option-group button {
  cursor: pointer;
  user-select: none;
}

.wcl-lorrgs-boss-button {
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
  display: grid;
  grid-template-columns: max-content;
  align-items: center;
  min-height: 34px;
  border: 1px solid transparent;
  background: var(--field);
  color: var(--text);
  padding: 4px 11px;
  opacity: 0.42;
  text-align: left;
}

.wcl-lorrgs-boss-button span {
  display: none;
}

.wcl-lorrgs-boss-button strong {
  min-width: max-content;
  overflow: visible;
  font-size: 12px;
  text-overflow: clip;
  white-space: nowrap;
}

.wcl-lorrgs-boss-button.active,
.wcl-lorrgs-boss-button:hover {
  border-color: var(--gold);
  opacity: 1;
}

.wcl-lorrgs-icon-button,
.wcl-lorrgs-spec-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: var(--field);
  color: var(--text);
  opacity: 0.36;
}

.wcl-lorrgs-icon-button {
  width: 44px;
  height: 44px;
  padding: 3px;
}

.wcl-lorrgs-spec-button {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  width: 128px;
  height: 44px;
  padding: 3px 7px 3px 3px;
  text-align: left;
}

.wcl-lorrgs-icon-button img,
.wcl-lorrgs-spec-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.wcl-lorrgs-spec-button img {
  width: 34px;
  height: 34px;
}

.wcl-lorrgs-icon-button b,
.wcl-lorrgs-spec-button b {
  color: var(--gold);
  font-size: 13px;
}

.wcl-lorrgs-spec-button span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-lorrgs-icon-button.active,
.wcl-lorrgs-spec-button.active,
.wcl-lorrgs-icon-button:hover,
.wcl-lorrgs-spec-button:hover {
  border-color: color-mix(in srgb, var(--rio-class-color, #d8a84f) 76%, #ffffff);
  opacity: 1;
}

.wcl-lorrgs-options {
  flex-wrap: wrap;
}

.wcl-lorrgs-option-group {
  display: flex;
  align-items: center;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
}

.wcl-lorrgs-option-group b {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 54px;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  padding: 0 7px;
  font-size: 11px;
}

.wcl-lorrgs-option-group span {
  display: flex;
}

.wcl-lorrgs-option-group em {
  min-height: 28px;
  display: grid;
  place-items: center;
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.wcl-lorrgs-option-group button {
  min-width: 42px;
  height: 28px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.wcl-lorrgs-option-group button:last-child {
  border-right: 0;
}

.wcl-lorrgs-option-group button.active,
.wcl-lorrgs-option-group button:hover {
  background: var(--soft-gold);
  color: var(--gold);
}

.wcl-timeline-filter-bar label {
  flex: 1 1 150px;
}

.wcl-timeline-filter-bar label:first-child {
  flex-basis: 240px;
}

.wcl-timeline-derived-control output {
  min-height: 42px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.wcl-timeline-card {
  min-width: 0;
  overflow: hidden;
}

.wcl-timeline-card .rio-card-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.wcl-timeline-spell-filters {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--panel-2));
}

.wcl-timeline-spell-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.wcl-timeline-spell-filter-label {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wcl-timeline-spell-filter-icons {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.wcl-timeline-spell-filters button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 2px;
  opacity: 0.36;
  overflow: hidden;
}

.wcl-timeline-spell-filters button.active {
  border-color: var(--gold);
  background: var(--soft-gold);
  color: var(--text);
  opacity: 1;
}

.wcl-timeline-spell-filters .wcl-timeline-lust-filter {
  border-color: color-mix(in srgb, #d94343 42%, var(--line));
}

.wcl-timeline-spell-filters .wcl-timeline-lust-filter.active {
  border-color: #f0c15f;
  box-shadow: 0 0 0 1px rgba(240, 193, 95, 0.28);
}

.wcl-timeline-spell-filters button:hover {
  opacity: 1;
}

.wcl-timeline-spell-filters b {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.wcl-timeline-spell-filters img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wcl-timeline-board {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.wcl-timeline-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.wcl-timeline-summary strong {
  color: var(--text);
  font-size: 14px;
}

.wcl-timeline-summary span {
  border: 1px solid var(--line);
  background: var(--field);
  padding: 3px 7px;
  font-weight: 800;
}

.wcl-timeline-summary .wcl-timeline-zoom {
  display: inline-grid;
  grid-template-columns: 28px 48px 28px;
  align-items: center;
  gap: 2px;
  padding: 2px;
}

.wcl-timeline-zoom button {
  width: 28px;
  height: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.wcl-timeline-zoom button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.wcl-timeline-zoom output {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.wcl-timeline-scroll {
  --wcl-timeline-label-width: 236px;
  min-width: 0;
  max-height: clamp(420px, 64vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  scrollbar-gutter: stable;
}

.wcl-timeline-header,
.wcl-timeline-row {
  min-width: calc(var(--wcl-timeline-label-width) + var(--wcl-timeline-width));
  display: grid;
  grid-template-columns: var(--wcl-timeline-label-width) var(--wcl-timeline-width);
}

.wcl-timeline-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.wcl-timeline-row {
  min-height: var(--wcl-row-height, 54px);
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.wcl-timeline-label {
  min-width: 0;
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  align-items: center;
  padding: 7px 10px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.wcl-timeline-header .wcl-timeline-label {
  z-index: 6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wcl-timeline-player-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.wcl-timeline-log-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.wcl-timeline-log-link > b {
  color: var(--gold);
  font-size: 12px;
}

.wcl-timeline-log-link .rio-spec-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-right: 0;
}

.wcl-timeline-log-link span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wcl-timeline-log-link strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-timeline-log-link strong {
  color: var(--text);
  font-size: 12px;
}

.wcl-timeline-log-link small {
  min-width: 0;
  display: grid;
  gap: 1px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.18;
}

.wcl-timeline-log-link .wcl-timeline-log-meta span {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-timeline-row-actions {
  display: grid;
  gap: 4px;
}

.wcl-timeline-note-copy,
.wcl-timeline-expand {
  width: 42px;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  padding: 0;
}

.wcl-timeline-note-copy:hover,
.wcl-timeline-note-copy:focus-visible,
.wcl-timeline-expand:hover,
.wcl-timeline-expand:focus-visible,
.wcl-timeline-expand[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--gold);
}

.wcl-timeline-track {
  position: relative;
  min-width: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 119px, rgba(255, 255, 255, 0.055) 120px),
    var(--panel-2);
}

.wcl-timeline-header .wcl-timeline-track {
  background: var(--field);
}

.wcl-timeline-boss-lane {
  position: absolute;
  left: 0;
  right: 0;
  top: 38px;
  height: 28px;
}

.wcl-timeline-tick {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.wcl-timeline-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 1px;
  height: 10px;
  background: var(--line);
}

.wcl-timeline-lane {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
}

.wcl-timeline-lane.boss {
  top: 7px;
  opacity: 0.84;
}

.wcl-timeline-lane.player {
  top: 14px;
}

.wcl-timeline-row.expanded .wcl-timeline-track {
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 119px, rgba(255, 255, 255, 0.05) 120px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 34px),
    var(--panel-2);
}

.wcl-timeline-expanded-lane {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--wcl-expanded-lane-top);
  height: 28px;
}

.wcl-timeline-expanded-name {
  position: sticky;
  left: calc(var(--wcl-timeline-label-width) + 8px);
  z-index: 1;
  display: inline-grid;
  align-items: center;
  max-width: 132px;
  height: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.wcl-timeline-cast {
  position: absolute;
  top: 1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--wcl-cast-color) 72%, #ffffff);
  background: color-mix(in srgb, var(--wcl-cast-color) 80%, #000000);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.42);
}

.wcl-timeline-cast,
.wcl-timeline-cast * {
  box-sizing: border-box;
}

.wcl-timeline-cast.instant {
  border-radius: 4px;
  transform: translateX(-50%);
}

.wcl-timeline-cast.duration {
  display: flex;
  align-items: center;
  min-width: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.wcl-timeline-cast.duration::before {
  content: "";
  position: absolute;
  inset: 3px 0 3px 0;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--wcl-cast-color) 28%, rgba(255, 255, 255, 0.34));
  border-radius: 6px;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--wcl-cast-color) 24%, rgba(255, 255, 255, 0.72)),
      color-mix(in srgb, var(--wcl-cast-color) 10%, rgba(255, 255, 255, 0.22)));
  opacity: 0.82;
  pointer-events: none;
}

.wcl-timeline-cast.boss {
  border-color: color-mix(in srgb, var(--wcl-cast-color) 80%, #ffefb1);
  background: color-mix(in srgb, var(--wcl-cast-color) 68%, #3f1620);
}

.wcl-timeline-cast.instant.has-icon {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.wcl-timeline-cast-icon,
.wcl-timeline-cast > b {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  margin: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.wcl-timeline-cast-icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.wcl-timeline-cast.duration .wcl-timeline-cast-icon,
.wcl-timeline-cast.duration > b {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 4px;
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.48);
}

.wcl-timeline-cast .iconsmall,
.wcl-timeline-cast .iconmedium,
.wcl-timeline-cast .iconlarge {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 0 !important;
  overflow: hidden !important;
  z-index: 2 !important;
}

.wcl-timeline-cast .iconsmall ins,
.wcl-timeline-cast .iconmedium ins,
.wcl-timeline-cast .iconlarge ins {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  position: static !important;
  background-size: cover !important;
  background-position: center !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.wcl-timeline-cast .iconsmall del,
.wcl-timeline-cast .iconmedium del,
.wcl-timeline-cast .iconlarge del {
  display: none !important;
}

.wcl-timeline-cast.duration .iconsmall,
.wcl-timeline-cast.duration .iconmedium,
.wcl-timeline-cast.duration .iconlarge {
  inset: auto !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  z-index: 4 !important;
}

.wcl-timeline-cast > span:not(.iconsmall):not(.iconmedium):not(.iconlarge),
.wcl-timeline-cast-name {
  display: none !important;
}

.wcl-timeline-cast:hover {
  outline: 2px solid color-mix(in srgb, var(--wcl-cast-color) 42%, #ffffff);
  outline-offset: 1px;
}

.wcl-timeline-phase {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--gold) 62%, transparent);
}

.rio-composition-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rio-composition-grid .rio-composition {
  grid-template-columns: 24px minmax(0, 1fr) 50px;
  align-content: start;
  min-height: 104px;
  padding: 9px;
  border: 1px solid rgba(44, 53, 68, 0.92);
  background: rgba(255, 255, 255, 0.018);
}

.rio-composition-grid .rio-composition > span {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
}

.rio-composition-grid .rio-composition small {
  grid-column: 1 / -1;
  grid-row: 3;
  line-height: 1.35;
  font-size: 11px;
}

.rio-composition-grid .rio-spec-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-right: 0;
}

.rio-composition b {
  color: var(--gold);
}

.rio-composition span {
  min-width: 0;
}

.rio-composition strong {
  text-align: right;
}

.rio-composition small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.rio-meta-analysis-grid {
  align-items: stretch;
}

.rio-difficulty-list,
.rio-gap-list,
.rio-presence-grid,
.rio-performance-list {
  display: grid;
  gap: 8px;
}

.rio-difficulty-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(120px, 1fr) 54px 104px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
  padding: 6px 0;
}

.rio-difficulty-row > i {
  height: 10px;
  background: var(--field);
  border: 1px solid var(--line);
}

.rio-difficulty-row > i b {
  display: block;
  height: 100%;
}

.rio-difficulty-row.easy > i b {
  background: linear-gradient(90deg, var(--rio-progress-end), var(--green));
}

.rio-difficulty-row.hard > i b {
  background: linear-gradient(90deg, var(--rio-progress-start), var(--red));
}

.rio-difficulty-row strong {
  text-align: right;
  color: var(--rio-stat-strong);
}

.rio-difficulty-row small {
  color: var(--muted);
  text-align: right;
}

.rio-gap-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 76px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
  padding: 6px 0;
}

.rio-gap-row > span {
  display: flex;
}

.rio-gap-row b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-gap-row strong {
  color: var(--gold);
  font-size: 12px;
  text-align: right;
}

.rio-gap-row.performance strong {
  color: var(--green);
}

.rio-gap-row small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}

.rio-presence-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rio-presence-band {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(44, 53, 68, 0.92);
  background: rgba(255, 255, 255, 0.018);
}

.rio-presence-band header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rio-presence-band header strong {
  color: var(--rio-stat-strong);
}

.rio-presence-band header small {
  color: var(--muted);
}

.rio-presence-band .rio-share-row {
  grid-template-columns: 30px minmax(70px, 1fr) 46px 34px;
  gap: 6px;
}

.rio-presence-band .rio-spec-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.rio-performance-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(180px, 1fr) 76px 52px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.rio-performance-row > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rio-performance-row > span b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-performance-row > i {
  position: relative;
  height: 12px;
  background: var(--field);
  border: 1px solid var(--line);
}

.rio-performance-row > i em {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: rgba(244, 200, 78, 0.62);
}

.rio-performance-row > i b {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 18px;
  background: var(--text);
}

.rio-performance-row strong,
.rio-performance-row small {
  text-align: right;
}

.rio-performance-row small {
  color: var(--muted);
}

.rio-talent-spec {
  display: grid;
  gap: 8px;
}

.rio-talent-spec h4 > span:not(.rio-spec-icon) {
  color: var(--muted);
  font-size: 12px;
}

.rio-spec-icon,
.rio-spec-icon-fallback {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid var(--line);
  background: var(--field);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.rio-spec-icon[data-role="tank"] {
  border-color: #75a7ff;
}

.rio-spec-icon[data-role="healer"] {
  border-color: #65c77d;
}

.rio-spec-icon[data-role="dps"] {
  border-color: #d7a84f;
}

.rio-spec-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rio-spec-icon b,
.rio-spec-icon-fallback {
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
}

.rio-talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 190px));
  justify-content: start;
  gap: 8px;
}

.rio-talent-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(170px, 170px));
}

.rio-talent-tree-groups {
  display: grid;
  gap: 14px;
}

.rio-talent-tree-group {
  display: grid;
  gap: 8px;
}

.rio-talent-tree-group header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rio-talent-tree-group header strong {
  color: var(--text);
  font-size: 13px;
}

.rio-talent-tree-group header small {
  color: var(--muted);
  font-size: 11px;
}

.rio-talent-board {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
}

.rio-talent-board-inner {
  position: relative;
  min-width: var(--rio-talent-board-width, 780px);
  min-height: var(--rio-talent-board-height, 640px);
  background:
    linear-gradient(rgba(112, 131, 158, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 131, 158, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(216, 168, 79, 0.16), transparent 34%),
    var(--panel);
  background-size: 52px 52px, 52px 52px, auto, auto;
}

.rio-talent-layout-board {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
}

.rio-talent-layout-inner {
  position: relative;
  width: 100%;
  height: var(--rio-talent-layout-height, 900px);
  min-width: var(--rio-talent-layout-width, 1360px);
  min-height: var(--rio-talent-layout-height, 900px);
  background:
    linear-gradient(rgba(112, 131, 158, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 131, 158, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  background-size: 48px 48px, 48px 48px, auto;
}

.rio-talent-layout-region {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.rio-talent-layout-region.class {
  border-color: rgba(102, 153, 214, 0.42);
}

.rio-talent-layout-region.spec {
  border-color: rgba(216, 168, 79, 0.46);
}

.rio-talent-layout-region.hero {
  border-color: rgba(101, 199, 185, 0.42);
  background: color-mix(in srgb, var(--soft-teal) 42%, var(--panel));
}

.rio-talent-layout-region header {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--field);
}

.rio-talent-layout-region strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-talent-layout-region small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.rio-talent-connector-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rio-talent-connector-layer line {
  stroke: #56667d;
  stroke-linecap: round;
  stroke-width: 2;
  opacity: 0.54;
  vector-effect: non-scaling-stroke;
}

.rio-talent-connector-layer line.active {
  stroke: #f1c35c;
  stroke-width: 3;
  opacity: 0.95;
  filter: drop-shadow(0 0 5px rgba(241, 195, 92, 0.42));
}

.rio-talent-layout-inner .rio-talent-node-stack {
  z-index: 3;
}

.rio-talent-node-stack {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -50%);
}

.rio-talent-node-stack.choice {
  padding: 3px;
  border: 1px solid rgba(101, 199, 185, 0.34);
  background: color-mix(in srgb, var(--soft-teal) 34%, var(--panel));
  box-shadow: 0 0 18px rgba(101, 199, 185, 0.12);
}

.rio-talent-node-stack:hover,
.rio-talent-node-stack:focus-within {
  z-index: 6;
}

.rio-talent-node {
  --rio-talent-rate-color: #d8a84f;
  --rio-talent-rate-rgb: 216, 168, 79;
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--rio-talent-rate-color);
  background: var(--control);
  color: var(--rio-talent-rate-color);
  cursor: pointer;
  font: inherit;
  font-size: 0;
  overflow: visible;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--bg), 0 0 14px rgba(var(--rio-talent-rate-rgb), 0.2);
}

.rio-talent-node-stack.choice .rio-talent-node {
  width: 34px;
  height: 34px;
}

.rio-talent-node.rate-core {
  --rio-talent-rate-color: var(--rio-rate-core);
  --rio-talent-rate-rgb: var(--rio-rate-core-rgb);
}

.rio-talent-node.rate-high {
  --rio-talent-rate-color: var(--rio-rate-high);
  --rio-talent-rate-rgb: var(--rio-rate-high-rgb);
}

.rio-talent-node.rate-mid {
  --rio-talent-rate-color: var(--rio-rate-mid);
  --rio-talent-rate-rgb: var(--rio-rate-mid-rgb);
}

.rio-talent-node.rate-low {
  --rio-talent-rate-color: var(--rio-rate-low);
  --rio-talent-rate-rgb: var(--rio-rate-low-rgb);
}

.rio-talent-node.rate-none {
  --rio-talent-rate-color: var(--rio-rate-none);
  --rio-talent-rate-rgb: var(--rio-rate-none-rgb);
}

.rio-talent-node.unselected {
  color: #7d8795;
  box-shadow: 0 0 0 1px var(--bg);
  opacity: 0.66;
}

.rio-talent-node.unselected img {
  filter: grayscale(0.55) saturate(0.65);
  opacity: 0.62;
}

.rio-talent-node.unselected b {
  background: var(--field);
  color: #7d8795;
}

.rio-talent-node:hover {
  z-index: 3;
  border-color: #fff0bf;
  box-shadow: 0 0 0 1px var(--bg), 0 0 22px rgba(var(--rio-talent-rate-rgb), 0.38);
  opacity: 1;
}

.rio-talent-node img,
.rio-talent-node > span {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.rio-talent-node > span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.rio-talent-node b {
  position: absolute;
  right: -7px;
  bottom: -6px;
  z-index: 7;
  min-width: 30px;
  padding: 1px 4px;
  border: 1px solid var(--rio-talent-rate-color);
  background: var(--field);
  color: var(--rio-talent-rate-color);
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 0 10px rgba(var(--rio-talent-rate-rgb), 0.18);
}

.rio-wowhead-tooltip-anchor {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  cursor: pointer;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: 0;
  text-decoration: none !important;
}

.rio-wowhead-tooltip-anchor::before,
.rio-wowhead-tooltip-anchor::after {
  display: none !important;
  content: none !important;
}

.rio-wowhead-tooltip-anchor * {
  display: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: 0 !important;
  text-decoration: none !important;
}

.rio-talent-node .wowhead-tooltip-icon,
.rio-talent-node .iconsmall,
.rio-talent-node .iconmedium,
.rio-talent-node .iconlarge,
.rio-talent-node ins,
.rio-talent-node del {
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.rio-talent-choice-label {
  display: none;
  position: absolute;
  right: -8px;
  top: -9px;
  border: 1px solid rgba(101, 199, 185, 0.7);
  background: #061112;
  color: #8ae6db;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 2px 4px;
}

.rio-talent {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--rio-item-link);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.rio-talent img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border: 1px solid #4b5567;
}

.rio-talent span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-talent b {
  color: #d7e2ef;
  text-align: right;
}

.rio-gear-list {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.rio-gear-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(44, 53, 68, 0.82);
}

.rio-tier-slot-row {
  grid-template-columns: 34px minmax(0, 1fr) minmax(100px, 0.8fr) 58px 78px;
}

.rio-item-row {
  grid-template-columns: 34px minmax(0, 1fr) 58px 54px;
}

.rio-gear-row > i {
  height: 10px;
  border: 1px solid var(--line);
  background: var(--field);
}

.rio-gear-row > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rio-progress-start), var(--rio-progress-end));
}

.rio-gear-slot,
.rio-gear-link {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-gear-name {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow: hidden;
}

.rio-gear-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.rio-gear-title-row .rio-gear-link {
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-gear-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--rio-item-link);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.rio-gear-name small,
.rio-gear-row > small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-gear-name small {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rio-embellishment-chip {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rio-stat-strong) 44%, var(--line));
  background: color-mix(in srgb, var(--rio-stat-strong) 10%, transparent);
  color: var(--rio-stat-strong);
  padding: 1px 5px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rio-gear-row > strong {
  color: var(--rio-stat-strong);
  font-size: 12px;
  text-align: right;
}

.rio-gear-row > small {
  text-align: right;
}

.rio-item-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: none;
}

.rio-item-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rio-attribution {
  color: #7d899b;
  font-size: 11px;
  text-align: right;
}

.rio-attribution a {
  color: var(--teal);
}

.route-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 14px;
  align-items: start;
}

.route-map-card,
.route-run-card {
  min-width: 0;
}

.route-split-view {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  align-items: start;
}

.route-single-map {
  grid-template-columns: minmax(0, 1fr);
}

.route-reference-panel,
.route-heatmap-panel {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.route-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.route-subhead strong {
  color: var(--text);
}

.route-subhead small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.route-coordinate-note {
  grid-column: 1 / -1;
  border: 1px solid rgba(64, 184, 170, 0.24);
  background: rgba(64, 184, 170, 0.06);
  color: #8fb9c5;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.route-map-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.route-map-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.route-map-head p a {
  color: var(--gold);
  font-weight: 900;
}

.route-map-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-map-tabs[hidden] {
  display: none !important;
}

.route-map-tabs button {
  min-height: 30px;
  border: 1px solid var(--line);
  background: var(--field);
  color: #9ba8ba;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.route-map-tabs button.active {
  border-color: var(--gold);
  background: var(--soft-gold);
  color: var(--gold);
}

.route-source-pill {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.route-map-canvas,
.route-reference-map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #273344;
  background: #05080d;
  touch-action: none;
  user-select: none;
}

.route-map-canvas {
  cursor: zoom-in;
}

.route-reference-map.has-dungeon-map {
  min-height: 0;
  aspect-ratio: var(--route-map-ratio, 1008 / 632);
}

.route-map-canvas.has-dungeon-map {
  min-height: 0;
  aspect-ratio: var(--route-map-ratio, 1536 / 1024);
}

.route-map-canvas.is-zoomed {
  cursor: grab;
}

.route-map-canvas.is-dragging {
  cursor: grabbing;
}

.route-map-viewport {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 11, 17, 0.08), rgba(7, 11, 17, 0.16)),
    var(--route-bg),
    linear-gradient(135deg, rgba(18, 26, 36, 0.94), rgba(5, 8, 13, 0.98));
  background-position: center;
  background-size: 100% 100%, 100% 100%, cover;
  background-repeat: no-repeat;
  transform-origin: 50% 50%;
  will-change: transform;
}

.route-tile-layer {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  z-index: 0;
}

.route-map-tile {
  position: absolute;
  display: block;
  object-fit: cover;
}

.route-map-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(112, 131, 158, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 131, 158, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
}

.route-reference-map.has-dungeon-map .route-map-grid,
.route-map-canvas.has-dungeon-map .route-map-grid {
  opacity: 0.12;
}

.route-heat-canvas,
.route-boss-layer,
.route-path-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.route-heat-canvas {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

.route-heat-canvas[hidden] {
  display: none;
}

.route-boss-layer {
  z-index: 3;
}

.route-path-layer {
  z-index: 4;
}

.route-selected-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-selected-path polyline {
  fill: none;
  stroke: #44dae6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(68, 218, 230, 0.82));
}

.route-boss-marker {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(calc(-50% + (var(--route-boss-stagger, 1) * 2px)), -50%);
  pointer-events: auto;
  border: 2px solid rgba(246, 205, 111, 0.95);
  border-radius: 50%;
  background: #080b10;
  box-shadow:
    0 0 0 2px rgba(8, 11, 16, 0.88),
    0 8px 18px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(246, 205, 111, 0.38);
  overflow: hidden;
}

.route-boss-portrait {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.route-boss-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.route-boss-portrait b {
  color: #f7d98d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.route-boss-marker.missing-portrait {
  border-color: rgba(246, 205, 111, 0.72);
  background: radial-gradient(circle at 35% 30%, rgba(246, 205, 111, 0.26), rgba(8, 11, 16, 0.94) 64%);
}

.route-map-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #9ba8ba;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.route-path-point,
.route-pull-point {
  position: absolute;
  transform: translate(-50%, -50%);
}

.route-path-point {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(68, 218, 230, 0.78);
}

.route-pull-point {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rio-stat-strong);
  border-radius: 50%;
  background: var(--field);
  color: var(--rio-stat-strong);
  font-size: 11px;
  font-weight: 900;
}

.route-run-card {
  max-height: 760px;
  overflow: hidden;
}

.route-run-list {
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.route-run-detail {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(216, 168, 79, 0.36);
  background: rgba(216, 168, 79, 0.07);
}

.route-run-detail:empty {
  display: none;
}

.route-run-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.route-run-detail-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-run-detail-head span {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.route-run-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.route-run-detail dl div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.route-run-detail dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.route-run-detail dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-run-detail-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-run-detail-icons .rio-spec-icon {
  margin-right: 0;
}

.route-run-route-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  border-top: 1px solid rgba(216, 168, 79, 0.24);
  padding-top: 8px;
  color: #9ba8ba;
  font-size: 12px;
  font-weight: 800;
}

.route-run-route-note.available {
  color: #7edfe9;
}

.route-run-route-note a {
  flex: 0 0 auto;
  color: var(--gold);
  text-decoration: none;
}

.route-run-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px;
  text-align: left;
  overflow: hidden;
}

.route-run-item.active {
  border-color: var(--gold);
  background: var(--soft-gold);
}

.route-run-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.route-run-item:disabled .route-run-rank,
.route-run-item:disabled .route-run-body,
.route-run-item:disabled em {
  color: var(--muted);
}

.route-run-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.route-run-body {
  min-width: 0;
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.route-run-body strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-run-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-run-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  max-width: 100%;
  overflow: hidden;
}

.route-run-icons .rio-spec-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-right: 0;
}

.route-run-item em {
  color: #8390a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.route-run-item em.available {
  color: #72d885;
}

.item-edit-summary {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
}

.item-edit-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(216, 168, 79, 0.42);
  background: rgba(216, 168, 79, 0.08);
  color: var(--text);
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 900;
}

.item-edit-link > span,
.item-edit-link > a {
  min-width: 0;
}

.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;
}

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

.item-edit-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: 14px 18px 18px;
  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;
}

.item-gem-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.item-gem-icons a {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}

.item-gem-icons .iconsmall,
.gem-icon-link .iconsmall {
  margin: 0;
  vertical-align: middle;
}

.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 {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

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

.check-list 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;
}

.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) {
  .home-community-layout {
    grid-template-columns: 1fr;
  }

  .home-community-feed .home-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .home-feed-card:first-child {
    grid-column: 1 / -1;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .tool-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    margin: 20px 0 12px;
  }

  .theme-switch {
    max-width: 420px;
  }

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

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

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

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

}

@media (max-width: 920px) {
  .tool-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header {
    display: grid;
    align-items: start;
  }

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

@media (max-width: 760px) {
  .home-page {
    padding: 12px;
  }

  .home-hero,
  .home-community-layout,
  .home-meta-grid,
  .home-grid,
  .home-tools-grid {
    grid-template-columns: 1fr;
  }

  .home-community-directory {
    grid-template-columns: 1fr;
  }

  .home-community-feed .home-list {
    grid-template-columns: 1fr;
  }

  .home-board-card.featured {
    grid-column: auto;
  }

  .home-feed-card:first-child {
    grid-column: auto;
  }

  .home-quick-actions {
    justify-content: flex-start;
  }

  .main,
  .sidebar {
    padding: 16px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--sidebar);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar.nav-collapsed .tool-nav,
  .sidebar.nav-collapsed .theme-switch {
    display: none;
  }

  .tool-nav {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0 12px;
  }

  .theme-switch {
    max-width: none;
  }

  .header {
    display: flex;
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

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

  .auth-actions > button,
  .auth-actions .auth-user-chip {
    width: 100%;
    justify-content: center;
  }

  .battle-net-account-head,
  .battle-net-link-card,
  .battle-net-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .battle-net-link-button,
  #refreshBattleNetCharacters {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }

  .tool-nav,
  .workflow-nav,
  .input-mode-tabs,
  .queue-layout,
  .slot-row,
  .talent-list,
  .armory-grid,
  .my-character-picker,
  .item-edit-form,
  .option-strip,
  .right-rail,
  .result-grid,
  .topgear-layout,
  .item-options,
  .inline-item-search-main,
  .inline-item-selected,
  .inline-item-options {
    grid-template-columns: 1fr;
  }

  .inline-item-options .add-item-gems {
    grid-column: auto;
  }

  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,
  .rio-meta-hero,
  .rio-meta-overview,
  .rio-tier-row,
  .rio-grid.two,
  .rio-composition-grid,
  .rio-class-grid,
  .rio-kpi-grid,
  .rio-table-row,
  .rio-share-row,
  .rio-difficulty-row,
  .rio-gap-row,
  .rio-presence-grid,
  .rio-performance-row,
  .rio-tier-slot-row,
  .rio-item-row,
  .wcl-encounter-row,
  .wcl-ranking-row,
  .wcl-talent-row {
    grid-template-columns: 1fr;
  }

  .rio-spec-detail-titlebar .compact-button {
    justify-self: start;
  }

  .rio-talent-board {
    min-height: 390px;
  }

  .rio-talent-grid,
  .rio-talent-grid.compact,
  .wcl-talent-list {
    grid-template-columns: 1fr;
  }

  .wcl-talent-link,
  .wcl-talent-row {
    width: 100%;
  }

  .rio-talent-layout-board {
    min-height: 430px;
  }

  .rio-talent-node {
    width: 34px;
    height: 34px;
  }

  .rio-talent-node-stack.choice .rio-talent-node {
    width: 31px;
    height: 31px;
  }

  .rio-talent-node b {
    right: -6px;
    bottom: -6px;
    min-width: 25px;
    font-size: 8px;
  }

  .rio-filter-bar label {
    min-width: 100%;
  }

  .rio-dungeon-option {
    flex-basis: 104px;
    height: 82px;
  }

  .rio-meta-source {
    justify-items: start;
    text-align: left;
  }

  .rio-tier-label {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid #202a39;
  }

  .rio-tier-spec {
    width: 100%;
    max-width: none;
  }

  .rio-card-title-row {
    grid-template-columns: 1fr;
  }

  .rio-composition {
    grid-template-columns: 24px minmax(0, 1fr) 58px;
  }

  .rio-difficulty-row strong,
  .rio-difficulty-row small,
  .rio-performance-row strong,
  .rio-performance-row small,
  .wcl-encounter-row strong,
  .wcl-ranking-row em,
  .wcl-talent-row strong {
    text-align: left;
  }

  .wcl-encounter-icons {
    justify-content: flex-start;
  }

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

  .route-split-view {
    grid-template-columns: 1fr;
  }

  .route-coordinate-note {
    grid-column: auto;
  }

  .route-map-head,
  .route-run-item {
    grid-template-columns: 1fr;
  }

  .route-map-head {
    display: grid;
  }

  .route-source-pill {
    max-width: none;
    text-align: left;
  }

  .route-map-canvas {
    min-height: 420px;
  }

  .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;
  }

  .talent-tree-svg {
    height: 180px;
  }

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

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

.wcl-cooldown-filter-bar {
  grid-template-columns: minmax(220px, 1fr) 150px 120px;
}

.wcl-cooldown-planbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.wcl-cooldown-plan-fields {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) 94px minmax(150px, 1fr) 118px minmax(220px, 1.35fr);
  gap: 12px;
}

.wcl-cooldown-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wcl-cooldown-share-row input {
  min-width: 0;
}

.wcl-cooldown-plan-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.wcl-cooldown-plan-actions .primary-button {
  width: auto;
}

.wcl-cooldown-roster-card,
.wcl-cooldown-builder-card,
.wcl-cooldown-assignment-card,
.wcl-cooldown-export-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.visual-note-shell {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.visual-note-page {
  max-width: none;
}

.visual-note-page-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.visual-note-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.visual-note-page-toolbar .primary-button,
.visual-note-page-toolbar .secondary-button {
  width: auto;
  height: 38px;
  min-height: 38px;
  min-width: 72px;
  flex: 0 0 auto;
  padding: 0 12px;
  white-space: nowrap;
}

.visual-note-toolbar-share {
  display: grid;
  grid-template-columns: max-content minmax(260px, 440px) auto;
  gap: 8px;
  align-items: center;
  justify-content: end;
  margin-left: auto;
}

.visual-note-toolbar-share label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.visual-note-toolbar-share select,
.visual-note-toolbar-share input {
  height: 36px;
}

.visual-note-toolbar-share select {
  min-width: 112px;
}

.visual-note-page.visual-note-read-only .visual-note-page-toolbar,
.visual-note-page.visual-note-read-only .visual-note-sidebar,
.visual-note-page.visual-note-read-only #visualNoteAddStep,
.visual-note-page.visual-note-read-only #visualNoteDeleteStep {
  display: none;
}

.visual-note-page.visual-note-read-only .visual-note-shell {
  grid-template-columns: minmax(0, 1fr);
}

.visual-note-page.visual-note-read-only .visual-note-board-card {
  width: min(100%, 1420px);
  justify-self: center;
}

.visual-note-sidebar,
.visual-note-board-card,
.visual-note-notes-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.visual-note-sidebar {
  position: sticky;
  top: 12px;
  max-height: max(520px, calc(100dvh - 132px));
  align-content: start;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.visual-note-sidebar-block,
.visual-note-note-form {
  display: grid;
  gap: 10px;
}

.visual-note-sidebar label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.visual-note-actions,
.visual-note-stepbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.visual-note-toolbox {
  display: grid;
  gap: 10px;
}

.visual-note-tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field) 72%, var(--surface));
}

.visual-note-tool-tabs button {
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.visual-note-tool-tabs button.active,
.visual-note-tool-tabs button[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.visual-note-tool-panels {
  min-width: 0;
}

.visual-note-tool-panel {
  display: none;
  min-width: 0;
}

.visual-note-tool-panel.active {
  display: grid;
  gap: 10px;
}

.visual-note-note-controls {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.visual-note-note-toolbox[hidden] {
  display: none;
}

.visual-note-note-toolbox:not([hidden]) + .visual-note-encounter-empty {
  display: none;
}

.visual-note-note-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.visual-note-note-field-row label,
.visual-note-text-style-row label,
.visual-note-step-field-row label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.visual-note-note-field-row .visual-note-color-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.visual-note-note-field-row input[type="color"] {
  flex: 0 0 46px;
  width: 46px;
  min-width: 0;
  height: 38px;
  padding: 2px;
}

.visual-note-note-field-row input[type="text"],
.visual-note-note-field-row textarea,
.visual-note-text-style-row input[type="number"],
.visual-note-step-field-row input[type="text"] {
  width: 100%;
  min-width: 0;
}

.visual-note-note-field-row textarea {
  height: 36px;
  min-height: 36px;
  max-height: 150px;
  resize: none;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  line-height: 1.25;
  overflow: hidden;
}

.visual-note-text-style-row {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(82px, auto) 64px;
  gap: 8px;
  align-items: end;
}

.visual-note-text-style-row input[type="number"] {
  height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 8px;
}

.visual-note-text-style-row input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 2px;
}

.visual-note-checkbox-label {
  height: 34px;
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 6px !important;
  white-space: nowrap;
}

.visual-note-checkbox-label input {
  width: 14px;
  height: 14px;
}

.visual-note-sidebar .select2-container {
  width: 100% !important;
}

.visual-note-sidebar .select2-container--default .select2-selection--single {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field) 82%, var(--surface));
  box-shadow: none;
}

.visual-note-select2-selection {
  border-radius: 8px !important;
}

.visual-note-sidebar .select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 36px;
  padding: 0 34px 0 10px;
  color: var(--text);
  font-size: 13px;
  line-height: 36px;
}

.visual-note-sidebar .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--muted);
}

.visual-note-sidebar .select2-container--default .select2-selection--single .select2-selection__arrow {
  width: 30px;
  height: 36px;
}

.visual-note-sidebar .select2-container--default.select2-container--open .select2-selection--single {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.visual-note-select2-dropdown {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)) !important;
  border-radius: 8px !important;
  background: var(--panel) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28) !important;
}

.visual-note-select2-dropdown .select2-search--dropdown {
  padding: 7px;
  background: color-mix(in srgb, var(--panel-2) 86%, var(--surface));
}

.visual-note-select2-dropdown .select2-search__field {
  min-height: 32px;
  border: 1px solid var(--line) !important;
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
}

.visual-note-select2-dropdown .select2-results__option {
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}

.visual-note-select2-dropdown .select2-results__option--selected,
.visual-note-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)) !important;
  color: var(--text) !important;
}

.visual-note-tool-section {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.visual-note-tool-section[hidden] {
  display: none;
}

.visual-note-tool-section > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.visual-note-tool-subtitle {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.visual-note-icon-search,
.visual-note-icon-search-results,
.visual-note-tool-message {
  grid-column: 1 / -1;
}

.visual-note-icon-search {
  display: grid;
  gap: 5px;
}

.visual-note-icon-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.visual-note-icon-search input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
}

.visual-note-icon-search-results {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.visual-note-tool-message {
  color: var(--muted);
  font-size: 11px;
}

.visual-note-toolbox button,
.visual-note-steps button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.visual-note-steps button {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.visual-note-steps button:hover {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
  background: var(--panel-2);
  background: color-mix(in srgb, var(--gold) 8%, var(--panel-2));
}

.visual-note-toolbox button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 5px;
}

.visual-note-toolbox button::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid transparent;
  border-radius: 6px;
  pointer-events: none;
}

.visual-note-toolbox button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.visual-note-toolbox button.visual-note-portrait-tool img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
}

.visual-note-shape-icon {
  width: 27px;
  height: 27px;
  display: block;
  fill: #38bdf8;
  stroke: #e0f2fe;
  stroke-width: 2;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.2));
  pointer-events: none;
}

.visual-note-shape-icon .visual-note-shape-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 1.5;
}

.visual-note-toolbox button.visual-note-tool-text {
  font-size: 12px;
  font-weight: 700;
}

.visual-note-toolbox button.visual-note-tool-hand svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.visual-note-tool-swatch span {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: #38bdf8;
  background: color-mix(in srgb, var(--accent) 78%, #0f172a);
  border: 2px solid #e0f2fe;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, #fff);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.visual-note-tool-swatch.player span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.visual-note-tool-swatch.text span {
  width: 26px;
  height: 20px;
  border-radius: 5px;
  color: var(--text);
  background: #e0f2fe;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

.visual-note-tool-swatch.circle span {
  border-radius: 999px;
}

.visual-note-tool-swatch.rectangle span {
  width: 26px;
  height: 18px;
  border-radius: 4px;
}

.visual-note-tool-swatch.diamond span {
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
}

.visual-note-tool-swatch.triangle span {
  width: 0;
  height: 0;
  background: transparent;
  border: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 24px solid #38bdf8;
  border-bottom: 24px solid color-mix(in srgb, var(--accent) 78%, #0f172a);
  box-shadow: none;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.2));
}

.visual-note-tool-swatch.wedge span {
  width: 26px;
  height: 22px;
  border-radius: 18px 18px 6px 6px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.visual-note-tool-swatch.arrow span {
  position: relative;
  width: 25px;
  height: 5px;
  border: 0;
  border-radius: 999px;
}

.visual-note-tool-swatch.arrow span::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 9px solid #38bdf8;
  border-left: 9px solid color-mix(in srgb, var(--accent) 78%, #0f172a);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.visual-note-toolbox button.active,
.visual-note-toolbox button.selected,
.visual-note-toolbox button[aria-pressed="true"],
.visual-note-steps button.active {
  border-color: #facc15;
  background: #172554;
  color: #fff;
  box-shadow: inset 0 0 0 3px #facc15, 0 0 0 1px rgba(15, 23, 42, 0.48);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.visual-note-steps button.active {
  border-color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  background: var(--panel-2);
  background: color-mix(in srgb, var(--gold) 14%, var(--panel-2));
  color: var(--text);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--gold) 58%, transparent),
    0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent);
}

.visual-note-toolbox button.active,
.visual-note-toolbox button.selected,
.visual-note-toolbox button[aria-pressed="true"] {
  outline: 2px solid #facc15;
  outline: 2px solid color-mix(in srgb, var(--accent) 82%, #fff);
  outline-offset: 1px;
  box-shadow:
    inset 0 0 0 3px #facc15,
    0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
    0 8px 18px rgba(15, 23, 42, 0.2);
}

.visual-note-toolbox button.active::after,
.visual-note-toolbox button.selected::after,
.visual-note-toolbox button[aria-pressed="true"]::after {
  border-color: #facc15;
}

.visual-note-toolbox button.active img,
.visual-note-toolbox button.selected img,
.visual-note-toolbox button[aria-pressed="true"] img,
.visual-note-toolbox button.active .visual-note-shape-icon,
.visual-note-toolbox button.selected .visual-note-shape-icon,
.visual-note-toolbox button[aria-pressed="true"] .visual-note-shape-icon,
.visual-note-toolbox button.active.visual-note-tool-swatch span,
.visual-note-toolbox button.selected.visual-note-tool-swatch span,
.visual-note-toolbox button[aria-pressed="true"].visual-note-tool-swatch span {
  filter: drop-shadow(0 0 5px #facc15);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 70%, #fff));
}

.visual-note-toolbox button.visual-note-tool-hand.active,
.visual-note-toolbox button.visual-note-tool-hand.selected,
.visual-note-toolbox button.visual-note-tool-hand[aria-pressed="true"] {
  color: var(--text);
}

.visual-note-toolbox button.visual-note-tool-hand.active svg,
.visual-note-toolbox button.visual-note-tool-hand.selected svg,
.visual-note-toolbox button.visual-note-tool-hand[aria-pressed="true"] svg {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 62%, transparent));
}

.visual-note-steps {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}

.visual-note-board {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 680px;
  aspect-ratio: var(--visual-note-board-ratio, 16 / 10);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.12), transparent 54%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 0 80px rgba(0, 0, 0, 0.34);
  touch-action: none;
}

.visual-note-page-notes {
  min-width: 0;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.visual-note-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(203, 213, 225, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.52;
}

.visual-note-map-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.28)),
    var(--visual-note-map-image, radial-gradient(circle at 50% 50%, rgba(71, 85, 105, 0.5), transparent 62%));
  background-size: 100% 100%;
  background-position: center;
  opacity: 0.72;
}

.visual-note-board.has-raid-map .visual-note-map-art {
  opacity: 0.94;
}

.visual-note-board.has-raid-map::after {
  opacity: 0;
}

.visual-note-object {
  position: absolute;
  z-index: 2;
  min-width: 34px;
  min-height: 12px;
  color: #fff;
  transform: translate(-50%, -50%) rotate(var(--vn-rotation, 0deg));
  user-select: none;
  cursor: grab;
  touch-action: none;
}

.visual-note-object.directional {
  transform: translate(-50%, -50%);
}

.visual-note-object.circle,
.visual-note-object.box,
.visual-note-object.shape,
.visual-note-object.arrow,
.visual-note-object.text,
.visual-note-object.path {
  min-width: 0;
  min-height: 0;
}

.visual-note-object-content {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
  border: 2px solid #e0f2fe;
  border: 2px solid color-mix(in srgb, var(--vn-color, #38bdf8) 72%, #fff);
  background: #38bdf8;
  background: color-mix(in srgb, var(--vn-color, #38bdf8) 78%, #111827);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  font-weight: 800;
  font-size: var(--vn-font-size, 12px);
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
  opacity: var(--vn-opacity, 1);
}

.visual-note-object.circle .visual-note-object-content,
.visual-note-object.box .visual-note-object-content,
.visual-note-object.shape .visual-note-object-content {
  padding: 0;
}

.visual-note-object-content span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.visual-note-object.selected .visual-note-object-content {
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.24),
    0 0 0 3px color-mix(in srgb, var(--accent) 78%, #fff);
}

.visual-note-object.circle .visual-note-object-content,
.visual-note-object.player .visual-note-object-content,
.visual-note-object.shape-circle .visual-note-object-content {
  border-radius: 999px;
}

.visual-note-object.box .visual-note-object-content,
.visual-note-object.text .visual-note-object-content,
.visual-note-object.shape-rectangle .visual-note-object-content {
  border-radius: 8px;
}

.visual-note-object.shape-diamond .visual-note-object-content {
  background: #38bdf8;
  background: color-mix(in srgb, var(--vn-color, #38bdf8) 82%, #111827);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.visual-note-object.shape-triangle .visual-note-object-content {
  background: #38bdf8;
  background: color-mix(in srgb, var(--vn-color, #38bdf8) 82%, #111827);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.visual-note-object.shape-wedge .visual-note-object-content {
  background: #38bdf8;
  background: color-mix(in srgb, var(--vn-color, #38bdf8) 82%, #111827);
  border-radius: 999px 999px 12px 12px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.visual-note-object.arrow .visual-note-object-content {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.visual-note-object.arrow.selected .visual-note-object-content {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 86%, #fff));
}

.visual-note-arrow-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.visual-note-arrow-svg path {
  fill: color-mix(in srgb, var(--vn-color, #38bdf8) 78%, #111827);
}

.visual-note-object.text .visual-note-object-content {
  color: #fff;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  padding: 0;
  white-space: pre-wrap;
}

.visual-note-object.text .visual-note-object-content span {
  overflow-wrap: normal;
  white-space: pre-wrap;
  word-break: keep-all;
}

.visual-note-object.text-stroke .visual-note-object-content span,
.visual-note-object.text-stroke .visual-note-icon-label {
  -webkit-text-stroke: var(--vn-text-stroke-width, 1px) var(--vn-text-stroke-color, #000);
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 var(--vn-text-stroke-color, #000),
    -1px 0 0 var(--vn-text-stroke-color, #000),
    0 1px 0 var(--vn-text-stroke-color, #000),
    0 -1px 0 var(--vn-text-stroke-color, #000);
}

.visual-note-object.text-stroke .visual-note-icon-label {
  -webkit-text-stroke: min(1px, var(--vn-text-stroke-width, 1px)) var(--vn-text-stroke-color, #000);
}

.visual-note-object.icon .visual-note-object-content {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.visual-note-object.icon {
  min-width: 0;
  min-height: 0;
}

.visual-note-object.icon.selected .visual-note-object-content {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 80%, #fff));
}

.visual-note-object.icon img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.45));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.visual-note-object.icon.portrait img {
  border: 2px solid #040c1f;
  border-radius: 999px;
  background: #0f172a;
  object-fit: cover;
}

.visual-note-object.path {
  min-width: 0;
  min-height: 0;
}

.visual-note-object.path .visual-note-object-content {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.visual-note-object.path.selected .visual-note-object-content {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 86%, #fff));
}

.visual-note-path-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.visual-note-path-draft {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.visual-note-path-draft polyline,
.visual-note-path-svg polyline {
  fill: none;
  stroke: var(--vn-color, #38bdf8);
  stroke-width: var(--vn-stroke-width, 4);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.visual-note-icon-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  bottom: auto;
  width: max-content;
  max-width: none;
  min-width: 0;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
  font-size: min(10px, var(--vn-font-size, 10px));
  font-weight: 800;
  line-height: 1.05;
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  pointer-events: none;
}

.visual-note-facing-pointer {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform:
    translate(-50%, -50%)
    rotate(var(--vn-facing-rotation, 0deg))
    translateY(calc(-1 * var(--vn-facing-radius, 24px)));
  transform-origin: 50% 50%;
  pointer-events: none;
}

.visual-note-facing-pointer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -60%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid #facc15;
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.55));
}

.visual-note-object.selected .visual-note-facing-pointer {
  cursor: grab;
  pointer-events: auto;
}

.visual-note-resize-handle {
  position: absolute;
  z-index: 5;
  width: 7px;
  height: 7px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  pointer-events: auto;
}

.visual-note-resize-handle[data-visual-note-resize="nw"] {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  cursor: nwse-resize;
}

.visual-note-resize-handle[data-visual-note-resize="n"] {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: ns-resize;
}

.visual-note-resize-handle[data-visual-note-resize="ne"] {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  cursor: nesw-resize;
}

.visual-note-resize-handle[data-visual-note-resize="e"] {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  cursor: ew-resize;
}

.visual-note-resize-handle[data-visual-note-resize="se"] {
  right: 0;
  bottom: 0;
  transform: translate(50%, 50%);
  cursor: nwse-resize;
}

.visual-note-resize-handle[data-visual-note-resize="s"] {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  cursor: ns-resize;
}

.visual-note-resize-handle[data-visual-note-resize="sw"] {
  bottom: 0;
  left: 0;
  transform: translate(-50%, 50%);
  cursor: nesw-resize;
}

.visual-note-resize-handle[data-visual-note-resize="w"] {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
}

.visual-note-rotate-handle {
  position: absolute;
  z-index: 6;
  top: -31px;
  left: 50%;
  width: 17px;
  height: 17px;
  transform: translateX(-50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: #facc15;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  cursor: grab;
  pointer-events: auto;
}

.visual-note-rotate-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.76);
}

.visual-note-notes-card > textarea,
.visual-note-page-notes textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
}

.visual-note-notes-card > textarea {
  min-height: 112px;
}

.visual-note-page-notes textarea {
  min-height: 108px;
}

.visual-note-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.visual-note-panel-title h3 {
  font-size: 13px;
  line-height: 1.2;
}

.visual-note-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.visual-note-share-row input {
  min-width: 0;
}

.visual-note-share-row .secondary-button {
  height: 36px;
  min-height: 36px;
  width: auto;
}

.visual-note-presentation-panel {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.visual-note-presentation-panel[hidden] {
  display: none;
}

.visual-note-presentation-panel h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.visual-note-presentation-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.visual-note-note-display {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field) 70%, transparent);
  color: var(--text);
  padding: 10px 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.visual-note-note-display[hidden] {
  display: none;
}

.visual-note-page.visual-note-read-only .visual-note-page-notes textarea {
  display: none;
}

.visual-note-page.visual-note-read-only .visual-note-object {
  cursor: default;
}

.visual-note-page.visual-note-read-only .visual-note-object,
.visual-note-page.visual-note-read-only .visual-note-object * {
  user-select: text;
}

.visual-note-notes-card .rio-card-title-row,
.visual-note-page-notes .rio-card-title-row {
  grid-template-columns: 1fr;
}

.visual-note-notes-card .rio-card-title-row h3,
.visual-note-notes-card .rio-card-title-row p,
.visual-note-page-notes .rio-card-title-row h3,
.visual-note-page-notes .rio-card-title-row p {
  white-space: nowrap;
}

.wcl-cooldown-roster-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.9fr);
  gap: 8px;
}

.wcl-cooldown-roster-form button {
  grid-column: 1 / -1;
}

.wcl-cooldown-roster-title {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
}

.wcl-cooldown-roster-title small {
  max-width: min(360px, 100%);
  display: inline-block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-roster {
  overflow-x: auto;
  padding-bottom: 2px;
}

.wcl-cooldown-roster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.wcl-cooldown-roster-collapsed-summary {
  overflow: visible;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 8px 8px 10px;
}

.wcl-cooldown-roster-mini-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 4px;
  column-gap: 0;
  line-height: 0;
}

.wcl-cooldown-roster-mini-group {
  min-width: max-content;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 3px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-left: 8px;
  padding: 1px 0 1px 8px;
  line-height: 0;
}

.wcl-cooldown-roster-mini-group:first-child {
  border-left: 0;
  margin-left: 0;
  padding-left: 0;
}

.wcl-cooldown-roster-mini-group .rio-spec-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  margin: 0;
  line-height: 0;
}

.wcl-cooldown-roster-mini-empty {
  color: var(--muted);
  font-size: 12px;
}

.wcl-cooldown-import-backdrop,
.wcl-cooldown-roster-import-backdrop,
.visual-note-raidplan-import-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.66);
  padding: 18px;
}

.wcl-cooldown-import-backdrop.active,
.wcl-cooldown-roster-import-backdrop.active,
.visual-note-raidplan-import-backdrop.active {
  display: flex;
}

.wcl-cooldown-import-modal {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(216, 168, 79, 0.42);
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.56);
}

.wcl-cooldown-import-modal header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--field);
  padding: 14px 16px;
}

.wcl-cooldown-import-modal h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.wcl-cooldown-import-modal p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.wcl-cooldown-import-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.wcl-cooldown-import-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.wcl-cooldown-roster-import-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.visual-note-raidplan-import-modal {
  width: min(780px, calc(100vw - 36px));
}

.visual-note-raidplan-import-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.visual-note-raidplan-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.visual-note-raidplan-import-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.visual-note-raidplan-import-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 10px;
}

.visual-note-raidplan-import-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 10px;
}

.visual-note-raidplan-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-note-raidplan-import-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.wcl-cooldown-roster-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.wcl-cooldown-roster-import-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wcl-cooldown-roster-import-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 10px;
}

.wcl-cooldown-roster-import-preview {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 8px;
}

.wcl-cooldown-roster-import-list {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.wcl-cooldown-roster-import-player {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--line)) 42%, var(--line));
  background: var(--field);
  padding: 7px 8px;
}

.wcl-cooldown-roster-import-player .rio-spec-icon {
  width: 30px;
  height: 30px;
}

.wcl-cooldown-roster-import-player span,
.wcl-cooldown-roster-import-player strong,
.wcl-cooldown-roster-import-player small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-roster-import-player span {
  display: grid;
  gap: 2px;
}

.wcl-cooldown-roster-import-player strong {
  color: var(--text);
  font-size: 12px;
}

.wcl-cooldown-roster-import-player small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-import-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wcl-cooldown-import-step {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.wcl-cooldown-import-step b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 11px;
}

.wcl-cooldown-import-step.active {
  border-color: rgba(216, 168, 79, 0.7);
  background: var(--soft-gold);
  color: var(--gold);
}

.wcl-cooldown-import-step.done {
  color: var(--text);
}

.wcl-cooldown-import-controls {
  display: grid;
  gap: 10px;
}

.wcl-cooldown-import-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wcl-cooldown-import-bulk button,
.wcl-cooldown-import-candidate-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.wcl-cooldown-import-bulk button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.wcl-cooldown-import-bulk button.active {
  border-color: rgba(216, 168, 79, 0.68);
  background: var(--soft-gold);
  color: var(--gold);
}

.wcl-cooldown-import-specs {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 7px;
}

.wcl-cooldown-import-spec-section {
  display: grid;
  gap: 6px;
}

.wcl-cooldown-import-spec-section h4 {
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  padding: 0 0 5px;
  font-size: 12px;
  font-weight: 900;
}

.wcl-cooldown-import-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 6px;
}

.wcl-cooldown-import-spec {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 4px 7px;
  text-align: left;
}

.wcl-cooldown-import-spec.active {
  border-color: color-mix(in srgb, var(--rio-class-color, var(--gold)) 74%, white);
  background: color-mix(in srgb, var(--rio-class-color, var(--gold)) 22%, var(--panel-2));
}

.wcl-cooldown-import-spec img {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.wcl-cooldown-import-spec span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-spec input {
  width: 44px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  padding: 0 4px;
  text-align: center;
}

.wcl-cooldown-import-searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wcl-cooldown-import-searchbar small {
  color: var(--muted);
  font-size: 12px;
}

.wcl-cooldown-import-results {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr);
  gap: 12px;
}

.wcl-cooldown-import-step-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.wcl-cooldown-import-step-panel:has(.wcl-cooldown-import-type-list) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.wcl-cooldown-import-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wcl-cooldown-import-step-head span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wcl-cooldown-import-step-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-step-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-candidates,
.wcl-cooldown-import-preview {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 8px;
}

.wcl-cooldown-import-candidates {
  display: grid;
  align-content: start;
  gap: 6px;
}

.wcl-cooldown-import-candidate-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 8px 9px;
  text-align: left;
}

.wcl-cooldown-import-candidate-card.composition-match {
  border-color: rgba(34, 197, 94, 0.72);
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.9);
}

.wcl-cooldown-import-candidate-card.composition-mismatch {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.9);
}

.wcl-cooldown-import-candidate-card.active {
  background: var(--soft-gold);
  outline: 2px solid rgba(216, 168, 79, 0.52);
  outline-offset: 0;
}

.wcl-cooldown-import-candidate-card > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wcl-cooldown-import-candidate-card strong,
.wcl-cooldown-import-candidate-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-candidate-card strong {
  color: var(--text);
  font-size: 13px;
}

.wcl-cooldown-import-candidate-card small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-import-composition-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
  padding-top: 2px;
}

.wcl-cooldown-import-composition-icons.empty {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-import-composition-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(239, 68, 68, 0.82);
  border-radius: 999px;
  background: color-mix(in srgb, var(--rio-class-color, var(--field)) 22%, var(--canvas));
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.wcl-cooldown-import-composition-icon.matched {
  border-color: rgba(34, 197, 94, 0.9);
}

.wcl-cooldown-import-composition-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wcl-cooldown-import-composition-icon b {
  color: var(--text);
  font-size: 10px;
  line-height: 1;
}

.wcl-cooldown-import-candidate-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wcl-cooldown-import-candidate-actions a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--gold);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.wcl-cooldown-import-type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.wcl-cooldown-import-type {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 8px;
}

.wcl-cooldown-import-type.active {
  border-color: rgba(216, 168, 79, 0.66);
  background: var(--soft-gold);
}

.wcl-cooldown-import-type input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold);
}

.wcl-cooldown-import-type span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wcl-cooldown-import-type strong,
.wcl-cooldown-import-type small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-type strong {
  color: var(--text);
  font-size: 12px;
}

.wcl-cooldown-import-type small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-import-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.wcl-cooldown-import-preview {
  display: grid;
  align-content: start;
  gap: 10px;
}

.wcl-cooldown-import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.wcl-cooldown-import-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-preview-head span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wcl-cooldown-import-preview-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-preview-head a {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wcl-cooldown-import-skill-list {
  display: grid;
  gap: 6px;
}

.wcl-cooldown-import-skill {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 6px 8px;
}

.wcl-cooldown-import-skill > b {
  color: var(--gold);
  font-size: 12px;
}

.wcl-cooldown-import-skill .wcl-cooldown-spell-icon {
  width: 30px;
  height: 30px;
}

.wcl-cooldown-import-skill span {
  min-width: 0;
}

.wcl-cooldown-import-skill strong,
.wcl-cooldown-import-skill small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-skill strong {
  color: var(--text);
  font-size: 12px;
}

.wcl-cooldown-import-skill small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-import-match-list {
  display: grid;
  gap: 6px;
}

.wcl-cooldown-import-match {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 7px 8px;
}

.wcl-cooldown-import-match b {
  color: var(--gold);
  font-size: 11px;
}

.wcl-cooldown-import-match span,
.wcl-cooldown-import-match strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-match strong {
  color: var(--text);
}

.wcl-cooldown-import-match.add {
  border-color: rgba(96, 180, 120, 0.4);
}

.wcl-cooldown-import-match.missing,
.wcl-cooldown-import-match.discard {
  border-color: rgba(238, 109, 98, 0.34);
  opacity: 0.78;
}

.wcl-cooldown-import-preview-timeline {
  min-width: 0;
}

.wcl-cooldown-import-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.wcl-cooldown-import-preview-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-scroll {
  cursor: grab;
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-track-row {
  min-width: calc(var(--wcl-cooldown-import-label-width, 230px) + var(--wcl-cooldown-width));
  grid-template-columns: var(--wcl-cooldown-import-label-width, 230px) var(--wcl-cooldown-width);
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-track-label.boss {
  grid-template-columns: minmax(0, 1fr);
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-track-label.member,
.wcl-cooldown-import-preview-timeline .wcl-cooldown-track.preview {
  min-height: 46px;
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-track-row.unmatched .wcl-cooldown-track-label.member {
  border-right-color: color-mix(in srgb, var(--red) 68%, var(--line));
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--red) 44%, var(--field)),
      color-mix(in srgb, var(--red) 24%, var(--field)));
}

.wcl-cooldown-import-preview-timeline .wcl-cooldown-track-row.unmatched .wcl-cooldown-track {
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / var(--wcl-second-width, 5px) 100%,
    linear-gradient(to bottom, color-mix(in srgb, var(--red) 8%, transparent), transparent);
}

.wcl-cooldown-track-label.member .wcl-cooldown-import-timeline-label-text {
  min-width: 0;
  display: grid;
  gap: 1px;
  overflow: hidden;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.68);
  white-space: normal;
}

.wcl-cooldown-import-timeline-label-text strong,
.wcl-cooldown-import-timeline-label-text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-import-timeline-label-text strong {
  font-size: 12px;
  line-height: 1.08;
}

.wcl-cooldown-import-timeline-label-text small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  line-height: 1.08;
}

.wcl-cooldown-import-discard {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(238, 109, 98, 0.34);
  background: color-mix(in srgb, var(--red) 10%, var(--field));
  padding: 8px;
}

.wcl-cooldown-import-discard b {
  color: color-mix(in srgb, var(--red) 72%, white);
  font-size: 12px;
}

.wcl-cooldown-import-discard span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-assignment-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 8px;
}

.wcl-cooldown-raid-frame {
  min-width: calc(var(--wcl-roster-columns) * 176px + (var(--wcl-roster-columns) - 1) * 6px);
  display: grid;
  grid-template-columns: repeat(var(--wcl-roster-columns), minmax(176px, 1fr));
  grid-template-rows: repeat(5, 92px);
  grid-auto-flow: column;
  gap: 6px;
}

.wcl-cooldown-member {
  position: relative;
  min-width: 0;
  height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 78%, white);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--rio-class-color, var(--gold)) 84%, black) 0%, color-mix(in srgb, var(--rio-class-color, var(--gold)) 58%, var(--field)) 100%);
  color: #fff;
  padding: 4px 5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.wcl-cooldown-member.empty {
  border-color: var(--line);
  background: var(--field);
  color: var(--muted);
  text-shadow: none;
}

.wcl-cooldown-member.filler {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.wcl-cooldown-member-icons {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, 19px);
  align-items: center;
  gap: 2px;
}

.wcl-cooldown-member-icons > img,
.wcl-cooldown-member .rio-spec-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.18);
}

.wcl-cooldown-member-icons > img,
.wcl-cooldown-member .rio-spec-icon img {
  object-fit: cover;
}

.wcl-cooldown-member-icons > b {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 10px;
  text-shadow: none;
}

.wcl-cooldown-member-edit {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.wcl-cooldown-member-edit input,
.wcl-cooldown-member-edit select {
  min-width: 0;
  height: 25px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
  padding: 0 6px;
  font-size: 11px;
}

.wcl-cooldown-member.empty .wcl-cooldown-member-edit input,
.wcl-cooldown-member.empty .wcl-cooldown-member-edit select {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.wcl-cooldown-member-edit .select2-container {
  width: 100% !important;
  min-width: 0;
}

.wcl-cooldown-member-edit .select2-container--default .select2-selection--single {
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 0;
}

.wcl-cooldown-member:not(.empty) .wcl-cooldown-member-edit .select2-container {
  color: #fff;
}

.wcl-cooldown-member.empty .wcl-cooldown-member-edit .select2-container {
  color: var(--text);
}

.wcl-cooldown-member.empty .wcl-cooldown-member-edit .select2-container--default .select2-selection--single {
  border-color: var(--line);
  background: var(--panel-2);
}

.wcl-cooldown-member-edit .select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 23px;
  padding: 0 22px 0 5px;
  color: inherit;
  line-height: 23px;
}

.wcl-cooldown-member-edit .select2-container--default .select2-selection--single .select2-selection__arrow {
  width: 20px;
  height: 23px;
}

.wcl-cooldown-member-edit .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-top-color: currentColor;
}

.wcl-cooldown-select2-dropdown {
  border-color: rgba(216, 168, 79, 0.46) !important;
  background: var(--panel) !important;
  color: var(--text);
}

.wcl-cooldown-select2-dropdown .select2-results__option {
  padding: 0;
}

.wcl-cooldown-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable,
.wcl-cooldown-select2-dropdown .select2-results__option--selected {
  background: rgba(216, 168, 79, 0.16);
  color: var(--text);
}

.wcl-cooldown-select2-option {
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
}

.wcl-cooldown-select2-option.compact {
  min-height: 23px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  padding: 0;
}

.wcl-cooldown-select2-option img,
.wcl-cooldown-select2-option i {
  width: 24px;
  height: 24px;
  display: block;
  border: 1px solid var(--line);
  background: var(--field);
  object-fit: cover;
}

.wcl-cooldown-select2-option.compact img,
.wcl-cooldown-select2-option.compact i {
  width: 18px;
  height: 18px;
}

.wcl-cooldown-select2-option i::before {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  content: "-";
}

.wcl-cooldown-select2-option b {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-select2-option.compact b {
  font-size: 11px;
}

.wcl-cooldown-member-edit span {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.wcl-cooldown-member-clear {
  width: 20px;
  height: 20px;
  display: block;
}

.wcl-cooldown-member span,
.wcl-cooldown-assignment-row span,
.wcl-cooldown-reco-head span {
  min-width: 0;
}

.wcl-cooldown-member strong,
.wcl-cooldown-member small,
.wcl-cooldown-assignment-row strong,
.wcl-cooldown-assignment-row small,
.wcl-cooldown-reco-head strong,
.wcl-cooldown-reco-head small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-member strong,
.wcl-cooldown-assignment-row strong,
.wcl-cooldown-reco-head strong {
  color: var(--text);
  font-size: 13px;
}

.wcl-cooldown-member strong {
  color: #fff;
  font-size: 12px;
}

.wcl-cooldown-member small,
.wcl-cooldown-assignment-row small,
.wcl-cooldown-reco-head small {
  color: var(--muted);
  font-size: 11px;
}

.wcl-cooldown-member button,
.wcl-cooldown-assignment-row button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  padding: 0;
}

.wcl-cooldown-member button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.wcl-cooldown-member-handle {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  width: 18px !important;
  height: 18px !important;
  display: grid !important;
  place-items: center;
  border-color: rgba(246, 205, 111, 0.45) !important;
  background: rgba(0, 0, 0, 0.36) !important;
  cursor: grab;
}

.wcl-cooldown-member-handle:active {
  cursor: grabbing;
}

.wcl-cooldown-member-handle span {
  width: 10px;
  height: 10px;
  opacity: 0.9;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 5px 5px;
  color: rgba(255, 255, 255, 0.86);
}

.wcl-cooldown-member.is-dragging {
  opacity: 0.62;
}

.wcl-cooldown-member.is-drop-target {
  box-shadow:
    inset 0 0 0 2px rgba(246, 205, 111, 0.7),
    0 0 0 1px rgba(246, 205, 111, 0.32);
}

.wcl-cooldown-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.wcl-cooldown-reco {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 10px;
}

.wcl-cooldown-reco-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.wcl-cooldown-spell-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  background: var(--panel-2);
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.wcl-cooldown-spell-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcl-cooldown-window-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wcl-cooldown-window-list button {
  min-height: 36px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 146px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 5px 7px;
  text-align: left;
}

.wcl-cooldown-window-list button:hover {
  border-color: rgba(216, 168, 79, 0.62);
  background: var(--soft-gold);
}

.wcl-cooldown-window-list b {
  color: var(--gold);
  font-size: 12px;
}

.wcl-cooldown-window-main {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.wcl-cooldown-window-main small {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-window-boss-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--gold);
}

.wcl-cooldown-window-boss-icon.empty {
  opacity: 0.35;
}

.wcl-cooldown-window-boss-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcl-cooldown-window-boss-icon b {
  font-size: 11px;
}

.wcl-cooldown-assignment-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(190px, 1.4fr) 100px minmax(150px, 1fr) 86px;
  gap: 8px;
}

.wcl-cooldown-timeline {
  display: grid;
  gap: 12px;
}

.wcl-cooldown-skill-palette {
  max-height: 260px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 7px;
}

.wcl-cooldown-skill-group {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(132px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 46%, var(--line));
  background: var(--field);
  padding: 6px 8px;
}

.wcl-cooldown-skill-group-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.wcl-cooldown-skill-group-head .rio-spec-icon {
  width: 24px;
  height: 24px;
}

.wcl-cooldown-skill-group-head b {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-skill-list {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 0;
}

.wcl-cooldown-palette-spell {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--gold);
  padding: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.wcl-cooldown-palette-spell:active {
  cursor: grabbing;
}

.wcl-cooldown-palette-spell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.wcl-cooldown-palette-spell.text b {
  font-size: 13px;
  font-weight: 900;
}

.wcl-cooldown-skill-empty {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.wcl-cooldown-scroll {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--canvas);
  cursor: grab;
  user-select: none;
}

.wcl-cooldown-scroll.is-drag-scrolling,
.wcl-cooldown-scroll.is-cooldown-dragging {
  cursor: grabbing;
}

.wcl-cooldown-track-row {
  min-width: calc(154px + var(--wcl-cooldown-width));
  display: grid;
  grid-template-columns: 154px var(--wcl-cooldown-width);
  border-bottom: 1px solid var(--line);
}

.wcl-cooldown-track-row:last-child {
  border-bottom: 0;
}

.wcl-cooldown-track-label {
  position: sticky;
  left: 0;
  z-index: 6;
  min-height: 58px;
  display: grid;
  align-items: center;
  border-right: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 8px 0 18px rgba(0, 0, 0, 0.28);
}

.wcl-cooldown-track-label.boss {
  z-index: 8;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  min-height: 72px;
}

.wcl-cooldown-track-label.boss span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-trash {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  padding: 0;
}

.wcl-cooldown-trash svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.wcl-cooldown-trash:hover,
.wcl-cooldown-trash.is-drop-target {
  border-color: color-mix(in srgb, var(--red) 70%, white);
  background: color-mix(in srgb, var(--red) 18%, var(--panel-2));
  color: color-mix(in srgb, var(--red) 70%, white);
}

.wcl-cooldown-trash.is-drop-target {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--red) 54%, white),
    0 0 0 2px rgba(238, 109, 98, 0.18);
}

.wcl-cooldown-track-label.member {
  min-height: 36px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  border-right-color: color-mix(in srgb, var(--rio-class-color, var(--gold)) 62%, var(--line));
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--rio-class-color, var(--gold)) 54%, var(--field)),
      color-mix(in srgb, var(--rio-class-color, var(--gold)) 34%, var(--field)));
  padding: 0 7px;
}

.wcl-cooldown-track-label.member .rio-spec-icon {
  width: 24px;
  height: 24px;
}

.wcl-cooldown-track-label.member span {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.78),
    1px 0 0 rgba(0, 0, 0, 0.72),
    -1px 0 0 rgba(0, 0, 0, 0.72),
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 -1px 0 rgba(0, 0, 0, 0.72);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-track {
  position: relative;
  min-height: 58px;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / var(--wcl-second-width, 5px) 100%,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035), transparent);
}

.wcl-cooldown-track-row.boss .wcl-cooldown-track {
  min-height: 72px;
}

.wcl-cooldown-track.droppable {
  min-height: 36px;
}

.wcl-cooldown-track.droppable::after {
  position: absolute;
  inset: 0;
  border: 1px dashed transparent;
  content: "";
  pointer-events: none;
}

.wcl-cooldown-track.droppable:hover::after,
.wcl-cooldown-track.droppable.is-drop-target::after {
  border-color: rgba(216, 168, 79, 0.34);
}

.wcl-cooldown-track-row.member .wcl-timeline-tick {
  top: 0;
  height: 100%;
  color: transparent;
  font-size: 0;
}

.wcl-cooldown-track-row.member .wcl-timeline-tick::before {
  top: 0;
  height: 100%;
}

.wcl-cooldown-phase-layer {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(154px + var(--wcl-cooldown-width));
  pointer-events: none;
  z-index: 1;
}

.wcl-cooldown-phase-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--gold) 72%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.wcl-cooldown-phase-label {
  position: absolute;
  top: 7px;
  left: 0;
  display: inline-block;
  max-width: 150px;
  margin-left: 5px;
  overflow: hidden;
  border: 1px solid rgba(246, 205, 111, 0.42);
  background: rgba(8, 12, 19, 0.92);
  color: var(--gold);
  padding: 2px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
}

.wcl-cooldown-boss-cast {
  position: absolute;
  top: 36px;
  width: 28px;
  height: 28px;
  display: grid;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: var(--field);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wcl-cast-color, var(--red)) 80%, white);
  color: var(--gold);
  text-decoration: none;
  transform: translateX(-50%);
  z-index: 2;
}

.wcl-cooldown-boss-cast:hover {
  z-index: 3;
  box-shadow: 0 0 0 1px var(--gold);
}

.wcl-cooldown-boss-cast img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcl-cooldown-boss-cast b {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--wcl-cast-color, var(--red)) 56%, var(--field));
  font-size: 12px;
}

.wcl-cooldown-assignment-marker {
  position: absolute;
  top: 11px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 68%, white);
  background: var(--field);
  color: var(--gold);
  padding: 0;
  transform: translateX(-50%);
}

.wcl-cooldown-assignment-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcl-cooldown-assignment-span {
  position: absolute;
  top: 2px;
  width: var(--wcl-cooldown-span-width, 32px);
  min-width: 32px;
  height: 32px;
  overflow: visible;
  transform: none;
  cursor: grab;
  z-index: 3;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.wcl-cooldown-assignment-span:active {
  cursor: grabbing;
}

.wcl-cooldown-assignment-span.is-drag-source,
.wcl-cooldown-palette-spell.is-drag-source {
  opacity: 0.36;
}

.wcl-cooldown-cooldown-bar {
  position: absolute;
  left: 0;
  bottom: 1px;
  z-index: 1;
  width: var(--wcl-cooldown-bar-width, 32px);
  height: 5px;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 45%, var(--line));
  background: color-mix(in srgb, var(--rio-class-color, var(--gold)) 20%, transparent);
  opacity: 0.82;
  pointer-events: none;
}

.wcl-cooldown-duration-bar {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: var(--wcl-duration-bar-width, 32px);
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 70%, white);
  background: color-mix(in srgb, var(--rio-class-color, var(--gold)) 64%, var(--field));
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.62);
  pointer-events: none;
}

.wcl-cooldown-duration-bar::after {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
  content: "";
}

.wcl-cooldown-duration-bar img {
  position: relative;
  z-index: 2;
  width: 32px;
  min-width: 32px;
  height: 32px;
  object-fit: cover;
  -webkit-user-drag: none;
}

.wcl-cooldown-duration-bar b {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 100%;
  color: var(--gold);
}

.wcl-cooldown-duration-bar small {
  display: none;
}

.wcl-cooldown-assignment-span.unmatched .wcl-cooldown-cooldown-bar {
  border-color: color-mix(in srgb, var(--red) 58%, var(--line));
  background: color-mix(in srgb, var(--red) 18%, transparent);
}

.wcl-cooldown-assignment-span.unmatched .wcl-cooldown-duration-bar {
  border-color: color-mix(in srgb, var(--red) 72%, white);
  background: color-mix(in srgb, var(--red) 58%, var(--field));
}

.wcl-cooldown-drag-ghost {
  position: absolute !important;
  z-index: 40 !important;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 0 0 1px rgba(246, 205, 111, 0.55), 0 8px 18px rgba(0, 0, 0, 0.34);
  cursor: grabbing;
  transform: none !important;
}

.wcl-cooldown-drag-ghost img {
  -webkit-user-drag: none;
}

.wcl-cooldown-drag-time {
  position: fixed;
  z-index: 1000;
  display: none;
  pointer-events: none;
  transform: translate(-50%, -100%);
  padding: 4px 7px;
  border: 1px solid rgba(246, 205, 111, 0.55);
  background: rgba(8, 12, 19, 0.94);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.wcl-cooldown-boss-reco-tooltip {
  position: fixed;
  z-index: 1001;
  display: none;
  width: min(280px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  pointer-events: none;
  border: 1px solid rgba(246, 205, 111, 0.48);
  background: rgba(8, 12, 19, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  padding: 9px;
}

.wcl-cooldown-boss-reco-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wcl-cooldown-boss-reco-title b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-boss-reco-title small {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.wcl-cooldown-boss-reco-list {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.wcl-cooldown-boss-reco-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.wcl-cooldown-boss-reco-item .wcl-cooldown-spell-icon {
  width: 30px;
  height: 30px;
}

.wcl-cooldown-boss-reco-item span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.wcl-cooldown-boss-reco-item strong,
.wcl-cooldown-boss-reco-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-cooldown-boss-reco-item strong {
  color: var(--text);
  font-size: 12px;
}

.wcl-cooldown-boss-reco-item small,
.wcl-cooldown-boss-reco-empty {
  color: var(--muted);
  font-size: 10px;
}

.wcl-cooldown-assignment-list {
  display: grid;
  gap: 8px;
}

.wcl-cooldown-assignment-row {
  grid-template-columns: 58px 34px minmax(0, 1fr) 28px;
}

.wcl-cooldown-assignment-row > b {
  color: var(--gold);
  font-size: 13px;
}

.wcl-cooldown-export-card textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.wcl-cooldown-export-card .wcl-note-actions {
  padding: 0;
}

.rio-page,
.rio-content,
.rio-card,
.rio-grid,
.rio-table-list,
.rio-role-list,
.rio-composition-list,
.rio-talent-list,
.rio-gear-list,
.wcl-encounter-list,
.wcl-ranking-list,
.wcl-talent-list,
.wcl-timeline-board,
.route-analysis-layout,
.route-map-card,
.route-run-card {
  min-width: 0;
}

.rio-card,
.wcl-timeline-card {
  overflow: hidden;
}

.rio-card.visual-note-sidebar {
  overflow-x: hidden;
  overflow-y: auto;
}

.rio-filter-bar .rio-hidden-select {
  width: 1px;
  min-width: 0;
  max-width: 1px;
  flex: 0 0 1px;
}

.rio-card-title-row > *,
.rio-meta-title,
.route-map-head > *,
.route-run-body,
.wcl-timeline-player-cell,
.wcl-timeline-log-link {
  min-width: 0;
}

.rio-dungeon-picker,
.wcl-lorrgs-boss-list,
.wcl-lorrgs-icon-list,
.wcl-lorrgs-options,
.wcl-timeline-spell-filter-icons,
.wcl-timeline-scroll,
.rio-talent-board,
.rio-talent-layout-board,
.route-run-list {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1180px) {
  .rio-meta-hero,
  .rio-grid.two,
  .rio-spec-gear-grid,
  .wcl-dashboard-secondary,
  .wcl-spec-grid,
  .wcl-cooldown-planbar,
  .route-analysis-layout {
    grid-template-columns: 1fr;
  }

  .rio-meta-source {
    justify-items: start;
    text-align: left;
  }

  .rio-meta-overview,
  .rio-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rio-composition-grid,
  .rio-presence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-run-card {
    max-height: none;
  }
}

@media (max-width: 920px) {
  .rio-tier-card .rio-card-title-row,
  .rio-card-title-row,
  .rio-spec-detail-titlebar,
  .route-map-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rio-tier-card .rio-role-tabs,
  .rio-card-title-row .rio-role-tabs {
    width: 100%;
  }

  .rio-meta-overview,
  .rio-kpi-grid,
  .rio-composition-grid,
  .rio-presence-grid,
  .rio-class-grid {
    grid-template-columns: 1fr;
  }

  .rio-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wcl-filter-bar label,
  .rio-filter-bar label {
    min-width: 0;
    width: 100%;
  }

  .wcl-lorrgs-filter-row {
    grid-template-columns: 1fr;
  }

  .wcl-lorrgs-filter-label {
    min-height: 28px;
    justify-items: start;
    padding: 0 10px;
  }

  .wcl-timeline-scroll {
    --wcl-timeline-label-width: 190px;
  }
}

@media (max-width: 760px) {
  .rio-page {
    gap: 12px;
  }

  .rio-meta-hero,
  .rio-card,
  .rio-filter-bar,
  .rio-status,
  .rio-empty {
    padding: 12px;
  }

  .rio-meta-title h2 {
    font-size: 23px;
    line-height: 1.12;
  }

  .rio-meta-title p,
  .rio-card-title-row p,
  .route-map-head p {
    font-size: 12px;
    line-height: 1.45;
  }

  .rio-dungeon-filter-bar {
    padding: 10px;
  }

  .rio-dungeon-picker {
    gap: 8px;
    margin: 0 -10px;
    padding: 0 10px 8px;
    scroll-padding-inline: 10px;
  }

  .rio-dungeon-option {
    flex-basis: 96px;
    height: 74px;
  }

  .rio-dungeon-option b {
    left: 7px;
    right: 7px;
    bottom: 7px;
    font-size: 11px;
  }

  .rio-role-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rio-tier-card .rio-role-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rio-tier-row {
    grid-template-columns: 1fr;
  }

  .rio-tier-specs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rio-tier-spec {
    width: 100%;
    min-width: 0;
  }

  .rio-table-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 10px;
    padding: 10px 0;
  }

  .rio-table-row > .rio-dungeon-name,
  .rio-table-row > span:first-child {
    grid-column: 1 / -1;
  }

  .rio-table-row > small {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .rio-share-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .rio-share-row small {
    grid-column: 2 / -1;
    justify-self: start;
    text-align: left;
  }

  .rio-composition,
  .rio-composition-grid .rio-composition {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 0;
  }

  .rio-difficulty-row,
  .rio-performance-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .rio-difficulty-row > i,
  .rio-performance-row > i {
    grid-column: 1 / -1;
    width: 100%;
  }

  .rio-difficulty-row small,
  .rio-performance-row small {
    grid-column: 1 / -1;
  }

  .rio-gap-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .rio-gear-row.rio-tier-slot-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .rio-gear-row.rio-tier-slot-row > i,
  .rio-gear-row.rio-tier-slot-row > small {
    grid-column: 2 / -1;
  }

  .rio-gear-row.rio-item-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .rio-gear-row.rio-item-row > small {
    grid-column: 2 / -1;
    text-align: left;
  }

  .rio-gear-name small {
    white-space: normal;
  }

  .wcl-encounter-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .wcl-encounter-icons {
    grid-column: 1 / -1;
  }

  .wcl-ranking-row {
    grid-template-columns: 28px 30px minmax(0, 1fr);
    gap: 8px;
  }

  .wcl-ranking-row em {
    grid-column: 3;
    text-align: left;
  }

  .wcl-talent-row {
    grid-template-columns: minmax(0, 1fr) 72px auto;
  }

  .wcl-timeline-page .wcl-lorrgs-filter {
    display: none;
  }

  .wcl-timeline-page .wcl-timeline-native-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wcl-cooldown-filter-bar,
  .wcl-cooldown-plan-fields,
  .wcl-cooldown-roster-form,
  .wcl-cooldown-assignment-form {
    grid-template-columns: 1fr;
  }

  .wcl-cooldown-plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wcl-cooldown-plan-actions .primary-button,
  .wcl-cooldown-plan-actions .secondary-button {
    width: 100%;
  }

  .visual-note-shell {
    grid-template-columns: 1fr;
  }

  .visual-note-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .rio-card.visual-note-sidebar {
    overflow: visible;
  }

  .visual-note-page-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .visual-note-toolbar-share {
    width: 100%;
    grid-template-columns: 1fr;
    margin-left: 0;
    justify-content: stretch;
  }

  .visual-note-toolbar-share label {
    display: grid;
    gap: 5px;
    height: auto;
    white-space: normal;
  }

  .visual-note-board {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: var(--visual-note-board-ratio, 4 / 3);
  }

  .wcl-cooldown-roster-actions {
    width: 100%;
    justify-content: stretch;
  }

  .wcl-cooldown-roster-actions .secondary-button {
    flex: 1 1 120px;
  }

  .wcl-cooldown-roster-mini-groups {
    align-items: flex-start;
  }

  .wcl-cooldown-roster-mini-group {
    min-width: 0;
  }

  .wcl-cooldown-roster-mini-group:first-child {
    border-left: 0;
  }

  .wcl-cooldown-import-backdrop,
  .wcl-cooldown-roster-import-backdrop,
  .visual-note-raidplan-import-backdrop {
    padding: 8px;
  }

  .wcl-cooldown-import-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .wcl-cooldown-import-results,
  .wcl-cooldown-roster-import-form,
  .visual-note-raidplan-import-form,
  .wcl-cooldown-import-match,
  .wcl-cooldown-import-candidate-card {
    grid-template-columns: 1fr;
  }

  .wcl-cooldown-import-candidate-actions,
  .wcl-cooldown-import-footer,
  .wcl-cooldown-import-step-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wcl-cooldown-import-spec-grid {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  }

  .wcl-cooldown-skill-palette {
    grid-template-columns: minmax(0, 1fr);
  }

  .wcl-timeline-spell-filter-row {
    grid-template-columns: 1fr;
  }

  .wcl-timeline-spell-filter-label {
    justify-items: start;
    padding: 0 9px;
  }

  .wcl-timeline-summary {
    align-items: stretch;
  }

  .wcl-timeline-summary .wcl-timeline-zoom {
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .wcl-timeline-scroll {
    --wcl-timeline-label-width: min(168px, 52vw);
    max-height: 62vh;
  }

  .wcl-timeline-header {
    min-height: 64px;
  }

  .wcl-timeline-label {
    padding: 7px;
  }

  .wcl-timeline-player-cell {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wcl-timeline-log-link {
    grid-template-columns: 24px 28px minmax(0, 1fr);
    gap: 6px;
  }

  .wcl-timeline-row-actions {
    display: flex;
  }

  .wcl-timeline-note-copy,
  .wcl-timeline-expand {
    width: 48px;
    height: 26px;
  }

  .wcl-timeline-expanded-name {
    left: calc(var(--wcl-timeline-label-width) + 6px);
    max-width: 106px;
  }

  .route-map-canvas,
  .route-reference-map {
    min-height: 280px;
  }

  .route-map-canvas.has-dungeon-map,
  .route-reference-map.has-dungeon-map {
    min-height: 0;
  }

  .route-run-card {
    max-height: none;
  }

  .route-run-list {
    max-height: 460px;
  }

  .route-run-detail dl {
    grid-template-columns: 1fr;
  }

  .route-run-route-note {
    align-items: start;
    flex-direction: column;
  }

  .route-run-item {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 112px;
    padding: 12px;
  }

  .route-run-item em {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .rio-tier-card .rio-role-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rio-meta-overview,
  .rio-kpi-grid,
  .rio-presence-grid {
    grid-template-columns: 1fr;
  }

  .rio-class-card,
  .rio-card {
    padding: 11px;
  }

  .rio-class-card header,
  .rio-class-spec,
  .rio-tier-spec {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .rio-class-token,
  .rio-class-spec .rio-spec-icon,
  .rio-tier-spec .rio-spec-icon {
    width: 32px;
    height: 32px;
  }

  .wcl-timeline-scroll {
    --wcl-timeline-label-width: min(150px, 48vw);
  }

  .wcl-timeline-log-link {
    grid-template-columns: 22px 26px minmax(0, 1fr);
  }

  .wcl-timeline-log-link .rio-spec-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .wcl-timeline-note-copy,
  .wcl-timeline-expand {
    width: 44px;
    font-size: 9px;
  }

  .route-map-canvas,
  .route-reference-map {
    min-height: 240px;
  }

  .visual-note-board {
    min-height: 0;
  }

  .visual-note-map-art {
    inset: 0;
  }
}

.community-board-shell,
.community-composer {
  display: grid;
  gap: 18px;
}

.community-composer[hidden],
.community-class-filter[hidden],
.community-board-tabs[hidden],
.community-board-toolbar[hidden],
.community-layout[hidden],
.community-list-panel[hidden],
.community-detail-panel[hidden],
.community-pagination[hidden],
#openCommunityComposer[hidden] {
  display: none !important;
}

.community-board-head {
  align-items: start;
}

.community-board-head h2,
.community-composer h3 {
  margin: 0;
}

.community-board-actions,
.community-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.community-board-tabs,
.community-class-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(144px, 1fr));
  gap: 8px;
}

.community-board-tabs button,
.community-class-filter button,
.community-editor-toolbar button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--control);
  color: var(--text);
}

.community-board-tabs button,
.community-class-filter button {
  display: grid;
  align-items: center;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 10px;
  text-align: left;
}

.community-board-tabs button.active,
.community-class-filter button.active,
.community-editor-toolbar button:hover {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: var(--soft-gold);
}

.community-board-tabs span,
.community-class-filter img {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.community-class-filter img {
  object-fit: cover;
}

.community-board-tabs strong,
.community-class-filter strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-board-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.community-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.community-toolbar-actions > .compact-button {
  width: auto;
  min-height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
}

.community-board-toolbar label,
.community-post-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.community-board-toolbar input,
.community-post-form input,
.community-post-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.community-layout.is-detail {
  max-width: 960px;
}

.community-list-panel,
.community-detail-panel {
  min-width: 0;
}

.community-post-list {
  display: grid;
  gap: 7px;
}

.community-post-item {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 92%, var(--panel-2));
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.community-post-item.active,
.community-post-item:hover {
  border-color: color-mix(in srgb, var(--gold) 54%, var(--line));
  background: var(--soft-gold);
}

.community-post-item strong,
.community-detail-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.community-post-title-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.community-post-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-post-inline-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-post-inline-meta span {
  white-space: nowrap;
}

.community-post-inline-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--quiet);
}

.community-post-item p,
.community-detail-meta,
.community-comment-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.community-post-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.community-post-badges span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.community-detail-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px;
}

.community-detail-empty {
  color: var(--muted);
  text-align: center;
  padding: 42px 12px;
}

.community-detail-head {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.community-detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.community-detail-actions button + button {
  margin-left: auto;
}

.community-detail-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
}

.community-rich-text {
  color: var(--text);
  line-height: 1.75;
}

.community-rich-text a {
  color: var(--rio-item-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.community-rich-text img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.community-rich-text figure {
  margin: 16px 0;
}

.community-rich-text figure img,
.community-rich-text picture,
.community-rich-text source {
  max-width: 100%;
}

.community-rich-text figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.community-rich-text hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.community-rich-text h2,
.community-rich-text h3,
.community-rich-text h4,
.community-rich-text h5,
.community-rich-text h6 {
  margin: 22px 0 10px;
  color: var(--text);
  line-height: 1.35;
}

.community-rich-text aside {
  margin: 16px 0;
}

.community-rich-text table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.community-rich-text th,
.community-rich-text td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}

.community-rich-text th {
  background: var(--field);
  color: var(--text);
  font-weight: 700;
}

.community-rich-text blockquote {
  margin: 12px 0;
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  background: var(--soft-gold);
}

.community-rich-text pre,
.community-rich-text code {
  border-radius: 8px;
  background: var(--field);
  color: var(--teal);
}

.community-rich-text pre {
  overflow: auto;
  padding: 12px;
}

.community-comments {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.community-comment {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--field);
}

.community-comment-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.community-comment-editor {
  min-height: 96px;
}

.community-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.community-post-form {
  display: grid;
  gap: 14px;
}

.community-editor-wrap {
  display: grid;
  gap: 8px;
}

.community-editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.community-editor-toolbar button {
  min-width: 38px;
  padding: 0 10px;
  font-weight: 800;
}

.community-editor {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  padding: 14px;
  line-height: 1.65;
  outline: none;
  overflow-wrap: anywhere;
}

.community-editor:focus {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  box-shadow: 0 0 0 3px var(--soft-gold);
}

.community-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.community-pagination {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.community-pagination > button {
  min-width: 58px;
}

.community-page-numbers {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

.community-page-numbers button,
.community-page-numbers span {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
  padding: 0 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.community-page-numbers button {
  cursor: pointer;
}

.community-page-numbers button.active {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: var(--soft-gold);
  color: var(--text);
}

.community-page-numbers span {
  border-color: transparent;
  background: transparent;
}

@media (max-width: 980px) {
  .community-layout,
  .community-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .community-board-head,
  .community-board-toolbar {
    grid-template-columns: 1fr;
  }

  .community-board-actions,
  .community-toolbar-actions,
  .community-form-actions {
    justify-content: stretch;
  }

  .community-board-actions > button,
  .community-form-actions > button {
    width: 100%;
  }

  .community-board-tabs,
  .community-class-filter {
    grid-template-columns: 1fr;
  }
}

/* Redesign pass: clean operational shell based on the WoW.town draft. */
:root {
  --bg: #f5f7fa;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef3f7;
  --field: #f8fafc;
  --line: #d9e1ea;
  --text: #151b23;
  --muted: #667284;
  --quiet: #8a96a8;
  --gold: #b97616;
  --teal: #0d9488;
  --blue: #2f6fed;
  --green: #2f8f59;
  --red: #c44e4e;
  --amber: #c98620;
  --shadow: 0 18px 40px rgba(32, 44, 60, 0.08);
  --soft-gold: #fff3dc;
  --soft-teal: #e7f6f4;
  --control: #eef3f7;
  --control-hover: #e7edf3;
  --canvas: #eef3f7;
  --radius: 8px;
  --rio-item-link: #8a5300;
  --rio-stat-strong: #744500;
  --modal-backdrop: rgba(21, 27, 35, 0.28);
  --modal-shadow: 0 24px 70px rgba(32, 44, 60, 0.18);
  --battle-net-bg: linear-gradient(135deg, rgba(47, 111, 237, 0.1), rgba(255, 255, 255, 0.96) 58%), #ffffff;
  --battle-net-bg-hover: linear-gradient(135deg, rgba(47, 111, 237, 0.16), rgba(255, 255, 255, 0.98) 58%), #ffffff;
  --battle-net-text: #17202c;
  --battle-net-muted: #5d6b7e;
  --battle-net-icon-bg: radial-gradient(circle at 50% 45%, rgba(47, 111, 237, 0.16), rgba(238, 243, 247, 0.96) 68%);
  --battle-net-icon: #2f6fed;
}

:root[data-theme="dark"] {
  --bg: #101215;
  --sidebar: #171a1f;
  --panel: #171a1f;
  --panel-2: #20252c;
  --field: #111419;
  --line: #303844;
  --text: #edf1f6;
  --muted: #a5afbd;
  --quiet: #748092;
  --gold: #d49a34;
  --teal: #4fc3b7;
  --blue: #78a7ff;
  --green: #75c788;
  --red: #e07171;
  --amber: #e4ad4d;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  --soft-gold: #312719;
  --soft-teal: #18302e;
  --control: #20252c;
  --control-hover: #292f38;
  --canvas: #0d1015;
  --rio-item-link: #ffd86f;
  --rio-stat-strong: #f2d28a;
  --modal-backdrop: rgba(0, 0, 0, 0.62);
  --modal-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
  --battle-net-bg: linear-gradient(135deg, rgba(28, 126, 214, 0.24), rgba(27, 31, 42, 0.95) 58%), #101722;
  --battle-net-bg-hover: linear-gradient(135deg, rgba(45, 148, 235, 0.34), rgba(27, 31, 42, 0.95) 58%), #111a27;
  --battle-net-text: #eef8ff;
  --battle-net-muted: #9fc8e8;
  --battle-net-icon-bg: radial-gradient(circle at 50% 45%, rgba(89, 194, 255, 0.32), rgba(16, 36, 56, 0.78) 68%);
  --battle-net-icon: #8bd7ff;
}

body {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

.nav-icon-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
input,
select,
textarea {
  border-radius: var(--radius);
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  padding: 22px;
  background: var(--sidebar);
  box-shadow: 1px 0 0 var(--line);
}

.sidebar-top {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.brand {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: var(--soft-gold);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.brand-copy,
.brand-copy strong,
.brand-copy small {
  min-width: 0;
}

.brand-copy strong {
  font-size: 21px;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-nav {
  align-content: start;
  gap: 18px;
  margin: 30px 0 0;
}

.nav-section {
  gap: 8px;
}

.nav-section[data-nav-section="community"] {
  order: 1;
}

.nav-section[data-nav-section="raid"] {
  order: 2;
}

.nav-section[data-nav-section="mythic"] {
  order: 3;
}

.nav-section[data-nav-section="sim"] {
  order: 4;
}

.nav-heading {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--quiet);
  padding: 0;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.nav-heading span:last-child {
  font-size: 15px;
  transition: transform 160ms ease;
}

.nav-section.collapsed .nav-heading span:last-child {
  transform: rotate(-90deg);
}

.nav-items {
  display: grid;
  gap: 8px;
}

.nav-section.collapsed .nav-items {
  display: none;
}

.nav-section > p,
.nav-group,
.nav-group-title,
.nav-subnav {
  display: contents;
}

.tool-button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  padding: 6px 10px 6px 6px;
}

.tool-button.compact,
.nav-sub-button {
  min-height: 48px;
  padding-left: 6px;
}

.tool-button span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-color: var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
}

.tool-button .nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.tool-button strong {
  align-self: end;
  color: var(--text);
  font-size: 14px;
  line-height: 1.18;
}

.tool-button small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.tool-button.active,
.tool-button:hover {
  border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
  background: var(--soft-gold);
  color: var(--text);
}

.tool-button.active span,
.tool-button:hover span {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background: color-mix(in srgb, var(--gold) 12%, var(--panel-2));
  color: var(--gold);
}

.main {
  padding: 28px 30px 52px;
}

.header {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 28px;
}

.header h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.08;
}

.subhead {
  margin: 8px 0 0;
  font-size: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.auth-actions {
  gap: 8px;
}

.theme-switch {
  width: auto;
  display: grid;
  grid-template-columns: repeat(2, 38px);
  justify-content: start;
  gap: 6px;
  margin: 0;
  padding: 5px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.theme-switch button {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}

.primary-button,
.secondary-button,
.danger-button,
.compact-button,
.filter-tabs button,
.text-button {
  border-radius: var(--radius);
}

.primary-button {
  background: var(--gold);
  color: #ffffff;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--gold) 20%, transparent);
}

.secondary-button,
.text-button,
.filter-tabs button {
  background: var(--panel);
}

.panel,
.rio-card,
.community-board-shell,
.community-composer,
.auth-modal,
.add-item-modal,
.item-edit-modal,
.wcl-note-modal {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-backdrop {
  background: var(--modal-backdrop);
}

.auth-modal,
.add-item-modal,
.item-edit-modal,
.wcl-note-modal {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--modal-shadow);
}

.auth-modal .modal-head,
.add-item-modal .modal-head,
.item-edit-modal .modal-head,
.wcl-note-modal .modal-head {
  background: color-mix(in srgb, var(--panel) 86%, var(--panel-2));
}

.auth-form input,
.add-item-form input,
.add-item-form select,
.item-edit-form input,
.item-edit-form select {
  border-radius: var(--radius);
  background: var(--field);
  color: var(--text);
}

.battle-net-button {
  background: var(--battle-net-bg);
  color: var(--battle-net-text);
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.12);
}

.battle-net-button:hover {
  background: var(--battle-net-bg-hover);
}

.battle-net-icon {
  background: var(--battle-net-icon-bg);
}

.battle-net-icon svg {
  stroke: var(--battle-net-icon);
}

.battle-net-icon circle {
  fill: var(--battle-net-icon);
}

.battle-net-copy small {
  color: var(--battle-net-muted);
}

.layout,
.topgear-layout,
.queue-layout,
.rio-layout,
.rio-dashboard-layout,
.wcl-dashboard-grid,
.wcl-timeline-layout,
.wcl-cooldown-layout {
  gap: 18px;
}

.workflow-nav {
  border-radius: var(--radius);
}

.rio-page > .rio-meta-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.rio-page > .rio-meta-hero .rio-meta-title {
  align-content: center;
  gap: 0;
}

.rio-page > .rio-meta-hero .rio-meta-title h2,
.rio-page > .rio-meta-hero .rio-meta-title p {
  display: none;
}

.rio-page > .rio-meta-hero .rio-season-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

.rio-page > .rio-meta-hero .rio-meta-source {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.rio-page > .rio-meta-hero .rio-meta-source b {
  font-size: 13px;
}

.rio-page > .rio-meta-hero .rio-meta-source small {
  font-size: 11px;
}

.rio-page > .rio-meta-hero .rio-meta-source .compact-button {
  min-height: 30px;
  height: 30px;
  padding-inline: 10px;
}

.rio-page > .panel-head:not(.rio-spec-detail-titlebar) {
  display: none;
}

.rio-page > .panel-head.rio-spec-detail-titlebar {
  min-height: auto;
  justify-content: flex-end;
  border-bottom: 0;
  padding: 0;
}

.rio-page > .panel-head.rio-spec-detail-titlebar > div {
  display: none;
}

.rio-page.rio-specs-page,
.rio-page.wcl-specs-page {
  gap: 18px;
  padding: 18px;
}

.rio-page.rio-specs-page > .panel-head,
.rio-page.wcl-specs-page > .panel-head {
  min-height: auto;
  display: flex;
  border-bottom: 0;
  padding: 0 0 2px;
}

.rio-page.rio-specs-page > .panel-head h2,
.rio-page.wcl-specs-page > .panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.15;
}

.rio-page.rio-specs-page > .panel-head p,
.rio-page.wcl-specs-page > .panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.rio-page.rio-specs-page .rio-content,
.rio-page.wcl-specs-page .rio-content,
.rio-page.rio-specs-page .rio-spec-landing,
.rio-page.wcl-specs-page .rio-spec-landing {
  gap: 18px;
}

.rio-page.rio-specs-page .rio-class-grid,
.rio-page.wcl-specs-page .rio-class-grid {
  gap: 14px;
}

.community-board-head {
  grid-template-columns: 1fr;
  justify-items: end;
}

.community-board-head > div:first-child {
  display: none;
}

.wcl-raid-roster-page {
  display: grid;
  gap: 18px;
}

.wcl-raid-roster-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(420px, 1.58fr) minmax(260px, 0.78fr);
  align-items: start;
  gap: 18px;
}

.wcl-raid-roster-control,
.wcl-raid-roster-board-card,
.wcl-raid-roster-insight {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.wcl-raid-roster-control .rio-card-title-row,
.wcl-raid-roster-board-card .rio-card-title-row,
.wcl-raid-roster-insight .rio-card-title-row {
  grid-template-columns: 1fr;
  align-items: start;
}

.wcl-raid-roster-control .rio-card-title-row h3,
.wcl-raid-roster-control .rio-card-title-row p,
.wcl-raid-roster-board-card .rio-card-title-row h3,
.wcl-raid-roster-board-card .rio-card-title-row p,
.wcl-raid-roster-insight .rio-card-title-row h3,
.wcl-raid-roster-insight .rio-card-title-row p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wcl-raid-roster-fields,
.wcl-raid-roster-actions,
.wcl-raid-roster-insights {
  display: grid;
  gap: 10px;
}

.wcl-raid-roster-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wcl-raid-roster-fields input,
.wcl-raid-roster-fields select,
.wcl-raid-roster-quick-add input,
.wcl-raid-roster-quick-add select {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 11px;
}

.wcl-raid-roster-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wcl-raid-roster-actions .primary-button,
.wcl-raid-roster-actions .secondary-button {
  width: 100%;
  min-width: 0;
}

.wcl-raid-roster-actions .primary-button {
  grid-column: 1 / -1;
}

.wcl-raid-roster-quick-add {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(110px, 1fr) minmax(118px, 1fr) minmax(86px, 0.72fr) 74px;
  gap: 8px;
  align-items: center;
}

.wcl-raid-roster-board {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--field) 88%, transparent), transparent),
    var(--canvas);
  padding: 10px;
}

.wcl-raid-roster-frame {
  grid-template-rows: repeat(5, 86px);
}

.wcl-raid-roster-frame .wcl-cooldown-member {
  height: 86px;
}

.wcl-raid-roster-synergy-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wcl-raid-roster-synergy-summary span {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 10px;
}

.wcl-raid-roster-synergy-summary b {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.wcl-raid-roster-synergy-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wcl-raid-roster-synergy-groups {
  display: grid;
  gap: 10px;
}

.wcl-raid-roster-synergy-group {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.wcl-raid-roster-synergy-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wcl-raid-roster-synergy-group > div {
  display: grid;
  gap: 6px;
}

.wcl-raid-roster-synergy {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 8px;
}

.wcl-raid-roster-synergy.covered {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--green) 8%, var(--field));
}

.wcl-raid-roster-synergy.missing.core {
  border-color: color-mix(in srgb, var(--red) 48%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--field));
}

.wcl-raid-roster-synergy.missing.recommended {
  border-color: color-mix(in srgb, var(--amber) 46%, var(--line));
  background: color-mix(in srgb, var(--amber) 8%, var(--field));
}

.wcl-raid-roster-synergy-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 86%, var(--field));
  color: var(--amber);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.wcl-raid-roster-synergy-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wcl-raid-roster-synergy-icon b {
  color: currentColor;
  font-size: 14px;
  font-weight: 900;
}

.wcl-raid-roster-synergy-icon i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 54%, #ffffff);
  border-radius: 50%;
  background: rgba(13, 16, 21, 0.86);
  color: currentColor;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.wcl-raid-roster-synergy.covered .wcl-raid-roster-synergy-icon {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  color: var(--green);
}

.wcl-raid-roster-synergy.missing.core .wcl-raid-roster-synergy-icon {
  border-color: color-mix(in srgb, var(--red) 54%, var(--line));
  color: var(--red);
}

.wcl-raid-roster-synergy-main,
.wcl-raid-roster-synergy-provider {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wcl-raid-roster-synergy-main strong,
.wcl-raid-roster-synergy-provider b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcl-raid-roster-synergy-main small,
.wcl-raid-roster-synergy-provider small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.wcl-raid-roster-synergy-main small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.wcl-raid-roster-synergy-provider {
  width: fit-content;
  max-width: 100%;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  border: 1px solid color-mix(in srgb, currentColor 16%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--muted);
  padding: 3px 7px;
  text-align: left;
}

.wcl-raid-roster-synergy-provider b,
.wcl-raid-roster-synergy-provider small {
  white-space: nowrap;
}

.wcl-raid-roster-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wcl-raid-roster-stat-grid span,
.wcl-raid-roster-balance span {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 10px;
}

.wcl-raid-roster-stat-grid small,
.wcl-raid-roster-balance small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wcl-raid-roster-stat-grid b,
.wcl-raid-roster-balance b {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.wcl-raid-roster-stat-grid em {
  color: var(--quiet);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.wcl-raid-roster-balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wcl-raid-roster-class-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wcl-raid-roster-class-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--rio-class-color, var(--gold)) 48%, var(--line));
  background: color-mix(in srgb, var(--rio-class-color, var(--gold)) 10%, var(--field));
  color: var(--text);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
}

.wcl-raid-roster-class-chips span.empty {
  border-color: var(--line);
  background: var(--field);
  color: var(--muted);
}

.wcl-raid-roster-class-chips b {
  color: color-mix(in srgb, var(--rio-class-color, var(--gold)) 78%, var(--text));
}

.wcl-raid-roster-flow {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.wcl-raid-roster-flow span {
  border-left: 3px solid var(--gold);
  background: var(--field);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.community-board-shell {
  padding: 18px;
}

.community-board-head {
  padding-bottom: 4px;
}

.community-board-tabs,
.community-class-filter {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.community-board-tabs button,
.community-class-filter button,
.community-editor-toolbar button {
  border-radius: var(--radius);
}

.community-post-item {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(32, 44, 60, 0.04);
}

.community-post-title-row,
.community-post-item p,
.community-post-badges {
  grid-column: 1 / -1;
}

.community-post-item:hover,
.community-post-item.active {
  background: var(--soft-gold);
}

.community-detail-panel,
.community-comment,
.community-editor {
  border-radius: var(--radius);
}

@media (max-width: 1280px) {
  .wcl-raid-roster-layout {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  }

  .wcl-raid-roster-insight {
    grid-column: 1 / -1;
  }

  .wcl-raid-roster-insights {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .wcl-raid-roster-class-chips,
  .wcl-raid-roster-flow {
    grid-column: 1 / -1;
  }

  .wcl-raid-roster-synergy-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
  }

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

@media (max-width: 920px) {
  .tool-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .wcl-raid-roster-insight {
    grid-column: auto;
  }

  .wcl-raid-roster-insights {
    grid-template-columns: 1fr;
  }

  .wcl-raid-roster-quick-add {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wcl-raid-roster-quick-add button {
    grid-column: 1 / -1;
  }
}

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

  .tool-nav {
    grid-template-columns: 1fr;
  }

  .brand {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  .community-board-tabs,
  .community-class-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-board-tabs button,
  .community-class-filter button {
    min-width: 0;
    grid-template-columns: 28px minmax(0, 1fr);
    padding-inline: 8px;
  }

  .header-actions,
  .auth-actions {
    width: 100%;
  }

  .theme-switch {
    box-shadow: none;
  }

  .wcl-raid-roster-actions,
  .wcl-raid-roster-quick-add,
  .wcl-raid-roster-synergy-summary,
  .wcl-raid-roster-stat-grid,
  .wcl-raid-roster-balance {
    grid-template-columns: 1fr;
  }

  .wcl-raid-roster-synergy {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .wcl-raid-roster-synergy-provider {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .wcl-raid-roster-board {
    margin-inline: -2px;
    padding: 8px;
  }
}

.visual-note-sidebar,
.visual-note-board-card,
.visual-note-board,
.rio-card.visual-note-sidebar,
.visual-note-toolbox,
.visual-note-tool-panel,
.visual-note-tool-section,
.visual-note-icon-search-results {
  max-width: 100%;
  min-width: 0;
}

.visual-note-board-card,
.visual-note-board {
  width: 100%;
  box-sizing: border-box;
}

.visual-note-sidebar,
.rio-card.visual-note-sidebar {
  overflow-x: hidden;
}

.visual-note-tool-section,
.visual-note-icon-search-results {
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  align-items: start;
}

.visual-note-toolbox button {
  width: 100%;
  max-width: 38px;
  justify-self: center;
}

.visual-note-tool-tabs {
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

.visual-note-text-style-row {
  grid-template-columns: minmax(0, 1fr) minmax(68px, 0.65fr) 44px;
}

.visual-note-checkbox-label {
  min-width: 0;
  white-space: normal;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--sidebar);
  }

  .sidebar-top {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-size: 0;
  }

  .nav-toggle span {
    font-size: 20px;
    line-height: 1;
  }

  .sidebar.nav-collapsed .tool-nav,
  .sidebar.nav-collapsed .theme-switch {
    display: none;
  }

  .tool-nav {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0 12px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

.header-copy {
  min-width: 0;
}

.header-actions,
.auth-actions {
  flex-wrap: nowrap;
}

.header-actions {
  min-width: max-content;
}

.auth-actions {
  align-items: center;
}

.auth-actions > button,
.auth-actions .auth-user-chip {
  white-space: nowrap;
}

.auth-user-chip {
  max-width: 180px;
  min-width: 0;
}

.auth-user-chip b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .header-actions {
    width: auto;
    justify-content: flex-end;
  }

  .auth-actions {
    width: auto;
  }
}

@media (max-width: 760px) {
  .header {
    min-height: 0;
    gap: 8px;
    margin-bottom: 18px;
  }

  .header h1 {
    overflow: hidden;
    font-size: clamp(24px, 7.2vw, 32px);
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subhead {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
  }

  .header-actions {
    gap: 6px;
  }

  .theme-switch {
    grid-template-columns: repeat(2, 32px);
    gap: 4px;
    padding: 4px;
    box-shadow: none;
  }

  .theme-switch button {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .auth-actions {
    gap: 6px;
  }

  .auth-actions > .secondary-button,
  .auth-actions .auth-user-chip {
    min-height: 40px;
    padding-inline: 10px;
  }

  .auth-user-chip {
    max-width: 104px;
  }
}

@media (max-width: 380px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header h1 {
    font-size: 23px;
  }

  .theme-switch {
    grid-template-columns: repeat(2, 30px);
  }

  .theme-switch button {
    width: 30px;
    height: 30px;
  }

  .auth-actions > .secondary-button,
  .auth-actions .auth-user-chip {
    min-height: 38px;
    padding-inline: 9px;
    font-size: 13px;
  }
}
