/* Purr & Roll — 夜市主題網站。配色跟 App 的 Theme.swift 一致。 */
:root {
  --night: #272957;
  --night-top: #3b3d80;
  --night-deep: #18193a;
  --panel: #1e1f45;
  --card: #29295a;
  --chip: #35366e;
  --outline: #4a3438;
  --ink: #2a1e22;
  --lantern: #f2546a;
  --orange: #ffa552;
  --gold: #ffcf5a;
  --cream: #fff6e8;
  --teal: #4fd1b5;
  --pink: #ff77aa;
  --purple: #9b7bf5;
  --muted: #bdbae6;
  --wood-top: #ce9160;
  --wood-bottom: #9c6643;
  --cloth-top: #cf4552;
  --cloth-bottom: #a22f42;
  --font: "Huninn", ui-rounded, "SF Pro Rounded", "PingFang TC", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: min(1180px, calc(100vw - 48px));
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--night-deep);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* 細微的底片顆粒，讓大面積色塊不會太「數位」 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: normal; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.wrap { width: var(--wrap); margin: 0 auto; position: relative; }
.narrow { width: min(820px, calc(100vw - 48px)); }

/* MARK: 頁首 */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  transition: background 0.4s, box-shadow 0.4s, height 0.4s;
}
.site-header.scrolled {
  background: rgba(24, 25, 58, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; letter-spacing: 0.5px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color 0.2s; position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transition: transform 0.3s var(--ease-out); }
.site-nav a:hover { color: var(--cream); }
.site-nav a:hover::after { transform: scaleX(1); }
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); font-size: 13px; }
.lang-switch a, .lang-switch span { padding: 4px 10px; border-radius: 99px; text-decoration: none; color: var(--muted); }
.lang-switch span { background: var(--cream); color: var(--ink); }
.lang-switch a:hover { color: var(--cream); }
.nav-cta {
  text-decoration: none; font-size: 15px; color: var(--ink);
  background: var(--gold); padding: 8px 16px; border-radius: 14px;
  border: 2.5px solid var(--outline); box-shadow: 0 4px 0 var(--outline);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }

