#scene3d { display: none; }
html.s3d #scene3d { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
html.s3d body { background: linear-gradient(180deg, #7fb2d6 0%, #f6c58f 58%, #d9bd8a 58.2%, #c39a52 100%) fixed; }
html.s3d .site-header, html.s3d .site-footer { position: relative; z-index: 2; }
html.s3d main { position: relative; z-index: 1; }
html.s3d main > section { background: transparent; border: 0; min-height: 92vh; display: flex; align-items: center; padding-block: 2.5rem; padding-inline: max(16px, 4vw); }
html.s3d main > section:first-child { min-height: 0; padding-block: 1.5rem 7rem; }
html.s3d main > section > .wrap {
  width: 100%; max-width: 33rem; min-width: 0; margin: 0; display: block;
  background: var(--bg-card); color: var(--ink); border: 2px solid var(--rule); border-radius: 8px;
  padding: 1.4rem 1.5rem 1.5rem; box-shadow: 0 18px 40px -22px rgba(20, 8, 4, .6);
}
html.s3d .hero .hero-media { display: none; }
html.s3d .hero .hero-copy { max-width: none; width: auto; padding: 0; }
html.s3d .hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); line-height: 1.1; }
html.s3d main h2 { font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem); line-height: 1.12; }
html.s3d main .grid, html.s3d main .state-grid { grid-template-columns: 1fr; }
html.s3d main .card { box-shadow: none; }
html.s3d .band h2, html.s3d .band p { color: var(--ink); }
html.s3d .s3d-knock { margin-top: 1rem; cursor: pointer; }
html.s3d .s3d-sound { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 3; font: 700 .85rem var(--body-font); color: var(--ink); background: var(--bg-card); border: 2px solid var(--rule); border-radius: 999px; padding: .4rem .85rem; cursor: pointer; }
html.s3d .s3d-sound[aria-pressed="true"] { border-color: var(--primary); }
html.s3d .s3d-says { min-height: 1.6em; margin: .7rem 0 0; font-weight: 700; color: var(--primary); }
@media (prefers-color-scheme: dark) {
  html.s3d body { background: linear-gradient(180deg, #0c1230 0%, #3a2a4d 58%, #34363a 58.2%, #23262b 100%) fixed; }
}
@media (max-width: 760px) {
  html.s3d main > section, html.s3d main > section:first-child { min-height: 0; padding-block: 44vh 1.5rem; padding-inline: 16px; align-items: flex-end; }
  html.s3d main > section > .wrap { max-width: none; }
}
