:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #14202e;
  --muted: #627084;
  --line: #d8e0ea;
  --soft: #f6f8fb;
  --accent: #0c8f77;
  --accent-dark: #096c5a;
  --blue: #305c96;
  --amber: #b86b00;
  --danger: #b83a34;
  --shadow: 0 18px 40px rgba(30, 45, 62, .10);
}

body.dark {
  --bg: #0f1720;
  --panel: #162231;
  --ink: #eef5f8;
  --muted: #9fb0c3;
  --line: #2d4056;
  --soft: #111b27;
  --accent: #16a085;
  --accent-dark: #58d5bf;
  --blue: #6aa3e8;
  --amber: #e0a64b;
  --danger: #df6a63;
  --shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

.login-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 28px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(12, 143, 119, .22), transparent 36%),
    radial-gradient(circle at bottom right, rgba(214, 179, 76, .24), transparent 30%),
    linear-gradient(135deg, #09131d 0%, #101b29 50%, #0d1621 100%);
}

body.auth-locked .login-shell { display: grid; }
body.auth-locked .app { display: none; }

.login-stage {
  width: min(1240px, 100%);
  margin: min(28px, 4vh) auto;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(420px, 520px);
  gap: 24px;
  align-items: center;
}

.login-hero, .login-card {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
}

.maintenance-card {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .30);
  background:
    linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.035)),
    linear-gradient(135deg, rgba(12, 143, 119, .20), rgba(48, 92, 150, .16));
  color: #eef5f8;
  padding: 34px;
}
.maintenance-card[hidden] { display: none; }
.maintenance-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
}
.maintenance-card p {
  margin: 0;
  max-width: 62ch;
  color: rgba(238,245,248,.82);
  font-size: 16px;
  line-height: 1.65;
}
.maintenance-status {
  margin: 22px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(8, 16, 24, .34);
  display: grid;
  gap: 5px;
}
.maintenance-status strong { font-size: 16px; }
.maintenance-status span { color: rgba(238,245,248,.72); }

body.maintenance-mode .login-tabs-card { display: none; }
body.maintenance-mode.staff-login-open .login-tabs-card { display: block; }
body.maintenance-mode.staff-login-open .maintenance-card { display: none; }

.login-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 34px;
  background:
    radial-gradient(circle at top right, rgba(214, 179, 76, .18), transparent 28%),
    linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    linear-gradient(135deg, rgba(12, 143, 119, .18), rgba(48, 92, 150, .12));
  color: #eef5f8;
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 100%;
}

.login-logo-wrap {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 34px rgba(0, 0, 0, .22);
}

.login-logo {
  width: 64px;
  height: 64px;
  display: block;
}

.login-hero::after { content: none; }

.login-kicker, .login-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
}

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

.login-domain {
  color: #9eb0c4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.login-kicker {
  color: #d8efe9;
  background: rgba(12, 143, 119, .18);
  border: 1px solid rgba(113, 223, 199, .18);
}

.login-display {
  display: grid;
  gap: 6px;
}

.login-hero h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: .92;
  letter-spacing: -.04em;
}

.login-hero p {
  max-width: 360px;
  color: #bfd0df;
  font-size: 16px;
  line-height: 1.5;
}

.login-lead {
  font-size: 18px;
  max-width: 340px;
}

.login-stack {
  display: block;
  align-content: start;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding-right: 4px;
}

.login-card {
  padding: 24px;
  background: rgba(246, 248, 251, .98);
  color: #14202e;
  display: grid;
  gap: 10px;
}

.login-tabs-card {
  padding-top: 18px;
}

.login-tab-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.login-tab {
  border: 1px solid var(--line);
  background: #eef3f7;
  color: #334154;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.login-tab:hover {
  border-color: #bfd0df;
  transform: translateY(-1px);
}

.login-tab.active {
  background: linear-gradient(135deg, #0c8f77, #106c98);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(16, 108, 152, .18);
}

.login-tab-panel {
  display: none;
}

.login-tab-panel.active {
  display: block;
}

#donor-panel,
#support-panel {
  display: none;
}

.support-modal[hidden] {
  display: none;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 19, 29, .7);
  backdrop-filter: blur(4px);
}

.support-dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  margin: min(6vh, 48px) auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0,0,0,.28);
  display: grid;
  gap: 18px;
}

.support-network-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.support-network {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.support-network.active {
  background: linear-gradient(135deg, #0c8f77, #106c98);
  color: #fff;
  border-color: transparent;
}

.support-wallet-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: stretch;
}

.support-qr {
  min-width: 0;
  min-height: 180px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #0f1b28;
  background:
    linear-gradient(135deg, rgba(12, 143, 119, .18), rgba(16, 108, 152, .12)),
    repeating-linear-gradient(45deg, rgba(15,27,40,.08), rgba(15,27,40,.08) 10px, rgba(255,255,255,.4) 10px, rgba(255,255,255,.4) 20px);
  border: 1px solid var(--line);
}

.support-wallet-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.support-wallet-copy span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.support-wallet-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.support-wallet-copy code {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#support .panel,
#support .detail-stats,
#support .detail-stats article,
#support .community-grid,
#support .community-grid .panel {
  min-width: 0;
}

#support .split {
  grid-template-columns: minmax(0, 1fr);
}

#support .panel-head {
  flex-wrap: wrap;
  align-items: flex-start;
}

#support .panel-head span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#support .detail-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#support .community-grid {
  grid-template-columns: 1fr;
}

#support .detail-stats strong,
#support .detail-stats span,
#support .detail-stats small,
#support .community-grid strong,
#support .community-grid p,
#support .community-grid small {
  overflow-wrap: anywhere;
}

#support .community-grid .panel.compact {
  padding: 18px;
}

.login-card-primary {
  padding: 28px;
}

