:root {
  color-scheme: dark;
  --ink: #e6edf5;
  --muted: #9aa9bf;
  --paper: #0f141b;
  --card: #182230;
  --panel: #121b27;
  --accent: #4f7aa6;
  --accent-dark: #3a5d84;
  --sun: #d6a24e;
  --line: rgba(230, 237, 245, 0.12);
  --shadow: none;
  --card-shadow-raised: 0 10px 22px rgba(4, 10, 18, 0.28);
  --card-shadow-raised-strong: 0 14px 30px rgba(4, 10, 18, 0.36);
  --dm-col-max: 360px;
  --dm-window-height: 520px;
  --chat-dock-panel-width: 390px;
  --chat-dock-panel-height: 520px;
  --chat-dock-offset: 64px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-y: none;
}

body.perf-lite *,
body.perf-lite *::before,
body.perf-lite *::after,
body.perf-no-motion *,
body.perf-no-motion *::before,
body.perf-no-motion *::after {
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
}

body.perf-lite *,
body.perf-lite *::before,
body.perf-lite *::after,
body.perf-no-filters *,
body.perf-no-filters *::before,
body.perf-no-filters *::after {
  filter: none !important;
  backdrop-filter: none !important;
}

body.perf-lite *,
body.perf-lite *::before,
body.perf-lite *::after,
body.perf-no-shadows *,
body.perf-no-shadows *::before,
body.perf-no-shadows *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

body.perf-lite .auth-banner::before,
body.perf-lite .auth-banner::after,
body.perf-lite .auth-banner-cityscapes,
body.perf-lite .auth-banner-snow,
body.perf-lite .education-panel-banner::before,
body.perf-lite .education-panel-banner-media,
body.perf-lite .crime-panel-banner::before,
body.perf-lite .crime-panel-banner-media,
body.perf-lite .daily-season-panel-media-layer,
body.perf-lite .daily-season-panel-media,
body.perf-lite .backdrop,
body.perf-no-media .auth-banner::before,
body.perf-no-media .auth-banner::after,
body.perf-no-media .auth-banner-cityscapes,
body.perf-no-media .auth-banner-snow,
body.perf-no-media .education-panel-banner::before,
body.perf-no-media .education-panel-banner-media,
body.perf-no-media .crime-panel-banner::before,
body.perf-no-media .crime-panel-banner-media,
body.perf-no-media .daily-season-panel-media-layer,
body.perf-no-media .daily-season-panel-media,
body.perf-no-media .backdrop {
  display: none !important;
}

body.perf-lite .chat-dock,
body.perf-lite .dock-panel-row,
body.perf-lite .app-tooltip-layer,
body.perf-no-dock .chat-dock,
body.perf-no-dock .dock-panel-row {
  display: none !important;
}

body.is-hospitalized {
  --paper: #1a222d;
  --card: #202a38;
  --panel: #1a242f;
}

body.is-jailed {
  --paper: #142018;
  --card: #1a2a22;
  --panel: #16241c;
}

body.light-mode.is-hospitalized {
  --paper: #f0f3f7;
  --card: #f6f7fb;
  --panel: #eef2f7;
}

body.light-mode.is-jailed {
  --paper: #eef4f0;
  --card: #f3f8f4;
  --panel: #e9f1ec;
}

body.light-mode {
  color-scheme: light;
  --ink: #1f2a38;
  --muted: #5a6a7f;
  --paper: #e7edf4;
  --card: #f4f6fa;
  --panel: #e9eef5;
  --accent: #3b628b;
  --accent-dark: #2d4b6a;
  --sun: #c08a34;
  --line: rgba(30, 45, 66, 0.15);
  --shadow: none;
  --card-shadow-raised: 0 10px 22px rgba(45, 62, 84, 0.16);
  --card-shadow-raised-strong: 0 14px 30px rgba(45, 62, 84, 0.22);
}

body.no-session-chrome {
  --chat-dock-offset: 0px;
}

/* Scrollbar theming */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--panel);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 2px solid var(--panel);
  border-radius: 10px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.25);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

::-webkit-scrollbar-corner {
  background: var(--panel);
}

.backdrop {
  display: none;
}

.hero-card,
.card,
.stat-card,
.avatar-card,
.notification,
.user-menu,
.topbar-search-results,
.topbar-search-context-menu,
.topbar-server-time-popover,
.dock-panel,
.dm-window,
.dm-window.collapsed .dm-window-head,
.education-browser-panels,
.crime-browser-panels,
.education-category-tile,
.company-card,
.gym-logo-card,
.casino-history-card,
.playing-card {
  box-shadow: none !important;
}

body.ui-card-shadows:not(.perf-lite) .hero-card,
body.ui-card-shadows:not(.perf-lite) .card,
body.ui-card-shadows:not(.perf-lite) .stat-card,
body.ui-card-shadows:not(.perf-lite) .sidebar,
body.ui-card-shadows:not(.perf-lite) .avatar-card,
body.ui-card-shadows:not(.perf-lite) .notification,
body.ui-card-shadows:not(.perf-lite) .user-menu,
body.ui-card-shadows:not(.perf-lite) .topbar-search-results,
body.ui-card-shadows:not(.perf-lite) .topbar-search-context-menu,
body.ui-card-shadows:not(.perf-lite) .topbar-server-time-popover,
body.ui-card-shadows:not(.perf-lite) .dock-panel,
body.ui-card-shadows:not(.perf-lite) .dm-window,
body.ui-card-shadows:not(.perf-lite) .dm-window.collapsed .dm-window-head,
body.ui-card-shadows:not(.perf-lite) .education-browser-panels,
body.ui-card-shadows:not(.perf-lite) .crime-browser-panels,
body.ui-card-shadows:not(.perf-lite) .education-category-tile,
body.ui-card-shadows:not(.perf-lite) .education-course-panel,
body.ui-card-shadows:not(.perf-lite) .education-detail-panel,
body.ui-card-shadows:not(.perf-lite) .crime-category-tile,
body.ui-card-shadows:not(.perf-lite) .crime-list-panel,
body.ui-card-shadows:not(.perf-lite) .crime-detail-panel,
body.ui-card-shadows:not(.perf-lite) .company-card,
body.ui-card-shadows:not(.perf-lite) .gym-logo-card,
body.ui-card-shadows:not(.perf-lite) .casino-history-card,
body.ui-card-shadows:not(.perf-lite) .playing-card {
  box-shadow: var(--card-shadow-raised) !important;
}

body.ui-card-shadows:not(.perf-lite) .education-category-tile:hover,
body.ui-card-shadows:not(.perf-lite) .education-category-tile:focus-visible,
body.ui-card-shadows:not(.perf-lite) .education-category-tile.is-selected,
body.ui-card-shadows:not(.perf-lite) .crime-category-tile:hover,
body.ui-card-shadows:not(.perf-lite) .crime-category-tile:focus-visible,
body.ui-card-shadows:not(.perf-lite) .crime-category-tile.is-selected {
  box-shadow: var(--card-shadow-raised-strong) !important;
}

.shell {
  max-width: clamp(960px, 92vw, 1280px);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 16px) clamp(12px, 2vw, 16px)
    calc(32px + var(--chat-dock-offset));
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 0;
  position: static;
  top: auto;
  z-index: 2000;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-center {
  display: block;
  flex: 1 1 clamp(220px, 32vw, 420px);
  min-width: 180px;
  max-width: 460px;
}

.topbar-utility-links,
.topbar-quick-links {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.topbar-utility-links {
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.topbar-utility-links::-webkit-scrollbar {
  height: 0;
}

.topbar-quick-links {
  flex: 0 0 auto;
}

.topbar-utility-link,
.topbar-quick-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.topbar-utility-link:hover,
.topbar-quick-link:hover {
  color: var(--ink);
}

.topbar-utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  border: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: none;
}

.topbar-utility-link:hover,
.topbar-utility-link:focus-visible {
  background: transparent;
}

.topbar-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  position: relative;
  border-radius: 9px;
  border: 1px solid rgba(79, 122, 166, 0.2);
  background: rgba(12, 18, 26, 0.78);
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar-search input,
.topbar-search .topbar-search-submit,
.topbar-search .topbar-search-context-button {
  font: inherit;
}

.topbar-search-context {
  position: relative;
  align-self: stretch;
}

.topbar-search-context-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  border: 0;
  border-right: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 0;
  padding: 0 8px;
  background: rgba(79, 122, 166, 0.08);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.03em;
  line-height: 1;
  box-shadow: none;
  transform: none;
  min-width: 76px;
}

.topbar-search-context-button:hover,
.topbar-search-context-button:focus-visible,
.topbar-search-context-button[aria-expanded="true"] {
  background: rgba(79, 122, 166, 0.16);
}

.topbar-search-context-button .topbar-search-context-caret {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

#topbarSearchContextLabel {
  font-size: 11px;
  line-height: 1;
}

.topbar-search-context-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 156px;
  max-width: 200px;
  border-radius: 10px;
  border: 1px solid rgba(79, 122, 166, 0.24);
  background: rgba(8, 14, 22, 0.98);
  box-shadow: 0 10px 20px rgba(2, 6, 12, 0.55);
  padding: 4px;
}

.topbar-search-context-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: left;
  box-shadow: none;
  transform: none;
}

.topbar-search-context-option:hover,
.topbar-search-context-option:focus-visible {
  background: rgba(79, 122, 166, 0.16);
}

.topbar-search-context-option[aria-current="true"] {
  background: rgba(79, 122, 166, 0.22);
}

.topbar-search-context-option[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
}

.topbar-search-context-option[aria-disabled="true"]:hover,
.topbar-search-context-option[aria-disabled="true"]:focus-visible {
  background: transparent;
}

.topbar-search-context-status {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 58;
  border-radius: 10px;
  border: 1px solid rgba(79, 122, 166, 0.24);
  background: rgba(8, 14, 22, 0.98);
  box-shadow: 0 10px 20px rgba(2, 6, 12, 0.55);
  padding: 4px;
  max-height: 248px;
  overflow-y: auto;
}

.topbar-search-results::-webkit-scrollbar {
  width: 7px;
}

.topbar-search-results::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 205, 0.4);
  border-radius: 999px;
}

.topbar-search-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.01em;
  box-shadow: none;
  transform: none;
}

.topbar-search-result:hover,
.topbar-search-result:focus-visible,
.topbar-search-result.is-active {
  background: rgba(79, 122, 166, 0.16);
}

.topbar-search-result-dot {
  display: block;
  flex: 0 0 7px;
  width: 7px;
  min-width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a5565;
  box-shadow: 0 0 0 1px rgba(106, 128, 154, 0.32);
}

.topbar-search-result-dot.status-active {
  background: #3fb950;
  box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.42);
}

.topbar-search-result-dot.status-idle {
  background: #d6a24e;
  box-shadow: 0 0 0 1px rgba(214, 162, 78, 0.42);
}

.topbar-search-result-dot.status-offline {
  background: #4a5565;
  box-shadow: 0 0 0 1px rgba(106, 128, 154, 0.32);
}

.topbar-search-result-text {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.topbar-search-result-empty {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.topbar-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 6px 8px;
  font-size: 11px;
}

.topbar-search input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.topbar-search .topbar-search-submit {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 30px;
  height: 100%;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
  transform: none;
}

.topbar-search .topbar-search-submit:hover {
  color: var(--ink);
  background: rgba(79, 122, 166, 0.08);
  box-shadow: none;
  transform: none;
}

.topbar-quick-link-log {
  color: var(--ink);
  background: transparent;
  border: none;
  width: 24px;
  min-width: 24px;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
}

.topbar-quick-link-log:hover,
.topbar-quick-link-log:focus-visible {
  color: var(--ink);
}

.topbar-search-toggle {
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(79, 122, 166, 0.14);
  background: rgba(79, 122, 166, 0.06);
  color: var(--muted);
  box-shadow: none;
  transform: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.topbar-search-toggle:hover,
.topbar-search-toggle:focus-visible {
  background: rgba(79, 122, 166, 0.12);
  color: var(--ink);
  border-color: rgba(79, 122, 166, 0.22);
  box-shadow: none;
  transform: none;
}

.topbar-search-toggle span {
  display: block;
  font-size: 14px;
  line-height: 1;
}

.topbar-utility-toggle {
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 24px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: none;
  transition: color 0.15s ease;
}

.topbar-utility-toggle:hover,
.topbar-utility-toggle:focus-visible {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.topbar-utility-toggle span {
  display: block;
  font-size: inherit;
  line-height: 1;
}

.topbar-server-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: none;
  transition: color 0.15s ease;
}

.topbar-server-time:hover,
.topbar-server-time:focus-visible {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.topbar-server-time-icon,
.top-bar-server-time-icon {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
}

.topbar-server-time-popover {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2300;
  max-width: calc(100vw - 16px);
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid rgba(120, 150, 190, 0.18);
  background: rgba(20, 28, 39, 0.96);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 18px rgba(8, 14, 22, 0.35);
  pointer-events: none;
}

body.light-mode .topbar-server-time-popover {
  border-color: rgba(59, 98, 139, 0.2);
  background: rgba(224, 231, 241, 0.96);
  color: #213247;
}

body.light-mode .topbar-search {
  background: rgba(244, 246, 250, 0.94);
  border-color: rgba(59, 98, 139, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.light-mode .topbar-search .topbar-search-submit:hover {
  background: rgba(59, 98, 139, 0.08);
}

body.light-mode .topbar-search-context-button {
  background: rgba(59, 98, 139, 0.08);
  border-right-color: rgba(59, 98, 139, 0.16);
  color: #213247;
}

body.light-mode .topbar-search-context-button:hover,
body.light-mode .topbar-search-context-button:focus-visible,
body.light-mode .topbar-search-context-button[aria-expanded="true"] {
  background: rgba(59, 98, 139, 0.14);
}

body.light-mode .topbar-search-context-menu {
  border-color: rgba(59, 98, 139, 0.22);
  background: rgba(236, 242, 250, 0.98);
  box-shadow: 0 10px 20px rgba(32, 52, 78, 0.28);
}

body.light-mode .topbar-search-context-option {
  color: #1e3044;
}

body.light-mode .topbar-search-context-option:hover,
body.light-mode .topbar-search-context-option:focus-visible {
  background: rgba(59, 98, 139, 0.12);
}

body.light-mode .topbar-search-context-option[aria-current="true"] {
  background: rgba(59, 98, 139, 0.18);
}

body.light-mode .topbar-search-context-status {
  color: #496582;
}

body.light-mode .topbar-search-results {
  border-color: rgba(59, 98, 139, 0.22);
  background: rgba(236, 242, 250, 0.98);
  box-shadow: 0 10px 20px rgba(32, 52, 78, 0.28);
}

body.light-mode .topbar-search-result {
  color: #1e3044;
}

body.light-mode .topbar-search-result:hover,
body.light-mode .topbar-search-result:focus-visible,
body.light-mode .topbar-search-result.is-active {
  background: rgba(59, 98, 139, 0.12);
}

body.light-mode .topbar-search-result-dot {
  background: #627086;
  box-shadow: 0 0 0 1px rgba(56, 78, 108, 0.26);
}

body.light-mode .topbar-search-result-dot.status-active {
  background: #2f9e44;
  box-shadow: 0 0 0 1px rgba(47, 158, 68, 0.4);
}

body.light-mode .topbar-search-result-dot.status-idle {
  background: #b9852f;
  box-shadow: 0 0 0 1px rgba(185, 133, 47, 0.4);
}

body.light-mode .topbar-search-result-dot.status-offline {
  background: #627086;
  box-shadow: 0 0 0 1px rgba(56, 78, 108, 0.26);
}

body.light-mode .topbar-search-result-empty {
  color: #4b6785;
}

body.light-mode .topbar-utility-link {
  background: transparent;
  border-color: transparent;
}

body.light-mode .topbar-utility-link:hover,
body.light-mode .topbar-utility-link:focus-visible {
  background: transparent;
  border-color: transparent;
}

.topbar-quick-link-log span {
  font-size: 13px;
  line-height: 1;
}

.topbar-eyebrow {
  font-size: 28px;
  letter-spacing: 0.22em;
}

.user-menu-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transform: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(79, 122, 166, 0.4);
  object-fit: cover;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible,
.user-menu-toggle[aria-expanded="true"] {
  transform: none;
  box-shadow: none;
  border-color: rgba(156, 194, 235, 0.55);
  background: rgba(79, 122, 166, 0.1);
}

.user-menu-toggle:hover .user-avatar,
.user-menu-toggle:focus-visible .user-avatar,
.user-menu-toggle[aria-expanded="true"] .user-avatar {
  border-color: rgba(210, 232, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(210, 232, 255, 0.28);
}

body.light-mode .user-menu-toggle:hover,
body.light-mode .user-menu-toggle:focus-visible,
body.light-mode .user-menu-toggle[aria-expanded="true"] {
  border-color: rgba(59, 98, 139, 0.34);
  background: rgba(59, 98, 139, 0.12);
}

body.light-mode .user-menu-toggle:hover .user-avatar,
body.light-mode .user-menu-toggle:focus-visible .user-avatar,
body.light-mode .user-menu-toggle[aria-expanded="true"] .user-avatar {
  border-color: rgba(59, 98, 139, 0.78);
  box-shadow: 0 0 0 1px rgba(59, 98, 139, 0.24);
}

.user-avatar-initials {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 180px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.user-menu-card {
  margin-bottom: 4px;
  box-shadow: none;
}

.user-menu.hidden {
  display: none;
}

.user-menu-item {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

.user-menu-item:hover {
  background: rgba(79, 122, 166, 0.2);
}

.inline-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.inline-link:hover,
.inline-link:focus-visible {
  text-decoration: underline;
}

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

body.no-session-chrome .layout {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin-inline: auto;
}

.sidebar {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  background: var(--panel);
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.sidebar > * {
  width: 100%;
  min-width: 0;
}

.sidebar-info {
  display: grid;
  gap: 4px;
}

.sidebar-info .section-title {
  margin-top: 0;
}

.info-glyphs {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  gap: 3px;
  align-items: start;
  justify-content: start;
  /* Allow tooltip bubbles to extend outside the glyph row without being clipped. */
  overflow: visible;
  padding-bottom: 2px;
  max-width: 100%;
}

.info-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: none;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  flex: 0 0 auto;
  cursor: pointer;
}

.info-glyph:hover,
.info-glyph:focus-visible {
  cursor: pointer;
}

@media (max-width: 1080px) {
  .info-glyphs {
    grid-template-columns: repeat(auto-fill, minmax(22px, 22px));
  }
}

.info-glyph.muted {
  opacity: 0.6;
}

.info-glyph[data-glyph-key="tier"] {
  font-weight: 700;
}

.info-glyph[data-glyph-key="tier"][data-tier="free"] {
  color: #b9c5d6;
}

.info-glyph[data-glyph-key="tier"][data-tier="subscriber"] {
  color: var(--sun);
}

.info-glyph[data-glyph-key="tier"][data-tier="donator"] {
  color: #68a7ff;
}

.info-glyph[data-glyph-key="battle-pass"] {
  color: #d6a24e;
}

body.light-mode .info-glyph[data-glyph-key="tier"][data-tier="free"] {
  color: #7e90a8;
}

body.light-mode .info-glyph[data-glyph-key="tier"][data-tier="subscriber"] {
  color: #b77f25;
}

body.light-mode .info-glyph[data-glyph-key="tier"][data-tier="donator"] {
  color: #2e5fbe;
}

body.light-mode .info-glyph[data-glyph-key="battle-pass"] {
  color: #9a6720;
}

.info-glyph:focus-visible {
  outline: 2px solid rgba(79, 122, 166, 0.6);
  outline-offset: 2px;
}

.sidebar .stat-grid {
  grid-template-columns: 1fr;
  gap: 4px;
}

.sidebar .stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  white-space: nowrap;
}

.sidebar .stat-label {
  font-size: 10px;
}

.sidebar .stat-value {
  font-size: 12px;
}

.content {
  min-width: 0;
  width: 100%;
}

body.no-session-chrome .topbar,
body.no-session-chrome .sidebar,
body.no-session-chrome .chat-dock,
body.no-session-chrome .dock-panel-row {
  display: none !important;
}

@media (max-width: 450px) {
  .shell {
    max-width: 100%;
  }
  .content {
    max-width: none;
  }
}

.nav {
  display: grid;
  gap: 6px;
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 10px;
  border: none;
  background: var(--panel);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(79, 122, 166, 0.16);
}

.nav-link span:last-child:not(.nav-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #76c24e;
  color: #10200e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-badge.hidden {
  display: none;
}

.nav-link.active {
  color: var(--ink);
  border: none;
  background: rgba(79, 122, 166, 0.2);
}

.status-icons {
  display: grid;
  gap: 4px;
  margin: 0;
}

.wallet-strip {
  display: grid;
  gap: 4px;
  margin: 0;
}

.wallet-strip-head {
  margin: 0;
}

.status-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(24, 34, 48, 0.92);
  box-shadow: 0 8px 16px rgba(6, 10, 16, 0.45);
  min-width: 0;
  width: 100%;
}

.status-icon.clickable {
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(6, 10, 16, 0.65);
}

.status-icon.muted {
  opacity: 0.6;
}

.status-icon-glyph {
  font-size: 16px;
}

.status-icon-body {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.status-icon-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.status-icon-meta {
  font-weight: 600;
  font-size: 11px;
}

.status-icon-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-icon-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.status-icon-link:hover {
  text-decoration: underline;
}

#statusHospital {
  border-color: rgba(176, 65, 45, 0.45);
  background: rgba(90, 32, 24, 0.55);
}

#statusJail {
  border-color: rgba(79, 122, 166, 0.35);
  background: rgba(24, 36, 52, 0.6);
}

#statusCooldown {
  border-color: rgba(214, 162, 78, 0.4);
  background: rgba(76, 58, 28, 0.6);
}

#statusDaily {
  border-color: rgba(79, 122, 166, 0.45);
  background: rgba(28, 44, 64, 0.65);
}

#statusBooster {
  border-color: rgba(79, 122, 166, 0.35);
  background: rgba(24, 40, 56, 0.6);
}

.ticker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  background: var(--card);
  border: none;
  border-radius: 10px;
  padding: 6px 8px 10px;
  margin: 0;
  box-shadow: 0px 0px 6px #4f7ba6;
}

.ticker-item {
  --ticker-segments: 10;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  column-gap: 6px;
  white-space: nowrap;
  overflow: visible;
}

.ticker-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  flex: 0 0 auto;
  grid-column: 1;
}

.ticker-value {
  font-weight: 600;
  font-size: 12px;
  grid-column: 4;
  justify-self: end;
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ticker-sub {
  font-size: 9px;
  color: var(--muted);
  grid-column: 3;
  justify-self: end;
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ticker .ticker-item .ticker-label::before {
  content: var(
    --ticker-label-glyph-emoji,
    var(--ticker-label-glyph, var(--ticker-label-glyph-fallback, ""))
  );
  display: inline-block;
  margin-right: 4px;
  font-size: var(--ticker-label-glyph-size, 10px);
  line-height: 1.1;
  vertical-align: middle;
}

.ticker-item[data-resource="energy"] {
  --ticker-progress-rgb: 105, 191, 95;
  --ticker-label-glyph: "⚡";
  --ticker-label-glyph-emoji: "⚡️";
}

.ticker-item[data-resource="audacity"] {
  --ticker-progress-rgb: 223, 121, 71;
  --ticker-label-glyph: "⚠";
  --ticker-label-glyph-emoji: "⚠️";
}

.ticker-item[data-resource="pleasure"] {
  --ticker-progress-rgb: 214, 173, 74;
  --ticker-label-glyph: "☺";
  --ticker-label-glyph-emoji: "😊";
}

.ticker-item[data-resource="life"] {
  --ticker-progress-rgb: 104, 139, 229;
  --ticker-label-glyph: "♥";
  --ticker-label-glyph-emoji: "❤️";
}

.ticker-item[data-resource="factionChain"] {
  --ticker-label-glyph: "🔗";
  --ticker-label-glyph-emoji: "🔗";
  --ticker-label-glyph-size: 10px;
}

.ticker .ticker-item[data-resource="factionChain"] .ticker-label::before {
  line-height: 1.2;
  transform: translateY(1px);
}

.ticker-item[data-resource="drugCooldown"] {
  --ticker-label-glyph: "⚗";
}

.ticker-item[data-resource="medicalCooldown"] {
  --ticker-label-glyph: "✚";
  --ticker-label-glyph-emoji: "💉";
}

.ticker-item[data-resource="boosterCooldown"] {
  --ticker-label-glyph-emoji: "🍬";
  --ticker-label-glyph: "🍭";
  --ticker-label-glyph-fallback: "🍫";
}

.ticker-item[data-resource="nextTick"] {
  --ticker-label-glyph: "⏱";
}

.ticker-progress {
  grid-column: 1 / -1;
  position: relative;
  --ticker-notch-color: rgba(7, 12, 18, 0.52);
  --ticker-notch-width: 1px;
  height: 3px;
  margin-top: 2px;
  border-radius: 999px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.07);
}

.ticker-progress::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: calc(100% + 4px);
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  clip-path: inset(0 var(--ticker-notch-width) 0 0);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc((100% / var(--ticker-segments)) - var(--ticker-notch-width)),
    var(--ticker-notch-color) calc((100% / var(--ticker-segments)) - var(--ticker-notch-width)),
    var(--ticker-notch-color) calc(100% / var(--ticker-segments))
  );
}

.ticker-progress-next,
.ticker-progress-value {
  position: absolute;
  left: 0;
  width: 0;
  border-radius: inherit;
  transition: width 0.2s linear;
}

.ticker-progress-next {
  top: -2px;
  height: calc(100% + 4px);
  background: rgba(var(--ticker-progress-rgb, 79, 122, 166), 0.35);
}

.ticker-progress-value {
  top: 49%;
  height: calc(100% + -1px);
  min-height: 1px;
  transform: translateY(-50%);
  background: rgba(var(--ticker-progress-rgb, 79, 122, 166), 1);
}

body.light-mode .ticker-progress {
  --ticker-notch-color: rgba(31, 42, 56, 0.36);
  background: rgba(31, 42, 56, 0.12);
}

body.light-mode .ticker-progress-next {
  background: rgba(var(--ticker-progress-rgb, 59, 98, 139), 0.38);
}

body.light-mode .ticker-progress-value {
  background: rgba(var(--ticker-progress-rgb, 59, 98, 139), 1);
}

.ticker-item[data-resource="boosterCooldown"] .ticker-sub,
.ticker-item[data-resource="medicalCooldown"] .ticker-sub,
.ticker-item[data-resource="drugCooldown"] .ticker-sub {
  display: none;
}

.ticker-item[data-resource="energy"] .ticker-sub,
.ticker-item[data-resource="audacity"] .ticker-sub,
.ticker-item[data-resource="pleasure"] .ticker-sub,
.ticker-item[data-resource="life"] .ticker-sub {
  display: block;
}

.ticker-item[data-resource="drugCooldown"],
.ticker-item[data-resource="medicalCooldown"],
.ticker-item[data-resource="boosterCooldown"],
.ticker-item[data-resource="nextTick"] {
  display: none;
}

.ticker-item[data-resource="factionChain"] {
  display: none;
}

.ticker-sub {
  display: none;
}

.ticker-item[data-resource="factionChain"] .ticker-sub {
  display: block;
}

.ticker-item[data-resource="factionChain"] .ticker-value {
  color: var(--sun);
}

body.has-mobile-faction-chain
  .ticker-item[data-resource="factionChain"].mobile-faction-chain-active {
  display: grid;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: none;
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.view-title {
  margin: 0;
  font-size: 24px;
}

.view-title.view-title-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.view-title-profile .topbar-search-result-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
}

.view-title-profile-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.view-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.view-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-link::before {
  content: "•";
  color: rgba(226, 236, 250, 0.55);
  font-size: 10px;
}

.view-link:hover {
  color: var(--ink);
}

.view-header-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
}

.view-header-theme-toggle:hover {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.view-header-theme-toggle:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: 2px;
}

.view-header-theme-toggle .theme-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

.view-header-theme-toggle .theme-toggle-icon__sun,
.view-header-theme-toggle .theme-toggle-icon__moon {
  transform-origin: 12px 12px;
  transition:
    opacity 180ms ease,
    transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: opacity, transform;
}

.view-header-theme-toggle .theme-toggle-icon__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.view-header-theme-toggle .theme-toggle-icon__moon {
  opacity: 0;
  transform: rotate(-70deg) scale(0.65);
}

.view-header-theme-toggle.is-theme-moon .theme-toggle-icon__sun {
  opacity: 0;
  transform: rotate(70deg) scale(0.65);
}

.view-header-theme-toggle.is-theme-moon .theme-toggle-icon__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .view-header-theme-toggle .theme-toggle-icon__sun,
  .view-header-theme-toggle .theme-toggle-icon__moon {
    transition: none;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
  text-decoration: none;
}

.eyebrow:hover {
  color: var(--ink);
}

.eyebrow.topbar-eyebrow {
  font-size: 28px;
}

h1,
h2 {
  font-family: "Manrope", "Space Grotesk", "Trebuchet MS", sans-serif;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
}

