/* The same content, with native scrolling and crisp DOM surfaces on touch devices.
   No viewport-sized render targets or filters in this profile. */
html.mobile-layout {
  --page-gutter: max(20px, env(safe-area-inset-left));
  --content-right: max(20px, env(safe-area-inset-right));
  --mark-width: 44px;
  --mark-gap: 12px;
  --mark-inset: calc(16px + env(safe-area-inset-top));
  --glass-panel-gap: 20px;
  --header-height: calc(72px + env(safe-area-inset-top));
  --glass-top: calc(140px + env(safe-area-inset-top));
  scrollbar-gutter: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.mobile-layout body { overflow-x: clip; }
.mobile-layout .site-header {
  height: var(--header-height); padding: env(safe-area-inset-top) var(--page-gutter) 0;
  box-sizing: border-box; background: #fff; align-items: center;
}
.mobile-layout .site-header h1 {
  margin: 0; width: calc(100% - 56px); font-size: clamp(26px, 7.8vw, 44px);
  line-height: 1; letter-spacing: -.075em;
}
.mobile-layout .brand-home-label, .mobile-layout.page-mode .brand-home-label { transform: none; visibility: visible; transition: none; }
.mobile-layout .brand-page-label, .mobile-layout .glass-rail,
.mobile-layout .intro-space, .mobile-layout .chapter-progress,
.mobile-layout .dwell-meter, .mobile-layout .glass-controls { display: none; }
.mobile-layout .glass-dock { bottom: auto; right: var(--content-right); }
.mobile-layout .mark-link { min-height: 44px; }
.mobile-nav {
  position: fixed; z-index: 11; top: var(--header-height); left: 0; right: 0;
  display: flex; justify-content: space-between; gap: 8px;
  padding: 0 var(--content-right) 0 var(--page-gutter);
  background: #fff; border-bottom: 1px solid #e9e9e9;
  font: 500 14px/1.2 Helvetica, Arial, sans-serif;
}
.mobile-nav a { display: flex; align-items: center; min-height: 46px; color: #555; text-decoration: none; border-bottom: 2px solid transparent; }
.mobile-nav a[aria-current] { color: #080808; border-color: currentColor; }
.mobile-layout main { padding-top: calc(var(--glass-top) + 24px); }
.mobile-layout main::after { display: none; }
.mobile-layout .chapter { min-height: 0; padding-block: clamp(24px, 5svh, 48px); }
.mobile-layout .chapter-heading { position: static; transform: none; }
.mobile-layout .chapter h2 { font-size: clamp(36px, 11vw, 72px); line-height: 1; }
.mobile-layout .chapter-open { min-height: 48px; }
.mobile-layout.page-mode > body > :is(main, .site-footer) { display: none; }
.mobile-layout .page-layer,
.mobile-layout .page-layer:has([data-page="work"]:not([hidden])) {
  top: calc(var(--header-height) + 48px); padding: 24px var(--content-right) max(24px, env(safe-area-inset-bottom)) var(--page-gutter);
  mask-image: none; background: #fff; transform: none; transition: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-layout .page-layer[hidden] { display: none; }
.mobile-layout .subpage > h2.visually-hidden {
  position: static; width: auto; height: auto; margin: 0; padding: 0; overflow: visible; clip: auto;
  white-space: normal; font: 700 clamp(30px, 7.8vw, 46px)/1 Helvetica, Arial, sans-serif;
  letter-spacing: -.065em;
}
.mobile-layout .page-section { min-height: 0; padding: 24px 20px; border-radius: 18px; }
.mobile-layout .page-title { font-size: clamp(32px, 9vw, 52px); margin-bottom: 24px; }
.mobile-layout .page-copy, .mobile-layout .page-detail p { font-size: 15px; overflow-wrap: anywhere; }
.mobile-layout .legal-content :is(p, li, a) { overflow-wrap: anywhere; }
.mobile-layout .work-search { top: calc(var(--header-height) + 64px); right: var(--content-right); max-width: calc(100% - var(--page-gutter) - var(--content-right)); }
.mobile-layout .work-search.is-open { width: calc(100% - var(--page-gutter) - var(--content-right)); }
.mobile-layout .work-search input { font-size: 16px; }
.mobile-layout .work-search-shell, .mobile-layout .work-gallery-button { background: #f4f4f4; border-color: #e9e9e9; }
.mobile-layout .work-gallery-button { min-width: 0; padding-inline: 16px; }
.mobile-layout .work-gallery-entry { right: calc(100% + 8px); }
.mobile-layout .work-search-results { background: #fafafa; max-height: 50dvh; }
.mobile-layout .work-canvas { --work-height: clamp(330px, 62svh, 560px); --work-size: min(100cqw, 720px, calc(var(--work-height) * 1.1)); padding: 0; }
.mobile-layout .work-natures-stack { transform: translateX(calc(var(--work-size) * .03)); }
.mobile-layout .work-project-name { font-size: calc(var(--work-size) * .16); }
.mobile-layout .work-natures-geometry { --shape-size: calc(var(--work-size) * .76); --geometry-left: 49%; --geometry-top: 50%; transform: translate(-50%, -50%); }
.mobile-layout .work-project-art { width: calc(var(--work-size) * 1.65); left: calc(50% - var(--work-size) * .45); }
.mobile-layout .work-natures-glass { filter: none; }
.mobile-layout .project-content { padding: calc(84px + env(safe-area-inset-top)) var(--content-right) max(36px, env(safe-area-inset-bottom)) var(--page-gutter); gap: 28px; }
.mobile-layout .project-intro, .mobile-layout .project-pair { grid-template-columns: minmax(0, 1fr); }
.mobile-layout .project-intro h1 { width: auto; max-width: 100%; font-size: clamp(30px, 8vw, 50px); }
.mobile-layout .project-page { -webkit-overflow-scrolling: touch; }
.mobile-layout .work-project-dialog > .work-project-close { top: calc(12px + env(safe-area-inset-top)); right: var(--content-right); width: 44px; height: 44px; background: #f4f4f4; }
.mobile-layout .nn-film-page { min-height: 100svh; min-height: 100dvh; align-content: center; padding-inline: 12px; }
.mobile-layout .nn-film-page jw-media { width: min(100%, calc((100dvh - 100px) * 1.77778)); }
.mobile-layout .gallery-content > h1 { width: auto; }
.mobile-layout .gallery-grid { display: flex; flex-direction: column; gap: 14px; }
.mobile-layout .gallery-image { width: 100%; }
.mobile-layout :is(.media-grid, .work-panel-layout) { grid-template-columns: minmax(0, 1fr); }
.mobile-layout .work-panel-copy { min-width: 0; }
.mobile-layout .work-panel-copy h3 { font-size: clamp(26px, 7vw, 40px); overflow-wrap: anywhere; }
.mobile-layout [data-entry-list="tools"] .work-panel-copy { width: 100%; max-width: 100%; }
.mobile-layout [data-entry-list="tools"] .work-panel-copy h3 { flex: 1; font-size: 16px; line-height: 1.2; }
.mobile-layout [data-entry-list="tools"] .work-project-open { white-space: normal; text-align: left; }
.mobile-layout .solo-stage { min-height: 300px; height: calc(100svh - var(--glass-top) - 100px); }
.mobile-layout :is(.blender-category, .about-contact-group) { transform: none; }
.mobile-layout .about-social { width: 44px; height: 44px; }
.mobile-layout .about-socials { gap: 18px; }
.mobile-layout .email-toast { max-width: calc(100% - 40px); box-sizing: border-box; bottom: max(24px, env(safe-area-inset-bottom)); background: #f5f5f5; }
.mobile-layout :is(.ui-glass-button, .tool-download, .category-back) { min-width: 44px; min-height: 44px; flex-basis: 44px; }
.mobile-layout .video-toolbar { gap: 4px; }
.mobile-layout .video-toolbar input { height: 44px; }
.mobile-layout jw-media :is(.media-fullscreen-button, .model-toolbar, .video-toolbar) { opacity: 1; }
.mobile-layout jw-media :is(.media-fullscreen-button, .model-toolbar *, .video-toolbar *) { pointer-events: auto; }
.mobile-layout .media-corner { display: none; }
.mobile-layout :is(.media-corner, .ui-glass-button, .work-search-shell, .work-search-results, .work-gallery-button, .email-toast, .work-project-close) { backdrop-filter: none; -webkit-backdrop-filter: none; }
.mobile-layout :is(.work-project-dialog, .media-fullscreen)::backdrop { background: #fff; backdrop-filter: none; }
.mobile-layout :is(.text-hover-label, .brand-label, .about-shadow-source) { filter: none !important; }
.mobile-layout .mobile-embed-expanded { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100dvh; aspect-ratio: auto; border-radius: 0; overflow-y: auto; background: #fff; }
.mobile-layout .mobile-embed-expanded[type="youtube"] { background: #171717; }
.mobile-layout .mobile-embed-expanded[type="instagram"] .media-content { max-width: 540px; min-height: 100%; margin: 0 auto; }
.mobile-layout .mobile-embed-expanded .media-fullscreen-button { top: calc(12px + env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.mobile-layout .mobile-embed-expanded .video-toolbar { bottom: max(12px, env(safe-area-inset-bottom)); }
.mobile-layout .project-page.has-expanded-embed { overflow: hidden; }
.mobile-layout .model-load { padding: 14px 20px; border: 1px solid #ccc; border-radius: 12px; background: #fff; color: #111; font: inherit; }
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-layout .work-canvas { --work-height: max(200px, calc(100svh - 200px)); }
  .mobile-layout .contact-stage { position: relative; min-height: 240px; }
  .mobile-layout .page-layer:has([data-page="about"]:not([hidden])) { overflow-y: auto; }
}
