@import url('https://fonts.googleapis.com/css2?family=Doto:wght@700;900&family=DotGothic16&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
  --red: #E6001E;
  --red-soft: #FDE8EB;
  --ink: #000;
  --paper: #fff;
  --mute: #666;
  --line: #E3E3E3;
  --soft: #F5F5F5;
  --top: 56px;
  --tab: 64px;
  --gutter: max(20px, calc((100% - 1080px) / 2));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Noto Sans TC', system-ui, sans-serif; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 16px; border: 1px solid var(--ink); }
.skip:focus { left: 8px; }

/* 點陣字：拉丁用 Doto、日文與漢字用 DotGothic16，缺字自動回退 Noto Sans TC */
.dot-latin { font-family: 'Doto', ui-monospace, monospace; font-weight: 900; letter-spacing: .02em; }
.dot-cjk { font-family: 'DotGothic16', 'Noto Sans TC', sans-serif; font-weight: 400; }

/* ── 頂部列 ── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper); border-bottom: 1px solid var(--ink);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { font-family: 'DotGothic16', sans-serif; color: var(--red); font-size: 22px; line-height: 1; }
.brand-sub { font-family: 'Doto', monospace; font-weight: 900; font-size: 16px; }
.topnav { display: flex; gap: 28px; }
.topnav a { text-decoration: none; font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--red); }
.topnav a[aria-current="page"] { color: var(--red); border-bottom: 2px dotted var(--red); }
.topbar-prepare { display: none; text-decoration: none; font-size: 14px; border: 1px solid var(--ink); padding: 4px 12px; }
.topbar-prepare[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ── 手機底部 tab bar ── */
.tabbar {
  display: none; position: fixed; inset: auto 0 0 0; z-index: 50;
  height: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper); border-top: 1px solid var(--ink);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-decoration: none; font-size: 13px; color: var(--mute); }
.tabbar a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tabbar a[aria-current="page"] { color: var(--red); font-weight: 500; }
.tabbar a[aria-current="page"]::before { background: var(--red); }

/* ── 版面 ── */
main { padding-top: calc(var(--top) + env(safe-area-inset-top, 0px)); }
main > section { padding: 56px var(--gutter); }
main > section + section { border-top: 2px dotted var(--line); }
main > .hero + section { border-top: 0; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 24px; }
h3 { font-size: 16px; line-height: 1.5; }
.lede { color: var(--mute); font-size: 15px; max-width: 40em; margin: -12px 0 24px; }
.note { font-size: 13px; color: var(--mute); margin-top: 16px; }
.text-link { font-size: 14px; color: var(--red); }

/* ── Hero ── */
.hero { padding-top: 64px; padding-bottom: 40px; border-bottom: 1px solid var(--ink); }
.hero-title { font-family: 'DotGothic16', 'Noto Sans TC', sans-serif; font-weight: 400; color: var(--red); font-size: clamp(44px, 9vw, 96px); line-height: 1.05; }
.hero-sub { margin-top: 16px; font-size: 16px; color: var(--mute); }

/* ── 倒數 ── */
.cd { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); }
.cd-num { display: block; font-family: 'Doto', monospace; font-weight: 900; color: var(--red); font-size: clamp(60px, 13vw, 150px); line-height: 1; }
.cd-label { font-size: 14px; color: var(--mute); }

/* ── 按鈕 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  text-decoration: none; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:disabled { opacity: .4; cursor: not-allowed; background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--paper); color: var(--red); border-color: var(--paper); }
.link-btn { background: none; border: 0; text-decoration: underline; cursor: pointer; font-size: 13px; color: var(--mute); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── 大巨蛋點陣簽到圖（全站的記憶點） ── */
.dome { --cols: 40; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px; max-width: 760px; }
.dome i { aspect-ratio: 1; border-radius: 50%; background: var(--line); }
.dome i.void { background: transparent; }
.dome i.stage { background: var(--ink); border-radius: 0; }
.dome i.on { background: var(--red); }
.dome i.me { outline: 3px solid var(--red-soft); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.dome-caption { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--mute); }
.dome-caption span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--line); }
.dome-caption .k-on::before { background: var(--red); }
.dome-caption .k-stage::before { background: var(--ink); border-radius: 0; }

