/* 源泉圓體（只含網頁用到的字；改文字後要重跑 fonts/subset-fonts.py） */
@font-face {
  font-family: "GenSenRounded";
  src: url("fonts/GenSenRounded-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "GenSenRounded";
  src: url("fonts/GenSenRounded-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "GenSenRounded";
  src: url("fonts/GenSenRounded-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* =========================================================
   配色設定（依 Diula 品牌視覺識別色票）
   ========================================================= */
:root {
  /* 品牌色票 */
  --brand-blue: #cddcf0;    /* Logo 淺藍 */
  --brand-brown: #492c13;   /* Logo 咖啡 */
  --brand-bg: #f3f0e1;      /* BG 米白 */
  --brand-yellow: #fce6b7;  /* Other 奶油黃 */
  --brand-sage: #d7d4b1;    /* Other 灰綠 */
  --brand-red: #c72f02;     /* Other 磚紅 */
  --brand-navy: #1f2f4f;    /* App 圖示的深藍 */

  /* 頁面 */
  --bg: var(--brand-bg);
  --fg: var(--brand-brown);
  --muted: #8a7560;
  --line: var(--brand-brown);
  --stroke: 1.5px;
  --gutter: clamp(20px, 5vw, 72px); /* 頁面左右留白 */

  /* 文件夾顏色（script.js 的資料用名稱對應，例如 color: 'brown'） */
  --f-brown: var(--brand-brown);
  --f-blue: var(--brand-blue);
  --f-yellow: var(--brand-yellow);
  --f-sage: var(--brand-sage);
  --f-red: var(--brand-red);
  --f-navy: var(--brand-navy);
  --f-paper: #fffdf7;

  /* 文件夾上的文字色 */
  --ink-light: var(--brand-bg);
  --ink-dark: var(--brand-brown);

  /* 紙張 */
  --paper: #fffdf7;
  --paper-ink: var(--brand-brown);
  --stamp: var(--brand-red);

  /* 字體 */
  --display: "GenSenRounded", system-ui, sans-serif;
  --sans: "GenSenRounded", system-ui, sans-serif;
  --mono: "GenSenRounded", system-ui, sans-serif;

  /* 文件夾尺寸 */
  --tab-h: 44px;
  --slope: 36px;
  --peek-h: 230px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.29 0 0 0 0 0.17 0 0 0 0 0.07 0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===== 基本設定 ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: calc(1180px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.crumbs {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }

/* 跟 App 一樣的膠囊按鈕 */
.pill {
  padding: 6px 18px;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pill:hover { background: var(--brand-brown); color: var(--brand-bg); }

/* ===== 導覽列（App 的淺藍頂部） ===== */
.topbar {
  background: var(--brand-blue);
  border-radius: 0 0 28px 28px;
}
.topbar-inner {
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.topbar-links {
  display: flex;
  gap: 8px;
}
.topbar-links a {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.topbar-links a:hover { background: var(--brand-bg); }

.logo { display: block; line-height: 0; }
.logo img { display: block; height: 40px; width: auto; }
.topbar-tag {
  margin: 0;
  justify-self: end;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Banner ===== */
.hero { padding-top: 32px; }
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 56px 64px;
  border: var(--stroke) solid var(--line);
  border-radius: 36px;
  background: var(--brand-yellow);
  overflow: hidden;
}
.hero-logo { display: block; width: min(320px, 80%); height: auto; }
.hero-tagline {
  margin: 24px 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
}
.hero-slogan {
  margin: 4px 0 12px;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
}
.hero-sub { margin: 0; max-width: 30em; font-size: 1.1rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .pill { padding: 10px 24px; }
.pill-dark { background: var(--brand-brown); color: var(--brand-bg); }
.pill-dark:hover { background: var(--brand-red); border-color: var(--brand-red); }

.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-art .item * { stroke: var(--brand-brown); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero-art .trail {
  fill: none;
  stroke: var(--brand-brown);
  stroke-width: 2.5;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}
.hero-art .spark { fill: none; stroke: var(--brand-red); stroke-width: 3; stroke-linecap: round; }
.hero-art .float {
  transform-box: fill-box;
  animation: bob 3.2s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
@keyframes bob {
  from { transform: translateY(-5px) rotate(-2deg); }
  to { transform: translateY(5px) rotate(2deg); }
}

/* ===== 區塊標題 ===== */
.section-head {
  padding-top: 88px;
  padding-bottom: 40px;
  padding-left: calc(var(--gutter) + 4%);
}
.archive-head { padding-bottom: 64px; }
.block .section-head { padding-left: 4%; }
.pill.is-soon { opacity: 0.55; cursor: default; pointer-events: none; }

/* 標題前的放大鏡圖示 */
.bar-title {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.bar-title::before {
  content: "";
  flex: none;
  /* 上限為原圖尺寸，放大才不會糊掉 */
  width: min(0.5em, 30px);
  height: min(0.9em, 54px);
  background: url("images/icon-search.png") center / contain no-repeat;
}
.section-title { font-size: clamp(2rem, 5vw, 3.2rem); }
.archive-hint {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== 功能檔案：大標題、手機畫面、重點功能 ===== */
.dossier-title img { display: block; height: 0.95em; width: auto; }
/* 圖片的字腳對齊中文字的底線（0.09em 是量出來的差距） */
.dossier-title img { align-self: baseline; transform: translateY(0.09em); }

/* 寬版紙張：拿掉左側小字欄，內容加寬 */
.panel.panel-wide { padding-left: 5%; }
.sheet.sheet-wide { grid-template-columns: 60px minmax(0, 1fr) 36px; }
.sheet-wide .en { word-break: keep-all; }
.sheet-wide .side-note { display: none; }
.sheet-main { container-type: inline-size; }

/* 手機畫面 */
.screens {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5cqw;
  padding: 8px 0 48px;
}
.screen-item { flex: none; width: min(230px, 26cqw); margin: 0; text-align: center; }
.screen-item.is-main { width: min(290px, 32cqw); }
.screen-item figcaption { margin-top: 14px; font-weight: 700; }
.phone {
  aspect-ratio: 393 / 852; /* 跟 App 截圖一樣的比例 */
  padding: 8px;
  border-radius: 36px;
  background: var(--brand-brown);
  box-shadow: 0 20px 40px rgba(73, 44, 19, 0.2);
}
.screen {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  object-fit: cover;
  container-type: inline-size;
  text-align: left;
}
.screen-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed rgba(73, 44, 19, 0.35);
  background: var(--noise), var(--brand-blue);
  color: var(--muted);
}
.screen-empty svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* 用網頁重現的 App 首頁（尺寸跟著手機寬度縮放） */
.m-head {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 26cqw;
  padding-bottom: 5cqw;
  border-radius: 0 0 8cqw 8cqw;
  background: var(--brand-blue);
}
.m-head img { height: 8cqw; width: auto; }
.m-title {
  margin: 7cqw 6cqw 3cqw;
  padding-left: 2.5cqw;
  border-left: 1.2cqw solid var(--brand-brown);
  font-size: 5.2cqw;
  font-weight: 700;
  line-height: 1.2;
}
.m-pill {
  display: flex;
  align-items: center;
  gap: 5cqw;
  height: 16cqw;
  margin: 0 5cqw 3.5cqw;
  padding: 0 7cqw;
  border: 0.5cqw solid var(--brand-brown);
  border-radius: 999px;
  background: var(--brand-bg);
  font-size: 4.1cqw;
  font-weight: 700;
  white-space: nowrap;
}
.m-pill .icon { width: 7.5cqw; height: 7.5cqw; stroke-width: 2.4; }
.m-nav {
  position: absolute;
  left: 5cqw;
  right: 5cqw;
  bottom: 5cqw;
  display: flex;
  gap: 2cqw;
  height: 15cqw;
  padding: 1.8cqw;
  border-radius: 999px;
  background: var(--brand-blue);
}
.m-nav span { flex: 1; display: grid; place-items: center; border-radius: 999px; }
.m-nav .on { background: #fff; }
.m-nav .icon { width: 7cqw; height: 7cqw; stroke: none; }

/* 重點功能（文件夾造型，兩欄各五個） */
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 28px;
  counter-reset: point;
}
.points > li { display: flex; }
/* 文件夾顏色照品牌色票輪流 */
.points > li:nth-child(3n + 1) .point { --c: var(--f-blue); }
.points > li:nth-child(3n + 2) .point { --c: var(--f-yellow); }
.points > li:nth-child(3n + 3) .point { --c: var(--f-sage); }
.point {
  counter-increment: point;
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 118px;
  margin-top: 22px; /* 留給上面的文件夾標籤 */
  padding: 26px 28px;
  border: var(--stroke) solid var(--line);
  border-radius: 4px 18px 18px 18px;
  background: var(--noise), var(--c);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
/* 文件夾上方的標籤 */
.point::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-22px - var(--stroke));
  left: calc(var(--stroke) * -1);
  width: 44%;
  height: 32px;
  border: var(--stroke) solid var(--line);
  border-radius: 10px 14px 0 0;
  background: var(--noise), var(--c);
}
/* 標籤上的編號 */
.point::after {
  content: counter(point, decimal-leading-zero);
  position: absolute;
  top: -18px;
  left: 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--brand-red);
}
.point:hover, .point:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(73, 44, 19, 0.18);
}
.point:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 3px; }
.point-title {
  display: block;
  word-break: keep-all; /* 只在 <wbr> 的位置換行 */
  overflow-wrap: anywhere;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.35;
}
.point-title em {
  font-style: normal;
  font-family: var(--display);
  font-size: 1.3em;
  color: var(--brand-red);
}
.point-text p { margin: 6px 0 0; color: var(--muted); }

@container (max-width: 520px) {
  .points { grid-template-columns: 1fr; gap: 28px; }
  .point { padding: 22px 20px; }
  .point-title { font-size: 1.35rem; }
  .screens {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 32px;
  }
  .screen-item, .screen-item.is-main { width: 70cqw; scroll-snap-align: center; }
  .screen-item.is-main { order: -1; }
}

/* ===== 展覽資訊（票券） ===== */
.expo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: var(--stroke) solid var(--line);
  border-radius: 24px;
  background: var(--ticket);
}
.ticket-blue { --ticket: var(--brand-blue); }
.ticket-yellow { --ticket: var(--brand-yellow); }
.ticket-main { padding: 28px 32px; }
.ticket-tag {
  display: inline-block;
  margin: 0;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--brand-brown);
  color: var(--brand-bg);
  font-weight: 700;
}
.ticket-date {
  margin: 14px 0 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.ticket-date span { margin: 0 0.15em; color: var(--brand-red); }
.ticket-place { margin: 0; font-size: 1.15rem; font-weight: 700; }

.ticket-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 28px 22px;
  border-left: 2px dashed var(--line);
  background: var(--noise), var(--paper);
}
/* 票根上下的半圓缺口 */
.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: -13px;
  width: 24px;
  height: 24px;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}
.ticket-stub::before { top: -13px; }
.ticket-stub::after { bottom: -13px; }
.ticket-no {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--brand-red);
}
.ticket-stub a {
  font-weight: 700;
  font-size: 0.9rem;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ===== 贊助商：無框，7 個一排 ===== */
.sponsor-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  padding: 8px 0;
}
.sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  --logo-h: 96px;
  height: var(--logo-h);
  background: var(--bg); /* 讓白底 Logo 在滑鼠移過去時也能融進背景 */
  transition: transform 0.2s var(--ease);
}
.sponsor:hover { transform: translateY(-4px); }
.sponsor img {
  display: block;
  max-width: 100%;
  max-height: var(--logo-h); /* 用固定值，百分比在圖片剛載入時可能還算不出來，直式 Logo 會先顯示原尺寸 */
  object-fit: contain;
  mix-blend-mode: multiply; /* 讓白底的 Logo 融進米色背景 */
}
.sponsor-dark img { mix-blend-mode: normal; }

/* ===== 文件夾 ===== */
.cabinet {
  max-width: calc(1180px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter) 16px;
}

.folder {
  position: relative;
  z-index: 0;
  transition: margin 0.35s var(--ease);
  animation: rise 0.7s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}
/* 下一個文件夾的標籤壓在上一個文件夾的色帶上 */
.folder + .folder { margin-top: calc(var(--tab-h) * -1); }

.tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 370px));
  column-gap: 14px;
  height: var(--tab-h);
  pointer-events: none; /* 標籤之間的空白讓滑鼠穿過，碰到下面的文件夾 */
}

.tab {
  pointer-events: auto;
  position: relative;
  display: grid;
  place-items: center;
  height: calc(100% + var(--stroke)); /* 往下多一條線的高度，蓋住文件夾的上框線 */
  padding: 0 var(--slope);
  border: 0;
  background: none;
  color: var(--c);
  cursor: pointer;
  transition: filter 0.2s;
}
.tab:hover { filter: brightness(1.06); }
.tab:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }

/* 標籤外形由 script.js 依實際寬度畫成一整條路徑 */
.tab-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.tab-shape .fill { fill: currentColor; }
.tab-shape .edge {
  fill: none;
  stroke: var(--line);
  stroke-width: var(--stroke);
  stroke-linecap: butt;
}

.tab-label {
  position: relative;
  max-width: 100%;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-body {
  position: relative;
  height: calc(var(--tab-h) + 15px);
  overflow: hidden;
  border: var(--stroke) solid var(--line);
  border-bottom: 0;
  background: var(--c);
  background-clip: padding-box; /* 底色不畫到框線下面，避免框線旁出現細縫 */
  color: var(--ink);
  cursor: pointer;
  transition: height 0.45s var(--ease);
}

/* 滑鼠移上去：展開並稍微變寬 */
.folder.is-peek { margin-left: -8px; margin-right: -8px; }
.folder.is-peek .folder-body,
.folder:last-child .folder-body { height: var(--peek-h); }
.folder:last-child .folder-body {
  border-bottom: var(--stroke) solid var(--line);
  border-radius: 0 0 24px 24px;
}

.preview {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  padding: 0 72px;
  display: grid;
  grid-template-columns: 110px minmax(0, 300px) 1fr auto;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.3s 0.1s;
}
.preview p { margin: 0; }
.preview-date { grid-column: 4; text-align: right; }
.preview-open {
  display: block;
  margin-top: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.folder.is-peek .preview,
.folder:last-child .preview { opacity: 1; }


/* ===== 檔案頁 ===== */
.dossier {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
}
.dossier[hidden] { display: none; }

.dossier-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--brand-blue);
  border-radius: 0 0 20px 20px;
}
.bar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dossier-bar .crumbs { color: var(--fg); }
.close-btn { flex: none; }