.lede {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-card {
  background: var(--card);
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
  display: grid;
  gap: 4px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.status-label {
  color: var(--muted);
}

.status-pill {
  background: rgba(79, 122, 166, 0.2);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
}

.status-pill.offline {
  background: rgba(230, 237, 245, 0.08);
  color: var(--muted);
}

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

.view[data-route="admin"] .grid {
  grid-template-columns: minmax(0, 1fr);
}

.cw-data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.42);
}

.cw-data-table th,
.cw-data-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.cw-data-table th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.cw-data-table td.numeric,
.cw-data-table th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cw-data-table tr:last-child td {
  border-bottom: 0;
}

.cw-data-table .inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  text-align: left;
}

.cw-data-table .inline-link:hover {
  color: var(--accent-strong);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.table-actions button {
  padding: 0.45rem 0.65rem;
}

.admin-user-table {
  table-layout: auto;
  font-size: 0.88rem;
}

.admin-user-table th,
.admin-user-table td {
  padding: 0.45rem 0.55rem;
  line-height: 1.15;
}

.admin-user-table th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.admin-user-table td {
  white-space: nowrap;
}

.admin-user-table .admin-user-email-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-table .admin-user-date-cell {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.admin-user-table .admin-user-id-cell {
  width: 1%;
}

.admin-user-table .table-actions {
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.admin-user-table .table-actions button {
  min-height: 28px;
  padding: 0.28rem 0.45rem;
  font-size: 0.76rem;
  line-height: 1;
}

.admin-user-list-table,
.hof-table-shell {
  overflow-x: auto;
}

.hof-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.hof-metric-card {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  text-align: left;
}

.hof-metric-card strong {
  font-size: 1rem;
}

.hof-metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hof-metric-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.hof-viewer-rank {
  margin-bottom: 1rem;
}

.hof-viewer-rank:empty {
  display: none;
}

.admin-workspace {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.testing-workspace {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

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

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

.admin-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.testing-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-workspace-tab {
  border: 1px solid var(--line);
  background: rgba(13, 24, 38, 0.54);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.testing-workspace-tab {
  border: 1px solid var(--line);
  background: rgba(13, 24, 38, 0.54);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-workspace-tab:hover,
.admin-workspace-tab:focus-visible {
  color: var(--ink);
  border-color: rgba(120, 152, 186, 0.34);
  background: rgba(25, 42, 62, 0.7);
}

.testing-workspace-tab:hover,
.testing-workspace-tab:focus-visible {
  color: var(--ink);
  border-color: rgba(120, 152, 186, 0.34);
  background: rgba(25, 42, 62, 0.7);
}

.admin-workspace-tab.is-active,
.admin-workspace-tab[aria-selected="true"] {
  color: #e8f1ff;
  border-color: rgba(126, 184, 255, 0.5);
  background: linear-gradient(
    180deg,
    rgba(46, 76, 112, 0.78),
    rgba(28, 46, 68, 0.92)
  );
  box-shadow: inset 0 0 0 1px rgba(210, 232, 255, 0.08);
}

.testing-workspace-tab.is-active,
.testing-workspace-tab[aria-selected="true"] {
  color: #e8f1ff;
  border-color: rgba(126, 184, 255, 0.5);
  background: linear-gradient(
    180deg,
    rgba(46, 76, 112, 0.78),
    rgba(28, 46, 68, 0.92)
  );
  box-shadow: inset 0 0 0 1px rgba(210, 232, 255, 0.08);
}

body.light-mode .admin-workspace-tab {
  background: rgba(232, 238, 246, 0.96);
  border-color: rgba(59, 98, 139, 0.18);
  color: #49627f;
}

body.light-mode .testing-workspace-tab {
  background: rgba(232, 238, 246, 0.96);
  border-color: rgba(59, 98, 139, 0.18);
  color: #49627f;
}

body.light-mode .admin-workspace-tab:hover,
body.light-mode .admin-workspace-tab:focus-visible {
  color: #1d2c3b;
  border-color: rgba(59, 98, 139, 0.28);
  background: rgba(221, 231, 243, 0.98);
}

body.light-mode .testing-workspace-tab:hover,
body.light-mode .testing-workspace-tab:focus-visible {
  color: #1d2c3b;
  border-color: rgba(59, 98, 139, 0.28);
  background: rgba(221, 231, 243, 0.98);
}

body.light-mode .admin-workspace-tab.is-active,
body.light-mode .admin-workspace-tab[aria-selected="true"] {
  color: #f7fbff;
  border-color: rgba(59, 98, 139, 0.4);
  background: linear-gradient(
    180deg,
    rgba(73, 110, 150, 0.88),
    rgba(53, 85, 120, 0.96)
  );
}

body.light-mode .testing-workspace-tab.is-active,
body.light-mode .testing-workspace-tab[aria-selected="true"] {
  color: #f7fbff;
  border-color: rgba(59, 98, 139, 0.4);
  background: linear-gradient(
    180deg,
    rgba(73, 110, 150, 0.88),
    rgba(53, 85, 120, 0.96)
  );
}

[data-admin-grid][hidden] {
  display: none !important;
}

[data-admin-dbops-panel][hidden] {
  display: none !important;
}

[data-testing-panel][hidden] {
  display: none !important;
}

.view[data-route="factions"] .grid {
  grid-template-columns: minmax(0, 1fr);
}

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

.home-column {
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border: none;
  border-radius: 6px 6px 0 0;
  padding: 10px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
  position: relative;
  min-width: 0;
}

.home-compact {
  padding: 12px;
}

.home-compact .section-title {
  margin: 10px 0 4px;
  font-size: 10px;
}

.home-compact .stat-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.home-compact .stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 9px;
  white-space: nowrap;
}

.home-compact .stat-label {
  font-size: 10px;
}

.home-compact .stat-value {
  font-size: 12px;
}

.daily-panel-shell,
.daily-view-content {
  display: grid;
  gap: 12px;
}

.daily-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.daily-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.view[data-route="daily"] .daily-track-grid {
  grid-template-columns: minmax(0, 1fr);
}

.daily-season-panel,
.daily-track-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(79, 122, 166, 0.08), rgba(79, 122, 166, 0) 45%),
    var(--panel);
}

.daily-season-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --season-accent-rgb: 96, 143, 214;
  --season-badge-bg: rgba(79, 122, 166, 0.16);
  --season-badge-ink: rgba(241, 247, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(96, 143, 214, 0.12), rgba(96, 143, 214, 0) 45%),
    var(--panel);
}

.daily-season-panel > * {
  position: relative;
  z-index: 2;
}

.daily-season-panel[data-season="spring"] {
  --season-accent-rgb: 82, 164, 136;
}

.daily-season-panel[data-season="summer"] {
  --season-accent-rgb: 214, 132, 68;
}

.daily-season-panel[data-season="fall"] {
  --season-accent-rgb: 184, 112, 76;
}

.daily-season-panel[data-season="winter"] {
  --season-accent-rgb: 90, 146, 229;
}

.daily-season-panel[data-mode="intermission"] {
  --season-accent-rgb: 142, 116, 211;
}

.view[data-route="daily"] .daily-season-panel {
  min-height: 0;
  padding: 12px 0;
  border: 0;
  background:
    linear-gradient(180deg, rgba(var(--season-accent-rgb), 0.18), rgba(10, 16, 24, 0.22)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(9, 16, 24, 0.92);
}

.view[data-route="daily"] .daily-season-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 12, 20, 0.08), rgba(7, 12, 20, 0.3) 34%, rgba(7, 12, 20, 0.64)),
    radial-gradient(circle at top right, rgba(var(--season-accent-rgb), 0.28), transparent 36%);
  pointer-events: none;
  z-index: 1;
}

.daily-season-panel-media-layer,
.daily-season-panel-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
}

.daily-season-panel.has-theme-variants .daily-season-panel-media-layer.is-dark,
.daily-season-panel.has-theme-variants .daily-season-panel-media.is-dark,
.daily-season-panel:not(.has-theme-variants) .daily-season-panel-media-layer,
.daily-season-panel:not(.has-theme-variants) .daily-season-panel-media {
  opacity: 1;
}

body.light-mode .daily-season-panel.has-theme-variants .daily-season-panel-media-layer.is-dark,
body.light-mode .daily-season-panel.has-theme-variants .daily-season-panel-media.is-dark {
  opacity: 0;
}

body.light-mode .daily-season-panel.has-theme-variants .daily-season-panel-media-layer.is-light,
body.light-mode .daily-season-panel.has-theme-variants .daily-season-panel-media.is-light {
  opacity: 1;
}

.daily-season-panel-media {
  object-fit: cover;
  object-position: var(--daily-season-panel-layer-position, center center);
}

.daily-season-panel-image-layer {
  background-position: var(--daily-season-panel-layer-position, center center);
  background-size: var(--daily-season-panel-layer-size, cover);
  background-repeat: no-repeat;
}

.view[data-route="daily"] .daily-season-panel .daily-track-head {
  max-width: none;
  width: auto;
  margin-left: 12px;
  margin-right: 12px;
}

.view[data-route="daily"] .daily-season-panel .daily-season-meta,
.view[data-route="daily"] .daily-season-panel .daily-track-footer {
  max-width: min(100%, 620px);
  margin-left: 12px;
  margin-right: 12px;
}

.view[data-route="daily"] .daily-season-panel .daily-track-title {
  color: rgba(248, 251, 255, 0.98);
  font-size: 22px;
  text-shadow: 1px 1px 1px rgba(8, 12, 18, 0.9) !important;
}

.view[data-route="daily"] .daily-season-panel .daily-track-subtitle,
.view[data-route="daily"] .daily-season-panel .daily-season-meta,
.view[data-route="daily"] .daily-season-panel .daily-track-footer,
.view[data-route="daily"] .daily-season-panel .daily-season-modifier span {
  color: rgba(224, 234, 246, 0.84);
  text-shadow: 1px 1px 1px rgba(8, 12, 18, 0.9) !important;
}

.view[data-route="daily"] .daily-season-panel .daily-track-badge {
  background: rgba(var(--season-accent-rgb), 0.22);
  color: var(--season-badge-ink);
  text-shadow: 1px 1px 1px rgba(8, 12, 18, 0.9) !important;
}

.view[data-route="daily"] .daily-season-panel .daily-season-modifiers {
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 12px;
}

.view[data-route="daily"] .daily-season-panel .daily-season-modifier {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(8, 14, 22, 0.42);
}

.view[data-route="daily"] .daily-season-panel .daily-season-modifier strong {
  color: rgba(248, 251, 255, 0.96);
  text-shadow: 1px 1px 1px rgba(8, 12, 18, 0.9) !important;
}

@media (max-width: 860px) {
  .view[data-route="daily"] .daily-season-panel .daily-season-modifiers {
    grid-template-columns: 1fr;
  }
}

.daily-track-panel.is-battle-pass {
  background:
    linear-gradient(180deg, rgba(214, 162, 78, 0.12), rgba(214, 162, 78, 0) 45%),
    var(--panel);
}

.daily-track-panel.is-veteran {
  background:
    linear-gradient(180deg, rgba(117, 208, 144, 0.12), rgba(117, 208, 144, 0) 45%),
    var(--panel);
}

.daily-track-panel.is-continuity {
  background:
    linear-gradient(180deg, rgba(108, 180, 225, 0.12), rgba(108, 180, 225, 0) 45%),
    var(--panel);
}

.daily-track-panel.is-inactive {
  opacity: 0.84;
}

.daily-track-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.daily-track-title-wrap {
  display: grid;
  gap: 4px;
}

.daily-track-title {
  margin: 0;
  font-size: 16px;
}

.daily-track-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.daily-track-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.16);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.daily-track-panel.is-battle-pass .daily-track-badge {
  background: rgba(214, 162, 78, 0.18);
}

.daily-track-panel.is-veteran .daily-track-badge {
  background: rgba(117, 208, 144, 0.18);
}

.daily-track-panel.is-continuity .daily-track-badge {
  background: rgba(108, 180, 225, 0.18);
}

.daily-track-panel.is-continuity.is-warning .daily-track-badge {
  background: rgba(224, 159, 76, 0.22);
}

.daily-track-progress-meta {
  margin-top: -4px;
}

.daily-season-meta {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.daily-progress-bar {
  height: 10px;
}

.daily-track-panel.is-battle-pass .daily-progress-bar span {
  background: linear-gradient(90deg, rgba(214, 162, 78, 0.92), rgba(255, 221, 133, 0.98));
}

.daily-track-panel.is-veteran .daily-progress-bar span {
  background: linear-gradient(90deg, rgba(117, 208, 144, 0.92), rgba(198, 255, 214, 0.98));
}

.daily-track-panel.is-continuity .daily-progress-bar span {
  background: linear-gradient(90deg, rgba(108, 180, 225, 0.92), rgba(197, 236, 255, 0.98));
}

.daily-track-reward-list {
  display: grid;
  gap: 8px;
}

.daily-season-modifiers {
  display: grid;
  gap: 8px;
}

.daily-season-modifier {
  display: grid;
  gap: 2px;
}

.daily-season-modifier span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.daily-season-modifier strong {
  font-size: 14px;
  line-height: 1.45;
}

.daily-track-reward-row {
  display: grid;
  gap: 2px;
}

.daily-track-reward-row span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.daily-track-reward-row strong {
  font-size: 14px;
  line-height: 1.45;
}

.daily-track-reward-row.is-delta strong {
  color: #9ed082;
}

.daily-track-note,
.daily-track-footer,
.daily-notice,
.daily-rule-list {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.daily-rule-list {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(79, 122, 166, 0.08);
}

.daily-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(79, 122, 166, 0.08);
}

.daily-continuity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.battle-pass-browser {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(214, 162, 78, 0.1), rgba(214, 162, 78, 0) 45%),
    var(--panel);
}

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

.battle-pass-browser-title-wrap {
  display: grid;
  gap: 4px;
}

.battle-pass-browser-title {
  margin: 0;
  font-size: 18px;
}

.battle-pass-browser-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-browser-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.battle-pass-claim-all,
.battle-pass-claim-btn {
  padding: 9px 12px;
  border: 1px solid rgba(214, 162, 78, 0.28);
  border-radius: 8px;
  background: rgba(214, 162, 78, 0.14);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.battle-pass-activate-btn {
  border-color: rgba(214, 162, 78, 0.42);
  background: rgba(214, 162, 78, 0.22);
}

.battle-pass-activate-btn.is-plus {
  border-color: rgba(124, 167, 233, 0.42);
  background: rgba(79, 122, 166, 0.22);
}

.battle-pass-skip-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-pass-skip-btn {
  min-width: 72px;
}

.battle-pass-claim-all:disabled,
.battle-pass-claim-btn:disabled {
  opacity: 0.62;
}

.battle-pass-browser-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.battle-pass-offer-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(214, 162, 78, 0.2);
  border-radius: 10px;
  background: rgba(214, 162, 78, 0.08);
}

.battle-pass-offer-strip.is-plus {
  border-color: rgba(79, 122, 166, 0.24);
  background: rgba(79, 122, 166, 0.08);
}

.battle-pass-offer-strip.is-subscription {
  border-color: rgba(117, 208, 144, 0.24);
  background: rgba(24, 52, 34, 0.14);
}

.battle-pass-offer-copy {
  display: grid;
  gap: 4px;
}

.battle-pass-offer-title {
  font-size: 13px;
  font-weight: 800;
}

.battle-pass-offer-body {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-subscribe-btn {
  border-color: rgba(117, 208, 144, 0.36);
  background: rgba(24, 52, 34, 0.2);
}

.battle-pass-subscribe-btn.is-secondary {
  border-color: rgba(79, 122, 166, 0.24);
  background: rgba(79, 122, 166, 0.12);
}

.battle-pass-track-shell {
  display: grid;
  gap: 10px;
}

.battle-pass-lane-row {
  display: grid;
  gap: 8px;
}

.battle-pass-lane-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.battle-pass-tier-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(84px, 1fr));
  gap: 8px;
}

.battle-pass-tier-carousel {
  display: grid;
  gap: 10px;
}

.battle-pass-tier-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.battle-pass-tier-carousel-copy {
  display: grid;
  gap: 3px;
}

.battle-pass-tier-carousel-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.battle-pass-tier-carousel-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-tier-carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-pass-tier-carousel-nav {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(79, 122, 166, 0.22);
  border-radius: 10px;
  background: rgba(14, 22, 34, 0.8);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.battle-pass-tier-carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.battle-pass-tier-carousel-rail {
  display: flex;
  gap: 12px;
  min-width: max-content;
}

.battle-pass-tier-slide {
  display: grid;
  gap: 10px;
  flex: 0 0 clamp(260px, 30vw, 340px);
  padding: 12px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 12px;
  background: rgba(7, 14, 22, 0.44);
  text-align: left;
  scroll-snap-align: start;
}

.battle-pass-tier-slide.is-selected {
  border-color: rgba(96, 143, 214, 0.42);
  background:
    linear-gradient(180deg, rgba(79, 122, 166, 0.16), rgba(79, 122, 166, 0.04) 52%),
    rgba(7, 14, 22, 0.48);
}

.battle-pass-tier-slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.battle-pass-tier-slide-title {
  font-size: 14px;
  font-weight: 800;
}

.battle-pass-tier-slide-meta {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.12);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.battle-pass-tier-slide-lanes {
  display: grid;
  gap: 10px;
}

.battle-pass-tier-lane-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 10px;
  background: rgba(11, 18, 28, 0.72);
}

.battle-pass-tier-lane-card[data-lane="premium"] {
  background:
    linear-gradient(180deg, rgba(214, 162, 78, 0.12), rgba(214, 162, 78, 0.02) 58%),
    rgba(11, 18, 28, 0.78);
}

.battle-pass-tier-lane-card.is-claimable {
  border-color: rgba(117, 208, 144, 0.32);
}

.battle-pass-tier-lane-card.is-claimed {
  opacity: 0.78;
}

.battle-pass-tier-lane-card.is-premium-locked {
  opacity: 0.8;
}

.battle-pass-tier-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.battle-pass-tier-lane-label,
.battle-pass-tier-lane-state {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.battle-pass-tier-lane-label {
  color: var(--muted);
}

.battle-pass-tier-lane-state {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.12);
  color: var(--ink);
}

.battle-pass-tier-lane-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.battle-pass-tier-lane-body.is-cosmetic {
  grid-template-columns: 1fr;
}

.battle-pass-tier-lane-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.battle-pass-tier-lane-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.battle-pass-tier-lane-hint,
.battle-pass-tier-lane-footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-tier-lane-footer {
  min-height: 18px;
}

.battle-pass-tier-card {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 8px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 10px;
  background: rgba(7, 14, 22, 0.42);
  text-align: left;
}

.battle-pass-tier-card.is-premium {
  background: rgba(31, 24, 12, 0.44);
}

.battle-pass-tier-card.is-claimable {
  border-color: rgba(117, 208, 144, 0.36);
  background: rgba(24, 52, 34, 0.42);
}

.battle-pass-tier-card.is-claimed {
  opacity: 0.72;
}

.battle-pass-tier-card.is-premium-locked {
  opacity: 0.76;
}

.battle-pass-tier-card.is-selected {
  border-color: rgba(96, 143, 214, 0.42);
  background: rgba(79, 122, 166, 0.18);
}

.battle-pass-tier-card.is-cosmetic {
  background:
    linear-gradient(180deg, rgba(214, 162, 78, 0.14), rgba(214, 162, 78, 0.02) 50%),
    rgba(7, 14, 22, 0.48);
}

.battle-pass-tier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.battle-pass-tier-meta,
.battle-pass-tier-state {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.battle-pass-tier-state {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.12);
}

.battle-pass-tier-icon {
  font-size: 18px;
  line-height: 1;
}

.battle-pass-tier-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.battle-pass-tier-preview {
  display: grid;
  gap: 6px;
  align-content: start;
}

.battle-pass-tier-preview:not(.is-cosmetic) {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.battle-pass-tier-preview-copy {
  display: grid;
  gap: 2px;
}

.battle-pass-tier-preview-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.battle-pass-tier-preview-slot {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.battle-pass-cosmetic-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 10px;
  background: rgba(79, 122, 166, 0.08);
}

.battle-pass-cosmetic-preview.is-detail {
  min-height: 72px;
}

.battle-pass-cosmetic-preview[data-slot="backdrop"] {
  background:
    radial-gradient(circle at top right, rgba(124, 167, 233, 0.22), transparent 55%),
    rgba(79, 122, 166, 0.08);
}

.battle-pass-cosmetic-preview[data-slot="trophy"] {
  background:
    radial-gradient(circle at 22% 22%, rgba(214, 162, 78, 0.18), transparent 48%),
    rgba(79, 122, 166, 0.08);
}

.battle-pass-cosmetic-preview[data-slot="chat_flair"] {
  border-style: dashed;
}

.battle-pass-cosmetic-preview-icon {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.battle-pass-cosmetic-preview-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.battle-pass-cosmetic-preview-label {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.battle-pass-cosmetic-preview-slot {
  color: var(--muted);
  font-size: 11px;
}

.battle-pass-detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 10px;
  background: rgba(79, 122, 166, 0.06);
}

.battle-pass-detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-pass-detail-panel-title {
  font-size: 18px;
  font-weight: 800;
}

.battle-pass-detail-panel-meta {
  color: var(--muted);
  font-size: 12px;
}

.battle-pass-archive-shell {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(79, 122, 166, 0.06);
}

.intermission-event-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(124, 167, 233, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(15, 24, 38, 0.92), rgba(8, 14, 23, 0.9)),
    radial-gradient(circle at top right, rgba(121, 164, 229, 0.18), transparent 52%);
}

.intermission-event-panel-compact {
  gap: 10px;
  padding: 12px;
}

.intermission-event-flavor {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.battle-pass-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.battle-pass-archive-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(79, 122, 166, 0.16);
  border-radius: 10px;
  background: rgba(7, 14, 22, 0.38);
}

.battle-pass-archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.battle-pass-archive-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.battle-pass-archive-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(214, 162, 78, 0.14);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.battle-pass-archive-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.battle-pass-detail-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.battle-pass-detail-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(79, 122, 166, 0.18);
  border-radius: 10px;
  background: rgba(7, 14, 22, 0.34);
}

.battle-pass-detail-card.is-premium {
  background: rgba(31, 24, 12, 0.32);
}

.battle-pass-detail-card.is-claimed {
  opacity: 0.8;
}

