@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap');

/* =========================================
   FIVE PEBBLES — DEFAULT THEME
========================================= */

:root {
  color-scheme: dark;

  --bg: #100e16;
  --panel: #191522;
  --panel2: #211a2c;
  --line: #40304e;

  --text: #e8dfeb;
  --muted: #a092ad;

  --accent: #b78add;
  --accent-strong: #8e62b9;

  --warm: #d99b70;
  --good: #91c1b5;
  --danger: #c8798f;

  --surface: rgba(25,21,34,.94);
  --surface-raised: #211a2c;
  --surface-hover: #2b2036;

  --button-bg: #30233b;
  --button-border: #604875;
  --button-text: #e4d4ef;

  --link: #d8c6e2;

  --glow-a: rgba(116,66,139,.22);
  --glow-b: rgba(80,42,91,.16);

  --shadow: 0 16px 45px rgba(0,0,0,.22);

  --radius: 12px;

  --mono: "IBM Plex Mono", monospace;
  --sans: Inter, system-ui, sans-serif;

  --scanline-opacity: 0;
}


/* =========================================
   SCP-079 — FACILITY TERMINAL
========================================= */

:root[data-theme="scp-079"] {
  --bg: #080d0a;
  --panel: #0e1711;
  --panel2: #142019;
  --line: #294936;

  --text: #d8eadc;
  --muted: #829b89;

  --accent: #75e69a;
  --accent-strong: #35ad67;

  --warm: #d9b56b;
  --good: #75e69a;
  --danger: #e06e61;

  --surface: rgba(13,22,16,.96);
  --surface-raised: #142019;
  --surface-hover: #1a2b20;

  --button-bg: #14251a;
  --button-border: #356b47;
  --button-text: #c9f5d5;

  --link: #a9eabb;

  --glow-a: rgba(30,116,63,.14);
  --glow-b: rgba(155,111,42,.07);

  --shadow: 0 14px 42px rgba(0,0,0,.38);

  --radius: 4px;

  --scanline-opacity: .10;
}


/* =========================================
   STANDARD ARCHIVE
========================================= */

:root[data-theme="standard"] {
  --bg: #101419;
  --panel: #191f26;
  --panel2: #202933;
  --line: #35424e;

  --text: #e2e8ed;
  --muted: #9ba9b5;

  --accent: #8bb9d7;
  --accent-strong: #568fb5;

  --warm: #d7b17b;
  --good: #8fc5ae;
  --danger: #d47f82;

  --surface: rgba(25,31,38,.96);
  --surface-raised: #202933;
  --surface-hover: #293541;

  --button-bg: #263543;
  --button-border: #45647b;
  --button-text: #e0edf5;

  --link: #c5ddeb;

  --glow-a: rgba(58,104,135,.14);
  --glow-b: rgba(70,83,105,.10);

  --shadow: 0 14px 42px rgba(0,0,0,.25);

  --radius: 9px;

  --scanline-opacity: 0;
}


/* =========================================
   GLOBAL
========================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);

  background:
    radial-gradient(ellipse at 78% 0%, var(--glow-a), transparent 38%),
    radial-gradient(ellipse at 5% 85%, var(--glow-b), transparent 36%),
    var(--bg);

  font-family: var(--sans);

  transition:
    background-color .35s ease,
    color .25s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;

  opacity: var(--scanline-opacity);

  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(0,0,0,.34) 4px
  );
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}


/* =========================================
   ATMOSPHERE
========================================= */

.ambient-layer {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  opacity: .35;

  background:
    radial-gradient(ellipse at 50% 30%, var(--glow-a), transparent 45%);

  animation: ambient-drift 24s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  from {
    transform: translate3d(-1.5%,0,0) scale(1);
  }

  to {
    transform: translate3d(1.5%,2%,0) scale(1.06);
  }
}

.skyline {
  height: 115px;
  opacity: .35;

  border-bottom: 1px solid var(--line);

  background:
    linear-gradient(180deg,transparent,var(--bg)),
    repeating-linear-gradient(
      90deg,
      transparent 0 40px,
      var(--line) 41px 43px,
      transparent 44px 75px
    );

  position: absolute;
  inset: 0 0 auto;
  pointer-events: none;
}


/* =========================================
   HEADER AND THEME SELECTOR
========================================= */

.topbar {
  position: relative;
  min-height: 90px;
  max-width: 1600px;
  margin: auto;
  padding: 16px 3vw;

  display: flex;
  align-items: center;
  gap: 22px;

  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  font-family: var(--mono);
  letter-spacing: .08em;
  font-weight: 600;
  font-size: 15px;
}

.sigil {
  font-size: 30px;
  color: var(--accent);
  text-shadow: 0 0 18px var(--glow-a);
}

.tagline,
.theme-control-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-control select {
  color: var(--text);
  background: var(--surface-raised);

  border: 1px solid var(--line);
  border-radius: var(--radius);

  padding: 9px 28px 9px 10px;

  cursor: pointer;
  font: 11px var(--mono);
}

.theme-control select:hover {
  border-color: var(--accent);
}

.search-link {
  border: 1px solid var(--line);
  padding: 10px 14px;

  border-radius: var(--radius);

  color: var(--link);
  background: var(--surface-raised);

  font-size: 12px;
}

.search-link:hover {
  border-color: var(--accent);
}


/* =========================================
   PAGE LAYOUT
========================================= */

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 3vw 60px;
  position: relative;
}

.page-heading {
  margin: 18px 0 28px;
}

