/* SOJEI個人線上展 — 展覽圖錄
   白展牆＋冷灰展台＋墨黑字＋群青。思源明體標題、思源黑體內文。 */

:root {
  --wall: #ffffff;
  --plinth: #f3f4f5;
  --plinth-2: #e8eaec;
  --plinth-3: #dfe2e5;
  --ink: #121212;
  --ink-2: #474747;
  --ink-3: #6b6b6b;
  --rule: #d6d8db;
  --gunjo: #2340b8;
  --gunjo-deep: #1a3192;
  --gunjo-tint: #eaeefa;

  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: clamp(16px, 4.2vw, 64px);
  --maxw: 1440px;
  --bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 8px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #b9bcc0 transparent;
  scrollbar-width: thin;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 16px/1.85 var(--sans);
  letter-spacing: 0.02em;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gunjo);
}

::selection { background: var(--gunjo); color: #fff; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gunjo); outline-offset: 3px; }

h1, h2, h3, .ex-fields, .room-name, .floor-name, .label-title, .exit-thanks { word-break: keep-all; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.unit { display: inline-block; }
.ww { word-break: keep-all; overflow-wrap: anywhere; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; text-decoration: none;
}
.skip:focus { top: 8px; }

/* 待填：使用者還沒提供的資料 */
.tbd {
  color: var(--ink-3);
  text-decoration: underline dotted 1px;
  text-underline-offset: 0.3em;
}

/* ───────── 頂部導覽列 ───────── */
.bar {
  position: sticky; top: 0; z-index: 30;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: var(--wall);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.bar.is-scrolled { border-bottom-color: var(--rule); }

.bar-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.bar-name { font: 600 19px/1 var(--serif); letter-spacing: 0.08em; }
.bar-sub { font-size: 13px; letter-spacing: 0.16em; color: var(--ink-2); }

.bar-where { display: flex; align-items: baseline; gap: 10px; font-size: 13px; white-space: nowrap; }
.bar-where-label { color: var(--ink-3); letter-spacing: 0.12em; }
.bar-where-name { font-weight: 500; }

.strip { position: relative; }
.strip-list { position: relative; z-index: 1; display: flex; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ink); }
.strip-list li + li { border-left: 1px solid var(--rule); }
.strip-list a {
  display: grid; place-items: center;
  min-width: 34px; height: 30px; padding: 0 8px;
  font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
  text-decoration: none; color: var(--ink-2);
  transition: color 200ms ease;
}
.strip-list a[aria-current="location"] { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .strip-list a:not([aria-current="location"]):hover { color: var(--gunjo); background: var(--gunjo-tint); }
}
.strip-mark {
  position: absolute; z-index: 0; top: 1px; left: 0; height: 30px; width: 34px;
  background: var(--gunjo);
  opacity: 0;
  transform: translateX(var(--mark-x, 0px));
  transition: transform 420ms var(--ease-out), width 420ms var(--ease-out), opacity 200ms ease;
}
.strip.has-mark .strip-mark { opacity: 1; }

.bar-map {
  display: none; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--ink); background: var(--wall);
  font-size: 13px; letter-spacing: 0.08em; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.bar-map:active { transform: scale(0.97); }

/* ───────── 按鈕 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 30px;
  font: 500 15px/1 var(--sans); letter-spacing: 0.14em;
  text-decoration: none; border: 1px solid var(--ink); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gunjo); border-color: var(--gunjo); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--gunjo-deep); border-color: var(--gunjo-deep); }
  .btn-line:hover { background: var(--ink); color: #fff; }
}
.btn[aria-disabled="true"] { border-color: var(--rule); color: var(--ink-3); background: transparent; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }

/* ───────── 入口：展覽主視覺 ───────── */
.entrance {
  max-width: var(--maxw); margin: 0 auto;
  min-height: calc(100svh - var(--bar-h));
  padding: clamp(28px, 6vh, 72px) var(--gutter) clamp(40px, 7vh, 88px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 40px);
  align-items: center;
}
.entrance-text { grid-column: 1 / span 5; }
.kv { grid-column: 6 / span 7; }

.ex-title { margin: 0; font-family: var(--serif); font-weight: 600; }
.ex-latin {
  display: block;
  font-size: clamp(3.6rem, 8.6vw, 8.4rem); line-height: 0.92;
  letter-spacing: 0.02em; margin-left: -0.04em;
}
.ex-zh {
  display: block; margin-top: 0.42em;
  font-size: clamp(1.9rem, 3.3vw, 3.15rem); line-height: 1.2;
  letter-spacing: 0.2em;
}
.ex-fields {
  margin: clamp(20px, 3.4vh, 32px) 0 0;
  max-width: 30em;
  font-size: 15.5px; line-height: 2; color: var(--ink-2);
}
.ex-fields .sep { color: var(--ink-3); margin: 0 0.4em; }

.ex-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(24px, 4vh, 40px) 0 0; padding: 0;
  border-top: 1px solid var(--ink);
}
.ex-facts div { padding: 12px 0 0; }
.ex-facts div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.ex-facts dt { font-size: 12.5px; letter-spacing: 0.14em; color: var(--ink-3); }
.ex-facts dd { margin: 2px 0 0; font: 500 clamp(1.3rem, 2vw, 1.7rem)/1.3 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-facts dd small { font: 400 13px var(--sans); margin-left: 3px; color: var(--ink-2); }

.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(24px, 4vh, 40px); }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 15px/1 var(--sans); letter-spacing: 0.14em; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.5em;
  transition: color 200ms ease, text-underline-offset 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .text-link:hover { color: var(--gunjo); text-underline-offset: 0.62em; } }

