html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.fdt-site {
  position: relative;
  min-height: 100vh;
  background-color: #041018;
  color: #eef6fb;
}

.fdt-site::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(4, 16, 24, 0.55), rgba(4, 16, 24, 0.72)),
    url("/img/wos917-emblem.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(88vmin, 680px);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.fdt-site > header,
.fdt-site > .fdt-content {
  position: relative;
  z-index: 1;
}

.fdt-navbar {
  background-color: rgba(8, 28, 40, 0.92) !important;
  backdrop-filter: blur(6px);
}

.fdt-nav-groups {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}

.fdt-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.fdt-nav-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 246, 251, 0.48);
  line-height: 1.2;
  padding-left: 0.5rem;
}

.fdt-nav-group-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.15rem;
}

.fdt-nav-group-links .nav-link {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .fdt-nav-groups {
    flex-direction: row;
    align-items: flex-end;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .fdt-nav-group {
    padding: 0 0.85rem;
    border-left: 1px solid rgba(238, 246, 251, 0.16);
  }

  .fdt-nav-group:first-child {
    padding-left: 0;
    border-left: none;
  }

  .fdt-nav-group-label {
    padding-left: 0.5rem;
  }
}

.fdt-brand-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

/* Sheets / roster boards match page chrome; zebra still separates players. */
.fdt-content .tab-pane,
.fdt-content .roster-column {
  background-color: rgba(8, 28, 40, 0.9);
  color: #eef6fb;
  color-scheme: dark;
}

.fdt-content .card {
  background-color: rgba(8, 28, 40, 0.9);
  color: #eef6fb;
  border: 1px solid rgba(238, 246, 251, 0.14);
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  color-scheme: dark;
}

.fdt-content .card .form-label,
.fdt-content .card h1,
.fdt-content .card h2,
.fdt-content .card h3,
.fdt-content .card .h6,
.fdt-content .card .form-check-label {
  color: #eef6fb;
}

.fdt-content .card .form-control,
.fdt-content .card .form-select {
  background-color: rgba(4, 16, 24, 0.75);
  border-color: rgba(238, 246, 251, 0.24);
  color: #eef6fb;
}

.fdt-content .card .form-control:focus,
.fdt-content .card .form-select:focus {
  background-color: rgba(4, 16, 24, 0.92);
  border-color: #9ee7ff;
  color: #eef6fb;
  box-shadow: 0 0 0 0.2rem rgba(158, 231, 255, 0.22);
}

.fdt-content .card .form-control::placeholder {
  color: rgba(238, 246, 251, 0.42);
}

.fdt-content .card .form-control:disabled,
.fdt-content .card .form-select:disabled {
  background-color: rgba(4, 16, 24, 0.45);
  color: rgba(238, 246, 251, 0.55);
}

.fdt-content .card .form-check-input {
  background-color: rgba(4, 16, 24, 0.75);
  border-color: rgba(238, 246, 251, 0.4);
}

.fdt-content .card .form-check-input:checked {
  background-color: #0b6e8a;
  border-color: #0b6e8a;
}

.fdt-content .card .form-check-input:disabled {
  opacity: 0.55;
}

.alliance-tab-rows {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.alliance-tab-rows .nav-tabs {
  flex-wrap: wrap;
  row-gap: 0.15rem;
}

.alliance-tab-rows .nav-tabs.fdt-ref-tab-row {
  border-bottom-color: rgba(255, 255, 255, 0.2);
  margin-top: 0.1rem;
}

.alliance-tab-rows .nav-tabs:not(.fdt-ref-tab-row) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0;
}

.fdt-content .nav-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.fdt-content .nav-tabs .nav-link.fdt-none-tab {
  color: rgba(220, 220, 220, 0.9);
}

.fdt-content .nav-tabs .nav-link.fdt-none-tab.active {
  background-color: rgba(8, 28, 40, 0.95);
  color: #eef6fb;
  border-color: rgba(238, 246, 251, 0.18);
  border-bottom-color: transparent;
}

.fdt-content .nav-tabs .nav-link {
  color: rgba(255, 255, 255, 0.82);
  border-color: transparent;
}

.fdt-content .nav-tabs .nav-link.active {
  background-color: rgba(8, 28, 40, 0.95);
  color: #eef6fb;
  border-color: rgba(238, 246, 251, 0.18);
  border-bottom-color: transparent;
}

.fdt-content .nav-tabs .nav-link.fdt-shell-tab {
  color: rgba(140, 210, 255, 0.95);
}

.fdt-content .nav-tabs .nav-link.fdt-shell-tab.active {
  background-color: rgba(12, 48, 68, 0.98);
  color: #b8e4ff;
  border-color: rgba(140, 210, 255, 0.35);
  border-bottom-color: transparent;
}

.fdt-content .nav-tabs .fdt-shell-sep {
  pointer-events: none;
  opacity: 0.7;
}

.fdt-content .nav-tabs .nav-link.fdt-ref-tab {
  color: rgba(255, 224, 130, 0.95);
}

.fdt-content .nav-tabs .nav-link.fdt-ref-tab.active {
  background-color: rgba(48, 38, 12, 0.95);
  color: #ffe082;
  border-color: rgba(255, 224, 130, 0.35);
  border-bottom-color: transparent;
}

.fdt-content .nav-tabs .fdt-ref-mark {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-left: 0.15rem;
}

.fdt-ref-pane {
  background: rgba(48, 38, 12, 0.45);
}

.fdt-ref-sheet {
  background: transparent;
  color: #eef6fb;
  font-size: 0.85rem;
}

.fdt-ref-sheet th,
.fdt-ref-sheet td {
  white-space: nowrap;
}

.fdt-content .tab-content {
  padding-top: 0.75rem;
}

.fdt-content .tab-pane {
  border: 1px solid rgba(238, 246, 251, 0.12);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}

.fdt-content .tab-pane .table-responsive {
  border: 1px solid rgba(238, 246, 251, 0.1);
  border-radius: 0.5rem;
  overflow-x: hidden;
  overflow-y: visible;
  background-color: transparent;
}

.fdt-content .tab-pane.fdt-sheet-pane {
  padding: 0.65rem 0.75rem 0.85rem;
}

.fdt-content .tab-pane .text-info {
  color: #9ee7ff !important;
}

.fdt-content .text-muted {
  color: rgba(238, 246, 251, 0.72) !important;
}

.fdt-content .card .text-muted {
  color: rgba(238, 246, 251, 0.62) !important;
}

.fdt-content .tab-pane .text-muted,
.fdt-content .table .text-muted,
.fdt-content .roster-column .text-muted {
  color: rgba(238, 246, 251, 0.62) !important;
}

.fdt-content a:not(.btn):not(.nav-link) {
  color: #9ee7ff;
}

.btn-primary {
  --bs-btn-bg: #0b6e8a;
  --bs-btn-border-color: #0b6e8a;
  --bs-btn-hover-bg: #0a5d75;
  --bs-btn-hover-border-color: #0a5d75;
  --bs-btn-active-bg: #084c60;
  --bs-btn-active-border-color: #084c60;
}

.fdt-sheet td.cell-max,
.cell-max {
  --bs-table-bg: rgba(34, 120, 72, 0.45);
  background-color: rgba(34, 120, 72, 0.45) !important;
}

.fdt-sheet td.cell-low,
.cell-low {
  --bs-table-bg: rgba(160, 96, 24, 0.4);
  background-color: rgba(160, 96, 24, 0.4) !important;
}

.fdt-sheet {
  width: 100%;
  margin-bottom: 0;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
  --bs-table-color: #eef6fb;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(238, 246, 251, 0.12);
  color: #eef6fb;
}

.fdt-sheet .form-control-sm,
.fdt-sheet .form-select-sm {
  background-color: rgba(4, 16, 24, 0.78);
  border-color: rgba(238, 246, 251, 0.26);
  color: #eef6fb;
}

.fdt-sheet .form-control-sm:focus,
.fdt-sheet .form-select-sm:focus {
  background-color: rgba(4, 16, 24, 0.95);
  border-color: #9ee7ff;
  color: #eef6fb;
  box-shadow: 0 0 0 0.15rem rgba(158, 231, 255, 0.2);
}

.fdt-sheet .form-control-sm:disabled,
.fdt-sheet .form-select-sm:disabled {
  background-color: rgba(4, 16, 24, 0.4);
  color: rgba(238, 246, 251, 0.5);
}

.fdt-sheet .form-select-sm {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ee7ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.fdt-sheet .form-check-input {
  background-color: rgba(4, 16, 24, 0.78);
  border-color: rgba(238, 246, 251, 0.4);
}

.fdt-sheet .form-check-input:checked {
  background-color: #0b6e8a;
  border-color: #0b6e8a;
}

.fdt-sheet th,
.fdt-sheet td {
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.2;
  vertical-align: middle;
  padding: 0.2rem 0.22rem !important;
}

.fdt-sheet thead th {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0;
  white-space: normal;
  line-height: 1.15;
  hyphens: auto;
}

.fdt-sheet code {
  color: inherit;
  font-size: inherit;
  font-family: ui-monospace, Consolas, monospace;
  background: transparent;
}

.fdt-sheet .form-control-sm,
.fdt-sheet .form-select-sm {
  font-size: 0.76rem;
  line-height: 1.25;
  padding: 0.12rem 0.28rem;
  min-height: 1.55rem;
  height: 1.55rem;
  width: 100%;
}

.fdt-sheet .form-select-sm {
  padding-right: 1.15rem;
  background-position: right 0.2rem center;
  background-size: 11px 9px;
}

.fdt-sheet .form-check-input {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0;
}

.fdt-sheet col.c-num { width: 1.8%; }
.fdt-sheet col.c-lead { width: 2.2%; }
.fdt-sheet col.c-name { width: 7.2%; }
.fdt-sheet col.c-id { width: 5.4%; }
.fdt-sheet col.c-ally { width: 3.6%; }
.fdt-sheet col.c-real { width: 3.6%; }
.fdt-sheet col.c-pwr { width: 3.4%; }
.fdt-sheet col.c-fc { width: 3.4%; }
.fdt-sheet col.c-big { width: 4.4%; }
.fdt-sheet col.c-tier { width: 9.2%; }
.fdt-sheet col.c-stack { width: 8.4%; }
.fdt-sheet col.c-join { width: 3.6%; }
.fdt-sheet col.c-avail { width: 9.8%; }
.fdt-sheet col.c-del { width: 2%; }

.fdt-sheet .w-name,
.fdt-sheet .w-ally,
.fdt-sheet .w-pwr,
.fdt-sheet .w-fc,
.fdt-sheet .w-big {
  max-width: none;
}

.fdt-sheet .w-pwr,
.fdt-sheet .w-big {
  text-align: right;
}

.fdt-sheet .w-big {
  font-size: 0.7rem;
  padding-left: 0.12rem;
  padding-right: 0.12rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.fdt-sheet .w-tal-level {
  width: 100%;
  margin-bottom: 0.15rem;
}

.tal-legion-board .tal-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.2rem;
  font-weight: 600;
}

.tal-legion-board .tal-legion-comp {
  border-top: 3px solid #2563eb;
}

.tal-legion-board .tal-legion-part {
  border-top: 3px solid #0d9488;
}

/* Keep legion columns on-screen so you can drag between L1/L2 without page-scrolling the whole roster. */
.tal-legion-board > .col-xl-3 .roster-list,
.tal-legion-board > .col-lg-6 .roster-list {
  max-height: min(72vh, 44rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.35rem;
}

.tal-legion-board .roster-head {
  padding: 0.5rem 0.65rem 0.4rem;
}

.tal-legion-board .roster-head .h5 {
  font-size: 1rem;
  margin-bottom: 0.15rem !important;
}

.tal-legion-board .tal-coverage {
  gap: 0.2rem 0.5rem;
  font-size: 0.68rem;
}

.tal-legion-board .tal-legion-card {
  padding: 0.22rem 0.4rem;
  margin-bottom: 0.22rem;
  border-radius: 0.35rem;
  line-height: 1.15;
}

.tal-legion-board .tal-legion-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
}

.tal-legion-board .tal-legion-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tal-legion-board .tal-legion-card .badge,
.tal-legion-board .tal-legion-card .tal-role-toggle {
  font-size: 0.58rem;
  padding: 0.12rem 0.28rem;
  flex-shrink: 0;
  cursor: pointer;
  line-height: 1.2;
}

.tal-legion-board .tal-legion-card .tal-role-toggle:hover {
  filter: brightness(1.08);
  outline: 1px solid rgba(15, 23, 42, 0.25);
}

.tal-legion-board .tal-legion-card-meta {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tal-legion-board .tal-extras-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.25rem;
  max-height: min(36vh, 18rem);
  overflow-y: auto;
}

.tal-legion-board .tal-extras-list .roster-card {
  margin: 0;
}

.fdt-sheet .w-tier,
.fdt-sheet .w-tfc {
  width: calc(33.333% - 0.08rem);
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.05rem;
}

.fdt-sheet .w-tier:last-child,
.fdt-sheet .w-tfc:last-child {
  margin-right: 0;
}

/* Compact select chrome so T12 / L3 / 10 aren't clipped by the chevron */
.fdt-sheet .w-tier,
.fdt-sheet .w-tfc {
  padding-left: 0.1rem;
  padding-right: 0.95rem;
  font-size: 0.7rem;
  letter-spacing: -0.02em;
}

.fdt-sheet td.col-stack,
.fdt-sheet td.col-tier {
  white-space: nowrap;
}

.fdt-sheet td.col-stack .form-select-sm,
.fdt-sheet td.col-tier .form-select-sm {
  margin: 0;
}

.fdt-sheet td.col-avail {
  white-space: normal;
  font-size: 0.72rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  min-width: 0;
}

.fdt-sheet .avail-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.35rem;
  margin-top: 0.25rem;
}

.fdt-sheet .avail-hours label {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  font-size: 0.65rem;
}

.fdt-sheet td.col-id {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.74rem;
}

.fdt-sheet .btn-del {
  font-size: 0.75rem;
  padding: 0.08rem 0.35rem;
  line-height: 1.1;
}

/* Excel-style zebra on dark sheet: each player is a main+stats pair. */
.fdt-sheet-stacked > tbody > tr.player-main:nth-child(4n + 1) > td,
.fdt-sheet-stacked > tbody > tr.player-stats:nth-child(4n + 2) > td {
  --bs-table-bg: rgba(14, 42, 58, 0.92);
  background-color: rgba(14, 42, 58, 0.92);
}

.fdt-sheet-stacked > tbody > tr.player-main:nth-child(4n + 3) > td,
.fdt-sheet-stacked > tbody > tr.player-stats:nth-child(4n + 4) > td {
  --bs-table-bg: rgba(6, 22, 32, 0.72);
  background-color: rgba(6, 22, 32, 0.72);
}

.fdt-sheet-stacked > tbody > tr.player-main > td:not([rowspan]) {
  border-bottom: 0;
  vertical-align: bottom;
  padding-top: 0.4rem !important;
  padding-bottom: 0.18rem !important;
}

.fdt-sheet-stacked > tbody > tr.player-stats > td {
  border-top: 0;
  vertical-align: top;
  padding-top: 0.18rem !important;
  padding-bottom: 0.45rem !important;
}

.fdt-sheet-stacked td.cell-identity {
  vertical-align: middle;
  background-clip: padding-box;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

.fdt-sheet-stacked td.cell-real {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  border-right: 1px solid rgba(238, 246, 251, 0.16);
  padding-right: 0.45rem !important;
}

.fdt-sheet .field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.fdt-sheet .field-label {
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(158, 231, 255, 0.72);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fdt-sheet .field-stack.field-stack-inline {
  align-items: center;
  gap: 0.2rem;
}

.fdt-sheet .field-stack.field-stack-inline .field-label {
  text-transform: none;
  font-size: 0.62rem;
}

.fdt-sheet .field-stack .col-stack,
.fdt-sheet .field-stack .col-tier {
  width: 100%;
}

.fdt-sheet-stacked > tbody > tr.player-main {
  border-top: 1px solid rgba(238, 246, 251, 0.16);
}

.fdt-ref-sheet tr.player-main:nth-child(4n + 1) > td,
.fdt-ref-sheet tr.player-stats:nth-child(4n + 2) > td {
  --bs-table-bg: rgba(56, 44, 14, 0.88);
  background-color: rgba(56, 44, 14, 0.88);
}

.fdt-ref-sheet tr.player-main:nth-child(4n + 3) > td,
.fdt-ref-sheet tr.player-stats:nth-child(4n + 4) > td {
  --bs-table-bg: rgba(32, 26, 10, 0.7);
  background-color: rgba(32, 26, 10, 0.7);
}

.fdt-ref-sheet tr.player-main td:not([rowspan]) {
  border-bottom: 0;
}

.fdt-ref-sheet tr.player-stats td {
  border-top: 0;
}

.fdt-ref-sheet td.cell-real {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fdt-ref-sheet .field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.fdt-ref-sheet .field-label {
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 224, 130, 0.75);
}

.roster-column {
  border-radius: 0.75rem;
  min-height: 28rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}

.roster-list {
  padding: 0.65rem;
  min-height: 22rem;
  flex: 1;
}

.roster-waiting {
  outline: 2px dashed #94a3b8;
  outline-offset: -2px;
}

.roster-head {
  padding: 0.85rem 1rem 0.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.roster-waiting .roster-list {
  min-height: 8rem;
  flex: 1 1 auto;
}

.roster-subhead {
  padding: 0.55rem 1rem 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #f1f5f9;
}

.roster-list.drag-over {
  outline: 2px dashed #0b6e8a;
  outline-offset: -6px;
}

.roster-card {
  background: #f8fafc;
  border: 1px solid #dbe7ef;
  border-radius: 0.5rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  cursor: grab;
}

.roster-card.dragging {
  opacity: 0.45;
}

.roster-card.drop-before {
  box-shadow: 0 -3px 0 #0b6e8a;
}

.roster-empty {
  color: #6c757d;
  font-size: 0.9rem;
  padding: 1.25rem 0.5rem;
  text-align: center;
}

.svs-lead-card {
  border: 1px solid #c5d5e0;
  border-radius: 0.65rem;
  background: #eef5f9;
  padding: 0.45rem;
  margin-bottom: 0.75rem;
}

.svs-lead-card .svs-lead-handle {
  background: #dbeafe;
  border-color: #93c5fd;
}

.svs-joiner-slot {
  min-height: 3.5rem;
  padding: 0.35rem 0.4rem !important;
  margin: 0.35rem 0 0;
  background: #f8fafc;
  border-radius: 0.45rem;
  border: 1px dashed #cbd5e1;
}

.svs-joiner-slot.drag-over {
  outline: 2px dashed #0b6e8a;
  outline-offset: -2px;
  background: #e0f2fe;
}

.svs-joiner-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.2rem;
}

.svs-joiner-empty {
  padding: 0.35rem !important;
  font-size: 0.8rem;
}

.svs-alliance-block {
  padding: 0.75rem 0.85rem 0.35rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.svs-alliance-block > .h5 {
  margin: 0 0 0.65rem;
}

.svs-rally-bucket .roster-list {
  min-height: 16rem;
}

.svs-discord-pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  max-height: 28rem;
  overflow: auto;
}

.svs-discord-details {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  color: #0f172a;
}

.svs-discord-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

/* Compact SvS rally board */
.svs-rally-board .svs-pool-strip,
.svs-rally-board .svs-group-col,
.svs-rally-board .svs-alliance-block,
.svs-rally-board .svs-discord-details,
.svs-rally-board .svs-chip,
.svs-rally-board .svs-joiner-chip,
.svs-rally-board .svs-lead-handle,
.svs-rally-board .svs-lead-card,
.svs-rally-board .svs-joiner-slot {
  color: #0f172a;
}

.svs-rally-board .svs-pool-strip .text-muted,
.svs-rally-board .svs-chip span,
.svs-rally-board .svs-joiner-chip span,
.svs-rally-board .svs-meta,
.svs-rally-board .svs-pool-empty,
.svs-rally-board .svs-drop-hint,
.svs-rally-board .svs-joiner-empty,
.svs-rally-board .svs-joiner-label {
  color: #334155 !important;
}

.svs-rally-board .svs-chip strong,
.svs-rally-board .svs-joiner-chip strong,
.svs-rally-board .svs-lead-line strong,
.svs-rally-board .svs-group-head strong,
.svs-rally-board .svs-alliance-title,
.svs-rally-board .svs-pool-head strong {
  color: #0f172a;
}

.svs-rally-board .svs-pool-strip {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 0.55rem;
  padding: 0.4rem 0.55rem;
}

.svs-rally-board .svs-pool-head {
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.svs-rally-board .svs-pool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.25rem;
  border-radius: 0.4rem;
}

.svs-rally-board .svs-pool-list.drag-over {
  outline: 2px dashed #0b6e8a;
  background: #e0f2fe;
}

.svs-rally-board .svs-pool-empty {
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
}

.svs-rally-board .svs-chip,
.svs-rally-board .svs-joiner-chip,
.svs-rally-board .svs-lead-handle {
  cursor: grab;
  border-radius: 0.4rem;
  border: 1px solid #64748b;
  background: #ffffff;
  padding: 0.28rem 0.45rem;
  line-height: 1.2;
}

.svs-rally-board .svs-chip {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: 14rem;
  font-size: 0.78rem;
}

.svs-rally-board .svs-chip span,
.svs-rally-board .svs-joiner-chip span,
.svs-rally-board .svs-meta {
  font-size: 0.7rem;
}

.svs-rally-board .svs-chip.dragging,
.svs-rally-board .svs-joiner-chip.dragging,
.svs-rally-board .svs-lead-handle.dragging {
  opacity: 0.45;
}

.svs-rally-board .svs-alliance-block {
  padding: 0.45rem 0.55rem 0.35rem;
  margin: 0;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid #94a3b8;
  border-radius: 0.55rem;
}

.svs-rally-board .svs-alliance-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.svs-rally-board .svs-group-grid {
  display: grid;
  gap: 0.45rem;
}

.svs-rally-board .svs-group-grid[data-cols="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.svs-rally-board .svs-group-grid[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 992px) {
  .svs-rally-board .svs-group-grid[data-cols="2"],
  .svs-rally-board .svs-group-grid[data-cols="3"] {
    grid-template-columns: 1fr;
  }
}

.svs-rally-board .svs-group-col {
  background: #ffffff;
  border: 1px solid #64748b;
  border-radius: 0.5rem;
  min-height: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.svs-rally-board .svs-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #cbd5e1;
  font-size: 0.8rem;
  background: #e2e8f0;
  border-radius: 0.5rem 0.5rem 0 0;
  color: #0f172a;
}

.svs-rally-board .svs-lead-list {
  padding: 0.35rem;
  min-height: 5.5rem;
  flex: 1;
}

.svs-rally-board .svs-lead-list.drag-over {
  outline: 2px dashed #0b6e8a;
  outline-offset: -4px;
  background: #e0f2fe;
}

.svs-rally-board .svs-drop-hint {
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem 0.35rem;
}

.svs-rally-board .svs-lead-card {
  padding: 0.3rem;
  margin-bottom: 0.4rem;
  border-radius: 0.45rem;
  background: #e2e8f0;
  border: 1px solid #94a3b8;
}

.svs-rally-board .svs-lead-handle {
  background: #bfdbfe;
  border-color: #3b82f6;
  margin-bottom: 0.3rem;
}

.svs-rally-board .svs-lead-handle.drop-before {
  box-shadow: 0 -3px 0 #0b6e8a;
}

.svs-rally-board .svs-lead-line {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.svs-rally-board .svs-joiner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
}

.svs-rally-board .svs-joiner-slot {
  min-height: 0;
  margin: 0;
  padding: 0.2rem 0.3rem !important;
  border-radius: 0.35rem;
  background: #ffffff;
  border: 1px dashed #64748b;
}

.svs-rally-board .svs-joiner-slot.drag-over {
  outline: 2px dashed #0b6e8a;
  outline-offset: -2px;
  background: #e0f2fe;
}

.svs-rally-board .svs-joiner-label {
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b !important;
}

.svs-rally-board .svs-joiner-empty {
  font-size: 0.75rem;
  padding: 0.15rem 0 !important;
  text-align: center;
}

.svs-rally-board .svs-joiner-chip {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.3rem;
  background: #f1f5f9;
}

.svs-rally-board .svs-joiner-chip strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svs-rally-board .svs-discord-details {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  color: #0f172a;
}

.svs-rally-board .svs-discord-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.svs-rally-board .svs-discord-pre {
  margin-top: 0.5rem;
  max-height: 16rem;
  font-size: 0.75rem;
  color: #e2e8f0;
}

.svs-rally-board .svs-lead-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  position: relative;
  border-radius: 0.5rem;
}

.svs-rally-board .svs-lead-pair > .svs-lead-handle {
  flex: 1 1 10rem;
  min-width: 9rem;
}

.svs-rally-board .svs-lead-pair.drop-fill-early {
  box-shadow: inset 4px 0 0 #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
}

.svs-rally-board .svs-lead-pair.drop-fill-late {
  box-shadow: inset -4px 0 0 #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.svs-rally-board .svs-fill-in-handle {
  background: #ecfeff !important;
  border-color: #67e8f9 !important;
}

.svs-rally-board .svs-fill-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #0e7490;
  background: #cffafe;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
  margin-right: 0.25rem;
}

.svs-rally-board .svs-fill-badge-primary {
  color: #1d4ed8;
  background: #dbeafe;
}

.svs-rally-board .svs-fill-hint {
  font-size: 0.68rem;
  color: #64748b !important;
  margin-top: 0.15rem;
}

.svs-rally-board .svs-fill-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.svs-rally-board .svs-fill-hours label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.svs-rally-board .svs-fill-hours .form-select,
.svs-rally-board .svs-pet-time .form-select {
  width: auto;
  min-width: 3.5rem;
  padding: 0.1rem 1.4rem 0.1rem 0.35rem;
  font-size: 0.72rem;
}

.svs-rally-board .svs-pet-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
}

