*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: rgba(8, 4, 4, 0.88);
  --panel-bg: rgba(8, 4, 4, 0.28);
  --panel-inner-bg: rgba(0, 0, 0, 0.22);
  --border: rgba(180, 30, 30, 0.45);
  --border-bright: rgba(204, 0, 0, 0.7);
  --text: #d4d0c8;
  --text-dim: #8a8580;
  --red: #cc0000;
  --red-glow: rgba(204, 0, 0, 0.5);
  --amber: #c4a035;
  --green: #2a7a3a;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-sans: 'Roboto Condensed', Verdana, sans-serif;
  --bg-cycle: 36s;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #8b0000 rgba(8, 4, 4, 0.95);
  scrollbar-width: thin;
  overflow-x: hidden;
}

/* Тематический скролл (WebKit / Blink) */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 4, 4, 0.96);
  border-left: 1px solid rgba(180, 30, 30, 0.35);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6a0000 0%, #b30000 45%, #cc0000 100%);
  border: 1px solid rgba(255, 60, 60, 0.45);
  border-radius: 1px;
  box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.25);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #990000 0%, #cc0000 50%, #ff3333 100%);
}

::-webkit-scrollbar-corner {
  background: rgba(8, 4, 4, 0.96);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: #0a0505;
  line-height: 1.6;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: rgba(204, 0, 0, 0.25);
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y pinch-zoom;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -12%;
  z-index: -2;
  background-color: #0a0505;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform-origin: center center;
  backface-visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}

body::before {
  background-image: url('../assets/background.png');
  animation: site-bg-primary var(--bg-cycle) ease-in-out infinite;
}

body::after {
  z-index: -3;
  background-image: url('../assets/background2.png');
  animation: site-bg-secondary var(--bg-cycle) ease-in-out infinite;
}

.site-bg-tertiary {
  position: fixed;
  inset: -12%;
  z-index: -4;
  background-color: #0a0505;
  background-image: url('../assets/background3.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform-origin: center center;
  backface-visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
  animation: site-bg-tertiary var(--bg-cycle) ease-in-out infinite;
}

@keyframes site-bg-primary {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  22% {
    opacity: 1;
    transform: scale(1.12);
  }

  33% {
    opacity: 0;
    transform: scale(1.15);
  }

  89% {
    opacity: 0;
    transform: scale(1);
  }

  94% {
    opacity: 0.55;
    transform: scale(1.02);
  }
}

@keyframes site-bg-secondary {
  0%, 22% {
    opacity: 0;
    transform: scale(1);
  }

  33% {
    opacity: 1;
    transform: scale(1.03);
  }

  55% {
    opacity: 1;
    transform: scale(1.12);
  }

  66% {
    opacity: 0;
    transform: scale(1.15);
  }

  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes site-bg-tertiary {
  0%, 55% {
    opacity: 0;
    transform: scale(1);
  }

  66% {
    opacity: 1;
    transform: scale(1.03);
  }

  88% {
    opacity: 1;
    transform: scale(1.12);
  }

  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

body.site-loading {
  overflow: hidden;
}

/* ── Site loader ── */

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(204, 0, 0, 0.12), transparent 55%),
    #060303;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.site-loader--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader-inner {
  position: relative;
  width: min(100%, 26rem);
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid rgba(204, 0, 0, 0.45);
  background:
    linear-gradient(180deg, rgba(14, 8, 8, 0.98), rgba(6, 3, 3, 0.99));
  box-shadow:
    0 0 60px rgba(204, 0, 0, 0.12),
    inset 0 0 40px rgba(0, 0, 0, 0.45);
  text-align: center;
  overflow: hidden;
}

.site-loader-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.24) 2px,
    rgba(0, 0, 0, 0.24) 4px
  );
  animation: loader-flicker 3.5s steps(2, end) infinite;
}

.site-loader-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--red);
  border-style: solid;
  opacity: 0.55;
}

.site-loader-corner--tl { top: 0.65rem; left: 0.65rem; border-width: 2px 0 0 2px; }
.site-loader-corner--tr { top: 0.65rem; right: 0.65rem; border-width: 2px 2px 0 0; }
.site-loader-corner--bl { bottom: 0.65rem; left: 0.65rem; border-width: 0 0 2px 2px; }
.site-loader-corner--br { bottom: 0.65rem; right: 0.65rem; border-width: 0 2px 2px 0; }

.site-loader-logo {
  position: relative;
  margin-bottom: 0.85rem;
  animation: loader-logo-pulse 2.4s ease-in-out infinite;
}

.site-loader-logo img {
  display: block;
  width: auto;
  height: 4.5rem;
  margin: 0 auto;
  filter: drop-shadow(0 0 18px rgba(204, 0, 0, 0.35));
}

.site-loader-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.site-loader-title {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.35rem;
}

.site-loader-subtitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 1.35rem;
}

.site-loader-progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.site-loader-progress-track {
  height: 6px;
  border: 1px solid rgba(204, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.site-loader-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6a0000, #cc0000, #ff4444);
  box-shadow: 0 0 12px rgba(204, 0, 0, 0.65);
  transition: width 0.35s ease;
}

.site-loader-progress-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  min-width: 2.5rem;
  text-align: right;
}

.site-loader-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #ddd;
  margin-bottom: 0.45rem;
  min-height: 1.2em;
  animation: loader-status-blink 1.2s step-end infinite;
}

.site-loader-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.site-loader--complete .site-loader-status {
  color: #8fd48f;
  animation: none;
}

.site-loader--complete .site-loader-progress-bar {
  background: linear-gradient(90deg, #1a5a1a, #3a9a3a, #6fd46f);
  box-shadow: 0 0 12px rgba(106, 212, 106, 0.55);
}

@keyframes loader-flicker {
  0%, 100% { opacity: 0.26; }
  50% { opacity: 0.36; }
}

@keyframes loader-logo-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 12px rgba(204, 0, 0, 0.25));
  }
  50% {
    transform: scale(1.02);
    filter: drop-shadow(0 0 22px rgba(204, 0, 0, 0.45));
  }
}

@keyframes loader-status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader-scanlines,
  .site-loader-logo,
  .site-loader-status {
    animation: none;
  }

  .site-loader-progress-bar {
    transition: none;
  }
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  contain: strict;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  transform: translateZ(0);
}