.page-heading h1 {
  margin: 8px 0;
  font-size: 30px;
  letter-spacing: -.04em;
}

.page-heading p,
.muted {
  color: var(--muted);
}

.eyebrow,
.sidebar-title {
  color: var(--accent);
  font: 500 11px var(--mono);
  letter-spacing: .16em;
}

.crumb {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;

  color: var(--muted);
  font: 12px var(--mono);

  margin: 0 0 18px;
}

.crumb a {
  color: var(--warm);
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  min-height: 520px;
}

.archive-layout {
  display: grid;
  grid-template-columns: 230px minmax(400px,1fr) 285px;
  gap: 14px;
  min-height: 650px;
  align-items: start;
}


/* =========================================
   PANELS
========================================= */

.sidebar,
.details-panel,
.chat-panel,
.main-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 18px 14px;
}

.sidebar-title {
  padding: 4px 4px 16px;
}

.main-panel {
  padding: 26px;
}

.compact {
  margin-top: 0;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


/* =========================================
   SERVER CARDS
========================================= */

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 14px;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 20px;
  min-height: 100px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: linear-gradient(
    135deg,
    var(--surface-raised),
    var(--surface)
  );

  transition: .2s ease;
  box-shadow: var(--shadow);
}

.guild-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.guild-emblem {
  width: 48px;
  height: 48px;

  border-radius: 50%;

  display: grid;
  place-items: center;

  color: var(--text);

  background: radial-gradient(
    circle,
    var(--accent-strong),
    var(--panel)
  );

  font-size: 24px;
}

.guild-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.guild-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chevron {
  margin-left: auto;
  color: var(--accent);
  font-size: 28px;
}


/* =========================================
   CHANNEL TREE
========================================= */

.tree-group {
  margin-bottom: 20px;
}

.tree-category {
  color: var(--warm);
  font: 13px var(--mono);
  padding: 7px 5px;
}

.tree-channel {
  display: block;

  color: var(--muted);

  padding: 9px 10px;
  border-radius: calc(var(--radius) * .55);

  font-size: 13px;

  transition: background .16s, color .16s;
}

.tree-channel:hover,
.tree-channel.active {
  background: var(--surface-hover);
  color: var(--text);
}

.tree-channel.active {
  box-shadow: inset 2px 0 var(--accent);
}

.tree-channel small {
  float: right;
  color: var(--muted);
}


/* =========================================
   CHANNEL HEADER
========================================= */

.channel-header {
  padding: 20px 22px;

  border-bottom: 1px solid var(--line);

  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.channel-header h1 {
  margin: 7px 0;
  font-size: 21px;
}

.channel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hash {
  color: var(--accent);
}

.readonly {
  align-self: center;

  color: var(--good);
  border: 1px solid var(--good);
  border-radius: var(--radius);

  padding: 7px 9px;

  font: 10px var(--mono);
  letter-spacing: .1em;
  white-space: nowrap;
}


/* =========================================
   MESSAGES
========================================= */

.messages {
  padding: 14px 18px;
  flex: 1;
  min-height: 300px;
}

.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;

  color: var(--muted);
  margin: 18px 0 10px;

  font: 11px var(--mono);
}

.date-divider::before,
.date-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.message {
  display: flex;
  gap: 12px;

  padding: 10px 8px;
  border-radius: var(--radius);

  cursor: pointer;

  transition:
    background .16s,
    border-color .16s;

  border: 1px solid transparent;
}

.message:hover,
.message.selected {
  background: var(--surface-hover);
}

.message.selected {
  border-color: var(--accent);
}

.message.deleted {
  opacity: .65;
}

.avatar {
  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: var(--surface-hover);
  object-fit: cover;
  flex: none;
}

.avatar.large {
  width: 44px;
  height: 44px;
}

.message-body {
  min-width: 0;
  flex: 1;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 1px 0 5px;
}

.message-meta strong {
  color: var(--accent);
  font-size: 13px;
}

.message-meta time,
.edited {
  color: var(--muted);
  font: 10px var(--mono);
}

.edited {
  font-style: italic;
}

.message-content {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.attachment {
  display: block;
  color: var(--good);
  font-size: 12px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.attachment small {
  color: var(--muted);
}


/* =========================================
   PAGINATION AND BUTTONS
========================================= */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;

  padding: 12px;

  border-top: 1px solid var(--line);

  color: var(--muted);
  font: 11px var(--mono);
}

.button {
  color: var(--button-text);
  background: var(--button-bg);

  border: 1px solid var(--button-border);
  padding: 9px 12px;

  border-radius: var(--radius);
  cursor: pointer;
}

.button:hover {
  border-color: var(--accent);
  filter: brightness(1.12);
}

.button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.archive-notice {
  text-align: center;
  padding: 12px;

  color: var(--muted);

  border-top: 1px solid var(--line);

  font: 10px var(--mono);
}


/* =========================================
   DETAILS PANEL
========================================= */

.details-panel {
  padding: 18px;
}

.detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 22px;
}

.detail-author strong,
.detail-author small {
  display: block;
}

.detail-author small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

dl {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 9px;

  font: 10px var(--mono);
  overflow-wrap: anywhere;
}

dt {
  color: var(--accent);
}

dd {
  margin: 0;
  color: var(--text);
}

.detail-content {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 15px;

  font-size: 13px;
  line-height: 1.5;
}


/* =========================================
   SEARCH
========================================= */

.search-form {
  display: flex;
  gap: 10px;
  max-width: 760px;
}

