/* Shared studio shell — MIDI Studio layout for product pages */

body:has(.ss-studio) {
  background: #12151a;
}

.ss-main-bleed {
  max-width: none !important;
}

.ss-studio {
  --ss-stage: #161a22;
  --ss-chrome: #10141b;
  --ss-chrome-border: #2a323e;
  --ss-surface: #1e2430;
  --ss-surface-2: #252c3a;
  --ss-paper: #1e2430;
  --ss-paper-light: #fffef9;
  --ss-ink: #e8ecf1;
  --ss-ink-strong: #f5f7fa;
  --ss-muted: #9aa3ad;
  --ss-accent: #6eb6ff;
  --ss-play: #3d9a64;
  --ss-lib-w: 280px;
  --ss-rail-w: 160px;
  --ss-nav-offset: 56px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: calc(100dvh - var(--ss-nav-offset));
  min-height: 480px;
  max-height: calc(100dvh - var(--ss-nav-offset));
  background: var(--ss-stage);
  color: #e8ecf1;
  position: relative;
  overflow: hidden;
}

@media (min-width: 992px) {
  .ss-studio {
    --ss-nav-offset: 72px;
  }
}

.ss-nav {
  flex: 0 0 var(--ss-lib-w);
  width: var(--ss-lib-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ss-chrome);
  border-right: 1px solid var(--ss-chrome-border);
  z-index: 6;
  min-height: 0;
}

.ss-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--ss-chrome-border);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8ecf1;
  flex-shrink: 0;
}

.ss-nav-close {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ss-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.ss-nav-close:hover {
  color: #fff;
}

.ss-nav-search {
  position: relative;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--ss-chrome-border);
  flex-shrink: 0;
}

.ss-nav-search input {
  width: 100%;
  padding: 0.4rem 0.65rem 0.4rem 2rem;
  background: #1c212b;
  border: 1px solid #343b48;
  border-radius: 0.45rem;
  color: #e8ecf1;
  font-size: 0.85rem;
}

.ss-nav-search input:focus {
  outline: none;
  border-color: var(--ss-accent);
}

.ss-nav-search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7582;
  font-size: 0.8rem;
  pointer-events: none;
}

.ss-nav-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0 0.75rem;
}

.ss-nav-section {
  padding: 0.55rem 0.85rem 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7582;
  font-weight: 700;
}

.ss-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-nav-list a,
.ss-nav-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.85rem;
  border: 0;
  background: transparent;
  color: #c5ced8;
  font-size: 0.86rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.ss-nav-list a:hover,
.ss-nav-list button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.ss-nav-list a.is-active,
.ss-nav-list button.is-active {
  background: rgba(110, 182, 255, 0.12);
  color: #dcebff;
  box-shadow: inset 3px 0 0 var(--ss-accent);
}

.ss-nav-list .ss-count {
  font-size: 0.72rem;
  color: #7a93b0;
  font-variant-numeric: tabular-nums;
}

.ss-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ss-chrome-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--ss-chrome);
  border-bottom: 1px solid var(--ss-chrome-border);
  z-index: 5;
}

.ss-chrome-meta {
  min-width: 0;
  flex: 1;
}

.ss-chrome-meta h1 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #f3f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-chrome-meta p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--ss-muted);
}

.ss-chrome-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ss-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ss-muted);
  border-radius: 0.45rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.ss-icon-btn:hover,
.ss-icon-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ss-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, #242a35 0%, var(--ss-stage) 70%);
}

@media (min-width: 1200px) {
  .ss-stage {
    grid-template-columns: minmax(0, 1fr) var(--ss-rail-w);
  }
}

.ss-stage-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ss-paper,
.ss-surface {
  background: linear-gradient(180deg, var(--ss-surface-2) 0%, var(--ss-surface) 100%);
  color: var(--ss-ink);
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.05rem 1.15rem 1.25rem;
}

/* Light sheet only where print/PDF preview needs paper */
.ss-paper-light {
  background: var(--ss-paper-light);
  color: #1a1a1a;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  padding: 1.15rem 1.25rem 1.4rem;
}

.ss-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ss-chrome-border);
  border-radius: 0.65rem;
  padding: 0.95rem 1rem;
}

.ss-panel + .ss-panel,
.ss-paper + .ss-panel,
.ss-panel + .ss-paper {
  margin-top: 0.75rem;
}

.ss-empty {
  text-align: center;
  color: var(--ss-muted);
  padding: 2.5rem 1rem;
}

.ss-rail-ad {
  display: none;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  height: 600px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

@media (min-width: 1200px) {
  .ss-rail-ad {
    display: block;
  }
}

.ss-studio.ss-rail-hidden .ss-rail-ad {
  display: none !important;
}

@media (min-width: 1200px) {
  .ss-studio.ss-rail-hidden .ss-stage {
    grid-template-columns: 1fr;
  }
}

#ss-rail-ad-slot {
  width: 160px;
  height: 600px;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.ss-rail-ad-ins,
#ss-rail-ad-slot .adsbygoogle {
  display: inline-block !important;
  width: 160px !important;
  height: 600px !important;
  max-width: 160px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: top;
}

#ss-rail-ad-slot iframe,
#ss-rail-ad-slot [id^="aswift_"] {
  width: 160px !important;
  height: 600px !important;
  max-width: 160px !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Chapter chips / filters */
.ss-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.ss-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.22rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid #343b48;
  background: #1c212b;
  color: #c5ced8;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  cursor: pointer;
}