.login-card-secondary {
  background: rgba(255, 255, 255, .94);
}

.login-card input,
.login-card textarea {
  background: #ffffff;
  border: 1px solid #bcc9d8;
  color: #13202d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.login-card input::placeholder,
.login-card textarea::placeholder {
  color: #7b8999;
}

.login-card input:focus,
.login-card textarea:focus {
  border-color: #0c8f77;
  box-shadow: 0 0 0 3px rgba(12, 143, 119, .12);
}

.login-card-head h2 {
  margin: 10px 0 6px;
  font-size: 24px;
}

.login-card-head p {
  color: #627084;
  line-height: 1.55;
}

.login-card-head.compact h2 {
  font-size: 20px;
}

.login-card-head.compact p {
  font-size: 13px;
}

.login-badge {
  color: #12483e;
  background: #daf3ed;
}

.login-card label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #556273;
  margin-top: 4px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.login-actions.single {
  grid-template-columns: 1fr;
}

.login-actions button {
  min-height: 48px;
  border-radius: 12px;
}

.login-summary {
  margin-top: 4px;
  border-radius: 12px;
  padding: 13px 14px;
  background: #edf3f9;
  color: #415164;
  line-height: 1.5;
}

.login-summary.subtle {
  background: #f5f8fb;
  color: #556273;
}

.login-form-grid {
  display: grid;
  gap: 10px;
}

.login-help {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2px;
  color: #627084;
}

.login-help strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4f8;
  color: #193146;
  font-size: 12px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  color: #627084;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8e0ea;
}