.search-form input {
  flex: 1;
  min-width: 0;

  background: var(--surface-raised);
  border: 1px solid var(--line);

  color: var(--text);

  padding: 13px 15px;
  border-radius: var(--radius);

  outline: none;
}

.search-form input:focus {
  border-color: var(--accent);
}

.primary {
  background: var(--accent-strong);
}

.results {
  max-width: 900px;
  margin-top: 20px;

  display: grid;
  gap: 10px;
}

.result-card {
  padding: 15px;

  border: 1px solid var(--line);
  background: var(--surface);

  border-radius: var(--radius);
  line-height: 1.5;
}

.result-card:hover {
  border-color: var(--accent);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;

  font-size: 11px;
}

.result-meta strong {
  color: var(--accent);
}

.result-meta span,
.result-meta time {
  color: var(--muted);
}


/* =========================================
   FIVE PEBBLES DETAILS
========================================= */

:root[data-theme="five-pebbles"] .skyline {
  opacity: .42;

  background:
    linear-gradient(180deg,transparent,var(--bg)),
    repeating-linear-gradient(
      90deg,
      transparent 0 34px,
      rgba(183,138,221,.16) 35px 37px,
      transparent 38px 72px
    );
}

:root[data-theme="five-pebbles"] .guild-emblem {
  box-shadow: 0 0 24px rgba(183,138,221,.12);
}

:root[data-theme="five-pebbles"] .message:hover {
  transform: translateX(2px);
}


/* =========================================
   SCP-079 FACILITY INTERFACE
========================================= */

:root[data-theme="scp-079"] body {
  font-family: var(--mono);
}

:root[data-theme="scp-079"] .brand,
:root[data-theme="scp-079"] .page-heading h1,
:root[data-theme="scp-079"] .channel-header h1 {
  text-transform: uppercase;
  letter-spacing: .07em;
}

:root[data-theme="scp-079"] .skyline {
  opacity: .55;
  height: 125px;

  background:
    linear-gradient(180deg,transparent,var(--bg)),
    repeating-linear-gradient(
      90deg,
      transparent 0 24px,
      rgba(117,230,154,.10) 25px 26px,
      transparent 27px 49px
    );
}

:root[data-theme="scp-079"] .sigil {
  text-shadow:
    0 0 8px rgba(117,230,154,.7),
    0 0 22px rgba(117,230,154,.25);
}

:root[data-theme="scp-079"] .sidebar,
:root[data-theme="scp-079"] .details-panel,
:root[data-theme="scp-079"] .chat-panel,
:root[data-theme="scp-079"] .main-panel {
  box-shadow:
    inset 0 1px rgba(117,230,154,.04),
    var(--shadow);
}

:root[data-theme="scp-079"] .sidebar-title::before {
  content: "[ ";
  color: var(--muted);
}

:root[data-theme="scp-079"] .sidebar-title::after {
  content: " ]";
  color: var(--muted);
}

:root[data-theme="scp-079"] .message-meta strong {
  text-transform: uppercase;
  letter-spacing: .035em;
}

:root[data-theme="scp-079"] .readonly,
:root[data-theme="scp-079"] .button {
  text-transform: uppercase;
  letter-spacing: .04em;
}

:root[data-theme="scp-079"] .tree-channel.active {
  background: rgba(53,173,103,.13);
}

:root[data-theme="scp-079"] .channel-header {
  background: linear-gradient(
    90deg,
    rgba(53,173,103,.07),
    transparent 70%
  );
}

:root[data-theme="scp-079"] .date-divider {
  text-transform: uppercase;
  letter-spacing: .1em;
}

:root[data-theme="scp-079"] .loading {
  font-family: var(--mono);
}

:root[data-theme="scp-079"] .loading::after {
  content: "";

  display: block;

  width: 42%;
  height: 2px;

  margin: 14px auto 0;

  background: var(--accent);

  transform-origin: left;

  animation: terminal-scan 1.6s ease-in-out infinite alternate;
}

