* { margin:0; padding:0; box-sizing:border-box; }

  /* In <style> — replace all firefly/background styles */

body {
  background: #000408; /* pure midnight, very slight blue-black */
}

/* ── CONTROL STACK (top-left: fullscreen, mute, clear) ── */
.ctrl-stack {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctrl-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-icon-btn:hover {
  opacity: 0.85;
  transform: scale(1.08);
}

.ctrl-icon-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ctrl-icon-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fullscreen icon toggle */
.ctrl-icon-btn .fs-collapse { display: none; }
.ctrl-icon-btn.is-fullscreen .fs-expand { display: none; }
.ctrl-icon-btn.is-fullscreen .fs-collapse { display: block; }

/* Mute icon toggle */
.ctrl-icon-btn .muted-icon { display: none; }
.ctrl-icon-btn.is-muted .unmuted-icon { display: none; }
.ctrl-icon-btn.is-muted .muted-icon { display: block; }

/* Light skin */
.light-skin .ctrl-icon-btn {
  color: rgba(0, 0, 0, 0.7);
}
.light-skin .ctrl-icon-btn img {
  filter: invert(1);
}

@media (max-width: 600px) {
  .ctrl-icon-btn { width: 32px; height: 32px; padding: 5px; }
}

.button-row {
  position: fixed;
  left: 0;
  bottom: 80px;
  z-index: 50;
  display: flex;
  gap: 10px;
  justify-content: space-evenly; /* or space-between / space-around */
  align-items: center;
  width: 100%;
  padding: 0 16px;
}

.button-row button {
  white-space: nowrap;
}

.button-row .say-hi {
  position: static;
  display: block;
  flex: 1 1 0;
  width: auto;
  right: auto;
  left: auto;
  bottom: auto;
  transform: none;
  opacity: 0.35;
  transition: opacity 0.2s ease, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.button-row .say-hi:hover {
  opacity: 1;
  background: black;
}


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

.sky-bg, .moon, .field, .grass {
  display: none; /* midnight black only */
}

.firefly {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  /* size varies — distant ones tiny, close ones larger */
}

/* The trail effect — each firefly has a pseudo tail */
.firefly::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}
    /* ── ENVIRONMENT FRAME (sky/space skins) ── */
    .env-frame {
      position: fixed;
      inset: 0 0 70px 0;
      border: none;
      width: 100%; height: calc(100% - 70px);
      display: none;
      z-index: 0;
      
  scrollbar-width: none;        /* Firefox */
    }
    .env-frame.active { display: block;}
.env-frame::-webkit-scrollbar { display: none; }  /* WebKit */

    /* ── HUB PANEL (opens when a topic is clicked) ── */
    .hub-overlay {
      position: fixed; inset: 0;
      background: rgba(0,4,8,0.6);
      z-index: 150;
      display: none;
      cursor: pointer;
    }
    .hub-overlay.active { display: block; }



.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 4px;
}
.source-tab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,240,150,0.25);
  background: transparent;
  color: rgba(255,240,150,0.7);
  font-size: 0.85rem;
  cursor: pointer;
}
.source-tab.active {
  background: rgba(255,240,150,0.15);
  color: rgba(255,240,150,1);
  border-color: rgba(255,240,150,0.5);
}



    /* ── SCOPE PORTALS — headlines get glass card ── */
    .scope-portal {
      position: fixed;
      z-index: 15;
      max-width: 380px;
      padding: 14px 16px 12px;
      background: rgba(8, 10, 18, 0.55);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 16px;
      backdrop-filter: blur(14px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                  inset 0 1px 0 rgba(255, 255, 255, 0.04);
      cursor: pointer;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: all 0.3s ease;
      opacity: 0;
    }

    .scope-portal:hover {
      background: rgba(12, 14, 24, 0.7);
      border-color: rgba(255,240,150,0.15);
      transform: scale(1.04);
      box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4),
                  inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    

    
    .portal-img {
  transition: transform 2s ease, opacity 1.6s ease, transform 2s ease-out;
  transform-origin: center center;
  background: transparent;
}

.scope-portal:hover .portal-img {
  transform: scale(1.8);
  z-index: 50;
}
    
    /* ── HEADLINE KILL BUTTON ── */
/* ── HEADLINE KILL BUTTON — sits left of the dismiss, side by side ── */
.scope-portal .portal-kill {
  position: absolute;
  top: -6px;
  right: 22px;                    /* just LEFT of dismiss (dismiss is at right:-6px) */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);   /* neutral grey at rest, matches dismiss */
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;                        /* invisible until portal hover */
  transition: all 0.2s ease;
  z-index: 60;
  user-select: none;
  text-decoration: none;
}