.svs-rally-board .svs-pet-time .svs-pet-sep {
  opacity: 0.6;
}

/* Joiner hero expedition skill guide — generation (Y) × boost skill (X) */
.exp-guide {
  --exp-line: rgba(238, 246, 251, 0.12);
}

.exp-matrix-wrap {
  border: 1px solid var(--exp-line);
  border-radius: 0.55rem;
  overflow-x: auto;
}

.exp-matrix {
  width: 100%;
  min-width: 42rem;
  border-collapse: separate;
  border-spacing: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  background: rgba(4, 16, 24, 0.35);
}

.exp-matrix th,
.exp-matrix td {
  vertical-align: middle;
  text-align: center;
  padding: 0.4rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.exp-matrix thead th {
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 6.5rem;
  border: 1px solid transparent;
}

.exp-matrix .exp-corner {
  background: transparent;
  color: rgba(238, 246, 251, 0.55);
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 3.6rem;
  width: 3.6rem;
}

.exp-matrix tbody th.exp-gen-label {
  background: rgba(238, 246, 251, 0.92);
  color: #0b1c28;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: 3.6rem;
}

.exp-matrix tbody th.exp-gen-label.is-epic {
  background: #fff;
}

.exp-matrix td {
  border: 1px solid transparent;
  min-height: 2.1rem;
}

.exp-matrix td.exp-empty {
  background: transparent;
  border: 1px dotted rgba(238, 246, 251, 0.08);
}

.exp-cell-hero {
  display: inline-block;
  font-weight: 650;
  color: #eef6fb;
}

.exp-matrix tr.is-locked {
  opacity: 0.38;
}

.exp-buff-att25 { background: rgba(212, 168, 58, 0.28); border-color: rgba(212, 168, 58, 0.55) !important; color: #f3d27a; }
.exp-buff-dmg25 { background: rgba(148, 96, 220, 0.28); border-color: rgba(148, 96, 220, 0.55) !important; color: #d2b4ff; }
.exp-buff-dmg20 { background: rgba(214, 96, 168, 0.28); border-color: rgba(214, 96, 168, 0.55) !important; color: #f0b0d8; }
.exp-buff-att15 { background: rgba(220, 132, 64, 0.28); border-color: rgba(220, 132, 64, 0.55) !important; color: #ffc089; }
.exp-buff-chance-off { background: rgba(48, 180, 180, 0.26); border-color: rgba(48, 180, 180, 0.55) !important; color: #8eecec; }
.exp-buff-hp25 { background: rgba(56, 176, 96, 0.28); border-color: rgba(56, 176, 96, 0.55) !important; color: #9be6b4; }
.exp-buff-taken20 { background: rgba(64, 132, 220, 0.28); border-color: rgba(64, 132, 220, 0.55) !important; color: #9ec4ff; }
.exp-buff-chance-def { background: rgba(48, 180, 180, 0.26); border-color: rgba(48, 180, 180, 0.55) !important; color: #8eecec; }
.exp-buff-infdef { background: rgba(148, 160, 176, 0.28); border-color: rgba(148, 160, 176, 0.55) !important; color: #d0d8e4; }

@media (max-width: 768px) {
  .exp-matrix {
    min-width: 36rem;
    border-spacing: 0.25rem;
  }
}

/* Public /Joiners catalog */
.joiner-catalog {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.joiner-catalog-gen-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(158, 231, 255, 0.8);
  margin-bottom: 0.35rem;
}

.joiner-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.4rem;
}

.joiner-catalog-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0;
  padding: 0.45rem 0.55rem 0.45rem 1.85rem;
  position: relative;
  border-radius: 0.45rem;
  border: 1px solid rgba(238, 246, 251, 0.14);
  background: rgba(4, 16, 24, 0.55);
  cursor: pointer;
  color: #eef6fb;
}

.joiner-catalog-item .form-check-input {
  position: absolute;
  left: 0.45rem;
  top: 0.55rem;
  margin: 0;
}

.joiner-catalog-item.is-yes {
  border-color: rgba(56, 176, 96, 0.55);
  background: rgba(34, 120, 72, 0.28);
}

.joiner-catalog-name {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.15;
}

.joiner-catalog-meta {
  font-size: 0.65rem;
  color: rgba(238, 246, 251, 0.55);
}

.event-hub-links {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .event-hub-links {
    grid-template-columns: 1fr 1fr;
  }
}

.event-hub-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 180, 204, 0.28);
  border-radius: 0.5rem;
  background: rgba(12, 28, 42, 0.45);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.event-hub-link:hover,
.event-hub-link:focus {
  border-color: rgba(120, 190, 230, 0.55);
  background: rgba(18, 40, 58, 0.7);
  color: inherit;
  text-decoration: none;
}

.event-hub-link-title {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.event-hub-link-sub {
  font-size: 0.875rem;
  color: rgba(238, 246, 251, 0.65);
}