@keyframes terminal-scan {
  from {
    transform: scaleX(.12);
    opacity: .35;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

:root[data-theme="scp-079"] .message.selected {
  box-shadow: inset 3px 0 var(--accent);
}

:root[data-theme="scp-079"] .guild-emblem {
  border-radius: var(--radius);
  background: var(--surface-hover);
  border: 1px solid var(--line);
}

:root[data-theme="scp-079"] .tagline {
  text-transform: uppercase;
}


/* =========================================
   STANDARD ARCHIVE DETAILS
========================================= */

:root[data-theme="standard"] .skyline {
  opacity: .18;
}


/* =========================================
   STICKY ARCHIVE PANELS
========================================= */

:root {
  --sticky-top: 16px;
}

.archive-layout {
  align-items: start;
}

.sidebar,
.details-panel {
  position: sticky;
  top: var(--sticky-top);
  align-self: start;

  max-height: calc(100vh - var(--sticky-top) - 16px);

  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: thin;
}


/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:1100px) {
  .archive-layout {
    grid-template-columns: 190px minmax(300px,1fr);
  }

  .details-panel {
    grid-column: 2;
  }
}

@media(max-width:900px) {
  .sidebar,
  .details-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media(max-width:700px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 14px 5vw;
    gap: 12px;
  }

  .tagline {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .theme-control {
    min-width: 0;
  }

  .theme-control select {
    max-width: 155px;
  }

  main {
    padding: 18px 4vw 40px;
  }

  .layout,
  .archive-layout {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    max-height: 230px;
    overflow: auto;
    width: 100%;
  }

  .details-panel {
    order: 3;
    width: 100%;
  }

  .channel-header {
    padding: 15px;
  }

  .messages {
    padding: 10px 7px;
  }

  .search-form {
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .brand {
    font-size: 12px;
  }
}


/* =========================================
   ACCESSIBILITY
========================================= */

@media(prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}



/* =========================================
   FIVE PEBBLES — SUPERSTRUCTURE OVERHAUL
   Add to the END of main.css
========================================= */

/* Atmospheric depth */
:root[data-theme="five-pebbles"] body {
  background:
    radial-gradient(ellipse at 50% -15%, rgba(157, 91, 194, .23), transparent 52%),
    radial-gradient(ellipse at 90% 45%, rgba(93, 52, 129, .13), transparent 42%),
    radial-gradient(ellipse at 5% 85%, rgba(116, 69, 144, .15), transparent 38%),
    linear-gradient(145deg, #100d18, #151020 48%, #0d0b14);
  background-attachment: fixed;
}

/* Soft ambient light */
:root[data-theme="five-pebbles"] .ambient-layer {
  opacity: .55;
  background:
    radial-gradient(ellipse at 35% 25%, rgba(177, 112, 219, .18), transparent 38%),
    radial-gradient(ellipse at 75% 70%, rgba(104, 65, 146, .15), transparent 42%);
  animation: pebble-atmosphere 30s ease-in-out infinite alternate;
}

@keyframes pebble-atmosphere {
  0% {
    transform: translate3d(-1%, 0, 0) scale(1);
    opacity: .35;
  }
  100% {
    transform: translate3d(1%, 2%, 0) scale(1.08);
    opacity: .65;
  }
}

/* Superstructure skyline */
:root[data-theme="five-pebbles"] .skyline {
  height: 165px;
  opacity: .55;
  border-bottom: 1px solid rgba(183, 138, 221, .2);
  background:
    linear-gradient(180deg, transparent 25%, var(--bg)),
    repeating-linear-gradient(
      90deg,
      transparent 0 27px,
      rgba(183, 138, 221, .09) 28px 29px,
      transparent 30px 55px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 35px,
      rgba(183, 138, 221, .045) 36px 37px,
      transparent 38px 70px
    );
}

/* Header */
:root[data-theme="five-pebbles"] .topbar {
  border-bottom-color: rgba(183, 138, 221, .25);
  background: linear-gradient(
    180deg,
    rgba(27, 20, 38, .62),
    rgba(16, 14, 22, .12)
  );
  backdrop-filter: blur(12px);
}

:root[data-theme="five-pebbles"] .brand {
  letter-spacing: .12em;
  text-shadow: 0 0 18px rgba(183, 138, 221, .16);
}

:root[data-theme="five-pebbles"] .sigil {
  font-size: 34px;
  text-shadow:
    0 0 8px rgba(183, 138, 221, .75),
    0 0 25px rgba(183, 138, 221, .38);
  animation: pebble-sigil 5s ease-in-out infinite;
}

@keyframes pebble-sigil {
  0%, 100% { opacity: .8; }
  50% { opacity: 1; }
}

/* Main headings */
:root[data-theme="five-pebbles"] .page-heading h1,
:root[data-theme="five-pebbles"] .channel-header h1 {
  text-shadow: 0 0 25px rgba(183, 138, 221, .12);
  letter-spacing: -.035em;
}

:root[data-theme="five-pebbles"] .eyebrow,
:root[data-theme="five-pebbles"] .sidebar-title {
  text-shadow: 0 0 12px rgba(183, 138, 221, .3);
}

/* Superstructure panels */
:root[data-theme="five-pebbles"] .sidebar,
:root[data-theme="five-pebbles"] .details-panel,
:root[data-theme="five-pebbles"] .chat-panel,
:root[data-theme="five-pebbles"] .main-panel {
  background:
    linear-gradient(145deg, rgba(37, 27, 49, .96), rgba(21, 17, 30, .97));
  border-color: rgba(153, 112, 183, .3);
  box-shadow:
    inset 0 1px rgba(231, 202, 255, .045),
    inset 0 0 35px rgba(116, 66, 139, .045),
    0 18px 48px rgba(0, 0, 0, .25);
}

/* Panel accent edges */
:root[data-theme="five-pebbles"] .sidebar,
:root[data-theme="five-pebbles"] .details-panel,
:root[data-theme="five-pebbles"] .main-panel {
  position: relative;
}

:root[data-theme="five-pebbles"] .sidebar::before,
:root[data-theme="five-pebbles"] .details-panel::before,
:root[data-theme="five-pebbles"] .main-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(183, 138, 221, .5),
    transparent
  );
  pointer-events: none;
}

/* Guild cards */
:root[data-theme="five-pebbles"] .guild-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(56, 37, 70, .65), rgba(25, 20, 35, .96));
  border-color: rgba(153, 112, 183, .28);
}

:root[data-theme="five-pebbles"] .guild-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(208, 167, 238, .07),
    transparent
  );
  transform: skewX(-18deg);
  transition: left .65s ease;
  pointer-events: none;
}

:root[data-theme="five-pebbles"] .guild-card:hover::after {
  left: 150%;
}

:root[data-theme="five-pebbles"] .guild-card:hover {
  box-shadow:
    0 12px 35px rgba(0, 0, 0, .3),
    0 0 22px rgba(183, 138, 221, .1);
}

/* Guild emblems */
:root[data-theme="five-pebbles"] .guild-emblem {
  border: 1px solid rgba(207, 167, 235, .25);
  box-shadow:
    0 0 18px rgba(183, 138, 221, .18),
    inset 0 0 12px rgba(255, 255, 255, .07);
}

