:root {
  --bg0: #1a1410;
  --bg1: #2a2118;
  --ink: #f3e6d0;
  --text: #f3e6d0;
  --muted: #c4b093;
  --accent: #d4a35c;
  --line: rgba(243, 230, 208, 0.18);
  --card: rgba(20, 14, 10, 0.55);
  --zebra: rgba(243, 230, 208, 0.05);
  --font-display: "Segoe UI", "Candara", "Gill Sans", sans-serif;
  --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--bg0);
  background-image:
    radial-gradient(ellipse 80% 50% at 12% 42%, rgba(212, 163, 92, 0.08), transparent 55%),
    linear-gradient(165deg, var(--bg1) 0%, var(--bg0) 55%, #120e0b 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  width: min(34rem, calc((100vw - 1100px) / 2 + 11rem));
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 22%, rgba(0, 0, 0, 0.45) 48%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 22%, rgba(0, 0, 0, 0.45) 48%, transparent 100%);
}

body::before {
  background: url("bg-torch.png") left center / auto 100% no-repeat;
  opacity: 0.78;
  animation: torch-wall 3.6s ease-in-out infinite;
}

body::after {
  background: radial-gradient(
    ellipse 85% 60% at 16% 36%,
    rgba(255, 176, 72, 0.28),
    rgba(212, 163, 92, 0.1) 38%,
    transparent 72%
  );
  mix-blend-mode: soft-light;
  animation: torch-flicker 2.4s ease-in-out infinite;
}

@keyframes torch-wall {
  0%,
  100% {
    filter: brightness(1);
  }
  16% {
    filter: brightness(1.05);
  }
  28% {
    filter: brightness(0.94);
  }
  47% {
    filter: brightness(1.07);
  }
  61% {
    filter: brightness(0.97);
  }
  79% {
    filter: brightness(1.03);
  }
}

@keyframes torch-flicker {
  0%,
  100% {
    opacity: 0.55;
  }
  6% {
    opacity: 0.38;
  }
  12% {
    opacity: 0.7;
  }
  18% {
    opacity: 0.46;
  }
  27% {
    opacity: 0.64;
  }
  33% {
    opacity: 0.4;
  }
  41% {
    opacity: 0.72;
  }
  52% {
    opacity: 0.5;
  }
  61% {
    opacity: 0.66;
  }
  70% {
    opacity: 0.42;
  }
  81% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.48;
  }
}

.corridor-far {
  display: none;
}

