/* Synth Stories bottom bar + Join the Archive modal (shared by every page) */
:root { --ssb-h: 44px; }

.ssb-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  height: calc(var(--ssb-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 0.75rem env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  background: rgba(5,5,5,0.85);
  border-top: 1px solid rgba(0,255,255,0.22);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font-family: "Courier New", Courier, monospace;
  box-sizing: border-box;
}
.ssb-icons { display: flex; align-items: center; gap: 0.15rem; }
.ssb-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: #E8E8E8; opacity: 0.8;
  border-radius: 4px; text-decoration: none; transition: color .15s, opacity .15s;
}
.ssb-icons a:hover, .ssb-icons a:focus-visible { color: #00FFFF; opacity: 1; outline: none; }
.ssb-icons svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.ssb-join {
  min-height: 32px; padding: 0.3rem 0.8rem;
  background: transparent; border: 1px solid #00FFFF; color: #00FFFF;
  font-family: inherit; font-size: 0.72rem; letter-spacing: 1.5px;
  text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.ssb-join:hover, .ssb-join:focus-visible { background: #00FFFF; color: #000; outline: none; }
@media (max-width: 420px) {
  .ssb-bar { gap: 0.4rem; padding-left: 0.4rem; padding-right: 0.4rem; }
  .ssb-icons a { width: 34px; }
  .ssb-join { padding: 0.3rem 0.55rem; font-size: 0.66rem; letter-spacing: 1px; }
}

/* Hide the bar while a video is fullscreen */
body:has(.teaser-video-wrap.fullscreen) .ssb-bar,
body:has(.wall.fs) .ssb-bar { display: none; }

/* Keep bottom controls clear of the bar */
.dark-footer { bottom: calc(2rem + var(--ssb-h)) !important; }
.files-footer { bottom: calc(1.3rem + var(--ssb-h)) !important; }
.timeline-wrap { padding-bottom: calc(4.6rem + var(--ssb-h)); }
.author-panel { bottom: calc(1.2rem + var(--ssb-h)) !important; max-height: calc(100vh - var(--ssb-h) - 2.4rem); overflow-y: auto; }
body.ssb-scroll { padding-bottom: var(--ssb-h); }

/* Modal: hidden with visibility/opacity (not display:none) so MailerLite can render into it */
.ssb-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,0.78);
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .2s, visibility 0s linear .2s;
}
.ssb-modal.open { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .2s; }
.ssb-dialog {
  position: relative; width: min(480px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: #050505; border: 1px solid #00FFFF; box-shadow: 0 0 28px rgba(0,255,255,0.18);
  padding: 2.4rem 1rem 1rem; color: #E8E8E8; box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.ssb-close {
  position: absolute; top: 0.35rem; right: 0.35rem; width: 40px; height: 40px;
  background: transparent; border: 0; color: #E8E8E8; font-size: 1.6rem; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.ssb-close:hover, .ssb-close:focus-visible { color: #00FFFF; outline: none; }
.ssb-fallback { display: none; text-align: center; font-family: "Courier New", monospace; font-size: 0.85rem; line-height: 1.5; padding: 0.5rem 0 0.25rem; }
.ssb-fallback a { color: #00FFFF; }
.ssb-modal.ssb-empty .ssb-fallback { display: block; }
html.ssb-lock, html.ssb-lock body { overflow: hidden !important; }