/* Channel navigation */
:root[data-theme="five-pebbles"] .tree-category {
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 11px;
}

:root[data-theme="five-pebbles"] .tree-channel {
  border: 1px solid transparent;
  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease,
    padding-left .2s ease;
}

:root[data-theme="five-pebbles"] .tree-channel:hover {
  padding-left: 14px;
  border-color: rgba(183, 138, 221, .16);
}

:root[data-theme="five-pebbles"] .tree-channel.active {
  background: linear-gradient(
    90deg,
    rgba(183, 138, 221, .16),
    rgba(183, 138, 221, .025)
  );
  border-color: rgba(183, 138, 221, .18);
}

/* Channel header */
:root[data-theme="five-pebbles"] .channel-header {
  background: linear-gradient(
    100deg,
    rgba(113, 69, 143, .12),
    transparent 75%
  );
}

/* Message presentation */
:root[data-theme="five-pebbles"] .message {
  border-left: 2px solid transparent;
  transition:
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

:root[data-theme="five-pebbles"] .message:hover {
  background: rgba(183, 138, 221, .055);
  border-left-color: rgba(183, 138, 221, .4);
  transform: translateX(3px);
}

:root[data-theme="five-pebbles"] .message.selected {
  background: rgba(183, 138, 221, .1);
  border-color: rgba(183, 138, 221, .45);
  border-left-color: var(--accent);
}

/* Avatars */
:root[data-theme="five-pebbles"] .avatar {
  border: 1px solid rgba(183, 138, 221, .22);
  box-shadow: 0 0 12px rgba(116, 66, 139, .12);
}

/* Buttons and controls */
:root[data-theme="five-pebbles"] .button,
:root[data-theme="five-pebbles"] .search-link,
:root[data-theme="five-pebbles"] .theme-control select {
  background: linear-gradient(145deg, #30233d, #211a2c);
  border-color: rgba(153, 112, 183, .42);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

:root[data-theme="five-pebbles"] .button:hover,
:root[data-theme="five-pebbles"] .search-link:hover,
:root[data-theme="five-pebbles"] .theme-control select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(183, 138, 221, .12);
}

/* Search results */
:root[data-theme="five-pebbles"] .result-card {
  background: linear-gradient(120deg, rgba(37, 27, 49, .95), rgba(24, 19, 32, .95));
  border-color: rgba(153, 112, 183, .26);
  transition: border-color .2s ease, transform .2s ease;
}

:root[data-theme="five-pebbles"] .result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 138, 221, .65);
}

/* Focus visibility */
:root[data-theme="five-pebbles"] a:focus-visible,
:root[data-theme="five-pebbles"] button:focus-visible,
:root[data-theme="five-pebbles"] input:focus-visible,
:root[data-theme="five-pebbles"] select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="five-pebbles"] .ambient-layer,
  :root[data-theme="five-pebbles"] .sigil {
    animation: none;
  }

  :root[data-theme="five-pebbles"] .guild-card::after {
    display: none;
  }
}


/* =====================================================
   SCP-079 — CONTAINMENT FACILITY INTERFACE
   SCP: SECRET LABORATORY INSPIRED
   Append to the END of main.css
===================================================== */

/* Facility palette */
:root[data-theme="scp-079"] {
  --bg: #080c09;
  --panel: #101812;
  --panel2: #152119;
  --line: #344c3a;

  --text: #d5e5d8;
  --muted: #829589;

  --accent: #80e49b;
  --accent-strong: #42b96b;

  --surface: rgba(13, 20, 15, .97);
  --surface-raised: #152119;
  --surface-hover: #1b2c20;

  --button-bg: #17261b;
  --button-border: #41674b;
  --button-text: #d3f2d9;

  --link: #a7e8b7;

  --glow-a: rgba(46, 117, 66, .15);
  --glow-b: rgba(154, 116, 48, .07);

  --radius: 3px;
  --scanline-opacity: .075;
}

/* Facility background */
:root[data-theme="scp-079"] body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(52, 106, 62, .14), transparent 48%),
    radial-gradient(ellipse at 100% 70%, rgba(38, 76, 47, .08), transparent 42%),
    linear-gradient(145deg, #070b08, #0b120d 55%, #080c09);
  background-attachment: fixed;
  font-family: var(--mono);
}

/* CRT scanline overlay */
:root[data-theme="scp-079"] body::after {
  opacity: .075;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, .42) 3px 4px
  );
}

/* Ambient terminal glow */
:root[data-theme="scp-079"] .ambient-layer {
  opacity: .45;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(77, 164, 94, .12), transparent 43%);
  animation: scp-ambient 12s ease-in-out infinite alternate;
}

@keyframes scp-ambient {
  from { opacity: .22; transform: scale(1); }
  to { opacity: .5; transform: scale(1.06); }
}

/* Facility header */
:root[data-theme="scp-079"] .topbar {
  min-height: 82px;
  background: rgba(8, 14, 10, .92);
  border-bottom: 1px solid #405d46;
  box-shadow: 0 5px 24px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}

:root[data-theme="scp-079"] .brand {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

:root[data-theme="scp-079"] .sigil {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(128, 228, 155, .65);
  border-radius: 2px;
  font-size: 23px;
  color: var(--accent);
  background: rgba(48, 109, 62, .13);
  box-shadow:
    0 0 10px rgba(128, 228, 155, .12),
    inset 0 0 12px rgba(128, 228, 155, .06);
}

:root[data-theme="scp-079"] .tagline {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 9px;
}

/* Facility status indicator */
:root[data-theme="scp-079"] .tagline::before {
  content: "● ";
  color: #80e49b;
  text-shadow: 0 0 8px #80e49b;
  animation: scp-status 2s ease-in-out infinite;
}

@keyframes scp-status {
  50% { opacity: .35; }
}

/* Page headings */
:root[data-theme="scp-079"] .page-heading h1 {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 25px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}

:root[data-theme="scp-079"] .eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
}