.overlay {
  position: fixed;
  inset: 0;
  contain: strict;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(180deg, rgba(80, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  animation: overlay-breach-pulse var(--bg-cycle) ease-in-out infinite;
}

@keyframes overlay-breach-pulse {
  0%, 24%, 44%, 64%, 84%, 100% {
    filter: none;
  }

  30%, 36% {
    filter: brightness(0.72) saturate(1.35) contrast(1.08);
  }

  63%, 69% {
    filter: brightness(0.75) saturate(1.3) contrast(1.06);
  }

  90%, 96% {
    filter: brightness(0.78) saturate(1.25) contrast(1.05);
  }
}

/* ── Header ── */

.site-top {
  position: sticky;
  top: 0;
  z-index: 110;
  width: 100%;
  padding-top: env(safe-area-inset-top);
  background: rgba(8, 4, 4, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 2px solid var(--border-bright);
  background: rgba(8, 4, 4, 0.97);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 0;
}

.logo-text h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 30px var(--red-glow);
  white-space: nowrap;
}

.logo-icon {
  flex-shrink: 0;
  line-height: 0;
}

.logo-icon img {
  display: block;
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--red-glow));
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.server-monitor {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  overflow: visible;
  box-sizing: border-box;
}

.server-pulse-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.server-pulse-link:hover .server-pulse--online {
  box-shadow: 0 0 16px rgba(62, 207, 90, 0.9);
}

.server-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-dim);
  box-shadow: 0 0 8px rgba(138, 133, 128, 0.35);
}

.server-pulse--loading {
  animation: server-pulse-loading 1.2s ease-in-out infinite;
}

.server-pulse--online {
  background: #3ecf5a;
  box-shadow: 0 0 12px rgba(62, 207, 90, 0.65);
  animation: server-pulse-online 2s ease-in-out infinite;
}

.server-pulse--offline {
  background: var(--red);
  box-shadow: 0 0 10px rgba(204, 0, 0, 0.55);
}

@keyframes server-pulse-loading {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes server-pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.server-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: max-content;
  min-width: min-content;
  flex-shrink: 0;
  overflow: visible;
}

.server-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.server-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  width: max-content;
  min-width: min-content;
  flex-shrink: 0;
}

.server-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fff;
  white-space: nowrap;
  flex: 0 0 auto;
  overflow: visible;
}

.server-online {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
  flex: 0 0 auto;
}

.server-online--online {
  color: #7fd892;
}

.server-online--offline {
  color: #ff7777;
}

.server-door-codes {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.35;
  color: #b8c4d0;
  white-space: nowrap;
  width: max-content;
  min-width: min-content;
  flex-shrink: 0;
  min-height: 0.95rem;
  overflow: visible;
}

.server-door-codes:empty {
  display: none;
}

.server-door-codes .cb2-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.server-name .cb2-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.server-name .cb2-link:hover {
  filter: brightness(1.15);
}

.update-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--amber);
  box-shadow: 0 0 12px rgba(196, 160, 53, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.threat-badge {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--red);
  padding: 0.45rem 0.7rem;
  border: 1px solid #ff3333;
  box-shadow: 0 0 20px var(--red-glow), inset 0 0 10px rgba(255, 255, 255, 0.1);
  animation: threat-blink 2s ease-in-out infinite;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.threat-pulse {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: sweep 3s linear infinite;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 14rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border-bright);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.auth-badge:hover,
.auth-badge:focus-visible {
  background: rgba(204, 0, 0, 0.18);
  box-shadow: 0 0 14px var(--red-glow);
  outline: none;
}

.auth-badge-icon {
  color: var(--red);
  font-size: 0.75rem;
  line-height: 1;
}

.auth-badge-label {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.auth-badge--user {
  border-color: rgba(62, 207, 90, 0.55);
  text-transform: none;
  letter-spacing: 0.05em;
}

.auth-badge--user .auth-badge-icon {
  color: #3ecf5a;
}

.auth-badge--offline {
  opacity: 0.55;
}

.auth-badge--header {
  display: none;
}

.auth-badge--tabs {
  align-self: center;
  margin-left: auto;
}

@media (max-width: 1024px) {
  .auth-badge--header {
    display: inline-flex;
  }

  .auth-badge--tabs {
    display: none;
  }
}

@keyframes threat-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 20px var(--red-glow); }
  50% { opacity: 0.85; box-shadow: 0 0 35px var(--red-glow); }
}

@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Tabs ── */

.tabs {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 0;
  border-bottom: none;
  background: rgba(8, 4, 4, 0.92);
  backdrop-filter: blur(6px);
}

.tab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tab:hover {
  color: var(--text);
  background: rgba(204, 0, 0, 0.08);
}

.tab.active {
  color: #fff;
  border-bottom-color: var(--red);
  background: rgba(204, 0, 0, 0.12);
}

.tab[hidden] {
  display: none;
}

.tab.tab--sealed {
  color: rgba(196, 160, 53, 0.85);
}

.tab.tab--sealed::after {
  content: 'SEALED';
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  border: 1px solid rgba(196, 160, 53, 0.45);
  padding: 0.1rem 0.35rem;
  vertical-align: middle;
  opacity: 0.9;
}

.tab.tab--sealed.active {
  color: #fff;
  border-bottom-color: var(--amber);
  background: rgba(196, 160, 53, 0.1);
}

.tab.tab--sealed.active::after {
  color: #fff;
  border-color: var(--amber);
  background: rgba(196, 160, 53, 0.2);
}

/* ── Content ── */

.content {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 1.5rem;
  position: relative;
}

.panel-header-top {
  display: none; /* временно: штампы отключены */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.classified-stamp {
  display: none; /* временно скрыто на всех вкладках */
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--red);
  border: 2px solid var(--red);
  padding: 0.2rem 0.6rem;
  transform: rotate(-3deg);
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.panel-header h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  border-left: 4px solid var(--red);
  padding-left: 0.75rem;
  margin-bottom: 0.5rem;
}

.panel-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding-left: 1rem;
}

/* ── SCP List ── */

.scp-catalog {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.scp-class-section__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  padding: 0;
}

.scp-class-section__label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scp-class-section__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(180, 30, 30, 0.45), transparent);
}

.scp-class-section--safe .scp-class-section__line {
  background: linear-gradient(90deg, rgba(42, 122, 58, 0.5), transparent);
}

.scp-class-section--euclid .scp-class-section__line {
  background: linear-gradient(90deg, rgba(196, 160, 53, 0.5), transparent);
}

.scp-class-section--keter .scp-class-section__line {
  background: linear-gradient(90deg, rgba(204, 0, 0, 0.5), transparent);
}