.battle-pass-detail-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.battle-pass-detail-icon {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.battle-pass-detail-copy {
  display: grid;
  gap: 4px;
}

.battle-pass-detail-lane {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.battle-pass-detail-label {
  font-size: 15px;
  font-weight: 800;
}

.battle-pass-detail-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-detail-preview-meta,
.battle-pass-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-pass-detail-status,
.battle-pass-detail-slot,
.battle-pass-rarity-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.12);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.battle-pass-rarity-chip[data-rarity="uncommon"] {
  background: rgba(117, 208, 144, 0.14);
}

.battle-pass-rarity-chip[data-rarity="rare"] {
  background: rgba(121, 164, 229, 0.18);
}

.battle-pass-rarity-chip[data-rarity="epic"] {
  background: rgba(184, 118, 231, 0.18);
}

.battle-pass-rarity-chip[data-rarity="legendary"] {
  background: rgba(214, 162, 78, 0.18);
}

.battle-pass-detail-helper {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.battle-pass-grant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.battle-pass-grant-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(79, 122, 166, 0.12);
  color: var(--ink);
  font-size: 11px;
}

body.light-mode .daily-track-panel {
  background:
    linear-gradient(180deg, rgba(59, 98, 139, 0.08), rgba(59, 98, 139, 0) 45%),
    var(--panel);
}

body.light-mode .daily-track-panel.is-battle-pass {
  background:
    linear-gradient(180deg, rgba(192, 138, 52, 0.12), rgba(192, 138, 52, 0) 45%),
    var(--panel);
}

body.light-mode .daily-track-panel.is-continuity {
  background:
    linear-gradient(180deg, rgba(98, 152, 198, 0.12), rgba(98, 152, 198, 0) 45%),
    var(--panel);
}

body.light-mode .daily-track-reward-row.is-delta strong {
  color: #3f7a28;
}

body.light-mode .daily-notice,
body.light-mode .daily-rule-list {
  background: rgba(59, 98, 139, 0.08);
}

body.light-mode .battle-pass-browser {
  background:
    linear-gradient(180deg, rgba(192, 138, 52, 0.08), rgba(192, 138, 52, 0) 45%),
    var(--panel);
}

body.light-mode .battle-pass-tier-card,
body.light-mode .battle-pass-detail-card {
  background: rgba(59, 98, 139, 0.06);
}

body.light-mode .battle-pass-tier-card.is-premium {
  background: rgba(192, 138, 52, 0.08);
}

body.light-mode .battle-pass-tier-card.is-selected {
  background: rgba(59, 98, 139, 0.12);
}

body.light-mode .battle-pass-tier-card.is-claimable {
  background: rgba(63, 122, 40, 0.1);
}

body.light-mode .battle-pass-tier-card.is-cosmetic {
  background:
    linear-gradient(180deg, rgba(192, 138, 52, 0.12), rgba(192, 138, 52, 0.03) 50%),
    rgba(59, 98, 139, 0.06);
}

body.light-mode .battle-pass-detail-panel {
  background: rgba(59, 98, 139, 0.05);
}

body.light-mode .battle-pass-tier-state,
body.light-mode .battle-pass-cosmetic-preview,
body.light-mode .battle-pass-detail-status,
body.light-mode .battle-pass-detail-slot,
body.light-mode .battle-pass-rarity-chip {
  background: rgba(59, 98, 139, 0.1);
}

body.light-mode .battle-pass-cosmetic-preview[data-slot="backdrop"] {
  background:
    radial-gradient(circle at top right, rgba(96, 130, 174, 0.2), transparent 55%),
    rgba(59, 98, 139, 0.08);
}

body.light-mode .battle-pass-cosmetic-preview[data-slot="trophy"] {
  background:
    radial-gradient(circle at 22% 22%, rgba(192, 138, 52, 0.18), transparent 48%),
    rgba(59, 98, 139, 0.08);
}

body.light-mode .battle-pass-offer-strip.is-subscription {
  background: rgba(63, 122, 40, 0.08);
}

body.light-mode .battle-pass-subscribe-btn {
  background: rgba(63, 122, 40, 0.12);
}

body.light-mode .battle-pass-subscribe-btn.is-secondary {
  background: rgba(59, 98, 139, 0.08);
}

body.light-mode .battle-pass-archive-shell {
  background: rgba(59, 98, 139, 0.05);
}

body.light-mode .battle-pass-archive-card {
  background: rgba(255, 255, 255, 0.55);
}

body.light-mode .intermission-event-panel {
  background:
    linear-gradient(180deg, rgba(59, 98, 139, 0.08), rgba(59, 98, 139, 0.02)),
    var(--panel);
}

body.light-mode .profile-header {
  border-color: rgba(59, 98, 139, 0.18);
  background: linear-gradient(180deg, rgba(59, 98, 139, 0.1), rgba(255, 255, 255, 0.8));
}

body.light-mode .profile-header.has-cosmetic-backdrop[data-backdrop-season="spring"] {
  background:
    radial-gradient(circle at 18% 24%, rgba(84, 170, 124, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(231, 246, 235, 0.92), rgba(255, 255, 255, 0.9));
}

body.light-mode .profile-header.has-cosmetic-backdrop[data-backdrop-season="summer"] {
  background:
    radial-gradient(circle at 82% 26%, rgba(230, 139, 76, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(250, 238, 226, 0.92), rgba(255, 255, 255, 0.9));
}

body.light-mode .profile-header.has-cosmetic-backdrop[data-backdrop-season="fall"] {
  background:
    radial-gradient(circle at 24% 24%, rgba(197, 146, 82, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(248, 240, 228, 0.92), rgba(255, 255, 255, 0.9));
}

body.light-mode .profile-header.has-cosmetic-backdrop[data-backdrop-season="winter"] {
  background:
    radial-gradient(circle at 84% 26%, rgba(108, 158, 232, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(232, 240, 252, 0.94), rgba(255, 255, 255, 0.92));
}

body.light-mode .profile-header::before {
  opacity: 0.45;
}

body.light-mode .profile-identity-kicker,
body.light-mode .profile-identity-meta,
body.light-mode .profile-cosmetic-slot-current,
body.light-mode .profile-cosmetic-option-description,
body.light-mode .profile-cosmetic-option-meta {
  color: rgba(56, 73, 96, 0.78);
}

body.light-mode .profile-identity-level,
body.light-mode .profile-identity-rank,
body.light-mode .profile-identity-title,
body.light-mode .profile-identity-vitals {
  color: rgba(31, 42, 58, 0.88);
}

body.light-mode .profile-cosmetic-slot {
  background: rgba(255, 255, 255, 0.72);
}

body.light-mode .profile-cosmetic-option-card {
  background: rgba(59, 98, 139, 0.05);
}

body.light-mode .profile-cosmetic-option-card.is-equipped {
  background: rgba(63, 122, 40, 0.1);
}

body.light-mode .chat-flair-chip {
  color: rgba(36, 51, 72, 0.92);
}

body.light-mode .profile-trophy-card,
body.light-mode .intermission-event-last-result {
  background: rgba(255, 255, 255, 0.76);
}

body.light-mode .profile-trophy-icon {
  background: rgba(236, 243, 251, 0.94);
}

@media (max-width: 1080px) {
  .battle-pass-tier-grid {
    grid-template-columns: repeat(5, minmax(84px, 1fr));
  }

  .battle-pass-tier-slide {
    flex-basis: min(72vw, 320px);
  }

  .battle-pass-detail-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .battle-pass-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-pass-tier-carousel-head,
  .battle-pass-tier-slide-head,
  .battle-pass-tier-lane-head {
    align-items: stretch;
  }

  .battle-pass-tier-slide-head,
  .battle-pass-tier-lane-head {
    flex-direction: column;
  }

  .battle-pass-tier-slide {
    flex-basis: min(88vw, 320px);
  }

  .battle-pass-browser-head,
  .battle-pass-detail-panel-head {
    align-items: stretch;
  }
}

.ticker-compact {
  display: grid;
  gap: 4px;
}

.ticker-compact .ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ticker-compact .ticker-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.ticker-compact .ticker-value {
  font-weight: 600;
  font-size: 12px;
  margin-left: auto;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-head > * {
  min-width: 0;
}

.card-head h2 {
  margin: 0;
}

.card-head-side {
  margin-left: auto;
  display: inline-flex;
  align-items: flex-start;
  align-self: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.card-body {
  display: grid;
  gap: inherit;
  margin-top: 10px;
}

.card-tools {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.card-head-inline {
  margin-top: 0;
  align-self: center;
}

.card-tool-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--muted);
  box-shadow: none;
  transform: none;
  font-size: 18px;
  line-height: 1;
}

.card-tool-btn:hover {
  color: var(--ink);
  border: none;
  background: none;
  box-shadow: none;
  transform: none;
}

body.light-mode .card-tool-btn {
  background: none;
  border: none;
  color: var(--accent-dark);
}

body.light-mode .card-tool-btn:hover {
  color: var(--ink);
  border: none;
  background: none;
}

.card-grab {
  cursor: grab;
  font-weight: 800;
  font-size: 18px;
  background: none;
}

.card-grab:active {
  cursor: grabbing;
}

.card.drag-armed {
  outline: 1px dashed rgba(79, 122, 166, 0.6);
  outline-offset: 2px;
}

.card.is-dragging {
  opacity: 0.66;
}

.card.is-collapsed .card-body {
  display: none;
}

.card.is-collapsed {
  padding-bottom: 12px;
}

.filter-bar {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.sort-control {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  max-width: 220px;
}

select:not([multiple]) {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 34px 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23d9e6f7' d='M1.17.38a.75.75 0 0 1 1.06 0L5 3.15 7.77.38a.75.75 0 1 1 1.06 1.06L5.53 4.75a.75.75 0 0 1-1.06 0L1.17 1.44a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 10px 6px;
}

body.light-mode select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23324a67' d='M1.17.38a.75.75 0 0 1 1.06 0L5 3.15 7.77.38a.75.75 0 1 1 1.06 1.06L5.53 4.75a.75.75 0 0 1-1.06 0L1.17 1.44a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.filter-pill.active {
  color: var(--ink);
  border-color: rgba(79, 122, 166, 0.45);
  background: rgba(79, 122, 166, 0.22);
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 10px 0 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 0;
}

.stat-card {
  background: var(--panel);
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
}

.stat-label {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--panel);
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(79, 122, 166, 0.45);
  border-color: rgba(79, 122, 166, 0.6);
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

button {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(6, 10, 16, 0.5);
}

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(79, 122, 166, 0.4);
  box-shadow: none;
}

button.user-menu-item {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  box-shadow: none;
}

button.user-menu-item:hover {
  background: rgba(79, 122, 166, 0.2);
  transform: none;
}

.ghost-link {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid rgba(79, 122, 166, 0.4);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1;
}

.profile-header {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 130, 173, 0.2);
  background: linear-gradient(180deg, rgba(11, 18, 29, 0.92), rgba(9, 14, 24, 0.86));
  overflow: hidden;
  min-height: 112px;
}

.profile-header.has-cosmetic-backdrop[data-backdrop-season="spring"] {
  background:
    radial-gradient(circle at 18% 24%, rgba(97, 198, 138, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(12, 25, 19, 0.96), rgba(9, 17, 14, 0.92));
}

.profile-header.has-cosmetic-backdrop[data-backdrop-season="summer"] {
  background:
    radial-gradient(circle at 82% 26%, rgba(244, 145, 78, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(35, 19, 11, 0.96), rgba(20, 11, 8, 0.92));
}

.profile-header.has-cosmetic-backdrop[data-backdrop-season="fall"] {
  background:
    radial-gradient(circle at 24% 24%, rgba(219, 170, 101, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(33, 23, 12, 0.96), rgba(18, 13, 8, 0.92));
}

.profile-header.has-cosmetic-backdrop[data-backdrop-season="winter"] {
  background:
    radial-gradient(circle at 84% 26%, rgba(125, 178, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(12, 19, 31, 0.98), rgba(8, 13, 23, 0.94));
}

.profile-header > * {
  position: relative;
  z-index: 1;
}

.profile-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(77, 117, 166, 0.28), rgba(15, 22, 34, 0.06) 55%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 20px);
  background-size: auto, 20px 100%;
  opacity: 0.7;
  pointer-events: none;
}

.profile-header.has-cosmetic-banner[data-banner-season="spring"]::before {
  background:
    linear-gradient(135deg, rgba(92, 179, 137, 0.34), rgba(19, 36, 28, 0.08) 58%),
    linear-gradient(90deg, rgba(196, 255, 216, 0.08) 0, rgba(196, 255, 216, 0.08) 1px, transparent 1px, transparent 22px);
  background-size: auto, 22px 100%;
}

.profile-header.has-cosmetic-banner[data-banner-season="summer"]::before {
  background:
    linear-gradient(135deg, rgba(228, 130, 62, 0.36), rgba(56, 26, 14, 0.08) 58%),
    linear-gradient(90deg, rgba(255, 214, 184, 0.08) 0, rgba(255, 214, 184, 0.08) 1px, transparent 1px, transparent 22px);
  background-size: auto, 22px 100%;
}

.profile-header.has-cosmetic-banner[data-banner-season="fall"]::before {
  background:
    linear-gradient(135deg, rgba(196, 143, 74, 0.34), rgba(44, 27, 12, 0.08) 58%),
    linear-gradient(90deg, rgba(255, 225, 186, 0.08) 0, rgba(255, 225, 186, 0.08) 1px, transparent 1px, transparent 22px);
  background-size: auto, 22px 100%;
}

.profile-header.has-cosmetic-banner[data-banner-season="winter"]::before {
  background:
    linear-gradient(135deg, rgba(92, 139, 214, 0.38), rgba(15, 28, 48, 0.1) 58%),
    linear-gradient(90deg, rgba(208, 227, 255, 0.08) 0, rgba(208, 227, 255, 0.08) 1px, transparent 1px, transparent 22px);
  background-size: auto, 22px 100%;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  align-self: flex-start;
}

.profile-view-actions {
  margin-top: 14px;
}

.profile-view-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
}

.profile-action-icon {
  font-size: 15px;
  line-height: 1;
}

.profile-transfer-form,
.bounty-create-form {
  margin-top: 10px;
  align-items: end;
}

.bounty-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 130px minmax(140px, 0.8fr) 150px 150px minmax(220px, 1.2fr) auto;
  gap: 10px;
}

.bounty-create-form > label,
.bounty-create-anonymous {
  min-width: 0;
}

.bounty-quantity-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bounty-quantity-control .quantity-input {
  width: 76px;
}

.bounty-quantity-control button {
  min-height: 37px;
  padding-inline: 10px;
}

.bounty-placement-summary {
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 16, 26, 0.35);
}

@media (max-width: 1100px) {
  .bounty-create-form {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .bounty-create-form .bounty-create-reason {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .bounty-create-form {
    grid-template-columns: 1fr;
  }

  .bounty-create-form .bounty-create-reason {
    grid-column: auto;
  }
}

.profile-transfer-note,
.bounty-create-reason {
  flex: 1 1 240px;
}

.profile-avatar-stack {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.profile-header .avatar {
  width: 100%;
  max-width: 100%;
}

.avatar {
  display: block;
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 300px;
  object-fit: contain;
  box-sizing: border-box;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  background: #f5f0e6;
}

.avatar.has-avatar-ring,
#userMenuAvatar.has-avatar-ring,
.user-menu-toggle .user-avatar.has-avatar-ring {
  outline-width: 3px;
  outline-style: solid;
  outline-offset: 2px;
}

.avatar[data-avatar-ring-season="spring"],
#userMenuAvatar[data-avatar-ring-season="spring"],
.user-menu-toggle .user-avatar[data-avatar-ring-season="spring"] {
  outline-color: #67c58d;
}

.avatar[data-avatar-ring-season="summer"],
#userMenuAvatar[data-avatar-ring-season="summer"],
.user-menu-toggle .user-avatar[data-avatar-ring-season="summer"] {
  outline-color: #ef9452;
}

.avatar[data-avatar-ring-season="fall"],
#userMenuAvatar[data-avatar-ring-season="fall"],
.user-menu-toggle .user-avatar[data-avatar-ring-season="fall"] {
  outline-color: #d5a35f;
}

.avatar[data-avatar-ring-season="winter"],
#userMenuAvatar[data-avatar-ring-season="winter"],
.user-menu-toggle .user-avatar[data-avatar-ring-season="winter"] {
  outline-color: #7db2ff;
}

.profile-identity {
  min-width: 0;
  flex: 1 1 240px;
  display: grid;
  gap: 6px;
}

.profile-identity-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220, 231, 247, 0.72);
}

.profile-identity-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-identity-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.profile-identity-badge,
.profile-avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 244, 255, 0.92);
  background: rgba(73, 100, 138, 0.34);
  border: 1px solid rgba(126, 160, 214, 0.32);
}

.profile-avatar-badge {
  max-width: min(100%, 200px);
  white-space: nowrap;
}

.profile-identity-badge[data-season="spring"],
.profile-avatar-badge[data-season="spring"] {
  background: rgba(66, 114, 84, 0.42);
  border-color: rgba(113, 214, 152, 0.34);
}

.profile-identity-badge[data-season="summer"],
.profile-avatar-badge[data-season="summer"] {
  background: rgba(120, 64, 28, 0.42);
  border-color: rgba(243, 158, 82, 0.34);
}

.profile-identity-badge[data-season="fall"],
.profile-avatar-badge[data-season="fall"] {
  background: rgba(102, 73, 34, 0.42);
  border-color: rgba(223, 172, 97, 0.34);
}

.profile-identity-badge[data-season="winter"],
.profile-avatar-badge[data-season="winter"] {
  background: rgba(36, 59, 93, 0.42);
  border-color: rgba(126, 176, 255, 0.34);
}

.profile-identity-level {
  font-size: 15px;
  font-weight: 700;
  color: rgba(221, 230, 244, 0.9);
}

.profile-identity-rank {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(221, 230, 244, 0.78);
}

.profile-identity-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(221, 230, 244, 0.9);
}

.profile-identity-vitals {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
  color: rgba(221, 230, 244, 0.9);
}

.profile-identity-vitals span {
  white-space: nowrap;
}

.profile-identity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(205, 218, 238, 0.76);
}

.profile-identity-meta span {
  padding: 4px 8px;
  border: 1px solid rgba(126, 160, 214, 0.2);
  background: rgba(17, 27, 41, 0.38);
}

.program-title,
.dm-list-name,
.dm-window-title-text,
.dm-chip .title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cosmetic-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-flair-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: rgba(231, 239, 252, 0.92);
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1;
}

.chat-flair-chip.is-compact {
  font-size: 10px;
}

.profile-cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.profile-trophy-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.profile-view-bio,
.profile-bio-render.is-editor-preview {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(10, 16, 25, 0.52);
  min-height: 140px;
}

.profile-bio-render {
  color: rgba(226, 235, 248, 0.92);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.profile-bio-render.is-empty {
  display: flex;
  align-items: center;
}

.profile-bio-render > :first-child {
  margin-top: 0;
}

.profile-bio-render > :last-child {
  margin-bottom: 0;
}

.profile-bio-render a {
  color: #8fc2ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-bio-render img {
  display: block;
  max-width: 100%;
  height: auto;
}

.profile-bio-render pre,
.profile-bio-render code,
.profile-bio-render blockquote {
  background: rgba(12, 20, 31, 0.62);
  border: 1px solid rgba(99, 130, 173, 0.16);
}

.profile-bio-render pre {
  padding: 12px 14px;
  overflow-x: auto;
}

.profile-bio-render code {
  padding: 1px 6px;
}

.profile-bio-render blockquote {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(126, 160, 214, 0.34);
}

.profile-bio-empty {
  color: var(--muted);
}

.profile-report-target {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(10, 16, 25, 0.42);
}

.profile-report-target-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-report-target-avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-report-target-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-report-target-title {
  font-weight: 700;
  color: var(--ink);
}

.profile-report-target-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-report-form {
  align-items: end;
}

.bounty-board-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(10, 16, 25, 0.42);
}

.bounty-board-card.is-owned {
  border-color: rgba(122, 169, 113, 0.22);
  background:
    radial-gradient(circle at top right, rgba(98, 152, 89, 0.08), transparent 34%),
    rgba(10, 16, 25, 0.42);
}

.bounty-board-card.is-shielded {
  border-color: rgba(106, 157, 217, 0.26);
  background:
    radial-gradient(circle at top right, rgba(88, 138, 214, 0.11), transparent 36%),
    rgba(10, 16, 25, 0.46);
}

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

.bounty-board-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bounty-board-title {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.bounty-board-title:hover,
.bounty-board-title:focus-visible {
  color: #8fc2ff;
}

.bounty-board-meta,
.bounty-board-footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bounty-board-amount {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.bounty-board-reason {
  color: rgba(226, 235, 248, 0.9);
  line-height: 1.55;
}

.bounty-board-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 12px 0 16px;
}

.bounty-board-overview {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.bounty-summary-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.bounty-defense-deck {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.4fr);
  gap: 12px;
  align-items: stretch;
}

.bounty-exposure-panel,
.bounty-defense-panel,
.bounty-board-secondary-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(9, 15, 24, 0.34);
}

.bounty-exposure-panel .section-title,
.bounty-defense-panel .section-title,
.bounty-board-secondary-panel .section-title {
  margin-top: 0;
}

.bounty-defense-info {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.bounty-defense-summary-note {
  grid-column: 1 / -1;
  margin-top: 0;
  line-height: 1.45;
}

.bounty-defense-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.bounty-defense-options .bounty-defense-option {
  min-height: 132px;
  max-width: 360px;
}

.bounty-board-secondary {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.35fr);
  gap: 12px;
  margin-top: 12px;
}

.bounty-board-secondary #bountyExposureHistoryList {
  min-height: 0;
}

.bounty-hunter-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.stat-help-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  color: #9fb8d8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  cursor: help;
  flex: 0 0 auto;
}

.stat-help-glyph:hover,
.stat-help-glyph:focus-visible {
  color: #e8f3ff;
  border-color: rgba(151, 196, 255, 0.62);
  outline: none;
}

body.light-mode .stat-help-glyph {
  color: #476987;
}

body.light-mode .stat-help-glyph:hover,
body.light-mode .stat-help-glyph:focus-visible {
  color: #1f4265;
  border-color: rgba(54, 96, 138, 0.52);
}

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

.section-inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.section-inline-control select {
  min-width: 120px;
}

.bounty-warning-note {
  color: #f7c07a;
}

#homeBountyDefenseSection,
#homePollPromptSection,
#bountyDefenseInfo {
  display: grid;
  gap: 8px;
}

#testingPollsActive,
#testingPollsHistory,
#testingPollConsole,
#testingPollManagers {
  display: grid;
  gap: 12px;
}

#testingPollConsole .program form,
#testingPollManagers .program form {
  margin-top: 8px;
}

.poll-discord-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(97, 126, 166, 0.22);
  background:
    linear-gradient(180deg, rgba(22, 31, 47, 0.9), rgba(14, 20, 31, 0.96)),
    rgba(17, 24, 39, 0.82);
  box-shadow: inset 0 1px 0 rgba(214, 228, 255, 0.04);
}

.poll-discord-card-prompt {
  border-color: rgba(112, 156, 219, 0.28);
}

.poll-discord-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8aa2c3;
  font-weight: 700;
}

.poll-discord-title {
  font-size: 19px;
  line-height: 1.2;
}

.poll-discord-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poll-discord-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(125, 149, 180, 0.18);
}

.poll-discord-badge-muted {
  color: #abc0dc;
  background: rgba(36, 49, 71, 0.72);
}

.poll-discord-badge-accent {
  color: #e8f3ff;
  border-color: rgba(122, 178, 245, 0.32);
  background: rgba(54, 84, 124, 0.76);
}

.poll-discord-badge-success {
  color: #ecfff0;
  border-color: rgba(84, 174, 124, 0.3);
  background: rgba(36, 98, 65, 0.74);
}

.poll-discord-badge-warning {
  color: #fff4db;
  border-color: rgba(206, 160, 82, 0.34);
  background: rgba(112, 77, 28, 0.74);
}

.poll-discord-body {
  color: #d4dfed;
  line-height: 1.55;
  white-space: pre-wrap;
}

.poll-discord-footer {
  color: var(--muted);
  font-size: 13px;
}

.poll-results-wrap {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.poll-results-heading,
.poll-preview-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8aa2c3;
  font-weight: 700;
}

.poll-results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.poll-results-summary-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(19, 28, 42, 0.72);
  border: 1px solid rgba(108, 134, 167, 0.14);
}

.poll-results-summary-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.poll-result-row {
  display: grid;
  gap: 7px;
}

.poll-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.poll-result-label {
  color: #edf4ff;
  font-weight: 600;
}

.poll-result-stats {
  color: #aebfd6;
  font-size: 13px;
}

.poll-result-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 44, 64, 0.86);
  overflow: hidden;
}

.poll-result-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(96, 155, 235, 0.88), rgba(135, 186, 255, 0.95));
}

.poll-vote-form {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.poll-choice-list {
  display: grid;
  gap: 8px;
}

.poll-choice-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(100, 125, 159, 0.18);
  background: rgba(18, 27, 40, 0.74);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.poll-choice-row:hover {
  border-color: rgba(119, 162, 220, 0.28);
  background: rgba(24, 35, 52, 0.86);
}

.poll-choice-row.is-selected {
  border-color: rgba(124, 178, 245, 0.42);
  background: linear-gradient(180deg, rgba(33, 53, 82, 0.92), rgba(23, 36, 56, 0.96));
}

.poll-choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.poll-choice-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(134, 162, 198, 0.5);
  background: rgba(11, 17, 27, 0.84);
  box-sizing: border-box;
}

.poll-choice-row input[type="checkbox"] + .poll-choice-marker {
  border-radius: 6px;
}

.poll-choice-row.is-selected .poll-choice-marker {
  border-color: rgba(144, 196, 255, 0.94);
  background: linear-gradient(180deg, rgba(124, 179, 248, 0.94), rgba(81, 136, 207, 0.94));
  box-shadow: inset 0 0 0 3px rgba(10, 17, 28, 0.88);
}

.poll-choice-text {
  color: #edf4ff;
  font-weight: 600;
  line-height: 1.4;
}

.poll-choice-helper {
  color: var(--muted);
  font-size: 13px;
}

.poll-rating-wrap {
  display: grid;
  gap: 10px;
}

.poll-rating-label {
  color: #d9e6f8;
  font-weight: 600;
}

.poll-rating-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poll-rating-chip {
  min-width: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(23, 34, 49, 0.82);
  border: 1px solid rgba(101, 126, 159, 0.18);
  color: #dce9fb;
  box-shadow: none;
  transform: none;
}

.poll-rating-chip:hover {
  background: rgba(31, 46, 68, 0.92);
  border-color: rgba(127, 171, 230, 0.28);
  box-shadow: none;
  transform: none;
}

.poll-rating-chip.is-selected {
  background: linear-gradient(180deg, rgba(74, 114, 171, 0.92), rgba(53, 84, 130, 0.96));
  border-color: rgba(153, 199, 255, 0.42);
  color: #f7fbff;
}

.poll-rating-chip:disabled {
  opacity: 0.7;
  cursor: default;
}

.poll-vote-actions {
  margin-top: 2px;
}

.poll-preview-admin-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body.light-mode .poll-discord-card {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 243, 250, 0.98)),
    rgba(255, 255, 255, 0.98);
  border-color: rgba(75, 107, 145, 0.14);
}

body.light-mode .poll-discord-eyebrow,
body.light-mode .poll-results-heading,
body.light-mode .poll-preview-label {
  color: #4d6b8d;
}

body.light-mode .poll-discord-body,
body.light-mode .poll-choice-text,
body.light-mode .poll-rating-label,
body.light-mode .poll-result-label {
  color: #213143;
}

body.light-mode .poll-discord-badge-muted {
  color: #49627f;
  background: rgba(224, 233, 244, 0.96);
}

body.light-mode .poll-results-summary-item,
body.light-mode .poll-choice-row,
body.light-mode .poll-rating-chip,
body.light-mode .poll-result-bar {
  background: rgba(230, 237, 246, 0.92);
}

body.light-mode .poll-choice-row.is-selected {
  background: linear-gradient(180deg, rgba(214, 228, 245, 0.98), rgba(202, 220, 239, 0.98));
}

body.light-mode .poll-choice-marker {
  background: rgba(249, 252, 255, 0.98);
}

.testing-console-inline-status {
  margin-top: 8px;
}

.bounty-defense-option {
  display: grid;
  grid-template-rows: auto auto minmax(34px, 1fr) auto;
  gap: 8px;
  padding: 12px;
}

.bounty-defense-option.is-active {
  border-color: rgba(199, 160, 93, 0.32);
  background:
    radial-gradient(circle at top right, rgba(199, 160, 93, 0.12), transparent 36%),
    rgba(10, 16, 25, 0.46);
}

body.light-mode .bounty-exposure-panel,
body.light-mode .bounty-defense-panel,
body.light-mode .bounty-board-secondary-panel {
  background: rgba(242, 247, 252, 0.84);
  border-color: rgba(77, 103, 132, 0.14);
}

body.light-mode .bounty-placement-summary {
  background: rgba(242, 247, 252, 0.84);
}

body.light-mode .bounty-defense-option.is-active {
  border-color: rgba(160, 112, 48, 0.26);
  background:
    radial-gradient(circle at top right, rgba(202, 150, 70, 0.16), transparent 36%),
    rgba(244, 248, 252, 0.92);
}

@media (max-width: 1120px) {
  .bounty-summary-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .bounty-defense-deck,
  .bounty-board-secondary {
    grid-template-columns: 1fr;
  }

  .bounty-defense-options .bounty-defense-option {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .bounty-summary-grid,
  .bounty-defense-info,
  .bounty-hunter-grid,
  .bounty-defense-options {
    grid-template-columns: 1fr;
  }

  .bounty-exposure-panel,
  .bounty-defense-panel,
  .bounty-board-secondary-panel {
    padding: 10px;
  }

  .bounty-defense-options .bounty-defense-option {
    min-height: 0;
  }
}

#homeBountyDefenseSection .actions,
#bountyDefenseInfo + .actions {
  margin-top: 2px;
}

.trade-detail-card,
.trade-history-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(10, 16, 25, 0.42);
}

.trade-history-card.is-selected {
  border-color: rgba(114, 160, 219, 0.36);
  background: rgba(18, 29, 45, 0.58);
}

.trade-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.trade-offer-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(99, 130, 173, 0.14);
  background: rgba(12, 19, 29, 0.44);
}

.trade-offer-panel.is-mine {
  border-color: rgba(114, 160, 219, 0.24);
  background: rgba(16, 27, 41, 0.54);
}

.trade-offer-items {
  display: grid;
  gap: 8px;
}

.item-program-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.item-program-copy {
  min-width: 0;
}

.item-program-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.item-program-thumb:hover,
.item-program-thumb:focus-visible,
.trade-offer-item-icon:hover,
.trade-offer-item-icon:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(114, 160, 219, 0.34);
  outline: none;
}

.item-program-thumb.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(95, 128, 170, 0.18);
  color: rgba(232, 240, 250, 0.92);
  font-size: 15px;
  font-weight: 800;
}

.item-program-thumb-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.trade-offer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 13, 21, 0.44);
}

.trade-offer-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.trade-offer-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.trade-offer-item-icon.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(95, 128, 170, 0.18);
  color: rgba(232, 240, 250, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.trade-offer-item-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.trade-offer-item-copy {
  min-width: 0;
  color: rgba(226, 235, 248, 0.92);
  line-height: 1.45;
}

.trade-offer-item-title {
  font-weight: 700;
  color: var(--ink);
}

.trade-offer-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.trade-item-remove-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-item-remove-form input {
  width: 76px;
}

.trade-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.trade-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.trade-list-toolbar-meta {
  justify-self: end;
  white-space: nowrap;
  align-self: center;
}

.trade-search-results {
  margin-top: 10px;
}

.trade-search-result {
  width: 100%;
}

.trade-search-result.is-selected {
  box-shadow: inset 0 0 0 1px rgba(114, 160, 219, 0.44);
  background: color-mix(in srgb, var(--panel) 82%, var(--accent) 18%);
}

.trade-search-result-copy {
  min-width: 0;
}

.item-studio-results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 14, 24, 0.4);
  border: 1px solid rgba(120, 146, 179, 0.16);
}

.item-studio-editor {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.item-studio-section {
  display: grid;
  gap: 10px;
}

.item-studio-section.is-collapsed {
  gap: 0;
}

.item-studio-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 146, 179, 0.16);
  background: rgba(9, 14, 24, 0.4);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.item-studio-section-toggle:focus-visible,
.item-studio-light-group-toggle:focus-visible {
  outline: 2px solid rgba(121, 185, 240, 0.72);
  outline-offset: 2px;
}

.item-studio-section-label {
  margin: 0;
}

.item-studio-section-indicator,
.item-studio-light-group-indicator {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(225, 234, 246, 0.72);
}

.item-studio-section-body {
  display: grid;
  gap: 10px;
}

.item-studio-section-body[hidden] {
  display: none;
}

.item-studio-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 14, 24, 0.4);
  border: 1px solid rgba(120, 146, 179, 0.16);
}

.item-studio-preset-note {
  min-width: 0;
}

.item-studio-preset-row .program-actions {
  justify-content: flex-end;
}

.item-studio-preset-row select {
  min-width: 140px;
}

.item-studio-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.item-studio-light-groups {
  display: grid;
  gap: 12px;
}

.item-studio-light-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(9, 14, 24, 0.4);
  border: 1px solid rgba(120, 146, 179, 0.16);
}

.item-studio-light-group.is-collapsed {
  gap: 0;
}

.item-studio-light-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.item-studio-light-group-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(225, 234, 246, 0.8);
}

.item-studio-light-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.item-studio-light-group-grid[hidden] {
  display: none;
}

.item-studio-control {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 14, 24, 0.4);
  border: 1px solid rgba(120, 146, 179, 0.16);
}

.item-studio-control.is-text {
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
}

.item-studio-control-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(219, 229, 242, 0.72);
}

.item-studio-control-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 10px;
}

.item-studio-control-inputs input[type="range"] {
  width: 100%;
  margin: 0;
}

.item-studio-control-inputs input[type="number"] {
  width: 100%;
}

.item-studio-control.is-text input[type="text"] {
  width: 100%;
}

.item-studio-control.is-text select {
  width: 100%;
}

.item-studio-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.item-studio-upload-input {
  width: 100%;
}

body.light-mode .trade-search-result.is-selected {
  background: color-mix(in srgb, var(--panel) 90%, var(--accent) 10%);
  box-shadow: inset 0 0 0 1px rgba(59, 98, 139, 0.28);
}

body.light-mode .item-studio-results-meta,
body.light-mode .item-studio-section-toggle,
body.light-mode .item-studio-preset-row,
body.light-mode .item-studio-control,
body.light-mode .item-studio-light-group {
  background: rgba(244, 247, 251, 0.92);
  border-color: rgba(88, 112, 140, 0.18);
}

body.light-mode .item-studio-control-label {
  color: rgba(49, 69, 92, 0.76);
}

body.light-mode .item-studio-light-group-title {
  color: rgba(41, 63, 87, 0.82);
}

body.light-mode .item-studio-section-indicator,
body.light-mode .item-studio-light-group-indicator {
  color: rgba(41, 63, 87, 0.72);
}

@media (max-width: 760px) {
  .item-studio-results-meta {
    align-items: stretch;
  }

  .item-studio-results-meta .program-actions {
    width: 100%;
  }

  .item-studio-results-meta .program-actions button {
    flex: 1 1 0;
  }

  .item-studio-preset-row {
    align-items: stretch;
  }

  .item-studio-preset-row .program-actions {
    width: 100%;
  }

  .item-studio-preset-row .program-actions > * {
    flex: 1 1 0;
  }

  .item-studio-control-grid {
    grid-template-columns: 1fr;
  }

  .item-studio-light-group-grid {
    grid-template-columns: 1fr;
  }

  .item-studio-control.is-text,
  .item-studio-upload-row,
  .item-studio-control-inputs {
    grid-template-columns: 1fr;
  }
}

.trade-edit-grid {
  display: grid;
  gap: 10px;
}