.dossier-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 64px;
  padding-left: calc(var(--gutter) + 4%);
}
.dossier-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  word-break: keep-all;
}
.dossier-meta {
  flex: none;
  max-width: 240px;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.dossier-meta p { margin: 0 0 2.5em; }

.stage {
  display: flex;
  align-items: stretch;   /* 色塊至少跟右側標籤一樣高，標籤才不會凸出色塊外 */
  padding-right: 5vw;
  padding-bottom: 120px;
}

.panel {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px 22%;
  border: var(--stroke) solid var(--line);
  border-left: 0;
  border-radius: 0 28px 28px 0;
  background: var(--c);
}

/* 右側直式標籤 */
.side-tabs {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 64px;
  padding-bottom: 48px;   /* 讓色塊比最後一片標籤再多一點，底部才不會卡死 */
}
.side-tab {
  margin-left: calc(var(--stroke) * -1);
  padding: 22px 10px;
  border: var(--stroke) solid var(--line);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  writing-mode: vertical-rl;
  background: var(--c);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.side-tab:hover { transform: translateX(4px); filter: brightness(1.06); }

/* 紙張 */
.sheet {
  position: relative;
  display: grid;
  grid-template-columns: 60px 190px minmax(0, 1fr) 36px;
  column-gap: 32px;
  padding: 56px 32px 72px 24px;
  border: var(--stroke) solid var(--line);
  border-radius: 16px;
  background: var(--noise), var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 18px 40px rgba(73, 44, 19, 0.18);
}

.holes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 110px;
  margin: -56px -32px -72px 0;
  padding: 76px 0 72px;
  border-right: 1px solid rgba(73, 44, 19, 0.18);
}
.holes i {
  width: 16px;
  height: 16px;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  background: var(--c);
}

.stamp {
  position: absolute;
  top: 28px;
  right: 32px;
  padding: 6px 12px;
  border: 1.5px solid var(--stamp);
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--stamp);
  color: var(--stamp);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  transform: rotate(-3deg);
}