.scp-class-section__count {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.scp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scp-list--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.scp-item {
  background: var(--panel-bg);
  border: 1px solid rgba(180, 30, 30, 0.38);
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.25s;
}

.scp-list--cards .scp-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scp-list--cards .scp-item:not(.open) {
  height: 100%;
}

.scp-list--cards .scp-item.open {
  grid-column: 1 / -1;
}

.scp-item:hover {
  border-color: var(--border-bright);
}

.scp-list--cards .scp-card:hover {
  transform: translateY(-2px);
}

.scp-item.open {
  border-color: var(--red);
  box-shadow: 0 0 25px rgba(204, 0, 0, 0.15);
}

.scp-list--cards .scp-card.open {
  transform: none;
  box-shadow:
    0 0 35px rgba(204, 0, 0, 0.18),
    inset 0 0 40px rgba(204, 0, 0, 0.04);
}

.scp-item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.scp-list--cards .scp-card__trigger {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem 1rem;
  flex: 1 1 auto;
  height: 100%;
  min-height: 19rem;
}

.scp-list--cards .scp-card__trigger:hover {
  background: rgba(204, 0, 0, 0.05);
}

.scp-list--cards .scp-card__trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--scp-card-accent, var(--red));
  box-shadow: 0 0 14px var(--scp-card-glow, rgba(204, 0, 0, 0.45));
}

.scp-card--keter {
  --scp-card-accent: #cc0000;
  --scp-card-glow: rgba(204, 0, 0, 0.5);
}

.scp-card--euclid {
  --scp-card-accent: #c4a035;
  --scp-card-glow: rgba(196, 160, 53, 0.45);
}

.scp-card--safe {
  --scp-card-accent: #2a7a3a;
  --scp-card-glow: rgba(42, 122, 58, 0.45);
}

.scp-card--apollyon {
  --scp-card-accent: #fff;
  --scp-card-glow: rgba(255, 255, 255, 0.25);
}

.scp-card--thaumiel {
  --scp-card-accent: #6a5acd;
  --scp-card-glow: rgba(106, 90, 205, 0.45);
}

.scp-card__scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
}

.scp-card__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--scp-card-accent, var(--red));
  border-style: solid;
  opacity: 0.75;
  pointer-events: none;
}

.scp-card__corner--tl {
  top: 0.55rem;
  left: 0.55rem;
  border-width: 2px 0 0 2px;
}

.scp-card__corner--br {
  right: 0.55rem;
  bottom: 0.55rem;
  border-width: 0 2px 2px 0;
}

.scp-card__stamp {
  position: absolute;
  top: 0.85rem;
  right: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--scp-card-accent, var(--red));
  opacity: 0.22;
  pointer-events: none;
}

.scp-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.15rem;
}

.scp-card__title {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
  letter-spacing: 0.04em;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  min-height: 2.8rem;
}

.scp-card__stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  min-height: 3.35rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(180, 30, 30, 0.22);
}

.scp-card__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.scp-card__stat-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scp-card__stat-value {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.3;
}