.trade-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 8px;
  align-items: end;
}

.trade-inline-form select,
.trade-inline-form input {
  width: 100%;
}

.trade-receipt-grid {
  display: grid;
  gap: 10px;
}

.trade-receipt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 9, 16, 0.72);
}

.trade-receipt-modal {
  position: relative;
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.trade-receipt-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.item-inspect-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2610;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 9, 16, 0.76);
  overscroll-behavior: contain;
}

html.has-item-inspect-modal,
body.has-item-inspect-modal {
  overflow: hidden;
}

.item-inspect-modal {
  position: relative;
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
}

.item-inspect-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 40px;
}

.item-inspect-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin-right: 52px;
}

.item-inspect-viewer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.item-inspect-viewer-shell.is-admin-editing {
  grid-template-columns: 1fr;
}

.item-inspect-stage {
  --inspect-stage-tint-rgb: 0, 0, 0;
  --inspect-stage-tint-opacity: 0;
  --inspect-stage-tint-soft-opacity: 0;
  --inspect-stage-border: rgba(97, 129, 172, 0.2);
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--inspect-stage-border);
  background:
    radial-gradient(circle at 22% 18%, rgba(96, 158, 214, 0.18), transparent 24%),
    radial-gradient(circle at 78% 16%, rgba(207, 228, 246, 0.1), transparent 26%),
    linear-gradient(90deg, rgba(77, 120, 168, 0.06), rgba(77, 120, 168, 0) 42%),
    linear-gradient(180deg, rgba(20, 31, 47, 0.96), rgba(8, 14, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -90px 120px rgba(3, 7, 13, 0.34),
    0 26px 65px rgba(3, 7, 13, 0.22);
}

.item-inspect-stage[data-background="blueprint"] {
  --inspect-stage-border: rgba(102, 151, 214, 0.28);
  background:
    radial-gradient(circle at 50% 14%, rgba(214, 238, 255, 0.1), transparent 17%),
    radial-gradient(circle at 18% 22%, rgba(92, 156, 219, 0.22), transparent 25%),
    radial-gradient(circle at 82% 18%, rgba(159, 204, 245, 0.12), transparent 21%),
    linear-gradient(
      90deg,
      rgba(87, 133, 182, 0.08),
      rgba(87, 133, 182, 0) 24%,
      rgba(87, 133, 182, 0) 76%,
      rgba(87, 133, 182, 0.06)
    ),
    linear-gradient(180deg, rgba(26, 40, 58, 0.97), rgba(11, 18, 28, 0.98) 56%, rgba(4, 9, 16, 1));
}

.item-inspect-stage[data-background="slate"] {
  --inspect-stage-border: rgba(146, 161, 184, 0.26);
  background:
    radial-gradient(circle at 50% 11%, rgba(255, 255, 255, 0.24), transparent 15%),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.07), transparent 22%),
    linear-gradient(180deg, rgba(74, 84, 99, 0.98), rgba(43, 50, 61, 0.99) 46%, rgba(18, 23, 31, 1)),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0) 14%,
      rgba(255, 255, 255, 0) 86%,
      rgba(255, 255, 255, 0.03)
    );
}

.item-inspect-stage[data-background="blackout"] {
  --inspect-stage-border: rgba(100, 116, 148, 0.2);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 15%),
    radial-gradient(ellipse at 50% 18%, rgba(152, 184, 220, 0.2), rgba(152, 184, 220, 0) 26%),
    radial-gradient(ellipse at 50% 72%, rgba(88, 116, 150, 0.14), rgba(88, 116, 150, 0) 24%),
    radial-gradient(ellipse at 50% 88%, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 40%),
    linear-gradient(180deg, rgba(9, 10, 14, 1), rgba(5, 6, 10, 1) 52%, rgba(1, 2, 5, 1));
}

.item-inspect-stage[data-background="dawn"] {
  --inspect-stage-border: rgba(184, 147, 148, 0.28);
  background:
    radial-gradient(circle at 50% 66%, rgba(255, 228, 180, 0.72), transparent 9%),
    radial-gradient(circle at 50% 66%, rgba(255, 165, 93, 0.42), transparent 18%),
    radial-gradient(circle at 20% 24%, rgba(255, 221, 190, 0.14), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(255, 239, 219, 0.09), transparent 22%),
    linear-gradient(180deg, rgba(157, 120, 140, 0.98), rgba(113, 78, 103, 0.98) 28%, rgba(61, 41, 65, 0.99) 58%, rgba(17, 17, 27, 1)),
    linear-gradient(180deg, rgba(255, 183, 110, 0) 50%, rgba(255, 183, 110, 0.18) 72%, rgba(255, 183, 110, 0) 88%);
}

.item-inspect-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 43px,
      rgba(112, 170, 214, 0.04) 43px,
      rgba(112, 170, 214, 0.04) 44px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 44px,
      rgba(255, 255, 255, 0.03) 44px,
      rgba(255, 255, 255, 0.03) 45px
    ),
    linear-gradient(
      135deg,
      rgba(118, 187, 232, 0.08) 0,
      rgba(118, 187, 232, 0) 20%,
      rgba(118, 187, 232, 0) 80%,
      rgba(118, 187, 232, 0.04) 100%
    );
  pointer-events: none;
}

.item-inspect-stage[data-background="blueprint"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 14%),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(
      180deg,
      transparent 0,
      transparent 66%,
      rgba(149, 202, 245, 0.07) 66%,
      rgba(149, 202, 245, 0.07) 66.4%,
      transparent 66.4%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 39px,
      rgba(112, 170, 214, 0.05) 39px,
      rgba(112, 170, 214, 0.05) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 39px,
      rgba(255, 255, 255, 0.028) 39px,
      rgba(255, 255, 255, 0.028) 40px
    ),
    linear-gradient(
      135deg,
      rgba(118, 187, 232, 0.08) 0,
      rgba(118, 187, 232, 0) 18%,
      rgba(118, 187, 232, 0) 82%,
      rgba(118, 187, 232, 0.05) 100%
    ),
    radial-gradient(circle at 50% 70%, rgba(69, 121, 171, 0.12), rgba(69, 121, 171, 0) 24%);
}

.item-inspect-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 26% 24%,
      rgba(var(--inspect-stage-tint-rgb), var(--inspect-stage-tint-soft-opacity)) 0,
      rgba(var(--inspect-stage-tint-rgb), 0) 42%
    ),
    linear-gradient(
      180deg,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.85)),
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.38))
    );
}

.item-inspect-stage[data-background="blueprint"]::after {
  background:
    radial-gradient(
      ellipse at 50% 72%,
      rgba(121, 185, 240, 0.12) 0,
      rgba(121, 185, 240, 0) 28%
    ),
    linear-gradient(180deg, rgba(8, 14, 22, 0) 50%, rgba(8, 14, 22, 0.22) 100%),
    radial-gradient(
      circle at 26% 24%,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-soft-opacity) * 1.05)) 0,
      rgba(var(--inspect-stage-tint-rgb), 0) 42%
    ),
    linear-gradient(
      180deg,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.88)),
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.36))
    );
}

.item-inspect-stage[data-background="blackout"]::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.04) 9%,
      rgba(255, 255, 255, 0) 26%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.02) 18%,
      rgba(255, 255, 255, 0.02) 82%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse at 50% 18%,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0) 20%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 4px,
      rgba(255, 255, 255, 0.016) 4px,
      rgba(255, 255, 255, 0.016) 5px
    ),
    linear-gradient(162deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0) 22%),
    linear-gradient(198deg, rgba(255, 255, 255, 0.034) 0, rgba(255, 255, 255, 0) 22%),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 60%,
      rgba(0, 0, 0, 0.34) 100%
    );
}

.item-inspect-stage[data-background="slate"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 14%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 57%, rgba(0, 0, 0, 0.22) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 126px,
      rgba(255, 255, 255, 0.07) 126px,
      rgba(255, 255, 255, 0.07) 128px,
      transparent 128px,
      transparent 252px,
      rgba(0, 0, 0, 0.16) 252px,
      rgba(0, 0, 0, 0.16) 254px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 124px,
      rgba(255, 255, 255, 0.028) 124px,
      rgba(255, 255, 255, 0.028) 126px
    ),
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 22%),
    linear-gradient(132deg, rgba(255, 255, 255, 0.06) 0, rgba(255, 255, 255, 0) 22%);
}

.item-inspect-stage[data-background="dawn"]::before {
  background:
    linear-gradient(180deg, rgba(255, 233, 196, 0.18), rgba(255, 233, 196, 0) 24%),
    linear-gradient(
      180deg,
      rgba(255, 196, 128, 0) 52%,
      rgba(255, 196, 128, 0.2) 70%,
      rgba(255, 196, 128, 0) 84%
    ),
    radial-gradient(circle at 50% 68%, rgba(255, 232, 182, 0.34), rgba(255, 232, 182, 0) 10%),
    radial-gradient(ellipse at 22% 100%, rgba(15, 18, 28, 0.48), rgba(15, 18, 28, 0) 28%),
    radial-gradient(ellipse at 78% 100%, rgba(18, 20, 32, 0.42), rgba(18, 20, 32, 0) 26%),
    radial-gradient(ellipse at 50% 102%, rgba(33, 28, 44, 0.38), rgba(33, 28, 44, 0) 22%),
    linear-gradient(
      0deg,
      rgba(17, 15, 24, 0.32) 0,
      rgba(17, 15, 24, 0) 24%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0) 18%,
      rgba(0, 0, 0, 0) 60%,
      rgba(0, 0, 0, 0.12) 100%
    );
}

.item-inspect-stage[data-background="slate"]::after {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.16) 0,
      rgba(0, 0, 0, 0) 8%,
      rgba(0, 0, 0, 0) 92%,
      rgba(0, 0, 0, 0.14) 100%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0) 10%,
      rgba(255, 255, 255, 0) 88%,
      rgba(255, 255, 255, 0.03) 100%
    ),
    radial-gradient(
      ellipse at 50% 14%,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0) 24%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0) 18%,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.12) 100%
    ),
    radial-gradient(
      circle at 82% 16%,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-soft-opacity) * 1.1)) 0,
      rgba(var(--inspect-stage-tint-rgb), 0) 38%
    ),
    linear-gradient(
      180deg,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.72)),
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.28))
    );
}

.item-inspect-stage[data-background="blackout"]::after {
  background:
    radial-gradient(
      ellipse at 50% 18%,
      rgba(255, 255, 255, 0.1) 0,
      rgba(255, 255, 255, 0) 18%
    ),
    radial-gradient(
      circle at 50% 54%,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0) 30%
    ),
    radial-gradient(
      ellipse at 50% 86%,
      rgba(255, 255, 255, 0.07) 0,
      rgba(255, 255, 255, 0) 24%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 68%,
      rgba(0, 0, 0, 0.32) 100%
    ),
    radial-gradient(
      circle at 50% 42%,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-soft-opacity) * 0.95)) 0,
      rgba(var(--inspect-stage-tint-rgb), 0) 34%
    ),
    linear-gradient(
      180deg,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.6)),
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.18))
    );
}

.item-inspect-stage[data-background="dawn"]::after {
  background:
    linear-gradient(
      180deg,
      rgba(255, 227, 182, 0.12),
      rgba(255, 220, 174, 0) 24%
    ),
    radial-gradient(
      circle at 50% 68%,
      rgba(255, 248, 225, 0.08) 0,
      rgba(255, 248, 225, 0) 26%
    ),
    linear-gradient(
      180deg,
      rgba(255, 148, 84, 0) 52%,
      rgba(255, 148, 84, 0.14) 72%,
      rgba(255, 148, 84, 0) 100%
    ),
    linear-gradient(
      0deg,
      rgba(23, 18, 28, 0.28) 0,
      rgba(23, 18, 28, 0) 18%
    ),
    radial-gradient(
      circle at 50% 86%,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-soft-opacity) * 1.05)) 0,
      rgba(var(--inspect-stage-tint-rgb), 0) 34%
    ),
    linear-gradient(
      180deg,
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.66)),
      rgba(var(--inspect-stage-tint-rgb), calc(var(--inspect-stage-tint-opacity) * 0.24))
    );
}

.item-inspect-canvas-host,
.item-inspect-poster {
  position: absolute;
  inset: 0;
}

.item-inspect-canvas-host {
  z-index: 1;
}

.item-inspect-canvas,
.item-inspect-canvas-host canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.item-inspect-poster {
  display: grid;
  place-items: center;
  z-index: 2;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.item-inspect-stage.is-model-ready .item-inspect-poster {
  opacity: 0;
}

.item-inspect-poster-image {
  width: min(54%, 232px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow:
    0 20px 50px rgba(5, 9, 16, 0.42),
    0 0 0 1px rgba(232, 240, 250, 0.08);
}

.item-inspect-poster-fallback {
  width: 180px;
  height: 180px;
  border-radius: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(95, 128, 170, 0.18);
  color: rgba(232, 240, 250, 0.92);
  font-size: 64px;
  font-weight: 800;
  box-shadow:
    0 20px 50px rgba(5, 9, 16, 0.42),
    0 0 0 1px rgba(232, 240, 250, 0.08);
}

.item-inspect-stage-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.item-inspect-stage-status,
.item-inspect-stage-hint {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10, 17, 27, 0.74);
  color: rgba(232, 240, 250, 0.92);
}

.item-inspect-meta-shell {
  display: grid;
  gap: 12px;
  align-content: start;
}

.item-inspect-viewer-shell.is-admin-editing .item-inspect-meta-shell {
  grid-template-columns: 1fr;
}

.item-inspect-admin-editor {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(97, 129, 172, 0.16);
}

.item-studio-color-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-studio-color-inputs input[type="color"] {
  inline-size: 54px;
  block-size: 38px;
  padding: 0;
  border: 1px solid rgba(97, 129, 172, 0.26);
  border-radius: 10px;
  background: transparent;
}

.item-inspect-admin-status {
  min-height: 18px;
}

.item-inspect-eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.item-inspect-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-inspect-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(97, 129, 172, 0.22);
  background: rgba(12, 19, 29, 0.42);
  color: rgba(232, 240, 250, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-inspect-copy {
  color: rgba(228, 235, 246, 0.88);
  line-height: 1.6;
}

.item-inspect-placement {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(10, 17, 27, 0.44);
  border: 1px solid rgba(97, 129, 172, 0.16);
}

@media (max-width: 760px) {
  .trade-create-form,
  .trade-list-toolbar,
  .trade-inline-form,
  .trade-offer-item {
    grid-template-columns: 1fr;
  }

  .trade-list-toolbar-meta {
    justify-self: start;
  }

  .trade-item-remove-form {
    flex-wrap: wrap;
  }

  .item-inspect-viewer-shell {
    grid-template-columns: 1fr;
  }

  .item-inspect-stage {
    min-height: 0;
  }

  .item-inspect-stage-caption {
    flex-direction: column;
    align-items: flex-start;
  }
}

.profile-edit-form {
  display: grid;
  gap: 12px;
}

.profile-edit-controls {
  display: grid;
  gap: 10px;
}

.profile-edit-meta-row,
.profile-edit-toolbar,
.profile-edit-utility-row,
.profile-edit-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-edit-template-picker {
  display: inline-grid;
  gap: 4px;
  min-width: 220px;
}

.profile-edit-meta-row .profile-edit-template-picker {
  flex: 1 1 260px;
}

.profile-edit-template-picker span,
.profile-edit-pane > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-edit-workspace {
  display: grid;
  gap: 12px;
  align-items: start;
}

.profile-edit-workspace[data-view-mode="split"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.profile-edit-workspace[data-view-mode="source"] {
  grid-template-columns: minmax(0, 1fr);
}

.profile-edit-workspace[data-view-mode="source"] .profile-edit-pane-preview {
  display: none;
}

.profile-edit-workspace[data-view-mode="preview"] {
  grid-template-columns: minmax(0, 1fr);
}

.profile-edit-workspace[data-view-mode="preview"] .profile-edit-pane-source {
  display: none;
}

.profile-edit-pane {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-edit-pane-preview .profile-bio-render.is-editor-preview {
  margin-top: 0;
  min-height: 300px;
}

.profile-edit-view-toggle .active {
  border-color: rgba(126, 160, 214, 0.34);
  background: rgba(42, 64, 94, 0.42);
  color: var(--ink);
}

.profile-edit-form textarea {
  min-height: 300px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.55;
  resize: vertical;
}

.profile-trophy-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(99, 130, 173, 0.18);
  background: rgba(11, 17, 27, 0.52);
}

.profile-trophy-card[data-season="spring"] {
  border-color: rgba(103, 197, 141, 0.24);
}

.profile-trophy-card[data-season="summer"] {
  border-color: rgba(239, 148, 82, 0.24);
}

.profile-trophy-card[data-season="fall"] {
  border-color: rgba(213, 163, 95, 0.24);
}

.profile-trophy-card[data-season="winter"] {
  border-color: rgba(125, 178, 255, 0.24);
}

.profile-trophy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(126, 160, 214, 0.22);
  background: rgba(18, 28, 42, 0.56);
  font-size: 20px;
}

.profile-trophy-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-trophy-title {
  font-weight: 700;
  color: var(--ink);
}

.profile-trophy-meta,
.profile-trophy-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.profile-cosmetic-slot {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(99, 130, 173, 0.18);
  background: rgba(11, 17, 27, 0.52);
}

.profile-cosmetic-slot-head,
.profile-cosmetic-slot-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-cosmetic-slot-title-wrap {
  display: grid;
  gap: 3px;
}

.profile-cosmetic-slot-title {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-cosmetic-slot-current {
  color: var(--muted);
  font-size: 12px;
}

.profile-cosmetic-option-grid {
  display: grid;
  gap: 8px;
}

.profile-cosmetic-option-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 104px;
  padding: 10px;
  border: 1px solid rgba(99, 130, 173, 0.16);
  background: rgba(15, 23, 34, 0.64);
  text-align: left;
}

.profile-cosmetic-option-card:hover:not(:disabled),
.profile-cosmetic-option-card:focus-visible {
  border-color: rgba(126, 160, 214, 0.3);
  background: rgba(18, 28, 42, 0.76);
}

.profile-cosmetic-option-card.is-equipped {
  border-color: rgba(113, 214, 152, 0.32);
  background: rgba(19, 35, 28, 0.54);
}

.profile-cosmetic-option-card:disabled {
  opacity: 1;
}

.profile-cosmetic-option-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.profile-cosmetic-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(126, 160, 214, 0.22);
  background: rgba(18, 28, 42, 0.56);
  font-size: 18px;
}

.profile-cosmetic-option-state {
  padding: 4px 7px;
  border: 1px solid rgba(126, 160, 214, 0.18);
  background: rgba(18, 28, 42, 0.4);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-cosmetic-option-card.is-equipped .profile-cosmetic-option-state {
  border-color: rgba(113, 214, 152, 0.26);
  background: rgba(24, 51, 35, 0.62);
  color: rgba(210, 242, 220, 0.92);
}

.profile-cosmetic-option-name {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.profile-cosmetic-option-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.account-profile-grid {
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.account-profile-card {
  grid-column: 1;
}

.account-avatar-card {
  grid-column: 2;
}

.account-cosmetics-card {
  grid-column: 1;
}

.account-profile-page-card {
  grid-column: 1;
}

.account-ledger-card {
  grid-column: 2;
}

.account-auth-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.account-lookup-grid .profile-header,
.account-profile-card .profile-header {
  align-items: flex-start;
}

.account-avatar-card .card-head,
.account-cosmetics-card .card-head,
.account-ledger-card .card-head {
  margin-bottom: 4px;
}

.account-cosmetics-card .section-title:first-of-type,
.account-ledger-card .section-title:first-of-type {
  margin-top: 0;
}

.account-profile-card,
.account-avatar-card,
.account-cosmetics-card,
.account-ledger-card {
  grid-column: auto;
}

@media (max-width: 720px) {
  .profile-cosmetics-grid,
  .profile-trophy-shelf {
    grid-template-columns: 1fr;
  }

  .profile-edit-workspace[data-view-mode="split"] {
    grid-template-columns: 1fr;
  }

  .profile-header {
    align-items: flex-start;
  }

  .profile-actions {
    margin-left: 0;
  }
}

.intermission-event-progress {
  margin-top: 4px;
}

.intermission-event-last-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(99, 130, 173, 0.18);
  background: rgba(12, 18, 28, 0.54);
}

.intermission-event-last-result-title {
  font-weight: 700;
  color: var(--ink);
}

.intermission-event-last-result-flavor {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.avatar.hidden {
  display: none;
}

.avatar-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 12px;
  border: 1px dashed rgba(230, 237, 245, 0.2);
  border-radius: 14px;
  background: var(--panel);
  margin-bottom: 16px;
  align-items: center;
}

.avatar-preview-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 200px));
  gap: 12px;
  align-self: start;
}

.avatar-preview-pane {
  display: grid;
  gap: 8px;
  align-content: start;
}

.avatar-preview-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.avatar-preview.hidden {
  display: none;
}

.avatar-preview-frame {
  position: relative;
  width: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.avatar-preview-frame-profile {
  width: 200px;
  height: 160px;
  aspect-ratio: auto;
  cursor: default;
  touch-action: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.avatar-preview-frame.dragging {
  cursor: grabbing;
}

.avatar-preview-frame img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  object-fit: cover;
  transform-origin: top left;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.avatar-preview-frame-profile img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: none;
  transform-origin: center center;
  will-change: auto;
}

.crop-overlay {
  position: absolute;
  border: 2px solid rgba(79, 122, 166, 0.7);
  border-radius: 8px;
  pointer-events: auto;
  inset: 0;
  box-shadow: 0 0 0 999px rgba(6, 10, 16, 0.45);
  transition: all 0.1s ease;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.12)
    ),
    linear-gradient(
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.12)
    );
  background-size: 100% 1px, 1px 100%;
  background-position: 50% 0, 0 50%;
  background-repeat: no-repeat;
}

.avatar-preview-details {
  display: grid;
  gap: 10px;
}

@media (max-width: 760px) {
  .avatar-preview {
    grid-template-columns: 1fr;
  }

  .avatar-preview-media {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.avatar-gallery {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.avatar-clickable {
  cursor: pointer;
}

.avatar-card-media {
  display: block;
}

.avatar-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}

.avatar-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

#avatarStudioControls.hidden {
  display: none;
}

.avatar-card .badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.avatar-card .badge.active {
  color: #cfe6ff;
}

.avatar-card .actions {
  gap: 6px;
}

.warning {
  border: 1px solid rgba(176, 65, 45, 0.5);
  background: rgba(90, 32, 24, 0.6);
  color: #f3b3a8;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.warning.hidden {
  display: none;
}

.hidden {
  display: none;
}

.confirm {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.confirm.hidden {
  display: none;
}

.crop-controls {
  display: grid;
  gap: 10px;
}

.crop-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.crop-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.crop-controls .actions {
  justify-content: flex-start;
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: auto;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.view[data-route="ledger"] .actions,
.view[data-route="log"] .actions {
  margin-top: 10px;
}

.helper {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 16px;
}

#gymStatus.helper {
  margin-top: 10px;
  margin-bottom: 0;
}

.card-head .helper.card-head-inline {
  margin-top: 0;
  margin-bottom: 0;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.policy-copy {
  display: grid;
  gap: 8px;
}

.policy-copy p,
.policy-copy ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.policy-copy ul {
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.policy-copy li::marker {
  color: var(--accent);
}

.view[data-route="account"] #accountLoginBannerGrid {
  display: none;
  margin-bottom: 0;
}

.view[data-route="account"].account-auth-only #accountLoginBannerGrid {
  display: grid;
  margin-bottom: 18px;
}

.auth-banner {
  position: relative;
  isolation: isolate;
  --auth-snow-cursor-shift-x: 0px;
  --auth-snow-wind-x: 0px;
  --auth-city-haze: rgba(8, 14, 22, 0.38);
  --auth-city-haze-soft: rgba(8, 14, 22, 0.08);
  --auth-city-far: rgba(13, 21, 31, 0.58);
  --auth-city-near: rgba(10, 17, 26, 0.84);
  --auth-city-detail: rgba(6, 11, 18, 0.92);
  padding: 18px 20px;
  background:
    linear-gradient(
      135deg,
      rgba(79, 122, 166, 0.22),
      rgba(79, 122, 166, 0.08) 45%,
      rgba(214, 162, 78, 0.09)
    ),
    var(--card);
  box-shadow: var(--shadow);
  border-top: 2px solid rgba(79, 122, 166, 0.5);
  border-bottom: 1px solid rgba(230, 237, 245, 0.06);
  overflow: hidden;
}

body.light-mode .auth-banner {
  --auth-city-haze: rgba(31, 42, 56, 0.2);
  --auth-city-haze-soft: rgba(31, 42, 56, 0.04);
  --auth-city-far: rgba(31, 42, 56, 0.28);
  --auth-city-near: rgba(31, 42, 56, 0.5);
  --auth-city-detail: rgba(31, 42, 56, 0.62);
}

.auth-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(
      120% 100% at 50% 0%,
      rgba(126, 184, 255, 0.08),
      transparent 58%
    ),
    linear-gradient(
      to top,
      var(--auth-city-haze),
      var(--auth-city-haze-soft) 42%,
      transparent 72%
    );
}

.auth-banner-cityscapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image: url("/login-banner-city.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center var(--auth-banner-cityscapes-y, 4%);
  filter: brightness(0.72) saturate(0.95) contrast(1.05);
}

.auth-banner-cityscapes::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(
      to top,
      rgba(6, 11, 18, 0.34),
      rgba(6, 11, 18, 0.1) 38%,
      transparent 72%
    ),
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.03),
      transparent 20%,
      transparent 80%,
      rgba(255, 255, 255, 0.02)
    );
}

body.light-mode .auth-banner-cityscapes::after {
  background:
    linear-gradient(
      to top,
      rgba(31, 42, 56, 0.14),
      rgba(31, 42, 56, 0.05) 38%,
      transparent 72%
    ),
    linear-gradient(
      to right,
      rgba(31, 42, 56, 0.02),
      transparent 20%,
      transparent 80%,
      rgba(31, 42, 56, 0.015)
    );
}

.auth-banner-cityscape {
  display: none;
  position: absolute;
  inset: auto -2px 0 -2px;
  height: var(--auth-cityscape-height);
  z-index: var(--auth-cityscape-z, 1);
  background-image: url("/cityskylines.svg");
  background-repeat: repeat-x;
  background-size: var(--auth-cityscape-size) var(--auth-cityscape-size);
  background-position-x: var(--auth-cityscape-start-x, 0px);
  background-position-y: calc(
    var(--auth-cityscape-height) -
      (var(--auth-cityscape-size) * var(--auth-cityscape-baseline-ratio))
  );
  opacity: var(--auth-cityscape-opacity, 0.7);
  mix-blend-mode: multiply;
  filter: saturate(0) contrast(1.02);
  will-change: background-position-x;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 78%, transparent 100%);
}

body.light-mode .auth-banner-cityscape {
  opacity: 0.34;
}

body.light-mode .auth-banner-cityscapes {
  filter: brightness(0.9) saturate(0.8) contrast(1.03);
}

.auth-banner-cityscape--far {
  --auth-cityscape-size: 860px;
  --auth-cityscape-height: 22px;
  --auth-cityscape-baseline-ratio: 0.3588091423;
  --auth-cityscape-start-x: 0px;
  --auth-cityscape-opacity: 0.58;
  --auth-cityscape-z: 1;
  animation: authCityscapeDriftLeft 150s linear infinite;
}

.auth-banner-cityscape--mid {
  --auth-cityscape-size: 720px;
  --auth-cityscape-height: 29px;
  --auth-cityscape-baseline-ratio: 0.6349443921;
  --auth-cityscape-start-x: -42px;
  --auth-cityscape-opacity: 0.7;
  --auth-cityscape-z: 2;
  animation: authCityscapeDriftRight 118s linear infinite;
}

.auth-banner-cityscape--near {
  --auth-cityscape-size: 620px;
  --auth-cityscape-height: 36px;
  --auth-cityscape-baseline-ratio: 0.9383925542;
  --auth-cityscape-start-x: -120px;
  --auth-cityscape-opacity: 0.82;
  --auth-cityscape-z: 3;
  animation: authCityscapeDriftLeft 86s linear infinite;
}

.auth-banner-snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(var(--auth-snow-wind-x), 0px, 0);
  will-change: transform;
}

.auth-banner-snowflake {
  position: absolute;
  top: -18px;
  left: 0;
  width: auto;
  height: auto;
  color: rgba(230, 237, 245, 0.78);
  font-size: calc(var(--flake-size, 3px) * 4);
  line-height: 1;
  text-shadow: 0 0 6px rgba(180, 214, 255, 0.2);
  opacity: 0;
  animation: authSnowFall 8s linear infinite;
  animation-delay: var(--flake-delay, 0s);
}

.auth-banner-snowflake::before {
  content: attr(data-flake);
}

body.light-mode .auth-banner-snowflake {
  color: rgba(230, 237, 245, 0.78);
  text-shadow: 0 0 6px rgba(180, 214, 255, 0.2);
}

.auth-banner-snowflake:nth-child(1) {
  left: 4%;
  --flake-size: 2px;
  --flake-drift: -10px;
  --flake-dur: 8.5s;
  --flake-delay: -1.2s;
}