:root[data-theme="scp-079"] .eyebrow::before {
  content: "// ";
  color: var(--muted);
}

/* Facility panels */
:root[data-theme="scp-079"] .sidebar,
:root[data-theme="scp-079"] .details-panel,
:root[data-theme="scp-079"] .chat-panel,
:root[data-theme="scp-079"] .main-panel {
  background:
    linear-gradient(145deg, rgba(17, 27, 20, .98), rgba(10, 16, 12, .98));
  border: 1px solid #344d39;
  border-radius: 2px;
  box-shadow:
    inset 0 1px rgba(128, 228, 155, .055),
    0 12px 30px rgba(0, 0, 0, .35);
}

/* Industrial panel header strips */
:root[data-theme="scp-079"] .sidebar-title {
  text-transform: uppercase;
  letter-spacing: .15em;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 13px;
}

:root[data-theme="scp-079"] .sidebar-title::before {
  content: "SYS // ";
  color: #718a76;
}

/* Channel navigation */
:root[data-theme="scp-079"] .tree-category {
  color: #c0a66b;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  border-bottom: 1px solid rgba(192, 166, 107, .2);
}

:root[data-theme="scp-079"] .tree-channel {
  border-radius: 1px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .015em;
  border-left: 2px solid transparent;
}

:root[data-theme="scp-079"] .tree-channel::before {
  content: "> ";
  color: #627b68;
}

:root[data-theme="scp-079"] .tree-channel:hover {
  background: rgba(93, 151, 104, .09);
  border-left-color: #729c7a;
}

:root[data-theme="scp-079"] .tree-channel.active {
  color: #c9f4d2;
  background: rgba(53, 173, 103, .13);
  border-left-color: var(--accent);
  box-shadow: none;
}

/* Channel header */
:root[data-theme="scp-079"] .channel-header {
  background:
    linear-gradient(90deg, rgba(54, 110, 67, .14), transparent 80%);
  border-bottom: 1px solid #405b46;
}

:root[data-theme="scp-079"] .channel-header h1 {
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: .1em;
}

:root[data-theme="scp-079"] .hash {
  color: #c0a66b;
}

/* Read-only status */
:root[data-theme="scp-079"] .readonly {
  border: 1px solid #6b9a74;
  border-radius: 2px;
  background: rgba(53, 173, 103, .08);
  color: #9de5ac;
  text-transform: uppercase;
  letter-spacing: .14em;
}

:root[data-theme="scp-079"] .readonly::before {
  content: "● ";
}

/* Message feed */
:root[data-theme="scp-079"] .messages {
  background: rgba(5, 10, 7, .16);
}

:root[data-theme="scp-079"] .date-divider {
  color: #9aaa9d;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 9px;
}

