html:has(#contents[open]) { overflow: hidden; }
html:has(#contents[open]) body { overflow: hidden; }
html { scrollbar-gutter: stable; }

#contents {
  position: fixed;
  inset: 0;
  margin: 0;
  border: 0;
  padding: 0;
  width: 100dvw;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #f4ede0;
  color: #322c25;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  opacity: 0;
  transition: opacity .28s, display .28s allow-discrete, overlay .28s allow-discrete;
}
#contents[open] { opacity: 1; }
#contents:not([open]) { pointer-events: none; }
#contents::backdrop { background: transparent; }
@starting-style { #contents[open] { opacity: 0; } }

#contents[open] .menu-inner { animation: contents-settle .36s cubic-bezier(.2,.7,.2,1) both; }
@keyframes contents-settle {
  from { transform: translateY(12px); }
  to { transform: none; }
}

.nav-trigger, #contents button, #contents a { -webkit-tap-highlight-color: transparent; }
.nav-trigger, #contents button { cursor: pointer; }
.nav-trigger:focus-visible, #contents :is(a,button):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.nav-trigger:focus-visible { outline-offset: -2px; }
body:has(.case-orbit[data-open="true"]) .nav-trigger { visibility: hidden; }
#contents .tile { color: inherit; text-decoration: none; }

#contents .miniature { position:relative; background:var(--bg); color:var(--ink); overflow:hidden; font-size:clamp(12px,1.65vw,26px); isolation:isolate }
#contents .miniature-copy { position:absolute; z-index:2; left:8%; top:24%; width:57%; font-size:1em; line-height:1.22; letter-spacing:-.04em }
#contents .miniature-copy small { display:block; font-size:.48em; letter-spacing:0; line-height:1.6 }
#contents .miniature-portrait { position:absolute; bottom:0; right:0; width:53%; height:98%; object-fit:contain; object-position:bottom right; z-index:1 }
#contents .glyph { display:inline-block; vertical-align:middle; background:var(--accent); mask-image:var(--glyph); mask-size:contain; mask-position:center; mask-repeat:no-repeat; -webkit-mask-image:var(--glyph); -webkit-mask-size:contain; -webkit-mask-position:center; -webkit-mask-repeat:no-repeat; width:2.8em; height:1.25em }
#contents .art-1 .miniature-copy { top:18%; width:66%; font-size:.88em }
#contents .art-1 .glyph { width:1.9em; height:1em }
#contents .art-1 .miniature-portrait { right:-2%; width:57%; height:97% }
#contents .art-2 .miniature-portrait { left:0; right:auto; width:52%; height:91%; object-position:left bottom }
#contents .art-2 .miniature-copy { left:48%; width:49%; top:8% }
#contents .twenty { font:400 3.25em/.87 Georgia,serif; letter-spacing:-.09em; color:var(--accent) }
#contents .art-2 small { margin-top:.35em }
#contents .art-3 .miniature-copy { top:15%; width:85%; left:9%; z-index:2 }
#contents .degree { font:400 2.45em/1 Georgia,serif; letter-spacing:-.07em; color:var(--accent) }
#contents .ring { position:absolute; right:2%; top:2%; height:96%; width:auto; aspect-ratio:1; color:var(--accent); opacity:.6 }
#contents .art-4 .miniature-copy { width:76%; top:13%; left:9% }
#contents .wordmark { font:400 1.65em/.9 Georgia,serif; letter-spacing:-.09em }
#contents .art-4 .glyph { width:2.2em; height:.98em }
#contents .art-4 .studio-rule { position:absolute; top:12%; bottom:12%; right:13%; width:1px; background:var(--ink); opacity:.4 }
#contents .art-4 .studio-rule:after { content:"U"; position:absolute; top:14%; left:-.45em; font:400 4em Georgia; color:var(--ink); opacity:.18 }
#contents .art-5 .miniature-copy { width:45%; left:7%; top:20% }
#contents .art-5 .glyph { width:3.1em; height:1.2em }
#contents .work-pics { position:absolute; right:4%; width:45%; top:8%; height:84%; display:grid; grid-template-rows:1fr 1fr; gap:4px }
#contents .work-pics img { width:100%; height:100%; min-height:0; object-fit:cover }
#contents .art-6 .miniature-copy { top:24%; width:58% }
#contents .art-6 .glyph { display:block; width:3.1em; height:1.3em }
#contents .art-6 .miniature-portrait { width:53%; height:99% }
#contents .art-7 .miniature-portrait { left:0; right:auto; object-position:bottom left; width:48% }
#contents .art-7 .miniature-copy { left:48%; top:25%; width:49% }
#contents .art-7 .glyph { display:block; width:3.1em; height:1.35em }
#contents .art-8 .miniature-copy { top:23%; left:28%; width:50%; text-align:center }
#contents .art-8 .glyph { width:2.7em; height:1.25em }
#contents .art-8 .bubble { width:43%; height:86%; right:-2%; z-index:1 }
#contents .art-8 .cat { width:39%; height:82%; left:-3%; object-position:bottom left; z-index:1 }
#contents .art-9 .miniature-copy { top:18%; width:55% }
#contents .art-9 .glyph { width:2.2em; height:1.5em; background:var(--ink) }
#contents .art-9 .miniature-portrait { width:57%; height:100% }
#contents .art-9 small { margin-left:1.5em }
.nav-trigger {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  right: max(18px, env(safe-area-inset-right));
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-height: 44px;
  padding: 1px 10px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--nav-ink, #292522);
  font: 12px/21px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .16em;
  transition: background .2s;
}
.nav-trigger:hover { background:color-mix(in srgb,currentColor 8%,transparent) }
.nav-trigger svg { width:21px; height:21px; flex:none }
.nav-trigger span { margin-top: 4px; line-height: 1; white-space: nowrap; }
#contents .menu-inner { max-width:1360px; margin:auto; min-height:100%; padding:clamp(16px,3vh,32px) clamp(20px,5vw,76px) 20px; display:flex; flex-direction:column; justify-content:center }
#contents .menu-head { display:flex; justify-content:space-between; align-items:center; gap:20px; border-bottom:1px solid #c5b6a4; padding-bottom:12px; margin-bottom:16px }
#contents .menu-head h2 { font:400 clamp(30px,4vw,58px)/.95 Georgia,"Noto Serif CJK SC",serif; letter-spacing:-.055em; margin:0 }
#contents .menu-head h2 span { font:500 .5em/1.1 "Noto Serif CJK SC","Songti SC",serif; letter-spacing:.12em; display:inline-block; margin-left:.7em }
#contents .menu-kicker { font:10px/1.4 Georgia,serif; letter-spacing:.22em; color:#826e59; margin:0 0 7px }
#contents .close { display:flex; align-items:center; gap:10px; border:0; background:none; color:#322c25; padding:8px; min-height:44px; font:12px sans-serif; letter-spacing:.1em }
#contents .close svg { width:24px; height:24px }
#contents .tiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 20px }
#contents .tile { display:block; min-width:0; position:relative; transition:transform .23s; outline-offset:3px }
#contents .tile-art { height:clamp(94px,17vh,174px); overflow:hidden; box-shadow:0 0 0 1px #33292112; transition:box-shadow .2s }
#contents .tile-art>.miniature { width:100%; height:100%; transition:transform .28s; container-type:inline-size; font-size:clamp(16px,min(2.05vw,3.4svh),29px) }
#contents .tile-caption { display:flex; gap:8px; align-items:center; padding:7px 0 2px; min-height:30px; font:14px/1.2 "Noto Sans CJK SC","Microsoft YaHei",sans-serif }
#contents .tile-caption strong { font-weight:500 }
#contents .current-label { font-size:10px; color:#8e543a; visibility:hidden; margin-left:auto }
#contents .tile-arrow { font:16px Georgia,serif; color:#8d765f; margin-left:auto }
#contents .tile[aria-current="location"] .current-label { visibility:visible }
#contents .tile[aria-current="location"] .tile-arrow { margin-left:0; color:#8e543a }
#contents .tile[aria-current="location"] .tile-art { box-shadow:0 0 0 2px #98623d }
#contents .menu-foot { display:flex; justify-content:space-between; gap:16px; border-top:1px solid #c5b6a4; margin-top:15px; padding-top:10px; font:11px/1.5 "Noto Sans CJK SC",sans-serif; color:#786d60 }
#contents .menu-foot span:first-child { font:14px Georgia,serif; letter-spacing:.1em }
#contents[open] .tile { animation: contents-tile-in .32s both; animation-delay: calc(var(--i, 0) * 22ms); }

@keyframes contents-tile-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #contents .tile:hover .miniature { transform: scale(1.025); }
}

@media (max-width: 1100px) {
  .nav-trigger { right: max(6px, env(safe-area-inset-right)); }
}

@media (min-width: 768px) and (max-height: 570px) {
  #contents .menu-inner { justify-content: flex-start; }
  #contents .menu-head { position: sticky; top: 0; background: #f4ede0; z-index: 4; }
}

@media (max-width: 767px) {
  #contents .menu-inner {
    justify-content: flex-start;
    padding: 20px max(17px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(17px, env(safe-area-inset-left));
    padding-top: max(20px, env(safe-area-inset-top));
  }
  #contents .menu-head { margin-bottom:14px; position:sticky; top:env(safe-area-inset-top,0px); background:#f4ede0; z-index:4; padding-top:12px }
  #contents .menu-head h2 { font-size:34px }
  #contents .menu-head h2 span { font-size:18px; margin-left:8px }
  #contents .menu-kicker { font-size:9px }
  #contents .close { gap:4px }
  #contents .close .close-label { display:none }
  #contents .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 12px }
  #contents .tile-art { height:auto; aspect-ratio:1.55 }
  #contents .tile-art>.miniature { font-size:clamp(12px,4.3vw,27px) }
  #contents .tile-caption { font-size:12px; gap:5px; min-height:27px; padding-top:6px }
  #contents .current-label { font-size:9px }
  #contents .tile-arrow { font-size:13px }
  #contents .menu-foot { font-size:10px; flex-direction:column; gap:4px }
  .nav-trigger { right: max(8px, env(safe-area-inset-right)); padding-inline: 8px; }
  #contents .tile .art-1 .miniature-copy { font-size:.72em; width:68%; left:5%; top:26% }
  #contents .tile .art-1 .miniature-portrait { width:48%; right:-2% }
  #contents .tile .art-2 .miniature-copy { left:54%; width:44%; top:12% }
  #contents .tile .art-2 .miniature-portrait { width:47% }
  #contents .tile .art-2 .twenty { font-size:2.65em }
  #contents .tile .art-2 small { font-size:.42em }
  #contents .tile .ring { height:76%; right:-9%; top:12%; opacity:.45 }
  #contents .tile:last-child { grid-column:1/-1 }
  #contents .tile:last-child .tile-art { aspect-ratio:2.8 }
  #contents .tile:last-child .tile-art>.miniature { font-size:clamp(20px,7vw,40px) }
}

@media (prefers-reduced-motion: reduce) {
  #contents, #contents *, .nav-trigger { animation: none !important; transition: none !important; }
}