.scp-card__threat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scp-card__threat--critical { color: #ff4444; text-shadow: 0 0 10px rgba(255, 68, 68, 0.35); }
.scp-card__threat--high { color: #ff7744; }
.scp-card__threat--medium { color: var(--amber); }
.scp-card__threat--low { color: #6fd46f; }

.scp-card__location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
  min-height: 2.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scp-card__teaser {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #9a9590;
  margin: 0;
  min-height: 3.75rem;
  flex: 1 0 3.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scp-list--cards .scp-card.open .scp-card__trigger {
  height: auto;
  min-height: 0;
}

.scp-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.35rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px dashed rgba(180, 30, 30, 0.28);
}

.scp-card.open .scp-card__action-text::after {
  content: ' — свернуть';
}

.scp-list--cards .scp-card.open .scp-card__teaser {
  display: none;
}

.scp-item-header:hover {
  background: rgba(204, 0, 0, 0.06);
}

.scp-number {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  min-width: 6.5rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  font-weight: 600;
  transition: color 0.2s, text-shadow 0.2s;
}

.scp-number.keter { color: #cc0000; text-shadow: 0 0 12px rgba(204, 0, 0, 0.45); }
.scp-number.euclid { color: #c4a035; text-shadow: 0 0 12px rgba(196, 160, 53, 0.35); }
.scp-number.safe { color: #2a7a3a; text-shadow: 0 0 12px rgba(42, 122, 58, 0.35); }
.scp-number.apollyon { color: #fff; text-shadow: 0 0 14px rgba(255, 255, 255, 0.25); }
.scp-number.thaumiel { color: #6a5acd; text-shadow: 0 0 12px rgba(106, 90, 205, 0.45); }

.scp-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scp-new-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  text-transform: uppercase;
  box-shadow:
    0 0 8px rgba(255, 60, 60, 0.8),
    0 0 20px rgba(204, 0, 0, 0.5),
    inset 0 0 6px rgba(255, 255, 255, 0.25);
  animation: new-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes new-glow {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(255, 60, 60, 0.8),
      0 0 20px rgba(204, 0, 0, 0.5),
      inset 0 0 6px rgba(255, 255, 255, 0.25);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 14px rgba(255, 80, 80, 1),
      0 0 35px rgba(204, 0, 0, 0.75),
      inset 0 0 10px rgba(255, 255, 255, 0.4);
    opacity: 0.92;
  }
}

.scp-class {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.25rem 0.6rem;
  border: 1px solid;
  text-transform: uppercase;
  white-space: nowrap;
}

.scp-class.keter { color: #cc0000; border-color: #cc0000; background: rgba(204, 0, 0, 0.1); }
.scp-class.euclid { color: #c4a035; border-color: #c4a035; background: rgba(196, 160, 53, 0.1); }
.scp-class.facility { color: #5ec8d8; border-color: rgba(94, 200, 216, 0.65); background: rgba(94, 200, 216, 0.1); }
.scp-class.equipment { color: #7ee8a0; border-color: rgba(126, 232, 160, 0.55); background: rgba(126, 232, 160, 0.08); }
.scp-class.mtf { color: #8ab4f8; border-color: rgba(138, 180, 248, 0.6); background: rgba(138, 180, 248, 0.1); }
.scp-class.safe { color: #2a7a3a; border-color: #2a7a3a; background: rgba(42, 122, 58, 0.1); }
.scp-class.apollyon { color: #fff; border-color: #000; background: #000; }
.scp-class.thaumiel { color: #6a5acd; border-color: #6a5acd; background: rgba(106, 90, 205, 0.1); }

.scp-chevron {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: transform 0.3s ease, color 0.2s;
  flex-shrink: 0;
}

.scp-item.open .scp-chevron {
  transform: rotate(180deg);
  color: var(--red);
}

.scp-list--cards .scp-number {
  min-width: 0;
  font-size: 0.88rem;
}

.scp-list--cards .scp-class {
  font-size: 0.62rem;
  padding: 0.2rem 0.5rem;
}

.scp-list--cards .scp-chevron {
  font-size: 0.65rem;
}

.scp-item-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s ease;
}

.scp-item-body > * {
  min-height: 0;
  overflow: hidden;
}

.scp-item.open .scp-item-body {
  grid-template-rows: 1fr;
}

.scp-item.open .scp-item-body > * {
  overflow: visible;
}

.scp-list--cards .scp-dossier {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid rgba(180, 30, 30, 0.35);
  background:
    linear-gradient(180deg, rgba(204, 0, 0, 0.05), transparent 2.5rem),
    rgba(0, 0, 0, 0.18);
}

.scp-dossier {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.dossier-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.dossier-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dossier-value {
  color: var(--text);
}

.dossier-desc {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--panel-inner-bg);
  border-left: 3px solid var(--red);
  font-size: 0.9rem;
  line-height: 1.7;
  color: #bbb;
}

.dossier-desc p + p {
  margin-top: 0.6rem;
}

.containment-note {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
  letter-spacing: 0.05em;
}

/* ── Redacted dossier ── */

.scp-card--redacted {
  border-color: rgba(140, 140, 140, 0.35);
}

.scp-card--redacted:hover {
  border-color: rgba(180, 180, 180, 0.45);
}

.scp-card--redacted.open {
  border-color: rgba(160, 160, 160, 0.55);
  box-shadow: 0 0 25px rgba(120, 120, 120, 0.12);
}

.scp-card--redacted .scp-card__trigger::before {
  background: linear-gradient(90deg, #666, #999, #666);
  box-shadow: 0 0 10px rgba(160, 160, 160, 0.25);
}

.scp-card__seal {
  position: absolute;
  top: 2.4rem;
  right: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: rgba(200, 200, 200, 0.55);
  border: 1px solid rgba(200, 200, 200, 0.35);
  padding: 0.18rem 0.4rem;
  transform: rotate(-8deg);
  pointer-events: none;
}

.scp-redacted-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #bbb;
  background: rgba(120, 120, 120, 0.2);
  border: 1px solid rgba(180, 180, 180, 0.35);
  padding: 0.12rem 0.4rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.scp-card__location--redacted,
.scp-card__stat-redacted {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: #8a8580;
}

.scp-card__teaser--redacted {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--amber);
  line-height: 1.5;
}

.dossier-redacted {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid rgba(140, 140, 140, 0.35);
  background:
    linear-gradient(180deg, rgba(120, 120, 120, 0.06), transparent 2.5rem),
    rgba(0, 0, 0, 0.22);
}

.dossier-redacted-inner {
  margin-top: 1rem;
  padding: 1.35rem 1.1rem 1.15rem;
  border: 1px solid rgba(140, 140, 140, 0.35);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(120, 120, 120, 0.05),
      rgba(120, 120, 120, 0.05) 2px,
      transparent 2px,
      transparent 6px
    ),
    rgba(0, 0, 0, 0.42);
  text-align: center;
}

.dossier-redact-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 1rem 0 1.1rem;
}

.dossier-redacted-inline {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: #8a8580;
}

.dossier-redacted-meta {
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
}

.dossier-redacted-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.82rem;
}

.dossier-redacted-row dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dossier-redacted-row dd {
  margin: 0;
  color: #bbb;
}

/* ── SCP Abilities tab ── */

.abilities-tab--locked .abilities-content {
  display: none !important;
}

.abilities-lockscreen {
  padding: 0.5rem 0 1rem;
}

.abilities-lockscreen[hidden],
.roadmap-content[hidden] {
  display: none;
}

.roadmap-lockscreen-btn {
  position: relative;
  margin: 0 auto 1.1rem;
}

.lockscreen-frame {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 1.75rem 2rem;
  border: 1px solid rgba(204, 0, 0, 0.45);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(204, 0, 0, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(12, 6, 6, 0.95), rgba(4, 2, 2, 0.98));
  box-shadow:
    inset 0 0 60px rgba(204, 0, 0, 0.08),
    0 0 40px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.lockscreen-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 4px
  );
  animation: lockscreen-flicker 4s steps(2, end) infinite;
}

.lockscreen-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--red);
  border-style: solid;
  opacity: 0.65;
}

.lockscreen-corner--tl {
  top: 0.75rem;
  left: 0.75rem;
  border-width: 2px 0 0 2px;
}

.lockscreen-corner--br {
  right: 0.75rem;
  bottom: 0.75rem;
  border-width: 0 2px 2px 0;
}

.lockscreen-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.lockscreen-seal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  color: var(--red);
  border: 2px solid var(--red);
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.1rem;
  transform: rotate(-2deg);
  text-shadow: 0 0 16px rgba(204, 0, 0, 0.55);
  animation: lockscreen-seal-glow 3s ease-in-out infinite;
}

.lockscreen-title {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.85rem;
}

.lockscreen-lead {
  max-width: 34rem;
  margin: 0 auto 1.35rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #aaa;
}

.lockscreen-redact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.35rem;
}

.lockscreen-redact-bar {
  display: block;
  height: 0.65rem;
  width: min(100%, 22rem);
  background: repeating-linear-gradient(
    90deg,
    #1a1a1a 0,
    #1a1a1a 8px,
    #0d0d0d 8px,
    #0d0d0d 16px
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lockscreen-redact-bar--short {
  width: min(100%, 14rem);
}

.lockscreen-redact-bar--medium {
  width: min(100%, 18rem);
}

.lockscreen-meta {
  display: grid;
  gap: 0.55rem;
  max-width: 26rem;
  margin: 0 auto 1.15rem;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.85rem 1rem;
}

.lockscreen-meta-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.75rem;
  font-size: 0.82rem;
  align-items: baseline;
}

.lockscreen-meta dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.lockscreen-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #ddd;
}

.lockscreen-pulse {
  color: var(--red);
  animation: lockscreen-pulse-text 1.8s ease-in-out infinite;
}

.lockscreen-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.6;
}

@keyframes lockscreen-flicker {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.38; }
}

@keyframes lockscreen-seal-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.25);
    opacity: 0.88;
  }
  50% {
    box-shadow: 0 0 22px rgba(204, 0, 0, 0.55);
    opacity: 1;
  }
}

@keyframes lockscreen-pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.classified-stamp--amber {
  color: var(--amber);
  border-color: var(--amber);
}

.classified-stamp--cyan {
  color: #5ec8d8;
  border-color: rgba(94, 200, 216, 0.75);
}

.classified-stamp--rules {
  color: #c9a227;
  border-color: rgba(201, 162, 39, 0.75);
}

/* ── Rules tab ── */

.rules-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.rules-masthead {
  margin-bottom: 0.25rem;
}

.rules-masthead-frame {
  position: relative;
  padding: 1.5rem 1.35rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.08), transparent 55%),
    rgba(8, 4, 4, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.35);
  text-align: center;
}