:root[data-theme="scp-079"] .date-divider::before,
:root[data-theme="scp-079"] .date-divider::after {
  background: linear-gradient(90deg, transparent, #405b46);
}

/* Individual message records */
:root[data-theme="scp-079"] .message {
  border-radius: 1px;
  border-bottom: 1px solid rgba(77, 111, 84, .13);
  padding: 12px 9px;
}

:root[data-theme="scp-079"] .message:hover {
  background: rgba(72, 125, 83, .075);
}

:root[data-theme="scp-079"] .message.selected {
  background: rgba(53, 173, 103, .12);
  border-color: rgba(117, 230, 154, .4);
  box-shadow: inset 3px 0 #75e69a;
}

:root[data-theme="scp-079"] .message-meta strong {
  color: #a8dcb2;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .06em;
}

:root[data-theme="scp-079"] .message-meta time {
  color: #788a7d;
  font-size: 9px;
}

:root[data-theme="scp-079"] .message-content {
  color: #d0ddd2;
  font-size: 12px;
  line-height: 1.65;
}

/* Avatars */
:root[data-theme="scp-079"] .avatar {
  border: 1px solid #3c5942;
  border-radius: 2px;
  filter: saturate(.65);
}

/* Details / metadata */
:root[data-theme="scp-079"] dl {
  grid-template-columns: 90px 1fr;
  line-height: 1.6;
}

:root[data-theme="scp-079"] dt {
  color: #c0a66b;
  text-transform: uppercase;
}

:root[data-theme="scp-079"] dd {
  color: #cbd9ce;
}

/* Buttons */
:root[data-theme="scp-079"] .button,
:root[data-theme="scp-079"] .search-link,
:root[data-theme="scp-079"] .theme-control select {
  background: linear-gradient(180deg, #1b2c20, #101a13);
  border: 1px solid #496c50;
  border-radius: 2px;
  color: #ccebd2;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}

:root[data-theme="scp-079"] .button:hover,
:root[data-theme="scp-079"] .search-link:hover,
:root[data-theme="scp-079"] .theme-control select:hover {
  border-color: #8ce8a3;
  background: #203c29;
  box-shadow: 0 0 12px rgba(117, 230, 154, .12);
}

:root[data-theme="scp-079"] .button:disabled {
  filter: grayscale(1);
}

/* Search interface */
:root[data-theme="scp-079"] .search-form input {
  background: #090f0b;
  border: 1px solid #405b46;
  border-radius: 2px;
  color: #ccebd2;
  font-family: var(--mono);
}

:root[data-theme="scp-079"] .search-form input::placeholder {
  color: #718477;
}

:root[data-theme="scp-079"] .search-form input:focus {
  border-color: #80e49b;
  box-shadow: 0 0 12px rgba(117, 230, 154, .1);
}

:root[data-theme="scp-079"] .result-card {
  background: #101a13;
  border: 1px solid #344d39;
  border-radius: 2px;
}

:root[data-theme="scp-079"] .result-card:hover {
  border-color: #80e49b;
}

/* Pagination and archive notices */
:root[data-theme="scp-079"] .pager,
:root[data-theme="scp-079"] .archive-notice {
  border-color: #344d39;
  background: rgba(5, 10, 7, .25);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Loading animation */
:root[data-theme="scp-079"] .loading {
  color: #9de5ac;
  text-transform: uppercase;
  letter-spacing: .13em;
}

:root[data-theme="scp-079"] .loading::before {
  content: "[ SYSTEM PROCESSING ]";
  display: block;
  font-size: 9px;
  color: #788a7d;
  margin-bottom: 10px;
}

:root[data-theme="scp-079"] .loading::after {
  content: "";
  display: block;
  height: 2px;
  max-width: 220px;
  margin: 12px auto;
  background: linear-gradient(90deg, transparent, #80e49b, transparent);
  animation: scp-loading 1.8s ease-in-out infinite;
}

@keyframes scp-loading {
  0% { transform: scaleX(.15); opacity: .3; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(.15); opacity: .3; }
}

/* Selection and keyboard focus */
:root[data-theme="scp-079"] ::selection {
  color: #07100a;
  background: #80e49b;
}

:root[data-theme="scp-079"] a:focus-visible,
:root[data-theme="scp-079"] button:focus-visible,
:root[data-theme="scp-079"] input:focus-visible,
:root[data-theme="scp-079"] select:focus-visible {
  outline: 1px solid #80e49b;
  outline-offset: 3px;
}

/* Small facility-screen details */
:root[data-theme="scp-079"] .chevron {
  color: #80e49b;
  text-shadow: 0 0 8px rgba(128, 228, 155, .35);
}

:root[data-theme="scp-079"] .attachment {
  color: #a8dcb2;
}

:root[data-theme="scp-079"] .crumb {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
}

/* Mobile adjustments */
@media(max-width: 700px) {
  :root[data-theme="scp-079"] .brand {
    letter-spacing: .06em;
  }

  :root[data-theme="scp-079"] .page-heading h1 {
    font-size: 20px;
  }
}

/* Motion accessibility */
@media(prefers-reduced-motion: reduce) {
  :root[data-theme="scp-079"] .ambient-layer,
  :root[data-theme="scp-079"] .tagline::before {
    animation: none;
  }
}


/* =====================================================
   SCP-079 — TYPOGRAPHY & TERMINAL PERSONALITY
===================================================== */

/* Use a technical font throughout this theme */
:root[data-theme="scp-079"] {
  --sans: "IBM Plex Mono", "Courier New", monospace;
}

/* Main headings */
:root[data-theme="scp-079"] h1,
:root[data-theme="scp-079"] h2,
:root[data-theme="scp-079"] h3 {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .09em;
}

/* Main page title */
:root[data-theme="scp-079"] .page-heading h1 {
  color: #c6e9cd;
  text-shadow: 0 0 12px rgba(117, 230, 154, .16);
}

/* System labels */
:root[data-theme="scp-079"] .eyebrow,
:root[data-theme="scp-079"] .sidebar-title,
:root[data-theme="scp-079"] .theme-control-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .19em;
  font-size: 9px;
}

/* Message authors */
:root[data-theme="scp-079"] .message-meta strong {
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .055em;
}

/* Message body */
:root[data-theme="scp-079"] .message-content {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  color: #c6d8ca;
}

/* Metadata */
:root[data-theme="scp-079"] .message-meta time,
:root[data-theme="scp-079"] .edited,
:root[data-theme="scp-079"] dl,
:root[data-theme="scp-079"] .pager {
  font-family: var(--mono);
  letter-spacing: .025em;
}

/* Links */
:root[data-theme="scp-079"] a {
  transition: color .15s ease, text-shadow .15s ease;
}

:root[data-theme="scp-079"] a:hover {
  color: #a5f0b5;
  text-shadow: 0 0 8px rgba(117, 230, 154, .2);
}

/* Search link wording */
:root[data-theme="scp-079"] .search-link {
  font-size: 0;
}

:root[data-theme="scp-079"] .search-link::after {
  content: "QUERY ARCHIVE";
  font-size: 10px;
}

/* Theme selector label */
:root[data-theme="scp-079"] .theme-control-label {
  color: #829b89;
}

/* System-style buttons */
:root[data-theme="scp-079"] .button {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

/* Channel names */
:root[data-theme="scp-079"] .tree-channel {
  letter-spacing: .025em;
}

/* SCP-style selected text */
:root[data-theme="scp-079"] ::selection {
  background: #80e49b;
  color: #07100a;
}


/* =====================================================
   SCP-079 — OCCASIONAL SYSTEM INTERFERENCE
===================================================== */

/* Glitch effect only when explicitly activated */
:root[data-theme="scp-079"] .scp-glitch {
  animation: scp-text-interference .22s steps(2, end) 1;
}

@keyframes scp-text-interference {
  0% {
    transform: translateX(0);
    text-shadow: none;
    opacity: 1;
  }

  25% {
    transform: translateX(-2px);
    text-shadow: 2px 0 #80e49b, -2px 0 #b46d54;
  }

  50% {
    transform: translateX(2px);
    text-shadow: -2px 0 #80e49b, 2px 0 #b46d54;
  }

  75% {
    transform: translateX(-1px);
    opacity: .7;
  }

  100% {
    transform: translateX(0);
    text-shadow: none;
    opacity: 1;
  }
}

/* Rare screen flicker */
:root[data-theme="scp-079"] .ambient-layer {
  animation:
    scp-ambient 12s ease-in-out infinite alternate,
    scp-rare-flicker 17s steps(1, end) infinite;
}

@keyframes scp-rare-flicker {
  0%, 94%, 96%, 100% {
    filter: brightness(1);
  }

  95% {
    filter: brightness(1.3);
  }
}

/* Subtle diagnostic cursor */
:root[data-theme="scp-079"] .sidebar-title::after {
  content: " _";
  color: #80e49b;
  animation: scp-cursor 1.2s steps(2, end) infinite;
}

@keyframes scp-cursor {
  50% { opacity: 0; }
}

/* Restrict interference when reduced motion is enabled */
@media(prefers-reduced-motion: reduce) {
  :root[data-theme="scp-079"] .scp-glitch,
  :root[data-theme="scp-079"] .ambient-layer,
  :root[data-theme="scp-079"] .sidebar-title::after {
    animation: none !important;
  }
}

/* =========================================================
   SCP-079 — Occasional system broadcasts
   ========================================================= */

:root[data-theme="scp-079"] .scp-broadcast {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 16px;
    margin: 12px auto 18px;
    padding: 12px 17px;
    max-width: 1500px;
    width: calc(100% - 36px);

    background:
        linear-gradient(90deg, rgba(30, 65, 38, 0.32), rgba(5, 12, 8, 0.88)),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(80, 255, 120, 0.025) 4px
        );

    border: 1px solid rgba(105, 220, 125, 0.28);
    border-left: 3px solid #75d889;
    color: #b8e8bf;
    font-family: var(--sans, monospace);
    font-size: 0.78rem;
    letter-spacing: 0.055em;
    box-shadow: 0 0 18px rgba(65, 190, 90, 0.07);
    animation: scp-broadcast-appear 0.7s ease-out;
}

:root[data-theme="scp-079"] .scp-broadcast[hidden] {
    display: none !important;
}

.scp-broadcast-label {
    color: #79c989;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.scp-broadcast-text {
    flex: 1 1 240px;
    color: #d4f5d8;
}

.scp-broadcast-signature {
    color: #72b982;
    font-size: 0.68rem;
    white-space: nowrap;
    margin-left: auto;
}

.scp-broadcast.is-interference {
    animation: scp-broadcast-glitch 0.38s steps(2, end);
}

@keyframes scp-broadcast-appear {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scp-broadcast-glitch {
    0% { transform: translateX(0); opacity: 1; }
    20% { transform: translateX(-2px); opacity: 0.65; }
    40% { transform: translateX(2px); opacity: 1; }
    60% { transform: translateX(-1px); opacity: 0.8; }
    100% { transform: translateX(0); opacity: 1; }
}

@media (max-width: 600px) {
    :root[data-theme="scp-079"] .scp-broadcast {
        width: calc(100% - 20px);
        margin: 10px auto 14px;
        padding: 11px;
    }

    .scp-broadcast-signature {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scp-broadcast,
    .scp-broadcast.is-interference {
        animation: none !important;
    }
}

/* SCP-079 face apparition */

.scp-broadcast {
    position: relative;
    overflow: hidden;
}

.scp-face-flash {
    position: absolute;
    z-index: 5;
    width: 115px;
    height: 115px;
    object-fit: contain;

    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    opacity: 0;
    pointer-events: none;
    filter:
        grayscale(1)
        sepia(1)
        hue-rotate(75deg)
        saturate(3)
        brightness(1.4)
        drop-shadow(0 0 12px #55ff77);
}

.scp-face-flash.is-visible {
    animation: scp-face-apparition 1.8s steps(2, end) forwards;
}

@keyframes scp-face-apparition {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
        filter: brightness(3) contrast(2);
    }

    12% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.08);
    }

    22% {
        opacity: 0.35;
        transform: translate(-48%, -50%) scale(1);
    }

    35% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1);
    }

    65% {
        opacity: 0.75;
    }

    85% {
        opacity: 0.25;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scp-face-flash.is-visible {
        animation: none;
        opacity: 0;
    }
}


/* =========================================
   STICKY CHANNEL HEADER
========================================= */

.chat-panel {
  position: relative;
  overflow: visible;
}

.channel-header {
  position: sticky;
  top: 0;
  z-index: 15;

  flex-shrink: 0;

  background: var(--surface);
  backdrop-filter: blur(14px);

  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

/* Five Pebbles appearance */
:root[data-theme="five-pebbles"] .channel-header {
  background: rgba(27, 20, 38, .94);
  border-bottom-color: rgba(183, 138, 221, .35);
}

/* SCP-079 appearance */
:root[data-theme="scp-079"] .channel-header {
  background: rgba(8, 14, 10, .96);
  border-bottom-color: #405b46;
}

/* Standard appearance */
:root[data-theme="standard"] .channel-header {
  background: rgba(25, 31, 38, .96);
}

/* Mobile */
@media (max-width: 700px) {
  .channel-header {
    top: 0;
  }
}