.auth-banner-snowflake:nth-child(2) {
  left: 11%;
  --flake-size: 3px;
  --flake-drift: 14px;
  --flake-dur: 6.8s;
  --flake-delay: -4.1s;
}

.auth-banner-snowflake:nth-child(3) {
  left: 18%;
  --flake-size: 2px;
  --flake-drift: 8px;
  --flake-dur: 9.3s;
  --flake-delay: -2.4s;
}

.auth-banner-snowflake:nth-child(4) {
  left: 27%;
  --flake-size: 4px;
  --flake-drift: -12px;
  --flake-dur: 7.2s;
  --flake-delay: -5.6s;
}

.auth-banner-snowflake:nth-child(5) {
  left: 35%;
  --flake-size: 3px;
  --flake-drift: 16px;
  --flake-dur: 8.1s;
  --flake-delay: -3.8s;
}

.auth-banner-snowflake:nth-child(6) {
  left: 43%;
  --flake-size: 2px;
  --flake-drift: -8px;
  --flake-dur: 6.6s;
  --flake-delay: -0.7s;
}

.auth-banner-snowflake:nth-child(7) {
  left: 52%;
  --flake-size: 4px;
  --flake-drift: 10px;
  --flake-dur: 8.9s;
  --flake-delay: -6.3s;
}

.auth-banner-snowflake:nth-child(8) {
  left: 61%;
  --flake-size: 3px;
  --flake-drift: -14px;
  --flake-dur: 7.4s;
  --flake-delay: -2.1s;
}

.auth-banner-snowflake:nth-child(9) {
  left: 70%;
  --flake-size: 2px;
  --flake-drift: 12px;
  --flake-dur: 9.8s;
  --flake-delay: -7.7s;
}

.auth-banner-snowflake:nth-child(10) {
  left: 79%;
  --flake-size: 3px;
  --flake-drift: -9px;
  --flake-dur: 6.9s;
  --flake-delay: -3.3s;
}

.auth-banner-snowflake:nth-child(11) {
  left: 88%;
  --flake-size: 4px;
  --flake-drift: 7px;
  --flake-dur: 8.7s;
  --flake-delay: -5s;
}

.auth-banner-snowflake:nth-child(12) {
  left: 95%;
  --flake-size: 2px;
  --flake-drift: -6px;
  --flake-dur: 7.7s;
  --flake-delay: -1.8s;
}

.auth-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(
    120deg,
    transparent 0%,
    rgba(230, 237, 245, 0.06) 48%,
    transparent 58%
  );
  opacity: 0.7;
}

.auth-banner-kicker {
  position: relative;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(230, 237, 245, 0.82);
  text-shadow: 0 1px 2px rgba(8, 14, 22, 0.6);
}

.auth-banner-title {
  position: relative;
  z-index: 2;
  margin-top: 4px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  letter-spacing: 0.22em;
  font-weight: 800;
  color: #eef5ff;
  text-shadow: 0 2px 12px rgba(8, 14, 22, 0.55);
}

.auth-banner-subtitle {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(230, 237, 245, 0.88);
  text-shadow: 0 1px 2px rgba(8, 14, 22, 0.55);
}

@keyframes authSnowFall {
  0% {
    opacity: 0;
    transform: translate3d(
      calc(
        var(--auth-snow-cursor-shift-x, 0px) *
          var(--flake-cursor-multiplier, 1)
      ),
      -16px,
      0
    );
  }
  8% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(
      calc(
        var(--flake-drift, 0px) +
          (var(--auth-snow-cursor-shift-x, 0px) * var(--flake-cursor-multiplier, 1))
      ),
      124px,
      0
    );
  }
}

@keyframes authCityscapeDriftLeft {
  from {
    background-position-x: var(--auth-cityscape-start-x, 0px);
  }
  to {
    background-position-x: calc(
      var(--auth-cityscape-start-x, 0px) - var(--auth-cityscape-size)
    );
  }
}

@keyframes authCityscapeDriftRight {
  from {
    background-position-x: var(--auth-cityscape-start-x, 0px);
  }
  to {
    background-position-x: calc(
      var(--auth-cityscape-start-x, 0px) + var(--auth-cityscape-size)
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-banner-cityscape {
    animation: none;
  }
}

.view[data-route="account"].account-auth-only #accountAuthGrid {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .account-auth-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

#notificationList,
#chatFeed,
#dmList,
#dmThreadFeed {
  max-height: 360px;
  overflow-y: auto;
}

#dmThreadCard {
  display: none;
}

#dmThreadCard.collapsed #dmThreadFeed,
#dmThreadCard.collapsed #dmThreadForm,
#dmThreadCard.collapsed #dmThreadStatus {
  display: none;
}

#dmThreadForm {
  margin-top: 8px;
}

/* Flatten UI corners globally, but keep the user menu + chat/DM dock/windows rounded. */
body *:not(#userMenuToggle):not(#userMenuToggle *):not(#userMenu):not(#userMenu *):not(.chat-dock):not(.chat-dock *):not(.dock-panel-row):not(.dock-panel-row *):not(.dm-window-stack):not(.dm-window-stack *):not(#dmThreadCard):not(#dmThreadCard *):not(.card):not(.topbar-search-result-dot) {
  border-radius: 0 !important;
}

#userMenuToggle {
  border-radius: 999px !important;
  overflow: hidden;
}

#userMenuAvatar,
.user-menu-toggle .user-avatar {
  border-radius: 50% !important;
}

/* DM list items */
.dm-list-item {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.dm-list-item:last-child {
  border-bottom: none;
}

.dm-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-sizing: border-box;
  flex: 0 0 auto;
  overflow: hidden;
}

.dm-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dm-list-avatar.status-active {
  border-color: #3fb950;
}
.dm-list-avatar.status-idle {
  border-color: #d6a24e;
}
.dm-list-avatar.status-offline {
  border-color: #4a5565;
}

.dm-list-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dm-list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.dm-list-name {
  font-weight: 700;
}

.dm-list-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dm-list-preview {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat dock */
.chat-dock {
  position: fixed;
  right: 12px;
  left: auto;
  bottom: 0;
  display: inline-flex;
  width: auto;
  max-width: calc(100vw - 24px);
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  z-index: 1200;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  contain: layout style;
}

.dock-btn {
  position: relative;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  color: var(--ink);
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.dock-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dock-btn-icon {
  width: 44px;
  justify-content: center;
  padding: 0;
  font-size: 28px;
}

.dock-unread-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(124, 197, 84, 0.45);
  background: linear-gradient(180deg, #8fd657, #61b72d);
  color: #f7fff2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.dock-unread-badge.hidden {
  display: none !important;
}

.dock-btn:hover,
.dock-btn:focus-visible {
  transform: none;
  box-shadow: none;
  background: rgba(79, 122, 166, 0.16);
  border-color: rgba(79, 122, 166, 0.34);
}

.dock-btn.is-left {
  opacity: 0.76;
}

.dock-btn.is-muted {
  border-color: rgba(214, 162, 78, 0.34);
}

#dockChatToggle {
  order: 2;
}

#dockDMToggle {
  order: 3;
}

#dockSettingsToggle {
  order: 4;
}

#dockSettingsToggle {
  overflow: hidden;
}

.dock-settings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 28px;
  line-height: 1;
  transition: transform 180ms ease;
}

#dockSettingsToggle.is-open .dock-settings-icon {
  transform: rotate(90deg);
}

.dm-chip-row {
  order: 1;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dock-panel-row {
  position: fixed;
  right: 12px;
  left: auto;
  bottom: var(--chat-dock-offset);
  width: auto;
  max-width: calc(100vw - 24px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  z-index: 2200;
  pointer-events: none;
  contain: layout style;
}

.dock-panel {
  position: relative;
  width: min(var(--chat-dock-panel-width), calc(100vw - 24px));
  max-height: 70vh;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  pointer-events: auto;
  flex-shrink: 0;
}

.dock-panel.open {
  display: flex;
}

.dock-panel-row > * {
  pointer-events: auto;
  flex-shrink: 0;
}

#dockDMPanel {
  order: 3;
}

#dockChatPanel {
  order: 2;
  height: min(var(--chat-dock-panel-height), calc(100vh - var(--chat-dock-offset) - 16px));
}

#dockSettingsPanel {
  order: 4;
  width: min(340px, calc(100vw - 24px));
  overflow: hidden;
  min-height: 0;
}

.dm-window-stack {
  order: 1;
}

.dock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.dock-head-menu-anchor {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.dock-head-title-button {
  padding: 0;
  border-radius: 0;
  gap: 8px;
}

.dock-head-channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.dock-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.dock-actions .small {
  padding: 6px 8px;
  height: 28px;
}

.dock-feed {
  padding: 10px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 2px;
}

#dockChatFeed.is-bottom-fill {
  justify-content: flex-end;
}

.chat-settings-shell {
  display: grid;
  gap: 14px;
  padding: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-size-grid {
  display: grid;
  gap: 10px;
}

.chat-size-control {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.chat-size-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.chat-size-inputs input[type="number"] {
  width: 100%;
}

.chat-settings-group {
  display: grid;
  gap: 10px;
}

#dockSettingsPanel .sort-control {
  max-width: none;
}

.chat-settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}

.chat-settings-toggle input {
  margin: 0;
}

.chat-settings-row {
  display: grid;
  gap: 8px;
}

.chat-channel-list {
  display: grid;
  gap: 8px;
}

.chat-channel-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(93, 122, 163, 0.16);
  background: rgba(13, 21, 33, 0.66);
}

.chat-channel-card.is-active {
  border-color: rgba(108, 158, 232, 0.28);
  background: rgba(17, 27, 41, 0.82);
}

.chat-channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-channel-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.chat-channel-card-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fd657, #61b72d);
  color: #f7fff2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.chat-channel-card-meta,
.chat-channel-card-state {
  font-size: 12px;
  color: var(--muted);
}

.chat-channel-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-channel-card-actions .small {
  padding: 6px 8px;
  height: 28px;
}

.dock-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.dock-form input {
  flex: 1;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.dock-form button {
  padding: 10px 12px;
}

.dock-message {
  padding: 6px 8px;
  background: var(--panel);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-message-item {
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(14, 22, 34, 0.72);
  border: 1px solid rgba(93, 122, 163, 0.12);
}

.chat-message-shell {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.chat-message-item.is-compact {
  padding: 4px 7px;
}

.chat-message-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.chat-message-line.is-avatar-hidden {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.chat-message-content {
  min-width: 0;
}

.chat-message-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(126, 160, 214, 0.2);
  background: rgba(17, 27, 41, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: rgba(233, 240, 252, 0.92);
}

.chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-message-item.is-compact .chat-message-avatar {
  width: 16px;
  height: 16px;
}

.chat-message-inline {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(231, 239, 252, 0.94);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.chat-message-name .cosmetic-name-text {
  font-weight: 800;
}

.chat-message-separator {
  margin-left: 1px;
  color: rgba(231, 239, 252, 0.94);
}

.chat-message-body {
  margin-left: 4px;
  color: inherit;
}

.chat-message-item.is-compact .chat-message-inline {
  font-size: 12px;
}

.dm-conversation-item {
  display: flex;
  width: 100%;
  border-radius: 6px;
}

.dm-conversation-line {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
}

.dm-conversation-item.is-theirs .dm-conversation-line {
  justify-content: flex-start;
}

.dm-conversation-item.is-mine .dm-conversation-line {
  justify-content: flex-end;
}

.dm-conversation-avatar {
  flex: 0 0 auto;
}

.dm-conversation-bubble {
  position: relative;
  max-width: min(82%, 100%);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(22, 34, 50, 0.98);
  color: rgba(231, 239, 252, 0.94);
  line-height: 1.4;
  word-break: break-word;
}

.dm-conversation-bubble::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.dm-conversation-item.is-theirs .dm-conversation-bubble::after {
  left: -6px;
  border-right: 6px solid rgba(22, 34, 50, 0.98);
}

.dm-conversation-item.is-mine .dm-conversation-bubble {
  background: rgba(56, 84, 124, 0.96);
  color: rgba(244, 248, 255, 0.96);
}

.dm-conversation-item.is-mine .dm-conversation-bubble::after {
  right: -6px;
  border-left: 6px solid rgba(56, 84, 124, 0.96);
}

.dm-conversation-inline {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.dm-conversation-inline .chat-message-name {
  gap: 3px;
}

.dm-conversation-inline .chat-flair-chip,
.dm-conversation-inline .chat-message-separator {
  color: inherit;
}

.dm-conversation-inline .chat-message-separator {
  margin-left: 1px;
  margin-right: 6px;
}

.dm-conversation-inline .chat-message-body {
  color: inherit;
}

.dm-conversation-inline.is-avatar-only .chat-message-body {
  margin-left: 0;
}

.dm-conversation-item.is-compact .dm-conversation-line {
  gap: 8px;
}

.dm-conversation-item.is-compact .dm-conversation-avatar {
  width: 20px;
  height: 20px;
}

.dm-conversation-item.is-compact .dm-conversation-bubble {
  padding: 4px 8px;
}

.dm-conversation-item.is-compact .dm-conversation-inline {
  font-size: 12px;
}

.dm-conversation-item.is-compact .dm-conversation-inline .chat-message-name {
  gap: 2px;
}

.dm-conversation-item.is-compact .dm-conversation-inline .chat-message-body {
  margin-left: 0;
}

.dm-conversation-item.is-compact .dm-conversation-inline .chat-message-separator {
  margin-right: 5px;
}

.dock-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: 260px;
}

.dock-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  max-height: 55vh;
}

.dock-list .dm-list-item {
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
}

.dock-list .dm-list-item:last-child {
  border-bottom: none;
}

.dock-list li {
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.dock-list li:hover,
.dock-list li.active {
  background: var(--panel);
}

.dock-thread {
  display: flex;
  flex-direction: column;
}

.dock-thread-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.dock-thread-feed {
  flex: 1;
}

.dm-window-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 0;
  max-width: 0;
  max-height: 70vh;
  overflow-y: auto;
  transition: opacity 180ms ease, transform 180ms ease;
  opacity: 0;
  transform: translateX(12px);
  z-index: 1;
  pointer-events: none;
  flex-shrink: 0;
}

body.dm-open .dm-window-stack {
  width: var(--dm-col-max);
  max-width: var(--dm-col-max);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.dock-panel-row > * {
  pointer-events: auto;
}

.dm-chip-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.dm-chip {
  position: relative;
  padding: 8px 12px;
  height: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.dm-chip:hover,
.dm-chip:focus-visible {
  transform: none;
  box-shadow: none;
  background: rgba(79, 122, 166, 0.16);
  border-color: rgba(79, 122, 166, 0.34);
}

body.light-mode .dock-btn:hover,
body.light-mode .dock-btn:focus-visible,
body.light-mode .dm-chip:hover,
body.light-mode .dm-chip:focus-visible {
  background: rgba(59, 98, 139, 0.1);
  border-color: rgba(59, 98, 139, 0.28);
}

.dm-chip .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-sizing: border-box;
}

.dm-chip .title {
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-chip .close {
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.dm-chip-unread {
  position: absolute;
  top: -8px;
  right: -8px;
}

.dm-window {
  width: 100%;
  max-width: var(--dm-col-max);
  height: var(--dm-window-height);
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: inline-flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  margin-left: auto;
  z-index: 1410;
  position: relative;
}

.dm-window.collapsed .dm-window-body {
  display: none;
}

.dm-window.collapsed {
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 36px;
  display: flex;
}

.dm-window-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}

.dm-window.collapsed .dm-window-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  height: 36px;
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.dm-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-window-head .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.avatar.status-active {
  border-color: #3fb950;
}
.avatar.status-idle {
  border-color: #d6a24e;
}
.avatar.status-offline {
  border-color: #4a5565;
}

.dm-window-head .title {
  flex: 0 1 auto;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-window-title-anchor {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.dm-window-title-button {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  padding: 3px 10px 3px 4px;
  margin-left: 0;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
  transition: background-color 140ms ease, color 140ms ease;
}

.dm-window-title-button .avatar {
  box-shadow: 0 2px 6px rgba(6, 10, 16, 0.18);
}

body.light-mode .dm-window-title-button .avatar {
  box-shadow: 0 2px 5px rgba(44, 67, 95, 0.14);
}

.dm-window-title-button:hover,
.dm-window-title-button:focus-visible,
.dm-window-title-button[aria-expanded="true"] {
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--panel) 74%, black 26%);
  color: color-mix(in srgb, var(--ink) 82%, var(--accent) 18%);
}

.dm-window-title-button:hover .dm-window-title-caret,
.dm-window-title-button:focus-visible .dm-window-title-caret,
.dm-window-title-button[aria-expanded="true"] .dm-window-title-caret {
  color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
}

body.light-mode .dm-window-title-button:hover,
body.light-mode .dm-window-title-button:focus-visible,
body.light-mode .dm-window-title-button[aria-expanded="true"] {
  background: color-mix(in srgb, var(--panel) 84%, #c4d2e2 16%);
  color: color-mix(in srgb, var(--ink) 88%, var(--accent) 12%);
}

.dm-window-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-window-title-caret {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.dm-window-title-button:focus-visible,
.dm-window-menu-action:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--accent) 60%, white 40%);
  outline-offset: 2px;
}

.dm-window-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 3;
  width: max-content;
  min-width: 210px;
  max-width: min(240px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel) 92%, black 8%);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(6, 10, 16, 0.24);
}

.dm-window-menu.hidden {
  display: none !important;
}

.dm-window-menu-action {
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.dm-window-menu-action:hover {
  transform: none;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: 0 2px 6px rgba(6, 10, 16, 0.12);
}

body.light-mode .dm-window-menu-action:hover {
  transform: none;
  box-shadow: 0 1px 4px rgba(44, 67, 95, 0.12);
}

.dm-window-menu-icon {
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
  opacity: 0.92;
}

.dm-window-menu-label {
  min-width: 0;
}

.dm-window-menu-action.is-danger {
  color: color-mix(in srgb, var(--ink) 86%, #d35b4a 14%);
}

.dm-window-menu-note {
  padding: 6px 10px 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.dm-window-menu-note.is-error {
  color: #d35b4a;
}

.dm-window.is-blocked .dm-window-head {
  background: color-mix(in srgb, var(--card) 84%, #672b25 16%);
}

body.light-mode .dm-window-body {
  background: var(
    --dm-chat-bg,
    radial-gradient(circle at 10% 20%, rgba(93, 126, 168, 0.08), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(118, 145, 184, 0.08), transparent 26%),
    radial-gradient(circle at 30% 70%, rgba(148, 171, 204, 0.09), transparent 28%),
    #f5f8fc
  );
}

body.light-mode .dm-window-form {
  background: rgba(244, 247, 251, 0.94);
}

body.light-mode .dm-window-menu {
  background: color-mix(in srgb, var(--card) 97%, white 3%);
  box-shadow: 0 6px 12px rgba(44, 67, 95, 0.14);
}

body.light-mode .chat-message-item {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(96, 130, 174, 0.14);
}

body.light-mode .chat-message-avatar {
  background: rgba(232, 240, 250, 0.94);
  color: rgba(36, 51, 72, 0.88);
  border-color: rgba(96, 130, 174, 0.18);
}

body.light-mode .chat-message-inline,
body.light-mode .chat-message-separator {
  color: rgba(31, 42, 58, 0.92);
}

body.light-mode .chat-message-body {
  color: rgba(31, 42, 58, 0.92);
}

body.light-mode .dm-conversation-item.is-theirs .dm-conversation-bubble {
  background: rgba(247, 250, 254, 0.96);
  color: rgba(31, 42, 58, 0.94);
}

body.light-mode .dm-conversation-item.is-theirs .dm-conversation-bubble::after {
  border-right-color: rgba(247, 250, 254, 0.96);
}

body.light-mode .dm-conversation-item.is-mine .dm-conversation-bubble {
  background: rgba(97, 132, 173, 0.98);
  color: rgba(247, 251, 255, 0.98);
}

body.light-mode .dm-conversation-item.is-mine .dm-conversation-bubble::after {
  border-left-color: rgba(97, 132, 173, 0.98);
}

body.light-mode .chat-channel-card {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(59, 98, 139, 0.16);
}

body.light-mode .chat-channel-card.is-active {
  background: rgba(242, 247, 252, 0.92);
  border-color: rgba(59, 98, 139, 0.24);
}

body.light-mode .dm-window.is-blocked .dm-window-head {
  background: color-mix(in srgb, var(--card) 88%, #d8a39d 12%);
}

.dm-window-head .close {
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
}

.dm-window.collapsed .dm-window-head .close {
  font-size: 14px;
  line-height: 1;
}

.dm-window-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--dm-chat-bg, radial-gradient(circle at 10% 20%, rgba(80, 80, 90, 0.08), transparent 25%), radial-gradient(circle at 80% 30%, rgba(80, 80, 90, 0.08), transparent 25%), radial-gradient(circle at 30% 70%, rgba(80, 80, 90, 0.08), transparent 25%), #0f141b);
  position: relative;
}
.dm-window.collapsed .dm-window-body {
  display: none;
}

.dm-window-feed {
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.dm-window-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: rgba(10, 14, 20, 0.9);
  flex-shrink: 0;
}

.dm-window-form textarea {
  flex: 1;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  resize: none;
  overflow-y: auto;
  line-height: 1.3;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  white-space: pre-wrap;
}

.dm-window-form textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.dm-window-form button {
  padding: 8px 10px;
}

.dm-window-form .dm-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #182333, #0f1724);
  color: #d5e6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.dm-window-form .dm-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dm-window-form .dm-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #223146, #142032);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

body.light-mode .dm-window-form .dm-send-btn {
  background: linear-gradient(135deg, #f7f9fd, #d9e3ef);
  color: #2d4f73;
  box-shadow: 0 8px 18px rgba(44, 67, 95, 0.16);
}

body.light-mode .dm-window-form .dm-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffffff, #e5edf7);
  box-shadow: 0 12px 22px rgba(44, 67, 95, 0.2);
}

.dm-list-item.is-blocked .dm-list-name {
  color: color-mix(in srgb, var(--ink) 82%, #d35b4a 18%);
}

.dm-list-item.is-blocked .dm-list-preview {
  color: color-mix(in srgb, var(--muted) 78%, #d35b4a 22%);
}

.dm-window-form .dm-send-btn:active {
  transform: translateY(1px);
}

.dm-window-form .dm-send-btn .send-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.bubble {
  max-width: 78%;
  padding: 10px 12px 8px;
  border-radius: 16px;
  position: relative;
  color: #e8f0ff;
  line-height: 1.35;
  font-size: 13px;
}

.bubble.mine {
  margin-left: auto;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 82%, #16314d 18%),
    color-mix(in srgb, var(--accent-dark) 88%, #102237 12%)
  );
  border-bottom-right-radius: 0;
}

.bubble.theirs {
  margin-right: auto;
  background: #222c3a;
  border-bottom-left-radius: 0;
}

body.light-mode .bubble.theirs {
  background: #dde7f2;
  color: #1e2c3e;
}

.skills-view-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.skills-toolbar {
  align-items: end;
}

.skills-tree-shell {
  position: relative;
  min-height: 880px;
  max-height: 82vh;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0)),
    radial-gradient(circle at top left, rgba(96, 137, 188, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(141, 118, 73, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(13, 18, 25, 0.98), rgba(9, 13, 19, 0.98));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.skills-tree-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.skills-tree-viewport {
  position: relative;
  overflow: auto;
  min-height: 700px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(7, 11, 17, 0.84), rgba(10, 14, 20, 0.94));
  cursor: grab;
  overscroll-behavior: contain;
}

.skills-tree-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.skills-tree-canvas {
  position: relative;
  width: 4700px;
  height: 1680px;
  padding: 36px;
  transform-origin: top left;
}

.skills-tier-band {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    linear-gradient(90deg, rgba(255,255,255,0.02), transparent 18%);
}

.skills-tier-label {
  position: absolute;
  left: 22px;
  top: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.skills-branch-lane {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    radial-gradient(circle at top, rgba(109, 153, 212, 0.08), transparent 44%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.skills-branch-heading {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}

.skills-branch-heading strong {
  font-size: 28px;
  line-height: 1;
}

.skills-branch-heading span {
  color: var(--muted);
  line-height: 1.45;
  max-width: 78%;
}

.skills-node {
  position: absolute;
  width: 146px;
  min-height: 88px;
  padding: 12px 12px 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, black 18%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  text-align: left;
}

.skills-node:hover {
  transform: translateY(-3px);
}

.skills-node.is-selected {
  border-color: color-mix(in srgb, var(--accent) 55%, white 45%);
  box-shadow: 0 18px 42px rgba(34, 74, 121, 0.34);
  background: linear-gradient(180deg, rgba(22, 34, 49, 0.98), rgba(11, 18, 27, 0.98));
}

.skills-node.is-unlockable {
  border-color: rgba(123, 186, 132, 0.5);
}

.skills-node.is-owned {
  background: linear-gradient(180deg, rgba(19, 31, 44, 0.96), rgba(13, 21, 31, 0.96));
}

.skills-node.is-equipped {
  border-color: rgba(234, 194, 112, 0.8);
  box-shadow: 0 14px 34px rgba(123, 90, 30, 0.24);
}

.skills-node.is-planned {
  border-color: rgba(116, 180, 232, 0.72);
  box-shadow: 0 14px 30px rgba(47, 103, 163, 0.22);
}

.skills-node.is-certification {
  background: linear-gradient(180deg, rgba(18, 29, 45, 0.98), rgba(13, 21, 30, 0.98));
}

.skills-node.is-capstone {
  width: 172px;
  min-height: 104px;
  border-color: rgba(225, 176, 88, 0.72);
}

.skills-node.is-locked {
  opacity: 0.72;
}

.skills-node-name {
  font-weight: 700;
  line-height: 1.1;
  font-size: 15px;
}

.skills-node-meta {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.skills-node-rank {
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 84%, var(--accent) 16%);
}

.skills-node-badge-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
}

.skills-node-link {
  position: absolute;
  background: rgba(120, 150, 192, 0.14);
  pointer-events: none;
}

.skills-node-link.is-vertical {
  width: 1px;
}

.skills-node-link.is-horizontal {
  height: 1px;
}

.skills-canvas-drawer {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100% - 48px));
  max-height: min(520px, calc(100% - 120px));
  overflow: auto;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(125, 158, 203, 0.18);
  background:
    linear-gradient(180deg, rgba(16, 24, 35, 0.96), rgba(10, 16, 24, 0.96)),
    radial-gradient(circle at top, rgba(99, 139, 191, 0.12), transparent 40%);
  box-shadow: 0 18px 42px rgba(2, 8, 14, 0.46);
  z-index: 6;
  backdrop-filter: blur(8px);
}

.skills-drawer-actions {
  margin-top: 4px;
}

.skills-drawer-close {
  align-self: start;
}

.skills-drawer-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.skills-slot-card {
  display: grid;
  gap: 4px;
}

.skills-slot-state {
  color: var(--muted);
}

.skills-branch-card {
  display: grid;
  gap: 6px;
}

.skills-inspector-shell {
  display: grid;
  gap: 12px;
}

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

.skills-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skills-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  font-size: 11px;
}

.skills-effect-list,
.skills-prereq-list {
  display: grid;
  gap: 6px;
}

.skills-education-links {
  display: grid;
  gap: 8px;
}

@media (max-width: 1200px) {
  .skills-view-grid {
    grid-template-columns: 1fr;
  }

  .skills-tree-shell {
    max-height: none;
    min-height: 760px;
  }

  .skills-tree-viewport {
    min-height: 620px;
  }

  .skills-canvas-drawer {
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 40vh;
    bottom: 12px;
  }
}

body.light-mode .bubble.mine {
  background: linear-gradient(135deg, #5b7ea6, #486a8f);
  color: #f7fbff;
}

body.light-mode .bubble.mine .bubble-time {
  color: rgba(244, 249, 255, 0.88);
}

body.light-mode .bubble.theirs .bubble-time {
  color: #627489;
}

.bubble-time {
  font-size: 10px;
  color: #b8c4d6;
  text-align: right;
  margin-top: 4px;
}

@media (max-width: 784px) {
  .dock-panel-row {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
  }
  body.dm-open {
    --dm-col-width: 100%;
  }
  .dm-window {
    width: 100%;
    max-width: 100%;
  }
  .dm-window-stack {
    position: static;
    align-items: stretch;
    max-height: none;
    height: auto;
    padding-bottom: 8px;
    width: 100%;
    max-width: 100%;
    right: auto;
    bottom: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 784px) {
  .dock-panel {
    width: 100%;
    max-width: 100%;
    right: auto;
  }
  .dock-split {
    grid-template-columns: 1fr;
  }
  .dock-list {
    max-height: 160px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

.notification {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel);
}

.notification-group-label {
  list-style: none;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notification.unread {
  border-color: rgba(79, 122, 166, 0.5);
  box-shadow: 0 8px 18px rgba(10, 18, 28, 0.5);
}

.notification.notification-security-alert {
  border-color: rgba(186, 143, 54, 0.32);
  background:
    radial-gradient(circle at top right, rgba(186, 143, 54, 0.12), transparent 34%),
    var(--panel);
}

.notification.notification-security-alert.notification-security-alert-flagged {
  border-color: rgba(226, 174, 77, 0.5);
  box-shadow: 0 10px 24px rgba(24, 18, 7, 0.26);
}

.notification.is-bounty-event {
  border-color: rgba(180, 104, 55, 0.34);
  background:
    radial-gradient(circle at top right, rgba(180, 104, 55, 0.1), transparent 38%),
    var(--panel);
}

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

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

.notification-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.notification-body {
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

#homeStatus {
  white-space: pre-line;
}

.notification-alert-summary {
  color: var(--ink);
  font-weight: 600;
}

.notification-flags {
  margin-top: 2px;
}

.security-activity-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel);
}

.security-activity-item.flagged {
  border-color: rgba(226, 174, 77, 0.45);
  background: linear-gradient(180deg, rgba(226, 174, 77, 0.12), var(--panel));
}

.security-activity-item.failure {
  border-color: rgba(190, 92, 92, 0.45);
}

.security-activity-item.is-highlighted {
  box-shadow: 0 0 0 1px rgba(226, 174, 77, 0.25), 0 10px 26px rgba(18, 13, 5, 0.3);
}

.security-activity-header,
.security-activity-meta,
.security-activity-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.security-activity-flags {
  gap: 6px;
}

.security-activity-message {
  font-size: 13px;
  color: var(--ink);
}

.security-activity-chip {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(79, 122, 166, 0.16);
  color: var(--ink);
}

.security-activity-chip.flag {
  background: rgba(226, 174, 77, 0.18);
}

.security-activity-chip.failure {
  background: rgba(190, 92, 92, 0.18);
}

.media-review {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.media-thumb {
  width: 72px;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111;
}

.media-info {
  display: grid;
  gap: 6px;
}

.media-title {
  font-weight: 600;
  font-size: 0.95rem;
}

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

.media-links,
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.programs {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.attack-playback-controls {
  margin-top: 8px;
  margin-bottom: 6px;
}

.attack-transcript-turn {
  border: 1px solid rgba(92, 136, 185, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(14, 24, 38, 0.94), rgba(8, 15, 26, 0.92));
}

.attack-transcript-turn.is-resolution {
  border-color: rgba(214, 165, 92, 0.32);
  background:
    linear-gradient(180deg, rgba(27, 24, 16, 0.96), rgba(16, 14, 9, 0.92));
}

.attack-transcript-turn-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.attack-transcript-events {
  display: grid;
  gap: 8px;
}

.attack-transcript-event {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(21, 33, 49, 0.72);
  border: 1px solid rgba(89, 124, 165, 0.12);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    border-color 180ms ease;
}

.attack-transcript-event.is-entering {
  opacity: 0;
  transform: translateY(8px);
}

.attack-transcript-event[data-actor="attacker"] {
  border-color: rgba(102, 182, 134, 0.2);
}

.attack-transcript-event[data-actor="defender"] {
  border-color: rgba(210, 109, 109, 0.22);
}

.attack-transcript-event[data-action-type="critical"],
.attack-transcript-event[data-action-type="finisher"] {
  box-shadow: 0 0 0 1px rgba(214, 165, 92, 0.2) inset;
}

.attack-transcript-event[data-source="armor"],
.attack-transcript-event[data-action-type="mitigation"],
.attack-transcript-event[data-action-type="block"] {
  background: rgba(25, 35, 47, 0.84);
  border-color: rgba(122, 170, 222, 0.24);
}

.attack-transcript-event[data-source="drug"] {
  background: rgba(30, 37, 30, 0.78);
  border-color: rgba(121, 181, 126, 0.24);
}

.attack-transcript-event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.attack-transcript-actor {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.attack-transcript-line {
  font-weight: 600;
  color: var(--text);
}

.attack-transcript-meta,
.attack-transcript-life {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.view[data-route="education"] .grid {
  grid-template-columns: 1fr;
  align-items: start;
}

#educationActiveCard {
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(110, 169, 255, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(9, 18, 30, 0.92), rgba(7, 14, 24, 0.9));
}

#educationActiveCard .card-head {
  gap: 8px;
  align-items: flex-start;
}

#educationActiveCard .actions {
  gap: 6px;
}

#educationActiveCard .actions button {
  padding: 6px 12px;
  font-size: 12px;
}

#educationActiveCard #educationActiveStatus {
  margin-top: 4px;
  min-height: 12px;
  font-size: 12px;
}

#educationActiveCard .section-title {
  margin: 8px 0 3px;
  font-size: 10px;
  letter-spacing: 0.16em;
}

#educationActiveCard .education-active-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

#educationActiveCard .education-active-row {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 2px;
  min-height: 52px;
  border: 1px solid rgba(92, 136, 185, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(17, 29, 45, 0.92), rgba(10, 19, 31, 0.88));
  padding: 8px 10px;
}

#educationActiveCard .education-active-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#educationActiveCard .education-active-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  justify-self: start;
  word-break: break-word;
}

#educationActiveCard .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}

#educationActiveCard .stat-card {
  border-radius: 10px;
  padding: 6px 8px;
}

#educationActiveCard .stat-label {
  font-size: 10px;
}

#educationActiveCard .stat-value {
  font-size: 13px;
  line-height: 1.15;
}

#educationActiveCard .education-skill-list {
  margin-top: 4px;
  gap: 4px;
}

#educationActiveCard .education-skill-chip {
  padding: 3px 8px;
  font-size: 11px;
}

#educationPrograms {
  display: block;
  margin-top: 14px;
}