.side-note {
  margin: 150px 0 0;
  padding-left: 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
}

.sheet-main { padding-top: 40px; }
.sheet-main > p,
.columns p {
  font-size: 1.15rem;
  line-height: 1.85;
}
.sheet-main > p { max-width: 34em; margin: 0 0 0.8em; }

.en {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.barcode {
  align-self: center;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
}

.sheet-2 {
  position: relative;
  margin-top: -56px;
  margin-right: 7%;
  padding: 64px 48px 80px;
  border: var(--stroke) solid var(--line);
  border-radius: 16px;
  background: var(--noise), var(--sheet2);
  color: var(--paper-ink);
  box-shadow: 0 18px 40px rgba(73, 44, 19, 0.15);
}
/* 標題和內文都避開右邊的登記單 */
.sheet-2 { container-type: inline-size; }
.sheet-2 > .en {
  max-width: calc(100% - 280px);
  white-space: nowrap; /* 不換行，改用字級縮放塞進剩下的寬度 */
  font-size: clamp(1.1rem, calc((100cqi - 280px) / 10.5), 2.8rem);
}
/* 訪談引言維持一段，不要分成兩欄 */
.columns {
  max-width: calc(100% - 280px);
}
.columns p { margin: 0 0 0.8em; font-size: 1rem; }
/* 引言下方的受訪者 */
.quote-by { margin-top: 14px; font-weight: 700; }

/* 失物登記單 */
.slip-wrap {
  position: absolute;
  top: 36px;
  right: -40px;
  width: 290px;
  transform: rotate(1.5deg);
  filter: drop-shadow(0 0 0.8px var(--brand-brown)) drop-shadow(0 10px 16px rgba(73, 44, 19, 0.18));
}
.slip {
  padding: 30px 22px 22px;
  background: var(--noise), var(--slip);
  color: var(--brand-brown);
  font-family: var(--mono);
  font-size: 0.72rem;
  clip-path: polygon(0 8px, 6% 2px, 12% 7px, 18% 0, 24% 6px, 31% 1px, 38% 8px, 45% 2px, 52% 6px, 60% 0, 67% 7px, 74% 2px, 81% 8px, 88% 1px, 94% 6px, 100% 2px, 100% 100%, 0 100%);
}
.slip h4 {
  margin: 0 0 14px;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.slip dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0;
}
.slip dl div { border-top: 1px dashed rgba(73, 44, 19, 0.45); padding-top: 4px; }
.slip dt { font-size: 0.6rem; opacity: 0.75; }
.slip dd { margin: 2px 0 0; font-size: 0.8rem; }
.slip .sign {
  display: grid;
  place-items: center;
  height: 58px;
  margin-top: 16px;
  border: 1.5px solid var(--brand-brown);
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--slip), inset 0 0 0 4px var(--brand-brown);
}
.slip .sign img { height: 26px; width: auto; }
.paperclip {
  position: absolute;
  top: 45%;
  right: -22px;
  width: 44px;
  height: 110px;
  fill: none;
  stroke: var(--brand-navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  transform: rotate(18deg);
}

/* 檔案內的附加內容 */
.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.file-link {
  background: var(--c);
  color: var(--ink);
  font-weight: 700;
}
.file-link:hover { background: var(--c); color: var(--ink); filter: brightness(1.06); }

.flow {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px dashed rgba(73, 44, 19, 0.35);
}
.flow li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--stamp);
}
.flow strong { font-size: 1.15rem; margin-right: 8px; }

