/* ==========================================================================
   AVANTIDA RADIO — NOTIFICATION + ADMIN BUBBLES + EVVOIA MAP
   --------------------------------------------------------------------------
   Load order:  style.css → responsive.css → THIS FILE (last).

   Everything here is additive. Nothing in style.css or responsive.css is
   overridden except the shared FAB geometry, which is namespaced under
   .nb-fab / #notification-bubble / #admin-bubble.

   Colour identity is deliberately FIXED (cyan / red), not tied to
   --site-accent — same reasoning as the Today's Mix purple chip: these
   are identities, not theme followers. The map modal DOES follow the
   accent, because it's a site surface.

   CONTENTS
     01. Tokens
     02. Shared FAB
     03. Notification bubble
     04. Admin bubble
     05. Shared panel shell
     06. Notification panel internals
     07. Admin panel internals
     08. Evvoia map modal
     09. Responsive
     10. Reduced motion
   ========================================================================== */


/* ==========================================================================
   01. TOKENS
   ========================================================================== */

:root {
  --nb-cyan: var(--site-accent, #00e5ff);
  --nb-cyan-rgb: var(--site-accent-rgb, 0, 229, 255);

  --nb-red:      #ff3344;
  --nb-red-rgb:  255, 51, 68;

  --nb-orange:     #ff8c00;
  --nb-orange-rgb: 255, 140, 0;

  /* FAB stack geometry — one place to resize the whole column */
  --fab-size: 62px;
  --fab-gap:  12px;
  --fab-edge: 20px;

  /* Bottom offsets, computed outward from the viewport floor */
  --fab-b1:       calc(var(--fab-edge) + env(safe-area-inset-bottom, 0px));
  --fab-b2:       calc(var(--fab-b1) + var(--fab-size) + var(--fab-gap));
  --fab-panel-b:  calc(var(--fab-b2) + var(--fab-size) + var(--fab-gap));

  --nb-z-fab:   9980;
  --nb-z-panel: 9970;
  --nb-z-modal: 10150;

  /* Map stage aspect ratio — keep in sync with the SVG viewBox */

    --nb-map-ratio: 900 / 640;   /* must match the SVG viewBox */
}


/* ==========================================================================
   02. SHARED FAB
   --------------------------------------------------------------------------
   Mirrors .chat-toggle-btn from style.css so the column reads as one family.
   ========================================================================== */

.nb-fab {
  position: fixed;
  right: calc(var(--fab-edge) + env(safe-area-inset-right, 0px));
  top: auto;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  overflow: visible;
  z-index: var(--nb-z-fab);

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;

  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, color 0.25s ease;
}

.nb-fab:hover  { transform: scale(1.08); }
.nb-fab:active { transform: scale(0.96); }

.nb-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Count badge — black pill, bubble-coloured digits */
.nb-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: #000;
  border: 1px solid currentColor;
  color: inherit;
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  line-height: 20px;
  text-align: center;
  pointer-events: none;
}


/* ==========================================================================
   03. NOTIFICATION BUBBLE (CYAN)
   ========================================================================== */

#notification-bubble {
  bottom: var(--fab-b1);
  background: var(--nb-cyan);
  color: #001014;

  border: 2px solid var(--nb-cyan);
  box-shadow: 0 0 15px rgba(var(--nb-cyan-rgb), 0.6);
}

#notification-bubble:hover {
  box-shadow: 0 0 26px rgba(var(--nb-cyan-rgb), 0.9);
}

/* Open state inverts, so it reads as "engaged" */
#notification-bubble.is-open {
  background: #001014;
  color: var(--nb-cyan);
  box-shadow: 0 0 26px rgba(var(--nb-cyan-rgb), 0.9);
}


/* ==========================================================================
   04. ADMIN BUBBLE (RED)
   ========================================================================== */

#admin-bubble {
  bottom: var(--fab-b2);
  background: var(--nb-red);
  color: #180004;
 
  border: 2px solid var(--nb-red);
  box-shadow: 0 0 15px rgba(var(--nb-red-rgb), 0.6);
}

#admin-bubble:hover {
  box-shadow: 0 0 26px rgba(var(--nb-red-rgb), 0.9);
}

#admin-bubble.is-open {
  background: #180004;
  color: var(--nb-red);
  box-shadow: 0 0 26px rgba(var(--nb-red-rgb), 0.9);
}

/* Slow attention pulse while there's pending admin work.
   Add .has-pending from JS when you wire the real backend. */
#admin-bubble.has-pending {
  animation: nb-pulse-red var(--pulse-tempo, 4s) ease-in-out infinite;
}

@keyframes nb-pulse-red {
  0%, 100% { box-shadow: 0 0 15px rgba(var(--nb-red-rgb), 0.55); }
  50%      { box-shadow: 0 0 34px rgba(var(--nb-red-rgb), 0.95); }
}