#educationPrograms > .stat-card {
  margin-top: 0;
}

.education-browser {
  display: grid;
  gap: 14px;
}

.education-category-grid {
  display: grid;
  gap: 12px;
}

.education-category-row {
  display: grid;
  grid-template-columns: repeat(var(--education-category-columns, 1), minmax(0, 1fr));
  gap: 12px;
}

.education-category-tile {
  --education-tile-outline: rgba(91, 123, 156, 0.18);
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 248px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 108%, rgba(var(--education-accent-rgb), 0.32), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 32%),
    repeating-linear-gradient(
      115deg,
      transparent 0,
      transparent 12px,
      rgba(255, 255, 255, 0.035) 12px,
      rgba(255, 255, 255, 0.035) 13px
    ),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.18), rgba(7, 14, 24, 0.88) 44%),
    linear-gradient(180deg, rgba(10, 18, 29, 0.96), rgba(6, 12, 20, 0.98));
  color: inherit;
  text-align: left;
  overflow: hidden;
  appearance: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.education-category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--education-tile-outline);
  pointer-events: none;
  z-index: 3;
}

.education-category-tile::after {
  content: none;
}

.education-category-tile:hover,
.education-category-tile:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(4, 10, 18, 0.26);
}

.education-category-tile.is-selected {
  --education-tile-outline: rgba(var(--education-accent-rgb), 0.26);
  box-shadow: 0 16px 32px rgba(4, 10, 18, 0.24);
}

.education-category-tile-top,
.education-category-progress {
  position: relative;
  z-index: 1;
}

.education-category-tile-image {
  position: relative;
  z-index: 1;
  --education-category-image: none;
  --education-category-image-position: center center;
  --education-category-image-size: cover;
  width: 100%;
  min-height: 0;
  aspect-ratio: 5 / 2;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.12), rgba(6, 11, 18, 0.52)),
    var(--education-category-image),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.2), rgba(8, 14, 22, 0.18)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 12px,
      transparent 12px,
      transparent 24px
    ),
    rgba(8, 15, 24, 0.54);
  background-position:
    center center,
    var(--education-category-image-position),
    center center,
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--education-category-image-size),
    auto,
    auto,
    auto,
    auto;
}

.education-category-tile-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 36%);
  pointer-events: none;
}

.education-category-tile-image-label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(235, 242, 252, 0.78);
}

.education-category-tile-image.has-image .education-category-tile-image-label {
  opacity: 0;
}

.education-category-tile-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 0 14px;
}

.education-category-tile-copy {
  display: grid;
  gap: 4px;
}

.education-category-tile-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.education-category-tile-sub {
  font-size: 11px;
  color: rgba(223, 233, 248, 0.78);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.education-category-tile-emblem {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(247, 250, 255, 0.95);
  background: linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.24), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(var(--education-accent-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.education-category-tile-visual {
  position: relative;
  z-index: 1;
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  margin: 0 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, rgba(var(--education-accent-rgb), 0.32), transparent 45%),
    rgba(8, 15, 24, 0.56);
  color: rgba(235, 242, 252, 0.85);
  font-size: 12px;
  line-height: 1.35;
}

.education-category-progress {
  display: grid;
  gap: 6px;
  padding: 0 14px 14px;
}

.education-category-progress-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(9, 16, 26, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.education-category-progress-track.is-segmented {
  display: grid;
  grid-template-columns: repeat(var(--education-progress-segments, 1), minmax(0, 1fr));
  gap: 3px;
  padding: 2px;
}

.education-category-progress-segment {
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.education-category-progress-segment[data-state="completed"] {
  background: linear-gradient(
    90deg,
    rgba(var(--education-accent-rgb), 0.72),
    rgba(255, 255, 255, 0.88)
  );
}

.education-category-progress-segment[data-state="active"] {
  background: linear-gradient(
    90deg,
    rgba(var(--education-accent-rgb), 0.92),
    rgba(255, 255, 255, 0.98)
  );
  animation: education-category-progress-pulse 1.55s ease-in-out infinite;
}

.education-category-progress-segment[data-state="locked"] {
  background: rgba(150, 82, 67, 0.24);
}

.education-category-time-progress {
  display: grid;
  gap: 4px;
}

.education-category-progress-track.is-time {
  height: 7px;
}

.education-category-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(var(--education-accent-rgb), 0.82),
    rgba(255, 255, 255, 0.92)
  );
}

.education-category-progress-time-caption {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.72);
}

@keyframes education-category-progress-pulse {
  0%,
  100% {
    opacity: 0.7;
    box-shadow: 0 0 0 rgba(var(--education-accent-rgb), 0);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(var(--education-accent-rgb), 0.42);
  }
}

.education-category-progress-meta,
.education-category-progress-value {
  position: relative;
  z-index: 1;
}

.education-category-progress-meta {
  font-size: 11px;
  color: rgba(223, 233, 248, 0.76);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.education-category-progress-value {
  font-size: 12px;
  font-weight: 600;
  color: #eff5ff;
}

.education-browser-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.education-course-panel,
.education-detail-panel {
  --education-accent: #74b7ff;
  --education-accent-rgb: 116, 183, 255;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(11, 21, 34, 0.94), rgba(7, 14, 23, 0.96));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.education-course-panel {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.education-detail-panel {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.education-detail-panel-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
}

.education-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(91, 123, 156, 0.2);
}

.education-panel-title {
  font-size: 18px;
  font-weight: 700;
}

.education-panel-meta {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.education-panel-banner {
  --education-panel-banner-image: none;
  --education-panel-banner-image-position: center center;
  --education-panel-banner-image-size: cover;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 5;
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.18), rgba(6, 11, 18, 0.52)),
    var(--education-panel-banner-image),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.22), rgba(10, 16, 24, 0.18)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(9, 16, 25, 0.84);
  background-position:
    center center,
    var(--education-panel-banner-image-position),
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--education-panel-banner-image-size),
    auto,
    auto,
    auto;
}

.education-panel-banner.has-video-media {
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.14), rgba(6, 11, 18, 0.42)),
    var(--education-panel-banner-image),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.16), rgba(10, 16, 24, 0.18)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(9, 16, 25, 0.84);
  background-position:
    center center,
    var(--education-panel-banner-image-position),
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--education-panel-banner-image-size),
    auto,
    auto,
    auto;
}

.education-panel-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--education-panel-banner-image-position);
}

.education-panel-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.12), rgba(5, 10, 18, 0.64)),
    radial-gradient(circle at top right, rgba(var(--education-accent-rgb), 0.26), transparent 42%);
  pointer-events: none;
}

.education-panel-banner-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  gap: 3px;
}

.education-panel-banner-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(229, 238, 250, 0.76);
}

.education-panel-banner-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
  color: rgba(248, 251, 255, 0.96);
}

.education-panel-banner-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(229, 238, 250, 0.78);
}

.education-course-panel .education-panel-banner {
  width: 100%;
  border-radius: 0;
}

.education-detail-panel .education-panel-banner {
  width: 100%;
  border-radius: 0;
}

.education-course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 14px;
}

.education-course-list::-webkit-scrollbar {
  width: 8px;
}

.education-course-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(112, 143, 178, 0.38);
}

.education-course-list::-webkit-scrollbar-track {
  background: rgba(11, 19, 30, 0.22);
}

.education-course-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(91, 123, 156, 0.16);
  background: rgba(14, 23, 35, 0.82);
  color: inherit;
  text-align: left;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.education-course-row:hover,
.education-course-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(104, 155, 218, 0.28);
  background: rgba(17, 28, 43, 0.92);
}

.education-course-row.is-selected {
  border-color: rgba(103, 166, 230, 0.44);
  background:
    linear-gradient(180deg, rgba(29, 49, 73, 0.92), rgba(16, 27, 42, 0.92));
}

.education-course-row-state {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.education-course-row-state[data-state="completed"] {
  color: #d7f4de;
  background: rgba(95, 158, 112, 0.22);
  border-color: rgba(120, 181, 135, 0.34);
}

.education-course-row-state[data-state="active"] {
  color: #dceefe;
  background: rgba(103, 166, 230, 0.22);
  border-color: rgba(103, 166, 230, 0.38);
}

.education-course-row-state[data-state="locked"],
.education-course-row-state[data-state="busy"] {
  color: #f4d6cb;
  background: rgba(180, 97, 66, 0.18);
  border-color: rgba(196, 133, 111, 0.32);
}

.education-course-row-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.education-program-progress {
  display: grid;
  gap: 4px;
}

.education-program-progress-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 16, 26, 0.74);
}

.education-program-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(var(--education-accent-rgb), 0.86),
    rgba(255, 255, 255, 0.95)
  );
  transition: width 180ms linear;
}

.education-program-progress-caption {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.74);
}

.education-course-row-progress {
  margin-top: 2px;
}

.education-course-row-progress .education-program-progress-caption {
  font-size: 9px;
}

.education-course-row-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.education-course-row-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.education-course-row-status {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.76);
}

.education-detail-panel {
  --education-accent: #74b7ff;
  --education-accent-rgb: 116, 183, 255;
  background:
    radial-gradient(circle at top right, rgba(var(--education-accent-rgb), 0.18), transparent 36%),
    linear-gradient(180deg, rgba(11, 21, 34, 0.94), rgba(7, 14, 23, 0.96));
}

.education-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.education-detail-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.24), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(var(--education-accent-rgb), 0.28);
  color: rgba(248, 251, 255, 0.95);
}

.education-detail-hero-copy {
  display: grid;
  gap: 6px;
}

.education-detail-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(223, 233, 248, 0.72);
}

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

.education-detail-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.education-detail-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.education-detail-progress {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(91, 123, 156, 0.16);
  background: rgba(13, 22, 33, 0.62);
}

.education-detail-progress .education-program-progress-track {
  height: 9px;
}

.education-detail-progress .education-program-progress-caption {
  font-size: 10px;
}

.education-detail-state {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 11px;
  border: 1px solid rgba(79, 122, 166, 0.38);
  background: rgba(79, 122, 166, 0.18);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.education-detail-state[data-state="completed"] {
  border-color: rgba(120, 181, 135, 0.4);
  background: rgba(95, 158, 112, 0.2);
  color: #d7f4de;
}

.education-detail-state[data-state="active"] {
  border-color: rgba(103, 166, 230, 0.42);
  background: rgba(103, 166, 230, 0.18);
  color: #dceefe;
}

.education-detail-state[data-state="locked"],
.education-detail-state[data-state="busy"] {
  border-color: rgba(196, 133, 111, 0.42);
  background: rgba(180, 97, 66, 0.18);
  color: #f4d6cb;
}

.education-detail-alert {
  border-radius: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(91, 123, 156, 0.2);
  background: rgba(20, 33, 49, 0.72);
  color: #d9e7f7;
  line-height: 1.4;
}

.education-detail-alert.is-locked {
  border-color: rgba(196, 133, 111, 0.4);
  background: rgba(92, 49, 36, 0.38);
  color: #f7dfd6;
}

.education-detail-alert-link {
  color: #ffd15a;
  font-weight: 700;
  text-decoration: none;
}

.education-detail-alert-link:hover,
.education-detail-alert-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.education-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.education-detail-fact {
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(91, 123, 156, 0.16);
  background: rgba(13, 22, 33, 0.72);
  display: grid;
  gap: 4px;
}

.education-detail-fact-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.education-detail-fact-value {
  font-size: 15px;
  font-weight: 700;
}

.education-detail-section {
  display: grid;
  gap: 8px;
}

.education-detail-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.education-detail-list {
  display: grid;
  gap: 6px;
}

.education-detail-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(91, 123, 156, 0.14);
}

.education-detail-list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.education-detail-list-label {
  color: var(--muted);
}

.education-detail-list-value {
  font-weight: 600;
  text-align: right;
}

.education-prerequisite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.education-prerequisite-chip {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(91, 123, 156, 0.2);
  background: rgba(17, 28, 43, 0.74);
}

.education-prerequisite-chip[data-state="complete"] {
  border-color: rgba(120, 181, 135, 0.36);
  background: rgba(95, 158, 112, 0.18);
  color: #d7f4de;
}

.education-prerequisite-chip[data-state="missing"] {
  border-color: rgba(196, 133, 111, 0.34);
  background: rgba(180, 97, 66, 0.14);
  color: #f4d6cb;
}

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

.education-detail-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
}

.view[data-route="crimes"] .grid {
  grid-template-columns: 1fr;
  align-items: start;
}

#crimeResult.result {
  white-space: normal;
  min-height: 180px;
}

.crime-browser {
  display: grid;
  gap: 14px;
}

.crime-category-grid {
  display: grid;
  gap: 12px;
}

.crime-category-row {
  display: grid;
  grid-template-columns: repeat(var(--crime-category-columns, 1), minmax(0, 1fr));
  gap: 12px;
}

.crime-category-tile {
  --crime-tile-outline: rgba(91, 123, 156, 0.18);
  --crime-accent: #76beff;
  --crime-accent-rgb: 118, 190, 255;
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  color: inherit;
  text-align: left;
  overflow: hidden;
  background:
    radial-gradient(circle at bottom right, rgba(var(--crime-accent-rgb), 0.28), transparent 34%),
    repeating-linear-gradient(
      118deg,
      transparent 0,
      transparent 12px,
      rgba(255, 255, 255, 0.035) 12px,
      rgba(255, 255, 255, 0.035) 13px
    ),
    linear-gradient(180deg, rgba(var(--crime-accent-rgb), 0.16), rgba(7, 14, 23, 0.94) 42%),
    linear-gradient(180deg, rgba(10, 18, 29, 0.96), rgba(6, 12, 20, 0.98));
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.crime-category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--crime-tile-outline);
  pointer-events: none;
}

.crime-category-tile:hover,
.crime-category-tile:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(4, 10, 18, 0.26);
}

.crime-category-tile.is-selected {
  --crime-tile-outline: rgba(var(--crime-accent-rgb), 0.34);
  box-shadow: 0 16px 32px rgba(4, 10, 18, 0.22);
}

.crime-category-tile-top,
.crime-category-tile-visual,
.crime-category-tile-stats {
  position: relative;
  z-index: 1;
}

.crime-category-tile-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.crime-category-tile-copy {
  display: grid;
  gap: 4px;
}

.crime-category-tile-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.02;
}

.crime-category-tile-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.76);
}

.crime-category-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(247, 250, 255, 0.95);
  background: linear-gradient(180deg, rgba(var(--crime-accent-rgb), 0.26), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(var(--crime-accent-rgb), 0.3);
}

.crime-category-tile-visual {
  min-height: 58px;
  display: flex;
  align-items: flex-end;
  padding: 13px 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(8, 15, 24, 0.56);
  color: rgba(235, 242, 252, 0.85);
  font-size: 12px;
  line-height: 1.38;
}

.crime-category-tile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.crime-category-statline {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(10, 18, 29, 0.62);
  border: 1px solid rgba(91, 123, 156, 0.14);
}

.crime-category-statline.is-wide {
  grid-column: 1 / -1;
}

.crime-category-statline span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.68);
}

.crime-category-statline strong {
  font-size: 13px;
  color: #eef5ff;
}

.crime-browser-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.crime-list-panel,
.crime-detail-panel {
  --crime-accent: #76beff;
  --crime-accent-rgb: 118, 190, 255;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(var(--crime-accent-rgb), 0.16), transparent 34%),
    linear-gradient(180deg, rgba(11, 21, 34, 0.94), rgba(7, 14, 23, 0.96));
}

.crime-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(91, 123, 156, 0.2);
}

.crime-panel-title {
  font-size: 18px;
  font-weight: 700;
}

.crime-panel-meta {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.crime-panel-banner {
  --crime-panel-banner-image: none;
  --crime-panel-banner-image-position: center center;
  --crime-panel-banner-image-size: cover;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px;
  min-height: 88px;
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.18), rgba(6, 11, 18, 0.52)),
    var(--crime-panel-banner-image),
    radial-gradient(circle at right center, rgba(var(--crime-accent-rgb), 0.3), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(9, 16, 25, 0.82);
  background-position:
    center center,
    var(--crime-panel-banner-image-position),
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--crime-panel-banner-image-size),
    auto,
    auto,
    auto;
}

.crime-panel-banner.has-video-media {
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.14), rgba(6, 11, 18, 0.42)),
    var(--crime-panel-banner-image),
    radial-gradient(circle at right center, rgba(var(--crime-accent-rgb), 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(9, 16, 25, 0.84);
  background-position:
    center center,
    var(--crime-panel-banner-image-position),
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--crime-panel-banner-image-size),
    auto,
    auto,
    auto;
}

.crime-panel-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crime-panel-banner-image-position);
}

.crime-panel-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.12), rgba(5, 10, 18, 0.56)),
    radial-gradient(circle at right center, rgba(var(--crime-accent-rgb), 0.18), transparent 42%);
}

.crime-panel-banner-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3px;
}

.crime-panel-banner-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(229, 238, 250, 0.76);
}

.crime-panel-banner-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
}

.crime-panel-banner-icon {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 2;
  font-size: 42px;
  line-height: 1;
  color: rgba(245, 249, 255, 0.2);
}

.crime-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.crime-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(91, 123, 156, 0.16);
  background: rgba(14, 23, 35, 0.82);
  color: inherit;
  text-align: left;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.crime-row:hover,
.crime-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--crime-accent-rgb), 0.34);
  background: rgba(17, 28, 43, 0.92);
}

.crime-row.is-selected {
  border-color: rgba(var(--crime-accent-rgb), 0.42);
  background:
    linear-gradient(180deg, rgba(29, 49, 73, 0.92), rgba(16, 27, 42, 0.92));
}

.crime-row-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.crime-row[data-state="locked"] .crime-row-icon {
  color: #f4d6cb;
  background: rgba(180, 97, 66, 0.18);
  border-color: rgba(196, 133, 111, 0.34);
}

.crime-row[data-state="ready"] .crime-row-icon {
  color: #dceefe;
  background: rgba(var(--crime-accent-rgb), 0.22);
  border-color: rgba(var(--crime-accent-rgb), 0.36);
}

.crime-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crime-row-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.crime-row-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.crime-row-status {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.74);
}

.crime-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.crime-detail-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(180deg, rgba(var(--crime-accent-rgb), 0.24), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(var(--crime-accent-rgb), 0.3);
  color: rgba(248, 251, 255, 0.95);
}

.crime-detail-hero-copy {
  display: grid;
  gap: 6px;
}

.crime-detail-eyebrow,
.crime-detail-section-label,
.crime-detail-metric-label,
.crime-result-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(223, 233, 248, 0.72);
}

.crime-detail-title-row,
.crime-result-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.crime-detail-title,
.crime-result-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.crime-detail-summary,
.crime-detail-body,
.crime-result-flavor {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.crime-detail-state,
.crime-result-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 11px;
  border: 1px solid rgba(79, 122, 166, 0.38);
  background: rgba(79, 122, 166, 0.18);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crime-result-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(91, 123, 156, 0.24);
  background: rgba(12, 22, 34, 0.72);
  color: rgba(224, 235, 249, 0.84);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.crime-result-close:hover,
.crime-result-close:focus-visible {
  background: rgba(22, 35, 52, 0.92);
  border-color: rgba(118, 190, 255, 0.34);
  color: #f7fbff;
}

.crime-detail-state[data-state="ready"],
.crime-result-badge[data-outcome="success"] {
  border-color: rgba(120, 181, 135, 0.4);
  background: rgba(95, 158, 112, 0.2);
  color: #d7f4de;
}

.crime-detail-state[data-state="locked"],
.crime-result-badge[data-outcome="fail"] {
  border-color: rgba(196, 133, 111, 0.42);
  background: rgba(180, 97, 66, 0.18);
  color: #f4d6cb;
}

.crime-detail-state[data-state="busy"] {
  border-color: rgba(172, 144, 91, 0.42);
  background: rgba(142, 112, 44, 0.2);
  color: #f4e6c6;
}

.crime-detail-alert,
.crime-result-alert {
  border-radius: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(91, 123, 156, 0.2);
  background: rgba(20, 33, 49, 0.72);
  color: #d9e7f7;
  line-height: 1.4;
}

.crime-detail-alert.is-locked,
.crime-result-alert {
  border-color: rgba(196, 133, 111, 0.4);
  background: rgba(92, 49, 36, 0.38);
  color: #f7dfd6;
}

.crime-detail-alert-link {
  color: #ffd15a;
  font-weight: 700;
  text-decoration: none;
}

.crime-detail-alert-link:hover,
.crime-detail-alert-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.crime-detail-metrics,
.crime-result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.crime-detail-metric {
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(91, 123, 156, 0.16);
  background: rgba(13, 22, 33, 0.72);
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crime-detail-metric-value {
  font-size: 15px;
  font-weight: 700;
  color: #eff5ff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.crime-detail-section {
  display: grid;
  gap: 8px;
}

.crime-detail-result {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition:
    max-height 220ms ease,
    opacity 180ms ease,
    transform 220ms ease;
}

.crime-detail-result.is-visible {
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
}

.crime-detail-result.is-closing {
  pointer-events: none;
}

.crime-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crime-tag {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(91, 123, 156, 0.2);
  background: rgba(17, 28, 43, 0.74);
}

a.crime-tag-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

a.crime-tag-link:hover,
a.crime-tag-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.crime-detail-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.crime-detail-commit {
  width: fit-content;
}

.crime-detail-note {
  font-size: 12px;
  color: var(--muted);
}

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

.crime-result-card {
  display: grid;
  gap: 12px;
  color: inherit;
}

.crime-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crime-result-action {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(118, 190, 255, 0.28);
  background: rgba(20, 37, 56, 0.86);
  color: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.crime-result-action:hover,
.crime-result-action:focus-visible {
  background: rgba(32, 56, 82, 0.94);
  border-color: rgba(118, 190, 255, 0.42);
  transform: translateY(-1px);
}

.crime-result-reward-list {
  display: grid;
  gap: 6px;
}

.crime-result-reward-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(91, 123, 156, 0.14);
}

.crime-result-reward-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.crime-result-reward-label,
.crime-result-reward-empty {
  color: var(--muted);
}

.crime-result-reward-value {
  font-weight: 600;
  text-align: right;
}

.crime-result-title-wrap {
  display: grid;
  gap: 4px;
}

body.light-mode .view[data-route="crimes"] .grid {
  grid-template-columns: 1fr;
}

body.light-mode .crime-category-tile {
  --crime-tile-outline: rgba(88, 115, 144, 0.14);
  background:
    radial-gradient(circle at bottom right, rgba(var(--crime-accent-rgb), 0.18), transparent 34%),
    repeating-linear-gradient(
      118deg,
      transparent 0,
      transparent 12px,
      rgba(255, 255, 255, 0.11) 12px,
      rgba(255, 255, 255, 0.11) 13px
    ),
    linear-gradient(180deg, rgba(var(--crime-accent-rgb), 0.14), rgba(255, 255, 255, 0.94) 42%),
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(236, 241, 247, 0.98));
}

body.light-mode .crime-category-tile-sub,
body.light-mode .crime-category-statline span,
body.light-mode .crime-detail-eyebrow,
body.light-mode .crime-detail-section-label,
body.light-mode .crime-detail-metric-label,
body.light-mode .crime-result-eyebrow,
body.light-mode .crime-row-status {
  color: rgba(54, 66, 80, 0.72);
}

body.light-mode .crime-category-tile-visual,
body.light-mode .crime-category-statline,
body.light-mode .crime-list-panel,
body.light-mode .crime-detail-panel,
body.light-mode .crime-row,
body.light-mode .crime-detail-metric,
body.light-mode .crime-tag,
body.light-mode #crimeResult.result {
  background:
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(238, 242, 247, 0.98));
}

body.light-mode .crime-panel-banner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(232, 238, 246, 0.7)),
    var(--crime-panel-banner-image),
    radial-gradient(circle at right center, rgba(var(--crime-accent-rgb), 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(232, 238, 246, 0.92));
  background-position:
    center center,
    var(--crime-panel-banner-image-position),
    center center,
    center center;
  background-size:
    auto,
    var(--crime-panel-banner-image-size),
    auto,
    auto;
}