/* 照片往左延伸到「DiuLa! 團隊名冊」那欄下方，才能放大一點
   -206px = 190px 欄寬 + 32px 欄距 - 16px 那欄的左內距，左邊剛好對齊「DiuLa!」的 D */
.advisor,
.members {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-left: -206px;
}
/* 指導老師：單獨一張，放在組員上方；標題和副標排在它右邊 */
.advisor { margin-top: 64px; align-items: start; }
/* 組員頁的標題排到照片旁邊了，左邊那行小字改放在最上面，才不會被照片蓋住 */
.sheet-team .side-note { margin-top: 24px; }
.team-intro { grid-column: 2 / -1; }
/* -0.11em 補掉字體上方多出來的空間，讓「Our team」的字頂對齊照片卡上緣 */
.team-intro .en { margin: -0.11em 0 20px; }
.team-intro p { margin: 0 0 0.8em; font-size: 1.15rem; line-height: 1.85; }
.members { margin-top: 20px; margin-bottom: 56px; }

/* 照片可以點開看大圖 */
.photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  transition: transform 0.2s var(--ease);
}
.photo-btn:hover { transform: translateY(-4px); }
.photo-btn:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 4px; }

.lightbox {
  width: min(560px, calc(100vw - 40px), calc((100vh - 40px) * 0.68));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(73, 44, 19, 0.45);
  backdrop-filter: blur(2px);
}
.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 40px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 50px rgba(73, 44, 19, 0.4);
}
.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  background: var(--brand-bg);
  color: var(--brand-brown);
  font-size: 1rem;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--brand-yellow); }