/* both buttons appear together on portal hover */
.scope-portal:hover .portal-kill {
  opacity: 1;
}

/* turns red ONLY on its own hover */
.scope-portal .portal-kill:hover {
  color: rgba(255, 70, 70, 1);
  border-color: rgba(255, 70, 70, 0.4);
  background: rgba(255, 70, 70, 0.15);
  transform: scale(1.15);
}

@media (max-width: 600px) {
  .portal-kill { color: rgba(255, 90, 90, 0.7); } /* visible without hover on touch */
}

/* ── GALLERY MODAL ── */
.gallery-modal {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0,4,8,0.94); backdrop-filter: blur(16px);
  display: none; flex-direction: column;
  padding: 30px 20px;
}
.gallery-modal.open { display: flex; }
.gallery-head {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 900px; width: 100%; margin: 0 auto 24px;
}
.gallery-head h2 {
  font-family: 'EB Garamond', Georgia, serif; font-weight: 500;
  font-size: 1.4rem; color: rgba(255,240,150,0.9); letter-spacing: 0.04em;
}
.gallery-close {
  padding: 8px 20px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 999px;
  color: rgba(255,255,255,0.6); cursor: pointer; font-size: 0.8rem;
}
.gallery-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.gallery-grid {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  max-width: 900px; width: 100%; margin: 0 auto;
  overflow-y: auto;
}
.gallery-item {
  width: 100px; height: 100px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s ease;
}
.gallery-item:hover { transform: scale(1.38);  filter: invert(100%);}
.gallery-item img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4));
  
}
.gallery-empty {
  color: rgba(255,255,255,0.3); font-size: 0.9rem; margin: 40px auto;
}

/* ── ENLARGED VIEW ── */
.gallery-enlarge {
  position: fixed; inset: 0; z-index: 270;
  background: rgba(0,4,8,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out;filter: invert(100%);
 
}
.gallery-enlarge.open { display: flex; }
.gallery-enlarge img {
  max-width: 80vw; max-height: 80vh; object-fit: contain;
  filter: drop-shadow(0 4px 30px rgba(0,0,0,0.5));
   
}
.enlarge-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; color: rgba(255,255,255,0.35); letter-spacing: 0.06em;
}


/* ── SAVE-TO-GALLERY BUTTON (designs) ── */
.scope-portal .portal-save {
  position: absolute;
  top: 0px;
  right: 28px;                 /* left of the dismiss "—" */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 60;
  user-select: none;
}
.scope-portal:hover .portal-save { opacity: 1; }
.scope-portal .portal-save:hover {
  color: white;
  border-color: white;
  background: blue;
  transform: scale(1.15);
}
@media (max-width: 600px) {
  .portal-save { opacity: 1; }   /* visible on touch */
}

/* ── KILL ANIMATION ── */
.scope-portal.dying,
.visitor-cloud.dying,
.floating-funny.dying {
  animation: killPoof 0.5s ease forwards;
  pointer-events: none;
}

@keyframes killPoof {
  0%   { opacity: 1; transform: scale(1); filter: blur(0); }
  40%  { opacity: 0.8; transform: scale(1.06); filter: blur(0.5px); }
  100% { opacity: 0; transform: scale(0.7) translateY(-12px); filter: blur(4px); }
}

/* ── FUNNY PICKER (bottom-left character) ── */
.funny-picker {
  position: fixed;
  bottom: 148px;
  left: 24px;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.funny-preview {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
  user-select: none;
}

.funny-preview:hover {
  transform: scale(1.12);
}

.funny-preview:active {
  transform: scale(0.95);
}

.funny-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.funny-record {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 80, 80, 0.5);
  background: rgba(220, 40, 40, 0.75);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(200,30,30,0.25);
}

.funny-record:hover {
  opacity: 0.85;
  transform: scale(1.12);
  background: rgba(240, 30, 30, 0.9);
}