/* 主視覺輪播：每張是一面展牆＋說明牌 */
.kv-stage { position: relative; aspect-ratio: 6 / 5; }
.kv .slide {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0; visibility: hidden;
  transition: opacity 900ms var(--ease-out), visibility 0s linear 900ms;
}
.kv .slide.is-on { opacity: 1; visibility: visible; transition: opacity 900ms var(--ease-out), visibility 0s; }
.kv .slide-wall {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 6.5% 9%;
  background: var(--plinth);
  border: 0; cursor: pointer; width: 100%;
}
.kv .slide-wall.is-cover { padding: 0; }
.kv .slide-wall img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  box-shadow: 0 22px 40px -24px rgba(18, 18, 18, 0.45), 0 2px 6px rgba(18, 18, 18, 0.08);
  transform: scale(1.015);
  filter: blur(3px);
  transition: transform 1400ms var(--ease-out), filter 900ms var(--ease-out);
}
.kv .slide-wall.is-cover img { width: 100%; height: 100%; max-height: none; object-fit: cover; box-shadow: none; }
.kv .slide.is-on .slide-wall img { transform: scale(1); filter: blur(0); }
.kv .slide-label { margin-top: 16px; }
@media (min-width: 1024px) { .kv .slide-label { justify-self: end; width: min(100%, 380px); } }