/* 照片卡本身已經有姓名、職位和外框，網頁只要把圖排好 */
.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
img.photo { box-shadow: 0 10px 24px rgba(73, 44, 19, 0.16); }
/* 還沒放照片時的照片框 */
.photo-empty {
  aspect-ratio: 17 / 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed rgba(73, 44, 19, 0.45);
  background: var(--noise), var(--brand-blue);
  color: var(--muted);
  font-size: 0.85rem;
}
.photo-empty svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.icon {
  flex: none;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--brand-navy);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--brand-navy);
}
.icon-img { object-fit: contain; }
.en-icon { display: flex; align-items: center; gap: 16px; font-family: var(--sans); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.en-icon .icon { width: 1.1em; height: 1.1em; }
.sheet-main .more-link { margin: 28px 0 0; }

/* ===== Footer ===== */
.site-footer {
  margin-top: 40px;
  padding: 56px 0 28px;
  border-radius: 36px 36px 0 0;
  background: var(--brand-blue);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}
.footer-brand img { display: block; height: 48px; width: auto; }
.footer-brand p { margin: 16px 0 20px; font-weight: 700; }
.footer-brand .pill { display: inline-block; padding: 10px 24px; }
.footer-title { margin: 0 0 18px; font-size: 1.3rem; font-family: var(--sans); }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-links a {
  display: grid;
  grid-template-columns: 24px 90px auto;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  background: var(--brand-bg);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.footer-links a:hover { background: var(--brand-brown); color: var(--brand-bg); }
.footer-links svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-links .handle { font-family: var(--mono); font-weight: 400; font-size: 0.85rem; }
.footer-copy {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(73, 44, 19, 0.2);
  color: var(--muted);
  font-size: 0.85rem;
}

.sheet-main > .file-cta {
  max-width: none; /* 不要套用 .sheet-main > p 的 34em 上限，才會對整個區塊置中 */
  margin: 40px 0 0;
  text-align: center;
}
.file-cta .pill { display: inline-block; padding: 12px 28px; font-size: 1.05rem; }

/* ===== 重點功能的便條小視窗 ===== */
.memo {
  width: min(440px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-brown);
  overflow: visible;
}
.memo::backdrop {
  background: rgba(73, 44, 19, 0.35);
  backdrop-filter: blur(2px);
}
.memo-paper {
  position: relative;
  isolation: isolate;
  padding: 44px 32px 40px;
  filter: drop-shadow(0 18px 30px rgba(73, 44, 19, 0.3));
  transform: rotate(-1.5deg);
}
/* 便條紙；右下角折角（放在偽元素上，才不會把陰影和紙膠帶一起裁掉） */
.memo-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(315deg, transparent 50%, #e6c886 50%) right bottom / 36px 36px no-repeat,
    var(--noise),
    var(--brand-yellow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%);
}
.memo-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 30px;
  background: rgba(205, 220, 240, 0.85);
  border-left: 2px dashed rgba(255, 255, 255, 0.6);
  border-right: 2px dashed rgba(255, 255, 255, 0.6);
  transform: translateX(-50%) rotate(3deg);
}
.memo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.memo-close:hover, .memo-close:focus-visible { background: var(--brand-blue); }
.memo-no {
  margin: 0 0 14px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--brand-red);
}
.memo-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.memo-head .point-icon { width: 56px; height: 56px; }
.memo-head .point-icon .icon { width: 30px; height: 30px; }
.memo-head h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.memo-head h3 em {
  font-style: normal;
  font-family: var(--display);
  font-size: 1.3em;
  color: var(--brand-red);
}
.memo-body {
  min-height: 128px;
  /* 橫線，跟文字的行高對齊 */
  background: repeating-linear-gradient(transparent 0 31px, rgba(73, 44, 19, 0.16) 31px 32px);
}
.memo-body p {
  margin: 0;
  font-size: 1rem;
  line-height: 32px; /* 對齊便條紙的橫線 */
}
.memo-small {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== 動畫 ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(90px); }
}
@keyframes tab-in {
  from { opacity: 0; transform: translateX(-100%); }
}
@keyframes slip-in {
  from { opacity: 0; transform: translateY(40px) rotate(-8deg); }
  to { opacity: 1; transform: rotate(1.5deg); }
}