/* ==========================================================================
   05. SHARED PANEL SHELL
   ========================================================================== */

.nb-panel {
  position: fixed;
  right: calc(var(--fab-edge) + env(safe-area-inset-right, 0px));
  bottom: var(--fab-panel-b);
  z-index: var(--nb-z-panel);

  display: none;
  flex-direction: column;

  width: min(92vw, 380px);
  max-height: min(72vh, 580px);

  background: rgba(13, 13, 13, 0.985);
  border: 2px solid var(--nb-cyan);
  border-radius: 4px;
  font-family: 'VT323', monospace;
  color: #e0e0e0;
  overflow: hidden;

  box-shadow:
    0 0 40px rgba(var(--nb-cyan-rgb), 0.35),
    inset 0 0 24px rgba(var(--nb-cyan-rgb), 0.05);
}

.nb-panel.is-open {
  display: flex;
  animation: nb-pop 0.22s ease-out;
}

@keyframes nb-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* CRT scanline wash over the whole window */
.nb-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.28) 3px
  );
}

.nb-panel-head {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 3rem 0.6rem 0.9rem;
  background: linear-gradient(rgba(var(--nb-cyan-rgb), 0.12), rgba(0, 0, 0, 0.9));
  border-bottom: 1px solid rgba(var(--nb-cyan-rgb), 0.78);
}

.nb-panel-head h3 {
  margin: 0;
  color: var(--nb-cyan);
  font-size: 1.15rem;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(var(--nb-cyan-rgb), 0.7);
}

.nb-panel-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--nb-cyan);
  border-radius: 4px;
  color: var(--nb-cyan);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.nb-panel-close:hover {
  background: var(--nb-
      --nb-cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(var(--nb-cyan-rgb), 0.7);
  transform: scale(1.08);
}

/* Admin panel overrides */
.nb-panel--admin {
  border-color: var(--nb-red);
  box-shadow:
    0 0 40px rgba(var(--nb-red-rgb), 0.35),
    inset 0 0 24px rgba(var(--nb-red-rgb), 0.05);
}

.nb-panel--admin .nb-panel-head {
  background: linear-gradient(rgba(var(--nb-red-rgb), 0.12), rgba(0, 0, 0, 0.9));
  border-bottom-color: rgba(var(--nb-red-rgb), 0.78);
}

.nb-panel--admin .nb-panel-head h3 {
  color: var(--nb-red);
  text-shadow: 0 0 10px rgba(var(--nb-red-rgb), 0.7);
}

.nb-panel--admin .nb-panel-close {
  border-color: var(--nb-red);
  color: var(--nb-red);
}

.nb-panel--admin .nb-panel-close:hover {
  background: var(--nb-red);
  color: #000;
  box-shadow: 0 0 12px rgba(var(--nb-red-rgb), 0.7);
}

/* ==========================================================================
   06. NOTIFICATION PANEL INTERNALS
   ========================================================================== */

.nb-tabs {
  position: relative;
  z-index: 4;
  display: flex;
  border-bottom: 1px solid rgba(var(--nb-cyan-rgb), 0.30);
}

.nb-panel--admin .nb-tabs {
  border-bottom-color: rgba(var(--nb-red-rgb), 0.30);
}

.nb-tab {
  flex: 1;
  padding: 0.6rem 0;
  background: transparent;
  color: rgba(var(--nb-cyan-rgb), 0.6);
  border: none;
  border-right: 1px solid rgba(var(--nb-cyan-rgb), 0.30);
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-panel--admin .nb-tab {
  color: rgba(var(--nb-red-rgb), 0.6);
  border-right-color: rgba(var(--nb-red-rgb), 0.30);
}

.nb-tab:last-child {
  border-right: none;
}

.nb-tab:hover {
  background: rgba(var(--nb-cyan-rgb), 0.08);
}

.nb-panel--admin .nb-tab:hover {
  background: rgba(var(--nb-red-rgb), 0.08);
}

.nb-tab.is-active {
  background: rgba(var(--nb-cyan-rgb), 0.15);
  color: #fff;
}

.nb-panel--admin .nb-tab.is-active {
  background: rgba(var(--nb-red-rgb), 0.15);
}

.nb-list {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgba(0, 10, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: var(--nb-cyan) #0a0a0a;
}

.nb-panel--admin .nb-list {
  scrollbar-color: var(--nb-red) #0a0a0a;
}

.nb-list::-webkit-scrollbar        { width: 6px; }
.nb-list::-webkit-scrollbar-track { background: #0a0a0a; }
.nb-list::-webkit-scrollbar-thumb {
  background: var(--nb-cyan);
  border-radius: 4px;
}

.nb-item {
  position: relative;
  padding: 0.75rem 3.25rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(var(--nb-cyan-rgb), 0.15);
  background: rgba(0, 20, 0, 0.25);
}

.nb-panel--admin .nb-item {
  border-bottom-color: rgba(var(--nb-red-rgb), 0.15);
}

.nb-item:hover {
  background: rgba(var(--nb-cyan-rgb), 0.08);
}

.nb-panel--admin .nb-item:hover {
  background: rgba(var(--nb-red-rgb), 0.08);
}

.nb-item:last-child {
  border-bottom: none;
}

.nb-item-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--nb-cyan);
  letter-spacing: 0.5px;
}

.nb-panel--admin .nb-item-title {
  color: var(--nb-red);
}

.nb-item-text {
  margin: 0;
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.4;
}

.nb-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nb-item-time {
  flex: 1;
}

.nb-item-delete {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid rgba(255, 100, 100, 0.4);
  color: #ff6666;
  font-size: 1rem;
  line-height: 1;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.15s;
}

.nb-item-delete:hover {
  background: rgba(255, 100, 100, 0.2);
  opacity: 1;
}

.nb-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.nb-panel-foot {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  border-top: 1px solid rgba(var(--nb-cyan-rgb), 0.25);
}

.nb-panel--admin .nb-panel-foot {
  border-top-color: rgba(var(--nb-red-rgb), 0.25);
}

.nb-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   07. ADMIN PANEL INTERNALS
   ========================================================================== */

.nb-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--nb-red) #0a0a0a;
}

