/* ── SECTION LAYOUT ── */
.section {
  container-type: inline-size;
  container-name: wek-section;
  padding: 5rem max(1.25rem, env(safe-area-inset-left, 0px)) 5rem max(1.25rem, env(safe-area-inset-right, 0px));
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* World banner — reads like a stage select ribbon */
.section-num {
  display: inline-block;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: clamp(0.45rem, 1.65vw, 0.58rem);
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stage-coin-ink);
  margin-bottom: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--block-gold);
  border: 3px solid var(--stage-coin-rim);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 4px 0 var(--block-gold-shadow),
    0 10px 22px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.7rem, 3.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin-top: 0.7rem;
  max-width: 600px;
  line-height: 1.6;
}

.divider {
  max-width: 960px;
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.divider::after {
  position: absolute;
  top: -0.65em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  padding: 0 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--coin-gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.35);
}

/* World-specific section accent lines */
#sequence .section-num { background: var(--nintendo-red); border-color: #8a0009; color: var(--star-white); text-shadow: 0 1px 0 rgba(0,0,0,0.4); }
#registry .section-num { background: #1565c0; border-color: #0d47a1; color: var(--star-white); text-shadow: 0 1px 0 rgba(0,0,0,0.4); }
#scenarios .section-num { background: var(--ground-moss); border-color: #064d0f; color: var(--star-white); text-shadow: 0 1px 0 rgba(0,0,0,0.4); }
#quiz .section-num { background: var(--snes-select-yellow); border-color: var(--stage-coin-rim); color: var(--stage-coin-ink); }
#maturity .section-num { background: #6a1b9a; border-color: #4a148c; color: var(--star-white); text-shadow: 0 1px 0 rgba(0,0,0,0.4); }
#cert-section .section-num { background: linear-gradient(135deg, #b8860b, var(--coin-gold), #b8860b); border-color: var(--block-gold-shadow); color: var(--stage-coin-ink); }

/* World-specific left-border glow on section headers */
#sequence .section-header { border-bottom-color: rgba(230, 0, 18, 0.3); }
#registry .section-header { border-bottom-color: rgba(79, 195, 247, 0.3); }
#scenarios .section-header { border-bottom-color: rgba(61, 220, 132, 0.3); }
#quiz .section-header { border-bottom-color: rgba(252, 224, 0, 0.3); }
#maturity .section-header { border-bottom-color: rgba(183, 148, 244, 0.3); }
#cert-section .section-header { border-bottom-color: rgba(255, 214, 10, 0.4); }

/* Richer divider */
.divider::after {
  content: "✦ ★ ✦";
  letter-spacing: 0.3em;
  font-size: 0.6rem;
}