.kv-controls { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.kv-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--rule); cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease, color 200ms ease;
}
.kv-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .kv-btn:hover { border-color: var(--ink); color: var(--gunjo); } }
.kv-progress { display: flex; gap: 6px; flex: 1; margin: 0; padding: 0; list-style: none; }
.kv-progress li { flex: 1; max-width: 64px; }
.kv-progress button {
  display: block; width: 100%; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.kv-progress button::before, .kv-progress button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--rule);
}
.kv-progress button::after { background: var(--ink); transform: scaleX(0); transform-origin: left; }
.kv-progress button[aria-current="true"]::after { transform: scaleX(1); }
.kv.is-playing .kv-progress button[aria-current="true"]::after { animation: kvfill var(--kv-dur, 6s) linear both; }
.kv.is-paused .kv-progress button[aria-current="true"]::after { animation-play-state: paused; }
@keyframes kvfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ───────── 作品說明牌（共用）：編號欄＋細線表格 ───────── */
.label {
  display: grid; grid-template-columns: 2.2em minmax(0, 1fr); column-gap: 12px; align-items: baseline;
  padding-top: 12px; border-top: 1px solid var(--ink);
}
.label-no { font: 500 1rem/1.5 var(--serif); color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.label-body { min-width: 0; }
.label-title { display: block; margin: 0; font: 600 clamp(1.08rem, 1.4vw, 1.25rem)/1.5 var(--serif); letter-spacing: 0.06em; }
.label-meta { margin: 8px 0 0; padding: 0; font-size: 13px; line-height: 1.6; }
.label-meta div { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px; padding: 5px 0; border-top: 1px solid var(--rule); }
.label-meta dt { color: var(--ink-3); }
.label-meta dd { margin: 0; color: var(--ink-2); word-break: keep-all; overflow-wrap: anywhere; }
.viewer-facts dd { word-break: keep-all; overflow-wrap: anywhere; }

/* ───────── 段落標題（共用） ───────── */
.sec-title { margin: 0; font: 600 clamp(1.9rem, 3.2vw, 2.8rem)/1.2 var(--serif); letter-spacing: 0.14em; }
.sec-note { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }

/* ───────── 館內配置圖 ───────── */
.plan {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 10vh, 120px) var(--gutter) clamp(56px, 8vh, 96px);
}
.plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 32px; }
.floor {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink);
  position: relative;
}
.floor-cell {
  position: relative; display: flex; flex-direction: column;
  min-height: 210px; padding: 20px 22px 22px;
  text-decoration: none;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  transition: background-color 200ms ease;
}
.floor-cell:nth-of-type(3n) { border-right: 0; }
.floor-cell:nth-last-of-type(-n+3) { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .floor-cell:hover { background: var(--gunjo-tint); } }
.floor-cell:active .floor-name { transform: translateX(2px); }
.floor-top { display: flex; align-items: baseline; gap: 14px; }
.floor-no { font: 500 2.6rem/1 var(--serif); color: var(--gunjo); font-variant-numeric: tabular-nums; min-width: 1.1em; }
.floor-name { font: 600 1.3rem/1.35 var(--serif); letter-spacing: 0.1em; transition: transform 160ms var(--ease-out); }
.floor-count { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); letter-spacing: 0.08em; }
.floor-works { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.floor-works li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-cell.is-author { background: var(--plinth); }
.floor-cell.is-exit { background: var(--gunjo); color: #fff; }
.floor-cell.is-exit .floor-no, .floor-cell.is-exit .floor-count { color: rgba(255, 255, 255, 0.82); }
@media (hover: hover) and (pointer: fine) {
  .floor-cell.is-author:hover { background: var(--plinth-2); }
  .floor-cell.is-exit:hover { background: var(--gunjo-deep); }
}
.floor-entry {
  position: absolute; left: 22px; bottom: -2px; transform: translateY(100%);
  display: flex; align-items: center; gap: 8px; padding-top: 10px;
  font-size: 12.5px; letter-spacing: 0.16em; color: var(--ink-2);
}
.floor-entry::before { content: ""; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--ink); }

/* ───────── 展間 ───────── */
.room { padding: clamp(72px, 11vh, 132px) 0 clamp(80px, 13vh, 150px); }
.room:nth-of-type(even) { background: var(--plinth); }
.room-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.room-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: clamp(16px, 2.4vw, 36px);
  padding-bottom: 24px; margin-bottom: clamp(40px, 7vh, 72px);
  border-bottom: 1px solid var(--ink);
}
.room-no { font: 500 clamp(4.6rem, 9vw, 8rem)/0.78 var(--serif); color: var(--gunjo); font-variant-numeric: tabular-nums; }
.room-name { margin: 0; font: 600 clamp(1.9rem, 3.4vw, 3rem)/1.2 var(--serif); letter-spacing: 0.14em; }
.room-meta { margin: 8px 0 0; font-size: 13.5px; letter-spacing: 0.12em; color: var(--ink-3); }

