/* 閉園畫面（assets/js/closed.js） */
body.is-closed .nav, body.is-closed .tabbar, body.is-closed .star-pill, body.is-closed #userArea { display: none; }

.cz { max-width: 1040px; margin: 0 auto; }
.cz-scene { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.cz-scene svg { display: block; width: 100%; height: auto; }

.cz-board { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: -26px; padding: 0 18px; position: relative; }
.cz-main, .cz-side { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow); }
.cz-main h1 { margin: 2px 0 6px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; color: var(--ink); }
.cz-lead { margin: 0 0 12px; color: var(--muted); font-weight: 600; line-height: 1.7; }
.cz-msg { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--gold-50); color: var(--gold-ink); font-weight: 700; }
.cz-msg .i { flex: none; margin-top: 3px; }
.cz-hours { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); }
.cz-hours > .i { width: 24px; height: 24px; flex: none; }
.cz-hours b { display: block; font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.cz-hours span { font-size: .85rem; font-weight: 700; }
.cz-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.cz-count { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.cz-count span { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--muted); }
.cz-count .i { color: var(--gold); }
.cz-count b { font-size: 2.3rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.cz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.cz-list li { display: flex; align-items: center; gap: 8px; }
.cz-tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; flex: none; background: var(--bg-2); color: transparent; animation: cz-tick 12s infinite; animation-delay: calc(var(--i) * 1.6s); }
.cz-tick .i { width: 14px; height: 14px; }

/* 場景文字 */
.cz-key { font: 900 17px var(--mono); fill: #2a3a8f; }
.cz-key.home { fill: #c98a00; }
.cz-arch { font: 900 19px var(--font); fill: #fff; letter-spacing: .08em; }
.cz-signt { font: 900 17px var(--font); fill: #a82b30; letter-spacing: .04em; }
.cz-leg { stroke: #8fa0d8; stroke-width: 9; stroke-linecap: round; fill: none; }
.cz-rim { fill: none; stroke: #ffd84d; stroke-width: 5; }
.cz-rim.thin { stroke: #b6c3f2; stroke-width: 2.5; }
.cz-spoke line { stroke: #b6c3f2; stroke-width: 2.5; }
.cz-jar { fill: rgba(255, 255, 255, .16); stroke: #dfe6fb; stroke-width: 3; }
.cz-bulb { fill: #ffd84d; animation: cz-glow 2.4s ease-in-out infinite; }
.cz-tw { fill: #fff; animation: cz-glow 3s ease-in-out infinite; }

/* 動畫：內層鍵帽反向旋轉，讓車廂永遠朝上 */
.cz-spin { animation: cz-rot 48s linear infinite; }
.cz-unspin { animation: cz-rot 48s linear infinite reverse; }
.cz-hop { animation: cz-hop 1.5s ease-in-out infinite; }
.cz-wrench { animation: cz-turn .75s ease-in-out infinite alternate; }
.cz-note { animation: cz-hop 2.4s ease-in-out infinite; }
.cz-blink { animation: cz-blink 4.2s infinite; transform-box: fill-box; transform-origin: center; }
.cz-sparks { animation: cz-glow .75s ease-in-out infinite alternate; }
.cz-sign { animation: cz-sway 3.6s ease-in-out infinite alternate; transform-origin: 610px 204px; }
.cz-drop { animation: cz-drop 5.5s cubic-bezier(.45, .05, .7, .6) infinite; opacity: 0; }

@keyframes cz-rot { to { transform: rotate(360deg); } }
@keyframes cz-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes cz-turn { from { transform: rotate(-9deg); } to { transform: rotate(11deg); } }
@keyframes cz-glow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes cz-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes cz-sway { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
@keyframes cz-drop { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 42% { transform: translateY(262px) rotate(0deg); opacity: 1; } 46%, 100% { transform: translateY(276px); opacity: 0; } }
@keyframes cz-tick { 0%, 6% { background: var(--bg-2); color: transparent; } 12%, 88% { background: var(--mint); color: #fff; } 96%, 100% { background: var(--bg-2); color: transparent; } }

@media (max-width: 760px) {
  .cz-board { grid-template-columns: minmax(0, 1fr); margin-top: 12px; padding: 0; gap: 12px; }
  .cz-scene { border-radius: 18px; }
  .cz-main, .cz-side { padding: 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cz-scene *, .cz-tick { animation: none !important; }
  .cz-drop { opacity: 0; }
  .cz-tick { background: var(--mint); color: #fff; }
}