.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
body.sidebar-compact .app { grid-template-columns: 92px 1fr; }
.sidebar {
  background: #101923;
  color: #eef5f8;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 8px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}
.brand strong { display: block; font-size: 16px; }
.brand span { color: #9fb0c3; font-size: 12px; }
.sidebar-toggle {
  background: #172435;
  border: 1px solid rgba(255,255,255,.12);
  color: #d8e5ef;
}
nav { display: grid; gap: 6px; }
.nav-label {
  color: #7890a8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 10px 12px 2px;
  text-transform: uppercase;
}
.nav {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b8c6d5;
  padding: 11px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav.active, .nav:hover { background: #203247; color: #fff; }
.nav-icon,
.panel-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
}
.nav-icon svg,
.panel-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.sidebar-compact .sidebar { padding: 14px 10px; }
body.sidebar-compact .brand { justify-content: center; padding-bottom: 14px; }
body.sidebar-compact .brand > div:not(.brand-mark),
body.sidebar-compact .nav-label,
body.sidebar-compact .sidebar-card { display: none; }
body.sidebar-compact .sidebar-toggle {
  padding: 8px 6px;
  font-size: 11px;
}
body.sidebar-compact nav { gap: 5px; }
body.sidebar-compact .nav {
  padding: 10px 0;
  text-align: center;
  justify-content: center;
  min-height: 42px;
  font-size: 0;
}
body.sidebar-compact .nav .nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}
body.sidebar-compact .nav::before {
  content: none;
}
.sidebar-card {
  margin-top: auto;
  background: #172435;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 13px;
}
.sidebar-card span { display: block; color: #56d0b8; margin: 5px 0; }
.sidebar-card small { color: #a9b8c8; line-height: 1.45; }

main { padding: 18px 22px 36px; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 25px; }
h2 { font-size: 16px; }
p { color: var(--muted); line-height: 1.5; }
button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 13px;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
body.dark button.ghost { background: #111b27; color: var(--ink); }
button:disabled {
  cursor: default;
  opacity: .52;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 9px 13px;
  font-weight: 800;
  text-decoration: none;
}
.button-link:hover { background: var(--accent-dark); }
.button-link.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
body.dark .button-link.ghost { background: #111b27; color: var(--ink); }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#top-logout-button { display: none; }
.account-button {
  min-width: 126px;
  display: flex;
  gap: 9px;
  align-items: center;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
  padding: 7px 11px;
}
.account-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0c8f77, #d6b34c);
  color: #fff;
  font-weight: 900;
}
.account-text {
  min-width: 0;
  display: grid;
  gap: 3px;
  line-height: 1;
}
.account-text strong { line-height: 1; }
.account-text small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
body.dark .account-button { background: #111b27; color: var(--ink); }
.global-search {
  flex: 1;
  max-width: 520px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.view { display: none; }
.view.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.detail-stats article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}
.detail-stats strong { display: block; margin-bottom: 5px; }
.detail-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--accent-dark);
}
.detail-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-stats strong,
.detail-stats span,
.detail-stats small {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-stats span { color: var(--muted); line-height: 1.45; }
.detail-stats small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
body.dark .detail-icon { color: #82dbc9; }
.stat, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.stat {
  padding: 14px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.stat:hover,
.stat.active,
.detail-card:hover,
.detail-card.active {
  border-color: rgba(34, 151, 131, .45);
  background: #f6fbf9;
}
body.dark .stat:hover,
body.dark .stat.active,
body.dark .detail-card:hover,
body.dark .detail-card.active {
  background: #132335;
}
.stat strong { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.stat span { display: block; font-size: 27px; font-weight: 900; margin-top: 6px; }
.site-mode-status {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(140px, .35fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
  margin: -2px 0 12px;
  padding: 12px 14px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(34, 151, 131, .35);
  border-radius: 8px;
  background: #eef9f5;
  box-shadow: var(--shadow);
}
.site-mode-status:hover,
.site-mode-status.active {
  border-color: rgba(34, 151, 131, .6);
  background: #e4f6ef;
}
.site-mode-status strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.site-mode-status span {
  font-size: 22px;
  font-weight: 900;
}
.site-mode-status small {
  color: var(--muted);
  line-height: 1.4;
}
.site-mode-status[data-mode="freeleech"] {
  border-color: rgba(20, 144, 102, .65);
  background: #ddf8eb;
}
.site-mode-status[data-mode="halfleech"],
.site-mode-status[data-mode="happy_hour"] {
  border-color: rgba(211, 139, 35, .55);
  background: #fff5df;
}
body.dark .site-mode-status {
  background: #102437;
}
body.dark .site-mode-status:hover,
body.dark .site-mode-status.active {
  background: #132f35;
}
body.dark .site-mode-status[data-mode="freeleech"] {
  background: #113426;
}
body.dark .site-mode-status[data-mode="halfleech"],
body.dark .site-mode-status[data-mode="happy_hour"] {
  background: #352814;
}
.home-stat-detail {
  margin-bottom: 12px;
}
.home-stat-detail article {
  border: 1px solid rgba(34, 151, 131, .32);
  border-radius: 8px;
  background: #eef9f5;
  padding: 12px 14px;
}
body.dark .home-stat-detail article {
  background: #102437;
}
.home-stat-detail strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.home-stat-detail span {
  display: block;
  font-size: 22px;
  font-weight: 900;
  margin-top: 4px;
}
.home-stat-detail p {
  margin: 6px 0 0;
  color: var(--muted);
}
.home-extra-stats {
  margin-bottom: 12px;
}
.home-extra-stats .detail-stats:last-child {
  margin-bottom: 0;
}
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); gap: 12px; }
.panel { padding: 15px; }
.panel-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.panel-icon { color: var(--accent-dark); }
body.dark .panel-icon { color: #82dbc9; }

.media-list { display: grid; gap: 10px; }
.media-card {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.poster { width: 86px; height: 116px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.media-card h3 { margin: 0 0 4px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  border-radius: 999px;
  background: #e8f1f8;
  color: #28425f;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}
.score {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f7f1;
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 900;
}

.queue-item, .rule-item, .limit-item, .finding {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  margin-bottom: 8px;
}

.finding.danger {
  background: color-mix(in srgb, var(--danger) 8%, var(--soft));
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
}

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

.invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.invite-row strong,
.invite-row code {
  display: block;
}

.invite-row code {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #101923;
  color: #eef5f8;
  font: 12px "IBM Plex Mono", Consolas, monospace;
}

.invite-row p {
  margin-top: 6px;
}

.invite-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.queue-item strong { display: block; margin-bottom: 5px; }
.risk-high { border-left: 4px solid var(--danger); }
.risk-medium { border-left: 4px solid var(--amber); }
.risk-low { border-left: 4px solid var(--accent); }
.draft-inline-edit {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}
.draft-inline-edit summary {
  cursor: pointer;
  font-weight: 800;
}
.draft-inline-edit label {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.draft-inline-edit textarea {
  min-height: 120px;
  font-family: "IBM Plex Mono", Consolas, monospace;
}
button.danger {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  color: var(--danger);
}
body.dark .draft-inline-edit {
  background: rgba(255,255,255,.04);
}

.searchbar, .filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.draft-asset-help {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.draft-asset-help strong {
  font-size: 13px;
}

.draft-asset-help p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.advanced-search-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.advanced-search-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-rules-head { margin-top: 18px; }

.upload-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.quickstart-grid article {
  display: grid;
  gap: 8px;
  align-content: start;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.upload-rule-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.upload-rule-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

@media (max-width: 900px) {
  .advanced-search-panel,
  .quickstart-grid,
  .upload-rules-grid {
    grid-template-columns: 1fr;
  }
}
input, textarea {
  width: 100%;
  border: 1px solid #cfd9e5;
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 11px;
  outline: none;
}
body.dark input, body.dark textarea, body.dark select {
  background: #0f1720;
  color: var(--ink);
  border-color: var(--line);
}
select {
  width: 100%;
  border: 1px solid #cfd9e5;
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 11px;
  outline: none;
}
textarea { min-height: 130px; resize: vertical; }
label { display: block; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; margin: 12px 0 6px; }
.searchbar input { flex: 1; min-width: 260px; }
.filter-row button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: #32465e;
  font-size: 12px;
  font-weight: 800;
  width: auto;
  min-height: auto;
}
.filter-row button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
body.dark .filter-row button {
  background: #0f1720;
  color: var(--ink);
}
body.dark .filter-row button.active {
  background: var(--accent);
  color: #fff;
}
.upload-grid, .agent-grid, .security-grid, .community-grid, .help-layout, .api-doc-grid, .contact-grid, .uploader-grid, .admin-users-layout, .requests-layout, .notifications-layout, .messages-layout, .leaderboard-layout { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 12px; }
.upload-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.control-panel-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}
.control-hero-panel {
  margin-bottom: 12px;
}
.control-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}
.control-status,
.control-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 86%, var(--accent) 14%);
}
.control-status strong,
.control-card strong {
  display: block;
  font-size: 13px;
}
.control-status span {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 950;
}
.control-status p,
.control-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.control-status.warn,
.control-card.warn {
  background: color-mix(in srgb, #f59e0b 10%, var(--panel));
  border-color: color-mix(in srgb, #f59e0b 38%, var(--line));
}
.control-status.ok,
.control-card.ok {
  background: color-mix(in srgb, #10b981 9%, var(--panel));
  border-color: color-mix(in srgb, #10b981 34%, var(--line));
}
.control-card-list,
.control-check-list {
  display: grid;
  gap: 8px;
}
.control-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.control-card > span {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.control-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.control-action {
  display: grid;
  justify-items: start;
  text-align: left;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
}
.control-action strong {
  font-size: 13px;
}
.control-action span {
  color: var(--muted);
  font-size: 12px;
}
.asset-input-grid, .asset-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.asset-text-grid textarea {
  min-height: 120px;
  resize: vertical;
}
.allowed-mail-list {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
  display: grid;
  gap: 7px;
}
.allowed-mail-list strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.allowed-mail-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.analysis-empty { color: var(--muted); background: var(--soft); border: 1px dashed #c4cfdb; border-radius: 8px; padding: 14px; }
.strict-release-note {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #f0d39b;
  border-radius: 8px;
  background: #fff7e9;
}
.strict-release-note p { margin-top: 4px; }
body.dark .strict-release-note { background: #2a2112; border-color: #6c5121; }
.decision {
  display: inline-flex;
  margin: 8px 0 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff4df;
  color: #8a5100;
  font-weight: 900;
}
.agent strong { display: block; margin-top: 14px; color: var(--accent-dark); }
pre {
  background: #101923;
  color: #eef5f8;
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#tracker-api-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#tracker-api-list .message-item p,
#tracker-api-panel .detail-stats span,
#tracker-api-panel .detail-stats small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.member-hero {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,25,35,.98), rgba(16,25,35,.82) 48%, rgba(16,25,35,.55)),
    linear-gradient(135deg, #0c8f77, #305c96 52%, #b86b00);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.member-hero > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.member-hero h2 {
  max-width: 720px;
  font-size: 44px;
  line-height: 1.08;
  margin: 8px 0 10px;
}
.member-hero p { max-width: 660px; color: #d8e5ef; font-size: 15px; }
.hero-cover-track {
  position: absolute;
  z-index: 0;
  inset: 0 -25%;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: .48;
  transform: rotate(-7deg);
  animation: heroCoverDrift 42s linear infinite;
  pointer-events: none;
}
.hero-cover-track::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(90deg, rgba(16,25,35,.98), rgba(16,25,35,.82) 38%, rgba(16,25,35,.34) 68%, rgba(16,25,35,.88));
}
.hero-cover {
  width: 118px;
  height: 168px;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  overflow: hidden;
}
.hero-cover strong {
  width: 100%;
  padding: 8px;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
}
@keyframes heroCoverDrift {
  from { transform: translateX(0) rotate(-7deg); }
  to { transform: translateX(-50%) rotate(-7deg); }
}
.eyebrow {
  color: #83e2d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.studio-switch { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.studio-mode.active { background: var(--accent); color: #fff; }
.studio-pane { display: none; }
.studio-pane.active { display: block; }
.member-health {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 8px;
  padding: 14px;
}
.member-health strong, .member-health span { display: block; }
.member-health span { margin: 8px 0; color: #83e2d0; font-size: 28px; font-weight: 900; }
.member-health small { color: #c6d4e2; line-height: 1.5; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 12px; }
.catalog-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.catalog-poster { height: 150px; }
.visual-media {
  position: relative;
  border-color: color-mix(in srgb, var(--visual-main, var(--accent)) 34%, var(--line));
}
.visual-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.visual-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--visual-main) 88%, #101923), transparent 58%),
    linear-gradient(0deg, rgba(16,25,35,.84), rgba(16,25,35,.10));
}
.visual-poster::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px auto;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 8px;
  transform: rotate(8deg);
  background: rgba(255,255,255,.09);
}
.visual-poster strong {
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(16,25,35,.72);
  font-size: 20px;
  line-height: 1;
  overflow-wrap: anywhere;
}
.visual-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.mini-icon { width: 14px; height: 14px; }
.type-film { --visual-main: #315b96; }
.type-series { --visual-main: #7a4db3; }
.type-game { --visual-main: #108d6f; }
.type-animation { --visual-main: #c15c89; }
.type-doc { --visual-main: #887037; }
.quality-uhd .visual-poster strong { background: #f0b84a; color: #231705; }
.quality-remux .visual-poster strong { background: #e9eef6; color: #1f2a37; }
.quality-bluray .visual-poster strong { background: #3e70c7; }
.quality-web .visual-poster strong { background: #169878; }
.release-line.quality-uhd { border-color: #e5b557; background: #fff8e7; }
.release-line.quality-remux { border-color: #b9c5d3; background: #f6f8fb; }
.release-line.quality-bluray { border-color: #b4c8ed; background: #f1f6ff; }
.release-line.quality-web { border-color: #b7ded5; background: #effaf7; }
.catalog-body { padding: 12px; }
.catalog-title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.catalog-title h3 { margin: 0; font-size: 16px; }
.catalog-title span { color: var(--muted); font-weight: 900; }
.latest-release-list {
  display: grid;
  gap: 8px;
}
.torrent-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.torrent-list-toolbar input {
  width: 100%;
}
.torrent-list-toolbar span {
  min-width: 110px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.torrent-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.torrent-type-filter button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.torrent-type-filter button.active {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}
.torrent-type-filter button:disabled {
  cursor: default;
  opacity: .44;
}
.site-release-list {
  max-width: 1180px;
}
.latest-release-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(280px, .9fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 9px;
  overflow: visible;
}
.release-preview-trigger {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--visual-main, var(--accent)) 14%, #fff);
  color: var(--visual-main, var(--accent-dark));
  z-index: 4;
}
.latest-release-main,
.latest-release-meta {
  min-width: 0;
}
.latest-release-main strong,
.latest-release-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latest-release-main span,
.latest-release-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.latest-release-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.latest-release-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  text-align: center;
}
.latest-release-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}
.latest-release-actions button,
.latest-release-actions .button-link {
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}
.release-hover-card {
  position: absolute;
  left: 42px;
  top: 50%;
  width: min(420px, calc(100vw - 80px));
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--visual-main, var(--accent)) 40%, var(--line));
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-8px) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
  text-align: left;
  z-index: 20;
}
.release-preview-trigger:hover .release-hover-card,
.release-preview-trigger:focus-visible .release-hover-card,
.latest-release-row:hover .release-hover-card,
.latest-release-row:focus-within .release-hover-card {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}
.release-hover-cover {
  min-height: 170px;
  border-radius: 8px;
}
.release-hover-body {
  display: grid;
  gap: 8px;
  align-content: start;
}
.release-hover-body strong {
  font-size: 16px;
  line-height: 1.25;
}
.release-hover-body small {
  color: var(--muted);
  font-size: 12px;
}
.release-hover-body em {
  max-height: 92px;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}
body.dark .release-preview-trigger {
  background: color-mix(in srgb, var(--visual-main, var(--accent)) 28%, #101923);
}
body.dark .latest-release-meta span {
  background: #102437;
}
.release-line {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.release-line span { color: var(--muted); font-size: 12px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.release-layout { display: grid; gap: 12px; }
.release-main {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: stretch;
}
.release-cover { min-height: 240px; border-radius: 8px; }
.release-head h2 { font-size: 24px; }
.release-head h2 span { color: var(--muted); font-size: 16px; }
.info-band {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #b9d9d2;
  border-radius: 8px;
  background: #eefaf7;
}
.release-list { display: grid; gap: 8px; }
.release-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.seed-count { color: var(--accent-dark); font-weight: 900; }
.description-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.description-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  font: inherit;
  color: var(--text);
}
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 12px; }
.profile-card { text-align: center; }
.profile-hero { margin-bottom: 12px; }
.profile-banner {
  min-height: 230px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,25,35,.96), rgba(16,25,35,.66)),
    linear-gradient(135deg, #1f3b73, #0c8f77 55%, #d6b34c);
  box-shadow: var(--shadow);
}
.profile-banner h2 { font-size: 34px; margin: 6px 0; }
.profile-banner p { color: #d8e5ef; max-width: 620px; }
.profile-avatar-large {
  width: 110px;
  height: 110px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0c8f77, #d6b34c);
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.profile-badges span {
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}
.avatar {
  width: 82px;
  height: 82px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0c8f77, #d6b34c);
  color: white;
  font-size: 34px;
  font-weight: 900;
}
.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.profile-metrics span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-metrics strong { color: var(--ink); font-size: 20px; }
.account-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}
.account-health-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.account-health-grid strong { display: block; font-size: 28px; }
.account-health-grid span { color: var(--accent-dark); font-weight: 900; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.avatar-choice {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}
.avatar-choice.active {
  background: linear-gradient(135deg, #0c8f77, #d6b34c);
  color: #fff;
}
.reputation-bars { display: grid; gap: 12px; }
.reputation-bars article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}
.reputation-bars article strong { grid-column: 1 / -1; }
.reputation-bars span {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--value), #dce5ee var(--value));
}
.reputation-bars em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.mini-public-profile {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.mini-public-profile .profile-avatar-large {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  font-size: 30px;
}
.mini-public-profile .profile-badges span {
  background: #e8f1f8;
  border-color: transparent;
  color: #28425f;
}
body.dark .mini-public-profile .profile-badges span { background: #203247; color: #c7e2ff; }
.shoutbox-panel { display: none; }
.community-grid-single, #community .community-grid { grid-template-columns: 1fr; }
.shoutbox { display: grid; gap: 5px; }
.shout-message {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.message-item.shout-message { padding: 7px 8px; }
.shout-avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #203247;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}
.shout-message strong {
  font-size: 13px;
  line-height: 1.15;
}
.shout-message p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.28;
}
.shout-message strong span {
  color: var(--accent-dark);
  font-size: 11px;
  margin-left: 4px;
}
.shout-message time { color: var(--muted); font-size: 11px; font-weight: 800; }
.shout-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.shoutbox-tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
  margin-bottom: 10px;
}
.compact-head {
  margin-bottom: 8px;
}
.compact-head h3 {
  margin: 0;
  font-size: 15px;
}
.shoutbox-gif-grid { display: grid; gap: 8px; }
.giphy-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.giphy-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.shout-gif-option {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: #203247;
  cursor: pointer;
  overflow: hidden;
}
.shout-gif-option strong, .shout-gif-embed strong {
  font-size: 18px;
  letter-spacing: 0;
}
.shout-gif-option span, .shout-gif-embed span {
  font-size: 12px;
  font-weight: 900;
}
.shout-gif-option:hover, .shout-gif-option.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(43, 124, 94, .45);
}
.tone-green { background: linear-gradient(135deg, #2b7c5e, #68b684); }
.tone-gold { background: linear-gradient(135deg, #94611a, #e0b34c); }
.tone-blue { background: linear-gradient(135deg, #24517f, #4e9ad8); }
.tone-red { background: linear-gradient(135deg, #8b3344, #d8666f); }
.tone-dark { background: linear-gradient(135deg, #223040, #68798b); }
.shout-gif-embed {
  width: min(220px, 100%);
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
}
.shout-gif-media {
  display: inline-block;
  margin-top: 5px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}
.shout-gif-media img {
  display: block;
  width: min(180px, 100%);
  max-height: 120px;
  object-fit: cover;
}
.shoutbox-poll-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}
.composer { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.shoutbox-composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.notice-list, .rules-stack, .endpoint-list, .ticket-list { display: grid; gap: 8px; }
.notice-list article, .rules-stack article, .endpoint-list article, .ticket-list article, .forum-grid article, .faq-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.mp-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.mp-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}
.mp-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mp-conversation-list {
  display: grid;
  gap: 6px;
  align-content: start;
}
.mp-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}
.mp-conversation.active,
.mp-conversation:hover {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.mp-conversation strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.mp-conversation p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.mp-conversation small,
.mp-conversation time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.mp-unread {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}
.mp-thread-panel {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}
.mp-thread-head {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.mp-thread-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.mp-thread-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.mp-post-list {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
}
.mp-post {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  max-width: 82%;
}
.mp-post.mine {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 32px;
}
.mp-post.mine .shout-avatar { order: 2; }
.mp-post > div:last-child {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.mp-post.mine > div:last-child {
  background: #eef8f3;
  border-color: #c7dfd2;
}
body.dark .mp-post.mine > div:last-child { background: #182821; }
.mp-post strong span {
  color: var(--accent-dark);
  font-size: 11px;
  margin-left: 4px;
}
.mp-post p {
  margin: 4px 0;
  line-height: 1.38;
}
.mp-post time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.mp-reply-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.mp-reply-box textarea {
  min-height: 78px;
}
.mp-empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
  padding: 28px;
}
.reward-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  min-width: 0;
}
.reward-admin-grid section,
.reward-adjust-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
  min-width: 0;
}
.reward-admin-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.reward-rule-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.reward-rule {
  display: grid;
  grid-template-columns: 90px 110px 90px minmax(160px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.reward-rule.compact {
  grid-template-columns: 110px 110px auto;
}
.reward-rule.spend {
  grid-template-columns: minmax(120px, .8fr) minmax(160px, 1fr) 100px;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.reward-rule.spend label:nth-child(4),
.reward-rule.spend .tool-actions {
  grid-column: 1 / -1;
}
.reward-rule.spend .tool-actions {
  justify-content: flex-end;
}
.reward-rule input,
.reward-rule label {
  min-width: 0;
}
.reward-rule input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.reward-traffic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  min-width: 0;
}
.reward-traffic-grid label {
  min-width: 0;
}
.reward-traffic-grid input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.reward-traffic-grid label:first-child,
.reward-traffic-grid label:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}
.reward-traffic-grid label:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.reward-traffic-grid label:first-child input {
  width: auto;
}
.reward-adjust-box {
  margin-top: 12px;
}
.reward-adjust-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 120px minmax(180px, 1.2fr);
  gap: 8px;
}
.api-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.api-steps article {
  padding: 14px 14px 14px 18px;
  border: 1px solid #cfe2da;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fcfa, #eff7f4);
}
.api-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.api-config-grid article, .api-mini-faq article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 12px;
}
.api-config-grid code {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #101923;
  color: #eef5f8;
  font: 12px "IBM Plex Mono", Consolas, monospace;
  word-break: break-all;
}
.forum-grid, .faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}
.forum-main-panel .forum-grid { grid-template-columns: 1fr; }
#community > .panel,
#community .forum-grid,
#community .forum-simple-layout,
#community .forum-detail-panel,
#community .forum-workspace {
  min-width: 0;
}
#community > .panel > .forum-grid {
  grid-template-columns: 1fr;
}
#community .forum-grid > .forum-simple-layout {
  grid-column: 1 / -1;
  width: 100%;
}
.forum-simple-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.forum-section-list {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 8px;
}
.forum-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.forum-space {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.forum-grid.nested {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.forum-card {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.forum-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}
.forum-row strong { font-size: 14px; }
.forum-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.forum-row > span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.forum-card:hover, .forum-card:focus-visible, .forum-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  transform: translateY(-1px);
  outline: none;
}
.forum-detail-panel {
  margin-top: 0;
  min-width: 0;
  overflow: visible;
}
.forum-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.forum-thread-head h2 {
  margin: 0 0 3px;
  font-size: 20px;
}
.forum-thread-head p {
  margin: 0;
  color: var(--muted);
}
.forum-edit-panel {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(150px, .55fr);
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  min-width: 0;
}
.forum-edit-panel[hidden] {
  display: none;
}
.forum-edit-panel label:has(textarea) {
  grid-column: 1 / -1;
}
.forum-edit-panel .tool-actions {
  grid-column: 1 / -1;
}
.forum-topic-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}
.forum-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}
.forum-topic strong { font-size: 14px; }
.forum-topic p {
  font-size: 13px;
  line-height: 1.35;
}
.forum-topic.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #f4fbf7;
}
body.dark .forum-topic.active { background: #172721; }
.forum-topic p {
  margin: 4px 0;
  color: var(--muted);
}
.forum-topic span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.forum-topic-composer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
}
.forum-topic-composer label,
.forum-create-grid label,
.forum-edit-panel label,
.forum-reply-panel label {
  min-width: 0;
}
.forum-topic-composer input,
.forum-topic-composer textarea,
.forum-create-grid input,
.forum-create-grid select,
.forum-create-grid textarea,
.forum-edit-panel input,
.forum-edit-panel select,
.forum-edit-panel textarea,
.forum-reply-panel textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.forum-topic-composer input,
.forum-topic-composer textarea,
.forum-reply-panel textarea,
.forum-edit-panel input,
.forum-edit-panel textarea {
  cursor: text;
}
.forum-create-grid select,
.forum-edit-panel select {
  cursor: pointer;
}
.forum-topic-composer textarea,
.forum-reply-panel textarea,
.forum-edit-panel textarea,
#forum-description {
  min-height: 92px;
  resize: vertical;
}
.forum-topic-composer textarea {
  min-height: 68px;
}
.forum-workspace {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.05fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.forum-action-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.forum-reply-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
  min-width: 0;
}
.forum-comment-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.forum-comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.forum-comment strong span {
  color: var(--accent-dark);
  font-size: 12px;
  margin-left: 4px;
}
.forum-comment p {
  margin: 4px 0 0;
  color: var(--text);
}
.forum-inline-edit {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.forum-inline-edit summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}
.forum-inline-edit label {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.forum-inline-edit input,
.forum-inline-edit textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.forum-inline-edit textarea {
  min-height: 76px;
}
.forum-create-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr);
  gap: 10px;
  min-width: 0;
}
.forum-admin-tools summary {
  cursor: pointer;
  font-weight: 900;
}
.forum-admin-tools[open] summary {
  margin-bottom: 10px;
}
.staff-review-group {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-user-row.compact {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
}
.forum-grid article span, .ticket-list article span {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #28425f;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}
.help-search { display: flex; gap: 8px; margin-bottom: 12px; }
.api-warning {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f0d39b;
  background: #fff7e9;
}
.api-example {
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
body.dark .api-warning {
  background: #2a2112;
  border-color: #6c5121;
}
.api-mini-faq {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.api-mini-faq p { margin-top: 6px; }
.uploader-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,25,35,.96), rgba(16,25,35,.74)),
    linear-gradient(135deg, #305c96, #0c8f77 55%, #b86b00);
  box-shadow: var(--shadow);
}
.uploader-hero h2 {
  max-width: 820px;
  font-size: 30px;
  line-height: 1.12;
  margin: 8px 0;
}
.uploader-hero p { max-width: 760px; color: #d8e5ef; }
.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}
.pre-grid, .image-host-grid, .message-list, .leaderboard-list, .badge-grid {
  display: grid;
  gap: 10px;
}
.pre-grid article, .badge-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.pre-grid article strong { display: block; overflow-wrap: anywhere; }
.image-host-grid { grid-template-columns: minmax(260px, .8fr) minmax(260px, 1fr); }
.drop-zone, .image-host-result {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
}
.image-host-result p { overflow-wrap: anywhere; }
.message-item, .leaderboard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.message-item time { color: var(--muted); font-size: 12px; font-weight: 900; }
.leaderboard-item { grid-template-columns: auto minmax(0, 1fr) auto; }
.top-more {
  margin-top: 10px;
}
.top-more summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 900;
  padding: 8px 2px;
}
.top-more .leaderboard-list {
  margin-top: 8px;
}
.top-scope-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.top-scope-panel summary::-webkit-details-marker {
  display: none;
}
.top-scope-panel summary .panel-head {
  margin: 0;
  flex: 1;
}
.top-scope-list {
  margin-top: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}
.rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f7f1;
  color: var(--accent-dark);
  font-weight: 900;
}
.profile-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.quick-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.quick-tool-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.source-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.source-grid article span {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #28425f;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}
body.dark .chip, body.dark .source-grid article span, body.dark .forum-grid article span, body.dark .ticket-list article span {
  background: #203247;
  color: #c7e2ff;
}
body.dark .release-line { background: #0f1720; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.api-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.api-full {
  grid-column: 1 / -1;
}
.api-steps, .api-config-grid, .api-mini-faq {
  display: grid;
  gap: 10px;
}
.api-config-grid, .api-mini-faq {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.api-steps article, .api-config-grid article, .api-mini-faq article, .api-warning {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.api-steps strong, .api-config-grid strong, .api-mini-faq strong, .api-warning strong {
  display: block;
  margin-bottom: 5px;
}
.api-steps p, .api-config-grid p, .api-mini-faq p, .api-warning p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.api-example {
  white-space: pre-wrap;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101923;
  color: #eaf3ff;
  line-height: 1.55;
}
.api-warning {
  margin-top: 12px;
  background: #fff8e8;
}
.uploader-preview { margin-top: 10px; }
.metadata-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.field-help {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.metadata-results {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}
.metadata-mini-grid {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.metadata-mini-grid label {
  margin: 0;
  text-transform: none;
  font-size: 12px;
}
.metadata-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}
.metadata-result:hover, .metadata-result.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.metadata-result strong span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 5px;
}
.metadata-result > span {
  border-radius: 999px;
  background: #e8f7f1;
  color: var(--accent-dark);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 900;
}
.generated-banner {
  min-height: 118px;
  display: grid;
  align-content: end;
  gap: 4px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,25,35,.92), rgba(16,25,35,.36)),
    linear-gradient(135deg, #1f3b73, #e8b45b);
}
.generated-banner.series {
  background:
    linear-gradient(90deg, rgba(16,25,35,.92), rgba(16,25,35,.34)),
    linear-gradient(135deg, #20483c, #e6d56a);
}
.generated-banner.game {
  background:
    linear-gradient(90deg, rgba(16,25,35,.92), rgba(16,25,35,.34)),
    linear-gradient(135deg, #2a2d32, #b6462d);
}
.generated-banner.manual-only {
  background:
    linear-gradient(90deg, rgba(16,25,35,.92), rgba(16,25,35,.34)),
    linear-gradient(135deg, #394150, #7b6f52);
}
.generated-banner span {
  color: #83e2d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.generated-banner strong {
  font-size: 24px;
  line-height: 1.05;
}
.generated-banner small { color: #d8e5ef; }
.checklist { display: grid; gap: 8px; }
.checklist label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-transform: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}
.checklist input { width: auto; margin-top: 2px; }
.manual-upload-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(320px, 1.1fr);
  gap: 12px;
}
.manual-upload-grid.simple { grid-template-columns: minmax(0, 1fr); }
.manual-upload-grid textarea { min-height: 330px; }
.manual-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.manual-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
  text-transform: none;
  font-size: 13px;
}
.manual-inline-check input {
  width: auto;
  margin: 0;
}
.manual-status strong { width: 100%; }
.manual-status span {
  border-radius: 999px;
  background: #e8f1f8;
  color: #28425f;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}
.manual-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.bb-render {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  line-height: 1.55;
}
.bb-image {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 6px 0;
}
.bb-center { text-align: center; font-size: 18px; margin-bottom: 10px; }
.bb-render details {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
body.dark .manual-status span { background: #203247; color: #c7e2ff; }
.request-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: 8px;
  margin-bottom: 12px;
}
.request-list, .notification-list { display: grid; gap: 8px; }
.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.request-bounty {
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #fff7e9;
  color: #8a5100;
}
.request-bounty strong { font-size: 20px; }
.request-bounty span { font-size: 12px; font-weight: 900; }
.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--soft);
}
.notification-item.success { border-left-color: var(--accent); }
.notification-item.warn { border-left-color: var(--amber); }
.notification-item.danger { border-left-color: var(--danger); }
.notification-item time { color: var(--muted); font-size: 12px; font-weight: 900; }
.collapsible-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.collapsible-panel summary::-webkit-details-marker {
  display: none;
}
.collapsible-panel summary .panel-head {
  margin: 0;
  flex: 1;
}
.collapse-indicator {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 12px;
}
.collapsible-panel[open] .collapse-indicator::before {
  content: "Fermer";
}
.collapsible-panel[open] .collapse-indicator {
  font-size: 0;
}
.collapsible-content {
  margin-top: 12px;
}
.collapsible-panel:not([open]) .collapsible-content {
  display: none;
}
#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
#toast.show { opacity: 1; transform: translateY(0); }
body.dark .request-bounty { background: #2a2112; color: #f5c56f; }
body.dark #toast { background: #eef5f8; color: #101923; }
.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-user-list { display: grid; gap: 8px; }
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.admin-user-row strong span {
  color: var(--accent-dark);
  font-size: 12px;
  margin-left: 6px;
}
.admin-user-sanction {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 300px;
}
.admin-user-meta span {
  border-radius: 999px;
  background: #e8f1f8;
  color: #28425f;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}
.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  margin-bottom: 12px;
}
.permission-grid, .role-matrix, .uploader-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}
.permission-grid article, .role-matrix article, .uploader-guide-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}
.permission-grid article span {
  display: block;
  color: var(--accent-dark);
  font-weight: 900;
  margin-top: 5px;
}
body.dark .admin-user-meta span { background: #203247; color: #c7e2ff; }
body.dark .admin-user-sanction { color: #9cb3c8; }

@media (max-width: 980px) {
  .api-doc-grid, .api-config-grid, .api-mini-faq {
    grid-template-columns: 1fr;
  }
  .api-full {
    grid-column: auto;
  }
  .asset-input-grid, .asset-text-grid { grid-template-columns: 1fr; }
  .login-stage { grid-template-columns: 1fr; }
  .login-hero { padding: 28px; }
  .login-logo-wrap { width: 68px; height: 68px; border-radius: 18px; }
  .login-logo { width: 54px; height: 54px; }
  .login-stack { max-height: none; overflow: visible; padding-right: 0; }
  .login-tab-strip { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-label { grid-column: 1 / -1; }
  .split, .upload-grid, .agent-grid, .security-grid, .community-grid, .help-layout, .api-doc-grid, .contact-grid, .uploader-grid, .admin-users-layout, .requests-layout, .notifications-layout, .messages-layout, .leaderboard-layout, .manual-upload-grid, .stats, .detail-stats, .member-hero, .catalog-grid, .release-main, .profile-grid, .profile-banner, .account-health-grid, .forum-grid, .faq-grid, .source-grid, .image-host-grid, .admin-toolbar, .admin-user-row, .permission-grid, .role-matrix, .uploader-guide-grid, .request-toolbar, .request-card, .notification-item, .global-search, .message-item, .leaderboard-item, .metadata-mini-grid, .quick-tool-grid, .api-config-grid, .forum-topic, .forum-topic-composer, .forum-workspace, .forum-edit-panel, .mp-layout, .mp-reply-box, .reward-admin-grid, .reward-rule, .reward-rule.compact, .reward-rule.spend, .reward-traffic-grid, .reward-adjust-grid, .shoutbox-poll-grid, .site-mode-status, .latest-release-row, .latest-release-meta, .control-panel-layout, .control-status-grid, .control-action-grid, .control-card { grid-template-columns: 1fr; }
  .release-hover-card {
    left: 0;
    top: 42px;
    transform: translateY(0) scale(.98);
  }
  .release-preview-trigger:hover .release-hover-card,
  .release-preview-trigger:focus-visible .release-hover-card {
    transform: translateY(0) scale(1);
  }
  .forum-simple-layout { grid-template-columns: 1fr; }
  .mp-post, .mp-post.mine { max-width: 100%; }
  .shoutbox-gif-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-card { grid-template-columns: 70px 1fr; }
  .score { grid-column: 1 / -1; width: auto; height: auto; border-radius: 7px; padding: 8px; }
  .poster { width: 70px; height: 94px; }
  .topbar { display: grid; }
  .top-actions { justify-content: flex-start; }
  .member-hero { min-height: auto; }
  .member-hero h2 { font-size: 23px; overflow-wrap: anywhere; }
  .hero-cover-track {
    opacity: .32;
    inset: 0 -70%;
  }
  .hero-cover {
    width: 82px;
    height: 118px;
  }
  .release-row { grid-template-columns: 1fr; }
  .composer, .help-search { display: grid; }
  .metadata-search, .metadata-result { grid-template-columns: 1fr; }
  .support-network-grid,
  .support-wallet-card { grid-template-columns: 1fr; }
  #support .detail-stats { grid-template-columns: 1fr; }
  .shout-message { grid-template-columns: 40px 1fr; }
  .shout-message time { grid-column: 2; }
  .uploader-hero { display: grid; }
  .uploader-hero h2 { font-size: 24px; }
}

@media (max-width: 640px) {
  .login-shell { padding: 14px; }
  .login-card, .login-hero {
    padding: 22px;
    border-radius: 18px;
  }
  .login-hero h1 { font-size: 42px; }
  .login-lead { font-size: 17px; }
  .login-tab { padding: 10px 12px; }
  .support-dialog { width: calc(100vw - 20px); padding: 18px; border-radius: 18px; }
  .login-actions { grid-template-columns: 1fr; }
}
