/* Handheld layout: readable content and native scrolling, with light CSS motion. */
.hero-mobile-visual, .hero-mobile-action { display: none; }
.cs-interaction, .cs-dialogue { display: contents; }
.cs-bubble p { display: grid; }
.cs-bubble p > span { grid-area: 1 / 1; min-width: 0; }
.cs-bubble-measure { display: none; visibility: hidden; pointer-events: none; }
.gd-cols li a.sns { display: inline-flex; justify-content: center; align-items: center; padding: 0; line-height: 1; }
.sns svg { display: block; flex: 0 0 auto; margin: 0; }
html.mobile-lite .hero.full-section { height: auto; min-height: 0; max-height: none; overflow: clip; background: #f8f3e8; }
html.mobile-lite .hero-mobile-visual { display: block; position: relative; width: 100%; }
html.mobile-lite .hero-mobile-visual img { display: block; width: 100%; height: auto; }
html.mobile-lite .hero-art, html.mobile-lite .hero-wash, html.mobile-lite .hero-grain, html.mobile-lite .petals, html.mobile-lite .hero-bottom, html.mobile-lite .hero-coordinate { display: none; }
html.mobile-lite .hero-copy { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; left: 0; top: 0; bottom: auto; overflow: hidden; clip-path: inset(50%); }
html.mobile-lite .hero-mobile-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 20px 24px; color: #183146; }
html.mobile-lite .hero-mobile-action p { margin: 0; font-size: 14px; letter-spacing: .08em; }
html.mobile-lite .hero-mobile-action a { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; padding: 8px 22px; border: 1px solid #18314650; font-size: 14px; }
@media (max-width: 900px) {
  html { scroll-padding-top: calc(80px + env(safe-area-inset-top)); }
  body { overflow-x: clip; }
  main > section { scroll-margin-top: 0; }
  .header, .header.scrolled {
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }
  .wordmark { font-size: 21px; flex-shrink: 0; }
  .header-tools { gap: 8px; }
  .header { background: #0c1524ed; }
  .desktop-nav, .page-rail { display: none; }
  .menu-toggle { display: block; }
  .menu-toggle, .motion-toggle { min-width: 44px; min-height: 44px; }
  .mobile-menu {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 38;
    display: flex; flex-direction: column; gap: 10px;
    padding: 24px 9%; background: #0b1b2df7; backdrop-filter: blur(15px);
    top: calc(64px + env(safe-area-inset-top));
    max-height: calc(100dvh - 64px - env(safe-area-inset-top));
    overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu a { display: flex; align-items: center; gap: 24px; min-height: 52px; padding-block: 16px; border-bottom: 1px solid #a0bdcf33; }
  .mobile-menu a span { font-size: 22px; letter-spacing: .1em; }
  html.mobile-lite .hero.full-section { min-height: 0; height: auto; }
  .hero-description { font-size: 14px; line-height: 1.8; max-width: 30em; }
  .op-skip { min-height: 44px; min-width: 60px; }
  .cs.full-section { padding-top: 16px; overflow: clip; }
  .cs > .section-mark { position: relative; inset: auto; margin: 0 0 12px; }
  .cs-interaction { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 6; margin-bottom: 40px; }
  .cs-interaction .cs-talk { margin: 0; }
  .cs-talk-title { margin: 0; font-size: 12px; }
  .cs-reactions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
  .cs-reactions button { min-height: 44px; padding: 6px 2px; font-size: 12px; letter-spacing: 0; }
  .cs-dialogue { display: block; position: relative; min-height: 84px; }
  .cs-dialogue .cs-bubble { position: relative; inset: auto; width: 100%; max-width: none; min-height: 84px; padding: 10px 12px; border-radius: 12px; box-shadow: 0 6px 20px #0003; animation: none; }
  .cs-dialogue .cs-bubble[hidden] { display: block; height: 84px; overflow: hidden; visibility: hidden; }
  .cs-bubble p { font-size: 14px; line-height: 1.65; letter-spacing: .03em; word-break: normal; overflow-wrap: anywhere; }
  .cs-bubble-measure { display: block; }
  .cs-eq { margin-top: 6px; }
  .cs-figure { width: 100vw; height: min(94svh, 880px, calc(100vw / var(--standing-aspect, .451))); margin-inline: -6vw; -webkit-mask-image: none; mask-image: none; }
  .cs-info { margin-top: 16px; }
  .cs-info, .cs-deck { min-width: 0; }
  .cs-stack { overflow: clip; }
  .cs-bio, .cs-intro, .cs-answer, .cs-schedule, .cs-facts { font-size: 14px; line-height: 1.85; }
  .cs-panel { overflow: visible; }
  .cs-tabs button, .cs-thumbs button, .cs-ask button, .cs-listen { min-height: 44px; }
  .cs-thumbs button { width: 44px; flex: 0 0 44px; }
  .cs-thumbs { max-width: 100%; overflow-x: auto; padding: 4px; }
  .cs-roster-wrap { position: sticky; bottom: 0; }
  .cs-roster { flex-wrap: nowrap; justify-content: center; max-width: 100%; }
  .cs-face { flex: none; padding: 0; }
  .cs-name { overflow-wrap: anywhere; }
  .cs-page { min-height: 72px; }
  .cs-page em { font-size: 12px; }
  .sns, .gd-cols li .sns { width: 44px; height: 44px; }
  .gd-cols li .sns svg { width: 19px; height: 19px; }
  .ac.full-section { height: auto; min-height: 100svh; padding: 110px 6% 28px; }
  .ac-chapters, .ac-portal, .ac-copy, .ac-rail { position: relative; inset: auto; width: auto; }
  .ac-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; transform: none; }
  .ac-chapters button { min-height: 48px; flex: 1 1 auto; }
  .ac-portal { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; padding: 8px 12px; font-size: 14px; text-align: left; border: 1px solid #ffffff50; }
  .ac-side { display: block; margin-top: 24px; font-size: 10px; line-height: 1.8; letter-spacing: .08em; color: #b9cad8; }
  .ac-copy { margin-top: 34px; }
  .ac-copy h3 { font-size: clamp(24px, 6.5vw, 32px); line-height: 1.6; }
  .ac-text { font-size: 15px; line-height: 1.85; }
  .ac-rail { margin-top: 32px; max-width: 100%; padding-bottom: 8px; overscroll-behavior-x: contain; }
  .ac-rail button { min-height: 60px; }
  .ac-rail span { font-size: 13px; }
  .dy.full-section, .gd { padding-top: 110px; }
  .dy .section-mark, .gd .section-mark { position: relative; inset: auto; margin-bottom: 28px; }
  .dy-days { max-width: 100%; margin-right: 0; }
  .dy-days button { min-width: 44px; min-height: 44px; }
  .dy-head { gap: 12px; }
  .dy-headline { display: none; }
  .dy-date b { font-size: 38px; }
  .dy-strips { --diary-card-width: clamp(152px, 46vw, 260px); display: flex; flex-direction: row; flex: none; height: calc(var(--diary-card-width) * 1.25 + 112px); gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; padding: 0 0 12px; }
  .dy-strip.dy-card { flex: 1 1 0; min-width: 28px; flex-direction: column; animation: none; transition: none; box-shadow: 0 5px 12px #1b2e411f; }
  .dy-strip.dy-card.is-open { flex: 0 0 var(--diary-card-width); max-width: none; }
  .dy-card-link { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; color: #183146; text-align: left; }
  .dy-card-link:focus-visible { outline: 3px solid var(--c); outline-offset: -3px; }
  .dy-card-image { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #132333; }
  .dy-card.is-open .dy-card-image { flex: 0 0 auto; aspect-ratio: 4 / 5; }
  .dy-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
  .dy-card .dy-who { inset: auto 0 0; opacity: 1; padding: 24px 1px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(transparent,#0b1626ed); color: #fff; }
  .dy-card .dy-who b { font-size: 12px; letter-spacing: 0; padding: 0; white-space: nowrap; }
  .dy-card .dy-who small { display: none; }
  .dy-card.is-open .dy-who { padding-inline: 12px; align-items: baseline; justify-content: flex-start; }
  .dy-card.is-open .dy-who b { font-size: 17px; letter-spacing: .04em; }
  .dy-card.is-open .dy-who small { display: block; font-size: 9px; letter-spacing: .1em; }
  .dy-card-title { display: none; min-height: 76px; padding: 12px; border-left: 3px solid var(--c); }
  .dy-card.is-open .dy-card-title { display: block; flex: 1 0 auto; }
  .dy-card-title b { display: block; font: 500 15px/1.7 var(--serif); letter-spacing: .03em; overflow-wrap: anywhere; }
  .dy-foot { margin-top: 18px; flex-wrap: wrap; gap: 10px; }
  .dy-post, .dy-entry span { font-size: 15px; line-height: 1.85; }
  .dy-read, .dy-foot a, .gd-cols a { min-height: 44px; display: inline-flex; align-items: center; }
  .gd-doors { grid-template-columns: minmax(0, 1fr); }
  .gd-door { height: auto; min-height: 190px; }
  .gd-cols { gap: 24px; }
  .gd-cols li { min-width: 0; }
  .gd-cols a { font-size: 14px; }
  .lightbox-prev, .lightbox-next, .dialog-close { min-width: 44px; min-height: 44px; }
  .top-link { min-width: 44px; min-height: 44px; }
  .profile-dialog[open] { max-height: calc(100dvh - 24px); }
  footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
  .wordmark { font-size: 19px; }
  .wordmark svg { width: 25px; }
  .header-tools { gap: 2px; }
  .cs-roster { gap: 7px; }
  .cs-face span { width: 48px; height: 48px; }
}
@media (max-width: 900px) and (orientation: landscape) {
  html.mobile-lite .hero-mobile-visual { max-width: 430px; margin-inline: auto; }
  .cs.full-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; padding-top: 12px; }
  .cs > .section-mark { grid-column: 1 / -1; margin: 0; }
  .cs-interaction { grid-column: 1; grid-row: 2; align-self: start; margin: 0; }
  .cs-figure { grid-column: 2; grid-row: 2; width: 100%; height: clamp(300px, 90svh, 620px); margin-inline: 0; }
  .cs-info { grid-column: 1 / -1; margin-top: 0; }
  .cs-page, .cs-deck, .cs-roster-wrap { grid-column: 1 / -1; }
  .cs-roster-wrap { position: relative; bottom: auto; }
  .mobile-menu a { padding-block: 12px; }
}