.rules-masthead-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #c9a227;
  border-style: solid;
  pointer-events: none;
}

.rules-masthead-corner--tl {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px;
}

.rules-masthead-corner--br {
  bottom: 8px;
  right: 8px;
  border-width: 0 2px 2px 0;
}

.rules-masthead-brand {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c9a227;
  margin-bottom: 0.55rem;
}

.rules-masthead-title {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0ebe0;
  margin: 0 0 0.65rem;
}

.rules-masthead-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0;
}

.rules-masthead-updated time {
  color: #c9a227;
}

.rules-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rules-toc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.rules-toc-link span {
  color: #c9a227;
  font-weight: 600;
}

.rules-toc-link:hover {
  color: var(--text);
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.08);
}

.rules-section {
  scroll-margin-top: 5.5rem;
}

.rules-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
}

.rules-section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9a227;
}

.rules-section-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #f0ebe0;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}

.rules-item {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: rgba(8, 4, 4, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid rgba(201, 162, 39, 0.45);
  transition: border-color 0.2s, background 0.2s;
}

.rules-item:hover {
  background: rgba(12, 8, 4, 0.72);
  border-color: rgba(201, 162, 39, 0.18);
  border-left-color: #c9a227;
}

.rules-item--void {
  opacity: 0.55;
  border-left-color: rgba(138, 133, 128, 0.45);
}

.rules-item-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #c9a227;
  padding-top: 0.1rem;
}

.rules-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.rules-item-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.rules-void-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  border: 1px dashed rgba(138, 133, 128, 0.5);
  padding: 0.15rem 0.45rem;
}

.rules-item-penalty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.rules-penalty-chip {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border: 1px solid;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rules-penalty-chip--mute {
  color: #d4b84a;
  border-color: rgba(212, 184, 74, 0.45);
  background: rgba(212, 184, 74, 0.08);
}

.rules-penalty-chip--round {
  color: #e07a3a;
  border-color: rgba(224, 122, 58, 0.45);
  background: rgba(224, 122, 58, 0.08);
}

.rules-penalty-chip--ban {
  color: #e05050;
  border-color: rgba(224, 80, 80, 0.5);
  background: rgba(224, 80, 80, 0.1);
}

.rules-penalty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.rules-penalty-col {
  padding: 1rem 0.9rem;
  background: rgba(8, 4, 4, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rules-penalty-col--mute {
  border-top: 2px solid #d4b84a;
}

.rules-penalty-col--round {
  border-top: 2px solid #e07a3a;
}

.rules-penalty-col--ban {
  border-top: 2px solid #e05050;
}

.rules-penalty-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.rules-penalty-col--mute .rules-penalty-col-title { color: #d4b84a; }
.rules-penalty-col--round .rules-penalty-col-title { color: #e07a3a; }
.rules-penalty-col--ban .rules-penalty-col-title { color: #e05050; }

.rules-penalty-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rules-penalty-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rules-penalty-list li:last-child {
  border-bottom: none;
}

.rules-alliance-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}

.rules-alliance-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.rules-alliance-table th,
.rules-alliance-table td {
  padding: 0.55rem 0.45rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.rules-alliance-table thead th {
  background: rgba(201, 162, 39, 0.1);
  color: #c9a227;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rules-alliance-table tbody th {
  text-align: left;
  padding-left: 0.75rem;
  color: #f0ebe0;
  background: rgba(8, 4, 4, 0.55);
  white-space: nowrap;
  font-weight: 400;
}

.rules-alliance--ally {
  color: #6ecf7a;
  background: rgba(42, 122, 58, 0.18);
}

.rules-alliance--neutral {
  color: #d4b84a;
  background: rgba(196, 160, 53, 0.12);
}

.rules-alliance--enemy {
  color: #e07070;
  background: rgba(204, 0, 0, 0.14);
}

.rules-alliance-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 0;
  padding: 0;
}

.rules-alliance-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.rules-alliance-legend-item strong {
  font-weight: 600;
  color: var(--text);
}

.rules-alliance-legend-swatch {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  border: 1px solid;
}

.rules-alliance-legend-item--ally .rules-alliance-legend-swatch {
  background: rgba(42, 122, 58, 0.35);
  border-color: #6ecf7a;
}

.rules-alliance-legend-item--ally strong { color: #6ecf7a; }

.rules-alliance-legend-item--neutral .rules-alliance-legend-swatch {
  background: rgba(196, 160, 53, 0.25);
  border-color: #d4b84a;
}

.rules-alliance-legend-item--neutral strong { color: #d4b84a; }

.rules-alliance-legend-item--enemy .rules-alliance-legend-swatch {
  background: rgba(204, 0, 0, 0.25);
  border-color: #e07070;
}

.rules-alliance-legend-item--enemy strong { color: #e07070; }

.rules-section--important {
  padding: 1.15rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(204, 0, 0, 0.08), transparent 50%),
    rgba(8, 4, 4, 0.65);
  border: 1px solid rgba(204, 0, 0, 0.35);
}

.rules-section--important .rules-section-title {
  border-bottom-color: rgba(204, 0, 0, 0.35);
}

.rules-section--important .rules-section-num {
  color: #e05050;
}

.rules-important-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rules-important-item {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.rules-important-bullet {
  color: #e05050;
  font-family: var(--font-mono);
  line-height: 1.5;
}

.rules-empty {
  padding: 2rem;
  text-align: center;
  border: 1px dashed rgba(201, 162, 39, 0.3);
}

.rules-empty-text {
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin: 0;
}

/* ── SCP RoadMap tab ── */

.roadmap-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.roadmap-next-frame {
  position: relative;
  padding: 1.35rem 1.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(12, 8, 8, 0.95), rgba(20, 12, 12, 0.88));
  border: 1px solid rgba(94, 200, 216, 0.35);
  box-shadow:
    0 0 24px rgba(94, 200, 216, 0.08),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.roadmap-next-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(94, 200, 216, 0.55);
  border-style: solid;
  pointer-events: none;
}

.roadmap-next-corner--tl {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px;
}

.roadmap-next-corner--br {
  bottom: 8px;
  right: 8px;
  border-width: 0 2px 2px 0;
}

.roadmap-next-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: #5ec8d8;
  margin-bottom: 0.85rem;
}

.roadmap-next-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.roadmap-next-badges,
.roadmap-queue-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.roadmap-rework-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(196, 160, 53, 0.55);
  padding: 0.12rem 0.4rem;
  background: rgba(196, 160, 53, 0.08);
}

.roadmap-rework-badge--small {
  font-size: 0.58rem;
  padding: 0.08rem 0.32rem;
}

.roadmap-done-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7fd892;
  border: 1px solid rgba(62, 207, 90, 0.55);
  padding: 0.08rem 0.32rem;
  background: rgba(62, 207, 90, 0.08);
}

.roadmap-done-badge--polish {
  color: #7fd0e0;
  border-color: rgba(90, 190, 210, 0.55);
  background: rgba(90, 190, 210, 0.08);
}

.roadmap-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.roadmap-progress--large {
  margin-top: 0.15rem;
  margin-bottom: 1rem;
}

.roadmap-progress-track {
  position: relative;
  height: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(94, 200, 216, 0.2);
  overflow: hidden;
}

.roadmap-progress--large .roadmap-progress-track {
  height: 10px;
}

.roadmap-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(94, 200, 216, 0.55), #5ec8d8);
  box-shadow: 0 0 12px rgba(94, 200, 216, 0.35);
  transition: width 0.45s ease;
}

.roadmap-progress-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #5ec8d8;
  min-width: 2.5rem;
  text-align: right;
}

.roadmap-progress--large .roadmap-progress-label {
  font-size: 0.85rem;
}

.roadmap-next-id {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: #fff;
}

.roadmap-next-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.roadmap-next-summary {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 1rem;
  max-width: 52rem;
}

.roadmap-next-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(94, 200, 216, 0.15);
}

.roadmap-next-meta-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.roadmap-next-meta dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(94, 200, 216, 0.75);
  margin: 0;
}