.nb-admin-grid::-webkit-scrollbar        { width: 6px; }
.nb-admin-grid::-webkit-scrollbar-track { background: #0a0a0a; }
.nb-admin-grid::-webkit-scrollbar-thumb {
  background: var(--nb-red);
  border-radius: 4px;
}

.nb-admin-tile {
  position: relative;
  padding: 0.9rem 0.75rem;
  background: rgba(var(--nb-red-rgb), 0.08);
  border: 1px solid rgba(var(--nb-red-rgb), 0.35);
  border-left: 3px solid var(--nb-red);
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-admin-tile:hover {
  background: rgba(var(--nb-red-rgb), 0.15);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(var(--nb-red-rgb), 0.35);
}

.nb-admin-tile:active {
  transform: translateY(0);
}

.nb-admin-title {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: #ff9ad4;
  letter-spacing: 0.5px;
}

.nb-admin-sub {
  display: block;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.nb-admin-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-size: 0.65rem;
  color: #aaa;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   08. EVVOIA MAP MODAL
   ========================================================================== */

.nb-modal {
  position: fixed;
  inset: 0;
  z-index: var(--nb-z-modal);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.nb-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.nb-modal-window {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: min(96vw, 1100px);
  max-height: min(92vh, 720px);
  border: 2px solid var(--site-accent);
  border-radius: 4px;
  background: rgba(13, 13, 13, 0.985);
  overflow: hidden;
  font-family: 'VT323', monospace;
  box-shadow:
    0 0 0 1px rgba(var(--site-accent-rgb), 0.25),
    0 0 45px rgba(var(--site-accent-rgb), 0.35),
    inset 0 0 70px rgba(var(--site-accent-rgb), 0.05);
}

.nb-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 3.2rem 0.45rem 0.9rem;
  background: linear-gradient(var(--panel-bg-strong), rgba(0, 0, 0, 0.9));
  border-bottom: 1px solid var(--border-medium);
}

.nb-modal-title {
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep the scanline wash — it's the ::after, leave it alone */

.nb-modal-window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.30) 3px
  );
}

.nb-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 10;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--site-accent);
  border-radius: 4px;
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.nb-modal-close:hover {
  background: var(--site-accent);
  border-color: var(--site-accent);
  color: #000;
  transform: scale(1.08);
}

.nb-map-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.nb-map-pane {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 1rem;
  background: #050505;
  border-right: 1px solid var(--border-subtle);
}

.nb-map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--nb-map-ratio);
  background: #000;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  overflow: hidden;
  cursor: crosshair;
}

.nb-map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.nb-map-outline {
  fill: none;
  stroke: var(--site-accent);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px var(--site-accent));
}

.nb-pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nb-map-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--panel-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
}

.nb-map-toolbar label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nb-map-toolbar select {
  flex: 1;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--site-accent);
  border: 1px solid var(--border-medium);
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.nb-map-toolbar select:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(var(--site-accent-rgb), 0.5);
}

.nb-map-toolbar button {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--err);
  border: 1px solid var(--err);
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-map-toolbar button:hover {
  background: var(--err);
  color: #000;
}

.nb-map-help {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-align: center;
}