.hang {
  --hang-gap: clamp(20px, 2.6vw, 40px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--hang-gap); row-gap: clamp(56px, 9vh, 96px);
  align-items: start;
}
.work { margin: 0; grid-column: span var(--span, 4); }
/* 奇數展間最後一件：作品掛左邊，說明牌放右邊空牆 */
@media (min-width: 1024px) {
  .work.is-tail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--hang-gap); align-items: end; }
  .work.is-tail .work-media { grid-column: 1 / span 5; }
  .work.is-tail .label { grid-column: 7 / span 4; margin-top: 0; }
}
.work.is-drop { margin-top: clamp(0px, 9vh, 96px); }
.work-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: var(--ratio, 4 / 3); max-height: min(78vh, 800px);
  background: var(--plinth); cursor: pointer; overflow: hidden;
}
.room:nth-of-type(even) .work-media { background: var(--wall); }
.work-media.is-contain { display: flex; align-items: center; justify-content: center; padding: 7%; }
.work-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms var(--ease-out);
}
.work-media.is-contain img {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 18px 34px -22px rgba(18, 18, 18, 0.45), 0 2px 6px rgba(18, 18, 18, 0.07);
}
@media (hover: hover) and (pointer: fine) {
  .work-media:hover img { transform: scale(1.025); }
}
.work-media:active { transform: scale(0.99); transition: transform 160ms var(--ease-out); }
.play {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .work-media:hover .play { transform: scale(1.06); } }
.work .label { margin-top: 18px; }
.work.is-empty .work-media { cursor: default; }
.room.is-empty-room { padding-bottom: clamp(56px, 8vh, 96px); }
.room.is-empty-room .room-head { margin-bottom: 24px; }
.room-empty {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin: 0;
  padding: 18px 22px; background: var(--plinth); border: 1px solid var(--rule);
  font-size: 14px; color: var(--ink-2); word-break: keep-all; overflow-wrap: anywhere;
}
.room:nth-of-type(even) .room-empty { background: var(--wall); }
.room-empty-title { font: 600 15px/1.5 var(--serif); letter-spacing: 0.12em; color: var(--ink); }
.work-tag {
  position: absolute; left: 12px; top: 12px;
  padding: 2px 8px; font-size: 12px; letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.92); color: var(--ink-2);
}

/* 照片待補的示意色塊 */
.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; text-align: center;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--rule) calc(50% - 0.5px), var(--rule) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    var(--plinth-2);
  color: var(--ink-2);
}
.room:nth-of-type(even) .ph { background-color: var(--plinth-3); }
.ph-title { font: 600 15px/1.5 var(--serif); letter-spacing: 0.12em; padding: 2px 10px; background: var(--plinth-2); }
.room:nth-of-type(even) .ph-title { background: var(--plinth-3); }
.ph-need { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); max-width: 22em; background: var(--plinth-2); padding: 0 8px; word-break: keep-all; overflow-wrap: anywhere; }
.room:nth-of-type(even) .ph-need { background: var(--plinth-3); }