.roadmap-next-meta dd {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
}

.roadmap-status-pulse {
  color: #7ee8a0;
  animation: roadmap-pulse 1.8s ease-in-out infinite;
}

@keyframes roadmap-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.roadmap-queue-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.roadmap-queue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.roadmap-queue-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(8, 4, 4, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.roadmap-queue-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.roadmap-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.roadmap-queue-pos {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(94, 200, 216, 0.65);
  text-align: center;
}

.roadmap-queue--done .roadmap-queue-title {
  color: #7fd892;
}

.roadmap-queue--done .roadmap-queue-item {
  border-color: rgba(62, 207, 90, 0.22);
}

.roadmap-queue--done .roadmap-queue-pos {
  color: #3ecf5a;
  font-size: 0.95rem;
}

.roadmap-queue-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.roadmap-queue-id {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #fff;
  letter-spacing: 0.06em;
}

.roadmap-queue-name {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.roadmap-queue-class {
  flex-shrink: 0;
}

.roadmap-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0.85;
}

.roadmap-empty {
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.roadmap-empty-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.scp-ability-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fd48f;
  border: 1px solid rgba(143, 212, 143, 0.45);
  background: rgba(143, 212, 143, 0.08);
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.scp-ability-count--hidden {
  color: var(--text-dim);
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.scp-abilities-list .scp-item.open .scp-item-body {
  grid-template-rows: 1fr;
}

.abilities-panel {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.abilities-panel-note {
  margin: 1rem 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.abilities-panel-note code {
  color: var(--amber);
  font-size: 0.68rem;
}

.abilities-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ability-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  padding: 0.85rem 1rem;
  background: var(--panel-inner-bg);
  border: 1px solid rgba(180, 30, 30, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ability-card:hover {
  border-color: var(--border-bright);
}

.ability-card--attack { border-left: 3px solid #cc4444; }
.ability-card--active { border-left: 3px solid #4a9fd4; }
.ability-card--passive { border-left: 3px solid #c4a035; }
.ability-card--special { border-left: 3px solid #9b59b6; }

.ability-icon-wrap {
  position: relative;
  width: auto;
  height: auto;
  min-width: 32px;
  min-height: 32px;
  border: 1px dashed rgba(196, 160, 53, 0.55);
  border-color: color-mix(in srgb, var(--ability-frame, rgba(196, 160, 53, 0.55)) 70%, rgba(196, 160, 53, 0.55));
  background:
    linear-gradient(135deg, rgba(204, 0, 0, 0.08), rgba(0, 0, 0, 0.45)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 4px,
      transparent 4px,
      transparent 8px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 4px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ability-frame, transparent) 35%, transparent);
}

.ability-icon {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: none;
}

.ability-icon--missing {
  display: none;
}

.ability-icon-fallback {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--amber);
  text-align: center;
  padding: 0.25rem;
  line-height: 1.2;
}

.ability-icon-fallback--visible {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ability-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ability-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0;
}

.ability-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ability-slot,
.ability-hotkey,
.ability-type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
}

.ability-hotkey {
  color: #fff;
  border-color: rgba(204, 0, 0, 0.55);
  background: rgba(204, 0, 0, 0.12);
}

.ability-slot {
  color: var(--text-dim);
}

.ability-type {
  color: var(--amber);
  border-color: rgba(196, 160, 53, 0.45);
  background: rgba(196, 160, 53, 0.08);
}

.ability-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #bbb;
}

.ability-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.65rem 0 0;
}

.ability-stat {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.ability-stat dt {
  color: var(--text-dim);
  text-transform: uppercase;
}

.ability-stat dd {
  margin: 0;
  color: #8fd48f;
}

.abilities-redacted {
  margin: 0 1.25rem 1.25rem;
  padding: 1.25rem 1rem;
  border: 1px solid rgba(204, 0, 0, 0.35);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(204, 0, 0, 0.04),
      rgba(204, 0, 0, 0.04) 2px,
      transparent 2px,
      transparent 6px
    ),
    rgba(0, 0, 0, 0.45);
  text-align: center;
}

.redacted-seal {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--red);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 12px rgba(204, 0, 0, 0.45);
}

.redacted-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.redacted-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.65rem;
}

.redacted-text,
.redacted-note {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #aaa;
  max-width: 36rem;
  margin: 0 auto;
}

.redacted-note {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
}

.redacted-text code {
  color: var(--amber);
  font-size: 0.82em;
}

/* ── Containment modal (block exit to site root) ── */

body.containment-modal-open {
  overflow: hidden;
}

.containment-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.containment-modal[hidden] {
  display: none;
}

.containment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.containment-modal-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(204, 0, 0, 0.55);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(204, 0, 0, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(14, 8, 8, 0.98), rgba(6, 3, 3, 0.99));
  box-shadow:
    0 0 50px rgba(204, 0, 0, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: containment-modal-in 0.35s ease;
}

.containment-modal-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

.containment-modal-seal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  border: 1px solid rgba(196, 160, 53, 0.55);
  padding: 0.25rem 0.55rem;
  margin-bottom: 0.85rem;
}

.containment-modal-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 4vw, 1.2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.75rem;
}

.containment-modal-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #bbb;
  margin-bottom: 0.85rem;
}

.containment-modal-text code {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.85em;
}

.containment-modal-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 1.1rem;
}

