/* 曜室排盤｜繪本剪紙舞台（2026-10-20 第二輪：60 分 → 95 分）
   每一塊都是紙：剪過的邊（遮罩九宮格）、紙紋、帶底色的疊紙陰影；全站一個光源（左上），陰影只分三級。
   裝飾可以歪，閱讀區一定正。顏色平塗，少用漸層（夜藍舞台除外）。動畫只動 transform／opacity。 */
:root {
  --ink: #2b2a26;
  --ink-soft: #4a4a42;
  --pine: #31594d;
  --pine-deep: #244539;
  --muted: #5d625a;
  --quiet: #6f7068;
  --gold: #c99a3a;
  --gold-text: #7e5d1d;
  --gold-soft: #e2c37a;
  --terra: #c46f4e;
  --clay: #a65f4c;
  --verm: #c8553d;          /* 朱紅紙：主要動作 */
  --verm-deep: #96392a;
  --cream: #fffaf0;
  --paper: #f6efe1;
  --kraft: #f0e2c4;
  --line: rgba(110, 86, 48, .24);
  --night: #1f3550;
  --night-deep: #172742;
  --wine: #9c4a55;
  --wine-deep: #7d3743;
  --stage-gold: #d4a64a;
  --tint: 120, 84, 40;      /* 陰影跟著底色走：預設暖褐 */
  --hand: "YaoHand", "Hannotate TC", "PingFang TC", "Noto Sans TC", sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  font-family: var(--sans); color: var(--ink); background: transparent;
  line-height: 1.75; min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* 結果與生日頁：底是一張淡紙紋的紙（舊宣紙退役） */
body.view-result, body.view-birthday-result { background: var(--paper) var(--art-grain) repeat; background-size: 160px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.hand { font-family: var(--hand); font-weight: 400; letter-spacing: .02em; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
a { color: var(--pine); }
:focus-visible { outline: 3px solid #98702f; outline-offset: 3px; }   /* 深一點的金：奶油紙上看得出焦點停在哪（對比約 3.8:1） */
button { font: inherit; color: inherit; }

/* ── 紙張系統 ──
   .lift：外層，只負責陰影（遮罩會把元素自己的陰影一起切掉，所以陰影放外層）。三級：1 貼著、2 卡片、3 浮起。
   紙：剪紙邊遮罩＋紙紋，背景色用 --pp。 */
.lift { filter: drop-shadow(0 1.5px 0 rgba(var(--tint), .26)) drop-shadow(0 6px 7px rgba(var(--tint), .16)); }
.lift.l1 { filter: drop-shadow(0 1px 0 rgba(var(--tint), .28)); }
.lift.l3 { filter: drop-shadow(0 2px 0 rgba(var(--tint), .24)) drop-shadow(0 14px 16px rgba(var(--tint), .22)); }
.ticket, .trait, .product, .reading-card, .reading-offer, .cell, .center, .chart-legend, .sheet-panel,
.birthday-zodiac, .birthday-hua-card, .birthday-pillars, .birthday-help, .reading-context, .t-head, .order-form-copy {
  background-color: var(--pp, var(--cream));
  background-image: var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 16px round;
  mask-border: var(--edge-card) 32 fill / 16px round;
}
/* 撕紙：字條、標籤 */
.torn { -webkit-mask-box-image: var(--edge-torn) 32 fill / 12px round; mask-border: var(--edge-torn) 32 fill / 12px round; }

/* ── 紙片按鈕：一層朱紅紙，底下墊深一階的紙當厚度；按下去會貼下去 ── */
.paper-btn, .reading-primary, .order-primary, .product-buy .go-word, .reading-withheld-label, .cta.primary {
  --btn: var(--verm); --btn-d: var(--verm-deep);
  border: 0; color: #fffaf0; cursor: pointer;
  background: var(--btn) var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 14px round;
  mask-border: var(--edge-card) 32 fill / 14px round;
  box-shadow: inset 0 -5px 0 var(--btn-d), inset 0 2px 0 rgba(255,255,255,.16);
  transition: transform .1s ease, box-shadow .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.paper-btn:active, .reading-primary:active, .order-primary:active:enabled, .reading-withheld-label:active, .cta.primary:active:enabled { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--btn-d); }
.cta.primary:disabled { --btn: #ece2cc; --btn-d: #cfc2a5; color: #6a6456; cursor: default; }
.paper-btn.cream, .cta.secondary { --btn: var(--cream); --btn-d: #d9c9a6; color: var(--pine-deep); }
.paper-btn:disabled { opacity: .75; cursor: progress; }

/* ── 剪紙小圖示（拼圖）── */
.ic { display: inline-block; flex: 0 0 auto; width: 26px; height: 26px; vertical-align: middle; background-repeat: no-repeat; }

/* ── 十四主星小圖（拼圖）── */
.cast {
  display: inline-block; width: 64px; height: 64px; flex: 0 0 auto;
  background-image: var(--art-cast); background-size: 700% 200%; background-repeat: no-repeat;
}

/* ── 幕名：紅色印章（不是膠囊小標籤）── */
.act { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.act-no {
  flex: 0 0 auto; display: inline-block; padding: 3px 10px 2px; transform: rotate(-4deg);
  color: #b4432f; border: 2.5px solid currentColor; border-radius: 5px; outline: 1px solid currentColor; outline-offset: 2px;
  font-size: 17px; letter-spacing: .14em; line-height: 1.3; background: rgba(255,250,240,.35);
}
.act .rule { flex: 1; height: 0; border-top: 2px dashed rgba(var(--tint), .35); }
.sec-title { font-size: clamp(32px, 9vw, 40px); line-height: 1.25; color: var(--pine-deep); }
.sec-note { margin: 4px 0 16px; font-size: 14.5px; color: var(--muted); }
/* ═══════════ 序幕：遊樂園裡的劇場（2026-10-20 本人指定）═══════════
   上半是天空與整座劇場（摩天輪、雲霄飛車、大帳篷、氣球、三角旗），下半是廣場：主星們走過去，售票亭遞出入場券。
   場景都是平塗紙片，紙紋由 .park-top::after 疊一層。動畫只動 transform／opacity。 */
.hero { position: relative; isolation: isolate; }
.park { --sand: #efd5a3; }
.park-top {
  position: relative; z-index: 1;
  /* 天空是三層疊起來的紙：淺藍、霧藍、淡橘，每層上緣是手撕的波浪，底下墊一條深一點的影子當紙的厚度 */
  background:
    radial-gradient(62% 30% at 50% 88%, rgba(255, 222, 160, .7), transparent 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600' preserveAspectRatio='none'%3E%3Cpath d='M0 176C55 158 118 196 198 178S332 156 400 172V600H0Z' fill='%2350708a' fill-opacity='.10'/%3E%3Cpath d='M0 171C55 153 118 191 198 173S332 151 400 167V600H0Z' fill='%23d6e7ec'/%3E%3Cpath d='M0 338C66 318 140 360 214 340S338 320 400 336V600H0Z' fill='%23a06e46' fill-opacity='.10'/%3E%3Cpath d='M0 333C66 313 140 355 214 335S338 315 400 331V600H0Z' fill='%23f6dcc3'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
    #a9d0e6;
}
.park-top::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4; pointer-events: none; background: var(--art-grain); background-size: 160px; opacity: .5; }
.bunting { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 56px; background: var(--art-park-bunting) repeat-x center top / 320px 56px; }
.hero-head { position: relative; z-index: 2; text-align: center; padding: 60px 24px 0; }
.brand { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.brand .mark { font-size: 24px; letter-spacing: .3em; text-indent: .3em; color: var(--night); }
.brand .en { font-size: 11px; letter-spacing: .32em; color: var(--gold-text); }
/* 標題像剪下來貼上去的貼紙字：一圈奶油色描邊＋往右下的一點影子 */
.hero-title { font-size: clamp(40px, 12.4vw, 56px); line-height: 1.16; color: var(--night);
  text-shadow: 2.5px 0 #fffaf0, -2.5px 0 #fffaf0, 0 2.5px #fffaf0, 0 -2.5px #fffaf0, 1.8px 1.8px #fffaf0, -1.8px -1.8px #fffaf0, 1.8px -1.8px #fffaf0, -1.8px 1.8px #fffaf0, 3px 5px 0 rgba(80, 60, 40, .16); }
.hero-title em { font-style: normal; color: var(--verm); }
.sub { margin-top: 6px; font-size: 14px; letter-spacing: .14em; color: #5d4632; }
/* 場景：375×250 的設計稿，用百分比定位，寬螢幕等比放大 */
.park-scene { position: relative; z-index: 1; width: min(100%, 560px); aspect-ratio: 375 / 250; margin: 4px auto -18px; overflow-x: clip; }
.pk-far { position: absolute; left: -.67%; width: 101.33%; top: 8.8%; height: 84%; background: var(--art-park-far) 0 0 / 100% 100% no-repeat; }
.pk-wheel { position: absolute; left: 1.32%; top: 13.33%; width: 36.84%; height: 66.67%; background: var(--art-park-wheel) 0 0 / 100% 100% no-repeat; animation: pk-spin 52s linear infinite; }
.pk-tent { position: absolute; left: 10%; top: 0; width: 80%; height: 100%; background: var(--art-park-tent) 0 0 / 100% 100% no-repeat; }
.pk-balloons { position: absolute; right: 2.4%; top: 3%; width: 21.33%; height: 48%; background: var(--art-park-balloons) 0 0 / 100% 100% no-repeat; animation: pk-float 4.4s ease-in-out infinite alternate; }
/* 帳篷門口的光：一明一暗，像裡面正要開演 */
.pk-glow { position: absolute; left: 41.2%; width: 17.6%; top: 66%; height: 30%; border-radius: 50% 50% 0 0; background: radial-gradient(closest-side, rgba(255, 240, 190, .8), rgba(255, 240, 190, 0)); animation: pk-glow 2.6s ease-in-out infinite alternate; }
@keyframes pk-spin { to { transform: rotate(1turn); } }
@keyframes pk-float { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-9px) rotate(2deg); } }
@keyframes pk-glow { from { opacity: .35; } to { opacity: 1; } }
/* 往下滑：遠景走得比較慢（走近劇場的景深），只有支援捲動動畫的瀏覽器才有 */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .pk-far { animation: pk-drift linear both; animation-timeline: scroll(root block); animation-range: 0 520px; }
  }
}
@keyframes pk-drift { to { transform: translateY(44px); } }
/* 寬螢幕：場景比畫面窄，遠景的樹叢兩端淡出，不要一刀切 */
@media (min-width: 600px) {
  .pk-far { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
}

/* 結果海報與等待劇場（帳篷裡面）仍用夜藍舞台的帷幔與聚光 */
.poster-valance, .th-valance {
  position: absolute; left: 0; right: 0; top: 0; height: 70px; z-index: 3;
  background: var(--art-valance) repeat-x left top / 216px 70px;
}
.spot {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 280px 215px at 50% 255px, rgba(255,241,207,.30), rgba(255,241,207,.10) 58%, transparent 100%);
}

/* 廣場：沙色紙地，主星們從帳篷前走過 */
.park-plaza { padding-bottom: 34px; background: var(--sand) var(--art-grain); background-size: 160px; }
.troupe { position: relative; z-index: 2; height: 80px; margin-top: -42px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.troupe-track { display: flex; gap: 8px; width: max-content; padding: 12px 0 0; animation: parade 46s linear infinite; }
.troupe .cast { width: 62px; height: 62px; cursor: pointer; }
@keyframes parade { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 售票亭：招牌、條紋遮雨棚、兩張海報；窗口挖空，天相在裡面蓋章。圖上的紙紋用遮罩只疊在亭子上 */
.booth { position: relative; z-index: 3; width: 100%; aspect-ratio: 700 / 300; margin: 2px auto -18px; }
.booth::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; pointer-events: none;
  background-image: var(--art-grain), var(--art-park-booth); background-size: 160px, 100% 100%; background-repeat: repeat, no-repeat;
  -webkit-mask: var(--art-park-booth) 0 0 / 100% 100% no-repeat; mask: var(--art-park-booth) 0 0 / 100% 100% no-repeat;
}
.booth-win { position: absolute; z-index: 0; left: 35.14%; top: 44%; width: 29.71%; height: 34.67%; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 0%, rgba(255, 214, 140, .65), rgba(255, 214, 140, 0) 70%), #6e4a30; }
.booth-win .cast { position: absolute; left: 50%; bottom: 2%; width: auto; height: 86%; aspect-ratio: 1; transform: translateX(-50%); animation: pk-stamp 1.2s cubic-bezier(.3, .7, .3, 1) .8s 1 both; }
.booth.stamping .booth-win .cast { animation: pk-stamp-again 1s cubic-bezier(.3, .7, .3, 1) 1 both; }
@keyframes pk-stamp { 0% { transform: translate(-50%, 40%); } 40% { transform: translate(-50%, -14%) rotate(-10deg); } 66% { transform: translate(-50%, 8%) rotate(0); } 100% { transform: translate(-50%, 0); } }
/* 票上的「免費場」：開場跟著天相蓋下去；表單填好時再蓋一次 */
.ticket .stamp { animation: pk-thump .5s cubic-bezier(.3, 1.6, .5, 1) 1.5s both; }
.ticket .stamp.thump { animation: pk-thump-again .5s cubic-bezier(.3, 1.6, .5, 1) .35s both; }
@keyframes pk-thump { from { opacity: 0; transform: rotate(8deg) scale(1.7); } to { opacity: 1; transform: rotate(8deg) scale(1); } }
@keyframes pk-thump-again { 0% { transform: rotate(8deg) scale(1); } 40% { transform: rotate(8deg) scale(1.28); } 100% { transform: rotate(8deg) scale(1); } }
@keyframes pk-stamp-again { 0% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -16%) rotate(-10deg); } 66% { transform: translate(-50%, 8%) rotate(0); } 100% { transform: translate(-50%, 0); } }

/* ═══════════ 入場券（輸入生辰）═══════════
   一張真的票：票頭印劇場名、紅章；票根即時印出你填的場次；欄位像票面上的空白處，填在線上。 */
.ticket-lift { position: relative; margin-top: -8px; --tint: 40, 40, 60; }
.ticket { --pp: #fffaf0; position: relative; padding: 0 0 20px; }
.ticket-top { position: relative; padding: 22px 22px 12px; }
.ticket-kicker { font-size: 12.5px; letter-spacing: .22em; color: var(--gold-text); }
.ticket-title { font-size: 32px; line-height: 1.2; color: var(--night); margin-top: 2px; }
.stamp {
  position: absolute; right: 20px; top: 22px; transform: rotate(8deg);
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  border: 2.5px solid #b4432f; outline: 1px solid #b4432f; outline-offset: 2px;
  color: #b4432f; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-indent: .1em; line-height: 1.1;
  background: rgba(255,250,240,.5);
}
/* 票根：打孔虛線上下夾住，印著你填的資料 */
.ticket-stub {
  position: relative; margin: 2px -8px 16px; padding: 11px 16px 12px;
  background: var(--kraft) var(--art-grain); background-size: 160px;
  border-top: 2px dashed rgba(120,84,40,.38); border-bottom: 2px dashed rgba(120,84,40,.38);
  display: grid; gap: 2px;
}
.stub-label { font-size: 12px; letter-spacing: .2em; color: var(--gold-text); }
.stub-text { font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.stub-text .nb { white-space: nowrap; }
.stub-text .blank { color: #a3967b; font-weight: 500; letter-spacing: .03em; }
.stub-text.empty { color: var(--quiet); }
.ticket-body { padding: 0 22px; }
.field { margin-bottom: 18px; min-width: 0; border: 0; }
.field > label, .field > legend {
  display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--pine-deep); margin-bottom: 4px; padding: 0;
}
.field > label small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--quiet); letter-spacing: .04em; }
.hint { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.5; }
/* 台灣以外出生的第二層城市 */
.field.overseas-field { margin-top: -8px; padding: 8px 0 2px 14px; border-left: 2px dashed #c8b48c; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.duo .field { margin-bottom: 6px; }
/* 欄位＝票面上的空白：字寫在一條墨線上 */
.ticket input[type="text"], .ticket input[type="date"], .ticket input[type="time"], .ticket select {
  width: 100%; min-height: 48px; padding: 8px 2px 6px; border: 0; border-bottom: 2px solid #c8b48c; border-radius: 0;
  background: transparent; color: var(--ink); font: 600 18px/1.3 var(--sans); letter-spacing: .02em;
  appearance: none; -webkit-appearance: none; min-width: 0; display: block;
}
.ticket input::placeholder { color: #b3a68c; font-weight: 500; }
.ticket input::-webkit-date-and-time-value { text-align: left; }
.ticket select {
  padding-right: 30px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2331594d' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 4px center;
}
.ticket input:focus, .ticket select:focus { outline: none; border-bottom-color: var(--verm); background-color: rgba(246,210,122,.16); }
.ticket input:focus-visible, .ticket select:focus-visible { outline: none; box-shadow: 0 3px 0 rgba(200,85,61,.8); }
/* Safari 空白的日期、時間格會顯示今天的日期，看起來像填好了：沒填時字變淡 */
.ticket input:is([type="date"], [type="time"]):invalid::-webkit-datetime-edit { color: #b3a68c; }
.ticket input[type="time"]:disabled { color: var(--quiet); border-bottom-style: dashed; }
/* 不知道時間：手畫勾勾 */
.time-unknown { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0 14px; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; }
.time-unknown input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.time-unknown .tick { position: relative; flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid #b8a37a; border-radius: 4px; background: #fffdf6; transform: rotate(-3deg); }
.time-unknown input:checked + .tick::after {
  content: ""; position: absolute; left: 3px; top: -4px; width: 18px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Cpath d='M2 12 Q6 15 7.5 19 Q11 8 17 2' fill='none' stroke='%23c8553d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.time-unknown input:focus-visible + .tick { outline: 3px solid var(--gold); outline-offset: 2px; }
/* 性別：兩張紙片，選中的那張被剪票機打一個洞 */
.sex .radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.radio-row label {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 50px;
  font-size: 18px; font-weight: 700; color: var(--pine-deep); cursor: pointer;
  background: #f7edd3 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 14px round; mask-border: var(--edge-card) 32 fill / 14px round;
  box-shadow: inset 0 -4px 0 #ddc99b;
}
.radio-row input:checked + label { background-color: var(--pine); color: #fffaf0; box-shadow: inset 0 -4px 0 var(--pine-deep); }
.radio-row input:checked + label::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: #fffaf0; box-shadow: inset 0 2px 2px rgba(0,0,0,.35);
}
.radio-row input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
/* 選填：一張用膠帶貼在票上的小紙條 */
.ticket .reading-context { --pp: var(--kraft); position: relative; min-width: 0; margin: 6px 0 18px; padding: 22px 16px 16px; border: 0; }
/* 紙膠帶貼在便條外面那一層：便條本身有剪紙邊遮罩，膠帶放在便條上會被切掉一半（2026-10-20 本人指出） */
.context-lift { position: relative; }
.context-lift::before {
  content: ""; position: absolute; z-index: 2; left: 50%; top: -3px; width: 84px; height: 18px; margin-left: -42px;
  background: rgba(217,164,65,.8); transform: rotate(-2deg); pointer-events: none;
}
.ticket .reading-context legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-size: 16px; font-weight: 700; color: var(--pine-deep); }
.ticket .reading-context legend span { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--gold-text); }
.ticket .reading-context-note { clear: both; margin: 0 0 10px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.ticket .reading-context-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 14px; }
.ticket .reading-context-fields .field { margin-bottom: 6px; }
.ticket .reading-context-fields label { font-size: 13.5px; }
.ticket .reading-context-fields select { font-size: 16px; }
@media (min-width: 360px) { .ticket .reading-context-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.error-msg { margin: 4px 0 12px; padding: 10px 14px; color: #8b3a2b; font-size: 14.5px; font-weight: 600;
  background: #fbe2da var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 10px round; mask-border: var(--edge-torn) 32 fill / 10px round; }
.go {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; margin-top: 6px;
  font: 700 20px/1 var(--sans); letter-spacing: .24em; text-indent: .24em;
}
/* 朱紅紙上不放黃色或小星星（避開五星旗配色） */
.go-star { display: none; }
.fineprint { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center; }

/* ═══════════ 結果：揭幕 ═══════════ */
main.wrap { position: relative; }
#result { padding-top: 16px; padding-bottom: 8px; }
.poster-lift { --tint: 23, 39, 66; margin-bottom: 26px; }
.poster:focus { outline: none; }
.poster {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 82px 20px 54px; color: #fbf6ea; min-height: 420px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 20px, transparent 20px 52px),
    linear-gradient(180deg, #2a4068, var(--night) 55%, var(--night-deep));
  -webkit-mask-box-image: var(--edge-card) 32 fill / 16px round; mask-border: var(--edge-card) 32 fill / 16px round;
}
.poster .spot { background: radial-gradient(ellipse 230px 190px at 50% 220px, rgba(255,241,207,.30), rgba(255,241,207,.10) 58%, transparent 100%); }
.poster-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: var(--art-floor) repeat-x left top / 216px 48px; z-index: 0; }
.poster .who { position: relative; font-size: 13px; letter-spacing: .28em; text-indent: .28em; color: #e9dcc3; z-index: 1; }
.poster-cast { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: 0; height: 178px; margin: 8px 0 4px; }
.poster-cast .figure { width: 172px; height: 172px; }
/* 主星在台上輕輕呼吸；打招呼的對話框；揭幕的紙花 */
/* 呼吸 8 次（約半分鐘）就停：外層有陰影濾鏡，一直動會一直重畫、耗電（10/21 效能實測）；之後偶爾由 idle() 請主星動一下 */
.poster-cast { animation: breathe 3.4s ease-in-out 8 alternate; transform-origin: 50% 100%; }
@keyframes breathe { from { transform: translateY(0) scale(1); } to { transform: translateY(-3px) scale(1.015); } }
.poster-hi {
  position: absolute; z-index: 3; left: 0; right: 0; top: 104px; width: fit-content; max-width: 80%; margin: 0 auto;
  padding: 6px 13px 7px; border-radius: 14px; background: #fffaf0; color: var(--night);
  font: 700 14px/1.45 var(--sans); letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(23, 39, 66, .35); transform-origin: 50% 100%;
}
.poster-hi::after { content: ""; position: absolute; left: 50%; margin-left: -6px; bottom: -6px; width: 12px; height: 12px; background: #fffaf0; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.confetti { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: 0; display: block; border-radius: 1px; }
.poster-cast.two .figure { width: 132px; height: 132px; margin: 0 -8px; }
.poster-cast.borrow .figure { opacity: .92; }
.borrow-sign {
  position: absolute; right: 8px; top: 18px; z-index: 2; padding: 2px 10px; border-radius: 6px;
  background: var(--cream); color: var(--wine); font: 400 18px/1.4 var(--hand); transform: rotate(6deg);
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.star-name { position: relative; z-index: 1; font-size: clamp(38px, 11vw, 48px); line-height: 1.2; color: #fbf6ea; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.star-name.two { font-size: clamp(32px, 9vw, 42px); }
.poster .kw { position: relative; z-index: 1; margin-top: 8px; font: 700 17px/1.6 var(--serif); letter-spacing: .14em; color: #f6d27a; }
.poster .tag { position: relative; z-index: 1; margin-top: 18px; font-size: 11.5px; letter-spacing: .2em; color: #d9ccb2; }
.poster .tag b { color: #f6d27a; font-weight: 600; }

/* 角色大圖（cast.js）*/
.figure { position: relative; display: inline-block; cursor: pointer; }
.figure .part { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.fx-spark { position: absolute; width: 34%; height: 34%; transform: translate(-50%,-50%); opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, #fff7d6, rgba(255,233,170,.5) 45%, transparent); border-radius: 50%; }
.fx-glow { position: absolute; width: 60%; height: 34%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,226,140,.9), transparent); }

/* ── 每一幕一張不同顏色的紙頁：上下是撕邊，後一頁疊在前一頁上 ── */
.spread { position: relative; isolation: isolate; margin: 0 -16px; padding: 46px 16px 44px; --sp: #f7e8bd; --tint: 140, 100, 30; }
.spread::before, .spread::after {
  content: ""; position: absolute; left: 0; right: 0; pointer-events: none;
  -webkit-mask-box-image: var(--edge-band) 32 0 fill / 16px 0 round; mask-border: var(--edge-band) 32 0 fill / 16px 0 round;
}
.spread::before { top: 0; bottom: 0; z-index: -1; background: var(--sp) var(--art-grain); background-size: 160px; }
/* 紙的厚度：同形狀、深一階、往上錯開一點 */
.spread::after { top: -5px; height: 40px; z-index: -2; background: rgba(var(--tint), .30); }
.spread + .spread { margin-top: -12px; }
.sp-chart { --sp: #f6e6b6; --tint: 140, 100, 30; }
.sp-traits { --sp: #f5d8c6; --tint: 150, 80, 50; }
.sp-reading { --sp: #d5e9da; --tint: 50, 100, 70; }
.sp-more { --sp: #d9e5f1; --tint: 50, 80, 120; }

/* ── 命盤 ── */
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 14px; }
.chart-toggle {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 0; cursor: pointer;
  font-size: 14.5px; font-weight: 700; color: var(--pine-deep);
  background: var(--cream) var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 12px round; mask-border: var(--edge-card) 32 fill / 12px round;
  box-shadow: inset 0 -4px 0 #dccba5;
}
.chart-toggle[aria-pressed="true"] { background-color: var(--pine); color: #fffaf0; box-shadow: inset 0 -4px 0 var(--pine-deep); }
.chart-legend { --pp: #fffdf6; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 14px; font-size: 12.5px; color: var(--ink-soft); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.chart-legend .mut { margin: 0; }
.lg-tag { display: inline-block; padding: 0 4px; font-size: 11px; line-height: 1.6; color: #fff; font-weight: 700; }
.lg-tag.life { background: var(--gold-text); } .lg-tag.body { background: var(--pine); margin-right: 2px; }
.lg-borrow { display: inline-block; width: 18px; height: 13px; border: 1.5px dashed #9c8a66; background: repeating-linear-gradient(135deg, rgba(110,86,48,.12) 0 3px, transparent 3px 6px); }
.chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(108px, auto); gap: 5px;
  filter: drop-shadow(0 1.5px 0 rgba(var(--tint), .3)); }
.cell {
  position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left;
  min-width: 0; padding: 8px 7px 7px; border: 0; --pp: #fffaf0;
  background-image: linear-gradient(var(--tint-c, transparent), var(--tint-c, transparent)), var(--art-grain);
  background-size: auto, 160px;
  cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}
.cell:active { transform: scale(.97); }
.cell[data-row="1"] { grid-row: 1; } .cell[data-row="2"] { grid-row: 2; } .cell[data-row="3"] { grid-row: 3; } .cell[data-row="4"] { grid-row: 4; }
.cell[data-col="1"] { grid-column: 1; } .cell[data-col="2"] { grid-column: 2; } .cell[data-col="3"] { grid-column: 3; } .cell[data-col="4"] { grid-column: 4; }
.cell.is-life { box-shadow: inset 0 0 0 3px rgba(201,154,58,.75); }
.cell.is-borrow { background-image: repeating-linear-gradient(135deg, rgba(110,86,48,.07) 0 6px, transparent 6px 12px), var(--art-grain); }
/* 點開宮位時：本宮、對宮、三合宮標出來（三方四正） */
.cell.sf-self { box-shadow: inset 0 0 0 3px var(--verm); }
.cell.sf-rel { box-shadow: inset 0 0 0 3px rgba(49,89,77,.75); }
.cell-cast { position: absolute; right: 3px; bottom: 44px; width: 30px; height: 30px; opacity: .92; pointer-events: none; }
.cell.is-borrow .cell-cast { display: none; }
.cell .stars { display: flex; flex-wrap: wrap; gap: 0 4px; font-size: 16px; line-height: 1.3; color: var(--ink); padding-right: 2px; }
.cell .stars .star { white-space: nowrap; }
.cell .stars .mut, .cell .minor .mut { position: relative; z-index: 2; }
.cell .stars.empty { color: var(--quiet); }
.cell .borrow { font-size: 11px; line-height: 1.4; color: var(--muted); margin-top: 1px; }
.cell .borrow span { white-space: nowrap; }
.mut {
  display: inline-block; margin-left: 1px; padding: 0 2px; border-radius: 2px; vertical-align: 2px;
  font: 700 11px/1.35 var(--sans); font-style: normal; color: #fff;
}
.mut-祿 { background: #3f7d4f; } .mut-權 { background: #b45d2a; }
.mut-科 { background: #3b6798; } .mut-忌 { background: #a23b2f; }
.cell .minor { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); }
.cell .minor .star-mutagen { white-space: nowrap; }
.cell .minor .mut { font-size: 11px; vertical-align: 1px; }
.cell .adjective, .cell .minor-rest { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 2px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.cell .adjective span { color: #a2445a; white-space: nowrap; }
.cell .minor-rest { display: none; }
.cell .minor-rest span { white-space: nowrap; }
.chart.show-all .minor-rest { display: flex; }
.chart.show-all .more, .chart.show-all .cell-cast { display: none; }
.cell .more { align-self: flex-start; margin-top: 3px; padding: 0 5px; border-radius: 2px; background: rgba(110,86,48,.1); font-size: 11px; line-height: 1.6; color: var(--muted); }
.cell .tag { position: absolute; top: 4px; right: 4px; padding: 0 4px; font-size: 11px; line-height: 1.55; color: #fff; letter-spacing: .04em; font-weight: 700; }
.cell .tag.life { background: var(--gold-text); }
.cell .tag.body { background: var(--pine); }
.cell.has-tag .stars { padding-right: 28px; }
/* 格子底部兩行：上行大限歲數（靠右），下行宮名＋宮干支。窄格放不下「116-125」與宮名同一行，所以分開 */
.cell .foot { margin-top: auto; padding-top: 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "age age" "name gz"; align-items: end; column-gap: 2px; }
.cell .fr { display: contents; }
.cell .pname { grid-area: name; font-size: 13px; line-height: 1.3; color: var(--pine-deep); white-space: nowrap; }
.cell .gz { grid-area: gz; }
.cell .age { grid-area: age; justify-self: end; }
.cell .gz, .cell .age { font-size: 11px; line-height: 1.3; color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell.flash { animation: cellFlash .9s ease; }
@keyframes cellFlash { 50% { transform: scale(1.04); } }
/* 宮格底色淡染該宮主星的代表色 */
.cell[data-star="ziwei"] { --tint-c: rgba(205,191,227,.4); } .cell[data-star="tianji"] { --tint-c: rgba(191,224,230,.45); }
.cell[data-star="taiyang"] { --tint-c: rgba(239,213,143,.42); } .cell[data-star="wuqu"] { --tint-c: rgba(201,212,216,.46); }
.cell[data-star="tong"] { --tint-c: rgba(169,203,189,.4); } .cell[data-star="lian"] { --tint-c: rgba(240,179,179,.38); }
.cell[data-star="tianfu"] { --tint-c: rgba(226,189,99,.34); } .cell[data-star="taiyin"] { --tint-c: rgba(223,227,243,.6); }
.cell[data-star="tanlang"] { --tint-c: rgba(243,194,214,.4); } .cell[data-star="jumen"] { --tint-c: rgba(185,192,207,.42); }
.cell[data-star="tianxiang"] { --tint-c: rgba(184,220,207,.42); } .cell[data-star="liang"] { --tint-c: rgba(199,223,174,.44); }
.cell[data-star="qisha"] { --tint-c: rgba(244,185,138,.36); } .cell[data-star="pojun"] { --tint-c: rgba(236,185,165,.38); }

/* 中宮：個資＋八字四柱（柱色跟著五行）*/
.center {
  --pp: #fffdf7; grid-row: 2 / span 2; grid-column: 2 / span 2; display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; padding: 10px 10px 8px; text-align: left; cursor: pointer; border: 0;
}
.center .row { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; line-height: 1.55; }
.center .k { color: var(--muted); white-space: nowrap; }
.center .v { color: var(--ink); font-weight: 600; text-align: right; word-break: keep-all; overflow-wrap: anywhere; }
.center .bz { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 2px dashed rgba(110,86,48,.28); text-align: center; }
.pillar { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pillar .pl { font-size: 11px; color: var(--quiet); line-height: 1.3; }
.pillar .pg { font: 400 21px/1.15 var(--hand); }
.pillar .pg span { display: block; }
.pillar .ps { font-size: 11px; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.pillar.day .ps { color: var(--gold-text); font-weight: 700; }
.wx-木 { color: #3d7f48; } .wx-火 { color: #c9472f; } .wx-土 { color: #a87018; } .wx-金 { color: #6c7684; } .wx-水 { color: #2c5c95; }
.center-more { align-self: flex-end; margin-top: 4px; font-size: 11.5px; color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.chart-note, .chart-next { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* ── 個性卡（第二幕）：繪本頁。角色從卡片上緣探頭；名牌是一張貼上去的色紙；三句鉤子是撕下來的字條 ── */
.trait-lift { position: relative; margin: 62px 0 26px; }
.t-peek { position: absolute; z-index: 2; right: 18px; top: -58px; width: 104px; height: 104px; pointer-events: auto; }
.t-peek .figure { width: 104px; height: 104px; }
/* 八字那張：日主天干的繪本角色探頭（角色身上不放字）；左邊貼一張五行色的小紙寫「日主 甲」 */
.gan { display: block; width: 104px; height: 104px; background: no-repeat center / contain; }
.gan-tag {
  position: absolute; left: -46px; bottom: 26px; display: grid; justify-items: center; min-width: 50px; padding: 6px 9px 8px;
  background: var(--wx-c, #c98f2e) var(--art-grain); background-size: 160px; color: #fffaf0; text-align: center;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 10px round; mask-border: var(--edge-torn) 32 fill / 10px round;
  transform: rotate(-6deg); pointer-events: none;
}
.gan-tag small { font-size: 11px; letter-spacing: .14em; font-weight: 700; line-height: 1.3; }
.gan-tag b { font: 400 30px/1 var(--hand); }
.gan-tag[data-wx="木"] { --wx-c: #5f9a5a; } .gan-tag[data-wx="火"] { --wx-c: #d0573c; } .gan-tag[data-wx="土"] { --wx-c: #c98f2e; }
.gan-tag[data-wx="金"] { --wx-c: #8a95a3; } .gan-tag[data-wx="水"] { --wx-c: #3f6fa6; }
.trait { --pp: #fffaf0; position: relative; padding: 26px 20px 22px; }
.trait-lift::before {   /* 一段紙膠帶把卡片貼在紙頁上 */
  content: ""; position: absolute; z-index: 3; left: 26px; top: -9px; width: 86px; height: 20px;
  background: rgba(217,164,65,.78); transform: rotate(-4deg);
}
.t-head { --pp: var(--head, #f6e6b6); display: inline-block; padding: 10px 16px 8px; margin: 0 96px 6px 0; }
.trait .t-label { font-size: 12.5px; letter-spacing: .24em; color: var(--gold-text); font-weight: 700; }
.trait h3 { font: 400 28px/1.3 var(--hand); color: var(--pine-deep); margin: 2px 0 0; }
.trait h3 .nb { white-space: nowrap; }
.trait .t-sub { font-size: 14.5px; color: var(--ink-soft); margin: 4px 0 2px; }
.trait .wm { display: none; }
.trait .t-hooks { position: relative; margin: 14px 0 18px; display: grid; gap: 10px; }
.trait .t-hook { position: relative; isolation: isolate; margin: 0; padding: 9px 14px; font: 700 17px/1.75 var(--serif); color: var(--pine-deep); }
/* 字條的紙在 ::before，只有紙歪、字是正的 */
.trait .t-hook::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1;
  background: var(--strip, #fff4cf) var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 10px round; mask-border: var(--edge-torn) 32 fill / 10px round;
  transform: rotate(-.7deg);
}
.trait .t-hook:nth-child(2) { --strip: #fde3d8; } .trait .t-hook:nth-child(2)::before { transform: rotate(.6deg); }
.trait .t-hook:nth-child(3) { --strip: #e1eff6; } .trait .t-hook:nth-child(3)::before { transform: rotate(-.4deg); }
.trait .t-hook .seg { white-space: nowrap; }
.trait p { font-size: 16px; color: var(--ink); line-height: 1.8; }
.trait .t-section { position: relative; margin: 18px 0 0; }
.trait .t-heading { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--pine); line-height: 1.5; margin: 0 0 5px; }
.trait .t-heading .ic { width: 22px; height: 22px; }
.trait .t-section p { margin: 0; }
.trait .t-more { position: relative; margin-top: 16px; }
.trait .t-more summary {
  width: fit-content; min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 16px; cursor: pointer; list-style: none;
  color: var(--pine-deep); font-size: 14.5px; font-weight: 700;
  background: #f7edd3 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 12px round; mask-border: var(--edge-card) 32 fill / 12px round;
  box-shadow: inset 0 -4px 0 #ddc99b;
}
.trait .t-more summary::-webkit-details-marker { display: none; }
.trait .close { position: relative; font: 16.5px/1.85 var(--serif); color: var(--ink); margin: 22px 0 0; padding-top: 14px; border-top: 2px dashed var(--line); }
.trait .hl { background-repeat: no-repeat; background-size: 100% .95em; background-position: 0 .62em; padding: 0 .8mm; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.trait .hl.hl1 { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M2,7 C50,4 120,10 190,6 C235,3 270,8 288,4 L296,7 L292,22 L282,25 C250,27 200,20 140,24 C85,28 30,22 2,25 Z' fill='%23e6cf95' fill-opacity='0.62'/%3E%3C/svg%3E"); }
.trait .hl.hl2 { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M3,5 C45,9 105,3 165,7 C215,10 262,6 294,10 L297,13 L290,24 C255,21 205,27 155,23 C98,18 42,26 5,23 L2,18 Z' fill='%23e3cd9b' fill-opacity='0.66'/%3E%3C/svg%3E"); }
.trait .hl.hl3 { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3ClinearGradient id='f' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23e9d49d' stop-opacity='0.72'/%3E%3Cstop offset='0.78' stop-color='%23e9d49d' stop-opacity='0.6'/%3E%3Cstop offset='1' stop-color='%23e9d49d' stop-opacity='0.12'/%3E%3C/linearGradient%3E%3Cpath d='M2,8 C58,13 108,4 158,10 C208,15 256,5 297,9 L294,25 C250,21 200,29 150,23 C100,17 52,27 3,23 Z' fill='url(%23f)'/%3E%3C/svg%3E"); }

/* ── 終幕：其他商品做成票。角色站在票的上緣探頭，價格大大印在票根上 ── */
.other-readings { margin: 0 0 8px; }
.other-readings > h2 { font-size: 30px; line-height: 1.3; color: var(--pine-deep); margin: 2px 0 6px; }
.product-lift { position: relative; margin: 44px 0 14px; }
.product-art { position: absolute; z-index: 2; left: 16px; top: -38px; display: flex; align-items: flex-end; pointer-events: none; }
.product-art .cast { width: 60px; height: 60px; }
.product-art.duo-art .cast + .cast { margin-left: -18px; }
.product { --pp: #fffaf0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; padding: 26px 0 14px 18px; }
.product-copy { padding: 4px 12px 2px 0; }
.product .pn { font: 400 23px/1.3 var(--hand); color: var(--pine-deep); }
.product .pd { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin-top: 3px; }
/* 生日版：貼在伴侶合盤票上的小紙標（不要藏在最下面的小字） */
.product .pd-note span { display: block; }
/* 有伴侶的人：伴侶合盤票上蓋一枚小章 */
.pick-tag { position: absolute; z-index: 3; right: 14px; top: -12px; padding: 2px 9px; rotate: 5deg;
  border: 2px solid #b4432f; border-radius: 5px; outline: 1px solid #b4432f; outline-offset: 2px;
  background: #fffaf0; color: #b4432f; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; }
.pick-tag[hidden] { display: none; }
.sheet-hook .hook-go { margin-right: 8px; }
.product .pd-note { display: inline-block; margin-top: 6px; padding: 2px 9px 3px; font-size: 12.5px; font-weight: 700; line-height: 1.5; color: var(--clay); rotate: -1deg;
  background: #fbe9e0 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 8px round; mask-border: var(--edge-torn) 32 fill / 8px round; }
.product-buy {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 104px; padding: 0 14px;
  border: 0; border-left: 2px dashed rgba(120,84,40,.38); background: none; cursor: pointer; color: var(--ink);
}
/* 剪票口：虛線上下各一個半圓缺口（顏色跟紙頁一樣，被票的剪紙邊切成半圓） */
.product-buy { position: relative; }
.product-buy::before, .product-buy::after { content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--sp, #d9e5f1); pointer-events: none; }
.product-buy::before { top: -37px; }
.product-buy::after { bottom: -25px; }
.product-buy .price { font: 800 21px/1.1 var(--sans); letter-spacing: .02em; color: var(--pine-deep); white-space: nowrap; font-variant-numeric: tabular-nums; }
.product-buy .go-word { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.product-buy:active .go-word { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--verm-deep); }
.product-buy:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
/* 劃線價：劃掉的價格在售價上面 */
.product-buy .was { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; text-decoration-thickness: 1.5px; margin-bottom: -4px; }
/* 還沒開賣：卡片變灰、按鈕按不下去，價格與說明照樣看得清楚（陰影留在外層 .lift，降價標籤不變灰） */
.product-lift.locked > .product, .product-lift.locked > .product-art { filter: grayscale(1); }
.product-lift.locked > .product-art { opacity: .6; }
/* 降價標籤：左邊朱紅底白色往下箭頭（每隔幾秒往下點一下），右邊日期＋NT$???；不寫字，讓價格自己說話 */
.drop-tag { display: inline-flex; align-items: stretch; width: max-content; border: 2px solid #b4432f; border-radius: 6px; overflow: hidden;
  background: #fffaf0; color: #b4432f; box-shadow: 0 2px 0 rgba(120, 40, 30, .14); }
.drop-arrow { display: flex; align-items: center; justify-content: center; width: 26px; background: #b4432f; color: #fffaf0; }
.drop-arrow svg { width: 14px; height: 14px; fill: currentColor; animation: drop-nudge 3s ease-in-out infinite; }
.drop-text { display: grid; justify-items: start; padding: 2px 9px 3px 7px; line-height: 1.2; }
.drop-text small { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.drop-text b { font-size: 15px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
@keyframes drop-nudge { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(3px); } 80% { transform: none; } 88% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .drop-arrow svg { animation: none; } }
.product-lift > .drop-tag { position: absolute; z-index: 3; right: 12px; top: -26px; rotate: 3deg; }
.tix-face > .drop-tag { margin-top: 9px; rotate: -2deg; }
.order-product-copy > .drop-tag { justify-self: start; margin-top: 5px; rotate: -2deg; }
.product-buy:disabled { cursor: default; }
.product-buy:disabled .go-word { --btn: #6f6f69; --btn-d: #55554f; cursor: default; letter-spacing: .04em; }
.other-readings .fineprint { margin-top: 12px; }
.cta-row { display: grid; gap: 10px; margin-top: 26px; justify-items: stretch; }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 16px;
  text-decoration: none; text-align: center; font-weight: 700; font-size: 16px; letter-spacing: .1em; cursor: pointer;
}
.cta .ic { width: 24px; height: 24px; }
.cta.ghost {
  min-height: 44px; border: 0; color: var(--pine-deep); font-weight: 700; font-size: 15px; letter-spacing: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 Q15 1 30 4 T60 4 T90 4 T119 3' fill='none' stroke='%23c8553d' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center bottom 6px / 70% 7px;
}
#share-link { width: 100%; min-height: 44px; padding: 8px 10px; border: 2px solid #c8b48c; background: #fffdf6; font-size: 15px; }
.purchase-help { margin: 18px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.purchase-help a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }

/* ── 謝幕（頁尾）：剪紙山丘接到夜空 ── */
.hills { height: 66px; margin-top: 30px; background: repeat-x left bottom / 320px 66px; }
.hills.on { background-image: var(--art-hills); }
.curtain-call { padding: 22px 16px 44px; text-align: center; background: var(--night-deep); color: #d9ccb2; }
.troupe-mini { display: grid; grid-template-columns: repeat(7, auto); justify-content: center; gap: 2px 4px; margin: 0 auto 10px; }
.troupe-mini .cast { width: 30px; height: 30px; }
.curtain-call .foot-brand { font-size: 22px; letter-spacing: .4em; text-indent: .4em; color: #fbf6ea; }
.curtain-call p { font-size: 13px; }
.curtain-call .foot-fine { max-width: 520px; margin: 10px auto 0; font-size: 12px; line-height: 1.8; color: #b9ae98; }

/* ── 進場：像把紙放到桌上（微微落下、角度歸正），不是一律淡入上浮 ── */
.reveal { opacity: 0; transform: translateY(-10px) rotate(-.8deg); transition: opacity .4s ease, transform .55s cubic-bezier(.2,.9,.3,1.25); }
.reveal.in { opacity: 1; transform: none; }
/* ═══════════ 第一幕 安星：小劇場（全螢幕）═══════════ */
.theater { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; overflow: hidden; color: #fbf6ea; touch-action: manipulation; }
.th-back { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 22px, transparent 22px 58px), linear-gradient(180deg, #2a4068, var(--night) 50%, var(--night-deep)); }
.th-back .spot { background: radial-gradient(ellipse 310px 280px at 50% 46%, rgba(255,241,207,.26), rgba(255,241,207,.08) 58%, transparent 100%); }
.th-board {
  position: absolute; left: 50%; top: 50%; width: min(86vw, 380px); height: min(92.9vw, 410px); aspect-ratio: 1 / 1.08;
  transform: translate(-50%, -54%); display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 5px;
}
/* 十二格是紙片：先是背面朝上的淡紙，亮起來是奶油色紙，各自歪一點（用 rotate，不跟動畫的 transform 打架） */
/* 盤底陰影：靜態的一塊模糊底，不放在整塊盤的 filter 上（上面的星星一直動，低階手機的顯示晶片會一直重算陰影；10/21 效能實測） */
.th-board::before { content: ""; position: absolute; z-index: -1; top: 6px; right: 2px; bottom: -6px; left: 2px; border-radius: 10px; background: rgba(0,0,0,.24); filter: blur(9px); }
.th-box { position: relative; background: rgba(251,246,234,.16) var(--art-grain); background-size: 160px; opacity: .55;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 10px round; mask-border: var(--edge-card) 32 fill / 10px round; }
.th-box:nth-child(4n+1) { rotate: -1.2deg; } .th-box:nth-child(4n+2) { rotate: .8deg; } .th-box:nth-child(4n+3) { rotate: -.5deg; } .th-box:nth-child(4n) { rotate: 1.1deg; }
.th-box.lit { background-color: var(--cream); opacity: 1; }
.th-box.life { box-shadow: inset 0 0 0 3px rgba(222,170,60,.95); }
.th-back::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: var(--art-floor) repeat-x left top / 216px 48px; }
.theater:has(.th-sign:not([hidden])) .th-cap, .theater:has(.th-sign:not([hidden])) .th-hint { visibility: hidden; }
.th-box .th-name { position: absolute; left: 6px; bottom: 3px; font: 400 12px/1.3 var(--hand); color: var(--pine-deep); opacity: 0; }
.th-box.lit .th-name { opacity: 1; }
.th-box .th-tag { position: absolute; right: 0; top: 0; padding: 0 5px; border-radius: 0 6px 0 6px; background: var(--pine); color: #fff; font-size: 11px; line-height: 1.6; }
.th-box .th-stars { position: absolute; top: 4px; right: 2px; bottom: 20px; left: 2px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 0; }
.th-box .th-stars .cast { width: 36px; height: 36px; margin: -3px; }
.th-box .mut { position: absolute; top: 3px; left: 4px; }
.th-box .mut + .mut { left: 20px; }
.th-center { grid-row: 2 / span 2; grid-column: 2 / span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.th-center .th-ju { font: 400 28px/1.2 var(--hand); color: #f6d27a; opacity: 0; }
.th-center .th-ju small { display: block; font: 600 12px/1.6 var(--sans); color: #e9dcc3; letter-spacing: .2em; }
/* 10/21 安星細節：命宮聚光、五行局漣漪、主星落地星點、八字四柱小卡 */
.th-center { position: relative; }
.th-box .th-glow { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: .4; box-shadow: inset 0 0 0 3px rgba(246,210,122,.95), inset 0 0 22px rgba(246,210,122,.75); }
.th-ripple { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px solid rgba(246,210,122,.7); opacity: 0; pointer-events: none; }
.th-spark { position: absolute; z-index: 6; width: 6px; height: 6px; border-radius: 50%; background: #f6d27a; box-shadow: 0 0 6px rgba(246,210,122,.9); pointer-events: none; }
.th-bz { display: flex; gap: 4px; margin-top: 10px; }
.th-pz { display: flex; flex-direction: column; align-items: center; width: 30px; padding: 3px 0 4px; border-radius: 6px; background: rgba(251,246,234,.94); }
.th-pz.day { box-shadow: 0 0 0 2px rgba(222,170,60,.95); }
.th-pz small { font-size: 11px; line-height: 1.3; color: var(--quiet); }
.th-pz b { font: 400 16px/1.1 var(--hand); }
.th-fly { position: absolute; z-index: 5; width: 40px; height: 40px; pointer-events: none; }
.th-cap { position: absolute; left: 0; right: 0; bottom: calc(15% + env(safe-area-inset-bottom)); text-align: center; font: 600 17px/1.5 var(--sans); letter-spacing: .18em; color: #fbf6ea; }
.th-hint { position: absolute; left: 0; right: 0; bottom: calc(10% + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; letter-spacing: .14em; color: rgba(233,220,195,.8); }
.th-curtain { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 8; pointer-events: none; will-change: transform; }
.th-curtain span { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--art-curtain) no-repeat center / 100% 100%; }
.th-l { left: 0; transform: translateX(-100%); }
.th-r { right: 0; transform: translateX(100%); }
.th-r span { transform: scaleX(-1); }
.th-valance { z-index: 9; }
.th-sign { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: rgba(23,39,66,.55); }
.sign-cast { width: 132px; height: 132px; margin-bottom: -18px; z-index: 1; }
.sign-cast .figure { width: 132px; height: 132px; }
.sign-lift { width: min(100%, 360px); --tint: 10, 14, 30; }
.sign-board { width: 100%; padding: 26px 20px 18px; color: var(--ink); text-align: center;
  background: var(--cream) var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 16px round; mask-border: var(--edge-card) 32 fill / 16px round; }
.sign-title { font-size: 30px; color: var(--wine); }
.sign-msg { margin: 6px 0 16px; font-size: 15px; color: var(--ink-soft); }
.sign-actions { display: grid; gap: 6px; }
body.theater-open { overflow: hidden; }

/* ═══════════ 宮位卡片（從下方彈出）═══════════ */
.sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 70; }
.sheet-scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(40, 28, 18, .45); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  margin: 0 auto; max-width: 560px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  --pp: var(--cream); color: var(--ink); padding-top: 18px;
}
.sheet-panel:focus { outline: none; }
.sheet-grip { display: block; width: 44px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: rgba(110,86,48,.3); }
.sheet-close { position: absolute; right: 8px; top: 6px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.sheet-head .figure { width: 104px; height: 104px; flex: 0 0 104px; }
.sheet-head .figure + .figure { margin-left: -36px; }
.sheet-title { font-size: 30px; line-height: 1.25; color: var(--pine-deep); }
.sheet-sub { font-size: 14px; color: var(--muted); }
.sheet-stars { margin: 10px 0 2px; font: 400 24px/1.4 var(--hand); color: var(--ink); }
.sheet-stars.is-empty { display: inline-block; padding: 2px 12px 3px; font: 700 14px/1.6 var(--sans); letter-spacing: .12em; color: var(--clay); rotate: -2deg;
  background: #fbe9e0 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 8px round; mask-border: var(--edge-torn) 32 fill / 8px round; }
.sheet-stars .mut { font-size: 13px; vertical-align: 4px; }
.sheet-kw { font: 700 15px/1.6 var(--serif); color: var(--gold-text); }
.sheet-list { margin: 12px 0 0; padding: 10px 0 0; border-top: 1.5px dashed var(--line); display: grid; gap: 8px; }
.sheet-row { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; font-size: 15px; line-height: 1.6; }
.sheet-row dt { color: var(--muted); }
.sheet-row dd { color: var(--ink); }
.sheet-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(201,154,58,.12); font-size: 14px; color: var(--ink-soft); }
.sheet-head .figure.borrowed { opacity: .55; }
.sheet-nav { display: flex; justify-content: space-between; margin-top: 8px; }
.pillar-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.pillar-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 3px 9px; text-align: center;
  background: #fbf0d6 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 10px round; mask-border: var(--edge-card) 32 fill / 10px round; }
.pillar-card:nth-child(odd) { rotate: -1deg; } .pillar-card:nth-child(even) { rotate: .8deg; }
.pillar-card .pl { font-size: 12px; color: var(--muted); }
.pillar-card .gz { display: block; font: 400 26px/1.15 var(--hand); }
.pillar-card .gz span { display: block; }
.pillar-card .ps { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 3px; font-size: 12px; font-weight: 700; color: var(--pine-deep); background: rgba(49, 89, 77, .1); }
.pillar-card .pn2, .pillar-card .pn3 { font-size: 11px; color: var(--quiet); line-height: 1.5; }
.pillar-card .pn3 { align-self: stretch; margin-top: 3px; padding-top: 4px; border-top: 1.5px dashed rgba(120, 84, 40, .3); }
.pillar-card .pn3.ling { color: var(--gold-text); font-weight: 700; }


/* 宮位卡片：三方四正小地圖 */
.sf-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--line); }
.sf-map { display: grid; grid-template-columns: repeat(4, 30px); grid-template-rows: repeat(4, 24px); gap: 3px; }
.sf-map span { display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--quiet); background: #efe4cc; border-radius: 2px; }
.sf-map .mid { grid-row: 2 / span 2; grid-column: 2 / span 2; background: none; }
.sf-map .on { background: var(--verm); color: #fffaf0; font-weight: 700; }
.sf-map .rel { background: var(--pine); color: #fffaf0; font-weight: 700; }
.sf-text { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.sf-text b { color: var(--pine-deep); }
/* 三方四正的「然後呢」：這四宮裡的祿忌落在哪 */
.sf-sum { grid-column: 1 / -1; margin-top: 2px; padding: 9px 13px; font-size: 14.5px; line-height: 1.75; color: var(--ink);
  background: var(--kraft) var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-torn) 32 fill / 10px round; mask-border: var(--edge-torn) 32 fill / 10px round; }
/* 本宮狀況：空宮、本宮生年四化、身宮 */
/* 本宮狀況：一張淡黃便條，兩句之間一條虛線 */
.sheet-read { margin-top: 16px; padding: 13px 15px 12px; background: #fbf1cf var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 12px round; mask-border: var(--edge-card) 32 fill / 12px round; }
.sheet-read p { font-size: 14.5px; line-height: 1.75; color: var(--ink); }
.sheet-read p + p { margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed rgba(120, 84, 40, .28); }
/* 這一宮的一題：一張貼上去的便條 */
.sheet-hook {
  position: relative; margin-top: 16px; padding: 16px 16px 16px;
  background: #fdf1d8 var(--art-grain); background-size: 160px;
  -webkit-mask-box-image: var(--edge-card) 32 fill / 14px round; mask-border: var(--edge-card) 32 fill / 14px round;
}
.hook-label { font-size: 12.5px; font-weight: 700; letter-spacing: .2em; color: var(--gold-text); }
.hook-q { margin-top: 4px; font: 800 18.5px/1.55 var(--sans); color: var(--pine-deep); text-wrap: pretty; }
.hook-ch { margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.hook-go { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 6px 18px 10px; font: 700 15px/1.3 var(--sans); letter-spacing: .06em; }
/* ═══════════ 生日速查（不知道出生時間）═══════════ */
.paper-page { padding: 28px 0 40px; }
#birthday-result > .kicker { color: var(--gold-text); font-weight: 700; font-size: 13px; letter-spacing: .25em; margin-bottom: 8px; }
#birthday-title { color: var(--pine-deep); font-size: clamp(30px, 8.6vw, 38px); line-height: 1.3; }
.birthday-intro { color: var(--muted); font-size: 15px; margin: 10px 0 20px; line-height: 1.8; }
.birthday-zodiac { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; color: var(--pine); font-size: 14px; }
.birthday-zodiac strong { font-size: 34px; line-height: 1; color: var(--pine-deep); }
.birthday-zodiac small { margin-left: auto; color: var(--muted); font-size: 12px; }
.birthday-section { margin-top: 22px; }
.birthday-section h3, .birthday-help h3 { color: var(--pine-deep); font: 700 18px/1.5 var(--serif); margin-bottom: 6px; letter-spacing: .04em; }
.birthday-caption { color: var(--muted); font-size: 13px; line-height: 1.8; }
.birthday-hua { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.birthday-hua-card { border-radius: 10px; padding: 12px 3px; text-align: center; }
.birthday-hua-card span { font-size: 13px; color: var(--muted); }
.birthday-hua-card strong { display: block; font: 400 22px/1.3 var(--hand); color: var(--pine-deep); margin-top: 6px; }
.birthday-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; padding: 12px 0; border-radius: 12px; }
.birthday-pillars > div { text-align: center; min-width: 0; }
.birthday-pillars > div + div { border-left: 1px dashed var(--line); }
.birthday-pillars span { display: block; color: var(--muted); font-size: 13px; }
.birthday-pillars small { color: var(--gold-text); font-size: 11px; }
.birthday-pillars strong { display: block; color: var(--pine-deep); font: 400 28px/1.3 var(--hand); margin-top: 4px; }
.birthday-pillars strong.pending { font: 600 15px var(--sans); padding-top: 8px; }
.birthday-day-master { color: var(--muted); font-size: 13px; margin: 12px 0 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.birthday-day-master strong { color: var(--pine); font: 700 18px var(--serif); }
.birthday-day-master span { margin-left: auto; font-size: 12px; }
.birthday-boundary { color: var(--clay); font-size: 14px; line-height: 1.8; margin-top: 10px; }
.birthday-help { margin-top: 24px; padding: 18px; border-radius: 12px; }
.birthday-help p { color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.birthday-help h3:not(:first-child) { margin-top: 18px; }


/* 最窄的手機（320～359）：格子底部只放歲數和宮名，干支點開宮位卡看；角色小圖縮小 */
@media (max-width: 359px) {
  .cell .foot { grid-template-areas: "age age" "name name"; }
  .cell .gz { display: none; }
  .cell-cast { width: 22px; height: 22px; }
  /* 命宮、身宮的小牌占掉右上角：星名改從牌子下面開始，「空宮」才不會被擠成直的 */
  .cell.has-tag .stars { padding-right: 0; margin-top: 15px; }
  /* 中宮的農曆日期很長：最窄時拿掉「農曆」兩字，日期一行放得下 */
  .center .row:has(.v[data-c="lunar"]) .k { display: none; }
  .center .v[data-c="lunar"] { white-space: nowrap; }
}
.poster .who .nb, .reading-service-process .nb { white-space: nowrap; }

/* 用空格分段的短句：只在空格或標點換行，不把「感情」這種詞拆成兩行（一段長到放不下才硬拆） */
.sheet-note, .product .pd, .sec-note, .fineprint, .reading-intro-note, .reading-offer-intro,
.reading-service-process, .reading-service-note, .reading-delivery { word-break: keep-all; overflow-wrap: anywhere; }

/* ═══════════ 較寬的螢幕 ═══════════ */
@media (min-width: 430px) {
  .cell-cast { width: 34px; height: 34px; }
  .cell .stars { font-size: 17px; }
}
@media (min-width: 720px) {
  .hero-head { padding-top: 76px; }
  .troupe { height: 100px; margin-top: -52px; }
  .troupe .cast { width: 80px; height: 80px; }
  .wrap { max-width: 640px; }
  .chart { grid-auto-rows: minmax(128px, auto); gap: 7px; }
  .cell { padding: 10px 10px 8px; }
  .cell-cast { width: 40px; height: 40px; }
  .center .row { font-size: 13px; }
  .pillar .pg { font-size: 26px; }
  .poster-cast { height: 210px; }
  .poster-cast .figure { width: 204px; height: 204px; }
  .spread { margin: 0; padding-left: 28px; padding-right: 28px; }
  .spread::before, .spread::after { left: calc(50% - 50vw); right: calc(50% - 50vw); }
}

/* 不支援遮罩九宮格的瀏覽器（例如 Firefox）：退回圓角紙，內容與功能相同 */
@supports not ((-webkit-mask-box-image: none) or (mask-border: none)) {
  .ticket, .trait, .product, .reading-card, .reading-offer, .cell, .center, .chart-legend, .sheet-panel, .poster,
  .birthday-zodiac, .birthday-hua-card, .birthday-pillars, .birthday-help, .reading-context, .t-head, .order-form-copy,
  .paper-btn, .reading-primary, .order-primary, .product-buy .go-word, .reading-withheld-label, .radio-row label, .chart-toggle, .t-more summary { border-radius: 12px; }
  .spread::before, .spread::after { border-radius: 0; }
}

/* 減少動態：遊行停下、所有過場改淡入（stage.js 也會照這個設定）*/
@media (prefers-reduced-motion: reduce) {
  .troupe-track, .poster-cast, .pk-wheel, .pk-balloons, .pk-glow, .booth-win .cast, .ticket .stamp { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cell, .paper-btn { transition: none; }
}
/* 量到掉幀時的輕量模式 */
.motion-lite .troupe-track { animation-duration: 80s; }
.motion-lite .pk-wheel, .motion-lite .pk-balloons, .motion-lite .pk-glow, .motion-lite .poster-cast { animation: none; }
/* 「曜室 IG 貼文」連結：字小，點擊範圍加大到 44px 高（10/21 效能實測） */
.chart-next a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
