:root {
  --paper: #F7F5F0;
  --paper-2: #EDE9E1;
  --ink: #1C1A17;
  --ink-2: #3A362F;
  --muted: #5B554C;
  --rule: #DDD8CE;
  --seal: #9E2B1D;
  --serif: "Songti TC", "Noto Serif CJK TC", "Noto Serif TC", "PMingLiU", serif;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--seal); }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 20px; } }

.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; background: var(--seal); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 15px; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 4px; }
.site-nav { display: flex; gap: 24px; font-size: 15px; }
.site-nav a { text-decoration: none; padding: 10px 0; }

.serif { font-family: var(--serif); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--seal); font-size: 14px; letter-spacing: 2px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.muted { color: var(--muted); }

.btn { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #C9C3B8; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.swatch { width: 12px; height: 12px; border: 1px solid rgba(0, 0, 0, 0.15); display: inline-block; }

.site-footer { margin-top: 72px; padding: 28px 0 44px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }

/* ---------- 列表頁 ---------- */
.hero { padding: 72px 0 56px; max-width: 820px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.55; font-weight: 600; }
.hero p { margin: 0; font-size: 17px; color: #4D483F; }

.latest { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; padding: 40px; background: #1F1C19; color: #F2EEE6; }
.latest a.poster { flex: 0 0 auto; width: 270px; max-width: 100%; aspect-ratio: 9 / 16; overflow: hidden; }
.latest a.poster img { max-width: 70%; max-height: 82%; }
.latest .body { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.latest .eyebrow { color: #E9B3A8; }
.latest .quote { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); line-height: 1.6; font-weight: 600; }
.latest .meta { margin: 0; font-size: 15px; color: #C9C2B6; }
.latest .btn { background: #F2EEE6; color: #1F1C19; border-color: #F2EEE6; }
@media (max-width: 520px) { .latest { padding: 24px; } }

.series-head { padding-top: 88px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.series-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; letter-spacing: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.series { display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 36px 0; border-top: 1px solid var(--rule); margin-top: 28px; }
.series + .series { margin-top: 0; }
.series aside { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.series aside h3 { margin: 0; font-family: var(--serif); font-size: 24px; letter-spacing: 2px; display: flex; align-items: center; gap: 12px; }
.series aside h3 .swatch { width: 26px; height: 26px; }
.grid { flex: 4 1 560px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 20px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.card .thumb { aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card .title { font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.card .sub { font-size: 13px; color: var(--muted); }

/* ---------- 作品頁 ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0 28px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.work-hero { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }
.stage-col { flex: 0 0 auto; max-width: 100%; display: flex; flex-direction: column; gap: 12px; }
.stage { position: relative; width: 100%; max-width: 560px; aspect-ratio: 9 / 16; overflow: hidden; background: transparent; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 情境樣板或風景照當網頁背景 */
.backdrop { position: relative; padding: 56px; background-color: var(--paper-2); background-size: cover; background-position: center; }
.backdrop .work-hero { position: relative; align-items: center; }
.panel { background: rgba(247, 245, 240, 0.94); padding: 32px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (max-width: 720px) { .backdrop { padding: 20px 16px; margin: 0 -20px; } .panel { padding: 22px; } }
.thumb.scene { position: relative; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.thumb.scene img { width: auto !important; height: auto !important; max-width: 62%; max-height: 80%; object-fit: contain; box-shadow: 0 1px 2px rgba(20, 12, 5, 0.35), 0 10px 20px rgba(20, 12, 5, 0.3); }
.card:hover .thumb.scene img { transform: translateY(-3px); }
.controlbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.progress { height: 3px; background: rgba(140, 134, 124, 0.45); }
.progress span { display: block; height: 100%; width: 0; background: var(--seal); }
/* 控制列在畫布外、背景可能很深或很淺：用紙色底加細框，兩種背景都看得清楚 */
.controlbar .play, .controlbar .pill { background: var(--paper); color: var(--ink); border: 1px solid rgba(0, 0, 0, 0.22); }
.play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(28, 26, 23, 0.8); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pill { padding: 8px 12px; background: rgba(28, 26, 23, 0.8); color: var(--paper); font-size: 14px; letter-spacing: 1px; border: 0; font-family: inherit; }
button.pill { min-height: 44px; cursor: pointer; }
.stage-note { font-size: 13px; color: var(--muted); }

.title-col { flex: 1 1 300px; min-width: 0; display: flex; gap: 36px; align-items: flex-start; }
.title-col h1 { margin: 0; writing-mode: vertical-rl; font-family: var(--serif); font-size: clamp(40px, 5vw, 60px); line-height: 1.2; letter-spacing: 0.16em; font-weight: 600; max-height: 560px; }
.title-col .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding-top: 6px; }
.facts { margin: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px 16px; font-size: 15px; padding-top: 22px; border-top: 1px solid var(--rule); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .title-col { gap: 20px; } }

.shiwen { margin-top: 96px; padding: 96px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.shiwen h2 { margin: 0; font-size: 14px; font-weight: 400; color: var(--seal); letter-spacing: 6px; }
.shiwen p.text { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.4vw, 28px); line-height: 2; letter-spacing: 0.06em; max-width: 780px; }
.draft { font-size: 13px; color: var(--seal); border: 1px solid currentColor; padding: 4px 10px; }
@media (max-width: 520px) { .shiwen { margin-top: 56px; padding: 56px 0; } }

.intro { padding-top: 80px; display: flex; flex-wrap: wrap; gap: 24px 48px; }
.intro h2 { margin: 0; flex: 1 1 200px; font-family: var(--serif); font-size: 24px; letter-spacing: 2px; }
.intro .body { flex: 4 1 520px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.intro .body p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 2; color: var(--ink-2); }
.xidu { padding-top: 96px; display: flex; flex-direction: column; gap: 80px; }
.xidu > header h2 { margin: 0; font-family: var(--serif); font-size: 30px; letter-spacing: 4px; }
.xidu > header p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.detail { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; }
.detail.reverse { flex-direction: row-reverse; }
.detail figure { margin: 0; flex: 3 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.detail.narrow figure { flex: 1 1 260px; max-width: 360px; }
.detail figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.detail figcaption { display: flex; gap: 12px; align-items: baseline; font-size: 14px; color: var(--muted); }
.detail figcaption b { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--seal); }
.detail .body { flex: 2 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.detail .body h3 { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.5; }
.detail .body p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 2; color: var(--ink-2); }
.pull { margin: 0; display: flex; gap: 18px; }
.pull::before { content: ""; flex: 0 0 auto; width: 3px; background: var(--seal); }
.pull p { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px) !important; line-height: 1.6 !important; font-weight: 600; color: var(--ink) !important; }

.related { margin-top: 96px; padding-top: 40px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 24px; }
.related header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.related h2 { margin: 0; font-family: var(--serif); font-size: 24px; letter-spacing: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 公開頁狀態：載入中、錯誤、404／410 */
.loading { padding: 96px 0; text-align: center; color: var(--muted); }
.notice { padding: 96px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 560px; }
.notice h1 { margin: 0; font-family: var(--serif); font-size: 32px; letter-spacing: 2px; }
.stage-note { display: flex; align-items: center; gap: 10px; }
.stage-note[hidden] { display: none; }