/* ───────── 作者年表 ───────── */
.author { padding: clamp(80px, 13vh, 150px) 0; }
.author-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 40px);
  align-items: start;
}
.author-photo { grid-column: 1 / span 4; margin: 0; position: sticky; top: calc(var(--bar-h) + 32px); }
.author-photo .work-media { cursor: default; aspect-ratio: 3 / 4; }
.author-body { grid-column: 6 / span 7; }
.author-body .room-meta { margin-bottom: 36px; }
.author-id { margin: 0; border-top: 1px solid var(--ink); }
.author-id div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.author-id dt { color: var(--ink-3); font-size: 14px; letter-spacing: 0.12em; }
.author-id dd { margin: 0; }
.author-statement { margin-top: 32px; max-width: 36em; font-size: 16.5px; line-height: 2; }
.author-statement p { margin: 0 0 1em; }
.sub-title { margin: 48px 0 14px; font: 600 1.2rem/1.4 var(--serif); letter-spacing: 0.16em; }
.chrono { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.chrono li { display: grid; grid-template-columns: 9.6em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.chrono-body { display: flex; flex-wrap: wrap; column-gap: 14px; }
.chrono-org { font-weight: 500; }
.chrono-role { color: var(--ink-2); }
.cert-issuer { display: block; font-size: 13px; color: var(--ink-3); }
.statement-head { margin: 28px 0 6px; font: 600 1.05rem/1.5 var(--serif); letter-spacing: 0.1em; }
.statement-head:first-child { margin-top: 0; }
.chrono-year { font: 500 1rem/1.7 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plain-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.plain-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 4px 14px; border: 1px solid var(--rule); font-size: 14px; }
.author-actions { margin-top: 40px; }

/* ───────── 出口 ───────── */
.exit { background: var(--gunjo); color: #fff; }
.exit ::selection { background: #fff; color: var(--gunjo); }
.exit :focus-visible { outline-color: #fff; }
.exit-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(64px, 10vh, 110px); }
.exit-thanks { margin: 0; font: 600 clamp(2.8rem, 7vw, 6rem)/1.1 var(--serif); letter-spacing: 0.12em; }
.exit-contact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(40px, 7vh, 72px) 0 0; border-top: 1px solid rgba(255, 255, 255, 0.55); }
.exit-contact div { padding: 16px 20px 0 0; }
.exit-contact dt { font-size: 13px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.78); }
.exit-contact dd { margin: 4px 0 0; font: 500 1.15rem/1.5 var(--serif); overflow-wrap: anywhere; }
.exit-contact a { color: #fff; }
.exit .tbd { color: rgba(255, 255, 255, 0.78); }
.exit-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.exit .btn-primary { background: #fff; border-color: #fff; color: var(--gunjo); }
.exit .btn-line { border-color: #fff; color: #fff; }
.exit .btn[aria-disabled="true"] { border-color: rgba(255, 255, 255, 0.45); color: rgba(255, 255, 255, 0.82); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .exit .btn-primary:hover { background: var(--gunjo-tint); border-color: var(--gunjo-tint); }
  .exit .btn-line:hover { background: #fff; color: var(--gunjo); }
}
.foot {
  max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 13px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.foot a { margin-left: auto; color: #fff; }

/* ───────── 作品詳細 ───────── */
.viewer {
  width: min(1320px, calc(100vw - 48px)); height: min(860px, calc(100dvh - 48px));
  max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
  background: var(--wall); color: var(--ink);
  display: none; grid-template-columns: minmax(0, 1fr) 380px;
}
.viewer[open] { display: grid; }
.viewer::backdrop { background: rgba(18, 18, 18, 0.55); }
.viewer[open] { animation: viewer-in 240ms var(--ease-out); }
.viewer[open]::backdrop { animation: fade-in 240ms ease; }
@keyframes viewer-in { from { opacity: 0; transform: scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
.viewer-media { position: relative; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 40px; background: var(--plinth); }
.viewer-stage { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 22px 40px -24px rgba(18, 18, 18, 0.45); }
.viewer-stage .ph { position: relative; inset: auto; width: 100%; height: 100%; }
.viewer-thumbs { display: flex; justify-content: center; gap: 8px; }
.viewer-thumbs button {
  width: 64px; height: 64px; padding: 4px; border: 1px solid var(--rule); background: var(--wall); cursor: pointer;
  transition: border-color 200ms ease, transform 160ms var(--ease-out);
}
.viewer-thumbs button:active { transform: scale(0.96); }
.viewer-thumbs button[aria-current="true"] { border-color: var(--ink); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: contain; }
html.is-locked { overflow: hidden; }
.viewer-side { display: flex; flex-direction: column; min-height: 0; padding: 72px 36px 28px; overflow-y: auto; }
.viewer-label .label-title { font-size: 1.5rem; }
.viewer-summary { margin-top: 24px; font-size: 15.5px; line-height: 2; }
.viewer-summary p { margin: 0 0 1em; }
.viewer-facts { margin: 24px 0 0; border-top: 1px solid var(--ink); font-size: 14px; }
.viewer-facts div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.viewer-facts dt { color: var(--ink-3); }
.viewer-facts dd { margin: 0; }
.viewer-nav { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 28px; }
.viewer-count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-3); letter-spacing: 0.1em; }
.viewer-close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 44px; height: 44px; border: 1px solid var(--rule); background: var(--wall); cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.viewer-close:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .viewer-close:hover { border-color: var(--ink); } }

/* ───────── 手機館內圖抽屜 ───────── */
.sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 82dvh;
  margin: 0; padding: 0 0 env(safe-area-inset-bottom); border: 0; border-top: 2px solid var(--ink);
  background: var(--wall); color: var(--ink);
}
.sheet[open] { animation: sheet-in 380ms var(--ease-drawer); }
.sheet::backdrop { background: rgba(18, 18, 18, 0.45); }
.sheet[open]::backdrop { animation: fade-in 300ms ease; }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--wall); border-bottom: 1px solid var(--rule); }
.sheet-title { font: 600 1.15rem/1.4 var(--serif); letter-spacing: 0.14em; }
.sheet-close { position: static; }
.sheet-list { margin: 0; padding: 0 16px 16px; list-style: none; }
.sheet-list a { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.sheet-list a[aria-current="location"] { color: var(--gunjo); }
.sheet-list .s-no { font: 500 1.35rem/1 var(--serif); color: var(--gunjo); font-variant-numeric: tabular-nums; }
.sheet-list .s-name { font: 600 1.05rem/1.4 var(--serif); letter-spacing: 0.1em; }
.sheet-list .s-count { font-size: 12.5px; color: var(--ink-3); }

.noscript, .load-error { max-width: 40em; margin: 40px auto; padding: 20px var(--gutter); border: 1px solid var(--ink); }

/* ───────── 進場動畫（只在支援動態、非截圖時） ───────── */
.js .reveal-media { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-out); }
.js .reveal-media.is-in { clip-path: inset(0 0 0 0); }
.js .reveal-text { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out) 160ms, transform 700ms var(--ease-out) 160ms; }
.js .reveal-text.is-in { opacity: 1; transform: none; }
.js .room-no.reveal-text { transition-delay: 0ms; }

.js .entrance .ex-latin, .js .entrance .ex-zh, .js .entrance .ex-fields, .js .entrance .ex-facts, .js .entrance .ex-actions {
  opacity: 0; transform: translateY(16px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.js .entrance .kv { opacity: 0; transition: opacity 1200ms var(--ease-out) 240ms; }
.js.is-ready .entrance .ex-latin, .js.is-ready .entrance .ex-zh, .js.is-ready .entrance .ex-fields,
.js.is-ready .entrance .ex-facts, .js.is-ready .entrance .ex-actions, .js.is-ready .entrance .kv { opacity: 1; transform: none; }
.js.is-ready .entrance .ex-zh { transition-delay: 80ms; }
.js.is-ready .entrance .ex-fields { transition-delay: 160ms; }
.js.is-ready .entrance .ex-facts { transition-delay: 220ms; }
.js.is-ready .entrance .ex-actions { transition-delay: 280ms; }

html.shot .reveal-media, html.shot .reveal-text,
html.shot .entrance .ex-latin, html.shot .entrance .ex-zh, html.shot .entrance .ex-fields,
html.shot .entrance .ex-facts, html.shot .entrance .ex-actions, html.shot .entrance .kv {
  opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal-media, .js .reveal-text,
  .js .entrance .ex-latin, .js .entrance .ex-zh, .js .entrance .ex-fields,
  .js .entrance .ex-facts, .js .entrance .ex-actions, .js .entrance .kv {
    opacity: 1; transform: none; clip-path: none; transition: opacity 200ms ease;
  }
  .kv .slide-wall img { filter: none; transform: none; transition: none; }
  .kv .slide { transition: opacity 200ms ease, visibility 0s linear 200ms; }
  .strip-mark { transition: opacity 200ms ease; }
  .viewer[open], .sheet[open] { animation: fade-in 200ms ease; }
}

/* ───────── 響應式 ───────── */
@media (max-width: 1180px) {
  .bar-where-label { display: none; }
}
@media (max-width: 1023px) {
  .strip { display: none; }
  .bar-map { display: inline-flex; }
  .bar-where-label { display: inline; }
  .entrance { min-height: 0; row-gap: 40px; }
  .entrance-text { grid-column: 1 / -1; }
  .kv { grid-column: 1 / -1; }
  .kv-stage { aspect-ratio: 4 / 3; }
  .ex-latin { font-size: clamp(3.6rem, 13vw, 7rem); }
  .floor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor-cell:nth-of-type(3n) { border-right: 1px solid var(--ink); }
  .floor-cell:nth-of-type(2n) { border-right: 0; }
  .floor-cell:nth-last-of-type(-n+3) { border-bottom: 1px solid var(--ink); }
  .floor-cell:last-of-type { border-bottom: 0; border-right: 0; }
  .floor-cell:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  .work { grid-column: span 6; }
  .work.is-wide { grid-column: 1 / -1; }
  .work.is-drop { margin-top: 0; }
  .author-photo { grid-column: 1 / span 5; position: static; }
  .author-body { grid-column: 7 / span 6; }
  .exit-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr); }
  .viewer-side { padding: 28px 24px 20px; }
}
@media (max-width: 700px) {
  :root { --bar-h: 52px; }
  body { font-size: 15.5px; }
  .bar { gap: 12px; }
  .bar-sub { display: none; }
  .bar-where { font-size: 12.5px; gap: 6px; }
  .entrance { padding-top: 28px; }
  .ex-zh { letter-spacing: 0.16em; }
  .ex-facts div + div { padding-left: 12px; }
  .kv-stage { aspect-ratio: 1 / 1.08; }
  .kv .slide-wall { padding: 7% 6%; }
  .ex-facts dd { font-size: 1.22rem; }
  .floor-cell { min-height: 0; padding: 14px 14px 16px; }
  .floor-no { font-size: 1.7rem; min-width: 0; }
  .floor-name { font-size: 1.04rem; letter-spacing: 0.06em; }
  .floor-top { gap: 10px; }
  .floor-works { display: none; }
  .floor-count { margin-top: 4px; font-size: 12.5px; }
  .room-head { grid-template-columns: auto minmax(0, 1fr); }
  .hang { row-gap: 52px; }
  .work, .work.is-wide { grid-column: 1 / -1; }
  .author-photo { grid-column: 1 / -1; max-width: 300px; margin-bottom: 40px; }
  .author-body { grid-column: 1 / -1; }
  .author-id div { grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; }
  .chrono li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .chrono-year { font-size: 0.92rem; color: var(--ink-3); }
  .exit-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exit-contact div { padding: 14px 12px 0 0; }
  .exit-contact div:first-child { grid-column: 1 / -1; }
  .viewer[open] { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .viewer { width: 100vw; height: 100dvh; }
  .viewer-media { height: 64dvh; padding: 20px; }
  .viewer-side { overflow: visible; padding: 28px 16px calc(24px + env(safe-area-inset-bottom)); }
  .viewer-close { position: fixed; top: 12px; right: 12px; }
  .btn { padding: 0 24px; }
}
