/* Small screens keep the full story and every control in the reading flow. */
@media (max-width: 900px) {
  .orbit-mobile-label {
    position: fixed;
    z-index: 49;
    top: calc(61px + env(safe-area-inset-top));
    right: 12px;
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    max-width: calc(100vw - 24px);
    padding: 9px 14px;
    border: 1px solid #e8bc8d;
    border-radius: 22px;
    background: #2c1916f2;
    box-shadow: 0 9px 30px #0009;
    color: #fff0d9;
    font: 700 13px/1.2 'DM Sans', sans-serif;
    text-align: left;
    cursor: pointer;
  }
  .orbit-mobile-label:after {
    content: '⌄';
    font-size: 18px;
    line-height: 1;
  }
  body.orbit-scrolled .orbit-mobile-label {
    display: inline-flex;
  }
  body.orbit-menu-open .orbit-mobile-label:after {
    content: '⌃';
  }
  .orbit-nav, body.orbit-scrolled .orbit-nav {
    top: calc(110px + env(safe-area-inset-top));
    right: 12px;
    bottom: auto;
    width: min(285px, calc(100vw - 24px));
    max-height: calc(100dvh - 125px - env(safe-area-inset-top));
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #d4a879;
    border-radius: 14px;
    background: #1b1715f5;
    box-shadow: 0 15px 45px #000b;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
  }
  body.orbit-scrolled.orbit-menu-open .orbit-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .orbit-nav a {
    justify-content: space-between;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #f3dfc5;
    font-size: 13px;
    letter-spacing: .04em;
    opacity: 1;
  }
  .orbit-nav a:after {
    flex: none;
  }
  .orbit-nav a[aria-current='location'] {
    background: #ac493130;
  }
  .orbit-nav a:focus-visible, .orbit-mobile-label:focus-visible {
    outline: 2px solid #f5c687;
    outline-offset: 2px;
  }
  .content h2, .content h3, .content p, .footer p {
    overflow-wrap: break-word;
  }
  .content .wrap > *, .intro-layout > *, .life-chapter > *, .place-stage > *, .memory-layout > * {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 100svh;
    height: auto;
  }
  .hero .hero-center {
    flex: 0 0 auto;
    justify-content: flex-start;
    margin-top: auto;
    padding: clamp(36px, 7svh, 80px) 18px 16px;
  }
  .hero h1 {
    font-size: clamp(39px, 11.5vw, 64px);
  }
  .hero .hero-photo-credit {
    position: relative;
    inset: auto;
    max-width: calc(100% - 36px);
    margin: 4px 18px 0;
  }
  .hero .hero-bottom {
    position: relative;
    inset: auto;
    margin: 9px 18px calc(20px + env(safe-area-inset-bottom));
    text-align: left;
  }
  .hero .hero-bottom a {
    max-width: none;
    font-size: 10px;
  }
  .hero .hero-bottom a span {
    display: inline;
    margin-left: 5px;
    font-size: 16px;
  }
  .ambient-toggle {
    left: auto;
    right: 12px;
    top: calc(10px + env(safe-area-inset-top));
    min-height: 44px;
  }
  .hero .nav a, .hero .nav a:nth-child(n) {
    min-height: 44px;
  }
  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .start-feature-copy strong {
    overflow-wrap: anywhere;
  }
  .timeline-cues {
    -webkit-overflow-scrolling: touch;
  }
  .timeline-cues a {
    min-height: 76px;
  }
  .life-chapter .chapter-media, .life-chapter .chapter-copy {
    min-width: 0;
  }
  .life-chapter .chapter-image {
    width: 100%;
  }
  .life-chapter .chapter-copy {
    max-width: 100%;
  }
  .stage-interlude .stage-scene .stage-paint {
    object-position: 86% center;
    transform: scale(1.06) !important;
  }
  .place-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .place-stop {
    min-width: 0;
    min-height: 56px;
    overflow-wrap: anywhere;
  }
  .film-rail {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    padding-right: 12px;
  }
  .film-card, .film-card.has-clip {
    flex: 0 0 min(370px, calc(100vw - 56px));
    width: min(370px, calc(100vw - 56px));
    height: auto;
    min-height: 0;
    padding: 17px 16px 19px;
    overflow: visible;
  }
  .film-photo, .film-clip {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .film-clip {
    height: 200px;
    min-height: 200px;
    aspect-ratio: auto;
  }
  .film-photo img, .film-clip iframe {
    width: 100%;
    height: 100%;
  }
  .film-card-top span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .film-card-actions a, .film-card-actions button {
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }
  .film-controls button {
    width: 44px;
    height: 44px;
  }
  .film-index-tools input, .film-index-tools select, .archive-search input, .memory-form-wrap input, .memory-form-wrap textarea, .archive-chat-form input, .share-dialog input {
    font-size: 16px;
  }
  .film-index-list li {
    min-width: 0;
  }
  .film-index-name {
    overflow-wrap: anywhere;
  }
  .music-room-heading h2 {
    font-size: clamp(40px, 11vw, 52px);
  }
  .music-tabs button {
    min-height: 48px;
    line-height: 1.2;
    white-space: normal;
  }
  .radio-stage {
    min-height: 0;
  }
  .radio-stage-copy {
    margin: 0 0 20px;
    padding: 60px 0 6px;
  }
  .radio-stage-copy h3 {
    font-size: clamp(44px, 12vw, 65px);
  }
  .radio-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }
  .radio-console .radio-disc {
    display: none;
  }
  .radio-now strong, .radio-now small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .radio-actions button {
    width: 44px;
    height: 44px;
  }
  .radio-video {
    width: 100%;
    min-height: 200px;
  }
  .track-row .track {
    min-width: 0;
  }
  .track-copy, .mix-item .mix-song {
    min-width: 0;
  }
  .track small {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
  .mix-item .mix-song, .mix-item .mix-origin {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .mix-item .mix-action {
    min-width: 40px;
    min-height: 40px;
  }
  .remembrance-portrait {
    width: 100%;
  }
  .memory-form-wrap, .memory-gallery {
    min-width: 0;
  }
  .memory-form-wrap form button, #moreMemories, #removeMemory {
    min-height: 44px;
  }
  .footer-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  .dock {
    overscroll-behavior: contain;
  }
  .dock-head .close {
    min-height: 44px;
    font-size: 11px;
  }
  .dock .video {
    width: 100%;
    height: 200px;
    min-height: 200px;
    aspect-ratio: auto;
  }
  .dock .video iframe {
    height: 100%;
    min-height: 0;
  }
  .dock.expanded .video {
    height: min(50dvh, 420px);
    min-height: 200px;
    max-height: none;
    aspect-ratio: auto;
  }
  .dock.expanded .video iframe {
    min-height: 0;
  }
  .archive-chat-close, .archive-chat-form button {
    min-width: 44px;
    min-height: 44px;
  }
  body:has(.dock:not([hidden])) .archive-chat-launcher {
    top: calc(61px + env(safe-area-inset-top));
    bottom: auto;
    left: 10px;
  }
  body:has(.archive-chat:not([hidden])) .orbit-mobile-label,
  body:has(.dock.expanded:not([hidden])) .orbit-mobile-label {
    display: none;
  }
  .orbit-reveal, .feature-reveal, .film-card.film-enter, .remembrance.memory-enter,
  .motion-ready .life-chapter:not(.is-visible) .chapter-image,
  .motion-ready .life-chapter:not(.is-visible) .chapter-copy,
  .motion-ready .giving-story:not(.is-visible), .farewell.is-ready .farewell-step {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}

@media (max-width: 360px) {
  .fact-strip {
    grid-template-columns: 1fr;
  }
  .hero .nav a, .hero .nav a:nth-child(n) {
    font-size: 11px;
    padding-inline: 8px;
  }
  .film-card, .film-card.has-clip {
    flex-basis: calc(100vw - 50px);
    width: calc(100vw - 50px);
  }
  .radio-stage {
    padding-inline: 15px;
  }
  .radio-console {
    gap: 5px;
    padding: 9px;
  }
  .radio-now strong {
    font-size: 16px;
  }
}
