/* 小廢廢遊樂園：復古遊樂園看板 × 入場券 × 旋轉木馬 */

:root {
  --bg: #fff1d8;
  --bg-2: #ffe2b4;
  --sky-top: #8fd6ff;
  --sky-bot: #fff1d8;
  --text: #2e1a33;
  --text-soft: #6d5468;
  --paper: #fffaf0;
  --paper-2: #fff3dc;
  --ink: #2e1a33;
  --outline: #2e1a33;
  --red: #ff4b3e;
  --red-dark: #c92c22;
  --yellow: #ffc53d;
  --teal: #13b3a3;
  --purple: #7b61ff;
  --pink: #ff8fb1;
  --cloud: #ffffff;
  --bulb: #fff3b0;
  --bulb-off: #e9b44a;
  --stage-bg: #ffe9c4;
  --chip: #fffaf0;
  --c-game: #ff4b3e;
  --c-toy: #13b3a3;
  --c-film: #7b61ff;
  --f-round: "Chiron GoRound TC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-fat: "Bagel Fat One", var(--f-round);
  --radius: 18px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1d1438;
  --bg-2: #2a1d52;
  --sky-top: #0c0a26;
  --sky-bot: #2b1d55;
  --text: #fff1d8;
  --text-soft: #cdb9e3;
  --paper: #fff5e3;
  --paper-2: #fbe9c9;
  --outline: #0b0718;
  --cloud: #3b2c6e;
  --stage-bg: #2a1d52;
  --chip: #2f2260;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1438;
    --bg-2: #2a1d52;
    --sky-top: #0c0a26;
    --sky-bot: #2b1d55;
    --text: #fff1d8;
    --text-soft: #cdb9e3;
    --paper: #fff5e3;
    --paper-2: #fbe9c9;
    --outline: #0b0718;
    --cloud: #3b2c6e;
    --stage-bg: #2a1d52;
    --chip: #2f2260;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 30%, color-mix(in oklab, var(--yellow) 22%, transparent) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 70%, color-mix(in oklab, var(--pink) 20%, transparent) 0 2px, transparent 3px) 0 0 / 58px 58px,
    var(--bg);
  color: var(--text);
  font-family: var(--f-round);
  font-weight: 500;
  line-height: 1.6;
  overflow-x: clip;
}

button, input { font: inherit; color: inherit; }
a { color: inherit; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 8px 14px; border-radius: 999px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--outline); text-decoration: none; font-weight: 800;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ── 三角旗 ─────────────────────────────── */
.bunting {
  position: absolute; left: 0; top: 0; width: 100%; height: 64px; z-index: 3;
  pointer-events: none; overflow: visible;
}
.bunting-string { fill: none; stroke: var(--text); stroke-width: 2; opacity: .55; }
.bunting-flags path { stroke: var(--outline); stroke-width: 1.5; transform-box: fill-box; transform-origin: 50% 0; animation: flag 3.2s ease-in-out infinite; }
@keyframes flag { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* ── 主看板區 ─────────────────────────────── */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  padding: 88px 16px 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 78%);
  overflow: hidden;
  isolation: isolate;
}
.hero::after { /* 地平線的條紋帳篷邊 */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; z-index: -1;
  background:
    radial-gradient(circle at 20px 0, var(--bg) 19px, transparent 20px) 0 100% / 40px 40px repeat-x;
}
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 28% 42%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 12%, #fff6c8 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 62% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 78% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 46%, #fff6c8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 60%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 36% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.7px 1.7px at 70% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 94% 76%, #fff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { to { filter: brightness(.6); } }
:root[data-theme="dark"] .stars { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stars { opacity: 1; } }

.cloud {
  position: absolute; width: 150px; height: 46px; border-radius: 46px; background: var(--cloud);
  box-shadow: 0 6px 0 color-mix(in oklab, var(--outline) 12%, transparent);
  animation: drift 60s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 64px; height: 64px; left: 22px; top: -32px; }