.funny-picker.recording .funny-record,
.funny-picker.recorded .funny-record {
  opacity: 1;
}

.funny-picker.recording .funny-record {
  animation: recPulse 0.9s ease-in-out infinite;
  border-color: rgba(255, 60, 60, 0.8);
}

@keyframes recPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,50,50,0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(255,50,50,0); }
}

/* Launch button — appears after recording */
.funny-launch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(150, 255, 180, 0.5);
  background: rgba(80, 200, 120, 0.7);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(80,200,120,0.25);
}

.funny-picker.recorded .funny-launch {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.funny-launch:hover {
  transform: scale(1.12);
  background: rgba(60, 220, 100, 0.9);
}

/* ── FLOATING FUNNY ── */
.floating-funny {
  position: fixed;
  z-index: 18;
  cursor: pointer;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.35));
  opacity: 0;
}

.floating-funny img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 0.15s ease;
}

.floating-funny:hover img {
  transform: scale(1.18);
}

.floating-funny.funny-playing img {
  animation: funnyBounce 0.35s ease;
}

@keyframes funnyBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.25); }
  60%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Kill & dismiss on floating funnies — need their own base styles
   because .portal-kill is scoped under .scope-portal elsewhere */
.floating-funny .portal-kill {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 60;
  user-select: none;
  text-decoration: none;
}

.floating-funny .portal-kill:hover {
  color: rgba(255, 70, 70, 1);
  border-color: rgba(255, 70, 70, 0.4);
  background: rgba(255, 70, 70, 0.15);
  transform: scale(1.15);
}

.floating-funny .portal-dismiss {
  top: -4px;
  right: 18px;
}

.floating-funny:hover .portal-kill,
.floating-funny:hover .portal-dismiss {
  opacity: 1;
}