@media (min-width: 1100px) {
  .corridor-far {
    display: block;
    position: fixed;
    z-index: 0;
    pointer-events: none;
    top: auto;
    bottom: 0;
    right: 0;
    width: min(16rem, calc((100vw - 1100px) / 2 + 4rem));
    height: 46vh;
  }

  .corridor-far::before,
  .corridor-far::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask-image: linear-gradient(to left, #000 0%, #000 28%, rgba(0, 0, 0, 0.4) 58%, transparent 100%),
      linear-gradient(to top, #000 0%, #000 42%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to left, #000 0%, #000 28%, rgba(0, 0, 0, 0.4) 58%, transparent 100%),
      linear-gradient(to top, #000 0%, #000 42%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
    mask-composite: intersect;
  }

  .corridor-far::before {
    background: url("bg-torch.png") left top / auto 100% no-repeat;
    opacity: 0.3;
    filter: brightness(0.52) saturate(0.62) blur(1px) contrast(0.92);
    animation: torch-wall-far 6.2s ease-in-out infinite;
  }

  .corridor-far::after {
    background: radial-gradient(
      ellipse 70% 55% at 16% 28%,
      rgba(255, 176, 72, 0.14),
      rgba(212, 163, 92, 0.05) 42%,
      transparent 72%
    );
    mix-blend-mode: soft-light;
    animation: torch-flicker-far 4.6s ease-in-out infinite;
  }
}

@keyframes torch-wall-far {
  0%,
  100% {
    filter: brightness(0.52) saturate(0.62) blur(1px) contrast(0.92);
  }
  22% {
    filter: brightness(0.58) saturate(0.66) blur(1px) contrast(0.92);
  }
  51% {
    filter: brightness(0.48) saturate(0.58) blur(1.15px) contrast(0.9);
  }
  77% {
    filter: brightness(0.55) saturate(0.64) blur(1px) contrast(0.92);
  }
}

@keyframes torch-flicker-far {
  0%,
  100% {
    opacity: 0.28;
  }
  18% {
    opacity: 0.18;
  }
  37% {
    opacity: 0.34;
  }
  61% {
    opacity: 0.22;
  }
  84% {
    opacity: 0.3;
  }
}

@media (max-width: 900px) {
  body::before,
  body::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .corridor-far::before,
  .corridor-far::after {
    animation: none;
  }
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100%;
}

.top-chrome {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    to right,
    rgba(26, 20, 16, 0.22) 0%,
    rgba(26, 20, 16, 0.78) 10rem,
    rgba(26, 20, 16, 0.96) 22rem
  );
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.scroll-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.score-rules {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.score-rules summary {
  cursor: pointer;
  width: fit-content;
  color: var(--accent);
  font-weight: 650;
}

.score-rules summary:hover {
  color: var(--ink);
}

.score-rules p {
  margin: 0.45rem 0 0;
  max-width: 46rem;
}

.site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.5rem;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.header-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.header-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 10.5rem;
  max-width: 14rem;
}

.locale-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.locale-select {
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.3rem 1.7rem 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 14px) calc(50% - 2px) / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 9px) calc(50% - 2px) / 5px 5px no-repeat,
    #241c15;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.locale-select:hover,
.locale-select:focus {
  border-color: rgba(212, 163, 92, 0.8);
  outline: none;
  color: var(--accent);
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 750;
  line-height: 1.15;
}

.header-meta {
  display: block;
}

.tagline {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.updated {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0.25rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mod-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(196, 176, 147, 0.55);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.mod-link:hover {
  color: var(--ink);
  text-decoration-color: rgba(243, 230, 208, 0.7);
}

.board-nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.25rem 1.25rem 0.7rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.board-nav-wrap[hidden] {
  display: none !important;
}

.board-nav-aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 12rem;
  width: max-content;
  max-width: 16rem;
}

.lane-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
}

.lane-filter-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #241c15;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.lane-filter-btn:hover {
  border-color: rgba(212, 163, 92, 0.8);
  color: var(--accent);
}

.lane-filter-btn.is-selected {
  border-color: rgba(212, 163, 92, 0.9);
  background: rgba(212, 163, 92, 0.14);
  color: var(--accent);
}

.character-filter {
  position: relative;
  display: block;
  width: 100%;
}

.character-dropdown {
  position: relative;
  width: 100%;
  min-width: 11.5rem;
}

.character-dropdown-trigger,
.character-dropdown-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  background: #241c15;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.character-dropdown-trigger {
  border-radius: 0.55rem;
  justify-content: flex-start;
}

.character-dropdown-trigger:hover,
.character-dropdown.is-open .character-dropdown-trigger {
  border-color: rgba(212, 163, 92, 0.8);
  color: var(--accent);
}

.character-dropdown-caret {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.character-dropdown-menu {
  position: fixed;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 11.5rem;
  max-height: min(20rem, calc(100dvh - 1rem));
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #1a1510;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.character-dropdown.is-open .character-dropdown-menu {
  display: flex;
}

.character-dropdown-menu[hidden] {
  display: none !important;
}

.character-dropdown-option {
  border-radius: 0.4rem;
  border-color: transparent;
  background: transparent;
}

.character-dropdown-option:hover {
  background: rgba(212, 163, 92, 0.12);
  border-color: transparent;
}

.character-dropdown-option.is-selected {
  background: linear-gradient(180deg, rgba(212, 163, 92, 0.28), rgba(212, 163, 92, 0.1));
  color: var(--accent);
}

.board-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.board-nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #241c15;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.board-nav-item:hover {
  border-color: rgba(212, 163, 92, 0.55);
  color: var(--ink);
}

.board-nav-item:hover .board-nav-label {
  color: var(--accent);
}

.board-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  min-width: 1.35rem;
  min-height: 1.35rem;
}

