/* Shared mobile layer. Loaded after each page's own styles; desktop stays intact. */
.mobile-menu-toggle, .mobile-photo-shortcuts { display: none; }
.mobile-menu { border: 0; padding: 0; }
.mobile-menu:not([open]) { display: none; }
.mobile-menu::backdrop { background: #17132370; backdrop-filter: blur(8px); }
.mobile-skip-link { position: fixed; top: -100px; left: 16px; z-index: 2000; padding: 12px 18px; border-radius: 12px; background: #fff; color: #30283a; }
.mobile-skip-link:focus { top: 12px; }
.mobile-accordion > summary { list-style: none; }
.mobile-accordion > summary::-webkit-details-marker { display: none; }
.mobile-sound-settings, .mobile-sound-sliders { display: contents; }
.mobile-sound-settings > summary { display: none; }
@media (min-width: 901px) {
  .mobile-accordion > summary { cursor: default; }
}
@media (max-width: 900px) {
  :root { --mobile-header: calc(70px + env(safe-area-inset-top, 0px)); --pad-x: clamp(18px, 5vw, 32px); }
  html { scroll-padding-top: calc(var(--mobile-header) + 16px); -webkit-text-size-adjust: 100%; }
  body { min-width: 0; overflow-x: clip; }
  /* Do not wait for web fonts or large artworks to finish downloading. */
  .site-header, .home-main, .home-footer { opacity: 1 !important; transform: none !important; }
  .loader { display: none; }
  body .site-header {
    box-sizing: border-box; position: fixed; inset: 0 0 auto; z-index: 200;
    padding: calc(10px + env(safe-area-inset-top, 0px)) var(--pad-x) 10px;
    min-height: var(--mobile-header); gap: 8px; flex-wrap: wrap;
  }
  .site-header .logo { min-width: 0; max-width: calc(100% - 80px); min-height: 44px; display: flex; align-items: center; }
  .site-header .logo-anim, .site-header .logo-anim .ltr { font-size: clamp(15px, 4.6vw, 22px); }
  /* Without JS, the complete navigation remains a usable horizontal list. */
  body .site-header .nav { flex: 1 0 100%; display: flex; overflow-x: auto; gap: 8px; padding: 4px 0; scrollbar-width: thin; }
  body .site-header .nav a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 12px; }
  body:not(.mobile-nav-enabled) .site-header { position: relative; }
  .mobile-nav-enabled .site-header { flex-wrap: nowrap; height: var(--mobile-header); }
  .mobile-nav-enabled .site-header .nav { display: none; }
  .mobile-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto;
    min-width: 72px; min-height: 46px; padding: 8px 10px;
    border: 1px solid #bdb2cb80; border-radius: 24px;
    background: #faf7fc; color: #51445d; font: 500 12px/1.2 var(--sans-2);
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu-toggle svg { width: 16px; height: 16px; }
  .mobile-menu {
    position: fixed; inset: 0 0 auto auto; width: min(100%, 430px); max-width: 100%;
    max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) 22px calc(28px + env(safe-area-inset-bottom, 0px));
    border-radius: 0 0 0 28px; background: #fcfafc; color: #40354b;
    box-shadow: -12px 16px 70px #251a3520;
  }
  .mobile-menu-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
  .mobile-menu-heading p { font: 500 14px/1.5 var(--sans-2); letter-spacing: .04em; }
  .mobile-menu-close { width: 48px; height: 48px; border-radius: 50%; background: #ede8f2; color: #51445d; font-size: 28px; line-height: 1; }
  .mobile-menu nav { display: grid; gap: 5px; }
  .mobile-menu nav a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 12px 14px; border-radius: 15px; font: 500 18px/1.4 var(--sans-2); text-decoration: none; }
  .mobile-menu nav a::after { content: '↗'; font-size: 18px; color: #93819d; }
  .mobile-menu nav a[aria-current="page"] { background: #eee5f4; color: #695278; }
  .mobile-menu nav a:active { background: #e8edf5; }
  html.mobile-menu-open { overflow: hidden; }
  .mobile-menu[open] { animation: mobile-menu-in 220ms ease-out; }
  @keyframes mobile-menu-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
  :where(button, a, summary, input) { -webkit-tap-highlight-color: #cfb7dd33; }
  :where(button, a, summary, input):focus-visible { outline: 2px solid #8e79b4; outline-offset: 4px; }
  button, summary { touch-action: manipulation; }
  body :where(.inst-back-arrow, .series-nav-back, .room-back, .photo-back, .photo-close, .photo-story-close, .kq-detail-close, .kq-audio-play, .mus-close, .sg-close, .sg-prev, .sg-next, .archaeology-lightbox-close, .inst-video-close, .modal-close) { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
  [hidden] { display: none !important; }
  body .inner { width: 100%; min-width: 0; padding-left: var(--pad-x); padding-right: var(--pad-x); padding-top: calc(var(--mobile-header) + 30px); }
  .page-head { margin-bottom: 32px; }
  .page-title { font-size: clamp(32px, 9vw, 66px); line-height: 1.15; overflow-wrap: anywhere; }
  .page-lede, .text-cols, .text-cols p, .contact-card p { font-size: 16px; line-height: 1.75; }
  .text-cols { columns: 1; }
  .site-footer { padding: 24px var(--pad-x) calc(24px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .site-footer a, .home-footer a, .cv-download { min-height: 46px; display: inline-flex; align-items: center; }
  .home-main { min-height: calc(100svh - 88px); padding-top: calc(var(--mobile-header) + 72px); padding-bottom: 160px; }
  .home-name { font-size: clamp(36px, 9.6vw, 74px); max-width: 100%; }
  .home-tagline { max-width: 300px; text-align: center; font-size: 11px; line-height: 1.9; letter-spacing: .16em; margin-top: 28px; }
  .home-orbit { bottom: 24px; right: 24px; }
  .home-footer { padding: 12px var(--pad-x) calc(16px + env(safe-area-inset-bottom, 0px)); }
  .hero-dino-toggle { min-width: 48px; min-height: 48px; }
  .page-works .works-strips { padding-top: calc(var(--mobile-header) + 12px); }
  .strips .strip { min-height: 148px; }
  .strips .strip:hover { height: auto; }
  .strip-title { font-size: clamp(20px, 6vw, 32px); line-height: 1.3; }
  .aff-room { margin-top: var(--mobile-header); height: calc(100svh - var(--mobile-header)); min-height: 480px; touch-action: pan-y pinch-zoom; }
  .aff-painting { width: min(76vw, 520px, calc((100svh - 250px) * .9496)); }
  .aff-sound-panel { bottom: max(12px, env(safe-area-inset-bottom, 0px)); padding: 8px 12px; width: min(360px, calc(100% - 32px)); border: 1px solid #d9d8e780; border-radius: 20px; }
  .aff-sound-controls { gap: 0; }
  .aff-sound-toggle { width: 100%; min-height: 46px; font-size: 13px; }
  .mobile-sound-settings { display: block; width: 100%; }
  .mobile-sound-settings > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; font: 12px/1.4 var(--sans-2); list-style: none; cursor: pointer; }
  .mobile-sound-settings > summary::-webkit-details-marker { display: none; }
  .mobile-sound-settings > summary::after { content: '⌄'; padding-left: 10px; }
  .mobile-sound-settings[open] > summary::after { content: '⌃'; }
  .mobile-sound-sliders { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding-bottom: 6px; }
  .aff-sound-volume, .aff-sound-frequency { min-height: 44px; font-size: 12px; }
  .aff-sound-panel input, .aff-sound-panel .aff-beat { width: 120px; height: 44px; }
  .aff-sound-panel .aff-volume { accent-color: #ac92bc; }
  .aff-beat::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; }
  .aff-beat::-moz-range-thumb { width: 20px; height: 20px; }
  .kq-room, .mus-room, .voices-room { margin-top: var(--mobile-header); }
  .kq-room { min-height: calc(100svh - var(--mobile-header)); flex-direction: column; gap: 40px; padding: 62px 24px 38px; }
  .kq-piece { width: min(78vw, 420px); }
  .kq-artwork-detail { gap: 22px; }
  .kq-detail-image img { max-height: 56svh; }
  .kq-detail-description p { font-size: 16px; line-height: 1.75; }
  .mus-grid { grid-template-columns: 1fr; gap: 40px; }
  .mus-card { max-width: 480px; }
  .mus-card-label { line-height: 1.8; letter-spacing: .12em; }
  .mus-modal { padding: calc(60px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .mus-modal-stage { max-width: 100%; max-height: 70svh; }
  .voices-room { padding-top: 54px; }
  .voices-artwork { grid-template-columns: 1fr; }
  .voices-heading h1 { font-size: clamp(22px, 5.5vw, 32px); }
  .photo-main, .page-photo-archetypes .photo-main { padding-top: calc(var(--mobile-header) + 24px); }
  .photo-heading { padding: 12px var(--pad-x) 24px; }
  .photo-heading .page-title { font-size: clamp(32px, 8vw, 56px); }
  .page-photography:not(.page-photo-archetypes) .photo-blueprint { margin-top: var(--mobile-header); min-height: 650px; height: calc(100svh - var(--mobile-header)); }
  .mobile-photo-shortcuts { display: grid; position: absolute; z-index: 5; bottom: 18px; left: 18px; right: 18px; gap: 10px; }
  .mobile-photo-shortcuts a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 12px 16px; border: 1px solid #b7c5e047; border-radius: 15px; background: #0b172be8; color: #e7dbea; font: 14px/1.4 var(--sans-2); }
  .mobile-photo-shortcuts a::after { content: '↗'; }
  .page-photo-archetypes .photo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 0 var(--pad-x); }
  .page-photo-archetypes .photo-item:nth-of-type(n) { grid-column: 1; grid-row: auto; width: 100%; max-width: 520px; margin: 0 auto; transform: none; }
  .page-photo-archetypes .photo-item .photo-open img { max-width: 100%; }
  .page-photo-archetypes.is-photo-focused .photo-item.is-active { float: none; width: 100%; margin: 0 0 22px; transform: none; }
  .page-photo-archetypes .photo-item.is-active .photo-open img { transform: none; }
  .page-photo-archetypes .photo-item.is-active .photo-open { margin-bottom: 0; }
  .page-photo-archetypes .photo-story { padding: 0; }
  .page-photo-archetypes .photo-story-title { margin-left: 0; padding-top: 48px; }
  .photo-story-description { font-size: 22px; line-height: 1.6; }
  .photo-writing-quill { display: none; }
  .photo-grid figcaption { font-size: 14px; line-height: 1.5; padding: 12px 0; }
  dialog.photo-lightbox, dialog.archaeology-lightbox { max-width: 100vw; max-height: 100dvh; padding: calc(60px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
  .photo-lightbox img, .archaeology-lightbox img { max-width: 100%; max-height: 64svh; object-fit: contain; }
  .photo-lightbox-description { font-size: 16px; line-height: 1.7; }
  .domestic-gallery.is-slider { height: min(68svh, 600px); min-height: 380px; }
  .domestic-slider-arrow { width: 48px; height: 48px; }
  .boxes-main { overflow: clip; padding-top: calc(var(--mobile-header) + 40px); }
  .boxes-stage { width: 100%; max-width: 100%; }
  .box-button { min-width: 48px; min-height: 48px; }
  .installation-cow { left: -15%; width: clamp(180px, 54vw, 300px); }
  .inst-main { min-height: 100svh; }
  .inst-video-modal video { width: 100%; max-height: 75svh; }
  .workshop-gate { padding-top: calc(var(--mobile-header) + 40px); }
  .btn-peek, .btn-hide { min-height: 48px; padding: 12px 20px; }
  .gate-buttons { flex-direction: column; align-items: center; gap: 14px; width: 100%; }
  .gate-buttons .btn-peek, .gate-buttons .btn-no-peek {
    display: flex; align-items: center; justify-content: center;
    width: min(100%, 260px); height: 56px; min-height: 56px;
    margin: 0; padding: 14px 20px; border: 1px solid transparent;
    font: 500 13px/1.4 var(--sans); letter-spacing: .14em;
  }
  .gate-buttons .btn-no-peek { border-color: rgba(255, 200, 230, .45); }
  .studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sg-lightbox { padding: 60px 12px 88px; }
  .sg-caption { max-width: 100%; font-size: 14px; line-height: 1.6; }
  .sg-prev, .sg-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .sg-prev { left: calc(50% - 64px); }
  .sg-next { right: calc(50% - 64px); }
  .mobile-accordion { border-top: 1px solid var(--line); }
  .mobile-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; cursor: pointer; }
  .mobile-accordion > summary::after { content: '+'; font-size: 24px; line-height: 1; color: #887492; }
  .mobile-accordion[open] > summary::after { content: '−'; }
  .mobile-accordion > summary h2 { margin: 0; font-size: 17px; }
  .mobile-accordion-content { padding-bottom: 22px; }
  .cv-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cv-entries li, .cv-practice-list li, .cv-exhibition-link { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
  .cv-year { font-size: 12px; line-height: 1.7; }
  .cv-entries h3, .cv-entries h4, .cv-practice-list h3 { line-height: 1.55; }
  .cv-download { max-width: 100%; line-height: 1.6; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-card a { display: inline-flex; align-items: center; min-height: 48px; max-width: 100%; overflow-wrap: anywhere; }
  .archaeology-gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .studio-grid { grid-template-columns: 1fr; }
  .aff-painting { width: min(76vw, calc((100svh - 230px) * .9496)); }
  .site-header .logo-anim, .site-header .logo-anim .ltr { font-size: 15px; }
}
@media (max-width: 900px) and (max-height: 740px) {
  .aff-room:has(.mobile-sound-settings[open]) { padding-bottom: 120px; }
}
@media (max-width: 900px) and (orientation: landscape) and (max-height: 540px) {
  .aff-room { height: 520px; }
  .aff-painting { width: 300px; }
  .home-main { min-height: 600px; }
}
@media (hover: none) {
  .g-item figcaption { opacity: 1; }
  .mus-card:hover, .mus-card:hover .mus-card-img img { transform: none; }
  .photo-item { touch-action: pan-y pinch-zoom; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu[open] { animation: none; }
}