.cloud::after { width: 48px; height: 48px; left: 74px; top: -22px; }
.c1 { top: 16%; left: -10%; }
.c2 { top: 34%; left: -30%; transform: scale(.7); animation-duration: 80s; animation-delay: -30s; }
.c3 { top: 8%; left: -50%; transform: scale(.85); animation-duration: 95s; animation-delay: -60s; opacity: .8; }
@keyframes drift { to { left: 115%; } }

.wheel {
  position: absolute; right: max(-90px, calc(50% - 680px)); bottom: 34px;
  width: clamp(220px, 28vw, 380px); height: auto; opacity: .9;
}
@media (max-width: 1100px) { .wheel { opacity: .5; } }
.wheel-legs path { stroke: var(--text); stroke-width: 7; stroke-linecap: round; fill: none; opacity: .5; }
.wheel-spin { animation: spin 40s linear infinite; transform-origin: 0 0; }
.rim { fill: none; stroke: var(--red); stroke-width: 6; }
.rim-in { fill: none; stroke: var(--yellow); stroke-width: 2.5; stroke-dasharray: 3 9; }
.spokes line { stroke: var(--text); stroke-width: 2; opacity: .35; }
.hub { fill: var(--yellow); stroke: var(--outline); stroke-width: 3; }
.gondola { animation: spin 40s linear infinite reverse; transform-box: fill-box; transform-origin: 50% 0; }
.gondola rect { stroke: var(--outline); stroke-width: 2; }
@keyframes spin { to { transform: rotate(360deg); } }

.theme-toggle {
  position: absolute; top: 74px; right: 16px; z-index: 4;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2.5px solid var(--outline); background: var(--paper); cursor: pointer;
  box-shadow: 3px 3px 0 var(--outline);
  display: grid; place-items: center; font-size: 22px;
  transition: transform .15s;
}
.theme-toggle:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

/* ── 招牌 ─────────────────────────────── */
.sign { position: relative; display: flex; flex-direction: column; align-items: center; }
.sign-ribbon {
  position: relative; z-index: 2; margin-bottom: -14px;
  display: inline-flex; gap: 6px; align-items: center;
  padding: 6px 22px 8px; background: var(--teal); color: #fff;
  border: 2.5px solid var(--outline); border-radius: 6px;
  font-family: var(--f-fat); font-weight: 400; font-size: clamp(12px, 1.6vw, 16px); letter-spacing: .08em;
  box-shadow: 3px 3px 0 var(--outline);
  transform: rotate(-2deg);
}
.sign-ribbon i { font-style: normal; opacity: .7; }
.sign-board {
  position: relative;
  padding: clamp(30px, 4.4vw, 46px) clamp(22px, 4vw, 54px) clamp(26px, 4vw, 40px);
  background: var(--red);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 0 0 0 7px var(--yellow), 0 0 0 11px var(--outline), 10px 14px 0 11px color-mix(in oklab, var(--outline) 85%, transparent);
}
:root[data-theme="dark"] .sign-board { box-shadow: 0 0 0 7px var(--yellow), 0 0 0 11px var(--outline), 0 0 60px 20px color-mix(in oklab, var(--red) 40%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sign-board { box-shadow: 0 0 0 7px var(--yellow), 0 0 0 11px var(--outline), 0 0 60px 20px color-mix(in oklab, var(--red) 40%, transparent); }
}
.bulbs { position: absolute; inset: 9px; pointer-events: none; }
.bulb {
  position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: var(--bulb); border: 1.5px solid color-mix(in oklab, var(--outline) 60%, transparent);
  box-shadow: 0 0 8px 2px color-mix(in oklab, var(--bulb) 80%, transparent);
  animation: chase 1.2s steps(1) infinite;
}
.bulb:nth-child(3n + 1) { animation-delay: -.4s; }
.bulb:nth-child(3n + 2) { animation-delay: -.8s; }
@keyframes chase {
  0%, 33% { background: var(--bulb); box-shadow: 0 0 10px 3px color-mix(in oklab, var(--bulb) 85%, transparent); }
  34%, 100% { background: var(--bulb-off); box-shadow: none; }
}
.sign h1 {
  margin: 0; display: flex; gap: clamp(4px, .8vw, 10px); flex-wrap: nowrap; justify-content: center;
  font-size: clamp(34px, 8.6vw, 96px); line-height: 1; font-weight: 900; letter-spacing: 0;
}
.sign h1 span {
  display: grid; place-items: center;
  width: 1.18em; height: 1.24em; padding-bottom: .04em;
  background: var(--paper); color: var(--red);
  border: .055em solid var(--outline); border-radius: .2em;
  box-shadow: .06em .07em 0 var(--outline);
  text-shadow: .035em .035em 0 color-mix(in oklab, var(--yellow) 85%, transparent);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  animation: bob 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.35s);
}
.sign h1 span:nth-child(odd) { --r: -4deg; }
.sign h1 span:nth-child(even) { --r: 3deg; }
.sign h1 span:nth-child(2), .sign h1 span:nth-child(3) { color: var(--purple); }
.sign h1 span:nth-child(4), .sign h1 span:nth-child(5), .sign h1 span:nth-child(6) { color: var(--teal); }
.sign h1 span:nth-child(6) { color: var(--red); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.06em; } }
.sign h1 span:hover { animation: wobble .5s ease; }
@keyframes wobble { 30% { transform: rotate(10deg) scale(1.08); } 60% { transform: rotate(-8deg) scale(1.04); } }
.sign-legs { display: flex; gap: clamp(120px, 30vw, 300px); margin-top: 11px; }
.sign-legs i { width: 14px; height: 40px; background: repeating-linear-gradient(180deg, var(--paper) 0 8px, var(--red) 8px 16px); border: 2.5px solid var(--outline); border-top: 0; border-radius: 0 0 6px 6px; }