.nb-map-info {
  width: 340px;
  padding: 1rem;
  background: rgba(0, 10, 0, 0.5);
  border-left: 1px solid var(--border-subtle);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--site-accent) #0a0a0a;
}

.nb-map-info::-webkit-scrollbar        { width: 6px; }
.nb-map-info::-webkit-scrollbar-track { background: #0a0a0a; }
.nb-map-info::-webkit-scrollbar-thumb {
  background: var(--site-accent);
  border-radius: 4px;
}

.nb-info-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
}

.nb-info-empty h4 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--site-accent);
  letter-spacing: 1px;
}

.nb-info-empty p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.nb-info-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nb-info-form h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--site-accent);
  letter-spacing: 1px;
}

.nb-info-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nb-info-form input,
.nb-info-form textarea,
.nb-info-form select {
  padding: 0.6rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--site-accent);
  border: 1px solid var(--border-medium);
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.nb-info-form input:focus,
.nb-info-form textarea:focus,
.nb-info-form select:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(var(--site-accent-rgb), 0.5);
}

.nb-info-coords {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.nb-info-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nb-info-actions button {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--site-accent);
  color: #000;
  border: 1px solid var(--border-medium);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-info-actions button:first-child:hover {
  background: #000;
  color: var(--site-accent);
  box-shadow: 0 0 15px var(--site-accent);
}

.nb-danger {
  color: var(--err) !important;
  border-color: var(--err) !important;
}

.nb-danger:hover {
  background: var(--err) !important;
  color: #000 !important;
  box-shadow: 0 0 15px var(--err) !important;
}

/* ==========================================================================
   09. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --fab-size: 56px;
  }

  .nb-panel {
    width: min(96vw, 340px);
  }

  .nb-map-body {
    flex-direction: column;
  }

  .nb-map-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nb-map-info {
    width: auto;
    max-height: 50%;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .nb-admin-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   10. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .nb-panel.is-open,
  .nb-fab:hover,
  #admin-bubble.has-pending {
    animation: none !important;
  }

  .nb-panel {
    transition: none;
  }

  .nb-modal.is-open {
    transition: none;
  }
}

/* ==========================================================================
   11. MAP PINS  (was missing entirely — caused the stack-at-left bug)
   ========================================================================== */

/* The layer must not eat clicks, but pins inside it must receive them. */
.nb-pin-layer {
  pointer-events: none;
}

.nb-pin {
  position: absolute;              /* ← the actual fix */
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.15s ease;
}

.nb-pin:hover {
  transform: translate(-50%, -50%) scale(1.18);
}

.nb-pin-marker {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px var(--site-accent));
  user-select: none;
}

/* Selected pin gets a halo ring */
.nb-pin-selected .nb-pin-marker {
  filter:
    drop-shadow(0 0 6px var(--site-accent))
    drop-shadow(0 0 14px var(--site-accent));
}

.nb-pin-selected::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid var(--site-accent);
  border-radius: 50%;
  animation: nb-pin-ring calc(var(--pulse-tempo, 4s) * 0.5) ease-out infinite;
  pointer-events: none;
}

