/* ── 色票：米白紙、深藍墨、印泥紅（深色模式換成夜裡的紙） ── */
:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d4;
  --card: #fbf8f1;
  --ink: #1b2433;
  --ink-2: rgba(27, 36, 51, 0.62);
  --line: rgba(27, 36, 51, 0.12);
  --red: #d33a26;
  --gold: #c99a3b;
  --shadow: 0 1px 0 rgba(27, 36, 51, 0.06), 0 12px 32px -12px rgba(27, 36, 51, 0.18);
  --serif: 'Noto Serif TC', 'Songti TC', serif;
  --sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
/* 預設跟系統；導覽列的按鈕可以手動切（記在瀏覽器裡），data-theme 由 <head> 的小腳本決定 */
:root[data-theme='dark'] {
  --paper: #11141b;
  --paper-2: #171b24;
  --card: #1a1f2a;
  --ink: #ede6d6;
  --ink-2: rgba(237, 230, 214, 0.6);
  --line: rgba(237, 230, 214, 0.12);
  --red: #f0573f;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: clip;
}
/* 紙的纖維感 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }

/* ── 導覽列 ── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--red);
  color: #fff8ec;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 236, 0.35);
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.theme-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .moon, :root[data-theme='dark'] .theme-btn .sun { display: none; }
:root[data-theme='dark'] .theme-btn .moon { display: block; }

/* ── 主視覺 ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px clamp(16px, 6vw, 96px) 120px;
  overflow: hidden;
}
.hero-icons { position: absolute; inset: 0; pointer-events: none; }
.hero-icon {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  will-change: transform;
}
.hero-icon img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 23%;
  box-shadow: var(--shadow);
  animation: bob var(--t, 7s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  opacity: 0.92;
}
@keyframes bob {
  from { transform: translateY(-8px) rotate(var(--r, 0deg)); }
  to { transform: translateY(8px) rotate(calc(var(--r, 0deg) * -1)); }
}
.hero-inner { position: relative; max-width: 760px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 22px 0 28px;
}
.verb-slot { display: inline-block; position: relative; color: var(--red); }
.verb { display: inline-block; }
.verb::after {
  /* 毛筆底線 */
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.02em;
  height: 0.16em;
  background: currentColor;
  opacity: 0.14;
  border-radius: 40% 60% 50% 50%;
  transform: rotate(-1.5deg);
}
.verb.slam { animation: slam 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes slam {
  0% { opacity: 0; transform: scale(1.5) rotate(-6deg); filter: blur(3px); }
  60% { opacity: 1; transform: scale(0.96) rotate(1deg); filter: blur(0); }
  100% { transform: scale(1) rotate(0); }
}
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 520px; }
.stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); margin-top: 40px; }
.stats dt { font-size: 12px; color: var(--ink-2); letter-spacing: 0.1em; }
.stats dd { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; }
.stats dd.mono { font-family: var(--mono); font-weight: 700; font-size: clamp(22px, 3vw, 32px); padding-top: 6px; }
.stats small { font-size: 0.42em; font-weight: 700; margin-left: 4px; font-family: var(--sans); }
.scroll-hint {
  position: absolute;
  left: clamp(16px, 6vw, 96px);
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}
.scroll-hint span { width: 1px; height: 36px; background: var(--ink-2); position: relative; overflow: hidden; }
.scroll-hint span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* ── 新作捲動故事 ── */
.story { position: relative; z-index: 2; height: calc(3 * 120vh + 100vh); }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  --v0: 1; --v1: 0; --v2: 0;
  --w0: 1; --w1: 0; --w2: 0;
  --d0: 0; --d1: -1; --d2: -1;
}
.bg { position: absolute; inset: 0; z-index: -2; }
.bg-0 { opacity: var(--w0); background: radial-gradient(ellipse at 70% 45%, #8a1d14 0%, #4a0d09 45%, #230504 100%); }
.bg-1 { opacity: var(--w1); background: radial-gradient(ellipse at 30% 50%, #2a3350 0%, #121a30 50%, #070b16 100%); }
.bg-2 { opacity: var(--w2); background: radial-gradient(ellipse at 65% 45%, #fbf6ea 0%, #efe7d4 55%, #e2d7bd 100%); }
.bg-1::after {
  /* 球桌中線 */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 62%;
  border-top: 2px dashed rgba(255, 255, 255, 0.12);
}

.ghost {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(160px, 30vw, 460px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  pointer-events: none;
  user-select: none;
}
.ghost-0 { -webkit-text-stroke: 2px rgba(240, 196, 110, 0.22); opacity: var(--w0); transform: translate(calc(-50% + var(--d0) * -18vw), -50%); }
.ghost-1 { -webkit-text-stroke: 2px rgba(255, 140, 50, 0.2); opacity: var(--w1); transform: translate(calc(-50% + var(--d1) * -18vw), -50%); font-family: var(--sans); }
.ghost-2 { -webkit-text-stroke: 2px rgba(47, 125, 91, 0.2); opacity: var(--w2); transform: translate(calc(-50% + var(--d2) * -18vw), -50%); }

/* 郵戳：進入第 3 幕才一個一個蓋下去 */
.stamps { position: absolute; inset: 0; z-index: -1; opacity: var(--w2); }
.stamp {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(110px, 13vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid currentColor;
  box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 7px currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  opacity: 0;
  transform: rotate(var(--r)) scale(1.7);
  transition: opacity 0.18s ease-out, transform 0.32s cubic-bezier(0.3, 1.6, 0.5, 1);
  mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.06' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23w)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.06' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23w)'/%3E%3C/svg%3E");
  -webkit-mask-size: cover;
  mask-size: cover;
}
.stamp.in { opacity: 0.85; transform: rotate(var(--r)) scale(1); }
.stamp b { font-size: clamp(14px, 1.5vw, 19px); font-weight: 900; letter-spacing: 0.02em; }
.stamp i { font-style: normal; font-size: 12px; font-weight: 700; }
.stamp em { font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 700; margin-top: 4px; }
.s-green { color: #2f7d5b; }
.s-blue { color: #2a5ea8; }
.s-red { color: #c2352b; }
.s-orange { color: #e07a1c; }

/* 手機：外層 .phone-pos 的位置大小由 JS 寫入 */
.phone-pos { position: absolute; left: 0; top: 0; z-index: 1; will-change: transform; perspective: 1400px; }
.phone-turn { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.phone-act { width: 100%; height: 100%; transform-origin: 50% 85%; }
.phone {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14% / 6.5%;
  padding: 3.2%;
  background: linear-gradient(145deg, #3a3f4a, #0d0f14 40%, #1d2028);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 18px 30px -18px rgba(0, 0, 0, 0.5);
}
.screen {
  position: absolute;
  inset: 3.2%;
  width: 93.6%;
  height: 93.6%;
  object-fit: cover;
  object-position: top;
  border-radius: 11.5% / 5.3%;
}
.screen-0 { opacity: var(--l0, 1); }
.screen-1 { opacity: var(--l1, 0); }
.screen-2 { opacity: var(--l2, 0); }

/* 三幕各自的動作：停在該幕時才播（data-scene 由 JS 寫，轉場中拿掉） */
.stage[data-scene='0'].settled .phone-act { animation: bow 2.1s cubic-bezier(0.45, 0, 0.3, 1) infinite; }
.stage[data-scene='1'].settled .phone-act { animation: swing 1.6s cubic-bezier(0.5, 0, 0.3, 1) infinite; transform-origin: 50% 100%; }
.stage[data-scene='2'].settled .phone-act { animation: walk 0.7s ease-in-out infinite alternate; }
@keyframes bow {
  0%, 18% { transform: rotateX(0) translateY(0); }
  42% { transform: rotateX(42deg) translateY(4%); }
  58% { transform: rotateX(42deg) translateY(4%); }
  82%, 100% { transform: rotateX(0) translateY(0); }
}
@keyframes swing {
  0%, 10% { transform: rotate(-16deg) translateX(-4%); }
  38% { transform: rotate(14deg) translateX(4%); }
  48% { transform: rotate(12deg) translateX(3%); }
  100% { transform: rotate(-16deg) translateX(-4%); }
}
@keyframes walk {
  from { transform: translateY(-1.5%) rotate(-1.5deg); }
  to { transform: translateY(1.5%) rotate(1.5deg); }
}

.pop {
  position: absolute;
  font-family: var(--serif);
  font-weight: 900;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.pop-merit { left: 50%; top: 4%; color: #f6cf72; font-size: clamp(20px, 2.4vw, 30px); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.pop-knock { right: -26%; top: 40%; color: #fff1d0; font-size: clamp(30px, 4vw, 54px); }
.pop-pa { left: -34%; top: 18%; color: #ff9a3c; font-size: clamp(28px, 3.6vw, 48px); }
.pop-kou { left: calc(50% + var(--ball-x, 300px)); top: 22%; color: #fff; font-size: clamp(26px, 3vw, 42px); }
.stage[data-scene='0'].settled .pop-merit { animation: merit 2.1s ease-out infinite; }
.stage[data-scene='0'].settled .pop-knock { animation: knock 2.1s ease-out infinite; }
.stage[data-scene='1'].settled .pop-pa { animation: pa 1.6s ease-out infinite; }
.stage[data-scene='1'].settled .pop-kou { animation: kou 1.6s ease-out infinite; }
@keyframes merit {
  0%, 44% { opacity: 0; transform: translate(-50%, 10px); }
  52% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -70px); }
}
@keyframes knock {
  0%, 42% { opacity: 0; transform: scale(0.6); }
  48% { opacity: 1; transform: scale(1.1); }
  70%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes pa {
  0%, 30% { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  38% { opacity: 1; transform: scale(1.1) rotate(-8deg); }
  60%, 100% { opacity: 0; transform: scale(1) rotate(-8deg); }
}
@keyframes kou {
  0%, 62% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  68% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  88%, 100% { opacity: 0; transform: translate(-50%, 0) scale(1); }
}
.ball {
  position: absolute;
  left: 50%;
  top: 30%;
  width: clamp(14px, 1.6vw, 22px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd9a8, #f07a1a 60%, #b84f05);
  box-shadow: 0 0 24px rgba(240, 122, 26, 0.7);
  opacity: 0;
}
.stage[data-scene='1'].settled .ball { animation: ball 1.6s linear infinite; }
@keyframes ball {
  0%, 36% { opacity: 0; transform: translate(-50%, 0); }
  38% { opacity: 1; transform: translate(-50%, 0); animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1); }
  52% { transform: translate(calc(-50% + var(--ball-x, 300px) * 0.5), -120px); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
  66% { opacity: 1; transform: translate(calc(-50% + var(--ball-x, 300px)), 30px); }
  74% { opacity: 1; transform: translate(calc(-50% + var(--ball-x, 300px) * 1.08), -10px); }
  80%, 100% { opacity: 0; transform: translate(calc(-50% + var(--ball-x, 300px) * 1.1), 0); }
}

/* 文字：寬螢幕左右交替；窄螢幕排在手機下方 */
.scene {
  position: absolute;
  top: 50%;
  width: min(440px, 38vw);
  transform: translateY(calc(-50% + var(--dd, 0) * -60px));
  opacity: var(--vv, 0);
  color: #f8efe0;
}
.side-left { left: clamp(24px, 8vw, 140px); }
.side-right { right: clamp(24px, 8vw, 140px); }
.scene-0 { --vv: var(--v0); --dd: var(--d0); }
.scene-1 { --vv: var(--v1); --dd: var(--d1); }
.scene-2 { --vv: var(--v2); --dd: var(--d2); color: var(--story-ink, #1b2433); }
.scene-tag { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; opacity: 0.8; }
.postmark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-12deg);
  color: #f6cf72;
}
.scene-1 .postmark { color: #ff9a3c; }
.scene-2 .postmark { color: #2f7d5b; }
.scene h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.1;
  margin: 18px 0 18px;
}
.scene h2 small { display: block; font-size: 0.36em; font-weight: 700; opacity: 0.75; margin-top: 8px; letter-spacing: 0.04em; }
.scene p { font-size: clamp(15px, 1.25vw, 17px); }
.scene p + p { margin-top: 10px; }
.scene .muted { color: inherit; opacity: 0.68; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 20px 12px 18px;
  border-radius: 999px;
  background: #f8efe0;
  color: #1b2433;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-btn::before {
  content: '';
  width: 14px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 17' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.07 11.55c-.32.72-.47 1.04-.87 1.68-.57.86-1.37 1.93-2.36 1.94-.88.01-1.1-.57-2.29-.56-1.19.01-1.43.58-2.31.57-1-.01-1.75-.98-2.32-1.84C1.05 11.2.5 8.35 1.46 6.6c.68-1.23 1.95-1.95 3.14-1.95 1.17 0 1.9.57 2.86.57.94 0 1.51-.57 2.86-.57 1.07 0 2.2.58 2.88 1.58a3.62 3.62 0 0 0-1.13 4.72zM9.37 3.02C9.89 2.35 10.28 1.4 10.14.5c-.8.05-1.74.54-2.29 1.23-.5.63-.93 1.6-.77 2.52.88.03 1.79-.47 2.29-1.23z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 17' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.07 11.55c-.32.72-.47 1.04-.87 1.68-.57.86-1.37 1.93-2.36 1.94-.88.01-1.1-.57-2.29-.56-1.19.01-1.43.58-2.31.57-1-.01-1.75-.98-2.32-1.84C1.05 11.2.5 8.35 1.46 6.6c.68-1.23 1.95-1.95 3.14-1.95 1.17 0 1.9.57 2.86.57.94 0 1.51-.57 2.86-.57 1.07 0 2.2.58 2.88 1.58a3.62 3.62 0 0 0-1.13 4.72zM9.37 3.02C9.89 2.35 10.28 1.4 10.14.5c-.8.05-1.74.54-2.29 1.23-.5.63-.93 1.6-.77 2.52.88.03 1.79-.47 2.29-1.23z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5); }
.scene-2 .store-btn, .store-btn.ink { background: #1b2433; color: #f8efe0; }
:root[data-theme='dark'] .store-btn.ink { background: var(--ink); color: var(--paper); }

.story-dots {
  position: absolute;
  right: clamp(12px, 2.4vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-dots button {
  /* 名字隱藏時仍佔寬度，按鈕撐滿才能讓三個點都靠右對齊 */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: none;
  border: 0;
  padding: 4px;
  color: var(--dots, #f8efe0);
  font-size: 12px;
  font-weight: 700;
}
.story-dots button::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background 0.2s, transform 0.2s;
}
.story-dots button span { opacity: 0; transform: translateX(6px); transition: opacity 0.2s, transform 0.2s; }
.story-dots button:hover span, .story-dots button.on span { opacity: 0.85; transform: none; }
.story-dots button.on::after { background: currentColor; transform: scale(1.25); }
.stage.light { --dots: #1b2433; }

/* 聲音開關：瀏覽器要使用者先按過才能出聲，所以預設關 */
.sound-btn {
  position: absolute;
  left: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 3vh, 32px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--dots, #f8efe0);
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}
.sound-btn:hover { opacity: 1; }
.sound-btn svg { width: 18px; height: 18px; }
.sound-btn .wave { display: none; }
.sound-btn[aria-pressed='true'] .wave { display: block; }
.sound-btn[aria-pressed='true'] .mute { display: none; }
.sound-btn[aria-pressed='false'] { animation: nudge 2.4s ease-in-out 1.5s 3; }
@keyframes nudge { 0%, 100% { transform: none; } 8% { transform: rotate(-6deg); } 16% { transform: rotate(5deg); } 24% { transform: none; } }

/* 窄螢幕：手機在上、文字在下（top 由 JS 依手機高度寫入） */
.stage.tall .scene {
  top: var(--text-top, 60%);
  left: 20px;
  right: 20px;
  width: auto;
  transform: translateY(calc(var(--dd, 0) * -40px));
}
.stage.tall .scene h2 { font-size: clamp(32px, 8vw, 46px); margin: 10px 0 8px; }
.stage.tall .scene-tag { gap: 10px; font-size: 12px; }
.stage.tall .postmark { width: 44px; height: 44px; font-size: 9px; }
.stage.tall .scene .muted { display: none; }
.stage.tall .store-btn { margin-top: 14px; padding: 10px 16px 10px 14px; font-size: 13px; }
.stage.tall .story-dots { top: auto; bottom: 18px; right: 50%; transform: translateX(50%); flex-direction: row; }
.stage.tall .story-dots span { display: none; }
.stage.tall .sound-btn { bottom: 12px; padding: 6px 12px 6px 8px; font-size: 12px; }
.stage.tall .pop-knock { right: -38%; }
.stage.tall .pop-pa { left: -42%; }
.stage.tall .stamp { width: clamp(84px, 24vw, 120px); }
.stage.tall .stamp.in { opacity: 0.35; }
.stage.tall .stamp b { font-size: 13px; }
.stage.tall .stamp i, .stage.tall .stamp em { font-size: 9px; }
.stage.short .scene p:not(.scene-tag):not(.muted) { display: none; }

/* ── 跑馬燈 ── */
.marquee {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 7vw, 90px) 0;
  overflow: hidden;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 84px);
  line-height: 1.25;
  white-space: nowrap;
}
.marquee-row { will-change: transform; }
.marquee-row:first-child { color: var(--red); }
.marquee-row.outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink-2); }

/* ── 全部作品 ── */
.apps, .rules, .footer { position: relative; z-index: 1; padding: 0 clamp(16px, 6vw, 96px); }
.apps { padding-bottom: clamp(80px, 10vw, 140px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}
.section-title { font-family: var(--serif); font-weight: 900; font-size: clamp(36px, 5vw, 60px); line-height: 1.2; margin-top: 10px; }
.section-title .count { font-size: 0.4em; color: var(--red); vertical-align: super; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.poe-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px 8px 12px;
  background: var(--red);
  color: #fff8ec;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s;
}
.poe-btn:hover { transform: rotate(-2deg) scale(1.03); }
.poe { display: inline-flex; gap: 2px; }
.poe i {
  width: 10px;
  height: 18px;
  background: #fff8ec;
  border-radius: 100% 0 0 100% / 50% 0 0 50%;
}
.poe i + i { transform: scaleX(-1); }
.poe-btn.throwing .poe i { animation: toss 0.7s cubic-bezier(0.3, 0, 0.4, 1); }
.poe-btn.throwing .poe i + i { animation-name: toss2; animation-delay: 0.05s; }
@keyframes toss { 0% { transform: none; } 50% { transform: translateY(-14px) rotate(200deg); } 100% { transform: rotate(360deg); } }
@keyframes toss2 { 0% { transform: scaleX(-1); } 50% { transform: scaleX(-1) translateY(-14px) rotate(-200deg); } 100% { transform: scaleX(-1) rotate(-360deg); } }
.poe-result { min-height: 1.7em; margin-top: 16px; font-weight: 700; color: var(--red); }

.month { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.month[hidden] { display: none; }
.month-label { position: sticky; top: 88px; align-self: start; }
.month-label b { display: block; font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.month-label span { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: perspective(900px) translateY(var(--rise, 24px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  opacity: var(--fade, 0);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease, box-shadow 0.3s;
  transition-delay: var(--delay, 0s);
}
.card.seen { --rise: 0px; --fade: 1; }
.card:hover { box-shadow: 0 1px 0 var(--line), 0 24px 48px -20px color-mix(in srgb, var(--accent) 55%, transparent); transition-delay: 0s; }
.card[hidden] { display: none; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-icon { width: 64px; height: 64px; border-radius: 23%; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4px var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-14deg);
}
.card-date small { font-size: 11px; opacity: 0.8; }
.card-date b { font-size: 16px; letter-spacing: -0.02em; }
.card h3 { font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.3; margin-top: 18px; }
.card .sub { font-size: 13px; color: var(--ink-2); }
.card .desc { font-size: 14.5px; margin-top: 12px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 13px; }
.kind { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; }
.go { font-weight: 700; color: var(--ink-2); transition: color 0.2s, transform 0.2s; }
.card:hover .go { color: var(--ink); transform: translateX(3px); }
.new-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--red);
  color: #fff8ec;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  transform: rotate(-4deg);
}
/* 擲筊選中的那張 */
.card.picked { outline: 3px solid var(--red); outline-offset: 4px; }
.card.picked::after {
  content: '神明指定';
  position: absolute;
  right: 18px;
  bottom: 54px;
  padding: 6px 10px;
  border: 3px double var(--red);
  border-radius: 6px;
  color: var(--red);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  animation: picked 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes picked { from { opacity: 0; transform: rotate(-14deg) scale(1.8); } to { opacity: 0.9; transform: rotate(-14deg) scale(1); } }

/* ── 三個規矩 ── */
.rules { padding-bottom: clamp(80px, 10vw, 140px); }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.rule {
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
  border: 1.5px solid var(--line);
  opacity: var(--fade, 0);
  transform: translateY(var(--rise, 30px));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s;
  transition-delay: var(--delay, 0s);
}
.rule.seen { --rise: 0px; --fade: 1; }
.rule-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--red);
  color: #fff8ec;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 28px;
  transform: rotate(-5deg);
}
.rule h3 { font-family: var(--serif); font-weight: 900; font-size: clamp(24px, 2.4vw, 32px); margin: 22px 0 10px; }
.rule p { color: var(--ink-2); }

/* ── 頁尾 ── */
.footer { padding-top: 40px; padding-bottom: 48px; border-top: 2px solid var(--ink); margin: 0 clamp(16px, 6vw, 96px); padding-left: 0; padding-right: 0; }
.footer-big { font-family: var(--serif); font-weight: 900; font-size: clamp(52px, 10vw, 140px); line-height: 1.05; letter-spacing: -0.02em; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 13px; }
.footer-row .store-btn { margin-top: 0; }

/* ── 響應式 ── */
@media (max-width: 820px) {
  .month { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .month-label { position: static; display: flex; align-items: baseline; gap: 12px; }
  .month-label span { margin-top: 0; }
  .rule-grid { grid-template-columns: 1fr; }
  .nav-links a:nth-child(3) { display: none; }
  .hero-icon { opacity: 0.9; }
}

/* 減少動態效果：不漂、不轉、不循環；捲動故事保留（由使用者自己捲動推進） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-icon img, .scroll-hint span::after, .verb.slam { animation: none; }
  .stage .phone-act, .stage .pop, .stage .ball { animation: none !important; }
  .card, .rule { --rise: 0px; --fade: 1; transition: none; }
}
