:root {
  --bg: #f7f0e4;
  --paper: rgba(252, 247, 238, 0.94);
  --ink: #3f3a36;
  --muted: #7a6f67;
  --accent: #d46b42;
  --accent-2: #6e9aa4;
  --gold: #b98b3a;
  --line: rgba(80,60,35,.12);
  --shadow: 0 12px 36px rgba(60,40,10,.14);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: linear-gradient(180deg,#f8f3ea,#eee5d7); color:var(--ink); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
body { min-height:100vh; }
button { font: inherit; }
.app-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; display:flex; flex-direction:column; background: linear-gradient(180deg,#faf5ee 0%, #f3ebdf 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.10); }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 14px 10px; position:sticky; top:0; z-index:20; backdrop-filter: blur(10px); background: rgba(250,245,238,.84); border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:10px; cursor:pointer; min-width:0; }
.brand b, .brand small { display:block; }
.brand b { font-size:17px; }
.brand small { color: var(--muted); font-size:12px; margin-top:2px; }
.brand-seal { width:38px; height:38px; border-radius: 14px; display:grid; place-items:center; background: linear-gradient(145deg,#c45436,#e08b58); color:#fff; font-weight:700; box-shadow: var(--shadow); }
.hud { display:flex; align-items:center; gap:10px; }
.icon-btn { width:38px; height:38px; border:none; border-radius:14px; background:#fff; box-shadow: var(--shadow); }
.jade-pill { display:flex; align-items:center; gap:6px; padding:8px 10px; border-radius:14px; background:#fff; box-shadow: var(--shadow); }
.jade-pill span { color: var(--gold); }
.jade-pill small { color: var(--muted); }
.screen { flex:1; padding: 14px 14px 96px; }
.bottom-nav { position: sticky; bottom:0; display:flex; background: rgba(252,247,238,.94); border-top:1px solid var(--line); backdrop-filter: blur(10px); z-index:30; }
.bottom-nav button { flex:1; border:none; background:transparent; padding:10px 0 calc(10px + env(safe-area-inset-bottom)); color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:2px; }
.bottom-nav button span { font-size:18px; }
.bottom-nav button.active { color: var(--accent); font-weight:700; }
.card { background: var(--paper); border:1px solid rgba(115,85,50,.08); border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden; }
.splash { display:flex; flex-direction:column; gap:16px; }
.hero { min-height: 280px; padding: 18px; display:flex; align-items:flex-end; background-size:cover; background-position:center; position:relative; color:#fff; border-radius: 28px; overflow:hidden; }
.hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.62)); }
.hero-content { position:relative; z-index:1; }
.hero h1, .hero h2, .hero p { margin:0; }
.hero h1 { font-size: 32px; margin-bottom: 10px; }
.hero p { max-width: 90%; line-height:1.65; font-size:14px; color: rgba(255,255,255,.92); }
.pill-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.pill { padding:6px 10px; border-radius:999px; background: rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.20); font-size:12px; }
.cta { border:none; background: linear-gradient(145deg,#d56c44,#c45637); color:#fff; padding: 14px 16px; border-radius: 16px; font-weight:700; box-shadow: var(--shadow); }
.cta.secondary { background:#fff; color:var(--accent); }
.ghost { border:1px solid var(--line); background: rgba(255,255,255,.74); color:var(--ink); padding: 12px 14px; border-radius: 14px; }
.section-title { display:flex; align-items:center; justify-content:space-between; margin: 18px 2px 10px; }
.section-title h3 { margin:0; font-size:17px; }
.section-title small { color: var(--muted); }
.map-list { display:flex; flex-direction:column; gap:12px; }
.stage-card { display:grid; grid-template-columns: 76px 1fr auto; gap:12px; padding:10px; align-items:center; }
.stage-thumb { width:76px; height:76px; border-radius:18px; background-size:cover; background-position:center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.stage-card h4 { margin:0 0 4px; font-size:16px; }
.stage-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.stage-meta { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.tag { padding:4px 8px; background: rgba(110,154,164,.12); color:#547981; border-radius:999px; font-size:11px; }
.stage-num { width:40px; height:40px; display:grid; place-items:center; border-radius:14px; background: linear-gradient(145deg,#f4e2be,#fff3d8); color:#8b6a2e; font-weight:700; }
.stage-num.done { background: linear-gradient(145deg,#d56c44,#e68d62); color:#fff; }
.stage-num.lock { background: #ece5d9; color:#a79b8e; }
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; }
.mini-btn { border:none; background: #fff; color: var(--accent); padding:10px 12px; border-radius:14px; box-shadow: var(--shadow); }
.stage-view { display:flex; flex-direction:column; gap:14px; }
.stage-scene { min-height: 320px; position:relative; background-size:cover; background-position:center; border-radius:28px; overflow:hidden; display:flex; align-items:flex-end; }
.stage-scene::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.68)); }
.scene-overlay { position:relative; z-index:1; width:100%; padding:18px; color:#fff; }
.scene-title { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; }
.scene-title h2 { margin:0; font-size:28px; }
.scene-title small { display:block; margin-top:4px; opacity:.9; }
.scene-portrait { position:absolute; right:10px; top:26px; width:120px; z-index:1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.28)); }
.dialog-panel { padding:14px; display:flex; flex-direction:column; gap:10px; }
.bubble { padding:12px 14px; border-radius:18px; background: rgba(255,255,255,.86); border:1px solid var(--line); }
.bubble strong { display:block; font-size:13px; margin-bottom:4px; color: var(--accent); }
.info-block { padding:14px; display:flex; flex-direction:column; gap:8px; }
.info-block h4 { margin:0; font-size:15px; }
.info-block p { margin:0; color:var(--ink); line-height:1.7; font-size:14px; }
.info-block p.muted { color:var(--muted); font-size:13px; }
.minigame-shell { padding:14px; display:flex; flex-direction:column; gap:12px; }
.minigame-head h4 { margin:0 0 6px; }
.minigame-head p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.status-row { display:flex; gap:10px; flex-wrap:wrap; }
.status-chip { padding:7px 10px; border-radius:999px; background:#fff; border:1px solid var(--line); font-size:12px; }
.game-bar { height:20px; border-radius:999px; background:#e7ded1; overflow:hidden; position:relative; }
.game-bar .target-zone { position:absolute; top:0; bottom:0; left:42%; width:18%; background:#9ec9a8; }
.game-bar .marker { position:absolute; top:-4px; width:18px; height:28px; background: var(--accent); border-radius:12px; box-shadow: 0 6px 10px rgba(0,0,0,.18); }
.tap-button { padding:16px; border:none; border-radius:18px; background: linear-gradient(145deg,#6e9aa4,#507780); color:#fff; font-weight:700; }
.progress-rail { height:16px; border-radius:999px; background:#e8dfd5; overflow:hidden; }
.progress-fill { height:100%; background: linear-gradient(145deg,#db834f,#cb6038); width:0; transition: width .08s; }
.grid-board, .memory-board, .sequence-buttons, .quiz-options { display:grid; gap:10px; }
.grid-board { grid-template-columns: repeat(3, 1fr); }
.memory-board { grid-template-columns: repeat(4, 1fr); }
.sequence-buttons { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.quiz-options { grid-template-columns: 1fr; }
.tile, .memory-card, .seq-btn, .quiz-btn { min-height:60px; border:none; border-radius:16px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); padding:10px; font-weight:700; color:var(--ink); }
.tile.selected, .quiz-btn.correct, .seq-btn.active { background: linear-gradient(145deg,#f7ddbb,#ffe9c9); color:#8b6228; }
.tile.wrong, .quiz-btn.wrong { background: #f4d9d2; color:#a64a34; }
.memory-card { display:grid; place-items:center; font-size:24px; }
.memory-card.flipped { background: linear-gradient(145deg,#f7ddbb,#ffe9c9); }
.result-box { padding:16px; border-radius:20px; background: linear-gradient(180deg,rgba(255,250,240,.96), rgba(251,243,231,.96)); border:1px solid rgba(188,139,58,.18); }
.result-box h4 { margin:0 0 8px; }
.result-box p { margin:0 0 8px; line-height:1.6; }
.passport-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; }
.stamp-card { padding:14px; min-height:118px; display:flex; flex-direction:column; gap:8px; justify-content:space-between; }
.stamp-seal { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:#efe5d4; color:#a08a63; font-weight:700; }
.stamp-seal.done { background: radial-gradient(circle at 30% 30%,#f4c899,#d0623b); color:#fff; }
.story-list { display:flex; flex-direction:column; gap:12px; }
.story-item { padding:14px; }
.story-item h4 { margin:0 0 8px; }
.story-item p { margin:0; color:var(--muted); font-size:13px; line-height:1.7; }
.ending { display:flex; flex-direction:column; gap:14px; }
.certificate { padding:18px; background: linear-gradient(180deg,#fff8eb,#f8ecda); border:2px solid rgba(185,139,58,.35); border-radius:28px; text-align:center; }
.certificate h2, .certificate h3, .certificate p { margin:0; }
.certificate h2 { font-size:30px; color:#8a6327; margin-bottom:12px; }
.certificate h3 { margin-bottom:10px; }
.certificate p { line-height:1.8; }
.toast { position: fixed; left:50%; transform:translateX(-50%) translateY(120px); bottom: 90px; padding:10px 14px; background:rgba(52,42,34,.92); color:#fff; border-radius:999px; transition:.2s; pointer-events:none; z-index:90; }
.toast.show { transform:translateX(-50%) translateY(0); }
.empty { padding:20px; color:var(--muted); text-align:center; }
.small { font-size:12px; color:var(--muted); }
@media (max-width: 380px){
  .screen { padding-inline:10px; }
  .scene-portrait { width:104px; }
}
.puzzle3-board{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:330px;margin:0 auto}.puzzle3-tile{aspect-ratio:1;border:none;border-radius:18px;background:linear-gradient(145deg,#c58a52,#e4b77f);color:#fff;font-size:26px;font-weight:800;box-shadow:var(--shadow)}.puzzle3-tile.blank{background:rgba(255,255,255,.35);box-shadow:inset 0 0 0 2px rgba(110,80,50,.08)}
.match3-board{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.match-tile{aspect-ratio:1;border:none;border-radius:12px;background:#fff5e7;color:#835d36;font-weight:800;box-shadow:0 4px 12px rgba(80,60,30,.10)}.match-tile.selected{outline:3px solid var(--accent);transform:scale(.96)}
.merge-board{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:#d9c9b5;padding:8px;border-radius:18px}.merge-tile{aspect-ratio:1;border-radius:12px;display:grid;place-items:center;background:#eee5d8;color:#6f5b46;font-weight:800;font-size:22px}.merge-tile.v2{background:#f8efe3}.merge-tile.v4{background:#f1dfc4}.merge-tile.v8{background:#e9c692}.merge-tile.v16{background:#dfaa6a;color:#fff}.merge-tile.v32{background:#cf8454;color:#fff}.merge-tile.v64{background:#b95f45;color:#fff}
.dpad{display:grid;grid-template-columns:repeat(3,70px);gap:8px;justify-content:center;margin-top:12px}.dpad button{height:52px;border:none;border-radius:14px;background:#fff;box-shadow:var(--shadow);font-size:22px;color:var(--ink)}
.slicer-field{position:relative;height:300px;border-radius:20px;background:linear-gradient(180deg,#f9efe2,#f4e3d0);overflow:hidden;border:1px solid var(--line)}.slice-item{position:absolute;width:58px;height:58px;border:none;border-radius:50%;background:#fff;color:#7b552f;font-size:20px;font-weight:800;box-shadow:var(--shadow);animation:popIn .16s ease}.slice-item.bad{background:#5a514a;color:#fff}@keyframes popIn{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
.catch-field{position:relative;height:250px;border-radius:20px;background:linear-gradient(180deg,#dcebf1,#f8f3e8);overflow:hidden;border:1px solid var(--line)}.catch-lanes{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr)}.catch-lanes>div{border-right:1px dashed rgba(70,90,100,.16)}.catch-lanes>div:last-child{border-right:none}.catcher{position:absolute;bottom:12px;width:48px;height:48px;border-radius:14px;background:#f2d3a7;display:grid;place-items:center;font-weight:800;color:#805a2c;transition:left .15s}.drop-item{position:absolute;top:22px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:800;animation:dropFall .56s linear forwards}.drop-item.good{background:#f0c957;color:#7c5a0f}.drop-item.bad{background:#7a6f67;color:#fff}@keyframes dropFall{from{transform:translateY(0)}to{transform:translateY(170px)}}
.maze-board{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;max-width:330px;margin:0 auto}.maze-cell{aspect-ratio:1;border-radius:10px;background:#f5e8d2;display:grid;place-items:center;font-weight:800;color:#8a6331}.maze-cell.wall{background:#6e6258;color:#fff}.maze-cell.player{background:#d66f48;color:#fff;box-shadow:0 0 0 3px rgba(214,111,72,.18)}
.breakout-canvas{display:block;width:100%;max-width:360px;aspect-ratio:8/9;margin:0 auto;border-radius:20px;border:1px solid var(--line);touch-action:none;background:#f6efe4}

/* === MAP_VN_ENHANCEMENTS === */
.hidden{display:none !important;}
.hero-home{position:relative;overflow:hidden;min-height:340px;}
.hero-character{position:absolute;right:6px;bottom:-8px;width:146px;z-index:1;filter:drop-shadow(0 12px 24px rgba(0,0,0,.22));}
.hero-home .hero-content{max-width:70%;}
.compact-block{padding:10px 14px;}
.handdrawn-map{position:relative;overflow:hidden;padding:0;}
.map-base{display:block;width:100%;height:auto;}
.map-pins{position:absolute;inset:0;}
.map-pin{position:absolute;transform:translate(-50%,-50%);border:none;background:transparent;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;}
.pin-badge{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#fff8ef,#f3ddbc);box-shadow:0 6px 14px rgba(92,65,33,.18);border:1px solid rgba(155,118,67,.25);color:#845c28;font-weight:700;font-size:14px;}
.pin-label{font-size:11px;line-height:1;padding:5px 8px;border-radius:999px;background:rgba(255,251,244,.95);box-shadow:0 6px 12px rgba(60,40,10,.12);white-space:nowrap;color:#55463a;font-weight:700;}
.map-pin.done .pin-badge{background:linear-gradient(145deg,#d66f46,#e79b64);color:#fff;box-shadow:0 0 0 4px rgba(228,150,106,.22),0 8px 18px rgba(150,70,20,.18);}
.map-pin.locked{opacity:.62;filter:grayscale(.3);}
.vn-card{overflow:hidden;padding:0;}
.vn-stage-name{padding:12px 14px;border-bottom:1px solid var(--line);font-weight:700;color:#815a2b;background:linear-gradient(180deg,#fff8eb,#f7eee2);}
.vn-scene-wrap{position:relative;height:290px;background:#e8dece;}
.vn-scene-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.vn-scene-mask{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.28));}
.vn-char{position:absolute;bottom:0;width:42%;max-width:170px;z-index:1;filter:drop-shadow(0 12px 18px rgba(0,0,0,.28));transition:.2s ease;}
.vn-char-left{left:2px;}
.vn-char-right{right:2px;}
.vn-char.inactive{opacity:.48;transform:scale(.98);}
.vn-char.active{opacity:1;transform:scale(1.02);}
.vn-bubble-wrap{padding:12px;display:flex;flex-direction:column;gap:10px;background:linear-gradient(180deg,#fffdf9,#f8efe2);}
.vn-bubble{padding:14px;border-radius:18px;background:rgba(255,255,255,.92);border:1px solid rgba(123,98,64,.12);min-height:126px;box-shadow:var(--shadow);}
.vn-speaker{font-weight:700;color:#d46b42;margin-bottom:8px;}
.vn-text{line-height:1.78;min-height:68px;font-size:14px;}
.vn-controls{display:flex;justify-content:space-between;gap:8px;}
.small-btn{padding:10px 14px;border-radius:14px;}
.tile-visual,.memory-card{padding:6px;}
.item-visual{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;}
.item-visual img{width:42px;height:42px;object-fit:contain;display:block;}
.item-visual span{font-size:11px;line-height:1.2;color:var(--ink);font-weight:700;}
.memory-card .memory-q{font-size:22px;font-weight:700;color:#7a6f67;}
.match3-cell .item-visual img{width:28px;height:28px;}
.ending-vn .vn-scene-wrap{height:270px;}
@media (max-width:390px){
  .hero-character{width:130px;}
  .hero-home .hero-content{max-width:68%;}
  .pin-label{font-size:10px;padding:4px 7px;}
  .vn-char{width:44%;max-width:155px;}
}

/* === FINAL_VISUAL_NOVEL_GAME_POLISH === */
.vn-bubble-row{display:flex;align-items:flex-end;gap:10px;}
.vn-avatar{width:58px;height:58px;border-radius:18px;object-fit:cover;object-position:top center;background:#f3eadc;border:2px solid rgba(212,107,66,.22);box-shadow:0 8px 18px rgba(65,43,20,.14);flex:0 0 auto;}
.vn-bubble-row .vn-bubble{flex:1;}
.vn-speaker-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.vn-speaker-line .vn-speaker{margin:0;}
.vn-progress{font-size:11px;color:var(--muted);padding:4px 7px;border-radius:999px;background:#f7efe4;}
.challenge-ready{display:grid;grid-template-columns:54px 1fr;gap:12px;align-items:center;}
.challenge-ready>img{width:54px;height:54px;object-fit:contain;filter:drop-shadow(0 5px 8px rgba(80,110,80,.18));}
.challenge-ready>.cta{grid-column:1/-1;width:100%;}
.challenge-ready h4,.challenge-ready p{margin:0;}
.challenge-ready p{margin-top:5px;}
.challenge-banner{min-height:180px;border-radius:22px;overflow:hidden;position:relative;background-size:cover;background-position:center;margin-bottom:14px;}
.challenge-banner-mask{position:absolute;inset:0;background:linear-gradient(90deg,rgba(38,31,25,.78),rgba(38,31,25,.28));}
.challenge-banner-content{position:relative;z-index:1;color:#fff;min-height:180px;padding:18px;display:flex;align-items:flex-end;gap:12px;}
.challenge-banner-content>img{width:58px;height:58px;object-fit:contain;background:rgba(255,255,255,.88);border-radius:17px;padding:5px;}
.challenge-banner-content h3,.challenge-banner-content p{margin:0;}
.challenge-banner-content h3{font-size:22px;margin:3px 0 5px;}
.challenge-banner-content p{font-size:12px;line-height:1.55;color:rgba(255,255,255,.9);}
.challenge-banner-content small{opacity:.82;}
.mini-body{padding-top:2px;}
.seq-btn .item-visual img{width:36px;height:36px;}
.seq-btn .item-visual span{font-size:12px;}
.map-pin{z-index:2;transition:transform .16s ease,filter .16s ease;}
.map-pin:not(.locked):active{transform:translate(-50%,-50%) scale(.94);}
.map-pin.done{z-index:3;}
.map-pin.locked .pin-label{background:rgba(232,226,216,.92);}
.handdrawn-map{border:1px solid rgba(133,105,70,.18);box-shadow:0 18px 38px rgba(84,57,27,.15);}
.vn-text{cursor:pointer;user-select:none;}
@media (max-width:390px){
  .vn-avatar{width:52px;height:52px;border-radius:16px;}
  .challenge-banner{min-height:160px;}
  .challenge-banner-content{min-height:160px;padding:14px;}
}
.match-tile{padding:3px;overflow:hidden;}.match-tile .item-visual{gap:0;}.match-tile .item-visual img{width:34px;height:34px;}.match-tile .item-visual span{font-size:9px;}
.slice-item{padding:3px;overflow:hidden;background:#fff7ed;}.slice-item .item-visual{gap:0;}.slice-item .item-visual img{width:40px;height:40px;}.slice-item .item-visual span{font-size:9px;}.slice-item.bad{background:#e9e4df;}
.catcher{background:rgba(255,255,255,.82);padding:4px;}.catcher-icon{width:42px;height:42px;object-fit:contain;}.drop-item{background:transparent !important;}.drop-icon{width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 5px 6px rgba(0,0,0,.15));}
.maze-cell{padding:4px;overflow:hidden;}.maze-icon{width:34px;height:34px;object-fit:contain;}.maze-cell.wall{background:#dfd2c1;}

/* === V4 FLOW / LEADERBOARD / GAME ART === */
.bottom-nav button{min-width:0;font-size:13px;}
.bottom-nav button.nav-locked{opacity:.42;}
.bottom-nav button:disabled{cursor:not-allowed;}
.stage-exit-row{justify-content:center;opacity:.9;}
.replay-head{position:relative;min-height:180px;background-size:cover;background-position:center;overflow:hidden;padding:0;}
.replay-head-mask{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.64));}
.replay-head-content{position:absolute;left:18px;right:18px;bottom:16px;color:#fff;z-index:1;}
.replay-head-content h2,.replay-head-content p{margin:3px 0;}
.travel-screen{display:flex;flex-direction:column;gap:12px;}
.travel-card{position:relative;height:540px;overflow:hidden;background:linear-gradient(180deg,#bfe1ef 0%,#e7f2e4 44%,#e8d0a6 45%,#d5b17a 100%);}
.travel-sky{position:absolute;inset:0 0 55% 0;background:radial-gradient(circle at 22% 24%,rgba(255,255,255,.9) 0 7%,transparent 8%),radial-gradient(circle at 66% 19%,rgba(255,255,255,.75) 0 9%,transparent 10%);}
.travel-buildings{position:absolute;left:0;right:0;bottom:130px;height:180px;background:linear-gradient(135deg,transparent 0 8%,#f7ead3 9% 18%,transparent 19% 25%,#e8d7bb 26% 38%,transparent 39% 48%,#f7ead3 49% 63%,transparent 64% 74%,#e1cdb0 75% 91%,transparent 92%);opacity:.92;}
.travel-road{position:absolute;left:-12%;right:-12%;bottom:-30px;height:210px;background:repeating-linear-gradient(100deg,#d7bd92 0 44px,#cbaa79 45px 47px);transform:skewY(-3deg);box-shadow:inset 0 10px 0 rgba(255,255,255,.28);}
.travel-alai{position:absolute;width:142px;bottom:70px;left:-145px;z-index:2;filter:drop-shadow(0 14px 18px rgba(0,0,0,.18));animation:travelRun 2.05s cubic-bezier(.35,.05,.62,.95) forwards,travelBob .24s ease-in-out infinite alternate;}
.travel-copy{position:absolute;left:18px;right:18px;top:24px;z-index:3;background:rgba(255,252,245,.88);backdrop-filter:blur(8px);padding:15px;border-radius:18px;box-shadow:var(--shadow);}
.travel-copy h2,.travel-copy p{margin:4px 0;}
.travel-copy small{color:var(--accent);font-weight:700;}
@keyframes travelRun{0%{left:-145px}100%{left:105%}}
@keyframes travelBob{from{transform:translateY(0) rotate(-1deg)}to{transform:translateY(-10px) rotate(2deg)}}
.mini-art-panel{display:flex;align-items:center;justify-content:center;padding:8px 0 12px;}
.mini-art-panel img{width:118px;height:118px;object-fit:contain;filter:drop-shadow(0 10px 14px rgba(50,30,10,.14));}
.compact-art img{width:88px;height:88px;}
.pulse-art img{animation:miniPulse 1.1s ease-in-out infinite alternate;}
@keyframes miniPulse{from{transform:scale(.96)}to{transform:scale(1.04)}}
.deluxe-bar{height:28px;border:3px solid rgba(91,69,40,.12);box-shadow:inset 0 2px 6px rgba(0,0,0,.08);}
.illustrated-puzzle .puzzle3-tile{padding:2px;background:#ead2a4;overflow:hidden;}
.illustrated-puzzle .puzzle3-tile img{width:100%;height:100%;object-fit:cover;border-radius:12px;display:block;}
.illustrated-puzzle .puzzle3-tile.blank{background:rgba(120,93,60,.12);box-shadow:inset 0 0 0 2px rgba(120,93,60,.08);}
.sequence-preview{padding:12px;}
.sequence-preview-icons{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;min-height:72px;}
.sequence-preview-icons .item-visual{width:62px;}
.visual-seq-btn{min-height:82px;}
.visual-seq-btn .item-visual img{width:46px;height:46px;}
.seq-hidden{font-size:28px;letter-spacing:8px;color:var(--muted);}
.illustrated-merge .merge-tile{padding:3px;overflow:hidden;display:grid;place-items:center;}
.illustrated-merge .merge-tile img{width:100%;height:100%;object-fit:cover;border-radius:10px;}
.image-dpad button{padding:4px;overflow:hidden;}
.image-dpad button img{width:46px;height:46px;display:block;margin:auto;}
.stage-result{text-align:center;}
.result-art{width:110px;height:110px;object-fit:contain;filter:drop-shadow(0 10px 16px rgba(0,0,0,.12));}
.score-save-panel{padding:16px;display:flex;flex-direction:column;gap:10px;}
.score-save-panel h4,.score-save-panel p{margin:0;}
.score-save-panel label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:var(--muted);}
.score-save-panel input{width:100%;border:1px solid rgba(120,90,60,.18);background:#fff;border-radius:14px;padding:12px 13px;font:inherit;color:var(--ink);outline:none;}
.score-save-panel input:focus{border-color:rgba(212,107,66,.55);box-shadow:0 0 0 3px rgba(212,107,66,.10);}
.form-error{color:#a84937!important;}.form-success{color:#47775d!important;font-weight:700;}
.leaderboard-card{padding:12px;}
.rank-table{display:flex;flex-direction:column;gap:6px;}
.rank-row{display:grid;grid-template-columns:50px 1fr 76px 78px;gap:6px;align-items:center;padding:10px 8px;border-radius:12px;background:rgba(255,255,255,.74);font-size:12px;}
.rank-row.rank-head{background:#efe5d7;color:var(--muted);font-weight:700;}
.rank-row b{color:var(--accent);}.rank-row strong{text-align:right;}.rank-row small{text-align:right;color:var(--muted);}
.leaderboard-pages{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:12px;}
.leaderboard-pages button{padding:8px 12px;}
.handdrawn-map{background:#fbf6e9;}
.map-base{filter:saturate(.90) contrast(.98);}
.map-pin .pin-badge{width:34px;height:34px;background:#fff7e6;border:2px solid #b9854f;}
.map-pin .pin-label{font-size:11px;background:rgba(255,253,247,.98);border:1px solid rgba(143,104,60,.14);}
@media(max-width:390px){.rank-row{grid-template-columns:44px 1fr 66px 68px;font-size:11px}.travel-card{height:500px}.travel-alai{width:128px}.bottom-nav button small{font-size:10px}}
.form-warn{color:#8a6a22!important;font-weight:700;}