/* ── 時程階段（真的是時序，所以用日期標示） ── */
.phases { list-style: none; }
.phase { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.phase-date { font-family: 'Doto', monospace; font-weight: 900; font-size: 20px; color: var(--mute); }
.phase-title { display: block; font-weight: 700; font-size: 17px; }
.phase-desc { display: block; font-size: 14px; color: var(--mute); }
.phase-state { font-size: 13px; color: var(--mute); white-space: nowrap; }
.phase.now { background: var(--red-soft); padding-inline: 16px; border-bottom-color: var(--red); }
.phase.now .phase-date, .phase.now .phase-state { color: var(--red); }
.phase.done { opacity: .45; }
.phase:hover .phase-title { color: var(--red); }

/* ── 表單 ── */
.form { max-width: 520px; display: grid; gap: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--mute); margin-top: 4px; }
.input { width: 100%; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); font: inherit; font-size: 16px; appearance: none; }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.input:disabled { background-color: var(--soft); color: var(--mute); }
.form-msg { font-size: 14px; color: var(--red); min-height: 1.5em; }

/* ── 通用列表 ── */
.rows { list-style: none; }
.rows > li { display: grid; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.checkin-row { grid-template-columns: 1fr; }
.checkin-name { font-weight: 700; }
.checkin-meta { font-size: 13px; color: var(--mute); }
.checkin-msg { font-size: 15px; }
.checkin-row.fresh { background: var(--red-soft); padding-inline: 12px; }

/* ── 標籤 ── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 2px 10px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.tag.sing { border-color: var(--red); color: var(--red); }
.tag.clap { border-color: var(--ink); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 6px 16px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ── 歌曲頁 ── */
.wishes { list-style: none; }
.wish { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; }
.wish-rank { font-family: 'Doto', monospace; font-weight: 900; font-size: 24px; color: var(--mute); }
.wish:nth-child(-n+3) .wish-rank { color: var(--red); }
.wish-song { font-weight: 500; }
.wish-ro { font-size: 12px; color: var(--mute); margin-left: 8px; }
.bar { height: 7px; margin-top: 6px; background: radial-gradient(circle, var(--line) 2px, transparent 2.5px) 0 0 / 7px 7px repeat-x; }
.bar span { display: block; height: 100%; background: radial-gradient(circle, var(--red) 2px, transparent 2.5px) 0 0 / 7px 7px repeat-x; }
.wish-count { font-size: 14px; color: var(--mute); white-space: nowrap; }

.setlist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.setlist li { padding: 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.setlist .ja { font-weight: 500; }
.setlist .ro { display: block; font-size: 12px; color: var(--mute); }
.setlist .likely { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--red); }

.chant-list { list-style: none; }
.chant-list a { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.chant-list a:hover .ja { color: var(--red); }
.chant-list .ja { font-size: 17px; font-weight: 700; }
.chant-list .status { font-size: 13px; color: var(--mute); }
.chant-list .status.ready { color: var(--red); }

/* ── 行前準備 ── */
.progress { font-size: 14px; color: var(--mute); margin-bottom: 8px; }
.progress b { font-family: 'Doto', monospace; font-weight: 900; color: var(--red); font-size: 20px; }
.checklist { list-style: none; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 14px; width: 100%; text-align: left; padding: 16px 0; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-box { width: 22px; height: 22px; border: 1px solid var(--ink); display: grid; place-items: center; margin-top: 3px; }
.check[aria-pressed="true"] .check-box { background: var(--red); border-color: var(--red); }
.check[aria-pressed="true"] .check-box::after { content: ''; width: 10px; height: 5px; border: 2px solid var(--paper); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check-title { display: block; font-weight: 700; }
.check[aria-pressed="true"] .check-title { text-decoration: line-through; color: var(--mute); }
.check-desc { display: block; font-size: 14px; color: var(--mute); }

.calc { list-style: none; }
.calc li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.calc-name { font-weight: 500; }
.calc-price { display: block; font-size: 13px; color: var(--mute); }
.qty { display: flex; align-items: center; border: 1px solid var(--ink); }
.qty button { width: 36px; height: 36px; border: 0; background: var(--paper); cursor: pointer; font-size: 18px; }
.qty button:hover { background: var(--ink); color: var(--paper); }
.qty output { min-width: 32px; text-align: center; font-family: 'Doto', monospace; font-weight: 900; }
.calc-sub { min-width: 88px; text-align: right; font-size: 15px; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 20px; margin-top: 4px; border-top: 2px solid var(--ink); }
.calc-total b { font-family: 'Doto', monospace; font-weight: 900; font-size: clamp(32px, 6vw, 48px); color: var(--red); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.ph { background: var(--soft) radial-gradient(circle, #d6d6d6 1.5px, transparent 2px) 0 0 / 10px 10px; display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.sleeve .ph { aspect-ratio: 3 / 2; }
.card-title { font-weight: 700; margin: 12px 0 4px; }
.card-meta { font-size: 13px; color: var(--mute); margin-bottom: 8px; }

.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font-weight: 500; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 24px; color: var(--red); font-family: 'Doto', monospace; font-weight: 900; }
.qa details[open] summary::after { content: '−'; }
.qa details p { padding: 0 0 18px; color: var(--mute); font-size: 15px; }
.draft { display: inline-block; font-size: 12px; color: var(--red); border: 1px solid var(--red); padding: 0 8px; margin-left: 8px; vertical-align: middle; font-weight: 400; }

/* ── 應援市集 ── */
.meet { border: 2px solid var(--ink); padding: 24px; max-width: 640px; }
.meet dl { display: grid; grid-template-columns: 64px 1fr; gap: 10px 16px; margin-top: 12px; }
.meet dt { color: var(--mute); font-size: 14px; }
.work .ph { aspect-ratio: 4 / 5; }
.work-type { font-size: 13px; color: var(--red); margin-top: 12px; }
.work .card-title { margin-top: 2px; }
.ibon .ph { aspect-ratio: 1; }
.ibon-code { font-family: 'Doto', monospace; font-weight: 900; font-size: 22px; letter-spacing: .08em; }
.expire { font-size: 13px; color: var(--red); }

/* ── 遊戲 ── */
.screen { background: var(--ink); color: var(--paper); aspect-ratio: 16 / 10; max-height: 70vh; width: 100%; display: grid; grid-template-rows: auto 1fr; }
.screen-bar { display: flex; gap: 32px; padding: 14px 20px; border-bottom: 1px solid #333; }
.screen-stat span { display: block; font-size: 12px; color: #9a9a9a; }
.screen-stat b { font-family: 'Doto', monospace; font-weight: 900; font-size: 24px; }
.screen-body { display: grid; place-items: center; text-align: center; gap: 12px; background: radial-gradient(circle, #262626 1px, transparent 1.5px) 0 0 / 14px 14px; }
.screen-body p { font-size: 14px; color: #9a9a9a; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.rules h3 { margin-bottom: 6px; }
.rules p { font-size: 15px; color: var(--mute); }
.board > li { grid-template-columns: 40px 1fr auto; align-items: center; }
.board .rank { font-family: 'Doto', monospace; font-weight: 900; font-size: 22px; color: var(--mute); }
.board li:nth-child(-n+3) .rank { color: var(--red); }
.board .name { font-weight: 700; display: block; }
.board .skin { font-size: 13px; color: var(--mute); }
.board .score { font-family: 'Doto', monospace; font-weight: 900; font-size: 20px; }
.collection { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 20px; }
.collection li { text-align: center; font-size: 13px; }
.planet { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; background: var(--c); }
.collection .locked { color: var(--mute); }
.collection .locked .planet { background: var(--soft); border: 1px dashed #bbb; }

/* ── 應援教學單曲頁 ── */
.chant-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.chant-head h1 { font-family: 'DotGothic16', 'Noto Sans TC', sans-serif; font-weight: 400; color: var(--red); font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
.chant-head .ro { font-size: 13px; color: var(--mute); }
.chant-nav { display: flex; gap: 8px; }
.chant { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.video { aspect-ratio: 16 / 9; background: var(--ink); color: #aaa; display: grid; place-items: center; font-size: 14px; text-align: center; padding: 16px; }
.video iframe { width: 100%; height: 100%; border: 0; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.time { font-family: 'Doto', monospace; font-weight: 900; font-size: 20px; min-width: 64px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.toggle input { accent-color: var(--red); width: 16px; height: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tap {
  position: relative; overflow: hidden; margin-top: 20px; height: 150px;
  border: 2px dashed var(--line); background: var(--paper);
  display: grid; place-content: center; text-align: center; gap: 4px;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; cursor: pointer;
}
.tap.live { border: 2px solid var(--red); }
.tap-cue { font-size: 20px; font-weight: 700; }
.tap.live .tap-cue { color: var(--red); }
.tap-count { font-size: 13px; color: var(--mute); }
.ripple { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--red); opacity: .35; transform: translate(-50%, -50%) scale(1); animation: ripple .5s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(14); opacity: 0; } }
.lyrics { list-style: none; max-height: calc(100vh - var(--top) - 180px); overflow-y: auto; border-top: 1px solid var(--ink); position: relative; }
.line { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); padding: 14px 16px; cursor: pointer; }
.line:hover { background: var(--soft); }
.line.current { border-left-color: var(--red); background: var(--red-soft); }
.line .ja { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--mute); }
.line .zh { display: block; font-size: 17px; font-weight: 500; }

/* ── 頁尾 ── */
.site-footer { padding: 32px var(--gutter); border-top: 1px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--mute); }
.site-footer .brand-mark { font-size: 16px; margin-right: 8px; }

/* ── 手機 ── */
@media (max-width: 820px) {
  .topnav { display: none; }
  .topbar-prepare { display: inline-block; }
  .tabbar { display: flex; }
  body { padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px)); }
  main > section { padding-top: 40px; padding-bottom: 40px; }
  .hero { padding-top: 48px; padding-bottom: 32px; }
  .phase { grid-template-columns: 72px 1fr; }
  .phase-state { grid-column: 2; }
  .calc li { grid-template-columns: 1fr auto; }
  .calc-sub { grid-column: 2; }
  .chant { grid-template-columns: 1fr; gap: 20px; }
  .video { position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); z-index: 5; }
  .lyrics { max-height: none; padding-bottom: 88px; }
  .tap { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px)); height: 72px; margin: 0; z-index: 40; border-width: 2px 0 0; }
}

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

/* ══════════════════════════════════════════════════════════
   角色舞台 Hero（首頁）
   景深用「分層視差」做，不用 perspective / preserve-3d：
   3D 渲染脈絡碰上 mix-blend-mode 會讓 Chrome 合成整塊變黑。
   每層自帶 --px / --py（指標位移像素）與 --pz（捲動位移像素），
   .hero3d 上的 --mx / --my / --sy 由 JS 更新後一起帶動。
   ══════════════════════════════════════════════════════════ */
.hero3d {
  position: relative;
  min-height: min(94svh, 900px);
  background: #050505;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  --mx: 0; --my: 0; --sy: 0;
}
main > .hero3d { padding: 0; }
main > .hero3d + section { border-top: 0; }

.hero3d::after { /* 暗角 */
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(125% 90% at 50% 44%, transparent 42%, rgba(0,0,0,.78) 100%);
}

.layer {
  position: absolute; inset: 0; pointer-events: none;
  --px: 0; --py: 0; --pz: 0;
  transform:
    translate3d(calc(var(--mx) * var(--px) * 1px),
                calc(var(--my) * var(--py) * 1px + var(--sy) * var(--pz) * 1px), 0)
    scale(var(--sc, 1));
  transition: transform .6s cubic-bezier(.22,1,.36,1);
}

/* ── 後方霓虹字牆 ── */
.wall { --px: -16; --py: -9; --pz: -70; --sc: 1.06; display: grid; place-items: center; }
.wall-text {
  margin-top: -2vh;
  font-family: 'DotGothic16', 'Noto Sans TC', sans-serif;
  font-size: clamp(120px, 21vw, 300px);
  line-height: .84; letter-spacing: .04em; text-align: center;
  color: #ff1133;
  text-shadow: 0 0 6px #ff2d45, 0 0 26px #e6001e, 0 0 68px rgba(230,0,30,.8), 0 0 140px rgba(230,0,30,.45);
  filter: blur(2.4px); opacity: .82;
  animation: neonFlicker 7s infinite steps(1, end);
}
.wall-text span { display: block; }
.wall-text .l2 { font-size: .5em; letter-spacing: .28em; margin-top: .1em; opacity: .85; }
.wall::before { /* 燈管直紋 */
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 3px, transparent 3px 7px);
}
@keyframes neonFlicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .58; } 94% { opacity: 1; } 96% { opacity: .72; } 97% { opacity: 1; }
}

/* ── 地面紅光 ── */
.bloom { --px: -8; --py: -4; --pz: -40; }
.bloom::before {
  content: ''; position: absolute; left: 50%; bottom: 2%;
  width: 120%; height: 60%; transform: translateX(-50%);
  background: radial-gradient(58% 50% at 50% 72%, rgba(230,0,30,.55), rgba(230,0,30,.12) 46%, transparent 72%);
  filter: blur(28px);
}

/* ── 地板與倒影 ── */
.floor { --px: 10; --py: 5; --pz: 26; }
.floor::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 24%;
  background: linear-gradient(to bottom, rgba(230,0,30,.2), transparent 72%),
              linear-gradient(to bottom, rgba(255,255,255,.055), transparent 60%);
}
.mirror {
  position: absolute; bottom: var(--floor-y); height: var(--doll-h); width: auto;
  opacity: .22; filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 52%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 52%, #000 100%);
}

/* ── 角色 ── */
.hero3d { --doll-h: clamp(290px, 57vh, 520px); --doll-gap: clamp(180px, 23vw, 330px); --floor-y: clamp(12px, 6vh, 58px); }
.cast { --px: 22; --py: 11; --pz: 34; }
/* 角色是「壓克力立牌」：原圖只有正面，立牌本來就是平的，
   所以轉一圈＝正面 → 薄邊 → 反面透光印刷，物理上說得通。 */
.doll {
  position: absolute; bottom: var(--floor-y); height: var(--doll-h);
  pointer-events: auto; cursor: grab; touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.doll.dragging { cursor: grabbing; }
.standee {
  height: 100%; position: relative;
  transform-style: preserve-3d;
  transform: perspective(1400px) rotateY(var(--ry, 0deg));
  transition: transform .95s cubic-bezier(.3, .05, .15, 1);
}
.doll.dragging .standee { transition: none; }
.face {
  height: 100%; width: auto; display: block;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  -webkit-user-drag: none;
  /* 圖檔已去背；霓虹輪廓光用 drop-shadow 疊回來 */
  filter: drop-shadow(0 0 7px rgba(255,60,80,.55)) drop-shadow(0 0 26px rgba(230,0,30,.45));
}
.face-back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  /* 反面＝從背後看印刷面：變暗、降飽和，再補一層壓克力的冷光 */
  filter: brightness(.42) saturate(.55) contrast(1.1)
          drop-shadow(0 0 10px rgba(120,160,255,.35)) drop-shadow(0 0 26px rgba(230,0,30,.25));
}
.edge { /* 轉到側面時的壓克力薄邊 */
  position: absolute; top: 2%; bottom: 2%; left: 50%; width: 7px;
  transform: translateX(-50%) rotateY(90deg);
  background: linear-gradient(to right, rgba(255,255,255,.08), rgba(255,120,140,.45), rgba(255,255,255,.08));
  box-shadow: 0 0 14px rgba(255,70,95,.55);
  border-radius: 3px;
}
.doll-girl,  .mirror-girl { left: calc(50% - var(--doll-gap)); }
.doll-boy,   .mirror-boy  { left: calc(50% + var(--doll-gap)); }
.doll-girl { transform: translateX(-50%); animation: bob 6.5s ease-in-out infinite; }
.doll-boy  { height: calc(var(--doll-h) * .958); transform: translateX(-50%); animation: bob 7.4s ease-in-out -2.6s infinite; }
/* 倒影跟著轉，但不做正反面，模糊到看不出來 */
.mirror-girl { transform: translateX(-50%) perspective(1400px) rotateY(var(--ry-girl, 0deg)) scaleY(-1) translateY(98%); }
.mirror-boy  { height: calc(var(--doll-h) * .958); transform: translateX(-50%) perspective(1400px) rotateY(var(--ry-boy, 0deg)) scaleY(-1) translateY(98%); }
.mirror { transition: transform .95s cubic-bezier(.3, .05, .15, 1); }
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -13px; }
}

/* ── 前景粉塵 ── */
.dust { --px: 40; --py: 20; --pz: 70; opacity: .5; }
.dust i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #ff5f72; box-shadow: 0 0 8px #ff1133;
  animation: drift linear infinite;
}
@keyframes drift {
  from { translate: 0 0; opacity: 0; }
  15%  { opacity: .9; }
  to   { translate: 0 -130px; opacity: 0; }
}

/* ── 文案 ── */
.hero3d-copy {
  position: relative; z-index: 6;
  padding: clamp(68px, 12vh, 140px) var(--gutter) 0;
  text-align: center; color: #fff;
  transform: translate3d(0, calc(var(--sy) * -26px), 0);
  transition: transform .6s cubic-bezier(.22,1,.36,1);
  pointer-events: none;          /* 文案區不要擋住立牌的拖曳 */
}
.hero3d-copy a, .hero3d-copy .btn { pointer-events: auto; }
.hero3d-copy .kicker { color: #ff5a6e; font-size: clamp(16px, 2.6vw, 28px); line-height: 1.1; text-shadow: 0 0 18px rgba(230,0,30,.8); }
.hero3d-copy h1 {
  color: #fff; font-size: clamp(64px, 14.5vw, 185px); line-height: .88; margin: 6px 0 10px;
  text-shadow: 0 0 10px #fff, 0 0 32px rgba(255,45,69,.95), 0 0 88px rgba(230,0,30,.7);
}
.hero3d-copy .date { color: #ffd2d8; font-size: clamp(14px, 2.4vw, 26px); line-height: 1.2; }
.hero3d-copy .hero-sub { color: rgba(255,255,255,.72); font-size: 15px; margin-top: 14px; }
.hero3d-copy .actions { margin-top: 26px; justify-content: center; }
.btn-neon { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 0 28px rgba(230,0,30,.7); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; }

.hero3d-hint {
  position: absolute; left: 50%; bottom: 46px; z-index: 6;
  transform: translateX(-50%);
  font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.42);
  white-space: nowrap;
}
.hero3d-scroll {
  position: absolute; left: 50%; bottom: 14px; z-index: 6; margin-left: -2em;
  font-size: 12px; letter-spacing: .25em; color: rgba(255,255,255,.45);
  animation: bob 2.4s ease-in-out infinite;
}

/* 進場 */
.hero3d [data-in] { opacity: 0; animation: riseIn .9s cubic-bezier(.22,1,.36,1) forwards; }
.hero3d [data-in="1"] { animation-delay: .05s; }
.hero3d [data-in="2"] { animation-delay: .18s; }
.hero3d [data-in="3"] { animation-delay: .32s; }
.hero3d [data-in="4"] { animation-delay: .46s; }
@keyframes riseIn { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 820px) {
  .hero3d { min-height: 88svh; --doll-h: clamp(210px, 36vh, 340px); --doll-gap: 21vw; --floor-y: calc(var(--tab) + 8px); }
  .mirror, .hero3d-hint {
  position: absolute; left: 50%; bottom: 46px; z-index: 6;
  transform: translateX(-50%);
  font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.42);
  white-space: nowrap;
}
.hero3d-scroll { display: none; }
  .hero3d-copy { padding-top: 56px; }
  .wall-text { font-size: clamp(96px, 30vw, 200px); }
}

@media (prefers-reduced-motion: reduce) {
  .layer, .hero3d-copy { transform: none !important; transition: none; }
  .doll, .hero3d-scroll, .wall-text, .dust i { animation: none !important; }
  .standee, .mirror { transition: none !important; }
  .hero3d [data-in] { opacity: 1; animation: none; }
}