.board-asset-icon {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.board-asset-icon-lg {
  width: 1.85rem;
  height: 1.85rem;
}

.board-icon .board-asset-icon {
  width: 1.55rem;
  height: 1.55rem;
}

.board-icon .board-asset-icon-lg {
  width: 2.15rem;
  height: 2.15rem;
}

.board-nav-icon:has(.board-asset-icon-lg) {
  min-width: 1.85rem;
  min-height: 1.85rem;
}

.sts-card-stack {
  position: relative;
  display: inline-block;
  width: 1.1rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

.sts-card {
  position: absolute;
  inset: 0;
  border-radius: 0.18rem;
  border: 1px solid #c9a45a;
  background:
    linear-gradient(180deg, rgba(255, 236, 190, 0.18), transparent 35%),
    linear-gradient(160deg, #3a2218 0%, #1c1210 55%, #120c0a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(40, 24, 12, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.35);
}

.sts-card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 22%;
  bottom: 28%;
  border-radius: 0.08rem;
  border: 1px solid rgba(201, 164, 90, 0.35);
  background: linear-gradient(180deg, rgba(212, 163, 92, 0.16), rgba(90, 50, 30, 0.2));
}

.sts-card-stack-1 .sts-card-layer-0 {
  transform: none;
}

.sts-card-stack-3 .sts-card-layer-0 {
  transform: translate(0.18rem, -0.08rem) rotate(10deg);
  z-index: 1;
}

.sts-card-stack-3 .sts-card-layer-1 {
  transform: translate(0.02rem, -0.02rem) rotate(3deg);
  z-index: 2;
}

.sts-card-stack-3 .sts-card-layer-2 {
  transform: translate(-0.12rem, 0.06rem) rotate(-8deg);
  z-index: 3;
}

.board-icon .sts-card-stack {
  width: 1.25rem;
  height: 1.55rem;
  margin-right: 0.1rem;
}

.board-nav-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.board-nav-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.board-nav-leader {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5rem;
}

.boards {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.load-error-panel {
  max-width: 48rem;
  margin: 0.5rem auto 2rem;
  padding: 0.25rem 0.5rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.load-error-dialogue {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.load-error-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
  margin-top: 0;
  z-index: 0;
}

.load-error-gif {
  display: block;
  width: auto;
  height: min(26rem, 62vh);
  max-width: min(20rem, 52vw);
  margin-right: -3.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  object-fit: contain;
}

.load-error-heading {
  margin: 0 0 0.55rem !important;
  color: var(--accent) !important;
  font-size: 0.98rem !important;
  font-weight: 650;
  line-height: 1.35 !important;
  text-align: center;
}

.load-error-panel .architect-bubble {
  position: relative;
  z-index: 2;
  flex: 1 1 12rem;
  min-width: 11rem;
  width: auto;
  max-width: 22rem;
  margin-top: -3.25rem;
  padding: 1rem 1.15rem 1.05rem;
  overflow: visible;
  background: rgba(18, 12, 8, 0.9);
  border-radius: 1.2rem;
}

.load-error-panel .load-error-bubble-tail {
  left: -15px;
  top: 1.85rem;
  bottom: auto;
  width: 0;
  height: 0;
  transform: none;
  background: transparent;
  border: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 16px solid rgba(212, 160, 74, 0.55);
}

.load-error-panel .load-error-bubble-tail::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -11px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 14px solid rgba(18, 12, 8, 0.9);
}

.load-error-discord-line {
  margin: 0.7rem 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  text-align: center;
}

.load-error-discord {
  color: var(--accent);
  font-weight: 600;
}

.load-error-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.load-error-retry {
  appearance: none;
  min-width: 10rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(212, 163, 92, 0.12);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.load-error-retry:hover {
  border-color: rgba(212, 160, 74, 0.65);
  background: rgba(212, 163, 92, 0.22);
}

.load-error-details {
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
}

.load-error-details summary {
  cursor: pointer;
  text-align: center;
  list-style: none;
}

.load-error-details summary::-webkit-details-marker {
  display: none;
}

.load-error-details p {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-word;
  text-align: center;
}

.board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1rem 0.75rem;
  overflow-x: auto;
  scroll-margin-top: 0.75rem;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.board-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.board-toggle {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.2rem 0.45rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.board-toggle:hover {
  color: var(--ink);
  background: rgba(212, 163, 92, 0.12);
}

.board-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  min-width: 1.55rem;
  min-height: 1.55rem;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.92rem;
}

col.col-rank {
  width: 2.6rem;
}

col.col-name {
  width: 3.6rem;
}

col.col-character {
  width: 9.5rem;
}

col.col-primary {
  width: 7rem;
}

col.col-floor,
col.col-act {
  width: 4.2rem;
}

col.col-coins {
  width: 4.8rem;
}

col.col-language {
  width: 9rem;
}

col.col-version {
  width: auto;
}

col.col-lane {
  width: 5.5rem;
}

col.col-mode {
  width: 4.5rem;
}

th,
td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  color: var(--muted);
  font-weight: 600;
  border-top: none;
}

tbody tr:nth-child(even) {
  background: var(--zebra);
}

.primary-metric {
  font-weight: 700;
  color: var(--accent);
}

.character-unknown {
  color: var(--muted);
}

.run-lane {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.run-lane-custom {
  color: var(--accent);
}

.run-mode {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.run-mode-coop {
  color: var(--accent);
}

.character {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.char-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
  border-radius: 3px;
  object-fit: cover;
  image-rendering: auto;
}

.character-name {
  line-height: inherit;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(243, 230, 208, 0.25);
  flex-shrink: 0;
}

.lang-name {
  color: var(--ink);
}

.empty {
  color: var(--muted);
  padding: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer-brand,
.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer-links {
  display: flex;
  gap: 1rem;
}

.site-footer-brand:hover,
.site-footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 0.75rem;
  }

  .header-top {
    flex-wrap: wrap;
  }

  .header-controls {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .header-meta {
    display: block;
  }

  .board-nav-wrap {
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .board-nav-aside {
    width: max-content;
    max-width: 16rem;
    margin-left: auto;
  }

  .board-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .board-nav-item {
    flex: 0 0 auto;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Mod audit dashboard ---- */
.mod-audit-page .scroll-pane {
  overflow-y: auto;
}

.mod-audit-back {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.mod-audit-back a,
.mod-audit-nav a {
  color: var(--accent);
  text-decoration: none;
}

.mod-audit-back a:hover,
.mod-audit-nav a:hover {
  text-decoration: underline;
}

.mod-audit-nav {
  margin: 0;
  font-size: 0.8rem;
  text-align: right;
}

.mod-audit-refresh {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

.mod-audit-refresh:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-audit-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mod-audit-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.mod-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.mod-stat.is-warn {
  border-color: rgba(212, 163, 92, 0.55);
}

.mod-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.1;
}

.mod-stat-label {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.mod-audit-meta {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mod-audit-section h2,
.mod-board-card h2 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.mod-board-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  margin-bottom: 0.85rem;
}

.mod-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.mod-board-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.mod-board-count.is-warn {
  color: var(--accent);
}

.mod-table-wrap {
  overflow-x: auto;
}

.mod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mod-table th,
.mod-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.mod-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.mod-table tr.is-flagged {
  background: rgba(212, 163, 92, 0.08);
}

.mod-table.mod-table-zebra tbody tr:nth-child(odd) {
  background: transparent;
}

.mod-table.mod-table-zebra tbody tr:nth-child(even) {
  background: var(--zebra);
}

.mod-table.mod-table-zebra tbody tr.is-flagged:nth-child(odd) {
  background: rgba(212, 163, 92, 0.07);
}

.mod-table.mod-table-zebra tbody tr.is-flagged:nth-child(even) {
  background: rgba(212, 163, 92, 0.14);
}

.mod-table tr.is-hidden-score {
  opacity: 0.72;
}

.mod-table tr.is-pending-score {
  background: rgba(212, 163, 92, 0.1);
}

.mod-table.mod-table-zebra tbody tr.is-pending-score:nth-child(odd) {
  background: rgba(212, 163, 92, 0.09);
}

.mod-table.mod-table-zebra tbody tr.is-pending-score:nth-child(even) {
  background: rgba(212, 163, 92, 0.16);
}

.mod-boards-cell {
  min-width: 0;
  white-space: normal;
}

.mod-board-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mod-board-tag {
  display: block;
  padding: 0.12rem 0;
  line-height: 1.2;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--text);
  white-space: normal;
}

.mod-board-tag-meta {
  font-weight: 500;
  color: var(--muted);
}

.mod-board-tag.is-blocked {
  color: rgba(220, 140, 120, 0.95);
}

.mod-boards-editor {
  flex: 1 1 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.mod-boards-editor-hint {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.mod-boards-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.4rem;
}

.mod-board-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.mod-board-check-value {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mod-hide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  align-items: stretch;
  min-width: 8.4rem;
}

.mod-hide-actions .mod-boards-editor {
  grid-column: 1 / -1;
}

.mod-table-audit {
  table-layout: fixed;
  width: 100%;
}

.mod-col-status {
  width: 6.4rem;
}

.mod-col-initials {
  width: 3.1rem;
}

.mod-col-character {
  width: 4.6rem;
}

.mod-col-boards {
  width: 10.5rem;
}

.mod-col-versions {
  width: 5.6rem;
}

.mod-col-why {
  width: auto;
}

.mod-col-mods {
  width: 14rem;
}

.mod-col-visibility {
  width: 8.8rem;
}

.mod-table-audit th,
.mod-table-audit td {
  overflow: hidden;
}

.mod-table-audit .mod-status-cell,
.mod-table-audit .mod-boards-cell,
.mod-table-audit .mod-why-cell,
.mod-table-audit .mod-list,
.mod-table-audit .mod-cell-visibility {
  overflow: visible;
}

.mod-cell-initials,
.mod-cell-character {
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

.mod-versions {
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.74rem;
  color: var(--muted);
}

.mod-status-cell {
  white-space: normal;
  overflow: visible;
}

.mod-status-why {
  min-width: 0;
  max-width: none;
}

.mod-status-badges,
.mod-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: stretch;
}

.mod-status-legend {
  margin: 0.55rem 0 0.35rem;
}

button.mod-status-badge.is-filter-btn {
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
  transition: opacity 0.12s ease, box-shadow 0.12s ease;
}

button.mod-status-badge.is-filter-btn .mod-status-badge-label,
button.mod-status-badge.is-filter-btn .mod-status-badge-source {
  color: inherit;
}

button.mod-status-badge.is-filter-btn .mod-status-badge-source {
  color: var(--muted);
}

button.mod-status-badge.is-filter-btn.is-filter-off {
  opacity: 0.42;
}

button.mod-status-badge.is-filter-btn:hover {
  opacity: 0.9;
}

button.mod-status-badge.is-filter-btn.is-filter-on {
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(243, 230, 208, 0.35);
}

.mod-filter-clear {
  align-self: center;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.mod-filter-clear:hover {
  border-color: var(--accent);
}

.mod-filter-meta {
  margin: 0 0 0.55rem;
}

.mod-filter-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.mod-status-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  line-height: 1.15;
  max-width: 11rem;
}

.mod-status-badge-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.mod-status-badge-source {
  font-size: 0.68rem;
  color: var(--muted);
}

.mod-status-badge.is-clean {
  border-color: rgba(110, 180, 120, 0.55);
  background: rgba(110, 180, 120, 0.14);
}

.mod-status-badge.is-needs-review,
.mod-status-badge.is-pending,
.mod-status-badge.is-hidden-auto {
  border-color: rgba(212, 163, 92, 0.6);
  background: rgba(212, 163, 92, 0.16);
}

.mod-status-badge.is-acked {
  border-color: rgba(120, 170, 210, 0.55);
  background: rgba(120, 170, 210, 0.12);
}

.mod-status-badge.is-approved {
  border-color: rgba(90, 160, 220, 0.6);
  background: rgba(90, 160, 220, 0.14);
}

.mod-status-badge.is-declined,
.mod-status-badge.is-hidden-manual {
  border-color: rgba(220, 100, 90, 0.55);
  background: rgba(220, 100, 90, 0.14);
}

.mod-status-badge.is-blacklist {
  border-color: rgba(220, 100, 90, 0.65);
  background: rgba(220, 100, 90, 0.16);
}

.mod-status-badge.is-sanity,
.mod-status-badge.is-suspect {
  border-color: rgba(180, 140, 220, 0.5);
  background: rgba(180, 140, 220, 0.12);
}

.mod-status-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.mod-status-label.is-pending {
  color: #d4a35c;
}

.mod-status-label.is-hidden {
  color: #dc645a;
}

.mod-status-explain {
  margin: 0.45rem 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.mod-status-extra {
  margin-top: 0.45rem;
}

.mod-status-extra.is-blacklist {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 100, 90, 0.45);
  background: rgba(220, 100, 90, 0.1);
}

.mod-status-extra.is-blacklist .mod-status-extra-label {
  color: #f0b4a0;
}

.mod-status-extra-label {
  margin-right: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.mod-review-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.mod-review-list li + li {
  margin-top: 0.35rem;
}

.mod-review-public {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--accent);
  font-weight: 600;
}

.mod-review-detail {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.mod-review-empty,
.mod-review-compact {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.mod-pending-queue {
  margin-top: 1.25rem;
}

.mod-pending-queue h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.mod-pending-why .mod-review-compact {
  display: none;
}

.mod-hide-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.mod-hide-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-hide-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.mod-hide-btn.is-approve {
  border-color: rgba(92, 191, 106, 0.45);
}

.mod-hide-btn.is-decline {
  border-color: rgba(232, 93, 76, 0.45);
}

.mod-hide-btn.is-current {
  border-color: var(--accent);
  background: rgba(212, 163, 92, 0.16);
  font-weight: 700;
}

.mod-table code {
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  margin: 0 0.15rem 0.15rem 0;
  display: inline-block;
}

.mod-table code.is-suspect {
  outline: 1px solid rgba(212, 163, 92, 0.7);
  color: var(--accent);
}

.mod-list,
.mod-shares {
  min-width: 12rem;
  max-width: 28rem;
  line-height: 1.45;
}

.mod-list-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mod-list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mod-list-count {
  color: var(--muted);
  font-size: 0.75rem;
}

.mod-copy-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
}

.mod-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-list-text {
  width: 100%;
  min-height: 3.6rem;
  resize: vertical;
  box-sizing: border-box;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.mod-blacklist-table th:nth-child(1),
.mod-blacklist-table td:nth-child(1) {
  min-width: 11rem;
}

.mod-blacklist-table th:nth-child(2),
.mod-blacklist-table td:nth-child(2) {
  white-space: nowrap;
}

.mod-blacklist-table td:nth-child(3) {
  max-width: 36rem;
  line-height: 1.4;
}

.mod-blacklist-ids {
  margin-top: 0.25rem;
}

.mod-blacklist-ids code {
  font-size: 0.72rem;
  color: var(--muted);
}

.mod-list-ok {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-word;
}

.mod-flag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin: 0 0.2rem 0.2rem 0;
  border: 1px solid var(--line);
  color: var(--muted);
}

.mod-flag-high {
  color: #f0b4a0;
  border-color: rgba(232, 93, 76, 0.55);
  background: rgba(232, 93, 76, 0.12);
}

.mod-flag-medium {
  color: var(--accent);
  border-color: rgba(212, 163, 92, 0.55);
  background: rgba(212, 163, 92, 0.12);
}

.mod-flag-low {
  color: var(--muted);
  border-color: var(--line);
}

.mod-flag-ok {
  color: #8fbf9a;
  border-color: rgba(92, 191, 106, 0.4);
  background: rgba(92, 191, 106, 0.1);
}

.mod-audit-empty,
.mod-audit-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mod-audit-note code {
  font-size: 0.82rem;
}

.mod-audit-section a,
.mod-board-card a {
  color: var(--accent);
}

@media (max-width: 800px) {
  .mod-audit-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mod-audit-stats-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mod-charts-grid {
    grid-template-columns: 1fr;
  }
}

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

.mod-audit-stats-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mod-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.mod-charts-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.mod-tabs {
  display: flex;
  gap: 0.35rem;
  max-width: 1100px;
  margin: 0.35rem auto 0;
  padding: 0 1.25rem 0.65rem;
}

.mod-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.mod-tab.is-active {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(212, 163, 92, 0.12);
}

.mod-tab-panel.is-hidden,
.mod-tab-panel[hidden] {
  display: none;
}

.mod-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.mod-filter-bar .locale-picker {
  min-width: 8.5rem;
}

.mod-review-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 0.75rem;
  padding: 0.15rem 0 0.35rem;
  background: linear-gradient(165deg, var(--bg1) 0%, var(--bg0) 70%);
}

.mod-review-filter-bar {
  align-items: center;
  margin-bottom: 0;
  padding: 0.45rem 0.65rem;
  gap: 0.45rem 0.6rem;
}

.mod-review-filter-bar .locale-picker.is-compact {
  min-width: 0;
  width: auto;
  gap: 0.3rem;
}

.mod-review-filter-bar .locale-picker.is-compact .locale-select {
  flex: 0 0 auto;
  min-width: 5.25rem;
  width: auto;
  padding: 0.22rem 1.5rem 0.22rem 0.45rem;
  font-size: 0.78rem;
}

.mod-review-inline-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.mod-stat.is-compact {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
}

.mod-stat.is-compact .mod-stat-value {
  font-size: 1.05rem;
}

.mod-stat.is-compact .mod-stat-label {
  margin: 0;
  font-size: 0.72rem;
  white-space: nowrap;
}

button.mod-stat.is-clickable {
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

button.mod-stat.is-clickable:hover {
  border-color: var(--accent);
}

button.mod-stat.is-selected {
  border-color: var(--accent);
  background: rgba(212, 163, 92, 0.14);
}

.mod-stat.is-compact.is-needs {
  margin-left: auto;
  padding: 0.32rem 0.7rem;
  border-color: rgba(212, 163, 92, 0.7);
}

.mod-stat.is-compact.is-needs .mod-stat-value {
  font-size: 1.28rem;
}

.mod-stat.is-compact.is-needs .mod-stat-label {
  font-weight: 700;
  color: var(--accent);
}

.mod-table-audit .mod-status-badges {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.mod-table-audit .mod-status-badge-source {
  display: none;
}

.mod-table-audit .mod-status-badge {
  justify-content: center;
}

.mod-why-cell {
  white-space: normal;
  overflow: visible;
}

.mod-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.mod-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.25;
  word-break: break-word;
}

.mod-chip a {
  color: inherit;
  text-decoration: none;
}

.mod-chip a:hover {
  text-decoration: underline;
}

.mod-chip.is-blacklist {
  color: #f0b4a0;
  border-color: rgba(232, 93, 76, 0.55);
  background: rgba(232, 93, 76, 0.12);
}

.mod-chip.is-suspect {
  color: var(--accent);
  border-color: rgba(212, 163, 92, 0.55);
  background: rgba(212, 163, 92, 0.12);
}

.mod-chip.is-unknown-id,
.mod-chip.is-unknown {
  color: var(--text);
}

.mod-chip.is-safe {
  color: #8fbf9a;
  border-color: rgba(92, 191, 106, 0.4);
  background: rgba(92, 191, 106, 0.1);
}

.mod-chip-safe {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.mod-chip-safe summary {
  cursor: pointer;
}

.mod-chip-safe .mod-chip-list {
  margin-top: 0.3rem;
}

.mod-board-tag-name {
  display: inline-block;
  min-width: 3.4rem;
}

.mod-board-tag-meta {
  font-variant-numeric: tabular-nums;
}

.mod-dim {
  color: var(--muted);
  font-size: 0.8em;
}

.mod-audit-meta.is-warn-text {
  color: var(--accent);
}

.mod-bar.is-solo { background: #8fbf9a; }
.mod-bar.is-coop { background: #5b9bd5; }
.mod-legend-swatch.is-solo { background: #8fbf9a; }
.mod-legend-swatch.is-coop { background: #5b9bd5; }

.mod-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
  min-height: 140px;
  padding: 0.35rem 0.15rem 0;
  overflow-x: auto;
}

.mod-bar-col {
  flex: 1 1 0;
  min-width: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.mod-bar-stack {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
}

.mod-bar {
  display: block;
  width: 0.35rem;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--muted);
}

.mod-bar.is-standard { background: #8fbf9a; }
.mod-bar.is-custom { background: #d4a35c; }
.mod-bar.is-boards { background: #5b9bd5; }
.mod-bar.is-scorecard { background: #9b7ed9; }
.mod-bar.is-audit { background: #e85d4c; }

.mod-bar-label {
  font-size: 0.62rem;
  color: var(--muted);
  transform: rotate(-55deg);
  transform-origin: top center;
  white-space: nowrap;
  height: 1.6rem;
}

.mod-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.mod-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mod-legend-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  display: inline-block;
}

.mod-legend-swatch.is-standard { background: #8fbf9a; }
.mod-legend-swatch.is-custom { background: #d4a35c; }
.mod-legend-swatch.is-boards { background: #5b9bd5; }
.mod-legend-swatch.is-scorecard { background: #9b7ed9; }
.mod-legend-swatch.is-audit { background: #e85d4c; }

.mod-auth-gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.mod-auth-gate.is-hidden {
  display: none;
}

.page.is-auth-blocked {
  display: none;
}

.mod-auth-card {
  width: min(24rem, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.1rem;
}

.mod-auth-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-family: var(--font-display);
}

.mod-auth-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.mod-google-btn {
  min-height: 2.5rem;
  margin-bottom: 0.75rem;
}

.mod-auth-status {
  min-height: 1.2rem;
  color: var(--accent) !important;
  font-size: 0.85rem !important;
}

.mod-auth-hint {
  margin-bottom: 0 !important;
  font-size: 0.78rem !important;
}

.mod-auth-denied-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem !important;
  color: var(--text) !important;
  word-break: break-all;
  text-align: center;
  margin: 0.85rem 0 0.35rem !important;
}

.mod-auth-denied-sub {
  text-align: center;
  margin-bottom: 0.9rem !important;
}

.mod-auth-card.mod-auth-denied {
  width: min(26rem, 100%);
}

.architect-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.architect-bubble {
  position: relative;
  width: 100%;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(212, 160, 74, 0.45);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}

.architect-quote {
  margin: 0 !important;
  color: var(--text) !important;
  font-family: var(--font-display);
  font-size: 1.05rem !important;
  line-height: 1.35 !important;
  text-align: center;
}

.architect-bubble-tail {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 0.9rem;
  height: 0.9rem;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(212, 160, 74, 0.45);
  border-bottom: 1px solid rgba(212, 160, 74, 0.45);
}

.architect-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.architect-icon {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(212, 160, 74, 0.4);
  object-fit: cover;
  image-rendering: auto;
  background: rgba(0, 0, 0, 0.35);
}

.architect-name {
  margin: 0 !important;
  color: rgba(212, 160, 74, 0.95) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mod-auth-secondary-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.mod-auth-secondary-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-auth-user {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.mod-auth-user button {
  appearance: none;
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-left: 0.35rem;
  text-decoration: underline;
}

.mod-chip-actions {
  display: inline-flex;
  gap: 0.16rem;
  margin-left: 0.1rem;
}

.mod-chip-act {
  font: inherit;
  font-size: 0.64rem;
  line-height: 1.2;
  padding: 0.05rem 0.32rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 14, 10, 0.45);
  color: var(--ink);
  cursor: pointer;
}

.mod-chip-act:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-chip-act.is-block:hover {
  border-color: rgba(232, 93, 76, 0.8);
  color: #f0b4a0;
}

.mod-list-tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.4rem 0 0.8rem;
}

.mod-list-dialog {
  width: min(32rem, calc(100vw - 2rem));
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1c1612;
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.mod-list-dialog::backdrop {
  background: rgba(8, 6, 4, 0.72);
}

.mod-list-dialog h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
}

.mod-list-field-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

fieldset.mod-list-field-label {
  margin: 0 0 0.75rem;
}

.mod-list-field-label input,
.mod-list-field-label textarea,
.mod-list-field-label select {
  font: inherit;
  color: var(--ink);
  background: rgba(20, 14, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.mod-list-boards {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem 0.7rem;
}

.mod-list-boards legend {
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.mod-list-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.55rem;
}

.mod-list-board-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}

.mod-list-board-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.82rem;
}

.mod-list-board-option input {
  accent-color: var(--accent);
}

.mod-list-dialog-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
}