/* MARK: 首屏 */
.hero {
  position: relative;
  min-height: clamp(760px, 100svh, 1000px);
  padding-top: calc(var(--header-h) + 36px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(155, 123, 245, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 35% at 15% 20%, rgba(255, 150, 70, 0.14), transparent 70%),
    linear-gradient(180deg, #3b3d80 0%, #2c2e66 45%, #1d1e45 100%);
  isolation: isolate;
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.bokeh i {
  position: absolute; border-radius: 50%; filter: blur(18px); opacity: 0.5; z-index: -1;
  animation: float 14s ease-in-out infinite;
}
.bokeh i:nth-child(1) { width: 120px; height: 120px; left: 8%; top: 38%; background: #ff9646; }
.bokeh i:nth-child(2) { width: 70px; height: 70px; left: 26%; top: 62%; background: #ff6f91; animation-delay: -3s; }
.bokeh i:nth-child(3) { width: 90px; height: 90px; left: 58%; top: 18%; background: #ffcf5a; animation-delay: -6s; opacity: 0.35; }
.bokeh i:nth-child(4) { width: 140px; height: 140px; right: 4%; top: 50%; background: #9b7bf5; animation-delay: -9s; opacity: 0.3; }
.bokeh i:nth-child(5) { width: 50px; height: 50px; left: 44%; top: 70%; background: #4fd1b5; animation-delay: -2s; opacity: 0.35; }
.bokeh i:nth-child(6) { width: 80px; height: 80px; right: 24%; top: 8%; background: #ff9646; animation-delay: -11s; opacity: 0.3; }
@keyframes float { 50% { transform: translate(20px, -24px) scale(1.08); } }

/* 燈籠串：跟 App 的 LanternString 同造型（有小貓耳） */
.lantern-string { position: absolute; left: 0; right: 0; height: 120px; pointer-events: none; z-index: 2; }
.lantern-string.top { top: calc(var(--header-h) - 10px); }
.lantern-string.bottom { top: 0; }
.lantern-string .rope { position: absolute; inset: 0 0 auto 0; width: 100%; height: 60px; }
.lantern {
  position: absolute; left: var(--x); top: var(--drop);
  width: 34px; height: 44px; margin-left: -17px;
  transform-origin: 50% -10px;
  animation: sway 3.6s ease-in-out infinite;
  animation-delay: var(--d);
  rotate: calc(var(--sway, 0) * 1deg);
}
.lantern::before { /* 吊繩 */
  content: ""; position: absolute; left: 50%; top: -10px; width: 2px; height: 12px; margin-left: -1px; background: #3a2f2a;
}
.lantern::after { /* 燈身 */
  content: ""; position: absolute; inset: 4px 0 0;
  border-radius: 46% 46% 42% 42% / 50% 50% 46% 46%;
  background:
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(0, 0, 0, 0.13) 7px 8px),
    radial-gradient(circle at 50% 40%, #ffe3a3 0%, var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: 0 0 24px 4px color-mix(in srgb, var(--c) 60%, transparent), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  border: 2px solid #3a2f2a;
}
.lantern.red { --c: #e5413f; }
.lantern.orange { --c: #f58a2e; }
.lantern .ears::before, .lantern .ears::after {
  content: ""; position: absolute; top: 1px; width: 0; height: 0; z-index: 1;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid #3a2f2a;
}
.lantern .ears::before { left: 6px; transform: rotate(-12deg); }
.lantern .ears::after { right: 6px; transform: rotate(12deg); }
.lantern .glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), transparent 65%); z-index: -1; animation: flicker 2.8s ease-in-out infinite; animation-delay: var(--d); }
@keyframes sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes flicker { 0%, 100% { opacity: 0.9; } 40% { opacity: 0.65; } 60% { opacity: 1; } }

.hero-grid {
  width: var(--wrap); margin: 0 auto; padding-bottom: 200px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center;
  position: relative; z-index: 3;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; letter-spacing: 1.5px; color: var(--teal);
  padding: 6px 14px; border-radius: 99px; background: rgba(79, 209, 181, 0.1); border: 1px solid rgba(79, 209, 181, 0.35);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* 大字標題：跟 App 標題一樣的粗描邊＋漸層 */
.wordmark {
  margin-top: 22px;
  font-size: clamp(64px, 10.5vw, 156px);
  line-height: 0.92;
  letter-spacing: -1px;
  white-space: nowrap;
}
.wordmark .word, .wordmark .amp { display: inline-block; position: relative; }
.wordmark .word { /* 本體是描邊層，::after 疊上漸層填色 */
  color: var(--outline);
  -webkit-text-stroke: 0.13em var(--outline);
  filter: drop-shadow(0 8px 0 var(--outline));
}
.wordmark .word::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  -webkit-text-stroke: 0;
  color: transparent;
  background: linear-gradient(180deg, #fffdf5 25%, #ffd9c7 100%);
  -webkit-background-clip: text; background-clip: text;
}
.wordmark .amp { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 800; color: var(--gold); font-size: 0.62em; transform: translateY(-0.12em) rotate(-8deg); filter: drop-shadow(0 5px 0 var(--outline)); margin: 0 0.04em; }
.wordmark.ready .word { animation: pop-in 0.9s var(--ease-spring) both; }
.wordmark.ready .word:last-child { animation-delay: 0.12s; }
.wordmark.ready .amp { animation: spin-in 0.9s var(--ease-spring) 0.06s both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(40px) scale(0.85); } }
@keyframes spin-in { from { opacity: 0; transform: translateY(-0.12em) rotate(-180deg) scale(0.3); } }

.hero-sub {
  margin-top: 16px;
  font-size: clamp(24px, 3.2vw, 40px);
  letter-spacing: 0.3em;
  color: #ffe3a3;
  text-shadow: 0 0 18px rgba(255, 165, 82, 0.7), 0 2px 0 #a8552a;
}
.lang-en .hero-sub { letter-spacing: 0.12em; font-size: clamp(18px, 2.2vw, 26px); text-transform: uppercase; }
.hero-tagline { margin-top: 18px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); max-width: 30em; }
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--muted); }
.store-badge { position: relative; display: inline-block; transition: transform 0.25s var(--ease-spring); }
.store-badge img { height: 54px; width: auto; }
.store-badge.big img { height: 66px; }
.store-badge:hover { transform: translateY(-2px) scale(1.03); }
.store-badge.soon img { opacity: 0.92; }
.soon-tag {
  position: absolute; top: -10px; right: -12px;
  font-size: 12px; color: var(--ink); background: var(--gold);
  padding: 2px 9px; border-radius: 8px; border: 2px solid var(--outline);
  transform: rotate(6deg); white-space: nowrap;
}

/* 手機外框 */
.hero-phone { position: relative; justify-self: center; perspective: 1400px; }
.phone {
  position: relative; width: min(280px, 70vw); aspect-ratio: 9 / 19.5;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #4a4c7a, #16172f 60%);
  box-shadow: 0 0 0 2px #0c0d1d, 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(2deg);
  transition: transform 0.8s var(--ease-out);
  animation: bob 6s ease-in-out infinite;
}
.hero-phone:hover .phone { transform: rotateY(-4deg) rotateX(2deg) rotateZ(0deg); }
@keyframes bob { 50% { translate: 0 -12px; } }
.phone-screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--night); }
.phone-screen video, .phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-island { position: absolute; top: 22px; left: 50%; width: 30%; height: 24px; margin-left: -15%; border-radius: 20px; background: #000; }
.phone-shadow { position: absolute; left: 10%; right: 10%; bottom: -36px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); filter: blur(14px); }

/* 首屏下方：桌子、貓、可以擲的骰子 */
.hero-table { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 210px; }
.hero-cats { position: absolute; left: max(16px, calc((100vw - 1180px) / 2)); bottom: 118px; display: flex; align-items: flex-end; }
.hero-cat { width: 132px; height: 132px; margin-right: -26px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.18)); transform-origin: 50% 100%; animation: breathe 3.2s ease-in-out infinite; }
.hero-cat.c1 { width: 156px; height: 156px; animation-delay: -1s; }
.hero-cat.c2 { animation-delay: -2s; }
@keyframes breathe { 50% { transform: scale(1.012, 1.03); } }
.table-top {
  position: absolute; inset: auto 0 0 0; height: 130px;
  background:
    linear-gradient(180deg, var(--wood-top) 0 14px, var(--wood-bottom) 14px 22px, transparent 22px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--cloth-top), var(--cloth-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
}
.hero-dice { position: absolute; left: max(40px, calc((100vw - 1180px) / 2 + 30px)); top: 36px; display: flex; gap: 22px; }
.roll-hint { position: absolute; left: max(40px, calc((100vw - 1180px) / 2 + 30px)); bottom: 12px; font-size: 13px; color: rgba(255, 246, 232, 0.75); }

/* MARK: 骰子 */
.die3d { --s: 58px; width: var(--s); height: var(--s); padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.25)); }
.die3d .cube { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx, -18deg)) rotateY(var(--ry, 24deg)); transition: transform 1s var(--ease-out); }
.die3d.rolling .cube { transition-duration: 1.1s; transition-timing-function: cubic-bezier(0.15, 0.85, 0.25, 1); }
.die3d.rolling { animation: hop 0.9s var(--ease-out); }
@keyframes hop { 30% { transform: translateY(-46px); } 60% { transform: translateY(0); } 75% { transform: translateY(-10px); } }
.side {
  position: absolute; inset: 0; border-radius: 22%;
  background: linear-gradient(145deg, #fffdf6, #f1e6d2);
  box-shadow: inset 0 -4px 0 rgba(74, 52, 56, 0.16), inset 0 0 0 2.5px var(--outline);
  display: grid; place-items: center;
  backface-visibility: hidden;
}
.s1 { transform: translateZ(calc(var(--s) / 2)); }
.s6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.s2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.s5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.s3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.s4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.pips { display: grid; grid-template-columns: repeat(3, 1fr); width: 72%; height: 72%; gap: 4%; }
.pips i { border-radius: 50%; }
.pips i.on { background: radial-gradient(circle at 35% 30%, #6a4c52, var(--outline) 70%); }
.face-paw { width: 64%; height: 64%; }
.face-paw svg { width: 100%; height: 100%; }

/* MARK: 跑馬燈 */
.marquee {
  position: relative; z-index: 5; overflow: hidden;
  background: var(--gold); color: var(--ink);
  border-block: 3px solid var(--outline);
  transform: rotate(-1.6deg); margin: -18px -10px 0;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.2);
}
.marquee-track { display: flex; gap: 28px; width: max-content; padding: 14px 0; animation: marquee 38s linear infinite; font-size: clamp(20px, 2.4vw, 30px); }
.marquee-track i { font-style: normal; color: var(--lantern); }
@keyframes marquee { to { transform: translateX(-33.333%); } }

/* MARK: 段落共用 */
section { position: relative; }
.how, .cats, .bosses, .daily, .yourcat, .features, .faq { padding: clamp(90px, 12vw, 160px) 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.paw-icon { width: 18px; height: 18px; color: var(--lantern); }
.section-title { font-size: clamp(36px, 5.4vw, 72px); letter-spacing: -0.5px; max-width: 16em; }
.lead { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 40em; }
.hint { margin-top: 14px; font-size: 14px; color: rgba(189, 186, 230, 0.7); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 3px solid var(--outline); border-radius: 18px; padding: 12px 22px; cursor: pointer;
  font-size: 18px; text-decoration: none; box-shadow: 0 5px 0 var(--outline);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.btn:disabled { filter: grayscale(0.6) brightness(0.8); cursor: default; }
.btn small { font-size: 12px; opacity: 0.8; }
.btn-orange { background: var(--orange); color: var(--ink); }
.btn-ghost { background: var(--cream); color: var(--ink); }

/* MARK: 玩法 */
.how { background: linear-gradient(180deg, #1d1e45, var(--night) 40%, #22234f); }
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 0 26px 28px; border-radius: 28px; background: var(--card); border: 2px solid rgba(255, 255, 255, 0.06); position: relative; overflow: hidden; }
/* 實機短片：裁切到動作最精彩的區域（--focus 是畫面的垂直位置） */
.step-shot { margin: 0 -26px 22px; aspect-ratio: 4 / 5; overflow: hidden; position: relative; background: var(--night); }
.step-shot::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
.step-clip { width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--focus, 50%); transition: transform 0.8s var(--ease-out); }
.step:hover .step-clip { transform: scale(1.04); }
.inline-cta { margin-top: 44px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; text-align: center; }
.inline-cta p { color: var(--muted); }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; }
.qr { display: grid; justify-items: center; gap: 10px; }
.qr-box { width: 128px; height: 128px; padding: 10px; border-radius: 18px; background: var(--cream); border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.qr-code { width: 100%; height: 100%; }
.qr-code path { fill: var(--ink); }
.qr p { font-size: 13px; color: var(--muted); }
/* 手機版：滑過首屏後出現在底部的下載列 */
.sticky-dl { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 55; display: none; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 22px; background: rgba(30, 31, 69, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(calc(100% + 40px));
  transition: transform 0.45s var(--ease-out), opacity 0.3s, visibility 0s linear 0.45s; }
.sticky-dl img { border-radius: 10px; }
.sticky-dl span { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.sticky-dl small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-dl .btn { padding: 9px 16px; font-size: 16px; box-shadow: 0 4px 0 var(--outline); }
.sticky-dl.show { transform: none; opacity: 1; visibility: visible; transition: transform 0.45s var(--ease-out), opacity 0.3s, visibility 0s; }
.step::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 90, 0.12), transparent 70%); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--gold); color: var(--ink); font-size: 22px; border: 2.5px solid var(--outline); box-shadow: 0 4px 0 var(--outline); }
.step h3 { margin-top: 18px; font-size: 26px; }
.step p { margin-top: 8px; color: var(--muted); }

.hands { margin-top: 26px; border-radius: 20px; background: rgba(255, 255, 255, 0.04); padding: 6px 20px; }
.hands summary { cursor: pointer; padding: 12px 0; font-size: 18px; color: var(--gold); list-style: none; }
.hands summary::-webkit-details-marker { display: none; }
.hands summary::after { content: "＋"; float: right; }
.hands[open] summary::after { content: "－"; }
.hands table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.hands th, .hands td { text-align: left; padding: 10px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-weight: normal; }
.hands thead th { color: var(--muted); font-size: 13px; }
.hands th small { margin-left: 10px; color: var(--muted); font-size: 13px; }
.hands td { font-variant-numeric: tabular-nums; color: var(--gold); }

/* MARK: 貓咪 */
.cats { background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 165, 82, 0.12), transparent), #22234f; overflow: hidden; }
.rails { margin-top: 56px; display: grid; gap: 22px; }
.rail { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.rail-track { list-style: none; margin: 0; padding: 14px 0 22px; display: flex; gap: 18px; width: max-content; animation: rail 80s linear infinite; }
.rail.reverse .rail-track { animation-direction: reverse; animation-duration: 92s; }
.rail:hover .rail-track, .rail:focus-within .rail-track { animation-play-state: paused; }
@keyframes rail { to { transform: translateX(-50%); } }
.cat-card { flex: 0 0 auto; width: 210px; }
.cat-inner {
  width: 100%; height: 300px; padding: 16px 16px 14px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  border-radius: 24px; border: 3px solid var(--outline); box-shadow: 0 6px 0 var(--outline);
  background: linear-gradient(180deg, #ffe7c9 0%, var(--cream) 55%);
  color: var(--ink); position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease-spring);
}
.cat-inner:hover { transform: translateY(-6px) rotate(-1.5deg); }
.cat-inner img { width: 140px; height: 140px; transition: transform 0.4s var(--ease-spring); }
.cat-inner:hover img { transform: scale(1.08) rotate(3deg); }
.cat-name { margin-top: 4px; font-size: 22px; align-self: flex-start; }
.cat-title { font-size: 13px; color: rgba(42, 30, 34, 0.6); align-self: flex-start; }
.cat-ability {
  position: absolute; inset: 0; padding: 22px 18px; display: flex; align-items: center;
  font-size: 16px; line-height: 1.5; color: var(--cream);
  background: linear-gradient(160deg, #3b3d80, #272957);
  clip-path: circle(0% at 50% 30%); transition: clip-path 0.55s var(--ease-out);
}
.cat-inner[aria-expanded="true"] .cat-ability { clip-path: circle(150% at 50% 30%); }
.cat-meta { margin-top: auto; align-self: stretch; display: flex; justify-content: space-between; font-size: 12px; }
.rarity { padding: 1px 9px; border-radius: 99px; border: 2px solid var(--outline); background: #cbe7ff; }
.r-uncommon .rarity { background: #c9f2e6; }
.r-rare .rarity { background: #ffd6ea; }
.r-rare .cat-inner { background: linear-gradient(180deg, #ffd9ec 0%, var(--cream) 55%); }
.price { color: rgba(42, 30, 34, 0.7); }

/* MARK: Boss */
.bosses { background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255, 119, 170, 0.18), transparent 70%), linear-gradient(180deg, #22234f, #2b1d44 50%, #1d1a3a); }
.bosses .section-title { color: #ffd6ea; text-shadow: 0 0 22px rgba(255, 119, 170, 0.6), 0 0 60px rgba(255, 119, 170, 0.3); }
.boss-grid { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.boss-card {
  padding: 20px; border-radius: 24px; display: grid; grid-template-columns: 76px 1fr; gap: 6px 16px; align-items: center;
  background: linear-gradient(135deg, rgba(74, 31, 61, 0.9), rgba(43, 35, 80, 0.9));
  border: 2px solid rgba(255, 119, 170, 0.28);
  transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}
.boss-card:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 0 30px rgba(255, 119, 170, 0.35); }
.boss-card:hover img { animation: shake 0.5s; }
@keyframes shake { 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.boss-card img { grid-row: span 2; width: 76px; height: 76px; }
.boss-card h3 { font-size: 21px; color: #ff9cc8; }
.boss-card p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* MARK: 每日一擲 */
.daily { background: linear-gradient(180deg, #1d1a3a, var(--night)); }
.daily-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: center; font-size: 18px; }
.ticks li::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--teal); color: var(--ink); border: 2px solid var(--outline); flex: 0 0 auto; }
.board { padding: 26px; border-radius: 28px; background: var(--panel); border: 3px solid var(--outline); box-shadow: 0 10px 0 var(--outline), 0 30px 60px rgba(0, 0, 0, 0.35); }
.board-head { display: flex; align-items: center; gap: 16px; }
.board-head h3 { font-size: 24px; }
.cal { display: grid; place-items: center; width: 64px; height: 70px; border-radius: 14px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); overflow: hidden; position: relative; padding-top: 14px; }
.cal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 16px; background: var(--lantern); }
.cal-day { font-weight: normal; font-size: 28px; line-height: 1; }
.cal-month { font-size: 11px; }
.board-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; min-height: 220px; }
.board-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); }
.board-list .rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--chip); font-size: 14px; }
.board-list li:nth-child(1) .rank { background: var(--gold); color: var(--ink); }
.board-list li:nth-child(2) .rank { background: #d6dce8; color: var(--ink); }
.board-list li:nth-child(3) .rank { background: #e3a16b; color: var(--ink); }
.board-list .who small { color: var(--muted); margin-left: 4px; }
.board-list .pts { color: var(--gold); font-variant-numeric: tabular-nums; }
.board-list .empty { display: block; text-align: center; color: var(--muted); padding: 50px 10px; background: none; }
.board-loading { display: flex !important; gap: 8px; justify-content: center; padding: 60px 0 !important; background: none !important; }
.board-loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite; }
.board-loading span:nth-child(2) { animation-delay: 0.2s; }
.board-loading span:nth-child(3) { animation-delay: 0.4s; }
.board-more { display: inline-block; margin-top: 16px; color: var(--teal); text-decoration: none; }

/* MARK: 你家的貓 */
.yourcat { background: var(--night); overflow: hidden; }
.yourcat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.yourcat-art { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; padding: 20px 0; }
.yourcat-art img {
  width: 100%; height: auto; aspect-ratio: 1;
  animation: breathe 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.6s);
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.2));
}
.yourcat-art img:nth-child(3n + 2) { translate: 0 28px; }
.yourcat-art::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 90, 0.16), transparent 68%); z-index: -1; }

