/* Purr & Roll — 「夜市走一圈」官網。配色跟 App 的 Theme.swift 一致：暖棕描邊、奶油色卡片、深藍夜空、紅橘燈籠。 */
:root {
  --night: #272957;
  --night-top: #3b3d80;
  --night-deep: #18193a;
  --night-ink: #12132c;
  --panel: #1e1f45;
  --card: #29295a;
  --chip: #35366e;
  --outline: #4a3438;
  --ink: #2a1e22;
  --lantern: #f2546a;
  --red: #e5413f;
  --orange: #ffa552;
  --gold: #ffcf5a;
  --cream: #fff6e8;
  --cream-2: #ffe9c9;
  --teal: #4fd1b5;
  --teal-dark: #23a88c;
  --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);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --wrap: min(1200px, calc(100vw - 56px));
  --header-h: 68px;
  --chunky: 0 6px 0 var(--outline);
  --soft: 0 18px 40px rgba(8, 8, 30, 0.45);
}

/* MARK: 基本 */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--night-deep);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 細微的顆粒，讓大面積色塊不會太「數位」 */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.06; 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%; }
img { -webkit-user-drag: none; user-select: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0; font-weight: normal; }
p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.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: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: var(--wrap); margin: 0 auto; position: relative; }
.narrow { width: min(860px, calc(100vw - 48px)); }
section { position: relative; }

/* MARK: 按鈕（跟 App 的 ChunkyButtonStyle 一樣：平塗、暖棕描邊、底部厚陰影，按下去會沉） */
.btn {
  --fill: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 22px; border-radius: 18px;
  border: 3px solid var(--outline); background: var(--fill); color: var(--ink);
  box-shadow: 0 6px 0 var(--outline), inset 0 -5px 0 rgba(0, 0, 0, 0.12);
  font-size: 19px; text-decoration: none; line-height: 1.1;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out), filter 0.2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 0 var(--outline), inset 0 -5px 0 rgba(0, 0, 0, 0.12); }
.btn:active:not(:disabled), .btn.pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--outline), inset 0 -2px 0 rgba(0, 0, 0, 0.12); }
.btn:disabled { filter: grayscale(0.7) brightness(0.8); opacity: 0.7; }
.btn img { width: 26px; height: 26px; }
.btn-gold { --fill: var(--gold); }
.btn-teal { --fill: var(--teal); }
.btn-red { --fill: var(--lantern); color: #fff; text-shadow: 0 2px 0 rgba(74, 52, 56, 0.5); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px;
  border: 2.5px solid var(--outline); background: var(--cream); color: var(--ink); box-shadow: 0 3px 0 var(--outline); font-size: 15px;
}
.chip-btn img { width: 22px; height: 22px; }
.chip-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.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: 62px; }
.store-badge:hover { transform: translateY(-2px) scale(1.03); }