.tagline { margin: 20px 0 0; font-size: clamp(16px, 2.2vw, 21px); font-weight: 700; color: var(--text); }
.tagline b { font-family: var(--f-fat); font-weight: 400; color: var(--red); font-size: 1.25em; padding: 0 .1em; }
.br-sm { display: none; }

.stats {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.stats li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--chip); border: 2px solid var(--outline);
  box-shadow: 2px 3px 0 var(--outline);
  font-size: 14px; color: var(--text);
}
.stats li span { color: var(--text-soft); font-weight: 700; }
.stats b { font-weight: 900; font-variant-numeric: tabular-nums; }

.gacha {
  margin-top: 28px; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 999px;
}
.gacha-face {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 34px 18px;
  font-size: clamp(19px, 2.6vw, 24px); font-weight: 900; letter-spacing: .04em; color: #fff;
  background: linear-gradient(180deg, #ff6b5f, var(--red) 60%);
  border: 3px solid var(--outline); border-radius: 999px;
  box-shadow: 0 8px 0 var(--red-dark), 0 8px 0 3px var(--outline), 0 16px 26px rgba(0,0,0,.18);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  transition: transform .12s, box-shadow .12s;
}
.gacha:hover .gacha-face { transform: translateY(-2px); box-shadow: 0 10px 0 var(--red-dark), 0 10px 0 3px var(--outline), 0 20px 30px rgba(0,0,0,.2); }
.gacha:active .gacha-face { transform: translateY(6px); box-shadow: 0 2px 0 var(--red-dark), 0 2px 0 3px var(--outline); }
.gacha-dice { display: inline-block; font-size: 1.2em; }
.gacha:hover .gacha-dice { animation: roll .6s ease; }
@keyframes roll { to { transform: rotate(360deg); } }
.gacha-note { margin: 14px 0 0; font-size: 13px; color: var(--text-soft); }

/* ── 篩選列 ─────────────────────────────── */
.zones {
  position: sticky; top: 0; z-index: 20;
  padding: 10px 16px 8px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2.5px solid var(--outline);
}
.zones-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; padding: 3px 4px 6px 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 12px;
  border: 2.5px solid var(--outline); background: var(--paper); color: var(--ink);
  font-weight: 800; font-size: 15px; cursor: pointer; white-space: nowrap;
  box-shadow: 3px 3px 0 var(--outline);
  transition: transform .12s, box-shadow .12s, background .2s;
}
.tab small { font-family: var(--f-fat); font-weight: 400; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 10%, transparent); }
.tab:hover { transform: translateY(-2px); }
.tab[aria-pressed="true"] { background: var(--tab-c, var(--yellow)); color: #fff; transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }
.tab[aria-pressed="true"] small { background: rgba(255,255,255,.28); }
.tab[data-cat="all"] { --tab-c: var(--ink); }
.tab[data-cat="game"] { --tab-c: var(--c-game); }
.tab[data-cat="toy"] { --tab-c: var(--c-toy); }
.tab[data-cat="film"] { --tab-c: var(--c-film); }
.search {
  flex: 0 1 260px; display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 42px; border-radius: 12px;
  background: var(--paper); border: 2.5px solid var(--outline); color: var(--ink);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: #9a8796; }
.search:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.filters { max-width: 1212px; margin: 14px auto 0; padding: 0 16px; }
.search-mob { display: none; }
.moods { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 2px 2px 4px; }
.moods::-webkit-scrollbar { display: none; }
.mood {
  flex: none; padding: 3px 11px; border-radius: 999px; cursor: pointer;
  border: 2px dashed color-mix(in oklab, var(--text) 45%, transparent); background: transparent; color: var(--text);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.mood:hover { border-style: solid; }
.mood[aria-pressed="true"] { border-style: solid; border-color: var(--outline); background: var(--yellow); color: var(--ink); }

/* ── 旋轉木馬 ─────────────────────────────── */
main { position: relative; overflow-x: clip; }
.ride { max-width: 1240px; margin: 0 auto; padding: 46px 0 20px; }
.ride-title, .all-head { text-align: center; padding: 0 16px; }
.ride-title h2, .all-head h2, .rules h2 {
  display: inline-block; margin: 0; padding: 4px 18px 6px;
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 900;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--outline); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--outline);
  transform: rotate(-1.5deg);
}
.ride-title p, .all-head p { margin: 12px 0 0; color: var(--text-soft); font-size: 14px; }

.stage {
  --card-w: min(400px, 70vw);
  position: relative; margin: 18px auto 0; height: calc(var(--card-w) * 1.05 + 170px);
  outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab; perspective: 1400px;
}
.stage:focus-visible .canopy { filter: drop-shadow(0 0 0 var(--yellow)) drop-shadow(0 0 10px var(--yellow)); }
.stage.dragging { cursor: grabbing; }
.canopy { position: absolute; left: 50%; top: 0; width: min(1000px, 104vw); height: auto; aspect-ratio: 1000 / 150; transform: translateX(-50%); z-index: 40; overflow: visible; pointer-events: none; }
.canopy .roof { stroke: var(--outline); stroke-width: 3; stroke-linejoin: round; }
.canopy .valance { stroke: var(--outline); stroke-width: 3; }
.canopy .cbulb { fill: var(--bulb); stroke: var(--outline); stroke-width: 1.5; animation: chase 1.2s steps(1) infinite; }
.canopy .cbulb:nth-of-type(3n + 1) { animation-delay: -.4s; }
.canopy .cbulb:nth-of-type(3n + 2) { animation-delay: -.8s; }
.canopy .flag { fill: var(--teal); stroke: var(--outline); stroke-width: 2.5; transform-box: fill-box; transform-origin: 0 50%; animation: flag 2.4s ease-in-out infinite; }
.canopy .pole { stroke: var(--outline); stroke-width: 4; }

.track { position: absolute; left: 0; right: 0; top: 120px; height: 10px; z-index: 2; transform-style: preserve-3d; }
.platform { position: absolute; left: 50%; bottom: 0; width: min(1000px, 100vw); height: 70px; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.platform::before { /* 台面 */
  content: ""; position: absolute; inset: 0 0 18px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, var(--paper) 0 40%, var(--paper-2) 70%);
  border: 3px solid var(--outline);
}
.platform::after { /* 台座側邊條紋 */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 0; height: 34px; z-index: -1;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, var(--yellow) 34px 68px);
  border: 3px solid var(--outline); border-top: 0;
}