.ss-chip:hover {
  border-color: var(--ss-accent);
  color: #fff;
}

.ss-chip.is-active {
  background: rgba(110, 182, 255, 0.18);
  border-color: var(--ss-accent);
  color: #dcebff;
}

.ss-chip.is-muted,
.ss-chip.is-empty {
  opacity: 0.28;
  pointer-events: none;
  cursor: default;
  filter: grayscale(0.4);
}

.ss-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.ss-range-row input {
  width: 4.2rem;
  padding: 0.3rem 0.45rem;
  background: #1c212b;
  border: 1px solid #343b48;
  border-radius: 0.35rem;
  color: #e8ecf1;
  font-size: 0.82rem;
}

.ss-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.ss-btn-accent {
  background: linear-gradient(135deg, #5aa8ef, #3d7ebd);
  color: #fff;
}

.ss-btn-accent:hover {
  color: #fff;
  filter: brightness(1.06);
}

.ss-btn-ghost {
  background: transparent;
  border: 1px solid #343b48;
  color: #c5ced8;
}

.ss-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.ss-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-result-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0.15rem;
}

.ss-result-list li:last-child {
  border-bottom: 0;
}

.ss-result-list a {
  font-weight: 650;
  color: #d7e6f7;
  text-decoration: none;
}

.ss-result-list a:hover {
  color: #fff;
  text-decoration: underline;
}

.ss-result-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--ss-muted);
  margin-top: 0.15rem;
}

/* Index tool switcher */
.ss-index-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ss-chrome-border);
  border-radius: 0.75rem;
}

.ss-index-switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  color: #9aa3ad;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.ss-index-switch a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.ss-index-switch a.is-active {
  color: #eaf3ff;
  background: rgba(110, 182, 255, 0.14);
  border-color: rgba(110, 182, 255, 0.35);
}

/* Soft studio variant (Plan Worship) */
.ss-studio.ss-soft {
  --ss-stage: #1c2430;
  --ss-chrome: #15202c;
  --ss-surface: #243041;
  --ss-surface-2: #2a3750;
  --ss-muted: #b0bac6;
}

.ss-studio.ss-soft .ss-panel {
  background: rgba(255, 255, 255, 0.05);
}

/* Timeline (Years) */
.ss-timeline {
  position: relative;
  padding: 0.25rem 0 0.75rem 0.35rem;
}

.ss-timeline::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, transparent, #3d4a5c 12%, #3d4a5c 88%, transparent);
}

.ss-timeline-era {
  position: relative;
  margin: 0.65rem 0 0.2rem;
  padding-left: 1.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7582;
  font-weight: 700;
}

.ss-timeline-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.38rem 0.65rem 0.38rem 1.85rem;
  border: 0;
  background: transparent;
  color: #c5ced8;
  text-decoration: none;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.ss-timeline-node::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #2a323e;
  border: 2px solid #5a6a7e;
  z-index: 1;
}

.ss-timeline-node:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.ss-timeline-node.is-active {
  color: #dcebff;
  background: rgba(110, 182, 255, 0.1);
}

.ss-timeline-node.is-active::before {
  background: var(--ss-accent);
  border-color: #a8d2ff;
  box-shadow: 0 0 0 3px rgba(110, 182, 255, 0.2);
}

.ss-timeline-node .ss-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: #7a93b0;
}

.ss-year-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.ss-az {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem 0.55rem;
}

.ss-az a {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9aa3ad;
  text-decoration: none;
  background: #1c212b;
  border: 1px solid #2a303a;
}

.ss-az a:hover,
.ss-az a.is-active {
  color: #fff;
  border-color: var(--ss-accent);
  background: rgba(110, 182, 255, 0.16);
}

.ss-az a.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.ss-footer-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ss-footer-block h2 {
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
  color: #d7e0ea;
}

.ss-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-footer-links a {
  color: #9eb0c4;
  text-decoration: none;
  font-size: 0.86rem;
}

.ss-footer-links a:hover {
  color: #fff;
}

.ss-footer-links li {
  padding: 0.28rem 0;
}

.ss-stepper a,
.ss-stepper button {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border: 0;
  background: transparent;
  color: #c5ced8;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
}

.ss-stepper .ss-step-num {
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #1c212b;
  border: 1px solid #343b48;
  color: #9aa3ad;
}

.ss-stepper a.is-active,
.ss-stepper button.is-active {
  background: rgba(110, 182, 255, 0.12);
  color: #dcebff;
}

.ss-stepper a.is-active .ss-step-num,
.ss-stepper button.is-active .ss-step-num {
  background: var(--ss-accent);
  border-color: var(--ss-accent);
  color: #0b1724;
}

.ss-stepper a.is-done .ss-step-num,
.ss-stepper button.is-done .ss-step-num {
  background: rgba(61, 154, 100, 0.25);
  border-color: var(--ss-play);
  color: #b8efcf;
}

@media (max-width: 899px) {
  .ss-studio {
    flex-direction: column;
  }

  .ss-nav {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 92vw);
    flex: none;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
  }

  .ss-studio.ss-nav-open .ss-nav {
    transform: translateX(0);
  }

  .ss-nav-close {
    display: inline-block;
  }

  .ss-nav-show {
    display: inline-flex !important;
  }
}

@media (min-width: 900px) {
  .ss-nav-show {
    display: none !important;
  }
}