/* MARK: 攤位招牌（每一區的小標） */
.stall-sign { position: relative; display: inline-block; margin: 40px 0 20px; transform-origin: 50% -40px; animation: sign-sway 5s ease-in-out infinite; }
.stall-sign::before, .stall-sign::after { /* 吊繩 */
  content: ""; position: absolute; bottom: 100%; width: 2.5px; height: 40px; background: #3a2f2a; border-radius: 2px;
}
.stall-sign::before { left: 18%; transform: rotate(8deg); transform-origin: bottom; }
.stall-sign::after { right: 18%; transform: rotate(-8deg); transform-origin: bottom; }
.stall-sign span {
  display: inline-block; position: relative; padding: 9px 22px 10px; border-radius: 12px;
  background: linear-gradient(180deg, #e0a571 0%, var(--wood-top) 45%, var(--wood-bottom) 100%);
  border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  color: var(--cream); font-size: 17px; letter-spacing: 0.08em; text-shadow: 0 2px 0 rgba(74, 52, 56, 0.7);
}
.stall-sign span::before, .stall-sign span::after { /* 釘子 */
  content: ""; position: absolute; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #5a3d2c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.stall-sign span::before { left: 7px; }
.stall-sign span::after { right: 7px; }
.stall-sign.red span { background: linear-gradient(180deg, #ff6b74, #c8323f); }
.stall-sign.gold span { background: linear-gradient(180deg, #ffe08a, #e9a93a); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.stall-sign.teal span { background: linear-gradient(180deg, #7de6cf, var(--teal-dark)); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); }
.stall-sign.small { margin: 30px 0 14px; }
.stall-sign.small::before, .stall-sign.small::after { height: 30px; }
.stall-sign.small span { font-size: 15px; padding: 6px 16px 7px; }
@keyframes sign-sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }

/* 大標：白字＋暖棕描邊（跟 App 的 .stroked() 一樣），描邊畫在字的外面 */
.section-title, .sub-title, .cta-title, .try-title {
  color: var(--cream);
  -webkit-text-stroke: 0.14em var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--outline);
  letter-spacing: 0.01em;
}
.section-title { font-size: clamp(38px, 5.4vw, 76px); max-width: 16em; text-wrap: balance; }
.sub-title { font-size: clamp(28px, 3.4vw, 46px); text-wrap: balance; }
.lang-en .section-title { letter-spacing: -0.005em; }
.lead { margin-top: 18px; font-size: clamp(17px, 1.45vw, 20px); color: var(--muted); max-width: 40em; text-wrap: pretty; }
.lead.small { font-size: 17px; margin-top: 10px; }
.section-head { margin-bottom: 44px; }

/* MARK: 頁首 */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 max(20px, calc((100vw - 1240px) / 2));
  transition: background 0.4s, box-shadow 0.4s, height 0.35s var(--ease-out);
}
.site-header.scrolled {
  background: rgba(20, 21, 50, 0.78);
  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), 0 10px 30px rgba(0, 0, 0, 0.2);
  height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; letter-spacing: 0.3px; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 2px var(--outline), 0 4px 12px rgba(0, 0, 0, 0.35); }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 7px 11px; border-radius: 99px; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.site-nav a:hover { color: var(--cream); background: rgba(255, 255, 255, 0.07); }
.site-nav a.active { color: var(--ink); background: var(--gold); }
.sound-toggle {
  position: relative; width: 42px; height: 42px; border-radius: 50%; padding: 7px; flex-shrink: 0;
  background: var(--cream); border: 2.5px solid var(--outline); box-shadow: 0 3px 0 var(--outline);
  transition: transform 0.15s, background 0.2s;
}
.sound-toggle img { width: 100%; height: 100%; opacity: 0.55; transition: opacity 0.2s, transform 0.3s var(--ease-spring); }
.sound-toggle .slash { position: absolute; left: 8px; right: 8px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--lantern); border-radius: 3px; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px var(--cream); transition: transform 0.3s var(--ease-spring); }
.sound-toggle[aria-pressed="true"] { background: var(--gold); }
.sound-toggle[aria-pressed="true"] img { opacity: 1; animation: speaker 1.2s ease-in-out infinite; }
.sound-toggle[aria-pressed="true"] .slash { transform: rotate(-45deg) scaleX(0); }
.sound-toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
@keyframes speaker { 50% { transform: scale(1.1); } }
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); font-size: 13px; flex-shrink: 0; }
.lang-switch a, .lang-switch span { padding: 5px 10px; border-radius: 99px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.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); white-space: nowrap; flex-shrink: 0;
  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; overflow: hidden; isolation: isolate;
  min-height: max(780px, min(100svh, 1020px));
  padding-top: calc(var(--header-h) + 28px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #34367a 0%, #2a2c68 38%, #222355 70%, #1b1c46 100%);
}
.hero-sky { position: absolute; inset: 0; z-index: -3; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.moon {
  position: absolute; right: 9%; top: 15%; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0 0%, #ffeec2 55%, #f6d58e 100%);
  box-shadow: 0 0 40px 12px rgba(255, 228, 160, 0.35), 0 0 120px 40px rgba(255, 210, 120, 0.15);
}
.moon::after { content: ""; position: absolute; left: 22%; top: 52%; width: 16px; height: 12px; border-radius: 50%; background: rgba(214, 178, 110, 0.35); box-shadow: 26px -24px 0 -2px rgba(214, 178, 110, 0.3), 34px 8px 0 -4px rgba(214, 178, 110, 0.28); }
.shooting-star { position: absolute; top: 12%; left: 30%; width: 140px; height: 2px; background: linear-gradient(90deg, transparent, #fff6e8); border-radius: 2px; opacity: 0; transform: rotate(-18deg); animation: shoot 9s ease-in 3s infinite; }
@keyframes shoot { 0% { opacity: 0; translate: 0 0; } 2% { opacity: 1; } 8% { opacity: 0; translate: 420px 140px; } 100% { opacity: 0; translate: 420px 140px; } }
.hero-layer { position: absolute; left: 0; right: 0; pointer-events: none; will-change: transform; }
.skyline { bottom: 200px; height: 440px; z-index: -2; opacity: 0.95; }
.skyline svg { width: 100%; height: 100%; }
.skyline text { font-family: var(--font); }
.neon { filter: drop-shadow(0 0 6px var(--neon)) drop-shadow(0 0 14px var(--neon)); animation: neon 6s steps(1) infinite; }
.neon:nth-of-type(2n) { animation-delay: -2.3s; }
@keyframes neon { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: 0.4; } 49% { opacity: 1; } 51% { opacity: 0.5; } 52% { opacity: 1; } }
.stall-row { bottom: 214px; height: 132px; z-index: -1; display: flex; justify-content: space-between; padding: 0 1%; }
.stall { position: relative; width: 15%; height: 100%; }
.stall .awning {
  position: absolute; left: 0; right: 0; top: 0; height: 44px; border: 3px solid var(--outline); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: repeating-linear-gradient(90deg, var(--a) 0 22px, var(--cream) 22px 44px);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.12);
}
.stall .awning::after { /* 波浪邊 */
  content: ""; position: absolute; left: -3px; right: -3px; top: 100%; height: 16px;
  background: radial-gradient(circle at 11px 0, var(--a) 10px, var(--outline) 10px 12.5px, transparent 13px) 0 0 / 22px 16px repeat-x;
}
.stall .awning.red { --a: #e5413f; }
.stall .awning.orange { --a: #f58a2e; }
.stall .awning.teal { --a: #2fae95; }
.stall .awning.purple { --a: #8a68e6; }
.stall .bulbs { position: absolute; left: 6%; right: 6%; top: 64px; height: 12px; background: radial-gradient(circle, #ffe7a6 3.5px, rgba(255, 210, 120, 0.4) 5px, transparent 8px) 0 0 / 26px 12px repeat-x; filter: drop-shadow(0 0 6px rgba(255, 200, 100, 0.8)); animation: twinkle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.4s); }
@keyframes twinkle { 50% { opacity: 0.65; } }
.stall .counter { position: absolute; left: 4%; right: 4%; bottom: 0; height: 50px; border: 3px solid var(--outline); border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #5b4a8c, #3d3170); box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.08); }
.stall .peek { position: absolute; width: 84px; height: 84px; left: 50%; bottom: 30px; margin-left: -42px; z-index: -1; animation: peek 7s ease-in-out infinite; animation-delay: calc(var(--i) * -1.7s); }
@keyframes peek { 0%, 100% { translate: 0 34px; } 18%, 60% { translate: 0 0; } 70% { translate: 0 34px; } }
.lantern-string { position: absolute; left: 0; right: 0; height: 120px; pointer-events: none; z-index: 2; }
.lantern-layer { top: 0; height: 200px; }
.hero-lanterns { top: calc(var(--header-h) - 18px); }
.lantern-string .rope { position: absolute; inset: 0 0 auto 0; width: 100%; height: 64px; }
.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; }
.gold .lantern.red { --c: #f5b72e; }
.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-inner {
  width: var(--wrap); margin: 0 auto; flex: 1;
  display: flex; align-items: center;
  padding: 6px 0 352px;
}
.hero-copy { position: relative; z-index: 3; max-width: min(780px, 62%); }
.hero-copy::before { content: ""; position: absolute; inset: -60px -90px -50px -70px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 55% at 40% 55%, rgba(28, 29, 70, 0.78), rgba(28, 29, 70, 0.4) 55%, transparent 75%); }
.hero-tagline, .hero-note { text-shadow: 0 1px 8px rgba(20, 21, 50, 0.9); }
.no-js .board-loading { display: none !important; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: 0.06em; padding: 6px 14px; border-radius: 99px; text-decoration: none; }
.pill.teal { color: var(--teal); background: rgba(79, 209, 181, 0.1); border: 1.5px solid rgba(79, 209, 181, 0.4); }
.pill.teal::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s infinite; }
.pill.gold { color: var(--ink); background: var(--gold); border: 2px solid var(--outline); box-shadow: 0 3px 0 var(--outline); transition: transform 0.2s var(--ease-spring); }
.pill.gold:hover { transform: translateY(-2px) rotate(-2deg); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* 大字標題：粗描邊＋漸層（跟 App 的標題一樣） */
.wordmark { margin-top: 20px; font-size: clamp(64px, 9.4vw, 142px); line-height: 0.92; letter-spacing: -1px; white-space: nowrap; }
.wordmark .word, .wordmark .amp { display: inline-block; position: relative; }
.wordmark .word { 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; }
.js .wordmark .word, .js .wordmark .amp { opacity: 0; }
.wordmark.ready .word { animation: pop-in 0.9s var(--ease-spring) both; opacity: 1; }
.wordmark.ready .word:nth-of-type(2) { animation-delay: 0.14s; }
.wordmark.ready .amp { animation: spin-in 0.9s var(--ease-spring) 0.07s both; opacity: 1; }
@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: 18px; font-size: clamp(24px, 2.8vw, 38px); letter-spacing: 0.08em; color: #ffe3a3; text-shadow: 0 0 18px rgba(255, 165, 82, 0.7), 0 2px 0 #a8552a; }
.lang-en .hero-sub { letter-spacing: 0.14em; text-transform: uppercase; font-size: clamp(20px, 2.2vw, 28px); }
.hero-tagline { margin-top: 16px; font-size: clamp(17px, 1.55vw, 21px); color: var(--muted); max-width: 28em; text-wrap: pretty; }
.hero-actions { margin-top: 30px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--muted); }

.hero-phone { position: absolute; z-index: 5; right: max(28px, calc((100vw - 1200px) / 2 + 20px)); bottom: 92px; perspective: 1400px; will-change: transform; }
.phone {
  position: relative; width: clamp(220px, 18vw, 262px); aspect-ratio: 540 / 1174; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #575a8c, #1a1b36 55%, #2c2e57);
  box-shadow: 0 0 0 3px var(--outline), 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  transform: rotateY(-12deg) rotateX(5deg) rotateZ(2.5deg); transition: transform 0.9s var(--ease-out);
  animation: bob 6s ease-in-out infinite;
}
.hero-phone:hover .phone { transform: rotateY(-3deg) rotateX(1deg) rotateZ(0deg); }
@keyframes bob { 50% { translate: 0 -12px; } }
.phone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--night); }
.phone-screen video, .phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-island { position: absolute; top: 21px; left: 50%; width: 30%; height: 24px; margin-left: -15%; border-radius: 20px; background: #05050c; }

/* 桌子：木頭桌緣＋夜市紅桌布，貓咪趴在桌邊 */
.hero-table { position: absolute; left: 0; right: 0; bottom: 0; height: 252px; z-index: 4; }
.table-cats { position: absolute; left: max(10px, calc((100vw - 1200px) / 2 - 20px)); bottom: 168px; display: flex; align-items: flex-end; z-index: 1; }
.table-cat { position: relative; display: block; width: 128px; height: 128px; margin-right: -22px; transform-origin: 50% 100%; cursor: pointer; animation: breathe 3.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.table-cat:nth-child(2) { animation-delay: -1s; }
.table-cat:nth-child(3) { width: 146px; height: 146px; animation-delay: -2s; }
.table-cat:nth-child(4) { animation-delay: -0.6s; }
.table-cat:nth-child(5) { animation-delay: -1.6s; }
.table-cat img { width: 100%; height: 100%; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.2)); }
.table-cat.hop { animation: hop 0.55s var(--ease-spring); }
.table-cat.love img { filter: drop-shadow(0 0 16px rgba(255, 120, 170, 0.8)); }
@keyframes breathe { 50% { transform: scale(1.012, 1.03); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-26px) scale(0.96, 1.06); } 60% { transform: translateY(0) scale(1.06, 0.94); } 100% { transform: none; } }
.bubble {
  position: absolute; left: 50%; bottom: 92%; translate: -50% 0; white-space: nowrap; pointer-events: none;
  padding: 3px 10px; border-radius: 12px; background: var(--cream); color: var(--ink); border: 2.5px solid var(--outline);
  font-size: 15px; box-shadow: 0 3px 0 var(--outline); opacity: 0; transform: translateY(8px) scale(0.6); transition: opacity 0.2s, transform 0.35s var(--ease-spring);
}
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--outline); }
.bubble.show { opacity: 1; transform: none; }
.bubble.mult { background: var(--lantern); color: #fff; }
.bubble.times { background: var(--purple); color: #fff; }
.bubble.chips { background: var(--teal); }
.table-wood { position: absolute; left: 0; right: 0; bottom: 196px; height: 26px; background: linear-gradient(180deg, #e2aa76, var(--wood-top) 40%, var(--wood-bottom)); border-top: 3px solid var(--outline); border-bottom: 3px solid var(--outline); z-index: 2; }
.table-cloth {
  position: absolute; left: 0; right: 0; bottom: 0; height: 199px; z-index: 2;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 3.2px, transparent 3.6px) 0 0 / 24px 18px, linear-gradient(180deg, var(--cloth-top), var(--cloth-bottom));
  box-shadow: inset 0 14px 18px -10px rgba(0, 0, 0, 0.35);
}
.dice-zone { position: absolute; left: 0; top: 0; bottom: 74px; right: calc(max(28px, calc((100vw - 1200px) / 2 + 20px)) + clamp(220px, 18vw, 262px) + 10px); }
.die { position: absolute; left: 0; top: 0; width: 72px; height: 72px; will-change: transform; }
.no-js .die, .js .die:not(.placed) { left: calc(max(20px, calc((100vw - 1200px) / 2)) + 300px + var(--slot, 0) * 86px); top: 26px; }
.die:nth-child(1) { --slot: 0; } .die:nth-child(2) { --slot: 1; } .die:nth-child(3) { --slot: 2; } .die:nth-child(4) { --slot: 3; } .die:nth-child(5) { --slot: 4; }
.die img { width: 100%; height: 100%; filter: drop-shadow(0 5px 0 rgba(60, 10, 20, 0.35)); }
.table-ui { position: absolute; left: max(20px, calc((100vw - 1200px) / 2)); bottom: 24px; display: flex; align-items: center; gap: 16px; z-index: 3; }
.shake-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 24px 10px 12px; border-radius: 20px;
  border: 3px solid var(--outline); background: var(--gold); color: var(--ink); font-size: 22px;
  box-shadow: 0 6px 0 var(--outline), inset 0 -5px 0 rgba(0, 0, 0, 0.12); transition: transform 0.12s, box-shadow 0.12s;
  touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.shake-btn img { width: 40px; height: 40px; transition: transform 0.2s; }
.shake-btn:hover img { transform: rotate(-14deg); }
.shake-btn.shaking { transform: translateY(4px); box-shadow: 0 2px 0 var(--outline); animation: rattle 0.09s linear infinite; }
@keyframes rattle { 0% { translate: -1.5px 0; } 50% { translate: 1.5px -1px; } 100% { translate: -1.5px 0; } }
.no-js .shake-btn, .no-js .shake-help { display: none; }
.shake-help { font-size: 14px; color: rgba(255, 246, 232, 0.85); display: flex; flex-direction: column; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.shake-help small { font-size: 12px; opacity: 0.75; }
.hint-phone { display: none; }
.table-result { min-height: 30px; font-size: 21px; white-space: nowrap; color: var(--cream); text-shadow: 0 2px 0 var(--outline), 0 0 12px rgba(0, 0, 0, 0.3); }
.table-result b { color: var(--gold); }
.table-result:not(:empty) { display: flex; flex-direction: column; gap: 2px; }
.roll-cta { font-size: 15px; color: var(--cream); text-decoration: none; padding: 3px 12px; border-radius: 99px; background: rgba(255, 207, 90, 0.18); border: 1.5px solid rgba(255, 207, 90, 0.6); align-self: flex-start; text-shadow: none; transition: background 0.2s; }
.roll-cta:hover { background: rgba(255, 207, 90, 0.35); }
.table-result .pts { font-size: 15px; color: var(--cream-2); margin-left: 8px; }
.table-result.pop { animation: result-pop 0.5s var(--ease-spring); }
@keyframes result-pop { from { transform: scale(0.6); opacity: 0; } }
.confetti-piece { position: absolute; width: 26px; height: 16px; pointer-events: none; z-index: 30; will-change: transform; }

/* MARK: 跑馬燈緞帶 */
.ribbon { position: relative; z-index: 5; background: var(--gold); color: var(--ink); border-top: 3px solid var(--outline); border-bottom: 3px solid var(--outline); transform: rotate(-1.6deg); margin: -12px -20px 0; overflow: hidden; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18); }
.ribbon-track { display: flex; align-items: center; gap: 22px; width: max-content; padding: 13px 0; animation: marquee 48s linear infinite; }
.ribbon-track span { font-size: 24px; white-space: nowrap; }
.ribbon-track img { width: 26px; height: 26px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* MARK: 夜市地圖 */
.map { padding: 110px 0 60px; background: linear-gradient(180deg, var(--night-deep), #1d1e48); }
.map-street { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; padding-top: 14px; }
.map-street::before { /* 一條石板路：虛線＋貓掌 */
  content: ""; position: absolute; left: 4%; right: 4%; top: 72px; height: 4px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 246, 232, 0.25) 0 14px, transparent 14px 28px);
}
.map-stall {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; height: 100%;
  padding: 18px 12px 18px; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: var(--cream); border: 3px solid var(--outline); box-shadow: var(--chunky);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.25s;
}
.map-stall:hover { transform: translateY(-8px) rotate(-1.5deg); box-shadow: 0 12px 0 var(--outline); }
.map-art { width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 50%; background: radial-gradient(circle, #fff 30%, var(--cream-2)); border: 2.5px solid var(--outline); }
.map-art img { width: 66px; height: 66px; object-fit: contain; }
.map-stall b { font-size: 19px; line-height: 1.25; }
.map-stall small { font-size: 13.5px; color: #7a5a5e; line-height: 1.4; }
.new-tag { position: absolute; top: -12px; right: -8px; font-style: normal; font-size: 13px; padding: 3px 10px; border-radius: 10px; background: var(--lantern); color: #fff; border: 2.5px solid var(--outline); transform: rotate(8deg); box-shadow: 0 3px 0 var(--outline); animation: tag-wiggle 3s ease-in-out infinite; }
@keyframes tag-wiggle { 0%, 80%, 100% { transform: rotate(8deg); } 85% { transform: rotate(-4deg) scale(1.1); } 90% { transform: rotate(12deg); } }

/* MARK: 第一攤：玩法 */
.play { padding: 120px 0 120px; background: linear-gradient(180deg, #1d1e48 0%, #242660 40%, #1d1e48 100%); }
.section-lanterns { top: -10px; opacity: 0.85; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step:nth-child(2) { margin-top: 48px; }
.step-text { margin-top: 26px; max-width: 22em; }
.step-n { display: inline-block; width: 52px; height: 52px; margin-bottom: 8px; animation: die-bob 3s ease-in-out infinite; }
.step:nth-child(2) .step-n { animation-delay: -1s; }
.step:nth-child(3) .step-n { animation-delay: -2s; }
.step-n img { width: 100%; height: 100%; }
@keyframes die-bob { 50% { transform: translateY(-6px) rotate(8deg); } }
.step h3 { font-size: 27px; color: var(--cream); }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.phone-clip { position: relative; }
.phone-mini {
  width: min(250px, 62vw); aspect-ratio: 540 / 1174; padding: 8px; border-radius: 38px;
  background: linear-gradient(150deg, #575a8c, #1a1b36 60%); box-shadow: 0 0 0 3px var(--outline), 0 24px 50px rgba(0, 0, 0, 0.45);
}
.phone-mini-screen { width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: var(--night); }
.phone-mini-screen video, .phone-mini-screen img { width: 100%; height: 100%; object-fit: cover; }
.tilt-l .phone-mini { transform: rotate(-4deg); }
.tilt-r .phone-mini { transform: rotate(4deg); }

/* 計分解剖：影片在中間，四個重點分列兩邊 */
.anatomy { margin-top: 110px; }
.anatomy-head { text-align: center; margin-bottom: 30px; }
.anatomy-head p { color: var(--muted); max-width: 36em; margin: 10px auto 0; }
.try-title { font-size: clamp(32px, 4vw, 54px); }
.anatomy-body { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 40px; align-items: center; }
.anatomy-phone .phone-mini { width: 290px; }
.ap-list { display: grid; gap: 30px; }
.ap { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; padding: 18px 20px; border-radius: 24px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: var(--chunky); }
.ap-list.left .ap { text-align: left; }
.ap::after { /* 拉一條虛線指向影片 */
  content: ""; position: absolute; top: 50%; width: 40px; border-top: 3px dashed rgba(255, 207, 90, 0.7);
}
.ap-list.left .ap::after { left: 100%; }
.ap-list.right .ap::after { right: 100%; }
.ap-n { position: absolute; top: -14px; left: -10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); border: 3px solid var(--outline); box-shadow: 0 3px 0 var(--outline); font-size: 17px; }
.ap-art { grid-row: 1 / span 2; width: 64px; height: 64px; display: grid; place-items: center; }
.ap-art img { width: 100%; height: 100%; object-fit: contain; }
.ap-text b { display: block; font-size: 20px; font-weight: normal; }
.ap-text span { display: block; margin-top: 4px; font-size: 14.5px; color: #5b4246; line-height: 1.5; }
.inline-cta { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 44px; text-align: left; }
.inline-cta p { color: var(--cream-2); font-size: 17px; max-width: 22em; }
.inline-cta.left { justify-content: flex-start; margin-top: 26px; }
.inline-cta .store-badge img { height: 52px; }

/* 牌型表 */
.hand-table { margin-top: 46px; border-radius: 24px; background: var(--panel); border: 2px solid rgba(255, 255, 255, 0.08); overflow: hidden; }
.hand-table summary { display: flex; align-items: center; gap: 12px; padding: 18px 24px; font-size: 20px; cursor: pointer; list-style: none; }
.hand-table summary::-webkit-details-marker { display: none; }
.hand-table summary img { width: 34px; height: 34px; transition: transform 0.4s var(--ease-spring); }
.hand-table summary::after { content: "+"; margin-left: auto; font-size: 26px; color: var(--gold); transition: transform 0.3s; }
.hand-table[open] summary::after { transform: rotate(45deg); }
.hand-table[open] summary img { transform: rotate(180deg); }
.table-scroll { overflow-x: auto; padding: 0 16px 18px; }
.hand-table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.hand-table th, .hand-table td { padding: 10px 12px; text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.07); font-weight: normal; }
.hand-table thead th { color: var(--muted); font-size: 14px; border-top: 0; }
.hand-table tbody th small { display: block; font-size: 13px; color: var(--muted); }
.hand-table td.ex { display: flex; gap: 3px; }
.hand-table td.ex img { width: 22px; height: 22px; }
.move-tag { display: inline-block; font-size: 13px; padding: 1px 9px; border-radius: 99px; background: #e5243f; color: #fff; border: 1.5px solid var(--outline); white-space: nowrap; }

/* MARK: 第二攤：貓幫 */
.crew { padding: 120px 0 120px; background: radial-gradient(ellipse 50% 28% at 82% 30%, rgba(155, 123, 245, 0.16), transparent 70%), linear-gradient(180deg, #1d1e48, #232156 50%, #1c1d47); }
.gang-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.gang-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.06); border: 2.5px solid rgba(255, 255, 255, 0.12); color: var(--cream); font-size: 17px;
  transition: background 0.2s, transform 0.25s var(--ease-spring), border-color 0.2s;
}
.gang-tab img { width: 28px; height: 28px; }
.gang-tab small { font-size: 13px; padding: 0 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.gang-tab:hover { transform: translateY(-2px); }
.gang-tab[aria-selected="true"] { background: var(--cream); color: var(--ink); border-color: var(--outline); box-shadow: 0 4px 0 var(--outline); }
.gang-tab[aria-selected="true"] small { background: var(--gold); }
.no-js .gang-tabs { display: none; }
.leader-note { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.leader-note img { width: 28px; height: 28px; flex-shrink: 0; }
.gang-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; margin-top: 28px; align-items: start; }
.js .gang-panel[data-hidden] { display: none; }
.gang-panel.enter .leader-card { animation: leader-in 0.6s var(--ease-spring); }
.gang-panel.enter .cat-card { animation: card-in 0.5s var(--ease-spring) both; animation-delay: calc(var(--n, 0) * 35ms); }
@keyframes leader-in { from { opacity: 0; transform: translateY(30px) rotate(-3deg) scale(0.95); } }
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(0.9); } }
.gang-name { display: none; }
.no-js .gang-name { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; font-size: 28px; }
.no-js .gang-name img { width: 30px; height: 30px; }
.no-js .gang-name small { font-size: 15px; color: var(--muted); }
.leader-card {
  position: sticky; top: calc(var(--header-h) + 20px); text-align: center; padding: 26px 22px 24px; border-radius: 28px; color: var(--ink);
  background: radial-gradient(circle at 50% 30%, #fff 0%, var(--cream) 50%, #ffe2b0 100%); border: 3px solid var(--outline); box-shadow: 0 8px 0 var(--outline), var(--soft);
}
.leader-card img { width: 210px; height: 210px; margin: 0 auto; filter: drop-shadow(0 8px 0 rgba(74, 52, 56, 0.12)); animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.leader-ribbon { position: absolute; top: -16px; left: 50%; translate: -50% 0; padding: 4px 18px; border-radius: 10px; background: var(--gold); border: 3px solid var(--outline); box-shadow: 0 3px 0 var(--outline); font-size: 16px; white-space: nowrap; }
.leader-card h4 { font-size: 26px; margin-top: 6px; }
.leader-card h4 small { display: block; font-size: 14px; color: #8b6a6e; margin-top: 2px; }
.leader-card p { margin-top: 10px; font-size: 15px; color: #5b4246; line-height: 1.5; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 14px; }
.cat-card { perspective: 900px; }
.cat-flip {
  position: relative; display: grid; width: 100%; aspect-ratio: 0.82; padding: 0; border: 0; background: none; text-align: center;
  transform-style: preserve-3d; transition: transform 0.6s var(--ease-spring);
}
.cat-flip[aria-expanded="true"] { transform: rotateY(180deg); }
.cat-front, .cat-back {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 10px 12px; border-radius: 22px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline);
}
.cat-front { background: var(--cream); color: var(--ink); }
.cat-front img { width: 92%; height: auto; aspect-ratio: 1; margin-top: -6px; transition: transform 0.35s var(--ease-spring); }
.cat-flip:hover .cat-front img { transform: translateY(-6px) rotate(-3deg); }
.cat-back { transform: rotateY(180deg); background: linear-gradient(180deg, #34357a, #26275e); color: var(--cream); gap: 6px; }
.cat-name { font-size: 17px; line-height: 1.2; }
.cat-title { font-size: 13px; color: #8b6a6e; }
.cat-ability { font-size: 14px; line-height: 1.45; color: var(--cream-2); }
.cat-rarity { font-size: 12px; padding: 1px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.r-uncommon .cat-front { background: linear-gradient(180deg, var(--cream) 60%, #d9f6ee); }
.r-rare .cat-front { background: linear-gradient(180deg, var(--cream) 55%, #e6dcff); }
.cat-hint { margin-top: 16px; font-size: 14px; color: var(--muted); }
.no-js .cat-back { display: none; }

.factor { margin-top: 70px; padding: 30px 32px; border-radius: 28px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.09); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px 30px; align-items: center; }
.factor h3 { font-size: 28px; }
.factor p { color: var(--muted); font-size: 15px; grid-column: 1; }
.factor-meter { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.factor-meter li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 18px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 4px 0 var(--outline); }
.factor-meter li:nth-child(1) { min-height: 110px; } .factor-meter li:nth-child(2) { min-height: 130px; } .factor-meter li:nth-child(3) { min-height: 150px; } .factor-meter li:nth-child(4) { min-height: 172px; background: var(--gold); }
.f-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 70px; margin-top: auto; }
.f-cats img { width: 18px; height: 18px; }
.factor-meter b { font-size: 26px; font-weight: normal; }
.factor-meter small { font-size: 13px; color: #7a5a5e; }

.collars { margin-top: 70px; }
.collar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.collar-card { position: relative; padding: 16px 16px 20px; border-radius: 26px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: var(--chunky); text-align: center; transition: transform 0.35s var(--ease-spring); }
.collar-card:hover { transform: translateY(-6px) rotate(1deg); }
.collar-cat { width: 150px; height: 150px; margin: 0 auto; }
.collar-icon { position: absolute; top: 12px; right: 12px; width: 54px; height: 54px; padding: 6px; border-radius: 50%; background: #fff; border: 2.5px solid var(--outline); transition: transform 0.4s var(--ease-spring); }
.collar-card:hover .collar-icon { transform: rotate(-16deg) scale(1.1); }
.collar-card h4 { font-size: 20px; margin-top: 8px; }
.collar-card p { font-size: 14.5px; margin-top: 6px; color: #5b4246; line-height: 1.5; }
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 50px; }
.extra { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.08); }
.extra img { width: 54px; height: 54px; flex-shrink: 0; }
.extra h4 { font-size: 19px; }
.extra p { margin-top: 4px; font-size: 14.5px; color: var(--muted); }

/* MARK: 第三攤：Boss */
.boss { padding: 150px 0 120px; overflow: hidden; background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(229, 36, 63, 0.35), transparent 70%), linear-gradient(180deg, #2a1636 0%, #3a1430 40%, #2a1236 70%, #1c1d47 100%); }
.alarm { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 0% 30%, rgba(255, 40, 60, 0.35), transparent 50%), radial-gradient(ellipse at 100% 30%, rgba(255, 40, 60, 0.35), transparent 50%); opacity: 0; }
.boss.alert .alarm { animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 50% { opacity: 1; } }
.hazard { position: absolute; top: 34px; left: -40px; right: -40px; transform: rotate(-2deg); background: #1e1418; border-top: 4px solid #ffd23f; border-bottom: 4px solid #ffd23f; overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3); z-index: 2; }
.hazard::before, .hazard::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; background: repeating-linear-gradient(-45deg, #ffd23f 0 14px, #1e1418 14px 28px); }
.hazard::before { top: 0; } .hazard::after { bottom: 0; }
.hazard-track { display: flex; align-items: center; gap: 18px; width: max-content; padding: 16px 0; animation: marquee 22s linear infinite; }
.hazard-track span { color: #ffd23f; font-size: 22px; letter-spacing: 0.1em; white-space: nowrap; }
.hazard-track img { width: 26px; height: 26px; }
.arena { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) auto; gap: 30px; align-items: center; padding: 30px; border-radius: 32px; background: rgba(10, 6, 24, 0.45); border: 2px solid rgba(255, 120, 140, 0.2); box-shadow: inset 0 0 80px rgba(229, 36, 63, 0.15); }
.boss-portrait { position: relative; width: 200px; height: 200px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #5a3270, #3a2350 70%); border: 4px solid var(--outline); box-shadow: 0 0 0 6px rgba(229, 36, 63, 0.3), 0 0 60px rgba(229, 36, 63, 0.45); }
.boss-art { width: 76%; height: 76%; margin: 12%; transition: transform 0.3s var(--ease-spring); }
.boss-name { margin-top: 16px; font-size: 28px; }
.intent { margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline); text-align: left; position: relative; }
.intent::before { content: ""; position: absolute; left: 50%; top: -14px; margin-left: -10px; border: 10px solid transparent; border-bottom-color: var(--outline); border-top: 0; }
.intent small { font-size: 12px; letter-spacing: 0.1em; color: #b0475a; }
.intent-line { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.intent-icon { width: 40px; height: 40px; flex-shrink: 0; }
.intent-title { display: block; font-size: 19px; font-weight: normal; }
.intent-detail { display: block; font-size: 13.5px; color: #6b5256; line-height: 1.4; }
.intent.flash { animation: bump 0.4s var(--ease-spring); }
.arena-moves h3 { font-size: 28px; }
.arena-moves > p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.move-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.move-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%; text-align: left; padding: 12px 12px 12px;
  border-radius: 18px; background: #fff3e2; color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.15s, background 0.2s;
}
.move-card { transition: transform 0.45s var(--ease-spring), box-shadow 0.3s, opacity 0.3s, background 0.3s; opacity: 0.6; }
.move-card.good { opacity: 1; background: #fff; transform: translateY(-6px) rotate(-1deg); box-shadow: 0 6px 0 var(--outline), 0 0 0 4px var(--gold), 0 0 26px rgba(255, 207, 90, 0.55); }
.no-js .move-card, .no-motion .move-card { opacity: 1; }
.intent-slides { position: relative; display: grid; text-align: center; }
.intent-slide { grid-area: 1 / 1; opacity: 0; transform: translateX(40px) scale(0.96); transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-spring); pointer-events: none; }
.intent-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.intent-slide .boss-portrait { animation: boss-bob 3s ease-in-out infinite; }
.intent-slide.on .boss-art { animation: boss-in 0.6s var(--ease-spring); }
@keyframes boss-bob { 50% { translate: 0 -8px; } }
@keyframes boss-in { from { transform: scale(0.6) rotate(-12deg); } }
.intent-slide .intent { margin-top: 22px; }
.no-js .intent-slide:not(.on) { display: none; }
.mc-dice { display: flex; gap: 2px; }
.mc-dice img { width: 22px; height: 22px; }
.mc-hand { font-size: 17px; }
.mc-effect { font-size: 12.5px; color: #6b5256; line-height: 1.4; }
.arena-clip .phone-mini { width: 200px; }
.sub-title + .lead.small { margin-bottom: 30px; }
.boss .sub-title { margin-top: 80px; }
.boss-roster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.boss-chip { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 10px 14px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 140, 160, 0.15); transition: transform 0.3s var(--ease-spring), background 0.2s; outline-offset: 2px; }
.boss-chip img { width: 92px; height: 92px; transition: transform 0.4s var(--ease-spring); }
.boss-chip:hover, .boss-chip:focus-visible { background: rgba(229, 36, 63, 0.16); transform: translateY(-4px); }
.boss-chip:hover img, .boss-chip:focus-visible img { transform: rotate(-8deg) scale(1.08); animation: wobble 0.5s ease-in-out; }
@keyframes wobble { 25% { rotate: -6deg; } 75% { rotate: 6deg; } }
.b-name { font-size: 17px; margin-top: 8px; }
.b-effect { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* MARK: 第四攤：夜市變化（電腦版：往下捲，攤位往左走） */
.market { padding: 120px 0 40px; background: radial-gradient(ellipse 60% 40% at 15% 30%, rgba(255, 150, 70, 0.12), transparent 70%), linear-gradient(180deg, #1c1d47, #20214e 50%, #1c1d47); }
.scroll-hint { margin-top: -20px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.scroll-hint::after { content: "→"; animation: nudge 1.6s ease-in-out infinite; color: var(--gold); }
.market-pin { position: relative; }
.market-sticky { position: relative; }
.market-track { display: flex; gap: 22px; padding: 20px max(28px, calc((100vw - 1200px) / 2)) 50px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.market-track::-webkit-scrollbar { display: none; }
.mk-slot { flex: 0 0 auto; scroll-snap-align: center; }
.mk-card {
  position: relative; width: 400px; min-height: 560px; height: 100%; padding: 28px 26px 26px; border-radius: 30px; color: var(--ink);
  background: var(--cream); border: 3px solid var(--outline); box-shadow: 0 8px 0 var(--outline), var(--soft); overflow: hidden;
}
.mk-card.mk-events { width: 540px; }
.mk-slot:nth-child(3n + 2) .mk-card { background: linear-gradient(180deg, #fff6e8, #ffe7c4); }
.mk-slot:nth-child(3n) .mk-card { background: linear-gradient(180deg, #fff6e8, #f0e6ff); }
.mk-card h3 { font-size: 27px; line-height: 1.2; padding-right: 64px; }
.mk-card > p { margin-top: 10px; font-size: 15px; color: #5b4246; line-height: 1.55; }
.mk-art { position: absolute; top: 16px; right: 16px; width: 60px; height: 60px; }
.mk-card:has(> .mk-art) h3 { min-height: 58px; }
.mk-art.siren { animation: siren 1s steps(2) infinite; }
@keyframes siren { 50% { filter: drop-shadow(0 0 10px rgba(255, 40, 60, 0.9)); } }
.mk-card .phone-clip { margin-top: 18px; display: flex; justify-content: center; }
.mk-card .phone-mini { width: 170px; }
.mk-card.mk-press .phone-mini, .mk-card.mk-black .phone-mini { width: 160px; }
.mk-card .phone-clip.mini .phone-mini { width: 128px; }
.ev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ev-tag { display: inline-block; font-size: 14px; padding: 2px 12px; border-radius: 99px; border: 2px solid var(--outline); margin-bottom: 8px; }
.ev-tag.good { background: var(--teal); }
.ev-tag.bad { background: #c9b8ff; }
.ev-cols li { display: flex; gap: 6px; align-items: center; padding: 5px 0; border-top: 1.5px dashed rgba(74, 52, 56, 0.18); }
.ev-cols li img { width: 30px; height: 30px; flex-shrink: 0; }
.ev-cols b { display: block; font-size: 14px; font-weight: normal; line-height: 1.25; }
.ev-cols small { display: block; font-size: 11.5px; color: #7a5a5e; line-height: 1.3; }
.mk-rules { margin-top: 12px; counter-reset: r; display: grid; gap: 6px; }
.mk-rules li { counter-increment: r; display: flex; gap: 8px; font-size: 13.5px; color: #5b4246; line-height: 1.45; }
.mk-rules li::before { content: counter(r); flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); border: 2px solid var(--outline); font-size: 12px; color: var(--ink); }
.heat-ctrl { display: block; margin-top: 24px; font-size: 14px; color: #7a5a5e; }
.heat-range { width: 100%; margin-top: 10px; -webkit-appearance: none; appearance: none; height: 22px; border-radius: 99px; border: 3px solid var(--outline); background: linear-gradient(90deg, #4fd1b5 0%, #ffcf5a 45%, #ff8a3d 70%, #e5243f 100%); cursor: pointer; }
.heat-range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); border: 3px solid var(--outline); box-shadow: 0 3px 0 var(--outline); }
.heat-range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--cream); border: 3px solid var(--outline); }
.heat-read { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.heat-read > div { padding: 12px; border-radius: 18px; background: #fff; border: 3px solid var(--outline); text-align: center; box-shadow: 0 4px 0 var(--outline); }
.heat-read small { display: block; font-size: 13px; color: #7a5a5e; }
.heat-read b { font-size: 34px; font-weight: normal; font-variant-numeric: tabular-nums; }
.heat-bonus { color: #d6762a; }
.heat-raid { color: #d8243f; }
.heat-state { margin-top: 14px; font-size: 18px; text-align: center; min-height: 28px; }
.mk-heat.raid { animation: raid-flash 0.8s steps(2) infinite; }
@keyframes raid-flash { 50% { box-shadow: 0 8px 0 var(--outline), 0 0 0 6px rgba(229, 36, 63, 0.5), var(--soft); } }
.no-js .heat-ctrl, .no-js .heat-read, .no-js .heat-state { display: none; }
.wanted { position: relative; width: 150px; margin: 14px 0 0; }
.wanted img { width: 150px; height: 150px; filter: sepia(0.35); }
.wanted span { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; transform: rotate(-10deg); padding: 2px 14px; border: 3px solid #c2306a; color: #c2306a; font-size: 20px; border-radius: 8px; background: rgba(255, 246, 232, 0.85); letter-spacing: 0.1em; }
.mk-black .phone-clip { position: absolute; right: 18px; bottom: 22px; margin: 0; }
.mk-black .phone-mini { width: 150px; }
.icon-list { display: grid; gap: 10px; margin-top: 18px; }
.icon-list li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.7); border: 2px solid rgba(74, 52, 56, 0.15); }
.icon-list img { width: 46px; height: 46px; flex-shrink: 0; }
.icon-list b { display: block; font-size: 16px; font-weight: normal; }
.icon-list small { display: block; font-size: 13px; color: #7a5a5e; line-height: 1.4; }
.icon-list.faces img { width: 50px; height: 50px; }
.charm-pick { margin-top: 18px; text-align: center; font-size: 15px; color: #b0475a; }
.charm-fan { position: relative; display: flex; justify-content: center; margin-top: 16px; height: 270px; }
.charm-fan li {
  position: absolute; top: 10px; width: 150px; padding: 14px 12px; border-radius: 20px; text-align: center; background: #fff; border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline);
  transform: translateX(calc((var(--i) - 1) * 108px)) rotate(calc((var(--i) - 1) * 9deg)) translateY(calc(var(--i) * 0px)); transform-origin: 50% 120%;
  transition: transform 0.5s var(--ease-spring);
}
.charm-fan li:nth-child(2) { z-index: 2; top: 0; }
.charm-fan li:hover { transform: translateX(calc((var(--i) - 1) * 108px)) rotate(0) translateY(-14px); z-index: 3; }
.charm-fan img { width: 64px; height: 64px; margin: 0 auto; }
.charm-fan b { display: block; font-size: 16px; font-weight: normal; margin-top: 4px; }
.charm-fan small { display: block; font-size: 12.5px; color: #7a5a5e; line-height: 1.4; margin-top: 2px; }
.charm-fan.deal li { animation: deal 0.6s var(--ease-spring) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes deal { from { opacity: 0; transform: translateY(80px) rotate(30deg) scale(0.6); } }
.charm-shuffle { display: flex; margin: 0 auto; }
.bounty-note { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px; border-radius: 18px; background: #fff; border: 3px dashed rgba(74, 52, 56, 0.4); transform: rotate(-2deg); }
.bounty-note img { width: 42px; height: 42px; }
.bounty-note b { display: block; font-weight: normal; font-size: 17px; }
.bounty-note small { color: #7a5a5e; }
.cup-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.cup-grid li { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 11px; line-height: 1.25; color: #5b4246; }
.cup-grid img { width: 46px; height: 46px; }
.stake-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.stake-ladder li { display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 6px; border-radius: 10px; background: #fff; border: 2px solid rgba(74, 52, 56, 0.2); white-space: nowrap; overflow: hidden; }
.stake-ladder b { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--outline); font-weight: normal; font-size: 11px; }
.stake-ladder li:last-child { background: var(--gold); }
.market-progress { display: none; }

/* MARK: 第五攤：金魚乾商城 */
.store { padding: 140px 0 120px; overflow: hidden; background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 207, 90, 0.2), transparent 70%), linear-gradient(180deg, #1c1d47, #2a2450 40%, #2a2147 70%, #1c1d47); }
.fish-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.fish-card { padding: 26px 26px 24px; border-radius: 28px; border: 3px solid var(--outline); box-shadow: var(--chunky); color: var(--ink); }
.fish-card img { width: 86px; height: auto; animation: swim 3.4s ease-in-out infinite; }
.fish-card h3 { font-size: 28px; margin-top: 10px; }
.fish-card p { margin-top: 6px; font-size: 15.5px; color: #5b4246; }
.fish-card.silver { background: linear-gradient(160deg, #f4f8fd, #c9d6e8); }
.fish-card.gold { background: linear-gradient(160deg, #fff6c2, #ffc83d); }
.fish-card.gold img { filter: drop-shadow(0 0 12px rgba(255, 220, 120, 0.9)); }
@keyframes swim { 50% { transform: translateX(10px) rotate(-6deg); } }
.fish-vs { align-self: center; font-size: 46px; color: var(--gold); text-shadow: 0 3px 0 var(--outline); }
.shelf-wrap { margin-top: 80px; }
.shelf { display: flex; align-items: flex-end; gap: 16px; margin-top: 26px; overflow-x: auto; padding: 8px 4px 24px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.shelf-group { flex: 0 0 auto; padding: 16px 16px 0; border-radius: 22px 22px 8px 8px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.09); position: relative; scroll-snap-align: start; }
.shelf-group::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: -14px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, #e2aa76, var(--wood-top) 40%, var(--wood-bottom)); border: 3px solid var(--outline); }
.shelf-group h4 { font-size: 14px; color: var(--muted); margin-bottom: 10px; white-space: nowrap; }
.shelf-group > ul { display: flex; gap: 10px; align-items: flex-end; padding-bottom: 12px; }
.shelf-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; text-align: center; font-size: 13px; line-height: 1.3; color: var(--cream); transition: transform 0.3s var(--ease-spring); }
.shelf-item:hover { transform: translateY(-6px); }
.shelf-item img { width: 88px; height: 88px; object-fit: contain; }
.shelf-item .swatch { width: 120px; height: 80px; }
.shelf-item:has(.swatch) { width: 124px; }
.shelf-item.wide { width: 210px; }
.shelf-item .nameplate { width: 200px; height: auto; }
.shelf-item.stamp img { width: 40px; height: 40px; display: inline-block; }
.shelf-item.stamp { flex-direction: row; flex-wrap: wrap; justify-content: center; width: 120px; }
.shelf-item.stamp span { width: 100%; }
.dice-pair { display: flex; }
.dice-pair img { width: 50px; height: 50px; }
.dice-pair img:first-child { transform: rotate(-10deg); }
.dice-pair img:last-child { transform: rotate(8deg) translateY(6px); margin-left: -6px; }
.titles { flex-direction: column; align-items: flex-start !important; gap: 6px !important; }
.title-badge { font-size: 13px; padding: 3px 12px; border-radius: 99px; background: var(--cream); color: var(--ink); border: 2px solid var(--outline); white-space: nowrap; }
.title-badge.earn { background: var(--gold); }
.looks-wrap { margin-top: 90px; }
.looks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.look { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 2.5px solid rgba(255, 255, 255, 0.1); transition: transform 0.3s var(--ease-spring); }
.look:hover { transform: translateY(-6px) rotate(-2deg); }
.look img { width: 100%; height: auto; aspect-ratio: 1; }
.look b { font-size: 13.5px; font-weight: normal; line-height: 1.25; margin-top: 2px; }
.look small { font-size: 11px; color: var(--muted); }
.look.r-rare { border-color: rgba(155, 123, 245, 0.6); background: rgba(155, 123, 245, 0.12); }
.look.r-legendary { border-color: var(--gold); background: radial-gradient(circle at 50% 35%, rgba(255, 207, 90, 0.35), rgba(255, 207, 90, 0.06) 70%); box-shadow: 0 0 24px rgba(255, 207, 90, 0.25); }
.look.r-legendary::before { content: ""; position: absolute; inset: -2px; border-radius: 20px; background: conic-gradient(from var(--spin, 0deg), transparent 0 80%, rgba(255, 240, 180, 0.8) 88%, transparent 96%); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); padding: 2.5px; animation: spin 4s linear infinite; pointer-events: none; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }

/* 戳戳樂 */
.poke { margin-top: 100px; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) auto; gap: 34px; align-items: start; }
.poke-copy > p { color: var(--muted); margin-top: 10px; }
.odds { margin-top: 20px; padding: 16px 18px; border-radius: 20px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.odds h4 { font-size: 17px; color: #b0475a; }
.odds li { position: relative; padding-left: 18px; margin-top: 6px; font-size: 14.5px; line-height: 1.45; }
.odds li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--outline); }
.poke-board-wrap { position: relative; }
.poke-frame { padding: 14px; border-radius: 22px; background: linear-gradient(180deg, var(--wood-top), var(--wood-bottom)); border: 4px solid var(--outline); box-shadow: 0 10px 0 var(--outline), var(--soft); }
.prize-header { display: flex; justify-content: center; align-items: flex-end; gap: 10px; padding: 10px 10px 6px; border-radius: 12px; border: 3px solid var(--outline); background: radial-gradient(circle at 50% 60%, rgba(255, 207, 90, 0.6), transparent 55%), linear-gradient(180deg, #e5413f, #9e1f35); }
.prize { display: flex; flex-direction: column; align-items: center; }
.prize img { width: 86px; height: 86px; }
.prize.top img { width: 128px; height: 128px; filter: drop-shadow(0 0 14px rgba(255, 220, 120, 0.9)); animation: breathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
.prize figcaption { font-size: 13px; padding: 1px 10px; border-radius: 99px; background: var(--cream); color: var(--ink); border: 2px solid var(--outline); margin-top: -4px; white-space: nowrap; }
.prize.top figcaption { background: var(--gold); font-size: 15px; }
.poke-board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; border: 3px solid var(--outline); background: linear-gradient(180deg, #fffdf7, #f2e3cc); }
.hole { position: relative; display: block; aspect-ratio: 1; border-radius: 50%; }
.hole.poked { animation: poke-burst 0.4s var(--ease-out); }
@keyframes poke-burst { 30% { transform: scale(1.25); } }
.poke-board { position: relative; }
.slip-pop { position: absolute; width: 74px; height: auto; translate: -50% -50%; pointer-events: none; z-index: 3; animation: slip-pop 1.8s var(--ease-out) forwards; }
.slip-pop.legendary { filter: drop-shadow(0 0 12px rgba(255, 220, 120, 0.95)); width: 92px; }
@keyframes slip-pop { 0% { opacity: 0; transform: scale(0.3) rotate(-30deg); } 20% { opacity: 1; transform: translateY(-34px) scale(1.15) rotate(8deg); } 70% { opacity: 1; transform: translateY(-46px) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translateY(-70px) scale(0.9); } }
.hole img { width: 100%; height: 100%; }
.poke-clip .phone-mini { width: 200px; }

/* MARK: 每日一擲 */
.daily { padding: 120px 0; background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(79, 209, 181, 0.12), transparent 70%), linear-gradient(180deg, #1c1d47, #1d2350 50%, #1c1d47); }
.daily-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 50px; align-items: center; }
.ticks { margin-top: 26px; display: grid; gap: 12px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.ticks img { width: 28px; height: 28px; }
.board { padding: 24px; border-radius: 30px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 8px 0 var(--outline), var(--soft); transform: rotate(1.5deg); }
.board-head { display: flex; align-items: center; gap: 14px; }
.board-head h3 { font-size: 24px; }
.board-trophy { width: 40px; height: 40px; margin-left: auto; }
.cal { display: flex; flex-direction: column; align-items: center; width: 58px; border-radius: 12px; overflow: hidden; border: 3px solid var(--outline); background: #fff; flex-shrink: 0; }
.cal::before { content: ""; display: block; width: 100%; height: 12px; background: var(--lantern); border-bottom: 2px solid var(--outline); }
.cal-day { font-size: 26px; line-height: 1.1; font-weight: normal; }
.cal-month { font-size: 11px; color: #8b6a6e; margin-bottom: 3px; }
.board-list { margin-top: 16px; display: grid; gap: 8px; min-height: 230px; }
.board-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: #fff; border: 2px solid rgba(74, 52, 56, 0.12); }
.board-list li:first-child .rank { background: var(--gold); }
.rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cream-2); border: 2px solid var(--outline); font-size: 15px; }
.who small { color: #9b7b7f; margin-left: 4px; font-size: 12px; }
.pts { font-variant-numeric: tabular-nums; font-size: 18px; }
.board-list .empty { display: block; text-align: center; color: #7a5a5e; padding: 30px 10px; }
.board-loading { display: flex !important; justify-content: center; gap: 8px; background: none !important; border: 0 !important; padding: 80px 0 !important; }
.board-loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); animation: dot 1s infinite; }
.board-loading span:nth-child(2) { animation-delay: 0.15s; } .board-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 50% { transform: translateY(-10px); } }
.board-more { display: inline-block; margin-top: 14px; color: #b0475a; text-decoration: none; }
.board-more:hover { text-decoration: underline; }

/* MARK: 你家的貓 */
.yourcat { padding: 100px 0 120px; background: linear-gradient(180deg, #1c1d47, #22224f 50%, #1c1d47); }
.yourcat-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 50px; align-items: center; }
.yourcat-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 40px 0 10px; }
.spotlight { position: absolute; top: 0; left: 50%; width: 360px; height: 360px; margin-left: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 90, 0.35), transparent 65%); }
.homecat { position: relative; width: 300px; height: 300px; transform-origin: 50% 100%; animation: breathe 3.4s ease-in-out infinite; }
.homecat.swap { animation: cat-swap 0.6s var(--ease-spring); }
@keyframes cat-swap { 0% { transform: scale(1); } 30% { transform: scale(0.2) rotate(-200deg); opacity: 0; } 60% { transform: scale(1.15) rotate(10deg); opacity: 1; } 100% { transform: none; } }
.btn-homecat { margin-top: 10px; }
.homecat-strip { display: flex; gap: 6px; margin-top: 26px; }
.homecat-strip img { width: 74px; height: 74px; }
.homecat-strip li:nth-child(odd) { transform: translateY(6px); }

/* MARK: 免費 */
.free { padding: 100px 0; background: linear-gradient(180deg, #1c1d47, #1e1f4b); }
.free-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
.free-card { padding: 28px; border-radius: 28px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: var(--chunky); }
.free-card.ads { background: linear-gradient(160deg, #fff6e8, #ffe2b0); }
.free-card h3 { display: flex; align-items: center; gap: 10px; font-size: 24px; margin-bottom: 14px; }
.free-card h3 img { width: 34px; height: 34px; }
.free-card ul { display: grid; gap: 12px; }
.free-card li { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.free-card li img { width: 28px; height: 28px; flex-shrink: 0; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.feature { padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.08); transition: transform 0.3s var(--ease-spring); }
.feature:hover { transform: translateY(-5px); }
.feature img { width: 48px; height: 48px; }
.feature h3 { margin-top: 12px; font-size: 20px; }
.feature p { margin-top: 6px; font-size: 14.5px; color: var(--muted); }

/* MARK: 常見問題 */
.faq { padding: 100px 0 120px; background: var(--night-deep); }
.faq-list { display: grid; gap: 12px; }
.qa { border-radius: 22px; background: var(--panel); border: 2px solid rgba(255, 255, 255, 0.07); transition: background 0.2s; }
.qa[open] { background: #25265a; }
.qa summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 19px; flex: 1; }
.qa summary::after { content: "+"; font-size: 26px; color: var(--gold); transition: transform 0.3s var(--ease-spring); }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 22px 20px; color: var(--muted); font-size: 16px; }

/* MARK: 收攤前 */
.cta { padding: 170px 0 0; 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, var(--night-deep), #262860); }
.cta-lanterns { top: 0; }
.cta-title { font-size: clamp(40px, 6vw, 84px); max-width: 14em; margin: 0 auto; text-wrap: balance; }
.cta .lead { margin: 18px auto 0; }
.cta-actions { margin-top: 36px; display: flex; justify-content: center; align-items: center; gap: 34px; flex-wrap: wrap; }
.qr { display: flex; align-items: center; gap: 14px; text-align: left; }
.qr-box { width: 112px; height: 112px; padding: 10px; border-radius: 16px; background: #fff; border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.qr-code { width: 100%; height: 100%; }
.qr p { max-width: 9em; font-size: 14px; color: var(--muted); }
.sleepy-cats { display: flex; justify-content: center; align-items: flex-end; margin-top: 60px; position: relative; }
.sleepy-cats::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(180deg, #e2aa76, var(--wood-top) 40%, var(--wood-bottom)); border-top: 3px solid var(--outline); }
.sleepy-cats img { width: 150px; height: 150px; margin: 0 -14px -8px; position: relative; z-index: 1; animation: breathe 4s ease-in-out infinite; transform-origin: 50% 100%; }
.sleepy-cats img:nth-child(2) { animation-delay: -1.3s; width: 170px; height: 170px; }
.sleepy-cats img:nth-child(4) { animation-delay: -2.1s; }

/* MARK: 頁尾 */
.site-footer { background: #121330; padding: 36px 0 30px; border-top: 3px solid var(--outline); }
.footer-grid { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 12px; }
.footer-brand strong { display: block; font-weight: normal; }
.footer-brand span { font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-footer nav a:hover { color: var(--cream); }
.footer-note { width: var(--wrap); margin: 22px auto 0; font-size: 13px; color: rgba(189, 186, 230, 0.7); }
.sticky-dl { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; display: none; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 20px; background: rgba(30, 31, 69, 0.94); backdrop-filter: blur(10px); border: 2px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transform: translateY(140%); transition: transform 0.4s var(--ease-out); }
.sticky-dl img { border-radius: 10px; }
.sticky-dl span { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.sticky-dl small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-dl .btn { min-height: 44px; padding: 8px 16px; font-size: 16px; }
.sticky-dl.show { transform: none; }
.lang-toast { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline); font-size: 15px; animation: toast 0.5s var(--ease-spring); }
.lang-toast[hidden] { display: none; }
.lang-toast a { color: #b0475a; }
.lang-toast button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 0 4px; color: var(--ink); }
@keyframes toast { from { transform: translateY(40px); opacity: 0; } }
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.notfound h1 { font-size: 90px; -webkit-text-stroke: 0.12em var(--outline); paint-order: stroke fill; }

/* MARK: 出現動畫 */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-spring); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .stall-sign:not(.in) { opacity: 0; }
.stall-sign.in { animation: sign-drop 0.9s var(--ease-spring), sign-sway 5s ease-in-out 0.9s infinite; }
@keyframes sign-drop { from { opacity: 0; transform: translateY(-60px) rotate(-14deg); } }

/* MARK: 平板 */
@media (max-width: 1180px) {
  .site-nav a { padding: 7px 8px; font-size: 14px; }
  .arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .arena-clip { display: none; }
  .poke { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .poke-clip { display: none; }
  .looks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .boss-roster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .map-street { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .map-street::before { display: none; }
}
@media (max-width: 1020px) {
  .anatomy-body { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-list.right { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .ap-list.right .ap::after { display: none; }
  .site-nav { display: none; }
  .sound-toggle { margin-left: auto; }
  .hero-copy { max-width: 60%; }
  .collar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gang-panel { grid-template-columns: 250px minmax(0, 1fr); }
  .leader-card img { width: 170px; height: 170px; }
  .factor { grid-template-columns: 1fr; }
  .factor p, .factor-meter { grid-column: auto; grid-row: auto; }
}

/* MARK: 手機 */
@media (max-width: 720px) {
  :root { --wrap: calc(100vw - 32px); --header-h: 60px; }
  body { font-size: 16px; }
  .site-header { gap: 8px; padding: 0 12px; }
  .brand span { display: none; }
  .nav-cta { display: none; }
  .lang-switch { font-size: 12px; }
  .lang-switch a, .lang-switch span { padding: 4px 8px; }
  .sound-toggle { width: 38px; height: 38px; }
  .section-head { margin-bottom: 30px; }
  .stall-sign { margin-top: 34px; }
  .stall-sign span { font-size: 15px; padding: 7px 16px 8px; }

  .hero { min-height: 0; padding-top: calc(var(--header-h) + 58px); }
  .hero-lanterns { top: 44px; }
  .hero-lanterns .lantern { top: calc(var(--drop) * 0.35); scale: 0.78; }
  .hero-inner { flex-direction: column; gap: 26px; padding: 6px 0 330px; text-align: center; }
  .hero-copy { max-width: none; }
  .hero-pills { justify-content: center; }
  .wordmark { font-size: clamp(54px, 17vw, 76px); margin-top: 16px; }
  .hero-sub { font-size: 22px; }
  .lang-en .hero-sub { font-size: 18px; }
  .hero-tagline { margin: 12px auto 0; font-size: 16px; }
  .hero-actions { justify-content: center; margin-top: 22px; flex-direction: column; gap: 10px; }
  .hero-phone { position: relative; right: auto; bottom: auto; }
  .phone { width: 210px; border-radius: 38px; padding: 8px; transform: rotate(-3deg); }
  .phone-screen { border-radius: 31px; }
  .phone-island { top: 15px; height: 18px; }
  .hero-phone:hover .phone { transform: rotate(-3deg); }
  .moon { width: 60px; height: 60px; top: 9%; right: 6%; }
  .skyline { bottom: 324px; height: 320px; }
  .stall-row { bottom: 334px; height: 120px; }
  .stall { width: 30%; }
  .stall:nth-child(n + 4) { display: none; }
  .stall .peek { width: 70px; height: 70px; margin-left: -35px; }
  .hero-table { height: 318px; }
  .table-cats { left: 50%; translate: -50% 0; bottom: 248px; }
  .table-cat { width: 80px; height: 80px; margin-right: -14px; }
  .table-cat:nth-child(3) { width: 92px; height: 92px; }
  .table-wood { bottom: 232px; height: 20px; }
  .table-cloth { height: 235px; }
  .die { width: 54px; height: 54px; }
  .dice-zone { right: 0; bottom: 118px; }
  .no-js .die, .js .die:not(.placed) { left: calc(50% - 160px + var(--slot, 0) * 64px); top: 20px; }
  .table-ui { left: 12px; right: 12px; bottom: 12px; flex-direction: column; gap: 4px; text-align: center; }
  .table-result { white-space: normal; }
  .roll-cta { align-self: center; font-size: 13px; }
  .shake-btn { font-size: 19px; padding: 8px 20px 8px 10px; }
  .shake-btn img { width: 34px; height: 34px; }
  .shake-help { align-items: center; }
  .hint-key { display: none; }
  .hint-phone { display: block; }
  .table-result { font-size: 18px; min-height: 26px; }
  .bubble { font-size: 12px; padding: 2px 7px; }

  .ribbon { margin-top: -8px; }
  .ribbon-track span { font-size: 19px; }
  .map { padding: 80px 0 40px; }
  .map-street { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; row-gap: 20px; }
  .map-stall { padding: 14px 10px; }
  .map-art { width: 70px; height: 70px; }
  .map-art img { width: 52px; height: 52px; }
  .map-stall b { font-size: 17px; }
  .map-stall small { font-size: 12.5px; }

  .play, .crew, .boss, .store, .daily { padding-top: 90px; padding-bottom: 90px; }
  .steps { grid-template-columns: 1fr; gap: 50px; }
  .step:nth-child(2) { margin-top: 0; }
  .phone-mini { width: 220px; }
  .hand-table summary { font-size: 18px; padding: 16px 18px; }

  .gang-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
  .gang-tabs::-webkit-scrollbar { display: none; }
  .gang-tab { flex-shrink: 0; font-size: 15px; }
  .gang-panel { grid-template-columns: 1fr; }
  .leader-card { position: relative; top: 0; display: grid; grid-template-columns: 120px 1fr; gap: 0 14px; text-align: left; align-items: center; padding: 22px 16px 18px; }
  .leader-card img { width: 120px; height: 120px; grid-row: 1 / span 2; }
  .leader-card h4 { font-size: 22px; margin: 0; }
  .leader-card p { margin-top: 4px; font-size: 13.5px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cat-front, .cat-back { padding: 6px 6px 8px; border-radius: 18px; }
  .cat-name { font-size: 14px; }
  .cat-title { font-size: 11px; }
  .cat-ability { font-size: 11.5px; }
  .factor { padding: 22px 18px; }
  .factor-meter { gap: 8px; }
  .factor-meter b { font-size: 21px; }
  .collar-grid { gap: 12px; }
  .collar-card { padding: 12px 10px 16px; }
  .collar-cat { width: 110px; height: 110px; }
  .collar-icon { width: 40px; height: 40px; top: 8px; right: 8px; padding: 4px; }
  .collar-card h4 { font-size: 16px; }
  .collar-card p { font-size: 13px; }
  .extras { grid-template-columns: 1fr; }

  .hazard { top: 20px; }
  .hazard-track span { font-size: 18px; }
  .arena { grid-template-columns: 1fr; padding: 20px 14px; gap: 22px; }
  .anatomy-body { grid-template-columns: 1fr; gap: 22px; }
  .anatomy-phone { order: -1; display: flex; justify-content: center; }
  .anatomy-phone .phone-mini { width: 230px; }
  .ap-list { gap: 22px; }
  .ap::after { display: none; }
  .ap-list.right { grid-template-columns: 1fr; }
  .ap-text b { font-size: 18px; }
  .inline-cta { flex-direction: column; text-align: center; gap: 12px; }
  .inline-cta.left { align-items: flex-start; text-align: left; }
  .boss-portrait { width: 160px; height: 160px; }
  .move-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .boss-roster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .boss-chip img { width: 70px; height: 70px; }
  .b-name { font-size: 14.5px; }
  .b-effect { font-size: 11px; }

  .market { padding-top: 90px; }
  .market-track { padding: 16px 16px 40px; gap: 14px; }
  .mk-card { width: min(84vw, 340px); min-height: 520px; padding: 22px 18px; }
  .mk-card.mk-events { width: min(88vw, 360px); }
  .mk-card h3 { font-size: 23px; }
  .charm-fan { height: 250px; }
  .charm-fan li { width: 112px; padding: 12px 8px; transform: translateX(calc((var(--i) - 1) * 74px)) rotate(calc((var(--i) - 1) * 7deg)); }
  .charm-fan li:hover { transform: translateX(calc((var(--i) - 1) * 74px)) translateY(-10px); }
  .charm-fan img { width: 52px; height: 52px; }
  .mk-black .phone-clip { position: static; margin-top: 16px; }

  .fish-compare { grid-template-columns: 1fr; gap: 12px; }
  .fish-vs { justify-self: center; font-size: 34px; }
  .looks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .poke { grid-template-columns: 1fr; gap: 26px; margin-top: 80px; }
  .poke-frame { padding: 10px; }
  .prize img { width: 64px; height: 64px; }
  .prize.top img { width: 96px; height: 96px; }
  .poke-board { gap: 5px; padding: 8px; }

  .daily-grid, .yourcat-grid, .free-grid { grid-template-columns: 1fr; gap: 34px; }
  .board { transform: none; padding: 18px; }
  .homecat { width: 230px; height: 230px; }
  .spotlight { width: 280px; height: 280px; margin-left: -140px; }
  .homecat-strip img { width: 50px; height: 50px; }
  .features { grid-template-columns: 1fr; }
  .free-card { padding: 22px; }
  .free-card li { font-size: 16px; }
  .qa summary { padding: 16px 18px; }
  .qa summary h3 { font-size: 17px; }
  .cta { padding-top: 140px; }
  .cta-actions { flex-direction: column; gap: 22px; }
  .qr { display: none; }
  .sleepy-cats img { width: 92px; height: 92px; margin: 0 -10px -6px; }
  .sleepy-cats img:nth-child(2) { width: 104px; height: 104px; }
  .sticky-dl { display: flex; }
  .site-footer { padding-bottom: 96px; }
  .site-footer nav { margin-left: 0; }
  .lang-toast { left: 12px; right: 12px; bottom: 86px; }
}

/* 電腦版：夜市變化區往下捲時，攤位往左走（JS 加上 .pinned） */
@media (min-width: 721px) {
  .market-pin.pinned { height: var(--pin-h, 300vh); }
  .market-pin.pinned .market-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
  .market-pin.pinned .market-track { align-items: center; overflow: visible; scroll-snap-type: none; transform: translate3d(var(--mx, 0px), 0, 0); will-change: transform; padding-top: calc(var(--header-h) + 10px); }
  .market-pin.pinned .mk-card { min-height: min(600px, calc(100vh - var(--header-h) - 110px)); }
  .market-pin.pinned .market-progress { display: block; position: absolute; left: 50%; bottom: 24px; width: 200px; margin-left: -100px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
  .market-pin.pinned .market-progress i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(var(--mp, 0)); }
}

/* 不想要動畫：全部靜止，直接顯示結果 */
@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; }
  .js [data-reveal], .js .stall-sign:not(.in), .js .wordmark .word, .js .wordmark .amp { opacity: 1; transform: none; }
  .ribbon-track, .hazard-track { animation: none; }
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
.no-motion [data-reveal], .no-motion .stall-sign, .no-motion .wordmark .word, .no-motion .wordmark .amp { opacity: 1 !important; transform: none !important; }
.no-motion { scroll-behavior: auto !important; }
.no-motion .market-track { flex-wrap: wrap; justify-content: center; overflow: visible; }

/* MARK: 動態細節：標題逐字跳出、進度條、卡片傾斜、首屏進場 */
.lang-ja :is(.section-title, .sub-title, .cta-title, .try-title, .lead, .hero-tagline, .step p, .mk-card > p) { word-break: auto-phrase; }
.lang-zh-hant :is(.section-title, .sub-title, .cta-title, .try-title) { word-break: keep-all; overflow-wrap: anywhere; }
.hint-touch { display: none; }
@media (max-width: 720px) { .hint-desk { display: none; } .hint-touch { display: inline; } }
.split { opacity: 1 !important; transform: none !important; }
.split .w { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; opacity: 0; transform: translateY(0.5em) rotate(7deg) scale(0.9); transition: opacity 0.45s var(--ease-out), transform 0.75s var(--ease-spring); transition-delay: calc(var(--c) * 26ms); }
.split.in .ch { opacity: 1; transform: none; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: left; transform: scaleX(var(--progress, 0)); background: linear-gradient(90deg, var(--lantern), var(--orange), var(--gold)); opacity: 0; transition: opacity 0.3s; }
.site-header.scrolled::after { opacity: 1; }
.tilting { transform: perspective(800px) rotateX(var(--tx, 0)) rotateY(var(--ty, 0)) translateY(-4px) !important; transition: transform 0.12s ease-out !important; }
.js .table-cat img { animation: peek-up 0.9s var(--ease-spring) both; }
.js .table-cat:nth-child(1) img { animation-delay: 0.45s; } .js .table-cat:nth-child(2) img { animation-delay: 0.55s; } .js .table-cat:nth-child(3) img { animation-delay: 0.65s; }
.js .table-cat:nth-child(4) img { animation-delay: 0.75s; } .js .table-cat:nth-child(5) img { animation-delay: 0.85s; }
@keyframes peek-up { from { transform: translateY(70%); } }
.js .hero-lanterns .lantern::after { animation: lantern-on 0.7s ease-out both; animation-delay: calc(0.2s + var(--d) * 0.5); }
.js .hero-lanterns .lantern .glow { animation: lantern-on 0.7s ease-out calc(0.2s + var(--d) * 0.5) both, flicker 2.8s ease-in-out var(--d) infinite; }
@keyframes lantern-on { from { opacity: 0.1; filter: brightness(0.3); } 60% { opacity: 1; filter: brightness(1.5); } }
.js .stall-row .stall { animation: stall-up 0.9s var(--ease-out) both; animation-delay: calc(0.1s + var(--i) * 70ms); }
@keyframes stall-up { from { opacity: 0; transform: translateY(40px); } }

/* MARK: 排行榜頁 */
.lb-hero { position: relative; padding: calc(var(--header-h) + 90px) 0 40px; text-align: center; overflow: hidden; background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(255, 207, 90, 0.18), transparent 70%), linear-gradient(180deg, #34367a, #24265e 70%, #1c1d47); }
.lb-hero .section-title { margin: 0 auto; }
.lb-hero .lead { margin: 16px auto 0; }
.lb-lanterns { top: calc(var(--header-h) - 14px); }
.lb-podium { display: flex; justify-content: center; align-items: flex-end; margin-top: 30px; }
.lb-podium img { width: 120px; height: 120px; animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.lb-podium .p0 { order: -1; }
.lb-podium .p1 { width: 150px; height: 150px; animation-delay: -1.2s; }
.lb { padding: 0 0 100px; background: #1c1d47; }
.lb-card { position: relative; margin-top: -10px; padding: 22px; border-radius: 30px; background: var(--cream); color: var(--ink); border: 3px solid var(--outline); box-shadow: 0 8px 0 var(--outline), var(--soft); }
.lb-tabs { display: flex; gap: 8px; padding: 5px; border-radius: 20px; background: #f1e2cc; border: 2.5px solid rgba(74, 52, 56, 0.25); }
.lb-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border-radius: 15px; border: 0; background: none; color: #7a5a5e; font-size: 17px; transition: background 0.2s, color 0.2s; }
.lb-tab img { width: 24px; height: 24px; opacity: 0.7; }
.lb-tab[aria-selected="true"] { background: var(--gold); color: var(--ink); box-shadow: 0 3px 0 var(--outline), inset 0 0 0 2.5px var(--outline); }
.lb-tab[aria-selected="true"] img { opacity: 1; }
.no-js .lb-tabs { display: none; }
.lb-note { display: flex; align-items: center; gap: 12px; margin: 18px 4px 6px; color: #7a5a5e; font-size: 15px; min-height: 52px; }
.lb-note .cal[hidden] { display: none; }
.lb-list { display: grid; gap: 8px; margin-top: 8px; min-height: 300px; }
.lb-list.in li { animation: card-in 0.45s var(--ease-spring) both; }
.lb-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: #fff; border: 2px solid rgba(74, 52, 56, 0.12); }
.lb-list li:nth-child(-n + 3) { border-color: rgba(74, 52, 56, 0.35); background: linear-gradient(90deg, #fff7dc, #fff); }
.lb-list .rank { width: 36px; height: 36px; font-size: 16px; }
.rank.medal { color: var(--ink); box-shadow: 0 3px 0 var(--outline); }
.rank.m1 { background: linear-gradient(180deg, #ffe58a, #f5b72e) !important; }
.rank.m2 { background: linear-gradient(180deg, #f1f4fa, #b9c3d6) !important; }
.rank.m3 { background: linear-gradient(180deg, #f7c79b, #c98652) !important; }
.lb-list .who { display: flex; flex-direction: column; min-width: 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.lb-list .who small { margin: 0; }
.lb-list .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: #8b6a6e; margin-top: 2px; }
.lb-list .won { display: inline-flex; align-items: center; gap: 3px; color: #b07a12; }
.lb-list .won img { width: 15px; height: 15px; }
.lb-list .hand { padding: 0 8px; border-radius: 99px; background: #fbe7ea; color: #b0475a; }
.lb-list .lb-crew { display: flex; }
.lb-list .lb-crew img { width: 34px; height: 34px; margin-left: -9px; }
.lb-list .lb-crew img:first-child { margin-left: 0; }
.lb-list .pts { font-size: 20px; text-align: right; min-width: 4.5em; }
.lb-list .empty { display: block; text-align: center; color: #7a5a5e; padding: 50px 10px; }
.lb-noscript { padding: 20px; text-align: center; color: #7a5a5e; }
.lb-cta { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: var(--muted); }
.lb-back { color: var(--gold); text-decoration: none; font-size: 15px; }
.lb-back:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .lb-hero { padding-top: calc(var(--header-h) + 70px); }
  .lb-podium img { width: 84px; height: 84px; }
  .lb-podium .p1 { width: 104px; height: 104px; }
  .lb-card { padding: 14px; border-radius: 24px; }
  .lb-tab { font-size: 15px; padding: 9px 4px; gap: 5px; }
  .lb-tab img { width: 20px; height: 20px; }
  .lb-list li { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 8px; padding: 9px 10px; }
  .lb-list .rank { width: 30px; height: 30px; font-size: 14px; }
  .lb-list .who { font-size: 16px; }
  .lb-list .lb-crew { grid-column: 2 / 4; grid-row: 2; }
  .lb-list .lb-crew img { width: 26px; height: 26px; margin-left: -6px; }
  .lb-list .pts { font-size: 17px; grid-column: 3; grid-row: 1; min-width: 0; }
}

/* 夜市名牌：稱號（金魚乾買得到的奶油色、只能玩出來或付費拿到的金色）＋骰子造型；裝了名牌的那一列金色外框 */
.lb-plate { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }
.lb-title { font-size: 11px; font-weight: 800; line-height: 1; color: var(--ink, #4a3438); padding: 3px 8px; border-radius: 999px; background: #fff6e8; border: 1.5px solid #4a3438; white-space: nowrap; }
.lb-title.earn { background: #ffcf5a; }
.lb-dice { width: 18px; height: 18px; }
.board-list li.has-plate, .lb-list li.has-plate { border-color: #c99a4a; box-shadow: inset 0 0 0 1px rgba(201, 154, 74, 0.35); }
.board-list .who { display: flex; flex-direction: column; min-width: 0; }
.board-list .who .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list .who .name { display: flex; flex-direction: column; }
