:root {
  color-scheme: dark;
  --night: #18243d;
  --slate: #34496b;
  --indigo: #8496b8;
  --ice: #c4d7e8;
  --moon: #f1efe7;
  --line: #687b9c;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Noto Serif JP", Georgia, serif;
  background: #141f34;
  color: var(--moon);
  font-family: var(--serif);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 400; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
main:focus { outline: none; }
.skip { position: fixed; z-index: 5; top: 8px; left: 8px; transform: translateY(-160%); background: var(--night); padding: 10px; }
.skip:focus { transform: none; }
.archive {
  max-width: 1440px; min-height: calc(100svh - 16px); margin: 8px auto;
  position: relative; display: flex; flex-direction: column;
  width: calc(100% - 16px); border: 1px solid var(--line);
  box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px #536483;
  background: var(--night);
}
.archive::before, .archive::after {
  content: '◇'; position: absolute; z-index: 2; pointer-events: none;
  width: 16px; height: 16px; border: 1px solid var(--indigo);
  color: var(--ice); font-size: 12px; line-height: 14px; text-align: center;
}
.archive::before { top: 4px; left: 4px; }
.archive::after { bottom: 4px; right: 4px; }
.topbar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  column-gap: 24px; padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: #192740;
}
.brand { font-size: .75rem; letter-spacing: .26em; color: var(--ice); padding: 5px 0; }
.brand span { color: var(--moon); margin-right: 4px; }
.topbar nav { display: flex; justify-content: center; gap: 2px; }
.topbar nav a { min-height: 44px; display: grid; place-items: center; padding: 0 10px; font-size: .9rem; letter-spacing: .06em; transition: background .25s; }
.topbar nav a:hover, .topbar nav a[aria-current] { background: #34496b; }
main { flex: 1; }
main > section { animation: appear .32s ease both; }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: center; background: #1d2e4c;
  border-bottom: 1px solid var(--indigo);
}
.hero::before {
  position: absolute; content: ''; pointer-events: none; inset: 19px 5% 83px;
  border: 1px solid #536b91; border-bottom: 0; border-radius: 50% 50% 0 0 / 62% 62% 0 0;
}
.hero-window {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 70px; height: 68%;
  background: url("assets/decor/archive-window.webp") center 72% / cover no-repeat;
  mask-image: linear-gradient(transparent 1%, #000 61%, #000 88%, transparent);
  opacity: .24;
}
.hero-heading { position: relative; text-align: center; padding: 24px 12px 0; }
.logo-mark { display: block; width: 76px; height: 42px; margin: 0 auto 3px; color: #e9dfce; }
.hero h1 { font-size: clamp(2.25rem, 8vw, 4.65rem); letter-spacing: .18em; padding-left: .18em; line-height: 1.35; }
.wordmark {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  margin: 12px auto 0; font-size: .68rem; letter-spacing: .4em; color: var(--ice);
}
.wordmark::before, .wordmark::after,
.ornament::before, .ornament::after, footer > span {
  content: ''; height: 1px; background: var(--line); width: clamp(20px, 9vw, 102px);
}
.hero-heading p { margin: 16px 0 6px; letter-spacing: .14em; font-size: clamp(.9rem, 3.4vw, 1.16rem); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 13px auto; color: var(--indigo); font-size: .66rem; }
.ornament b { color: var(--ice); font-size: .9rem; font-weight: 400; }
.constellation { position: absolute; color: var(--ice); font-size: 1.35rem; pointer-events: none; }
.constellation.left { left: 9%; top: 26%; }
.constellation.right { right: 11%; top: 37%; }
.showcase { width: 100%; text-align: center; position: relative; }
.stage-prop { position: absolute; z-index: 1; pointer-events: none; bottom: 78px; }
.stage-prop.books { left: 3%; width: min(23%, 167px); }
.stage-prop.lantern { right: 4%; width: min(12%, 94px); }
.exhibit {
  height: clamp(215px, 64vw, 415px); display: flex; align-items: end; justify-content: center;
  margin: 0 auto; width: min(92%, 620px);
}
.exhibit-link { display: flex; align-items: end; justify-content: center; width: 100%; height: 100%; animation: appear .38s ease both; }
.glass { display: block; position: relative; width: min(100%, 225px); margin: 0 auto; }
.glass .scene { width: 100%; height: auto; }
.exhibit .glass { width: min(78%, 460px, calc(clamp(215px, 64vw, 415px) * 1.18)); }
.exhibit .glass:not(.display-glass) { width: min(73%, 420px, calc(clamp(215px, 64vw, 415px) * 1.14)); }
.layered { aspect-ratio: 160 / 150; }
.layered .scene { position: absolute; width: 72%; height: 76%; object-fit: contain; left: 14%; bottom: 13%; }
.layered .vessel { position: absolute; inset: 0; width: 100%; }
.exhibit-meta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 49px; border-top: 1px solid var(--line); background: #1a2944;
}
.exhibit-caption { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: clamp(.78rem, 3.1vw, 1rem); }
.exhibit-caption:hover { color: var(--ice); }
.specimen { color: var(--ice); font-size: .72rem; letter-spacing: .12em; }
.arrow { min-width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.6rem; color: var(--ice); }
.arrow:hover { background: var(--slate); }
.selectors { background: #1a2944; display: flex; justify-content: center; padding-bottom: 3px; }
.selectors button { width: 33px; height: 30px; border: 0; background: transparent; display: grid; place-items: center; }
.selectors button::after { content: ''; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--indigo); }
.selectors button:hover::after, .selectors button[aria-pressed="true"]::after { background: var(--moon); border-color: var(--moon); }
.home-works, .inner { padding: 30px 15px; text-align: center; }
.home-works { background: #1c2c48; }
.plaque, .outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 22px;
  border: 1px solid var(--indigo); box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px #63799d;
  background: #263955; padding: 8px 20px; min-height: 44px; letter-spacing: .09em;
}
.plaque { min-width: 148px; font-size: 1.42rem; }
.plaque::before, .plaque::after { content: '✧'; color: var(--ice); font-size: .74rem; }
.outline { transition: background .25s; max-width: 100%; }
.outline:hover { background: var(--slate); }
.catalog { list-style: none; padding: 0; margin: 27px auto; max-width: 900px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.catalog-card { display: grid; justify-items: center; align-content: start; gap: 5px; height: 100%; padding: 5px 2px 9px; border-bottom: 1px solid #526787; transition: background .25s, border-color .25s; }
.catalog-card:hover { background: #283c5c; border-color: var(--ice); }
.catalog-card .glass { aspect-ratio: 1.25; display: grid; align-items: end; margin-bottom: 4px; }
.catalog-card .scene { max-height: 100%; object-fit: contain; }
.work-title { font-size: clamp(.84rem, 2.9vw, 1rem); }
.categories { color: var(--ice); font-size: .75rem; letter-spacing: .09em; }
.inner { max-width: 1100px; margin: 0 auto; min-height: 540px; }
.inner h1 { font-size: clamp(1.65rem, 5vw, 2.5rem); letter-spacing: .12em; }
.eyebrow { color: var(--ice); letter-spacing: .25em; font-size: .72rem; margin-bottom: 12px; }
.filters { display: inline-flex; border: 1px solid var(--line); border-radius: 22px; max-width: 100%; margin-top: 12px; }
.filters a { padding: 9px clamp(6px, 2vw, 20px); min-height: 42px; display: grid; place-items: center; border-radius: 22px; font-size: clamp(.75rem, 3vw, .95rem); }
.filters a[aria-current] { background: var(--ice); color: var(--night); }
.filters a:hover:not([aria-current]) { background: var(--slate); }
.detail { text-align: left; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ice); }
.detail-grid, .information-grid { display: grid; align-items: center; gap: 25px; margin: 20px auto; }
.detail-art .glass { width: min(100%, 400px); }
.record > .specimen { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 10px 0; padding: 0; }
.tags li { border: 1px solid var(--line); padding: 3px 9px; font-size: .78rem; }
.record-section { margin: 17px 0; }
.record-section h2, .screenshots h2 { font-size: .9rem; color: var(--ice); letter-spacing: .1em; margin-bottom: 7px; }
.record p, .information p { line-height: 1.95; }
.record dl div { display: grid; grid-template-columns: 6em 1fr; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.record dt { color: var(--ice); }
.record dd { margin: 0; }
.screenshots img { margin-bottom: 14px; }
.information-grid { max-width: 840px; text-align: left; }
.information-grid > img { width: 100%; border: 1px solid var(--line); }
.information h2 { margin-top: 14px; }
.information .outline { display: flex; width: fit-content; margin-top: 10px; }
footer { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 58px; border-top: 1px solid var(--line); letter-spacing: .09em; }
footer small { font-size: .78rem; }
.effects {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  clip-path: polygon(49% 10%,62% 13%,76% 21%,86% 34%,89% 49%,89% 85%,83% 90%,16% 90%,10% 85%,10% 49%,15% 34%,24% 21%,38% 13%);
}
.effects.wide { clip-path: polygon(50% 7%,69% 12%,80% 21%,96% 42%,96% 72%,91% 81%,83% 86%,14% 86%,5% 78%,3% 70%,3% 43%,20% 23%,32% 12%); }
.effects i { position: absolute; animation-play-state: paused; }
.in-view .effects i { animation-play-state: running; }
.hidden-tab .effects i { animation-play-state: paused; }
.star {
  width: 12px; height: 12px; background: #f1efe7;
  clip-path: polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);
  animation: twinkle 6s ease-in-out infinite both;
}
.star.first { top: 31%; left: 30%; }
.star.second { top: 42%; right: 22%; animation-delay: -3s; }
.bubble { width: 8px; height: 8px; border: 1px solid var(--ice); border-radius: 50%; bottom: 25%; animation: drift 9s ease-in-out infinite both; }
.bubble.first { left: 19%; }
.bubble.second { right: 21%; width: 5px; height: 5px; animation-delay: -5s; }
.ripple { left: 30%; top: 23%; width: 40%; height: 4%; border: 1px solid #c4d7e8aa; border-radius: 50%; animation: ripple 7s ease-out infinite both; }
.glint { top: 39%; right: 11%; width: 2px; height: 16%; background: #c4d7e87a; transform: rotate(12deg); animation: glint 11s ease-in-out infinite both; }
.meteor { top: 31%; left: 66%; width: 8%; height: 1px; background: var(--ice); animation: meteor 10s ease-out infinite both; }
.mist { bottom: 15%; left: 7%; width: 42%; height: 9%; border-radius: 50%; background: #aac3cf; filter: blur(10px); animation: mist 12s ease-in-out infinite alternate both; }
.window { top: 42%; left: 28%; width: 14%; height: 16%; background: #f1e6ce; filter: blur(11px); animation: light 9s ease-in-out infinite both; }
.scene-effect.crystal { left: 48%; top: 48%; width: 9%; height: 15%; background: #b6c7fe; filter: blur(10px); animation: light 7s ease-in-out infinite both; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes twinkle { 0%, 35%, 100% { opacity: .12; transform: scale(.55); } 57% { opacity: .74; transform: scale(1.1); } }
@keyframes drift { 0%, 14% { opacity: 0; transform: translate(0, 0); } 38% { opacity: .52; } 83%, 100% { opacity: 0; transform: translate(8px, -65px); } }
@keyframes ripple { 0%, 27% { opacity: 0; transform: scale(.5); } 40% { opacity: .52; } 86%, 100% { opacity: 0; transform: scale(1.35); } }
@keyframes glint { 0%, 35%, 75%, 100% { opacity: 0; } 52% { opacity: .55; } }
@keyframes meteor { 0%, 79% { opacity: 0; transform: translate(24px, -16px) rotate(-28deg) scaleX(.2); } 84% { opacity: .65; } 93%, 100% { opacity: 0; transform: translate(-50px, 24px) rotate(-28deg) scaleX(1); } }
@keyframes mist { from { opacity: .05; transform: translateX(0); } to { opacity: .22; transform: translateX(100%); } }
@keyframes light { 0%, 100% { opacity: .06; } 50% { opacity: .36; } }
@media (min-width: 680px) {
  .archive { width: calc(100% - 36px); margin: 14px auto; min-height: calc(100svh - 28px); }
  .topbar { justify-content: space-between; padding: 5px clamp(25px, 6vw, 86px); }
  .topbar nav { gap: 8px; }
  .topbar nav a { padding: 0 17px; }
  .hero-heading { padding-top: 26px; }
  .logo-mark { width: 92px; height: 49px; }
  .hero::before { inset-inline: 12%; }
  .hero-window { left: 10%; right: 10%; mask-image: radial-gradient(ellipse at 50% 69%, #000 17%, transparent 72%); }
  .constellation.left { left: 21%; }
  .constellation.right { right: 24%; }
  .stage-prop.books { left: max(9%, calc(50% - 398px)); }
  .stage-prop.lantern { right: max(9%, calc(50% - 376px)); }
  .home-works, .inner { padding: 36px clamp(25px, 5vw, 65px); }
  .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-inline: 12px; }
  .home-catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
  .detail-grid, .information-grid { grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 72px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .effects { display: none; }
}
