* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: 'Noto Serif SC','Songti SC','SimSun','STSong',serif; }
body { background: #1a1a1a; }

#app { width: 100%; max-width: 430px; height: 100vh; max-height: 932px; margin: 0 auto; position: relative; overflow: hidden; background: #f5f0e8; }

.scene { display: none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.scene.active { display: flex; flex-direction: column; animation: sceneIn 0.5s ease-out; }
@keyframes sceneIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }

/* ===== Color System ===== */
:root { --red: #C41A1A; --gold: #D4A017; --blue: #1A5276; --green: #2E7D32; --purple: #4A235A; --ink: #2C2C2C; --paper: #F5F0E8; --white: #FFF8F0; --dark: #1A1A1A; }

/* ===== Typography ===== */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
p { font-size: 0.95rem; line-height: 1.6; }

/* ===== Buttons ===== */
.btn-primary { padding: 14px 40px; background: linear-gradient(135deg, var(--red), #8B0000); color: #fff; border: 2px solid var(--gold); border-radius: 30px; font-size: 1rem; font-family: inherit; cursor: pointer; box-shadow: 0 4px 15px rgba(196,26,26,0.3); transition: all 0.3s; letter-spacing: 2px; }
.btn-primary:active { transform: scale(0.96); }
.btn-primary:disabled { opacity: 0.4; }
.btn-secondary { padding: 12px 28px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 25px; font-size: 0.9rem; font-family: inherit; cursor: pointer; transition: all 0.3s; }
.btn-secondary:active { background: var(--ink); color: var(--paper); }
.btn-small { padding: 8px 18px; background: var(--paper); color: var(--ink); border: 1px solid #ccc; border-radius: 18px; font-size: 0.8rem; font-family: inherit; cursor: pointer; }
.btn-icon { background: none; border: none; color: var(--ink); cursor: pointer; padding: 8px; }
.btn-back { background: rgba(0,0,0,0.1); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.btn-skip { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 0.8rem; cursor: pointer; text-decoration: underline; margin-top: 10px; }

/* ===== SC-00: Loading Page ===== */
#scene-00 { background: #C41A1A; justify-content: center; align-items: center; }
.loading-bg { position: absolute; width: 100%; height: 100%; background: radial-gradient(ellipse at center, #C41A1A 0%, #8B0000 100%); }
.seal-container { position: relative; z-index: 2; text-align: center; animation: sealAppear 1.5s ease-out; }
@keyframes sealAppear { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.seal { display: inline-block; border: 4px solid var(--gold); padding: 25px 35px; transform: rotate(-3deg); box-shadow: 0 0 30px rgba(212,160,23,0.3); }
.seal-top { display: block; font-size: 2.8rem; color: var(--gold); letter-spacing: 8px; font-family: 'STKaiti','KaiTi',serif; }
.seal-bottom { display: block; font-size: 2.8rem; color: var(--gold); letter-spacing: 8px; font-family: 'STKaiti','KaiTi',serif; }
.seal-subtitle { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin-top: 25px; letter-spacing: 4px; animation: fadeInUp 1s 0.8s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.loading-bar-track { position: absolute; bottom: 80px; width: 200px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
.loading-bar-fill { height: 100%; width: 0%; background: var(--gold); border-radius: 2px; transition: width 0.3s; }
.loading-text { position: absolute; bottom: 50px; color: rgba(255,255,255,0.6); font-size: 0.8rem; letter-spacing: 2px; }

/* ===== SC-01: Home Page ===== */
#scene-01 { background: var(--paper); }
.home-bg { position: absolute; width: 100%; height: 100%; background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc8 100%); }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; position: relative; z-index: 2; }
.score-display { font-size: 1rem; color: var(--gold); font-weight: bold; }
.progress-display { font-size: 0.85rem; color: var(--ink); }
.gate-container { position: relative; height: 160px; display: flex; justify-content: center; align-items: center; overflow: hidden; margin: 10px 0; }
.gate-left, .gate-right { position: absolute; width: 50%; height: 100%; background: #8B4513; transition: transform 1.5s ease; }
.gate-left { left: 0; transform: translateX(0); border-right: 2px solid var(--gold); }
.gate-right { right: 0; transform: translateX(0); border-left: 2px solid var(--gold); }
.gate-container.open .gate-left { transform: translateX(-100%); }
.gate-container.open .gate-right { transform: translateX(100%); }
.gate-content { position: relative; z-index: 1; text-align: center; }
.gate-title { font-size: 2rem; color: var(--ink); letter-spacing: 8px; }
.gate-desc { color: #888; font-size: 0.85rem; margin-top: 8px; }
.door-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 15px 20px; flex: 1; }
.door-card { background: rgba(255,255,255,0.7); border: 2px solid #ddd; border-radius: 16px; padding: 20px 15px; text-align: center; cursor: pointer; transition: all 0.3s; backdrop-filter: blur(5px); }
.door-card:active { transform: scale(0.96); }
.door-card[data-unlocked="false"] { opacity: 0.5; }
.door-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.door-red { background: linear-gradient(135deg, #C41A1A, #E74C3C); }
.door-gold { background: linear-gradient(135deg, #D4A017, #F0C040); }
.door-green { background: linear-gradient(135deg, #2E7D32, #58D68D); }
.door-blue { background: linear-gradient(135deg, #1A5276, #5DADE2); }
.door-label { display: block; font-size: 1rem; margin-bottom: 5px; color: var(--ink); }
.door-status { font-size: 0.75rem; color: var(--gold); }
.door-status.locked { color: #999; }
.bottom-actions { display: flex; justify-content: center; gap: 30px; padding: 15px; }

/* ===== SC-02: Guide ===== */
#scene-02 { background: linear-gradient(180deg, #2C2C2C 0%, #1A1A1A 100%); justify-content: center; align-items: center; }
.guide-character { margin-bottom: 30px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.sage { width: 120px; height: 160px; background: linear-gradient(180deg, #8B7355, #6B5B45); border-radius: 60px 60px 20px 20px; position: relative; }
.sage::after { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 40px; background: #f5f0e8; border-radius: 30px 30px 10px 10px; }
.sage::before { content: '白须老者'; position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); font-size: 0.7rem; white-space: nowrap; }
.guide-bubble { background: rgba(255,255,255,0.95); border-radius: 20px; padding: 20px; margin: 0 30px; position: relative; max-width: 340px; }
.guide-bubble::before { content: ''; position: absolute; top: -10px; left: 40px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid rgba(255,255,255,0.95); }
.guide-text { color: var(--ink); font-size: 0.95rem; line-height: 1.8; }
.guide-btn { margin-top: 30px; }
.btn-skip { background: none; border: none; color: rgba(255,255,255,0.4); font-size: 0.8rem; margin-top: 15px; cursor: pointer; }

/* ===== Level Common ===== */
.level-header { display: flex; align-items: center; padding: 12px 15px; gap: 12px; background: var(--paper); position: relative; z-index: 5; }
.step-progress { display: flex; gap: 6px; flex: 1; overflow-x: auto; padding: 4px 0; }
.step { padding: 4px 12px; border-radius: 12px; background: #eee; font-size: 0.7rem; white-space: nowrap; color: #999; }
.step.active { background: var(--red); color: #fff; }
.step.done { background: var(--green); color: #fff; }
.workshop { flex: 1; padding: 15px 20px; overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.workshop-title { font-size: 1.3rem; color: var(--ink); margin-bottom: 5px; }
.workshop-desc { font-size: 0.85rem; color: #888; margin-bottom: 20px; }

/* ===== SC-03: Shadow Stage ===== */
.shadow-stage { width: 100%; height: 100%; background: #1a1a1a; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
.stage-curtain { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at center, #2a2a2a 0%, #1a1a1a 70%); }
.stage-light { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 250px; height: 300px; background: radial-gradient(ellipse at center, rgba(255,200,100,0.15) 0%, transparent 70%); }
.puppet-silhouette { width: 120px; height: 180px; background: rgba(0,0,0,0.8); clip-path: polygon(50% 0%, 60% 20%, 70% 10%, 80% 25%, 75% 45%, 85% 60%, 70% 70%, 65% 90%, 50% 100%, 35% 90%, 30% 70%, 15% 60%, 25% 45%, 20% 25%, 30% 10%, 40% 20%); position: relative; z-index: 2; animation: puppetDance 2s ease-in-out infinite; }
@keyframes puppetDance { 0%,100% { transform: rotate(0deg) translateY(0); } 25% { transform: rotate(5deg) translateY(-5px); } 75% { transform: rotate(-5deg) translateY(-3px); } }
.stage-text { color: rgba(255,255,255,0.8); font-size: 1rem; letter-spacing: 3px; text-align: center; margin-top: 20px; position: relative; z-index: 2; animation: fadeInUp 1s 0.5s both; }
.stage-text-2 { font-size: 0.9rem; margin-top: 10px; animation-delay: 1s; }

/* ===== SC-04: Select Character ===== */
.character-grid { display: flex; gap: 15px; margin: 20px 0; flex-wrap: wrap; justify-content: center; }
.char-card { width: 120px; padding: 15px; background: #fff; border: 2px solid #eee; border-radius: 16px; text-align: center; cursor: pointer; transition: all 0.3s; }
.char-card.selected { border-color: var(--gold); box-shadow: 0 0 20px rgba(212,160,23,0.2); }
.char-preview { width: 80px; height: 100px; margin: 0 auto 10px; border-radius: 8px; }
.char-warrior { background: linear-gradient(180deg, #C41A1A, #8B0000); clip-path: polygon(50% 0%, 60% 20%, 70% 10%, 80% 25%, 75% 45%, 85% 60%, 70% 70%, 65% 90%, 50% 100%, 35% 90%, 30% 70%, 15% 60%, 25% 45%, 20% 25%, 30% 10%, 40% 20%); }
.char-lady { background: linear-gradient(180deg, #E8A0BF, #C41A1A); clip-path: polygon(50% 0%, 65% 15%, 80% 10%, 85% 30%, 75% 50%, 85% 65%, 70% 75%, 60% 95%, 50% 100%, 40% 95%, 30% 75%, 15% 65%, 25% 50%, 15% 30%, 20% 10%, 35% 15%); }
.char-scholar { background: linear-gradient(180deg, #85C1E9, #1A5276); clip-path: polygon(50% 0%, 55% 20%, 65% 15%, 70% 30%, 65% 50%, 75% 65%, 60% 75%, 55% 90%, 50% 100%, 45% 90%, 40% 75%, 25% 65%, 35% 50%, 30% 30%, 35% 15%, 45% 20%); }
.char-name { font-size: 0.9rem; color: var(--ink); }

/* ===== SC-05: Sketch Canvas ===== */
.canvas-area { width: 300px; height: 400px; background: #fff; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 15px; position: relative; }
.canvas-area canvas { width: 100%; height: 100%; }
.sketch-actions { display: flex; gap: 10px; margin-bottom: 15px; }

/* ===== SC-06: Carving ===== */
.carving-area { width: 300px; height: 400px; background: #2C2C2C; border: 2px solid #555; border-radius: 8px; margin-bottom: 10px; position: relative; cursor: crosshair; }
.carving-area canvas { width: 100%; height: 100%; }
.carve-count { font-size: 0.85rem; color: #888; margin-bottom: 15px; }

/* ===== SC-07: Coloring ===== */
.coloring-area { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.coloring-area canvas { width: 300px; height: 400px; background: #fff; border: 2px solid #ddd; border-radius: 8px; }
.color-palette { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.color-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #ddd; cursor: pointer; transition: all 0.2s; }
.color-swatch:active { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--gold); box-shadow: 0 0 10px rgba(212,160,23,0.4); }
.color-swatch.lg { width: 48px; height: 48px; }

/* ===== SC-08: Assembly ===== */
.assembly-area { width: 300px; height: 420px; background: #f5f0e8; border: 2px dashed #ccc; border-radius: 12px; position: relative; margin-bottom: 15px; }
.part { position: absolute; padding: 8px 16px; background: #C41A1A; color: #fff; border-radius: 8px; cursor: move; font-size: 0.8rem; user-select: none; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.part-head { top: 20px; left: 110px; }
.part-body { top: 100px; left: 110px; }
.part-arm-l { top: 110px; left: 30px; }
.part-arm-r { top: 110px; left: 200px; }
.part-leg-l { top: 200px; left: 80px; }
.part-leg-r { top: 200px; left: 160px; }

/* ===== SC-09: Puppet Result ===== */
.result-stage { width: 100%; height: 100%; background: linear-gradient(180deg, #1a1a1a, #2a2a2a); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.result-title { color: var(--gold); font-size: 1.5rem; margin-bottom: 20px; letter-spacing: 4px; }
.result-puppet { width: 140px; height: 200px; background: linear-gradient(180deg, #C41A1A, #D4A017); clip-path: polygon(50% 0%, 60% 20%, 70% 10%, 80% 25%, 75% 45%, 85% 60%, 70% 70%, 65% 90%, 50% 100%, 35% 90%, 30% 70%, 15% 60%, 25% 45%, 20% 25%, 30% 10%, 40% 20%); margin-bottom: 20px; animation: float 3s ease-in-out infinite; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.result-badge { background: rgba(255,215,0,0.15); border: 1px solid var(--gold); border-radius: 20px; padding: 8px 20px; color: var(--gold); font-size: 0.9rem; }

/* ===== SC-10: Puppet Animation ===== */
.puppet-animated { width: 140px; height: 200px; background: linear-gradient(180deg, #C41A1A, #D4A017); clip-path: polygon(50% 0%, 60% 20%, 70% 10%, 80% 25%, 75% 45%, 85% 60%, 70% 70%, 65% 90%, 50% 100%, 35% 90%, 30% 70%, 15% 60%, 25% 45%, 20% 25%, 30% 10%, 40% 20%); margin-bottom: 20px; position: relative; z-index: 2; }
.animation-controls { display: flex; gap: 10px; margin-bottom: 20px; position: relative; z-index: 2; }

/* ===== Level 2: Lion ===== */
.lion-header-bg { width: 100%; height: 100%; background: linear-gradient(180deg, #D4A017, #8B6914); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.level-title-anim { font-size: 2rem; color: #fff; letter-spacing: 6px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); animation: fadeInUp 1s ease-out; }
.level-subtitle { color: rgba(255,255,255,0.8); font-size: 1rem; margin: 15px 0 30px; letter-spacing: 3px; }

/* Frame Assembly */
.craft-area { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; margin: 20px 0; }
.frame-part { width: 80px; height: 80px; background: #8B4513; color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.85rem; transition: all 0.3s; }
.frame-part.placed { background: var(--green); transform: scale(0.9); }

/* Paper Mache */
.papermache-area { text-align: center; margin: 20px 0; }
.paper-layer { width: 200px; height: 200px; background: #f5f0e8; border-radius: 50%; margin: 0 auto 15px; position: relative; transition: all 0.3s; border: 2px dashed #ccc; }

/* Lion Coloring */
.lion-coloring { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.lion-preview { width: 160px; height: 160px; background: #D4A017; border-radius: 50% 50% 45% 45%; position: relative; transition: background 0.3s; }
.lion-preview::before { content: ''; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); width: 40px; height: 20px; background: inherit; border-radius: 20px 20px 0 0; }
.lion-preview::after { content: '王'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 2rem; color: #fff; font-weight: bold; }
.color-options { display: flex; gap: 12px; }

/* Decoration */
.decorate-area { text-align: center; }
.lion-final { width: 180px; height: 180px; background: #D4A017; border-radius: 50% 50% 45% 45%; margin: 20px auto; position: relative; transition: all 0.3s; }
.lion-final::before { content: '王'; position: absolute; top: 45%; left: 50%; transform: translate(-50%,-50%); font-size: 2.5rem; color: #fff; font-weight: bold; }
.decorations { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== Level 3: Feast ===== */
.feast-bg { width: 100%; height: 100%; background: linear-gradient(180deg, #2E7D32, #1B4D1B); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.feast-tabs { display: flex; gap: 4px; background: #eee; border-radius: 20px; padding: 4px; }
.feast-tab { padding: 6px 16px; border-radius: 16px; font-size: 0.8rem; cursor: pointer; transition: all 0.3s; color: #888; }
.feast-tab.active { background: var(--red); color: #fff; }
.feast-scene { flex: 1; padding: 15px 20px; overflow-y: auto; }
.feast-banner { text-align: center; font-size: 1.3rem; color: var(--red); margin-bottom: 20px; padding: 15px; background: rgba(255,255,255,0.5); border-radius: 12px; }
.quiz-area { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.quiz-question { font-size: 1rem; color: var(--ink); margin-bottom: 20px; line-height: 1.6; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option { padding: 14px 18px; background: var(--paper); border: 1.5px solid #ddd; border-radius: 12px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s; }
.quiz-option:active { transform: scale(0.98); }
.quiz-option.correct { background: #d4edda; border-color: var(--green); color: var(--green); }
.quiz-option.wrong { background: #f8d7da; border-color: var(--red); color: var(--red); }
.quiz-feedback { margin-top: 15px; padding: 12px; border-radius: 10px; font-size: 0.9rem; display: none; }
.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: #d4edda; color: var(--green); }
.quiz-feedback.wrong { background: #f8d7da; color: var(--red); }
.quiz-knowledge { margin-top: 10px; padding: 12px; background: #fff8e1; border-radius: 10px; font-size: 0.85rem; color: #856404; display: none; }
.quiz-knowledge.show { display: block; }
.quiz-progress { text-align: center; color: #888; font-size: 0.85rem; margin-top: 15px; }

/* Feast Result */
.feast-result { width: 100%; height: 100%; background: linear-gradient(180deg, #f5f0e8, #e8dcc8); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; }
.feast-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.feast-badge { padding: 12px 20px; background: #fff; border-radius: 12px; text-align: center; font-size: 0.9rem; border: 1px solid #ddd; }
.feast-badge.unlocked { border-color: var(--gold); background: #fff8e1; }
.feast-score { font-size: 1.1rem; color: var(--ink); margin-bottom: 20px; }

/* ===== Level 4: Hanfu ===== */
.hanfu-bg { width: 100%; height: 100%; background: linear-gradient(180deg, #1A5276, #0E2F4F); display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
.scroll-decoration { position: absolute; width: 80%; height: 60%; border: 2px solid rgba(255,255,255,0.1); border-radius: 4px; }
.hanfu-test { flex: 1; padding: 15px 20px; display: flex; flex-direction: column; align-items: center; }
.hanfu-progress { font-size: 0.9rem; color: var(--ink); }
.scroll-bg { width: 100%; max-width: 380px; height: 100%; background: linear-gradient(90deg, #e8dcc8, #f5f0e8, #e8dcc8); border-radius: 8px; padding: 20px; position: relative; }
.hanfu-question { font-size: 1.05rem; color: var(--ink); text-align: center; margin-bottom: 25px; line-height: 1.6; }
.hanfu-options { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.hanfu-option { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #fff; border: 1.5px solid #ddd; border-radius: 12px; cursor: pointer; transition: all 0.3s; }
.hanfu-option:active { transform: scale(0.98); }
.hanfu-option.selected { border-color: var(--blue); background: #eaf2f8; }
.hanfu-swatch { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }

/* Hanfu Result */
.hanfu-result { width: 100%; height: 100%; background: linear-gradient(180deg, #f5f0e8, #e8dcc8); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.hanfu-poster { width: 280px; background: linear-gradient(180deg, #fff8f0, #f5e6d3); border: 3px solid var(--gold); border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 20px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.poster-scroll-top, .poster-scroll-bottom { height: 8px; background: var(--gold); border-radius: 4px; margin: 10px 0; width: 60%; margin-left: auto; margin-right: auto; }
.poster-title { font-size: 1.5rem; color: var(--red); letter-spacing: 4px; margin: 10px 0; }
.poster-persona { font-size: 1rem; color: var(--gold); margin-bottom: 15px; }
.poster-figure { width: 80px; height: 120px; margin: 15px auto; background: linear-gradient(180deg, #C41A1A, #D4A017); border-radius: 40px 40px 10px 10px; }
.poster-desc { font-size: 0.85rem; color: #888; margin: 10px 0; line-height: 1.6; }

/* ===== SC-27: Ending ===== */
#scene-27 { background: linear-gradient(180deg, #C41A1A, #8B0000); justify-content: center; align-items: center; }
.ending-bg { position: absolute; width: 100%; height: 100%; background: radial-gradient(ellipse at center, rgba(212,160,23,0.1) 0%, transparent 70%); }
.ending-content { position: relative; z-index: 2; text-align: center; padding: 20px; }
.ending-seal { display: inline-block; border: 3px solid var(--gold); padding: 15px 30px; margin-bottom: 25px; color: var(--gold); font-size: 1.5rem; letter-spacing: 6px; transform: rotate(-2deg); }
.ending-title { color: #fff; font-size: 1.4rem; margin-bottom: 25px; letter-spacing: 3px; }
.ending-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.end-badge { padding: 10px 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; color: #fff; font-size: 0.9rem; }
.end-badge.unlocked { background: rgba(255,215,0,0.2); border-color: var(--gold); color: var(--gold); }
.ending-score { color: #fff; font-size: 1.2rem; margin-bottom: 25px; }
.ending-actions { display: flex; gap: 15px; justify-content: center; margin-bottom: 20px; }
.ending-slogan { color: rgba(255,255,255,0.5); font-size: 0.85rem; letter-spacing: 4px; }

/* ===== Collection Panel ===== */
#scene-collection { background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.collection-panel { width: 90%; max-height: 80vh; background: var(--paper); border-radius: 20px; padding: 20px; overflow-y: auto; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.collection-grid { display: grid; gap: 12px; }
.collection-card { display: flex; align-items: center; gap: 15px; padding: 15px; background: #fff; border-radius: 14px; border: 1px solid #eee; }
.collection-card.unlocked { border-color: var(--gold); background: #fff8e1; }
.coll-icon { font-size: 2rem; }
.coll-status { font-size: 0.8rem; color: #999; }
.collection-card.unlocked .coll-status { color: var(--gold); }

/* ===== Achievement Panel ===== */
#scene-achievements { background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.achievement-panel { width: 90%; max-height: 80vh; background: var(--paper); border-radius: 20px; padding: 20px; overflow-y: auto; }
.achievement-grid { display: grid; gap: 12px; }
.ach-card { padding: 15px; background: #fff; border-radius: 14px; border: 1px solid #eee; text-align: center; }
.ach-card.unlocked { border-color: var(--gold); background: #fff8e1; }
.ach-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.ach-card h4 { font-size: 1rem; margin-bottom: 5px; }
.ach-card p { font-size: 0.8rem; color: #888; }

/* ===== Ginkgo Leaf Particles ===== */
.ginkgo { position: absolute; width: 16px; height: 16px; background: #D4A017; clip-path: polygon(50% 0%, 80% 30%, 100% 50%, 80% 80%, 50% 100%, 20% 80%, 0% 50%, 20% 30%); opacity: 0.6; pointer-events: none; animation: ginkgoFall linear infinite; }
@keyframes ginkgoFall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 0; } 10% { opacity: 0.6; } 90% { opacity: 0.6; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* ===== Responsive ===== */
@media (max-width: 430px) {
  .door-grid { gap: 10px; padding: 10px 12px; }
  .door-card { padding: 15px 10px; }
  .door-icon { width: 50px; height: 50px; }
  .workshop { padding: 10px 12px; }
  .char-card { width: 100px; padding: 10px; }
  .char-preview { width: 60px; height: 80px; }
}

@media (max-height: 700px) {
  .gate-container { height: 100px; }
  .door-icon { width: 44px; height: 44px; }
  .top-bar { padding: 8px 15px; }
  .seal { padding: 15px 25px; }
  .seal-top, .seal-bottom { font-size: 2rem; }
}