.nav {
  position: absolute; top: calc(50% + 20px); z-index: 60; width: 52px; height: 52px; margin-top: -26px;
  border-radius: 50%; border: 3px solid var(--outline); background: var(--paper); color: var(--ink);
  font-size: 34px; line-height: 1; font-weight: 900; cursor: pointer; padding: 0 0 4px;
  box-shadow: 3px 3px 0 var(--outline);
  transition: transform .12s, box-shadow .12s;
}
.nav:hover { transform: scale(1.08); }
.nav:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }
.prev { left: max(12px, calc(50% - 600px)); }
.next { right: max(12px, calc(50% - 600px)); }

/* 旋轉木馬上的卡片：transform 由 JS 每格更新 */
.track .ticket {
  position: absolute; left: 50%; top: 0; width: var(--card-w);
  margin-left: calc(var(--card-w) / -2);
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.track .ticket::before { /* 吊在頂棚上的金色桿子 */
  content: ""; position: absolute; left: 50%; top: calc(var(--pole, 140px) * -1); width: 10px; height: calc(var(--pole, 140px) + 2px); margin-left: -5px; z-index: -1;
  background: repeating-linear-gradient(180deg, #ffe08a 0 10px, #e0a32e 10px 20px);
  border: 2px solid var(--outline); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.track .ticket.is-center .ticket-card { box-shadow: 8px 10px 0 var(--outline), 0 0 0 4px var(--yellow); }
.track .ticket:not(.is-center) .ticket-card { cursor: pointer; }
.track .ticket-card::after { content: ""; position: absolute; inset: -3px; border-radius: var(--radius); background: #140c22; opacity: var(--dim, 0); pointer-events: none; z-index: 5; }
.track img { -webkit-user-drag: none; pointer-events: none; }
.track .ticket-body { min-height: 156px; }
.track .ticket p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 入場券卡片 ─────────────────────────────── */
.ticket { display: block; text-decoration: none; color: var(--ink); }
.ticket-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--outline); border-radius: var(--radius);
  box-shadow: 6px 7px 0 var(--outline);
  transition: transform .2s, box-shadow .2s;
}
.ticket-top { position: relative; aspect-ratio: 16 / 10; background: #2a2035; overflow: hidden; border-bottom: 3px dashed var(--outline); border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0; }
.ticket-top img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ticket-top::after { /* 光澤 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 45%, transparent 55%) -200% 0 / 250% 100% no-repeat;
  transition: background-position .7s ease;
}
.cat-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px 4px; border-radius: 999px;
  background: var(--cc); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .03em;
  border: 2px solid var(--outline); box-shadow: 2px 2px 0 var(--outline);
}
.dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  padding: 2px 9px; border-radius: 8px; background: rgba(20,12,28,.78); color: #fff;
  font-family: var(--f-fat); font-weight: 400; font-size: 12px; letter-spacing: .04em;
}
.visited-stamp {
  position: absolute; right: 12px; top: 10px; z-index: 2;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font-size: 11px; line-height: 1.15; font-weight: 900; color: var(--red);
  border: 3px double var(--red); background: rgba(255,250,240,.9);
  box-shadow: 0 0 0 2px rgba(255,250,240,.55);
  transform: rotate(-14deg);
}
.ticket-body { position: relative; padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ticket-body::before, .ticket-body::after { /* 票根打孔 */
  content: ""; position: absolute; top: -14.5px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--hole, var(--bg)); border: 3px solid var(--outline); z-index: 3;
}
.ticket-body::before { left: -14.5px; clip-path: inset(-1px -1px -1px calc(50% - 2px)); }
.ticket-body::after { right: -14.5px; clip-path: inset(-1px calc(50% - 2px) -1px -1px); }
.ticket-no { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-fat); font-weight: 400; font-size: 12px; letter-spacing: .06em; color: var(--cc); }
.ticket-no span:last-child { color: #9a8796; font-family: var(--f-round); font-weight: 700; letter-spacing: 0; }
.ticket h3 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.3; }
.ticket h3 small { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; vertical-align: 3px; background: color-mix(in oklab, var(--cc) 16%, #fff); color: color-mix(in oklab, var(--cc) 75%, #000); }
.ticket p { margin: 0; font-size: 14px; line-height: 1.5; color: #5d4859; }
.ticket-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.ticket-tags span { font-size: 12px; font-weight: 700; color: #7d6879; }
.ticket-tags .play { color: var(--c-toy); }

.ticket[data-cat="game"] { --cc: var(--c-game); }
.ticket[data-cat="toy"] { --cc: var(--c-toy); }
.ticket[data-cat="film"] { --cc: var(--c-film); }

@media (hover: hover) {
  .grid .ticket:hover .ticket-card { transform: translate(-3px, -4px) rotate(-.6deg); box-shadow: 10px 12px 0 var(--outline); }
  .ticket:hover .ticket-top img, .ticket.is-center:hover .ticket-top img { transform: scale(1.06); }
  .ticket:hover .ticket-top::after { background-position: 150% 0; }
}

.ride-ctrl { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 18px; padding: 0 16px; }
.ride-count { font-family: var(--f-fat); font-size: 18px; color: var(--text-soft); min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.enter {
  display: inline-flex; align-items: center; text-decoration: none;
  padding: 10px 28px 12px; border-radius: 999px; font-size: 19px; font-weight: 900; color: var(--ink);
  background: var(--yellow); border: 3px solid var(--outline); box-shadow: 0 6px 0 var(--outline);
  transition: transform .12s, box-shadow .12s;
}
.enter::after { content: "→"; margin-left: 8px; transition: transform .2s; }
.enter-name { display: inline-block; max-width: 15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.enter:hover::after { transform: translateX(4px); }
.enter:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--outline); }

/* ── 設施一覽 ─────────────────────────────── */
.all { max-width: 1240px; margin: 0 auto; padding: 64px 16px 30px; scroll-margin-top: 110px; }
.group { margin-top: 40px; }
.group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 4px 18px; }
.group-head h3 { margin: 0; font-size: 26px; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; }
.group-head h3::after { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gc); box-shadow: 14px 0 0 var(--gc), 28px 0 0 var(--gc); margin: 0 30px 0 4px; opacity: .8; }
.group-head p { margin: 0; color: var(--text-soft); font-size: 14px; }
.group[data-cat="game"] { --gc: var(--c-game); }
.group[data-cat="toy"] { --gc: var(--c-toy); }
.group[data-cat="film"] { --gc: var(--c-film); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 22px; }
.grid .ticket h3 { font-size: 17px; }
.grid .ticket p { font-size: 13px; }

.empty { text-align: center; padding: 60px 0; font-size: 18px; color: var(--text-soft); }
.empty button { margin-top: 14px; padding: 8px 18px; border-radius: 999px; border: 2.5px solid var(--outline); background: var(--paper); color: var(--ink); font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--outline); }

/* ── 頁尾 ─────────────────────────────── */
.foot { margin-top: 50px; padding: 50px 16px 70px; text-align: center; background: var(--bg-2); border-top: 3px solid var(--outline); position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; background: radial-gradient(circle at 16px 22px, var(--bg-2) 15px, transparent 16px) 0 0 / 32px 22px repeat-x; }
.rules { max-width: 560px; margin: 0 auto; }
.rules ol { text-align: left; margin: 22px auto 0; padding: 18px 22px 18px 44px; background: var(--paper); color: var(--ink); border: 3px solid var(--outline); border-radius: 16px; box-shadow: 5px 5px 0 var(--outline); }
.rules li { margin: 6px 0; font-size: 15px; }
.rules li::marker { font-family: var(--f-fat); color: var(--red); }
.copy { margin: 26px 0 0; font-size: 13px; color: var(--text-soft); }

/* ── 浮動骰子、彩紙 ─────────────────────────────── */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; font-size: 28px; cursor: pointer;
  border: 3px solid var(--outline); background: var(--red); box-shadow: 0 5px 0 var(--outline);
  transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.fab.show { transform: scale(1); }
.fab:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; width: 10px; height: 14px; border-radius: 2px; will-change: transform, opacity; }

.toast {
  position: fixed; left: 50%; top: 50%; z-index: 110; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  padding: 16px 26px; border-radius: 18px; background: var(--paper); color: var(--ink); text-align: center;
  border: 3px solid var(--outline); box-shadow: 6px 6px 0 var(--outline);
  font-size: 20px; font-weight: 900; transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .2s;
  pointer-events: none;
}
.toast small { display: block; font-size: 13px; font-weight: 700; color: #7d6879; }
.toast.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }

/* ── 手機 ─────────────────────────────── */
@media (max-width: 720px) {
  .hero { padding-top: 76px; min-height: auto; padding-bottom: 64px; }
  .wheel { right: -120px; bottom: -40px; width: 250px; opacity: .3; }
  .theme-toggle { top: auto; bottom: 18px; right: 12px; width: 42px; height: 42px; font-size: 19px; }
  .sign-board { box-shadow: 0 0 0 6px var(--yellow), 0 0 0 9px var(--outline), 5px 7px 0 9px color-mix(in oklab, var(--outline) 85%, transparent); }
  .sign-ribbon { font-size: 11px; padding: 4px 14px 6px; }
  .cloud { opacity: .7; }
  .br-sm { display: inline; }
  .stats li { font-size: 13px; padding: 6px 12px; }
  .zones { padding: 8px 12px 6px; }
  .zones-inner { gap: 8px; }
  .tabs { flex-basis: 100%; }
  .tab { padding: 6px 11px; font-size: 14px; }
  .search-desk { display: none; }
  .search-mob { display: flex; height: 40px; margin-bottom: 8px; }
  .filters { padding: 0 12px; margin-top: 12px; }
  .moods { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .enter-name { display: none; }
  .stage { --card-w: min(300px, 74vw); }
  .track .ticket-body { min-height: 140px; }
  .nav { width: 42px; height: 42px; margin-top: -21px; font-size: 28px; }
  .prev { left: 6px; } .next { right: 6px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .grid .ticket-body { padding: 12px 11px 11px; }
  .grid .ticket h3 { font-size: 15px; }
  .grid .ticket h3 small { display: block; margin: 3px 0 0; width: fit-content; }
  .grid .ticket p { font-size: 12px; }
  .grid .ticket-card { box-shadow: 4px 5px 0 var(--outline); border-radius: 14px; }
  .grid .visited-stamp { width: 48px; height: 48px; font-size: 9px; right: 6px; top: 6px; }
  .grid .cat-badge { font-size: 10px; padding: 2px 7px 3px; top: 6px; left: 6px; }
  .ticket-tags span { font-size: 11px; }
}
@media (max-width: 380px) {
  .grid { gap: 14px 10px; }
  .grid .ticket p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ── 404 ─────────────────────────────── */
.lost { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; }
.lost-num { display: flex; gap: 10px; font-family: var(--f-fat); font-size: clamp(64px, 18vw, 140px); line-height: 1; }
.lost-num span { display: grid; place-items: center; width: 1.1em; height: 1.2em; background: var(--paper); color: var(--red); border: .05em solid var(--outline); border-radius: .18em; box-shadow: .06em .07em 0 var(--outline); }
.lost-num span:nth-child(2) { color: var(--purple); transform: rotate(6deg); }
.lost-num span:first-child { transform: rotate(-5deg); }
.lost h1 { margin: 34px 0 6px; font-size: clamp(24px, 5vw, 34px); font-weight: 900; }
.lost p { margin: 0 0 28px; color: var(--text-soft); }