/* MARK: 特色 */
.features { background: linear-gradient(180deg, var(--night), #22234f); }
.feature-grid { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: 24px; background: var(--card); border: 2px solid rgba(255, 255, 255, 0.06); }
.feature-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 207, 90, 0.12); font-size: 28px; }
.feature h3 { margin-top: 16px; font-size: 21px; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* MARK: 常見問題 */
.faq { background: #22234f; }
.faq-list { margin-top: 40px; display: grid; gap: 12px; }
.qa { border-radius: 20px; background: var(--card); border: 2px solid rgba(255, 255, 255, 0.06); padding: 4px 22px; transition: border-color 0.3s; }
.qa[open] { border-color: rgba(255, 207, 90, 0.4); }
.qa summary { cursor: pointer; list-style: none; padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 19px; }
.qa summary::after { content: "+"; font-size: 26px; color: var(--gold); transition: transform 0.3s var(--ease-out); flex: 0 0 auto; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding-bottom: 18px; color: var(--muted); }

/* MARK: 下載 */
.cta { padding: 200px 0 210px; text-align: center; overflow: hidden; background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(255, 165, 82, 0.2), transparent 70%), linear-gradient(180deg, #22234f, var(--night-deep)); }
.cta-title { font-size: clamp(48px, 8vw, 110px); line-height: 1.05; color: var(--cream); text-shadow: 0 6px 0 var(--outline), 0 0 40px rgba(255, 165, 82, 0.35); }
.cta .lead { margin: 18px auto 34px; }
.sleepy-cats { position: absolute; left: 0; right: 0; bottom: -18px; display: flex; justify-content: center; gap: 4vw; pointer-events: none; }
.sleepy-cats img { width: 140px; height: 140px; opacity: 0.9; animation: breathe 4s ease-in-out infinite; }
.sleepy-cats img:nth-child(2) { animation-delay: -1.3s; }
.sleepy-cats img:nth-child(3) { animation-delay: -2.6s; }

/* MARK: 頁尾 */
.site-footer { background: var(--night-deep); padding: 48px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-grid { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 12px; }
.footer-brand div { display: grid; }
.footer-brand span { font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-footer nav a:hover { color: var(--cream); }
.footer-note { width: var(--wrap); margin: 28px auto 0; font-size: 13px; color: rgba(189, 186, 230, 0.6); }

/* 語言建議 */
.lang-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 18px; white-space: nowrap; max-width: calc(100vw - 24px); border-radius: 18px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 6px 0 var(--outline); font-size: 15px; }
.lang-toast[hidden] { display: none; }
.lang-toast a { color: var(--ink); background: var(--gold); padding: 6px 12px; border-radius: 12px; text-decoration: none; border: 2px solid var(--outline); }
.lang-toast button { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 0 4px; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; background: linear-gradient(#3b3d80, #18193a); padding: 24px; }
.notfound h1 { font-size: 96px; }

/* MARK: 響應式 */
@media (max-width: 1060px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky-dl { display: flex; }
  .qr { display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .hero { padding-top: calc(var(--header-h) + 100px); min-height: auto; }
  .lantern-string.top { top: calc(var(--header-h) - 18px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-actions { justify-content: center; }
  .hero-phone { margin-top: 30px; }
  .phone { transform: none; }
  .hero-cats { left: 50%; transform: translateX(-50%); }
  .hero-dice, .roll-hint { left: 50%; transform: translateX(-50%); }
  .hero-dice { top: 30px; }
  .roll-hint { white-space: nowrap; }
  .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .daily-grid, .yourcat-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .yourcat-art { order: 2; max-width: 420px; }
}
@media (max-width: 560px) {
  :root { --wrap: calc(100vw - 32px); }
  .nav-cta { display: none; }
  .brand span { display: none; }
  .wordmark { font-size: clamp(40px, 14.5vw, 80px); }
  .site-header { gap: 12px; }
  .lang-switch a, .lang-switch span { padding: 4px 8px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cat-card { width: 180px; }
  .cat-inner { height: 280px; }
  .hero-cat { width: 100px; height: 100px; }
  .hero-cat.c1 { width: 120px; height: 120px; }
  .die3d { --s: 50px; }
  .sleepy-cats img { width: 100px; height: 100px; }
}

.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .rail { overflow-x: auto; }
}