.containment-modal-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, rgba(204, 0, 0, 0.85), rgba(120, 0, 0, 0.95));
  border: 1px solid rgba(255, 80, 80, 0.45);
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.containment-modal-btn:hover {
  box-shadow: 0 0 18px rgba(204, 0, 0, 0.45);
}

.containment-modal-btn:active {
  transform: scale(0.98);
}

@keyframes containment-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Auth modal (вход / регистрация / профиль) ── */

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.auth-modal-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(204, 0, 0, 0.55);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(204, 0, 0, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(14, 8, 8, 0.98), rgba(6, 3, 3, 0.99));
  box-shadow:
    0 0 50px rgba(204, 0, 0, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.45);
  animation: containment-modal-in 0.35s ease;
}

.auth-modal-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

.auth-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.auth-modal-close:hover,
.auth-modal-close:focus-visible {
  color: #fff;
  border-color: var(--border);
  outline: none;
}

.auth-modal-seal {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  border: 1px solid rgba(196, 160, 53, 0.55);
  padding: 0.25rem 0.55rem;
  margin-bottom: 0.85rem;
}

.auth-modal-title {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1rem;
}

.auth-view {
  position: relative;
}

.auth-view[hidden] {
  display: none;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.auth-switch-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.5rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.auth-switch-btn:hover {
  color: var(--text);
  background: rgba(204, 0, 0, 0.08);
}

.auth-switch-btn.active {
  color: #fff;
  background: rgba(204, 0, 0, 0.14);
  border-bottom-color: var(--red);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-field[hidden] {
  display: none;
}

.auth-field-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.auth-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  padding: 0.6rem 0.7rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-input::-ms-reveal,
.auth-input::-ms-clear {
  display: none;
}

.auth-eye {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-eye::before {
  content: '';
  width: 1.15rem;
  height: 1.15rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-eye[aria-pressed="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.auth-eye:hover,
.auth-eye:focus-visible {
  color: #fff;
  outline: none;
}

.auth-eye[aria-pressed="true"] {
  color: var(--red);
}

.auth-input::placeholder {
  color: rgba(138, 133, 128, 0.6);
}

.auth-input:focus {
  outline: none;
  border-color: var(--border-bright);
  box-shadow: 0 0 12px rgba(204, 0, 0, 0.25);
}

.auth-hint {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.auth-hint[hidden] {
  display: none;
}

.auth-message {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.65rem;
  border-left: 3px solid;
}

.auth-message[hidden] {
  display: none;
}

.auth-message--error {
  color: #ff8a8a;
  border-color: var(--red);
  background: rgba(204, 0, 0, 0.12);
}

.auth-message--success {
  color: #7fd892;
  border-color: #3ecf5a;
  background: rgba(62, 207, 90, 0.08);
}

.auth-submit {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, rgba(204, 0, 0, 0.85), rgba(120, 0, 0, 0.95));
  border: 1px solid rgba(255, 80, 80, 0.45);
  padding: 0.7rem 1.25rem;
  margin-top: 0.2rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, opacity 0.2s;
}

.auth-submit:hover:not(:disabled) {
  box-shadow: 0 0 18px rgba(204, 0, 0, 0.45);
}

.auth-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.auth-submit:disabled,
.auth-logout:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-profile {
  margin-bottom: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.auth-profile-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
}

.auth-profile-row + .auth-profile-row {
  border-top: 1px solid rgba(180, 30, 30, 0.25);
}

.auth-profile-row dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  align-self: center;
}

.auth-profile-row dd {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.auth-profile-name {
  color: #fff !important;
  text-shadow: 0 0 12px var(--red-glow);
}

.auth-settings-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.auth-settings + .auth-settings {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(180, 30, 30, 0.25);
}

.auth-submit--secondary {
  background: rgba(204, 0, 0, 0.12);
  border-color: var(--border-bright);
}

.auth-input--code {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-input--code::placeholder {
  letter-spacing: 0.12em;
}

.auth-link {
  display: block;
  margin: 0.9rem auto 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.auth-link:hover,
.auth-link:focus-visible {
  color: #fff;
  outline: none;
}

.auth-link[hidden] {
  display: none;
}

.auth-hint strong {
  color: var(--amber);
  font-weight: 700;
}

.auth-code-box {
  display: flex;
  align-items: stretch;
  margin: 1rem 0 0.8rem;
  border: 1px solid rgba(196, 160, 53, 0.55);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 18px rgba(196, 160, 53, 0.12);
}

.auth-code-value {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.8rem 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 3.6vw, 1.15rem);
  letter-spacing: 0.12em;
  color: #fff;
  text-align: center;
  user-select: all;
  overflow-wrap: anywhere;
}

.auth-code-copy {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(196, 160, 53, 0.08);
  border: none;
  border-left: 1px solid rgba(196, 160, 53, 0.45);
  padding: 0 0.85rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.auth-code-copy:hover,
.auth-code-copy:focus-visible {
  color: #fff;
  background: rgba(196, 160, 53, 0.2);
  outline: none;
}

#auth-view-code .auth-submit {
  width: 100%;
  margin-top: 0.4rem;
}

.auth-logout {
  width: 100%;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.auth-logout:hover:not(:disabled) {
  color: #fff;
  border-color: var(--border-bright);
}

/* ── Footer ── */

.site-footer {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-divider {
  margin: 0 0.75rem;
  opacity: 0.4;
}

.site-footer time {
  color: var(--text);
  letter-spacing: 0.06em;
}

.site-footer strong {
  color: var(--red);
}

/* ── Responsive ── */

/* Планшеты, телефоны — прокрутка страницы и touch */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: auto;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }

  .site-top,
  .site-header,
  .tabs,
  .content,
  .site-footer {
    max-width: 100%;
    overflow-x: clip;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

/* Планшеты и узкие ноутбуки */
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .header-badges {
    margin-left: auto;
  }

  .server-monitor {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #8b0000 rgba(8, 4, 4, 0.85);
  }

  .server-monitor::-webkit-scrollbar {
    height: 6px;
  }

  .server-monitor::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #6a0000, #cc0000);
    border-radius: 3px;
  }

  .server-info,
  .server-name-row,
  .server-door-codes {
    width: max-content;
    min-width: min-content;
    max-width: none;
  }

  .server-name,
  .server-door-codes {
    overflow: visible;
    text-overflow: unset;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 1.15rem 1rem 0.85rem;
  }

  .logo-text h1 {
    font-size: clamp(1.15rem, 5vw, 1.6rem);
    letter-spacing: 0.05em;
  }

  .logo-icon img {
    height: 42px;
  }

  .subtitle {
    letter-spacing: 0.15em;
    font-size: 0.68rem;
  }

  .content {
    padding: 1.15rem 1rem 2.5rem;
    overflow-x: hidden;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .scp-list {
    overflow: visible;
  }

  .rules-penalty-grid {
    grid-template-columns: 1fr;
  }

  .rules-item {
    grid-template-columns: 2.75rem 1fr;
    padding: 0.75rem 0.8rem;
  }

  .rules-masthead-frame {
    padding: 1.25rem 1rem 1.15rem;
  }

  .scp-item.open .scp-item-body {
    grid-template-rows: 1fr;
  }

  .scp-item.open .scp-item-body > * {
    overflow: visible;
  }

  .ability-card {
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .ability-icon-wrap {
    width: auto;
    height: auto;
  }

  .ability-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .scp-ability-count {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .scp-ability-item .scp-item-header {
    flex-wrap: wrap;
  }

  .lockscreen-frame {
    padding: 1.75rem 1rem 1.5rem;
  }

  .lockscreen-meta-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .tabs {
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex-shrink: 0;
    padding: 0.75rem 1.1rem;
    font-size: 0.78rem;
  }

  .panel-header h2 {
    font-size: 1.05rem;
  }

  .panel-desc {
    font-size: 0.85rem;
    padding-left: 0.5rem;
  }

  .site-footer {
    padding: 1rem 1rem 1.5rem;
    line-height: 1.8;
  }

  .auth-input {
    font-size: 16px;
  }
}

/* Телефоны */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .logo-block {
    min-width: 0;
  }

  .logo-text h1 {
    white-space: normal;
    font-size: 1.2rem;
  }

  .header-badges {
    align-self: stretch;
    flex-wrap: nowrap;
    width: 100%;
    margin-left: 0;
    order: 2;
  }

  .server-monitor {
    order: 3;
  }

  .server-name,
  .server-door-codes {
    overflow: visible;
    text-overflow: unset;
  }

  .update-badge,
  .threat-badge,
  .auth-badge {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    padding: 0.4rem 0.45rem;
  }

  .auth-badge {
    flex: 0 1 auto;
    justify-content: center;
    max-width: 40%;
  }

  .auth-modal {
    padding: 0.75rem;
  }

  .auth-modal-frame {
    padding: 1.5rem 1rem 1.25rem;
  }

  .auth-profile-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .classified-stamp {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .panel-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .scp-list--cards {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .scp-list--cards .scp-card__trigger {
    min-height: 19rem;
    padding: 1rem 0.9rem 0.9rem;
  }

  .scp-list--cards .scp-card__stats {
    grid-template-columns: 1fr 1fr;
    min-height: 3.35rem;
  }

  .scp-abilities-list .scp-item-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 0.75rem;
  }

  .scp-abilities-list .scp-class {
    order: 3;
    margin-left: calc(4.5rem + 0.75rem);
  }

  .scp-abilities-list .scp-number {
    font-size: 0.78rem;
    min-width: 4.5rem;
  }

  .dossier-grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .dossier-label {
    margin-top: 0.5rem;
  }

  .dossier-redacted-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .dossier-redacted-row dt {
    margin-top: 0.35rem;
  }

  .footer-divider {
    display: none;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .roadmap-next-meta-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .roadmap-queue-item {
    grid-template-columns: 1.75rem 1fr;
  }

  .roadmap-queue-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Маленькие телефоны */
@media (max-width: 400px) {
  .logo-block {
    gap: 0.65rem;
  }

  .logo-icon img {
    height: 36px;
  }

  .threat-badge {
    letter-spacing: 0.08em;
  }
}

/* Сенсорные экраны — удобнее нажимать */
@media (pointer: coarse) {
  .tab {
    min-height: 44px;
  }

  .scp-abilities-list .scp-item-header {
    min-height: 48px;
  }

  .server-pulse-link {
    padding: 0.35rem;
    margin: -0.35rem;
  }
}

/* ── Performance (FPS) ── */

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  html {
    scroll-behavior: smooth;
  }

  .site-top,
  .site-header,
  .tabs {
    backdrop-filter: none;
  }

  .site-top {
    background: rgba(8, 4, 4, 0.98);
  }

  .site-header {
    background: rgba(8, 4, 4, 0.98);
  }

  .tabs {
    background: rgba(8, 4, 4, 0.97);
  }

  .scp-list--cards .scp-card:hover {
    transform: none;
  }

  .scp-item {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8, 4, 4, 0.42);
  }
}

html.perf-lite .scanlines,
html.perf-lite .site-loader-scanlines,
html.perf-lite .lockscreen-scanlines,
html.perf-lite .containment-modal-scanlines,
html.perf-lite .auth-modal-scanlines {
  display: none;
}

html.perf-lite .site-top,
html.perf-lite .site-header,
html.perf-lite .tabs,
html.perf-lite .scp-item,
html.perf-lite .containment-modal-backdrop,
html.perf-lite .auth-modal-backdrop {
  backdrop-filter: none;
}

html.perf-lite .logo-icon img,
html.perf-lite .site-loader-logo img {
  filter: none;
}

html.perf-lite .logo-text h1 {
  text-shadow: 0 0 12px var(--red-glow);
}

html.perf-lite .threat-badge,
html.perf-lite .threat-badge::after,
html.perf-lite .scp-new-badge,
html.perf-lite .server-pulse--loading,
html.perf-lite .server-pulse--online,
html.perf-lite .lockscreen-seal,
html.perf-lite .lockscreen-pulse,
html.perf-lite .site-loader-logo,
html.perf-lite .site-loader-scanlines,
html.perf-lite .site-loader-status {
  animation: none !important;
}

html.perf-lite body::before,
html.perf-lite body::after,
html.perf-lite .overlay {
  animation: none !important;
}

html.perf-lite body::after {
  display: none;
}

html.perf-lite .tab-panel.active {
  animation: none;
}

html.page-hidden *,
html.page-hidden *::before,
html.page-hidden *::after {
  animation-play-state: paused !important;
}

html.perf-lite .scp-item,
html.perf-lite .ability-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(8, 4, 4, 0.48);
  box-shadow: none;
}

html.perf-lite .dossier-desc {
  background: rgba(0, 0, 0, 0.32);
}

html.perf-lite .scp-item.open {
  box-shadow: 0 0 12px rgba(204, 0, 0, 0.12);
}

html.perf-lite .scp-card__scanlines {
  display: none;
}

html.perf-lite .scp-list--cards .scp-card:hover {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.perf-lite) {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body {
    background-attachment: scroll !important;
  }

  body::before {
    position: fixed;
    animation: none !important;
  }

  body::after,
  .site-bg-tertiary {
    display: none;
  }

  .overlay {
    animation: none !important;
  }
}