body.light-mode .crime-panel-head,
body.light-mode .crime-row,
body.light-mode .crime-detail-metric,
body.light-mode .crime-tag {
  border-color: rgba(88, 115, 144, 0.14);
}

body.light-mode .crime-row.is-selected {
  background:
    linear-gradient(180deg, rgba(222, 232, 244, 0.96), rgba(236, 242, 248, 0.96));
}

body.light-mode .crime-row-meta,
body.light-mode .crime-detail-summary,
body.light-mode .crime-detail-body,
body.light-mode .crime-detail-note,
body.light-mode .crime-result-flavor,
body.light-mode .crime-result-reward-label,
body.light-mode .crime-result-reward-empty {
  color: rgba(61, 76, 95, 0.82);
}

body.light-mode .crime-detail-metric-value,
body.light-mode .crime-category-statline strong,
body.light-mode .crime-detail-title,
body.light-mode .crime-result-title,
body.light-mode .crime-result-reward-value {
  color: #243240;
}

body.light-mode .crime-detail-alert,
body.light-mode .crime-result-alert {
  background: rgba(248, 236, 230, 0.94);
  border-color: rgba(181, 120, 101, 0.32);
  color: #7f3e28;
}

body.light-mode .crime-detail-alert-link {
  color: #b24a21;
}

body.light-mode .crime-result-close {
  background: rgba(243, 247, 252, 0.96);
  border-color: rgba(145, 162, 185, 0.3);
  color: rgba(44, 58, 76, 0.82);
}

body.light-mode .crime-result-close:hover,
body.light-mode .crime-result-close:focus-visible {
  background: rgba(232, 239, 248, 1);
  border-color: rgba(92, 132, 174, 0.38);
  color: rgba(24, 36, 52, 0.94);
}

@media (max-width: 1080px) {
  .crime-browser-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .crime-category-tile {
    min-height: 0;
  }

  .crime-category-tile-stats,
  .crime-detail-metrics,
  .crime-result-metrics {
    grid-template-columns: 1fr;
  }

  .crime-detail-title,
  .crime-result-title {
    font-size: 21px;
  }
}

body.light-mode #educationActiveCard {
  background:
    radial-gradient(circle at top right, rgba(82, 139, 199, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(234, 239, 246, 0.98));
}

body.light-mode #educationActiveCard .education-active-row {
  border-color: rgba(88, 115, 144, 0.18);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(239, 243, 249, 0.96));
}

body.light-mode .education-category-tile {
  --education-tile-outline: rgba(88, 115, 144, 0.14);
  background:
    radial-gradient(circle at 72% 108%, rgba(var(--education-accent-rgb), 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 32%),
    repeating-linear-gradient(
      115deg,
      transparent 0,
      transparent 12px,
      rgba(255, 255, 255, 0.11) 12px,
      rgba(255, 255, 255, 0.11) 13px
    ),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.16), rgba(255, 255, 255, 0.94) 46%),
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(236, 241, 247, 0.98));
}

body.light-mode .education-category-tile-image {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(21, 32, 44, 0.16)),
    var(--education-category-image),
    linear-gradient(180deg, rgba(var(--education-accent-rgb), 0.16), rgba(255, 255, 255, 0.4)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 38%),
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.14) 0,
      rgba(255, 255, 255, 0.14) 12px,
      transparent 12px,
      transparent 24px
    ),
    rgba(224, 232, 242, 0.9);
  background-position:
    center center,
    var(--education-category-image-position),
    center center,
    center center,
    center center,
    center center;
  background-size:
    auto,
    var(--education-category-image-size),
    auto,
    auto,
    auto,
    auto;
}

body.light-mode .education-category-tile-image-label {
  color: rgba(54, 66, 80, 0.72);
}

body.light-mode .education-category-tile-sub,
body.light-mode .education-category-progress-meta {
  color: rgba(54, 66, 80, 0.72);
}

body.light-mode .education-category-progress-track {
  background: rgba(207, 217, 228, 0.88);
  border-color: rgba(106, 128, 152, 0.14);
}

body.light-mode .education-category-progress-value {
  color: #253242;
}

body.light-mode .education-category-progress-track {
  background: rgba(214, 223, 235, 0.72);
  border-color: rgba(88, 115, 144, 0.14);
}

body.light-mode .education-category-progress-segment {
  background: rgba(108, 126, 148, 0.18);
}

body.light-mode .education-category-progress-segment[data-state="locked"] {
  background: rgba(171, 103, 83, 0.2);
}

body.light-mode .education-category-progress-time-caption {
  color: rgba(62, 77, 96, 0.72);
}

body.light-mode .education-course-panel,
body.light-mode .education-detail-panel {
  background:
    radial-gradient(circle at top right, rgba(var(--education-accent-rgb), 0.12), transparent 36%),
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(238, 242, 247, 0.98));
}

body.light-mode .education-panel-banner::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(22, 32, 43, 0.38)),
    radial-gradient(circle at top right, rgba(var(--education-accent-rgb), 0.18), transparent 42%);
}

body.light-mode .education-panel-banner-label {
  color: rgba(237, 244, 252, 0.86);
}

body.light-mode .education-course-list::-webkit-scrollbar-thumb {
  background: rgba(106, 128, 152, 0.3);
}

body.light-mode .education-course-list::-webkit-scrollbar-track {
  background: rgba(210, 219, 230, 0.42);
}

body.light-mode .education-panel-head {
  border-bottom-color: rgba(88, 115, 144, 0.16);
}

body.light-mode .education-course-row {
  background: rgba(250, 252, 255, 0.95);
  border-color: rgba(88, 115, 144, 0.12);
}

body.light-mode .education-program-progress-track {
  background: rgba(214, 223, 235, 0.72);
  border-color: rgba(88, 115, 144, 0.14);
}

body.light-mode .education-program-progress-caption {
  color: rgba(62, 77, 96, 0.72);
}

body.light-mode .education-course-row:hover,
body.light-mode .education-course-row:focus-visible {
  background: rgba(244, 248, 253, 0.98);
  border-color: rgba(88, 135, 193, 0.24);
}

body.light-mode .education-course-row.is-selected {
  background: linear-gradient(180deg, rgba(221, 232, 245, 0.96), rgba(233, 240, 249, 0.96));
  border-color: rgba(88, 135, 193, 0.32);
}

body.light-mode .education-course-row-status,
body.light-mode .education-detail-eyebrow {
  color: rgba(54, 66, 80, 0.72);
}

body.light-mode .education-detail-summary,
body.light-mode .education-detail-list-label,
body.light-mode .education-detail-empty {
  color: rgba(54, 66, 80, 0.82);
}

body.light-mode .education-detail-alert {
  border-color: rgba(88, 115, 144, 0.18);
  background: rgba(225, 233, 243, 0.78);
  color: #243243;
}

body.light-mode .education-detail-alert.is-locked {
  border-color: rgba(172, 112, 90, 0.28);
  background: rgba(242, 221, 214, 0.82);
  color: #5d2e24;
}

body.light-mode .education-detail-alert-link {
  color: #b24a21;
}

body.light-mode .education-detail-fact,
body.light-mode .education-prerequisite-chip {
  background: rgba(250, 252, 255, 0.95);
  border-color: rgba(88, 115, 144, 0.12);
}

body.light-mode .education-detail-progress {
  background: rgba(250, 252, 255, 0.9);
  border-color: rgba(88, 115, 144, 0.14);
}

body.light-mode .education-detail-list-item {
  border-bottom-color: rgba(88, 115, 144, 0.14);
}

@media (max-width: 1080px) {
  .education-browser-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .education-detail-title {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  #educationActiveCard .education-active-table {
    grid-template-columns: 1fr;
  }

  .education-course-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .education-course-row-status {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }

  .education-detail-title-row,
  .education-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

#gymPrograms {
  display: flex;
  flex-direction: column;
}

.view[data-route="gym"] .grid {
  grid-template-columns: 1fr;
}

.view[data-route="inventory"] .grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  align-items: start;
}

.view[data-route="inventory"] #inventoryMainCard {
  grid-column: 1 / -1;
}

.gym-layout {
  gap: 14px;
}

#homeRefreshBtn,
#gymRefreshBtn {
  display: none;
}

.gym-active {
  display: grid;
  gap: 10px;
}

.gym-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gym-stat-list {
  display: grid;
  gap: 8px;
}

.gym-stat-row {
  display: grid;
  grid-template-columns: 55px 140px 40px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.gym-stat-row.disabled {
  opacity: 0.5;
}

.gym-stat-label {
  color: var(--muted);
}

.gym-stat-multiplier {
  font-weight: 600;
  text-align: right;
}

.gym-stat-activity {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.gym-price {
  font-weight: 700;
  color: var(--sun);
  font-size: 13px;
  white-space: nowrap;
}

.segmented-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.segmented-bar .segment {
  background: rgba(88, 108, 134, 0.3);
  border-radius: 2px;
  z-index: 2;
}

.segmented-bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(79, 122, 166, 0.8), rgba(79, 122, 166, 0.55));
  border-radius: 999px;
  z-index: 1;
  transition: width 0.2s ease;
}

.segmented-bar-label {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(226, 236, 250, 0.9);
  text-shadow: 0 1px 2px rgba(7, 12, 18, 0.7);
  font-variant-numeric: tabular-nums;
  z-index: 3;
  pointer-events: none;
}

.gym-training {
  display: grid;
  gap: 10px;
}

.gym-train-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.gym-train-cell {
  border: none;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: var(--panel);
}

.gym-train-cell.disabled {
  opacity: 0.45;
}

.gym-train-label {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  align-items: center;
}

.gym-train-value {
  margin-left: auto;
  font-weight: 600;
}

.gym-train-multiplier {
  color: var(--muted);
  font-weight: 600;
}

.gym-train-multiplier {
  font-size: 11px;
  color: var(--muted);
}

.gym-train-activity {
  font-size: 11px;
  color: var(--muted);
}

.gym-train-cell button {
  width: 100%;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.gym-train-cell button:hover:not(:disabled) {
  transform: none;
  box-shadow: 0 3px 8px rgba(6, 10, 16, 0.22);
}

.gym-train-cell > button {
  background: var(--accent-dark);
  color: #eef5ff;
  border-color: rgba(230, 237, 245, 0.12);
}

.gym-train-cell > button:hover:not(:disabled) {
  background: var(--accent);
}

.train-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.train-qty {
  min-width: 60px;
  width: 100%;
  justify-self: stretch;
  box-sizing: border-box;
  text-align: center;
  font-weight: 600;
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.train-stepper {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.train-stepper:hover:not(:disabled) {
  background: rgba(79, 122, 166, 0.14);
  color: var(--ink);
}

.train-stepper:disabled,
.train-qty:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.light-mode .train-stepper {
  background: rgba(244, 246, 250, 0.95);
  color: var(--accent-dark);
  border: none;
}

body.light-mode .train-stepper:hover:not(:disabled) {
  background: rgba(59, 98, 139, 0.1);
  color: var(--accent-dark);
}

body.light-mode .gym-train-cell > button {
  background: var(--accent-dark);
  color: #eef5ff;
  border-color: rgba(31, 42, 56, 0.12);
}

body.light-mode .gym-train-cell > button:hover:not(:disabled) {
  background: var(--accent);
}

body.light-mode .gym-train-cell button:hover:not(:disabled) {
  box-shadow: 0 2px 6px rgba(31, 42, 56, 0.12);
}

.gym-train-cell {
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .gym-train-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .train-stepper {
    width: 28px;
    height: 28px;
  }
  .train-qty {
    width: auto;
  }
}

@media (max-width: 450px) {
  .gym-train-grid {
    grid-template-columns: 1fr;
  }
}

.gym-logos {
  display: grid;
  gap: 8px;
}

.gym-logo-quadrants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gym-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 64px);
  gap: 6px;
  justify-content: space-around;
}

.gym-logo-empty {
  min-height: 64px;
}

.gym-logo-btn {
  width: 100%;
  max-width: 64px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  position: relative;
  cursor: pointer;
}

.gym-logo-btn .gym-logo {
  width: min(52px, calc(100% - 10px));
  height: min(52px, calc(100% - 10px));
  flex: 0 0 auto;
}

.gym-logo-btn.active {
  border-color: rgba(79, 122, 166, 0.8);
  box-shadow: 0 0 0 1px rgba(79, 122, 166, 0.3);
}

.gym-logo-btn.pending {
  border-color: rgba(214, 162, 78, 0.8);
}

.gym-logo-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.gym-logo-btn .gym-next-progress {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  display: block;
  pointer-events: none;
}

.gym-logo-btn .gym-next-progress .segmented-bar {
  height: 8px;
  position: relative;
}

.gym-next-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(226, 236, 250, 0.95);
  text-shadow: 0 1px 2px rgba(7, 12, 18, 0.8);
  z-index: 4;
}

body.light-mode .gym-next-label {
  color: rgba(31, 42, 56, 0.95);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

.program {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}

.program-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.education-program-state {
  border: 1px solid rgba(79, 122, 166, 0.4);
  background: rgba(79, 122, 166, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #dbe6f5;
  text-transform: uppercase;
}

.education-program-state.completed {
  border-color: rgba(120, 181, 135, 0.5);
  background: rgba(95, 158, 112, 0.24);
  color: #d5f2dd;
}

.education-program-state.active {
  border-color: rgba(103, 166, 230, 0.65);
  background: rgba(103, 166, 230, 0.22);
  color: #dceefe;
}

.education-program-state.locked {
  border-color: rgba(196, 133, 111, 0.55);
  background: rgba(180, 97, 66, 0.24);
  color: #f4d6cb;
}

.view[data-route="education"] .program.is-completed {
  border-color: rgba(120, 181, 135, 0.5);
}

.view[data-route="education"] .program.is-active {
  border-color: rgba(103, 166, 230, 0.65);
}

.view[data-route="education"] .program.is-locked {
  opacity: 0.88;
}

.education-program-lock {
  color: #d7aa9d;
}

.gym-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gym-status-glyph {
  font-size: 16px;
  margin-left: 0;
  vertical-align: baseline;
}

.card h2 {
  font-size: 18px;
}

#gymCardTitle {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.gym-title-wrap {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.gym-title-main {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.gym-card-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.2;
}

.gym-card-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#gymCardLogo {
  margin: 4px;
}

.gym-logo-card {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.gym-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.gym-logo-bg {
  fill: rgba(10, 16, 22, 0.65);
  stroke: rgba(79, 122, 166, 0.4);
  stroke-width: 1.5px;
}

body.light-mode .gym-logo-btn {
  background: rgba(233, 238, 245, 0.95);
  border-color: rgba(59, 98, 139, 0.32);
}

body.light-mode .gym-logo-bg {
  fill: rgba(79, 122, 166, 0.14);
  stroke: rgba(59, 98, 139, 0.48);
}

.gym-logo-ring {
  display: none;
}

.gym-logo-icon {
  display: block;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 32px 32px;
}

.gym-logo-icon .gym-logo-stroke {
  fill: none;
}

.gym-logo-icon .gym-logo-fill {
  fill-opacity: 0.24;
}

.gym-logo-label {
  font-size: 20px;
  font-weight: 700;
  fill: #f3f6fb;
}

.gym-logo-badge {
  display: none;
}

.gym-logo[data-tier="lightweight"] .gym-logo-ring,
.gym-logo[data-tier="lightweight"] .gym-logo-icon {
  stroke: #6ea9ff;
  fill: #6ea9ff;
}

.gym-logo[data-tier="middleweight"] .gym-logo-ring,
.gym-logo[data-tier="middleweight"] .gym-logo-icon {
  stroke: #f0b05a;
  fill: #f0b05a;
}

.gym-logo[data-tier="heavyweight"] .gym-logo-ring,
.gym-logo[data-tier="heavyweight"] .gym-logo-icon {
  stroke: #ff7a7a;
  fill: #ff7a7a;
}

.gym-logo[data-tier="mystery"] .gym-logo-ring,
.gym-logo[data-tier="mystery"] .gym-logo-icon {
  display: none;
}

.gym-logo-btn:hover .gym-logo:not([data-tier="mystery"]) .gym-logo-icon {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.24, 0.65, 0.29, 1);
  animation-fill-mode: both;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="light_1"] .gym-logo-icon {
  animation-name: gymLogoCrateLift;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="light_2"] .gym-logo-icon {
  animation-name: gymLogoBeamHoist;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="light_3"] .gym-logo-icon {
  animation-name: gymLogoSlabLift;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="light_4"] .gym-logo-icon {
  animation-name: gymLogoSledPush;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="light_5"] .gym-logo-icon {
  animation-name: gymLogoTireFlip;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="mid_1"] .gym-logo-icon {
  animation-name: gymLogoRackPull;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="mid_2"] .gym-logo-icon {
  animation-name: gymLogoAnvilSmash;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="mid_3"] .gym-logo-icon {
  animation-name: gymLogoYokeRow;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="mid_4"] .gym-logo-icon {
  animation-name: gymLogoCageRumble;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="mid_5"] .gym-logo-icon {
  animation-name: gymLogoAtlasStone;
  animation-timing-function: cubic-bezier(0.18, 0.72, 0.2, 1);
}

.gym-logo-btn:hover .gym-logo[data-gym-id="heavy_1"] .gym-logo-icon {
  animation-name: gymLogoPlatformLog;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="heavy_2"] .gym-logo-icon {
  animation-name: gymLogoMonolith;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="heavy_3"] .gym-logo-icon {
  animation-name: gymLogoElectroChain;
  animation-timing-function: steps(4, end);
}

.gym-logo-btn:hover .gym-logo[data-gym-id="heavy_4"] .gym-logo-icon {
  animation-name: gymLogoBoulderRoll;
}

.gym-logo-btn:hover .gym-logo[data-gym-id="heavy_5"] .gym-logo-icon {
  animation-name: gymLogoHammerStrike;
  animation-timing-function: cubic-bezier(0.3, 0.2, 0.1, 1);
}

.gym-logo-btn.is-click-animating .gym-logo:not([data-tier="mystery"]) .gym-logo-icon,
.gym-logo-btn:active .gym-logo:not([data-tier="mystery"]) .gym-logo-icon {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.16, 0.82, 0.24, 1);
  animation-fill-mode: both;
}

.gym-logo-btn.is-click-animating .gym-logo[data-tier="lightweight"] .gym-logo-icon,
.gym-logo-btn:active .gym-logo[data-tier="lightweight"] .gym-logo-icon {
  animation-name: gymLogoClickLight;
}

.gym-logo-btn.is-click-animating .gym-logo[data-tier="middleweight"] .gym-logo-icon,
.gym-logo-btn:active .gym-logo[data-tier="middleweight"] .gym-logo-icon {
  animation-name: gymLogoClickMiddle;
}

.gym-logo-btn.is-click-animating .gym-logo[data-tier="heavyweight"] .gym-logo-icon,
.gym-logo-btn:active .gym-logo[data-tier="heavyweight"] .gym-logo-icon {
  animation-name: gymLogoClickHeavy;
}

@keyframes gymLogoClickLight {
  0% { transform: translateY(0) scale(1); }
  24% { transform: translateY(-5px) scale(1.08); }
  52% { transform: translateY(1px) scale(0.97); }
  72% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes gymLogoClickMiddle {
  0% { transform: translateX(0) rotate(0deg) scale(1); }
  20% { transform: translateX(-3px) rotate(-4deg) scale(1.05); }
  42% { transform: translateX(4px) rotate(4deg) scale(0.98); }
  68% { transform: translateX(-2px) rotate(-2deg) scale(1.02); }
  100% { transform: translateX(0) rotate(0deg) scale(1); }
}

@keyframes gymLogoClickHeavy {
  0% { transform: translateY(0) scale(1); filter: none; }
  22% { transform: translateY(3px) scale(0.92); filter: none; }
  45% { transform: translateY(-4px) scale(1.08); filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.35)); }
  70% { transform: translateY(1px) scale(0.98); filter: none; }
  100% { transform: translateY(0) scale(1); filter: none; }
}

@keyframes gymLogoCrateLift {
  0% { transform: translateY(0) scaleY(1); }
  22% { transform: translateY(1px) scaleY(0.96); }
  48% { transform: translateY(-4px) scaleY(1.03); }
  70% { transform: translateY(-2px) rotate(-1deg); }
  100% { transform: translateY(0); }
}