@keyframes nb-pin-ring {
  0%   { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Type colour-coding on the marker glyph */
.nb-pin[data-pin-type="event"] .nb-pin-marker { filter: hue-rotate(270deg) drop-shadow(0 0 6px #c06bff); }
.nb-pin[data-pin-type="gear"]  .nb-pin-marker { filter: hue-rotate(160deg) drop-shadow(0 0 6px #ffb347); }

/* Badge readability — the FAB's inherited colour was too dark on black */
#notification-bubble .nb-badge {
  color: var(--nb-cyan);
  border-color: var(--nb-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .nb-pin-selected::after { animation: none; }
}

.nb-item--unread {
  border-left: 3px solid var(--nb-cyan);
  background: rgba(var(--nb-cyan-rgb), 0.10);
}

/* Unread highlight — matches your theme */
.nb-item--unread {
  border-left: 3px solid var(--nb-cyan);
  background: rgba(var(--nb-cyan-rgb), 0.12);
}

/* Optional: dim read items slightly */
.nb-item:not(.nb-item--unread) {
  opacity: 0.75;
}

.nb-item:not(.nb-item--unread):hover {
  opacity: 1;
}

/* Proper mark-read button — replaces .nb-item-delete for this purpose */
.nb-item-mark {
  position: absolute;
  top: 8px;
  right: 10px;
  height: 24px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid rgba(var(--nb-cyan-rgb), 0.45);
  border-radius: 3px;
  color: var(--nb-cyan);
  font-family: 'VT323', monospace;
  font-size: 0.8rem;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.nb-item-mark:hover:not(:disabled) {
  background: rgba(var(--nb-cyan-rgb), 0.18);
  box-shadow: 0 0 10px rgba(var(--nb-cyan-rgb), 0.5);
}

.nb-item-mark:disabled {
  opacity: 0.4;
  cursor: default;
  border-color: rgba(255, 255, 255, 0.15);
  color: #999;
}

/* Wider gutter so the button never overlaps the text */
.nb-item {
  padding-right: 6.5rem;
}

/* Footer action button */
.nb-foot-btn {
  width: 100%;
  padding: 0.45rem;
  background: transparent;
  border: 1px solid rgba(var(--nb-cyan-rgb), 0.45);
  border-radius: 3px;
  color: var(--nb-cyan);
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.nb-foot-btn:hover {
  background: rgba(var(--nb-cyan-rgb), 0.18);
  box-shadow: 0 0 12px rgba(var(--nb-cyan-rgb), 0.5);
}

/* ==========================================================================
   12. LEFT COLUMN — slideshow toggle joins the FAB tokens
   Was: hard-coded 108px (gap 26px). Now mirrors the right column:
   chat floor (--fab-b1 = 20px) + size + gap -> 12px, same as 🔔↔⚙.
   Mobile: chat sits at 16px + 56px -> 12px gap restored there too.
   2026-11-10
   ========================================================================== */

.bg-slideshow-toggle {
  bottom: calc(var(--fab-b1) + var(--fab-size) + var(--fab-gap)) !important;
}

@media (max-width: 768px) {
  .bg-slideshow-toggle {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--fab-size) + var(--fab-gap)) !important;
  }
}

/* ==== [ANTHEM-LAYOUT] bubble sacred, anthem bar + chat toggle rearranged (Rule 28 append) ==== */

/* 1. ANTHEM BAR — drops from the corner into a centered bottom dock.
      Owns the center stage like a proper anthem player */
#fade-player-bar {
  left: 50% !important;
  right: auto !important;
  bottom: 18px !important;
  transform: translateX(-50%);
  z-index: 9990;
}

/* 2. CHAT TOGGLE — parks in the bottom-right, below the notification
      bubble's airspace, breathing easy */
.chat-toggle-btn,
.chat-fab,
.fab-chat {
  bottom: 18px !important;
  right: 18px !important;
  z-index: 9500;
}

/* mobile: same choreography, tighter margins */
@media (max-width: 768px) {
  #fade-player-bar {
    bottom: 12px !important;
    max-width: calc(100vw - 24px);
  }
  .chat-toggle-btn, .chat-fab, .fab-chat {
    bottom: 12px !important;
    right: 12px !important;
  }
}

/* penfix-001: all six EDIT-* position experiments excised (RELOCATE/STATIC/ADOPT/RESCUE/HOME/FINAL). edit-wall-btn is now governed solely by wall.css editbtnflow-001 - flows in facts row. */

/* ==== [TAPE-BADGE] whole-mixtape results wear the disc, songs keep the note ==== */
.theme-result-mixtape {
  border-left: 3px solid var(--site-accent, #00ff00) !important;
  letter-spacing: 0.05em;
}

/* ===== orbs-kiss-borders-ii: bell pulled to border (15 Nov 2026) ===== */
.pub-bell-panel { right: 8px; }
@media (max-width: 600px) { .pub-bell-panel { right: 6px; } }

/* ===== orbs-kiss-borders-iii: FAB column kissed to border (15 Nov 2026) =====
   --fab-edge feeds BOTH the right offset (.nb-fab) and the bottom stack
   (--fab-b1/b2), so 8px makes the right column compute to 8/82 — exactly
   mirroring the left orbs from orbs-kiss-borders. One token, whole family. */
:root { --fab-edge: 8px; }
@media (max-width: 600px) { :root { --fab-edge: 6px; } }

/* ===== orbs-kiss-borders-v (2026-11-15): left column, final word =====
   Supersedes section 12 (line 1118+) and any other earlier !important
   claims on the left orbs: this file is loaded last, so THIS block wins.
   Position AND size now fully tokenized — all four FABs are twins. */
.chat-toggle-btn {
  left: calc(var(--fab-edge, 8px) + env(safe-area-inset-left, 0px)) !important;
  bottom: var(--fab-b1, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
  width: var(--fab-size, 62px) !important;
  height: var(--fab-size, 62px) !important;
}
.bg-slideshow-toggle {
  left: calc(var(--fab-edge, 8px) + env(safe-area-inset-left, 0px)) !important;
  bottom: var(--fab-b2, calc(82px + env(safe-area-inset-bottom, 0px))) !important;
  width: var(--fab-size, 62px) !important;
  height: var(--fab-size, 62px) !important;
}

/* BUBBLEFINAL-001 (2026-11-16): the wall orange orb, ruled by ID from the last-loaded file.
   ID specificity + last position + !important = no earlier law can outrank this.
   Uses the live tokens: edge 8, b2 82, size 62 — orange sits exactly on green's shoulders. */
#wall-bg-bubble {
  left: calc(var(--fab-edge, 8px) + env(safe-area-inset-left, 0px)) !important;
  bottom: var(--fab-b2, calc(82px + env(safe-area-inset-bottom, 0px))) !important;
  top: auto !important;
  right: auto !important;
  width: var(--fab-size, 62px) !important;
  height: var(--fab-size, 62px) !important;
  position: fixed !important;
}
@media (max-width: 600px) {
  #wall-bg-bubble {
    left: calc(var(--fab-edge, 6px) + env(safe-area-inset-left, 0px)) !important;
  }
}

/* ============================================================
   adaptive-fabs-002 (2026-11-16): tag-driven FAB ownership.
   Supersedes adaptive-fabs-001 (hardcoded src patterns). A page that
   renders its own bubbles tags itself: <html data-fabs-hide>.
   While an ORPHAN pane is active, the parent FABs surface.
   ============================================================ */
body.ext-tab-active.ext-fab-orphans #chat-toggle,
body.ext-tab-active.ext-fab-orphans #notification-bubble,
body.ext-tab-active.ext-fab-orphans #admin-bubble,
body.ext-tab-active.ext-fab-orphans #bg-slideshow-toggle { display: block !important; }

/* thememove-001 nb-theme-row */
.nb-theme-row{display:flex;gap:.5rem;flex-wrap:wrap;padding:.5rem .75rem;border-bottom:1px solid var(--border-medium,rgba(255,255,255,.08));}
.nb-theme-row .mix-chip{margin:0;}

/* themedots-001 nb-dot */
.nb-dot{width:22px;height:22px;border-radius:50%;border:2px solid rgba(255,255,255,.25);cursor:pointer;padding:0;background:#333;}
.nb-dot.theme-only{background:#ff00a8;}
.nb-dot.theme-only:hover{box-shadow:0 0 10px #ff00a8;}
.nb-dot.nb-dot-reset{background:#00ff00;}
.nb-dot.nb-dot-reset:hover{box-shadow:0 0 10px #00ff00;}
.nb-dot-reset::after{content:"⟲";color:#000;font-size:14px;font-weight:bold;}
/* ==========================================================================
   nbmax-001 (2026-11-17): notification + admin panels go FULL-BLEED on
   small screens — mirror of popmax-001 for the chat popup.
   The shared .nb-panel shell drops its corner anchoring (right/bottom
   offsets) and hits all four edges; border-radius 0. CRT scanline ::after
   still paints inside (absolute inset:0). Desktop 380px corner card
   untouched. Restore: notifications.css.bak.pre-nbmax-<ts>
   ========================================================================== */
@media (max-width: 768px) {
  .nb-panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    max-height: 100% !important;
    border-radius: 0;
  }
}

/* ===== zlift-001 (2026-11-17): chat bubble rides ABOVE the nb-panels =====
   Panels are z-index var(--nb-z-panel); the FAB crew was drowning under
   them once nbmax-001 maximized the panels. Lift = panel layer + 5. */
#chat-toggle.chat-toggle-btn {
  z-index: calc(var(--nb-z-panel, 9000) + 5) !important;
}

/* ===== popupmax-001 (2026-11-17): desktop maximize toggle on all nb-panels ===== */
/* btnsize-001 (2026-11-17): match .nb-panel-close stature (28x28, 2px border, 1.2rem)
   btnflow-001 (2026-11-17): absolute stack beside close — right:44px (close: right:8px + 28px wide + 8px gap) */
.nb-max-btn {
  position: absolute;
  top: 6px;
  right: 44px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--nb-cyan);
  border-radius: 4px;
  color: var(--nb-cyan);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0;
  margin-left: auto;
}
.nb-max-btn:hover { opacity: 1; }
@media (max-width: 768px) {
  .nb-max-btn { display: none !important; }
}
.nb-panel.nb-max {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* ===== popupbig-001 (2026-11-17): chat-size pop for all nb-panels =====
   Geometry mirrors .chat-container card: min(80vw,1040px) x min(80dvh,740px), centered. */
/* btnsize-001: match .nb-panel-close stature (28x28, 2px border, 1.2rem)
   btnflow-001: absolute stack beside close — right:80px */
.nb-big-btn {
  position: absolute;
  top: 6px;
  right: 80px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--nb-cyan);
  border-radius: 4px;
  color: var(--nb-cyan);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0;
}
.nb-big-btn:hover { opacity: 1; }
@media (max-width: 768px) {
  .nb-big-btn { display: none !important; }
}
.nb-panel.nb-chatsize {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(80vw, 1040px) !important;
  max-width: 80vw !important;
  height: min(80dvh, 740px) !important;
  max-height: 80dvh !important;
  margin: 0 !important;
}

/* LANGBAR-TABS-01: lang bar only on main radio tab */
html.langbar-hidden .lang-selector { display: none !important; }

/* OMNIBAR-ON-TABTRIGGER-01: pane toolbar hidden until TAB button opens tabs */
.pane-url { display: none !important; }
html.tabs-open .pane-url { display: flex !important; }

/* CLAIM-BAR-HOTSPOT-01: button hidden inside bar, bar itself is the hotspot */
.wall-status-bar #claim-page-btn { display: none !important; }
.wall-status-bar.claim-hotspot { cursor: pointer !important; }

/* WALL-IMMERSIVE-01: artist wall shows art only — nav + FABs hidden */
html.wall-immersive .nb-fab,
html.wall-immersive .chat-fab,
html.wall-immersive .chat-toggle-btn,
html.wall-immersive .fab-chat { display: none !important; }
html.wall-immersive .main-nav { display: none !important; }

/* Narrow screens: the status dot centres above the label instead of hugging the edge. Closing tag marks ownership. */
@media (max-width: 620px) {
  html.wall-immersive .wall-status-bar__dot { align-self: center; }
}
/* CLAIMBAR-DOT-01 */

/* Wall immersion completes: header shell and its reserved padding die too. Gallery frame is a hotspot. Closing tag marks ownership. */
html.wall-immersive .main-header { display: none !important; }
html.wall-immersive body { padding-top: 0 !important; }
html.wall-immersive .wall-photo-frame { cursor: pointer !important; }
/* WALL-FIX-BATCH-01 */


/* Wall dyes: contact footer joins the accent scheme; lightbox close gets its uniform. Closing tag marks ownership. */
html.wall-immersive #contact { color: var(--site-accent, #43ff91) !important; border-top: 1px solid rgba(var(--site-accent-rgb, 67, 255, 145), 0.35) !important; }
html.wall-immersive #contact p { color: var(--site-accent, #43ff91) !important; text-shadow: 0 0 8px rgba(var(--site-accent-rgb, 67, 255, 145), 0.5); }
html.wall-immersive #contact .social-links a {
  color: var(--site-accent, #43ff91) !important;
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(var(--site-accent-rgb, 67, 255, 145), 0.5);
}
html.wall-immersive #contact .social-links a:hover { text-shadow: 0 0 10px var(--site-accent, #43ff91); }
html.wall-immersive .image-lightbox-close {
  color: var(--site-accent, #43ff91) !important;
  background: rgba(0, 0, 0, 0.75) !important;
  border: 1px solid var(--site-accent, #43ff91) !important;
  border-radius: 3px !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 30px !important;
  text-align: center !important;
  font-size: 1.3rem !important;
  cursor: pointer !important;
}
html.wall-immersive .image-lightbox-close:hover { box-shadow: 0 0 10px var(--site-accent, #43ff91); }
/* WALL-DYE-01 */

/* Lightbox hairline: the title-strip divider and inner bottom edge follow the accent. Closing tag marks ownership. */
html.wall-immersive .image-lightbox-inner::before {
  border-bottom: 1px solid rgba(var(--site-accent-rgb, 67, 255, 145), 0.55) !important;
}
html.wall-immersive .image-lightbox-inner {
  border-bottom-color: rgba(var(--site-accent-rgb, 67, 255, 145), 0.55) !important;
}
/* LIGHTBOX-HAIRLINE-01 */

/* Claim bar keeps its row shape on phones: dot beside the label, centred. Closing tag marks ownership. */
@media (max-width: 620px) {
  html.wall-immersive .wall-status-bar {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: left !important;
  }
  html.wall-immersive .wall-status-bar__label { text-align: left !important; }
}
/* CLAIMBAR-ROW-01 */

/* Green glow exterminated: title strip and inner box carry no shadows, plain dark backdrop. Closing tag marks ownership. */
html.wall-immersive .image-lightbox-inner,
html.wall-immersive .image-lightbox-inner::before {
  text-shadow: none !important;
  box-shadow: none !important;
}
html.wall-immersive .image-lightbox-inner::before {
  background: #0d0d0d !important;
  background-image: none !important;
}
/* LB-GREEN-KILL-01 */

/* ORANGE-FAB-KILL-01 (2026-11-22): hide the wall-bg slideshow bubble on immersive walls.
   Recon: element is #wall-bg-bubble (wall.html:341), dressed by BUBBLEFINAL-001 ID rules
   in THIS file (last-loaded wins), so the kill lives here, scoped + !important. */
html.wall-immersive #wall-bg-bubble,
html.wall-immersive .wall-bg-bubble {
  display: none !important;
}

/* X-DRESS-01 (2026-11-22): claim modal close button. Recon: .close-btn had ZERO rules
   anywhere (naked browser default — floated mid-header, inherited teal focus ring).
   Header gets flex law, button gets house chip. Scoped to immersive walls. */
html.wall-immersive .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
html.wall-immersive .modal-header h2 {
  margin: 0;
}
html.wall-immersive .close-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  background: rgba(13, 13, 13, 0.6);
  color: var(--site-accent, #a06bff);
  border: 1px solid var(--site-accent, #a06bff);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}
html.wall-immersive .close-btn:hover,
html.wall-immersive .close-btn:focus-visible {
  box-shadow: 0 0 12px rgba(var(--site-accent-rgb, 160, 107, 255), 0.55);
}
html.wall-immersive .close-btn:active {
  transform: scale(0.94);
}

/* X-DRESS-01-R2 (2026-11-22): boss decree — claim X wears the gallery close outfit.
   Recipe cloned verbatim from .gallery-modal-close (wall.css:4150/4305):
   bare white glyph, no box, no ring. Header flex law from X-DRESS-01 stands. */
html.wall-immersive .close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  box-shadow: none;
  width: auto;
  height: auto;
  border-radius: 0;
  flex: 0 0 auto;
}
html.wall-immersive .close-btn:hover {
  color: var(--site-accent, #a06bff);
  box-shadow: none;
}

/* SONGCARD-360-01 (2026-11-22): 360px cut fix. Recon: ≤620px the .reaction-row spans
   the card holding 10 emoji-btns @40px (~460px) — wider than the viewport; text can't shrink.
   Law: wrap allowed, smaller targets ≤420px, shrink-safe text (overflow-wrap inherits). */
html.wall-immersive .track-card { min-width: 0; overflow-wrap: anywhere; }
html.wall-immersive .reaction-row { flex-wrap: wrap; row-gap: 0.4rem; }
@media (max-width: 420px) {
  html.wall-immersive .emoji-btn { width: 34px; height: 34px; font-size: 1.05rem; }
  html.wall-immersive .track-card { gap: 0.7rem; padding: 0.7rem; }
  html.wall-immersive .track-cover { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ============================================================
   FABYIELD-01 (2026-11-24): FAB crew yields to the lang bar.
   When the js/script.js FABYIELD-01 hook measures a live overlap
   between .lang-selector and any FAB, html.fab-yield-langbar
   lands and the whole crew stands down (mobile collision fix,
   pre-DYYA polish). Appended last per Rule 28; !important per
   the Rule 45 ladder so no elder claim outranks the yield.
   ============================================================ */
html.fab-yield-langbar .nb-fab,
html.fab-yield-langbar #notification-bubble,
html.fab-yield-langbar #admin-bubble,
html.fab-yield-langbar #chat-toggle,
html.fab-yield-langbar .chat-toggle-btn,
html.fab-yield-langbar .chat-fab,
html.fab-yield-langbar .fab-chat,
html.fab-yield-langbar #wall-bg-bubble,
html.fab-yield-langbar .bg-slideshow-toggle {
  display: none !important;
}

/* ============================================================
   FABYIELD-04 (2026-11-24): kill method swap — display:none
   zeroed the FABs' getBoundingClientRect(), so the FABYIELD-03
   checker measured ghosts, ruled "all clear", unhid the crew,
   which re-overlapped -> oscillator at frame rate (the flicker).
   visibility:hidden keeps real geometry: invisible, unclickable,
   but MEASURABLE — the return law now judges truth, not absence.
   Later block, equal weight: outranks FABYIELD-01's display:none
   per Rule 45. JS hook (FABYIELD-03) untouched.
   ============================================================ */
html.fab-yield-langbar .nb-fab,
html.fab-yield-langbar #notification-bubble,
html.fab-yield-langbar #admin-bubble,
html.fab-yield-langbar #chat-toggle,
html.fab-yield-langbar .chat-toggle-btn,
html.fab-yield-langbar .chat-fab,
html.fab-yield-langbar .fab-chat,
html.fab-yield-langbar #wall-bg-bubble,
html.fab-yield-langbar .bg-slideshow-toggle {
  display: block !important;      /* beats FABYIELD-01 display:none (later wins) */
  visibility: hidden !important;  /* geometry alive, hit-testing dead */
}

/* ===== VIEWSNAP-01 (24 Nov 2026): widget resize dragged the viewport =====
   Resume triggers a poll re-render inside #now-playing-widget; its height
   change re-anchors the page. Law: the widget keeps its own layout box. */
#now-playing-widget {
  min-height: 443px;      /* witness-measured settled height */
  contain: layout;        /* internal reflows never reshape the page */
}
