/* Shared spacing and readable controls across raid consultation and editing. */
:root {
  --line-strong: #425167;
  --surface-row: #182231;
  --surface-hover: #202d40;
}
[hidden] { display: none !important; }
.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.profile-account { padding: 28px 22px; text-align: center; }
.profile-avatar { border-radius: 50%; margin: 0 auto 18px; display: block; border: 2px solid #697696; }
.profile-account-symbol { display: grid; place-items: center; margin: 0 auto 20px; width: 70px; height: 70px; font-size: 32px; color: #cdb58c; border: 1px solid #6b614f; background: #cdb58c0b; border-radius: 50%; }
.profile-account-label { font-size: 9px; letter-spacing: .15em; color: #c4aa80; }
.profile-account h2 { margin: 12px 0 8px; font-size: 24px; overflow-wrap: anywhere; }
.profile-discord-name { color: #9faec1; font-size: 12px; line-height: 1.6; }
.profile-status { color: #a4b3c8; font-size: 12px; line-height: 1.6; margin: 18px 0; }
.profile-discord-link { display: block; padding: 13px 12px; border: 1px solid #7a88ec; border-radius: 7px; background: #5865f2; color: white; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.profile-discord-link[aria-disabled="true"] { background: #303a5e; border-color: #465174; color: #bbc4de; cursor: default; }
.profile-secondary { border: 1px solid #4a5870; border-radius: 6px; padding: 10px 14px; color: #c2cddd; background: transparent; cursor: pointer; font: 12px 'DM Sans', sans-serif; }
.profile-account-note { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #344157; font-size: 11px; color: #8e9eb5; line-height: 1.8; }
.profile-characters { padding: 26px; }
.profile-section-head h2 { margin: 0 0 10px; font-size: 24px; }
.profile-section-head p { font-size: 12px; color: #9aaac1; line-height: 1.7; margin: 0; }
.profile-character-list { display: grid; gap: 12px; margin: 24px 0; }
.profile-empty { padding: 24px; color: #94a5bc; font-size: 12px; line-height: 1.7; border: 1px dashed #455570; border-radius: 8px; background: #152031; }
.profile-empty strong { color: #cbd6e5; font-size: 13px; }
.profile-empty p { margin: 8px 0 0; }
.profile-character { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; background: #1b2738; border: 1px solid #394860; border-left: 3px solid var(--class-bg); border-radius: 7px; }
.profile-character-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-character-name img { border-radius: 4px; }
.profile-character-name strong { display: block; color: var(--class-bg); font-size: 15px; overflow-wrap: anywhere; }
.profile-character-name small { display: block; margin-top: 5px; color: #a1b0c6; font-size: 11px; }
.profile-character-actions { display: flex; gap: 8px; }
.profile-character-actions button { font: 11px 'DM Sans', sans-serif; color: #b2bfd2; border: 1px solid #4a5871; background: transparent; padding: 8px; border-radius: 5px; cursor: pointer; }
.profile-character-form { padding-top: 22px; border-top: 1px solid #3a4961; }
.profile-character-form h3 { margin: 0 0 18px; font-size: 16px; font-family: 'DM Sans', sans-serif; font-weight: 600; }
.profile-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-form-fields label { display: grid; gap: 9px; font-size: 12px; color: #c4cfdf; }
.profile-form-fields input, .profile-form-fields select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; color: #e1e9f4; background: #111b29; border: 1px solid #4a5871; border-radius: 6px; font: 13px 'DM Sans', sans-serif; }
.profile-form-fields input:focus, .profile-form-fields select:focus { outline: 2px solid #bda77f; outline-offset: 2px; }
.profile-form-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.profile-form-actions button:disabled { cursor: default; opacity: .5; }
.profile-assignments { padding: 26px; margin-bottom: 24px; }
#profileAssignmentList { display: grid; gap: 12px; margin-top: 22px; }
.profile-attrib { display: grid; grid-template-columns: 1fr 1fr 1.2fr; align-items: center; gap: 20px; padding: 18px; background: #1b2738; border: 1px solid #40506a; border-radius: 7px; }
.profile-attrib small { font-size: 10px; color: #c6ae87; }
.profile-attrib h3 { font: 600 14px 'DM Sans', sans-serif; margin: 6px 0; }
.profile-attrib > div > span, .profile-attrib p { font-size: 12px; line-height: 1.7; color: #b6c4d8; }
.discord-button.is-connected { border-color: #7a6b50; color: #dac6a6; }
.raid-readonly .roster-move-select, .raid-readonly .group-player-menu, .raid-readonly .group-drag-grip, .raid-readonly .raid-groups-intro, .raid-readonly #page-roster .table-foot { display: none; }
.raid-readonly [data-player-drag] { cursor: default !important; }
@media (max-width: 760px) {
  .profile-layout { grid-template-columns: 1fr; gap: 18px; }
  .profile-characters, .profile-assignments { padding: 20px; }
  .profile-attrib { grid-template-columns: 1fr; gap: 12px; }
  .main-nav { flex-wrap: wrap; }
}
.profile-role-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border, #343939); }
.profile-role-row small { display: block; margin-top: 6px; opacity: .65; }
.profile-role-row label { display: flex; align-items: center; gap: 10px; }
.profile-role-row select { max-width: 170px; padding: 9px; background: #161b1c; color: #e6e8e5; border: 1px solid #3b4543; border-radius: 6px; }
@media (max-width: 480px) {
  .main-nav { flex-wrap: wrap; height: auto; min-height: 46px; gap: 8px 10px; padding-bottom: 10px; }
  .main-nav .nav-link { min-height: 34px; }
  .profile-form-fields { grid-template-columns: 1fr; }
  .profile-character { align-items: start; flex-direction: column; }
}

.app-shell { max-width: 1520px; }
.topbar { min-height: 84px; }
.main-nav { gap: 28px; }
.main-nav .nav-link { font-size: 12px; min-height: 44px; }
.main-nav .leader-nav-link { color: #d8bc8e; white-space: nowrap; }
.content-panel, .admin-content, .admin-sidebar { border-radius: 12px; }
.standalone-panel { padding: 22px; }
.table-toolbar { gap: 20px; margin-bottom: 18px; }
.table-title { font-size: 13px; }
.search-wrap { min-height: 36px; }
.search-wrap input { font-size: 12px; }
.table-foot { padding-top: 16px; line-height: 1.6; font-size: 9px; }
.page-intro p, .panel-head p { font-size: 12px; line-height: 1.7; }
button, select, input { accent-color: var(--gold); }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid #dfbd7d;
  outline-offset: 3px;
}
.admin-action, .roster-refresh { min-height: 36px; padding: 9px 13px; font-size: 11px; }
.admin-banner { padding: 18px 20px; gap: 16px; border-color: #3b4658; }
.admin-banner strong { font-size: 13px; }
.admin-banner p { font-size: 11px; line-height: 1.6; }
.admin-placeholder { min-height: 38px; padding: 10px 14px; font-size: 11px; }

/* Rows use a visible gutter and a clear border, with compact class badges. */
.assignment-table { border-collapse: separate; border-spacing: 0 9px; }
.assignment-table th { font-size: 10px; padding: 11px 16px; color: #acb8c9; }
.assignment-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid #35445a;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-row);
  font-size: 12px;
  line-height: 1.5;
  vertical-align: middle;
}
.assignment-table tbody tr:hover td { background: var(--surface-hover); }
.assignment-table tbody td:first-child { border-left: 1px solid #35445a; border-radius: 8px 0 0 8px; }
.assignment-table tbody td:last-child { border-right: 1px solid #35445a; border-radius: 0 8px 8px 0; }
.assignment-table td.player-name-cell { color: #e1e7ef; background: var(--surface-row); }
.raid-player-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 5px;
  background: var(--class-bg, #a6afbd);
  color: #10151d;
}
.raid-player-badge .category-icon { width: 18px; height: 18px; flex-basis: 18px; }
.player-name-cell .raid-player-badge .player-name { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.raid-role { display: inline-block; padding: 5px 9px; background: #0e1723; border-radius: 5px; color: #d2dceb; font-size: 11px; }
.assignment-table .field-pending { padding: 0; border: 0; background: transparent; color: #91a0b5; font-size: 11px; }
.wing-list { gap: 10px; }
.wing-button { min-height: 52px; padding: 12px; }
.wing-name { font-size: 12px; }
.boss-strip { gap: 12px; }
.boss-chip { min-height: 58px; padding: 12px 16px; font-size: 12px; }

/* Main Attrib keeps the Sheet's pairs, without filling the whole cell. */
.main-attrib-board { gap: 18px; padding-bottom: 12px; }
.main-attrib-board .attrib-card { border-color: #38465a; border-radius: 10px; }
.main-attrib-board .attrib-card > header { padding: 13px 14px; border-bottom: 1px solid #43516a; }
.main-attrib-board .attrib-card > header h3 { font-size: 12px; line-height: 1.5; }
.main-attrib-board .attrib-lines { padding: 8px 12px 12px; gap: 3px; }
.main-attrib-board .attrib-line {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 38px;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid #435168;
}
.main-attrib-board .attrib-line:last-child { border-bottom: 0; }
.main-attrib-board .attrib-line .attrib-player {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-height: 27px;
  padding: 5px 8px;
  gap: 7px;
  border-radius: 5px;
}
.main-attrib-board .attrib-line .attrib-player b { font-size: 11px; line-height: 1.4; }
.main-attrib-board .attrib-task { font-size: 11px; line-height: 1.5; }
.main-attrib-board .attrib-divider { padding: 11px 0 6px; color: #c1aa80; font-size: 9px; letter-spacing: .1em; }
.main-attrib-board .attrib-vacant { padding: 4px 8px; color: #a4b0c2; font-size: 19px; line-height: 1; }
.main-attrib-editor select { min-height: 36px; padding: 7px; font-size: 11px; }
.main-attrib-admin .main-attrib-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attrib-marker-target { min-height: 27px; }

/* Raid Leader: one editing area, grouped by wing and boss. */
.admin-workspace { gap: 22px; }
.admin-sidebar { padding: 18px 12px; gap: 8px; align-self: start; }
.admin-tab { min-height: 44px; font-size: 12px; padding: 12px; }
.admin-content { padding: 24px; }
.admin-wing-list { gap: 16px; }
.admin-wing { border: 1px solid #42516a; border-radius: 10px; }
.admin-wing summary { padding: 17px 18px; font-size: 14px; }
.admin-wing summary span { font-size: 11px; padding-top: 3px; }
.admin-wing[open] > summary { border-bottom: 1px solid #42516a; background: #222e40; border-radius: 9px 9px 0 0; }
.admin-wing > div { padding: 0 18px 18px; }
.admin-boss { padding: 22px 0; border-top: 2px solid #3c4a60; }
.admin-boss:first-child { border-top: 0; }
.admin-boss > strong { font-size: 18px; line-height: 1.5; }
.admin-boss > span { margin: 6px 0 16px; font-size: 11px; line-height: 1.6; }
.admin-boss .management-assignment-list { gap: 14px; padding: 8px 0 18px; }
.management-assignment { padding: 15px; gap: 12px; border-color: #43516a; border-radius: 8px; }
.management-assignment label, .assignment-field { gap: 7px; font-size: 10px; }
.management-assignment input, .management-assignment select { height: 36px; font-size: 11px; }
.marker-picker { gap: 8px; flex-wrap: wrap; }
.assignment-text { color: #e6d5b7; font-size: 12px; font-weight: 600; }
.assignment-instruction { color: #d3deeb; font-size: 12px; line-height: 1.65; }
.assignment-content { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.boss-section-title, .management-section > h4 { margin: 23px 0 10px; font-size: 12px; color: #d7be94; font-weight: 600; }
.boss-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 15px 0 20px; }
.boss-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #1b2738; border: 1px solid #43516a; border-radius: 7px; padding: 15px; font-size: 12px; color: #dde5ef; }
.boss-rule strong { color: #d8bc8e; font-size: 12px; }
.management-assignment textarea { width: 100%; min-width: 0; min-height: 62px; resize: vertical; padding: 9px; color: #ccd7e7; background: #172130; border: 1px solid #3a485e; border-radius: 5px; font: 11px/1.6 'DM Sans', sans-serif; }
.assignment-readonly { min-height: 36px; display: flex; align-items: center; padding: 7px 0; }
.marker-picker button { width: 37px; height: 36px; }
.admin-boss .management-assignment.has-many-markers { grid-template-columns: minmax(90px, .6fr) minmax(130px, 1fr) minmax(170px, 1.3fr) 20px; }
.has-many-markers > .assignment-field { grid-column: 1 / -1; grid-row: 2; }
.has-many-markers > label:nth-of-type(3) { grid-column: 3; grid-row: 1; }
.has-many-markers > .management-remove { grid-column: 4; grid-row: 1; }
.management-note { margin-bottom: 18px; font-size: 11px; line-height: 1.7; }
.admin-roster-item { gap: 16px; padding: 13px 9px; border-bottom: 1px solid #415068; }
.admin-roster-item .player-name { font-size: 12px; }
.admin-roster-item .class-cell { font-size: 11px; }
.admin-role-field { font-size: 10px; gap: 5px; }
.admin-role-field select { height: 36px; font-size: 12px; }
.selection-state { font-size: 10px; line-height: 1.5; }
.roster-membership-summary { padding: 14px 9px; font-size: 12px; }

/* Patchwerk associations stay together and have distinct row boundaries. */
.patchwerk-tribe-board { margin: 18px 0; padding: 18px; border: 1px solid #42516a; border-radius: 9px; }
.patchwerk-tribe-board > header { margin-bottom: 17px; }
.patchwerk-tribe-board > header h4 { font-size: 19px; }
.patchwerk-tribe-board > header small, .patchwerk-tribe-board > header > span { font-size: 10px; }
.patchwerk-tribe-table { gap: 10px; }
.patchwerk-tribe-head { padding: 0 12px 7px; font-size: 10px; }
.patchwerk-tribe-row { min-height: 62px; padding: 13px 12px; gap: 14px; border: 1px solid #47576f; border-radius: 7px; background: #1b2738; }
.patchwerk-player { padding: 7px 9px; gap: 8px; font-size: 12px; }
.patchwerk-player .category-icon { width: 17px; height: 17px; flex-basis: 17px; }
.patchwerk-healers { display: flex; flex-wrap: wrap; gap: 8px; }
.patchwerk-tribe-role { font-size: 11px; line-height: 1.5; }

/* Keep the nine roster columns visible, with clearer separation of players. */
.roster-grid { gap: 10px; }
.roster-class-column header { min-height: 43px; padding: 10px 6px; }
.roster-class-column header strong { font-size: 10px; }
.roster-class-column li { padding: 12px 2px; border-bottom: 1px solid #45526a; }
.roster-player-line { gap: 5px; }
.roster-player-line strong { font-size: 10px; line-height: 1.5; }
.roster-class-column li > small { margin: 7px 0; font-size: 8px; line-height: 1.6; }
.roster-move-select { min-height: 29px; padding: 5px 3px; font-size: 9px; }
.roster-class-empty { padding: 16px 8px; font-size: 19px; color: #a4b0c2; }
.raid-group-column li { padding: 13px 3px; border-bottom: 1px solid #45526a; }
.raid-group-player strong { font-size: 11px; line-height: 1.5; }
.raid-group-player select { min-height: 29px; font-size: 9px; }
.raid-group-column li > small { margin-top: 8px; font-size: 9px; }

/* Stable wing layout: reserve the scrollbar and share fixed column widths. */
.hero {
  min-height: 235px; padding: 36px; display: flex; align-items: center;
  background: linear-gradient(90deg, #07100ce6, #0c151638 65%, #0c151618), url('./assets/naxxramas-necropolis.png') center 48% / cover;
  border-color: #405347;
}
.hero::after { content: none; }
.hero h1 { margin: 0; font-size: clamp(36px, 4vw, 56px); text-shadow: 0 3px 20px #000a; }
.wing-boss-sections { display: grid; gap: 30px; }
.wing-boss-section { min-width: 0; padding-top: 22px; border-top: 1px solid #46556c; }
.wing-boss-section:first-child { padding-top: 10px; border-top: 0; }
.wing-boss-heading { margin-bottom: 12px; }
.wing-boss-heading > span { font-size: 9px; letter-spacing: .13em; color: #bca47c; }
.wing-boss-heading h3 { margin: 7px 0 0; font-size: 19px; font-family: 'DM Sans', sans-serif; font-weight: 600; line-height: 1.4; }
.wing-boss-section .assignment-table-wrap { min-height: 0; }
.assignment-table tbody .boss-no-assignment { color: #94a3b8; padding: 20px 16px; }
.raid-layout { align-items: start; }
.roster-player-line + .roster-move-select { margin-top: 10px; }
html { scrollbar-gutter: stable; }
.assignment-table { table-layout: fixed; }
.assignment-table .player-column { width: 31%; }
.assignment-table .role-column { width: 16%; }
.assignment-table .assignment-column { width: 23%; }
.assignment-table .instruction-column { width: 30%; }
.assignment-table tbody td { overflow-wrap: anywhere; }
.assignment-table tbody td.player-name-cell {
  padding: 14px 16px;
  border-top: 1px solid #35445a;
  border-bottom: 1px solid var(--line-strong);
}
.assignment-table tbody tr:last-child td { border-bottom: 1px solid var(--line-strong); }
.raid-layout > .content-panel .table-title { min-width: 0; }
.raid-layout #tableHeading { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.raid-layout .table-toolbar .search-wrap { flex-shrink: 0; }
.raid-layout .boss-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raid-layout .boss-chip, .raid-layout .boss-chip:not(:first-child) {
  min-width: 0; max-width: none; min-height: 76px; overflow-wrap: anywhere;
}

/* Raid Planner: compact class-coloured player tiles in eight group cards. */
.raid-planner-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0 10px; }
.raid-planner-heading .section-label { padding: 0; color: #9dabbf; font-size: 9px; letter-spacing: .15em; }
.raid-planner-heading h3 { margin: 7px 0 0; font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 600; }
.raid-planner-capacity { color: #bcc6d4; font-size: 11px; line-height: 1.7; }
.raid-planner-capacity > span { padding: 0 7px; color: #63728a; }
.raid-groups-intro { font-size: 11px; color: #9cabbf; margin: 0 0 24px; line-height: 1.7; }
.raid-groups-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; padding-bottom: 22px; }
.raid-group-column { overflow: visible; border: 1px solid #344157; border-radius: 10px; background: #121c29; box-shadow: 0 5px 16px #0002; }
.raid-group-column header { padding: 14px 12px; background: transparent; border-bottom: 1px solid #344157; border-radius: 10px 10px 0 0; gap: 10px; }
.raid-group-column header strong { font-size: 13px; color: #e2e7ef; }
.raid-group-column .group-mark { width: 25px; height: 25px; border: 1px solid #756246; border-radius: 7px; display: grid; place-items: center; font-size: 10px; color: #ddc394; background: #ba966714; }
.raid-group-column .group-count { color: #a7b6c9; font-size: 10px; padding: 3px 5px; background: #253044; border-radius: 4px; }
.raid-group-column ul { display: flex; flex-direction: column; gap: 7px; padding: 12px 10px; min-height: 288px; }
.raid-group-column li[data-group-target], .raid-group-column li[data-group-target]:last-child {
  position: relative; padding: 0; border: 1px solid #ffffff0b; border-left: 3px solid var(--class-bg); border-radius: 5px;
  background: #212d3d; box-shadow: 0 2px 4px #0002;
}
.raid-group-column li[data-group-target]:hover { background: #2b394d; }
.raid-group-player { gap: 7px; padding: 8px 6px; min-height: 47px; }
.raid-group-player .category-icon { width: 25px; height: 25px; flex-basis: 25px; border-radius: 3px; overflow: hidden; }
.raid-group-player .category-icon img { width: 25px; height: 25px; object-fit: cover; }
.raid-group-player strong { font-size: 11px; font-weight: 600; line-height: 1.4; color: var(--class-bg); }
.group-drag-grip { font-size: 15px; color: #7f8ca1; line-height: 1; }
.group-player-role { font-size: 8px; color: #adb9c9; }
.group-player-menu { flex-shrink: 0; }
.group-player-menu summary { list-style: none; cursor: pointer; border-radius: 4px; color: #adb9c9; font-size: 17px; padding: 2px 4px; line-height: 1.3; }
.group-player-menu summary::-webkit-details-marker { display: none; }
.group-player-menu summary:hover, .group-player-menu[open] summary { color: #e3cfaa; background: #ffffff0c; }
.group-player-menu summary:focus-visible { outline: 2px solid #c6a675; outline-offset: 2px; }
.group-player-menu[open] { position: relative; z-index: 6; }
.group-player-actions { position: absolute; top: calc(100% + 8px); right: 0; width: 232px; display: grid; gap: 15px; background: #162131; padding: 16px; border: 1px solid #65728a; border-radius: 8px; box-shadow: 0 12px 35px #0008; cursor: default; }
.group-player-actions label { display: grid; gap: 7px; color: #d6deea; font-size: 11px; }
.raid-group-player .group-player-actions select { width: 100%; min-height: 36px; font-size: 11px; padding: 6px; }
.raid-group-column li.group-empty-slot { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; padding: 8px; border: 1px dashed #3d4c63; border-radius: 5px; color: #8291a7; font-size: 11px; }
.group-empty-slot > span { font-size: 18px; }
.raid-group-column.unassigned-column { grid-column: 1 / -1; }
.raid-group-column.unassigned-column ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 0; }
.raid-group-column li.dragging { opacity: .35; }
.raid-group-column li.drop-target { outline: 2px solid #dec08d; outline-offset: 2px; background: #3c3a38; }

@media (max-width: 1100px) {
  .raid-groups-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .raid-group-column.unassigned-column ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-workspace { grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
  .admin-content { padding: 18px; }
  .admin-boss .management-assignment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .raid-groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .raid-group-column.unassigned-column ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raid-planner-heading { align-items: start; flex-direction: column; gap: 8px; }
  .assignment-table tbody td.player-name-cell { padding: 11px 9px; }
  .raid-layout .boss-strip { grid-template-columns: repeat(4, 150px); }
  .app-shell { padding: 0 18px; }
  .main-attrib-board { gap: 16px; }
  .standalone-panel { padding: 16px; }
  .admin-wing > div { padding: 0 12px 12px; }
  .table-toolbar { flex-wrap: wrap; gap: 12px; }
  .table-foot { flex-wrap: wrap; gap: 7px; }
  .assignment-table th, .assignment-table tbody td { padding: 11px 9px; }
  .main-attrib-admin .main-attrib-board { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .topbar { display: grid; grid-template-columns: 1fr auto; height: auto; padding-top: 15px; gap: 12px; }
  .main-nav { display: flex; grid-column: 1 / -1; grid-row: 2; height: 46px; width: 100%; justify-content: center; gap: 22px; }
  .top-actions { min-width: 0; }
}
@media (max-width: 650px) {
  .admin-boss .management-assignment.has-many-markers { grid-template-columns: 1fr; }
  .has-many-markers > .assignment-field, .has-many-markers > label:nth-of-type(3), .has-many-markers > .management-remove { grid-column: auto; grid-row: auto; }
  .topbar { display: grid; grid-template-columns: 1fr auto; height: auto; padding-top: 15px; gap: 12px; }
  .brand { min-width: 0; }
  .main-nav { display: flex; grid-column: 1 / -1; grid-row: 2; height: 46px; width: 100%; justify-content: center; gap: 12px; }
  .main-nav .nav-link { padding: 0 3px; font-size: 11px; }
  .top-actions { min-width: 0; }
  .demo-tag { display: none; }
  .admin-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
  .admin-tab { font-size: 12px; min-height: 42px; }
  .admin-content .admin-action { font-size: 11px; white-space: normal; }
  .admin-content .admin-action::before { content: none; }
  .admin-content .panel-head { flex-wrap: wrap; gap: 12px; }
  .admin-boss .management-assignment { grid-template-columns: 1fr; }
  .patchwerk-tribe-board { padding: 12px; }
  .patchwerk-tribe-board > header { flex-wrap: wrap; gap: 6px; }
  .patchwerk-tribe-head, .patchwerk-tribe-row { gap: 7px; }
  .patchwerk-tribe-head { padding: 0 4px 6px; font-size: 8px; }
  .patchwerk-tribe-row { padding: 11px 5px; }
  .patchwerk-player { padding: 6px; gap: 4px; font-size: 10px; }
  .patchwerk-player b { overflow-wrap: anywhere; white-space: normal; }
  .patchwerk-tribe-role { font-size: 10px; }
  .admin-roster-item .selection-state { display: block; }
}
@media (max-width: 480px) {
  .raid-groups-grid, .raid-group-column.unassigned-column ul { grid-template-columns: minmax(0, 1fr); }
}