@media (max-width: 600px) {
  .funny-picker { bottom: 138px; left: 16px; }
  .funny-preview { width: 46px; height: 46px; }
  .funny-record { width: 24px; height: 24px; }
  .floating-funny img { width: 56px; height: 56px; }
}

    /* Designs — transparent, no card, ever */
    .scope-portal.portal-design,
    .scope-portal.portal-design:hover {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      padding: 4px !important;
      max-width: 220px;
      transition: none;
      will-change: transform, opacity;
    }

    /* Designs don't need a title or source label */
    .scope-portal.portal-design .portal-title,
    .scope-portal.portal-design .portal-source {
      display: none;
    }

    /* X button sits on the image corner for designs */
    .scope-portal.portal-design .portal-dismiss {
      top: 0;
      right: 0;
      opacity: 0.4;
    }

    .scope-portal.portal-design:hover .portal-dismiss {
      opacity: 1;
      background: black;
      color: white;
    }

    .scope-portal .portal-title {
      font-family: 'Playfair', Georgia, serif;
      font-size: .90rem;
      font-weight: 500;
      color: rgba(255,255,255,0.92);
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-shadow:
        0 1px 4px rgba(0,0,0,0.7),
        0 0 12px rgba(0,0,0,0.4);
    }

    .scope-portal .portal-source {
      font-size: 0.62rem;
      color: rgba(255,240,150,0.45);
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .scope-portal .portal-hub {
      display: inline-flex;
      align-self: flex-start;
      padding: 3px 5px;
      background: rgba(255,240,150,0.06);
      border: 1px solid rgba(255,240,150,0.15);
      border-radius: 999px;
      font-size: 0.58rem;
      color: rgba(255,240,150,0.55);
      letter-spacing: 0.06em;
      cursor: pointer;
      transition: all 0.2s;
    }

    .scope-portal .portal-hub:hover {
     position: relative;
      background: rgba(255,240,150,0.14);
      color: rgba(255,240,150,0.9);
      border-color: rgba(255,240,150,0.3);
      z-index: 50;
    }

    .scope-portal .portal-img {
      width: 100%;
      height: 200px;
      object-fit: cover;
      border-radius: 10px;
      margin-bottom: 4px;
    }

    /* Design images — transparent, natural aspect, no cropping */
    .scope-portal.portal-design .portal-img {
      height: auto;
      max-height: 200px;
      object-fit: contain;
      background: none;
      border-radius: 0;
      margin-bottom: 0;
      filter: drop-shadow(0 2px 12px rgba(0,0,0,0.3));
    }

    /* ── HIDE BUTTON (session-only, non-destructive) ── */
    .portal-dismiss {
      position: absolute;
      top: -6px;
      right: -6px;
      width: 24px;
      height: 24px;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 50%;
      color: rgba(255, 255, 255, 0.5);
      font-size: 14px;
      line-height: 22px;
      text-align: center;
      cursor: pointer;
      opacity: 0;
      transition: all 0.2s ease;
      z-index: 60;
      text-decoration: none;
      display: flex;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(8px);
    }

    .scope-portal:hover .portal-dismiss {
      opacity: 1;
    }

    .portal-dismiss:hover {
      background: black;
      border-color: rgba(255, 255, 255, 0.35);
      color: white;
      transform: scale(1.1);
    }

    @keyframes portalFade {
      0%   { opacity: 0; }
      8%   { opacity: 1; }
      85%  { opacity: 1; }
      100% { opacity: 0; }
    }

    @media (max-width:600px) {
      .scope-portal { max-width: 200px; padding: 12px 14px; }
      .portal-dismiss { opacity: 1; }
      .hub-panel { width: 100vw; }
    }

/* ── VISITOR CLOUD DISSIPATE — smooth, matches the natural cloudFloat drift ── */
.visitor-cloud.dissipating {
  animation: cloudDissipate 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes cloudDissipate {
  0%   { opacity: 1; transform: translateY(0)     scale(1); }
  100% { opacity: 0; transform: translateY(-36px) scale(0.9); }
}

.visitor-cloud .portal-dismiss {
  top: 30px;
  right: 30px;
  color: rgba(20, 20, 20, 0.55);
}

.visitor-cloud .portal-dismiss:hover {
  color: rgba(20, 20, 20, 0.9);
}

    .visitor-cloud:hover .portal-dismiss {
  opacity: 1;
}
    
    
  .visitor-cloud {
  position: fixed;
  z-index: 20;
  width: 360px;
  aspect-ratio: 3 / 2;   /* match this to thought_bubble.png's real w/h ratio */
  height: auto;
  background: url('/scope/thought_bubble.png') no-repeat center / contain;
  animation: cloudFloat 13s ease-in-out forwards;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 50px 36px;
}

    .cloud-bubble {
      font-size: 0.92rem;
      color: rgba(0, 0, 0, 0.72);
      line-height: 1.45;
      word-break: break-word;
      white-space: normal;
      max-width: 200px;
    }

    .cloud-name {
      font-size: 0.66rem;
      color: rgba(0, 0, 0, 0.38);
      letter-spacing: 0.06em;
      margin-top: 3px;
    }

    @keyframes cloudFloat {
      0%   { opacity: 0; transform: translateY(0) scale(0.85); }
      8%   { opacity: 1; transform: translateY(0) scale(1); }
      50%  { transform: translateY(-18px) scale(1); }
      85%  { opacity: 1; }
      100% { opacity: 0; transform: translateY(-40px) scale(0.92); }
    }

    @media (max-width:600px) {
      .visitor-cloud {
        width: 190px;
        height: 146px;
        padding: 12px 18px 38px 28px;
      }
      .cloud-bubble { font-size: 0.74rem; max-width: 125px; }
    }
    
    

    /* ── SAY HI BUTTON ── */
    .say-hi {
      position: fixed;
      top: 180px;
      right: 24px;
      z-index: 50;
      padding: 10px 22px;
      background: rgba(255,240,150,0.08);
      border: 1px solid rgba(255,240,150,0.22);
      color: rgba(255,240,150,0.75);
      border-radius: 999px;
      font-size: 0.8rem;
      cursor: pointer;
      transition: all 0.25s;
      letter-spacing: 0.06em;
    }

    .say-hi:hover {
      background: rgba(255,240,150,0.15);
      color: rgba(255,240,150,1);
      box-shadow: 0 0 24px rgba(255,240,150,0.1);
    }

    /* ── SAY HI MODAL ── */
    .hi-modal-overlay {
      position: fixed; inset: 0;
      background: rgba(5,8,5,0.88);
      backdrop-filter: blur(12px);
      z-index: 200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .hi-modal-overlay.active { display: flex; }

    .hi-modal {
      background: linear-gradient(135deg,#111814,#1a1f18);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 16px;
      width: 100%;
      max-width: 420px;
      padding: 32px 28px 28px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .hi-modal h2 {
      font-size: 1.1rem;
      font-weight: 400;
      color: rgba(255,255,220,0.9);
      letter-spacing: 0.08em;
    }

    .hi-modal p {
      font-size: 0.8rem;
      color: rgba(255,255,255,0.35);
      line-height: 1.6;
      margin-top: -8px;
    }

    .hi-input {
      width: 100%;
      padding: 11px 16px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      color: #fff;
      font-size: 0.88rem;
      outline: none;
      transition: border-color 0.25s;
    }

    .hi-input:focus {
      border-color: rgba(255,240,150,0.35);
    }

    .hi-input::placeholder { color: rgba(255,255,255,0.2); }

    .hi-modal-btns {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      margin-top: 4px;
    }

    .hi-cancel {
      padding: 9px 20px;
      background: none;
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.4);
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      transition: all 0.2s;
    }

    .hi-cancel:hover { color: #fff; border-color: rgba(255,255,255,0.25); }

    .hi-send {
      padding: 9px 24px;
      background: rgba(255,240,150,0.1);
      border: 1px solid rgba(255,240,150,0.28);
      color: rgba(255,240,150,0.9);
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      transition: all 0.2s;
    }

    .hi-send:hover {
      background: rgba(255,240,150,0.18);
    }

    /* ── SCOPE INFO BADGE ── */
    .scope-badge {
      position: fixed;
      top: 16px; left: 50%;
      transform: translateX(-50%);
      z-index: 30;
      display: flex;
      align-items: baseline;
      gap: 8px;
      padding: 8px 20px 8px 16px;
      background: rgba(10,14,10,0.7);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 999px;
      backdrop-filter: blur(10px);
      font-size: 0.7rem;
      color: rgba(255,255,255,0.25);
      letter-spacing: 0.08em;
    }

    .scope-badge .code {
      font-family: 'Caveat', cursive;
      font-weight: 600;
      font-size: 1.25rem;
      color: rgba(255,255,255,0.8);
      letter-spacing: 0.04em;
      line-height: 1;
    }

    .scope-badge .dot {
      width: 5px; height: 5px;
      border-radius: 50%;
      background: rgba(255,255,255,0.2);
    }







.light-skin .floating-topic {
  color: rgba(0,0,0,0.75) !important;
  background: rgba(0,0,0,0.08) !important;
  border-color: rgba(0,0,0,0.15) !important;
}

.light-skin .scope-badge {
  color: rgba(0,0,0,0.5);
  background: rgba(255,255,255,0.6);
  border-color: rgba(0,0,0,0.1);
}

.light-skin .scope-badge .code {
  color: rgba(0,0,0,0.7);
}

.light-skin .scope-badge .dot {
  background: rgba(0,0,0,0.2);
}

.light-skin .say-hi {
  color: rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.15);
}

.light-skin .visitor-cloud {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}

.light-skin .cloud-bubble {
  color: rgba(0,0,0,0.8);
}

.light-skin .cloud-name {
  color: rgba(0,0,0,0.45);
}

/* Headline cards on light backgrounds */
.light-skin .scope-portal {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.light-skin .scope-portal:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.14);
}

.light-skin .scope-portal .portal-title {
  color: rgba(0, 0, 0, 0.78);
  text-shadow: none;
}

.light-skin .scope-portal .portal-source {
  color: rgba(30, 60, 120, 0.55);
}

.light-skin .scope-portal .portal-hub {
  background: rgba(30, 60, 120, 0.06);
  border-color: rgba(30, 60, 120, 0.18);
  color: rgba(30, 60, 120, 0.6);
}

.light-skin .scope-portal .portal-hub:hover {
  background: rgba(30, 60, 120, 0.14);
  color: rgba(30, 60, 120, 0.9);
  border-color: rgba(30, 60, 120, 0.35);
}

.light-skin .ctrl-btn {
  color: rgba(0,0,0,0.5);
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.05);
}

.light-skin .ctrl-btn:hover {
  color: rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.1);
}

.light-skin .portal-dismiss {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.4);
}

