.mobile-scene-slot { display: none; }
@media (max-width: 900px), (max-width: 1000px) and (pointer: coarse) {
  html { scroll-padding-top: 84px; }
  body { -webkit-text-size-adjust: 100%; }
  header { padding: calc(14px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left)); }
  .chapter { height: auto; min-height: 0; padding: 64px 22px; overflow: visible; }
  .chapter.hero { padding-top: 116px; padding-bottom: 48px; }
  .mobile-scene-slot { display: block; width: 100%; height: clamp(280px, 83vw, 380px); margin: 24px 0; pointer-events: none; }
  #scene, #stage { pointer-events: none; }
  .chapter p { font-size: 15px; line-height: 1.65; }
  .chapter-nav, .progress-nav, .vertical-note, .side-note, .corner-label { display: none; }
  dialog { max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); overflow-y: auto; }
  input, textarea, select { font-size: 16px; }
  button, a, input { touch-action: manipulation; }
}

@media (max-width: 900px), (max-width: 1000px) and (pointer: coarse) {
  header { background: #161718; }
  .brand { font-size: 20px; }
  .header-center { display: none; }
  .note-button { font-size: 12px; gap: 14px; min-height: 44px; }
  .hero-eyebrow { position: static; font-size: 9px; gap: 14px; }
  .hero h1 { position: static; font-size: clamp(68px, 19vw, 130px); margin: 30px 0 0; line-height: 1.02; mix-blend-mode: normal; }
  .hero h1 em { font-size: .65em; margin-top: 12px; }
  .hero-foot { position: static; display: block; margin: 28px 0 0; }
  .hero-foot p { font-size: 14px; }
  .hero-foot .micro { display: none; }
  .scroll-link { margin-top: 18px; font-size: 11px; min-height: 44px; justify-content: space-between; }
  .chapter-index { font-size: 11px; margin-bottom: 26px; }
  .passage-title { position: static; transform: none; text-align: left; }
  .chapter h2, .passage-title h2, .object h2, .construction h2 { position: static; font-size: clamp(56px, 15vw, 100px); line-height: 1.05; text-align: left; white-space: normal; }
  .passage-title p { font-size: 14px; line-height: 1.6; margin-top: 24px; }
  .passage-note { position: static; display: block; text-align: left; font-size: 10px; }
  .object-copy, .construction-copy, .concept { position: static; margin-top: 24px; font-size: 14px; width: 100%; max-width: 34ch; text-align: left; }
  .object-number { display: none; }
  .construction-copy p { font-size: 14px; }
  .concept { display: block; font-size: 11px; }
  .controls { position: relative; inset: auto; width: 100%; transform: none; margin-top: 24px; padding: 18px; display: grid; grid-template-columns: 1fr; gap: 18px; pointer-events: auto; background: #202122; }
  .frequency, .character { min-width: 0; }
  .frequency label, .control-label { font-size: 11px; }
  .frequency input { min-height: 44px; }
  .character > div { display: flex; justify-content: space-between; gap: 12px; }
  .character button, .play-controls button { min-height: 44px; font-size: 13px; }
  .play-controls { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 10px; border-top: 1px solid #ffffff20; }
  .sound-note { display: block; width: 100%; font-size: 10px; }
  .line-button { font-size: 12px; min-height: 44px; }
  .closing { padding: 70px 22px calc(24px + env(safe-area-inset-bottom)); min-height: 0; }
  .closing > p { font-size: clamp(54px, 14.8vw, 100px); margin: 38px 0; }
  .closing footer { position: static; margin-top: 60px; display: flex; flex-wrap: wrap; gap: 22px; }
  .closing footer span { font-size: 11px; }
  .closing footer a { min-height: 44px; display: inline-flex; align-items: center; font-size: 11px; }
  body.past-story .controls { opacity: 1; pointer-events: auto; }
}

@media (max-width: 900px), (max-width: 1000px) and (pointer: coarse) {
  .mobile-scene-slot { position: relative; }
  .mobile-scene-slot .fallback, .mobile-scene-slot .fallback-bike, .mobile-scene-slot .fallback-disc { position: absolute; inset: 0; transform: none; margin: auto; max-width: 90%; max-height: 90%; }
  .mobile-scene-slot .fallback-bike { font-size: 28vw; padding-top: 35px; text-align: center; }
  .mobile-scene-slot .fallback-disc { height: 80%; }
  .no-webgl .chapter:not(.hero) .mobile-scene-slot { display: none; }
}

@media (max-width: 900px), (max-width: 1000px) and (pointer: coarse) {
  .chapter, .closing, footer, .hero, .system, .lab, .brief {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
}

@media (max-width: 900px), (max-width: 1000px) and (pointer: coarse) { .closing footer { padding-left: 0; padding-right: 0; } }

@media (max-width: 900px) and (max-height: 500px), (max-width: 1000px) and (pointer: coarse) and (max-height: 500px) {
  .mobile-scene-slot { height: min(280px, calc(100svh - 100px)); }
}