@keyframes gymLogoBeamHoist {
  0% { transform: translateY(2px) rotate(0deg); }
  30% { transform: translateY(-3px) rotate(-5deg); }
  55% { transform: translateY(-3px) rotate(-5deg); }
  78% { transform: translateY(1px) rotate(2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes gymLogoSlabLift {
  0% { transform: scale(1) translateY(0); }
  35% { transform: scale(1.09) translateY(-2px); }
  62% { transform: scale(0.98) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes gymLogoSledPush {
  0% { transform: translateX(0) skewX(0deg); }
  28% { transform: translateX(4px) skewX(-6deg); }
  55% { transform: translateX(5px) skewX(-5deg); }
  76% { transform: translateX(-2px) skewX(3deg); }
  100% { transform: translateX(0); }
}

@keyframes gymLogoTireFlip {
  0% { transform: rotate(0deg) translateY(0); }
  34% { transform: rotate(-22deg) translateY(-2px); }
  62% { transform: rotate(12deg) translateY(0); }
  100% { transform: rotate(0deg) translateY(0); }
}

@keyframes gymLogoRackPull {
  0% { transform: translateY(0) scaleX(1); }
  24% { transform: translateY(-2px) scaleX(1.07); }
  48% { transform: translateY(0) scaleX(0.99); }
  72% { transform: translateY(-1px) scaleX(1.04); }
  100% { transform: translateY(0) scaleX(1); }
}

@keyframes gymLogoAnvilSmash {
  0% { transform: translateY(-4px) scaleY(1); }
  42% { transform: translateY(3px) scaleY(0.9); }
  58% { transform: translateY(1px) scaleY(1.02); }
  100% { transform: translateY(0) scaleY(1); }
}

@keyframes gymLogoYokeRow {
  0% { transform: translateX(0) scale(1); }
  20% { transform: translateX(-3px) scale(1.03); }
  40% { transform: translateX(3px) scale(0.99); }
  62% { transform: translateX(-2px) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes gymLogoCageRumble {
  0% { transform: rotate(0deg) translateX(0); }
  16% { transform: rotate(-4deg) translateX(-1px); }
  34% { transform: rotate(5deg) translateX(1px); }
  52% { transform: rotate(-3deg) translateX(-1px); }
  70% { transform: rotate(4deg) translateX(1px); }
  100% { transform: rotate(0deg); }
}

@keyframes gymLogoAtlasStone {
  0% { transform: translateY(3px) scale(0.98); }
  45% { transform: translateY(-3px) scale(1.07); }
  68% { transform: translateY(1px) scale(0.99); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes gymLogoPlatformLog {
  0% { transform: rotate(0deg) translateX(0); }
  30% { transform: rotate(14deg) translateX(2px); }
  55% { transform: rotate(8deg) translateX(3px); }
  100% { transform: rotate(0deg) translateX(0); }
}

@keyframes gymLogoMonolith {
  0% { transform: scale(1) translateY(0); }
  38% { transform: scale(1.08) translateY(-2px); }
  64% { transform: scale(1.02) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes gymLogoElectroChain {
  0% { transform: skewX(0deg) scale(1); opacity: 1; filter: none; }
  18% { transform: skewX(-8deg) scale(1.03); opacity: 0.82; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45)); }
  42% { transform: skewX(6deg) scale(0.98); opacity: 1; filter: none; }
  70% { transform: skewX(-4deg) scale(1.02); opacity: 0.9; filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.35)); }
  100% { transform: skewX(0deg) scale(1); opacity: 1; filter: none; }
}

@keyframes gymLogoBoulderRoll {
  0% { transform: rotate(0deg) translateX(0); }
  32% { transform: rotate(18deg) translateX(3px); }
  58% { transform: rotate(26deg) translateX(4px); }
  100% { transform: rotate(0deg) translateX(0); }
}

@keyframes gymLogoHammerStrike {
  0% { transform: rotate(0deg) translateY(0); }
  34% { transform: rotate(-18deg) translateY(-2px); }
  52% { transform: rotate(8deg) translateY(1px); }
  74% { transform: rotate(-6deg) translateY(0); }
  100% { transform: rotate(0deg); }
}

.gym-obscured {
  opacity: 0.7;
}

.gym-progress {
  display: grid;
  gap: 6px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 30, 44, 0.7);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(79, 122, 166, 0.9), rgba(126, 184, 255, 0.95));
  border-radius: inherit;
}

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

.card.dossier {
  background: linear-gradient(180deg, rgba(252, 247, 236, 0.92), rgba(232, 224, 206, 0.92));
  border: 1px solid rgba(64, 48, 34, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  color: #2b2016;
  font-family: "Courier New", Courier, monospace;
}

.card.dossier h2,
.card.dossier .section-title {
  color: #3b2a1a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.card.dossier .stat-grid div,
.card.dossier .helper,
.card.dossier .program-meta,
.card.dossier .program-title {
  color: #2f241a;
}

.card.dossier .actions button,
.card.dossier .ghost,
.card.dossier .ghost-link {
  border-color: rgba(64, 48, 34, 0.4);
}

.program-title {
  font-size: 12pt;
  font-weight: 600;
}

.program-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.view[data-route="education"] .program-meta {
  display: block;
  line-height: 1.35;
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.program-stack {
  display: grid;
  gap: 8px;
}

.company-card {
  display: grid;
  gap: 10px;
}

.company-card.is-current-company {
  box-shadow: inset 0 0 0 1px rgba(79, 122, 166, 0.35);
}

.company-role-list {
  display: grid;
  gap: 10px;
}

.company-role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 152, 186, 0.16);
  background: rgba(13, 24, 38, 0.54);
}

.company-role-row.is-current-role {
  border-color: rgba(79, 122, 166, 0.42);
  background: rgba(25, 42, 62, 0.68);
}

.company-role-row.is-locked {
  opacity: 0.9;
}

.company-role-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.company-role-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.company-role-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
}

.company-role-pay {
  color: #dce8f8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.company-role-skills,
.company-role-missing {
  font-size: 12px;
}

.company-role-skill-link {
  appearance: none;
  border: 1px solid rgba(104, 148, 196, 0.28);
  background: rgba(73, 114, 158, 0.18);
  color: #dcecff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  cursor: pointer;
}

.company-role-skill-link:hover,
.company-role-skill-link:focus-visible {
  background: rgba(97, 148, 203, 0.26);
  border-color: rgba(126, 179, 236, 0.42);
  color: #f5fbff;
  text-decoration: none;
}

.company-role-missing {
  color: #d18f7e;
}

.company-member-self {
  box-shadow: inset 0 0 0 1px rgba(79, 122, 166, 0.32);
}

body.light-mode .company-card.is-current-company {
  box-shadow: inset 0 0 0 1px rgba(54, 88, 122, 0.22);
}

body.light-mode .company-role-row {
  border-color: rgba(89, 108, 132, 0.16);
  background: rgba(241, 245, 251, 0.9);
}

body.light-mode .company-role-row.is-current-role {
  border-color: rgba(72, 110, 150, 0.28);
  background: rgba(224, 233, 244, 0.96);
}

body.light-mode .company-role-pay {
  color: #345376;
}

body.light-mode .company-role-skill-link {
  border-color: rgba(72, 110, 150, 0.22);
  background: rgba(98, 136, 178, 0.14);
  color: #28405d;
}

body.light-mode .company-role-skill-link:hover,
body.light-mode .company-role-skill-link:focus-visible {
  background: rgba(89, 130, 174, 0.22);
  border-color: rgba(72, 110, 150, 0.34);
  color: #1d314b;
}

body.light-mode .company-role-missing {
  color: #a15b45;
}

body.light-mode .company-member-self {
  box-shadow: inset 0 0 0 1px rgba(72, 110, 150, 0.24);
}

.education-skill-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  align-content: flex-start;
}

.education-skill-chip {
  border: 1px solid rgba(79, 122, 166, 0.4);
  background: rgba(79, 122, 166, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: #dbe6f5;
}

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

.real-estate-property {
  gap: 10px;
}

.real-estate-upgrades {
  display: grid;
  gap: 8px;
}

.real-estate-upgrade {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(17, 29, 43, 0.35);
  display: grid;
  gap: 6px;
}

.quantity-input {
  width: 90px;
}

.commerce-inline-notice-host {
  min-height: 0;
  margin-top: 0;
}

.commerce-inline-notice-host.is-active {
  margin-top: 10px;
}

.commerce-inline-notice {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 42px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(92, 136, 185, 0.28);
  background:
    radial-gradient(circle at top right, rgba(112, 164, 223, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(17, 30, 46, 0.96), rgba(10, 19, 31, 0.94));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.commerce-inline-notice.is-closing {
  opacity: 0;
  transform: translateY(-6px);
  filter: saturate(0.92);
}

.commerce-inline-notice[data-tone="error"] {
  border-color: rgba(208, 118, 118, 0.34);
  background:
    radial-gradient(circle at top right, rgba(208, 118, 118, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(42, 20, 24, 0.96), rgba(24, 11, 14, 0.94));
}

.commerce-inline-notice-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.commerce-inline-notice-dismiss:hover,
.commerce-inline-notice-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}

.commerce-inline-notice-body {
  display: grid;
  gap: 6px;
}

.commerce-inline-notice-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(223, 233, 248, 0.76);
}

.commerce-inline-notice-message {
  color: #eef5ff;
  line-height: 1.4;
  font-size: 14px;
}

.commerce-inline-notice-close {
  justify-self: start;
}

.result {
  border: 1px dashed rgba(230, 237, 245, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
  min-height: 120px;
  color: var(--muted);
  white-space: pre-wrap;
}

.casino-table {
  display: grid;
  gap: 12px;
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 6px,
      rgba(0, 0, 0, 0.18) 6px,
      rgba(0, 0, 0, 0.18) 12px
    ),
    radial-gradient(circle at bottom, #0f5a3c, #0a3f2a 60%);
  color: #f1f5fb;
  border: 1px solid rgba(230, 237, 245, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.casino-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.casino-summary-title {
  font-weight: 600;
}

.casino-summary-meta {
  font-size: 13px;
  color: rgba(246, 242, 234, 0.85);
}

.casino-hand {
  display: grid;
  gap: 6px;
}

.casino-hand.active {
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.casino-hand-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(246, 242, 234, 0.9);
}

.casino-hand-wager {
  font-size: 12px;
  color: rgba(246, 242, 234, 0.75);
}

.casino-player-hands {
  display: grid;
  gap: 10px;
}

.casino-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.playing-card {
  width: 38px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid rgba(8, 12, 18, 0.6);
  background: linear-gradient(180deg, #f4f7fb 0%, #dfe6ef 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #141a22;
  box-shadow: 0 6px 14px rgba(5, 7, 10, 0.35);
}

.playing-card.red {
  color: #b0412d;
}

.playing-card.face-down {
  background: linear-gradient(135deg, #1a2a3f, #223651);
  color: rgba(241, 245, 251, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.playing-card.small {
  width: 30px;
  height: 42px;
  font-size: 12px;
  border-radius: 8px;
}

.casino-hand.small .casino-hand-title {
  font-size: 12px;
  color: rgba(241, 245, 251, 0.7);
  text-transform: none;
  letter-spacing: 0;
}

.casino-history-card {
  display: grid;
  gap: 8px;
}

.casino-history-hands {
  display: grid;
  gap: 6px;
}

.tooltip {
  position: relative;
  cursor: default;
}

.app-tooltip-layer {
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(8, 12, 18, 0.92);
  color: #fff;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  text-align: left;
  min-width: 0;
  width: max-content;
  max-width: min(460px, calc(100vw - 24px));
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 80ms ease;
}

.app-tooltip-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.tooltip[data-tooltip=""]::after,
.tooltip:not([data-tooltip])::after {
  display: none;
}

.js-tooltips .tooltip:hover::after,
.js-tooltips .tooltip:focus-visible::after {
  display: none !important;
}

.tooltip:hover::after,
.tooltip:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 12, 18, 0.92);
  color: #fff;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  text-align: left;
  min-width: 0;
  width: max-content;
  max-width: min(420px, calc(100vw - 24px));
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  z-index: 10;
  pointer-events: none;
}

.sidebar .tooltip:hover::after,
.sidebar .tooltip:focus-visible::after {
  left: 50%;
  transform: translateX(-50%);
  max-width: min(460px, calc(100vw - 28px));
}

.feed {
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  max-height: 320px;
  overflow: auto;
}

.feed-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 784px) {
  .hero-card {
    width: 100%;
  }

  .view[data-route="inventory"] .grid {
    grid-template-columns: 1fr;
  }

  .view[data-route="inventory"] #inventoryMainCard {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .view-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .view-title {
    flex: 0 0 auto;
  }

  .view-links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .view-links::-webkit-scrollbar {
    height: 0;
  }
}

@media (max-width: 1080px) {
  .view-title {
    margin-left: 10px;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) clamp(150px, 24vw, 240px) auto;
    grid-template-areas: "logo utility search right";
    align-items: center;
    gap: 6px 8px;
    padding: 8px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 45%),
      var(--panel);
    box-shadow: 0 6px 14px rgba(8, 14, 22, 0.2);
    border: none;
  }

  .topbar-left {
    display: contents;
  }

  .topbar-center {
    grid-area: search;
    display: block;
    min-width: 0;
    width: auto;
  }

  .topbar-right {
    grid-area: right;
    min-width: 0;
    gap: 6px;
    justify-self: end;
  }

  .topbar-eyebrow {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border-radius: 10px;
    letter-spacing: 0.16em;
    font-size: 28px;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .topbar-utility-links {
    grid-area: utility;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
  }

  .topbar-utility-links::-webkit-scrollbar {
    height: 0;
  }

  .topbar-search {
    width: 100%;
    border-radius: 9px;
    border: 1px solid rgba(79, 122, 166, 0.2);
    background: rgba(12, 18, 26, 0.78);
    overflow: visible;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .topbar-search-context-button {
    min-width: 70px;
    padding: 0 7px;
    font-size: 9px;
  }

  .topbar-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    padding: 6px 8px;
    font-size: 11px;
  }

  .topbar-search input::placeholder {
    color: var(--muted);
    opacity: 0.85;
  }

  .topbar-search .topbar-search-submit {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 30px;
    height: 100%;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    box-shadow: none;
    transform: none;
  }

  .topbar-search .topbar-search-submit:hover {
    color: var(--ink);
    background: rgba(79, 122, 166, 0.08);
    box-shadow: none;
    transform: none;
  }

  .topbar-quick-links {
    display: flex;
    flex: 0 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
    max-width: min(30vw, 220px);
  }

  .topbar-quick-links::-webkit-scrollbar {
    height: 0;
  }

  .topbar-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(79, 122, 166, 0.06);
    border: 1px solid rgba(79, 122, 166, 0.12);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .topbar-quick-link-log {
    color: var(--ink);
    background: transparent;
    border: none;
    width: 24px;
    min-width: 24px;
    padding: 0;
    letter-spacing: 0;
    text-transform: none;
  }

  .topbar-server-time {
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  .topbar-server-time-icon {
    font-size: 12px;
  }

  .user-menu-toggle {
    width: 32px;
    height: 32px;
  }

  .user-avatar {
    width: 24px;
    height: 24px;
  }

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

  .sidebar {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    gap: 0;
  }

  .sidebar > .nav {
    order: 1;
  }

  .sidebar > .ticker {
    order: 2;
  }

  .sidebar > .sidebar-info {
    order: 3;
  }

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

  .gym-logo-quadrants {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gym-logo-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px;
  }

  .gym-logo-empty {
    min-height: 0;
  }

  .sidebar-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    background: var(--panel);
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(8, 14, 22, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .sidebar-info::-webkit-scrollbar {
    height: 0;
  }

  .sidebar-info .section-title {
    display: none;
  }

  .sidebar-info #sidebarInfo {
    order: 1;
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .sidebar-info #sidebarInfo.ticker-compact {
    display: flex;
    gap: 4px;
  }

  .sidebar-info #sidebarInfo .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 999px;
    border: none;
    background: rgba(24, 34, 48, 0.75);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .sidebar-info #sidebarInfo .ticker-item:nth-child(1),
  .sidebar-info #sidebarInfo .ticker-item:nth-child(2),
  .sidebar-info #sidebarInfo .ticker-item:nth-child(5) {
    display: none;
  }

  .sidebar-info #sidebarInfo .ticker-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.14em;
  }

  .sidebar-info #sidebarInfo
    .ticker-item[data-compact-info-key="cash"] {
    --sidebar-info-glyph: "$";
    --sidebar-info-glyph-fg: var(--accent-dark);
    --sidebar-info-glyph-bg: #fff;
    background: none;
  }

  .sidebar-info #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"] {
    --sidebar-info-glyph: "Ꞓ";
    --sidebar-info-glyph-fg: var(--accent-dark);
    --sidebar-info-glyph-bg: #fff;
    background: none;
  }

  .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"] .ticker-label,
  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-label {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"] .ticker-label::before,
  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-label::before {
    content: var(--sidebar-info-glyph, "");
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--sidebar-info-glyph-bg, #fff);
    color: var(--sidebar-info-glyph-fg, var(--accent-dark));
    margin-right: 1px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
  }

  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-label::before {
    font-size: 11px;
    font-weight: 900;
  }

  .sidebar-info #sidebarInfo .ticker-value {
    margin-left: 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    text-align: left;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
  }

  .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"] .ticker-value,
  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-value {
    font-size: 11px;
  }

  .sidebar-info #sidebarInfo .ticker-sub,
  .sidebar-info #sidebarInfo .ticker-progress {
    display: none !important;
  }

  .sidebar-info #infoGlyphs {
    order: 2;
    flex: 0 0 auto;
    display: flex;
    grid-template-columns: none;
    gap: 3px;
    align-items: center;
    padding-bottom: 0;
    overflow: visible;
  }

  .sidebar-info .info-glyph {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: none;
    background: none;
    font-size: 12px;
    scroll-snap-align: start;
  }

  body.light-mode .topbar-eyebrow {
    background: none;
    border: 0;
    box-shadow: none;
  }

  body.light-mode .topbar-search {
    background: rgba(244, 246, 250, 0.94);
    border-color: rgba(59, 98, 139, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  body.light-mode .topbar-search .topbar-search-submit:hover {
    background: rgba(59, 98, 139, 0.08);
  }

  body.light-mode .sidebar-info #sidebarInfo .ticker-item {
    background: rgba(244, 246, 250, 0.9);
  }

  body.light-mode .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"],
  body.light-mode
    .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"] {
    --sidebar-info-glyph-fg: #fff;
    --sidebar-info-glyph-bg: var(--accent-dark);
    background: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding: 4px;
    margin: 0;
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 6px 14px rgba(8, 14, 22, 0.2);
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }

  .nav.dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
    cursor: grabbing;
  }

  .nav::-webkit-scrollbar {
    height: 0;
  }

  .nav-link {
    flex: 0 0 52px;
    min-height: 46px;
    padding: 0 2px;
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    white-space: normal;
    scroll-snap-align: start;
  }

  .nav-icon {
    width: auto;
    font-size: 14px;
  }

  .nav-link span:last-child {
    font-size: 10px;
    line-height: 1.05;
  }

  .ticker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(8, 14, 22, 0.2);
  }

  body.has-mobile-faction-chain .ticker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .ticker-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    row-gap: 2px;
    column-gap: 4px;
    padding: 6px 6px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(17, 27, 39, 0.7);
    min-width: 0;
  }

  body.light-mode .ticker-item {
    background: rgba(244, 246, 250, 0.85);
  }

  .ticker-label {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 8px;
    line-height: 1.15;
    letter-spacing: 0.14em;
    padding-block: 1px;
    min-width: 0;
    white-space: nowrap;
    overflow-x: hidden;
    overflow-y: visible;
    text-overflow: ellipsis;
  }

  .ticker-sub {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    text-align: right;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker-value {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    font-size: 10px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker-progress {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
  }

}
#dmThreadCard {
  display: none;
}

#dmThreadFeed {
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}

#dmThreadForm {
  margin-top: 8px;
}

@media (max-width: 800px) {
  body.has-mobile-faction-chain .ticker .ticker-item .ticker-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    max-width: 12px;
    font-size: 0;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    overflow: visible;
    text-overflow: clip;
  }

  body.has-mobile-faction-chain .ticker .ticker-item .ticker-label::before {
    color: var(--muted);
    font-size: var(--ticker-label-glyph-size, 10px);
    line-height: 1;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: relative;
  }

  .topbar-utility-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-area: utility;
    flex: 0 0 auto;
  }

  .topbar-utility-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2350;
    width: max-content;
    max-width: calc(100% - 16px);
    padding: 6px;
    border-radius: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(8, 14, 22, 0.24);
    overflow: visible;
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar.is-topbar-utility-open .topbar-utility-links {
    display: flex;
  }

  .topbar.is-topbar-utility-open .topbar-utility-toggle {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
  }

  body.light-mode .topbar-utility-toggle {
    background: transparent;
    border-color: transparent;
  }

  body.light-mode .topbar-utility-toggle:hover,
  body.light-mode .topbar-utility-toggle:focus-visible,
  body.light-mode .topbar.is-topbar-utility-open .topbar-utility-toggle {
    background: transparent;
    border-color: transparent;
  }

  body.light-mode .topbar-utility-links {
    background: var(--card);
    border-color: rgba(59, 98, 139, 0.18);
  }

  .ticker .ticker-item[data-resource="energy"] {
    --ticker-label-glyph: "⚡";
    --ticker-label-glyph-emoji: "⚡️";
  }

  .ticker .ticker-item[data-resource="audacity"] {
    --ticker-label-glyph: "⚠";
    --ticker-label-glyph-emoji: "⚠️";
  }

  .ticker .ticker-item[data-resource="pleasure"] {
    --ticker-label-glyph: "☺";
    --ticker-label-glyph-emoji: "😊";
  }

  .ticker .ticker-item[data-resource="life"] {
    --ticker-label-glyph: "♥";
    --ticker-label-glyph-emoji: "❤️";
  }

  .ticker .ticker-item[data-resource="factionChain"] {
    --ticker-label-glyph: "🔗";
    --ticker-label-glyph-emoji: "🔗";
    --ticker-label-glyph-size: 10px;
  }

  .ticker .ticker-item[data-resource="drugCooldown"] {
    --ticker-label-glyph: "⚗";
  }

  .ticker .ticker-item[data-resource="medicalCooldown"] {
    --ticker-label-glyph: "✚";
    --ticker-label-glyph-emoji: "💉";
  }

  .ticker .ticker-item[data-resource="boosterCooldown"] {
    --ticker-label-glyph-emoji: "🍬";
    --ticker-label-glyph: "🍭";
    --ticker-label-glyph-fallback: "🍫";
  }

  .ticker .ticker-item[data-resource="nextTick"] {
    --ticker-label-glyph: "⏱";
  }

  .ticker .ticker-item .ticker-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    max-width: 12px;
    font-size: 0;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    overflow: visible;
    text-overflow: clip;
  }

  .ticker .ticker-item .ticker-label::before {
    content: var(
      --ticker-label-glyph-emoji,
      var(--ticker-label-glyph, var(--ticker-label-glyph-fallback, "•"))
    );
    color: var(--muted);
    font-size: var(--ticker-label-glyph-size, 10px);
    line-height: 1;
    margin-right: 0;
  }

  .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"] .ticker-label,
  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-label {
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    gap: 0;
    font-size: 0;
    letter-spacing: 0;
    overflow: visible;
  }

  .sidebar-info #sidebarInfo .ticker-item[data-compact-info-key="cash"] .ticker-label::before,
  .sidebar-info
    #sidebarInfo
    .ticker-item[data-compact-info-key="cold-bucks"]
    .ticker-label::before {
    margin-right: 0;
  }
}

@media (max-width: 540px) {
  .ticker .ticker-item[data-resource] .ticker-sub {
    display: none;
  }
}

@media (max-width: 450px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "logo right right"
      "utility utility search";
    gap: 7px 8px;
    padding: 8px;
  }

  .topbar-center {
    width: clamp(120px, 34vw, 164px);
  }

  .topbar-eyebrow {
    padding: 0;
    min-height: 30px;
    font-size: 28px;
    letter-spacing: 0.12em;
  }

  .topbar-quick-link {
    min-height: 26px;
    padding: 0 6px;
    font-size: 9px;
  }

  .topbar-quick-links {
    max-width: min(42vw, 170px);
  }

  .topbar-search input {
    padding: 7px 8px;
    font-size: 11px;
  }

  .topbar-search .topbar-search-submit {
    width: 30px;
    font-size: 13px;
  }

  .ticker {
    gap: 4px;
    padding: 6px;
  }

  .ticker-item {
    padding: 6px 5px;
    column-gap: 4px;
  }

  .ticker-label {
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .ticker-sub {
    font-size: 7px;
  }

  .ticker-value {
    font-size: 9px;
  }

  .sidebar-info {
    padding: 4px 0;
  }

  .card {
    padding: 10px;
  }

  .card-head-side {
    align-self: flex-start;
  }

  .card-tools {
    align-items: flex-start;
  }

  .card h2 {
    font-size: 16px;
  }

  .view-title {
    font-size: 20px;
  }

  .view-link {
    font-size: 11px;
  }

  .gym-card-meta {
    font-size: 11px;
  }

  .gym-stat-row,
  .gym-stat-activity {
    font-size: 10px;
  }

  .gym-stat-row {
    grid-template-columns: 50px 125px 30px 1fr;
  }
}

@media (max-width: 410px) {
  .ticker .ticker-item[data-resource="energy"] .ticker-value,
  .ticker .ticker-item[data-resource="audacity"] .ticker-value,
  .ticker .ticker-item[data-resource="pleasure"] .ticker-value,
  .ticker .ticker-item[data-resource="life"] .ticker-value {
    font-size: 0;
    letter-spacing: 0;
  }

  .ticker .ticker-item[data-resource="energy"] .ticker-value::before,
  .ticker .ticker-item[data-resource="audacity"] .ticker-value::before,
  .ticker .ticker-item[data-resource="pleasure"] .ticker-value::before,
  .ticker .ticker-item[data-resource="life"] .ticker-value::before {
    content: attr(data-current);
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    color: inherit;
  }
}

@media (max-width: 600px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo utility right";
  }

  .topbar-center {
    display: none;
    grid-area: search;
    width: 100%;
  }

  .topbar-right {
    gap: 6px;
  }

  .topbar-quick-links {
    order: 2;
    max-width: none;
  }

  .topbar-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    order: 1;
  }

  .topbar-server-time {
    order: 3;
  }

  .topbar-right .user-menu-toggle {
    order: 4;
  }

  .topbar.is-topbar-search-open {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "logo utility right"
      "search search search";
    align-items: center;
  }

  .topbar.is-topbar-search-open .topbar-center {
    display: block;
    margin-top: 2px;
    animation: rise 160ms ease;
  }

  .topbar.is-topbar-search-open .topbar-search-toggle {
    background: rgba(79, 122, 166, 0.16);
    color: var(--ink);
    border-color: rgba(79, 122, 166, 0.24);
  }

  body.light-mode .topbar-search-toggle {
    background: rgba(244, 246, 250, 0.9);
    border-color: rgba(59, 98, 139, 0.16);
  }

  body.light-mode .topbar-search-toggle:hover,
  body.light-mode .topbar-search-toggle:focus-visible {
    background: rgba(59, 98, 139, 0.1);
    border-color: rgba(59, 98, 139, 0.24);
  }

body.light-mode .topbar.is-topbar-search-open .topbar-search-toggle {
    background: rgba(59, 98, 139, 0.12);
    border-color: rgba(59, 98, 139, 0.22);
  }

}

.forum-browser {
  display: grid;
  gap: 14px;
}

.community-overview-strip {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(79, 107, 143, 0.2);
  background: linear-gradient(180deg, rgba(18, 28, 44, 0.94), rgba(12, 18, 29, 0.88));
}

.community-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.community-overview-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(79, 107, 143, 0.18);
  background: rgba(13, 20, 31, 0.74);
}

.community-overview-card-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.community-overview-list {
  display: grid;
  gap: 8px;
}

.community-overview-item {
  display: grid;
  gap: 4px;
  justify-items: start;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(79, 107, 143, 0.18);
  background: rgba(21, 31, 47, 0.9);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.community-overview-item strong {
  font-size: 14px;
  line-height: 1.2;
}

.community-overview-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.community-overview-item:hover,
.community-overview-item:focus-visible {
  border-color: rgba(102, 155, 214, 0.34);
  background: rgba(30, 43, 64, 0.96);
}

.forum-toolbar {
  display: grid;
  gap: 10px;
}

.forum-category-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forum-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(84, 111, 147, 0.22);
  background: rgba(17, 25, 38, 0.68);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.forum-category-chip strong {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.forum-category-chip.is-selected,
.forum-category-chip:hover,
.forum-category-chip:focus-visible {
  border-color: rgba(100, 154, 214, 0.34);
  background: rgba(32, 48, 73, 0.86);
}

.forum-toolbar-actions {
  display: flex;
  justify-content: flex-end;
}

.forum-compose-toggle {
  min-height: 36px;
}

.forum-category-description {
  padding: 10px 12px;
  border: 1px solid rgba(84, 111, 147, 0.2);
  background: rgba(16, 23, 34, 0.58);
  color: var(--muted);
}

.forum-browser-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.forum-list-panel,
.forum-detail-panel {
  min-width: 0;
  border: 1px solid rgba(79, 107, 143, 0.22);
  background: linear-gradient(180deg, rgba(17, 25, 38, 0.92), rgba(10, 16, 27, 0.9));
}

.forum-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(79, 107, 143, 0.16);
}

.forum-panel-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
}

.forum-panel-meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.forum-thread-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.forum-thread-row {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  border: 1px solid rgba(79, 107, 143, 0.18);
  background: rgba(14, 20, 30, 0.74);
}

.forum-thread-row.is-selected {
  border-color: rgba(106, 164, 224, 0.34);
  background: rgba(27, 40, 61, 0.88);
}

.forum-thread-row-head,
.forum-thread-footer,
.forum-post-head,
.forum-thread-starter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.forum-thread-open {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.forum-thread-open:hover,
.forum-thread-open:focus-visible,
.forum-author-button:hover,
.forum-author-button:focus-visible {
  color: var(--accent);
}

.forum-thread-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(120, 156, 198, 0.24);
  background: rgba(25, 43, 27, 0.58);
  color: #cce9c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.forum-thread-state[data-state="closed"] {
  background: rgba(74, 33, 33, 0.55);
  color: #f2c2be;
}

.forum-thread-preview,
.forum-post-body {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.forum-thread-meta,
.forum-thread-footer-time,
.forum-post-meta,
.forum-thread-detail-meta,
.forum-thread-eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.forum-author-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.forum-author-button-text {
  font-weight: 600;
}

.forum-empty-state,
.forum-closed-notice {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px dashed rgba(84, 111, 147, 0.24);
  color: var(--muted);
}

.forum-thread-hero {
  padding: 16px 18px 8px;
  border-bottom: 1px solid rgba(79, 107, 143, 0.14);
}

.forum-thread-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.02;
}

.forum-thread-starter {
  padding: 12px 18px 0;
}

.forum-post-list {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
}

.forum-post-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(79, 107, 143, 0.18);
  background: rgba(15, 22, 33, 0.78);
}

.forum-compose-form,
.forum-reply-form {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.forum-compose-form textarea,
.forum-reply-form textarea {
  min-height: 150px;
}

.forum-reply-form textarea {
  min-height: 120px;
}

body.light-mode .forum-category-chip {
  border-color: rgba(76, 106, 144, 0.16);
  background: rgba(255, 255, 255, 0.84);
}

body.light-mode .forum-category-chip strong,
body.light-mode .community-overview-card-head,
body.light-mode .forum-category-description,
body.light-mode .forum-thread-preview,
body.light-mode .forum-post-body,
body.light-mode .forum-thread-meta,
body.light-mode .forum-thread-footer-time,
body.light-mode .forum-post-meta,
body.light-mode .forum-thread-detail-meta,
body.light-mode .forum-thread-eyebrow,
body.light-mode .forum-empty-state,
body.light-mode .forum-closed-notice {
  color: var(--muted);
}

body.light-mode .forum-browser-panels .forum-list-panel,
body.light-mode .forum-browser-panels .forum-detail-panel,
body.light-mode .community-overview-strip,
body.light-mode .community-overview-card,
body.light-mode .community-overview-item,
body.light-mode .forum-category-description,
body.light-mode .forum-thread-row,
body.light-mode .forum-post-card {
  border-color: rgba(76, 106, 144, 0.14);
  background: rgba(255, 255, 255, 0.9);
}

body.light-mode .forum-thread-row.is-selected {
  background: rgba(232, 241, 250, 0.96);
  border-color: rgba(91, 128, 170, 0.28);
}

.wiki-page-summary {
  margin: 0 0 12px;
}

.wiki-page-body {
  min-height: 240px;
  line-height: 1.65;
}

.wiki-page-body h1,
.wiki-page-body h2,
.wiki-page-body h3,
.wiki-page-body h4 {
  margin: 0 0 12px;
}

.wiki-page-body p,
.wiki-page-body ul,
.wiki-page-body ol,
.wiki-page-body blockquote,
.wiki-page-body hr {
  margin: 0 0 14px;
}

.wiki-page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.wiki-page-body a {
  color: var(--accent-strong);
}

.wiki-editor-note {
  margin-top: -4px;
}

.faction-member-actions,
.faction-position-permissions {
  flex-wrap: wrap;
  gap: 8px;
}

.faction-resource-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.faction-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  width: 100%;
}

.faction-member-actions select,
.faction-member-actions input,
.faction-inline-form select,
.faction-inline-form input {
  min-width: 160px;
}

.faction-inline-form button {
  justify-self: start;
}

.faction-application-composer {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.faction-application-composer label {
  display: grid;
  gap: 6px;
}

.faction-application-composer textarea {
  min-height: 72px;
  resize: vertical;
}

.profile-faction-link,
.faction-public-link-row a,
.faction-public-roster-row a {
  color: var(--accent-strong);
  text-decoration: none;
}

.profile-faction-link:hover,
.faction-public-link-row a:hover,
.faction-public-roster-row a:hover {
  text-decoration: underline;
}

.faction-public-profile-card.hidden {
  display: none;
}

.faction-public-hero {
  border-color: color-mix(in srgb, var(--accent-strong) 28%, var(--border-soft));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-strong) 12%, transparent), transparent 46%),
    var(--panel-dark);
}

.faction-public-bio {
  margin-top: 8px;
}

.faction-public-link-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.faction-public-roster {
  display: grid;
  gap: 6px;
}

.faction-public-roster-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) minmax(110px, 1fr) minmax(74px, 0.7fr) minmax(118px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-dark) 82%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.faction-public-roster-row a {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 720px) {
  .faction-public-roster-row {
    grid-template-columns: 1fr;
  }
}

.admin-dbops-log {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(120, 150, 190, 0.2);
  background: rgba(7, 14, 24, 0.92);
  color: rgba(226, 235, 248, 0.9);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 10px;
  max-height: 320px;
  overflow: auto;
}

.admin-dbops-row-details {
  border: 1px solid rgba(120, 150, 190, 0.14);
  border-radius: 8px;
  background: rgba(8, 16, 28, 0.22);
}

.admin-dbops-row-details summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-dbops-row-details[open] summary {
  border-bottom: 1px solid rgba(120, 150, 190, 0.12);
}

.admin-dbops-row-detail-list {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
}

.admin-dbops-job-controls {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-dbops-job-failed {
  border-color: rgba(210, 92, 92, 0.65);
  background:
    linear-gradient(90deg, rgba(210, 92, 92, 0.12), transparent 34%),
    var(--panel);
}

.admin-dbops-job-running,
.admin-dbops-job-queued {
  border-color: rgba(130, 170, 210, 0.55);
}

.admin-dbops-job-error {
  color: rgba(255, 176, 176, 0.95);
}

.admin-dbops-drill-step {
  border-left: 3px solid rgba(130, 170, 210, 0.45);
}

.admin-dbops-drill-ready {
  border-color: rgba(110, 190, 145, 0.6);
  background:
    linear-gradient(90deg, rgba(110, 190, 145, 0.09), transparent 32%),
    var(--panel);
}

.admin-dbops-drill-blocked {
  border-color: rgba(210, 150, 92, 0.6);
}

.admin-dbops-guide {
  border-color: rgba(130, 170, 210, 0.28);
  background:
    linear-gradient(135deg, rgba(80, 120, 160, 0.08), transparent 42%),
    var(--panel);
}

.admin-dbops-guide.is-collapsed {
  gap: 6px;
}

.admin-dbops-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-dbops-guide-toggle {
  flex: 0 0 auto;
  min-width: 112px;
}

.admin-dbops-guide-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(120, 150, 190, 0.16);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.32);
}

@media (max-width: 720px) {
  .admin-dbops-job-controls {
    grid-template-columns: 1fr;
  }

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

.faction-toggle-row {
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.faction-toggle-row input {
  width: auto;
  margin: 0;
}

.faction-search-results {
  display: grid;
  gap: 6px;
}

.faction-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel-dark);
  color: inherit;
  text-align: left;
}

.faction-search-result.is-selected {
  background: color-mix(in srgb, var(--accent-strong) 14%, var(--panel-dark));
}

.faction-review-note {
  width: 100%;
  min-height: 64px;
  margin-top: 10px;
  resize: vertical;
}

.faction-permission-picker {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.faction-permission-group {
  margin: 0;
  display: grid;
  gap: 6px;
  min-inline-size: 0;
  padding: 7px 8px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-dark) 88%, transparent);
}

.faction-permission-group legend {
  padding: 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.faction-permission-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 10px;
}

.faction-permission-picker .faction-permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 0;
  min-height: 0;
  cursor: pointer;
}

.faction-permission-picker .faction-permission-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent-strong);
}

.faction-permission-picker .faction-permission-option span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.faction-position-default-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faction-position-default-row input {
  width: auto;
}

@media (min-width: 860px) {
  .forum-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

@media (max-width: 1080px) {
  .forum-browser-panels {
    grid-template-columns: 1fr;
  }
}