.light-skin .portal-dismiss:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.65);
}














    /* ── RADIO BAR ── */
  .radio-player {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 70px;
      background: linear-gradient(180deg, rgba(15, 15, 15, 0.85), rgba(10, 10, 10, 0.95));
      backdrop-filter: blur(15px);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      padding: 0 20px;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .player-info {
      position: absolute;
      left: 20px;
      min-width: 200px;
      max-width: 250px;
    }
    
    .player-title {
      font-size: 0.75em;
      color: #888;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 3px;
    }
    
    .now-playing {
      font-size: 0.9em;
      color: #ddd;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-weight: 500;
    }
    
    /* Progress section */
    .player-progress {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 12px;
      max-width: 400px;
      margin: 0 20px;
    }

    .time-current,
    .time-total {
      font-size: 0.75em;
      color: #888;
      min-width: 40px;
      text-align: center;
    }

    .progress-slider {
      flex: 1;
      height: 4px;
      -webkit-appearance: none;
      appearance: none;
      background: rgba(255, 255, 255, 0.1);
      outline: none;
      border-radius: 2px;
      cursor: pointer;
    }

    .progress-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      background: #fff;
      border-radius: 50%;
      cursor: pointer;
    }

    .progress-slider::-moz-range-thumb {
      width: 12px;
      height: 12px;
      background: #fff;
      border: none;
      border-radius: 50%;
      cursor: pointer;
    }
    
    .control-btn,
    .action-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: rgba(255, 255, 255, 0.7);
      border-radius: 50%;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }
    
    .control-btn:hover,
    .action-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.3);
      color: #fff;
      transform: scale(1.08);
    }
    
    .control-btn:active,
    .action-btn:active {
      transform: scale(0.95);
    }
    
    .control-btn svg,
    .action-btn svg {
      width: 20px;
      height: 20px;
      display: block;
    }
    
    .play-btn .pause-icon { display: none; }
    .play-btn.pause .play-icon { display: none; }
    .play-btn.pause .pause-icon { display: block; }
    
    .player-controls {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .player-actions {
      position: absolute;
      right: 20px;
      display: flex;
      align-items: center;
      gap: 15px;
    }
    
    audio {
      display: none;
    }
    
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(10px);
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    
    .modal-overlay.active {
      display: flex;
    }
    
    .modal-content {
      background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      width: 100%;
      max-width: 500px;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    .modal-header {
      padding: 20px 25px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .modal-title {
      font-size: 1.4em;
      font-weight: 600;
      color: #fff;
    }

    .close-btn {
      background: none;
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: rgba(255, 255, 255, 0.6);
      font-size: 1.4rem;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .close-btn:hover {
      background: black;
      color: white;
    }

    .search-bar {
      padding: 12px 25px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .search-input {
      width: 100%;
      padding: 10px 16px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      color: #fff;
      font-size: 0.9rem;
      outline: none;
      transition: border-color 0.2s;
    }

    .search-input::placeholder { color: rgba(255, 255, 255, 0.25); }
    .search-input:focus { border-color: rgba(255, 240, 150, 0.35); }
    .episode-list {
      flex: 1;
      overflow-y: auto;
      padding: 15px 25px;
    }
    
    .episode-item {
      padding: 15px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .episode-item:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.2);
      transform: translateX(5px);
    }
    
    .episode-podcast {
      font-size: 0.8em;
      color: #888;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 5px;
    }
    
    .episode-title {
      font-size: 1em;
      color: #ddd;
      font-weight: 500;
    }
    
    .episode-count {
      padding: 10px 25px;
      text-align: center;
      color: #666;
      font-size: 0.85em;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .episode-list::-webkit-scrollbar {
      width: 8px;
    }
    
    .episode-list::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.2);
    }
    
    .episode-list::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }
    
    .episode-list::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.3);
    }
    
    @media (max-width: 768px) {
      .radio-player {
        padding: 0 15px;
        height: 65px;
      }
      
      .player-info {
        display: none;
      }
      
      .player-actions {
        position: static;
      }
      
      .control-btn,
      .action-btn {
        width: 40px;
        height: 40px;
      }
      
      .control-btn svg,
      .action-btn svg {
        width: 18px;
        height: 18px;
      }
    }