@keyframes memo-in {
  from { opacity: 0; transform: translateY(24px) rotate(-6deg) scale(0.95); }
}
.memo[open] .memo-paper { animation: memo-in 0.35s var(--ease) both; }
.memo[open]::backdrop { animation: fade 0.25s both; }

.dossier.play { animation: fade 0.25s both; }
.dossier.play .dossier-head { animation: rise 0.5s var(--ease) both; }
.dossier.play .panel { animation: panel-in 0.65s var(--ease) both; }
.dossier.play .sheet { animation: rise 0.6s 0.15s var(--ease) both; }
.dossier.play .sheet-2 { animation: rise 0.6s 0.28s var(--ease) both; }
.dossier.play .slip-wrap { animation: slip-in 0.6s 0.45s var(--ease) both; }
.dossier.play .side-tab { animation: tab-in 0.4s var(--ease) both; animation-delay: calc(0.3s + var(--i) * 50ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 響應式 ===== */
@media (max-width: 900px) {
  .stage { flex-direction: column; padding-right: 0; }
  .side-tabs {
    order: -1;
    flex-direction: row;
    width: 100%;
    padding: 0 var(--gutter);
    overflow-x: auto;
  }
  .side-tab {
    flex: none;
    margin: 0 0 calc(var(--stroke) * -1);
    padding: 10px 16px;
    border: var(--stroke) solid var(--line);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    writing-mode: horizontal-tb;
    letter-spacing: 0;
  }
  .side-tab:hover { transform: translateY(-3px); }
  .panel {
    width: 100%;
    padding: 28px 16px 48px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .sheet { grid-template-columns: minmax(0, 1fr); padding: 72px 20px 88px; }
  .sheet.sheet-wide { grid-template-columns: minmax(0, 1fr); }
  .panel.panel-wide { padding-left: 16px; }
  .sheet-wide .en { font-size: 1.8rem; line-height: 1.25; }
  .holes, .barcode { display: none; }
  .side-note { margin: 0; padding: 0; }
  .sheet-main { padding-top: 24px; }

  .sheet-2 { margin-right: 0; padding: 72px 20px 36px; }
  .sheet-2 > .en { max-width: none; font-size: clamp(1.1rem, calc(100cqi / 10.5), 2.8rem); }
  .columns { max-width: none; }
  .slip-wrap {
    position: relative;
    top: auto;
    right: auto;
    width: min(290px, 100%);
    margin: 24px auto 0;
  }
  .paperclip { right: -8px; }

  .dossier-head { flex-direction: column; gap: 16px; padding-bottom: 40px; }
  .dossier-meta p { margin-bottom: 0.8em; }
}

@media (max-width: 720px) {
  :root {
    --tab-h: 38px;
    --slope: 12px;
    --peek-h: 200px;
  }
  .topbar-inner { height: 64px; grid-template-columns: auto 1fr; }
  .topbar-tag { display: none; }
  .logo { order: -1; }
  .logo img { height: 30px; }
  .topbar-links { justify-self: end; gap: 0; }
  .topbar-links a { padding: 6px 8px; font-size: 0.9rem; }

  .section-head { padding-top: 56px; padding-bottom: 28px; }
  .archive-head { padding-bottom: 48px; }
  .expo-grid { grid-template-columns: 1fr; }
  .ticket-main { padding: 22px 20px; }
  .ticket-stub { padding: 22px 14px; }
  /* 手機：維持一排，左右滑動 */
  .sponsor-grid {
    grid-template-columns: repeat(7, 104px);
    gap: 20px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .sponsor { --logo-h: 80px; scroll-snap-align: start; }
  .advisor,
  .members { margin-left: 0; gap: 12px; }
  .members { margin-bottom: 32px; }
  .lightbox-close { top: 8px; right: 8px; }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手機：標題和副標回到照片上方，照片佔半排 */
  .advisor { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .team-intro { grid-column: 1 / -1; order: -1; }
  .sheet-team .side-note { margin-top: 0; }
  .hero { padding-top: 20px; }
  .hero-card { grid-template-columns: 1fr; gap: 16px; padding: 32px 22px; border-radius: 28px; }
  .hero-art { max-width: 360px; margin: 0 auto; width: 100%; }
  .footer-contact { width: 100%; }
  .footer-links a { grid-template-columns: 22px auto; }
  .footer-links .handle { grid-column: 2; margin-top: -6px; }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 4px; }
  .tab-label { font-size: 0.8rem; }
  .folder.is-peek { margin-left: -4px; margin-right: -4px; }
  .preview {
    top: 38px;
    padding: 0 20px;
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }
  .preview-note { grid-column: 1 / -1; grid-row: 2; }
  .preview-date { grid-column: 2; grid-row: 1; }
}
