/* Главная: единая компоновка для iPhone 12 Pro и новее. */
body:has(#tab-quests:not(.hidden)){background:#05090c;color:#eee9de}
body:has(#tab-quests:not(.hidden)) .shell{isolation:isolate;position:relative;background:none;padding: max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(172px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
body:has(#tab-quests:not(.hidden)) .shell:before{content:'';position:absolute;inset:0 0 auto;height:640px;z-index:-1;pointer-events:none;background:linear-gradient(#05090c77,#05090caa 42%,#05090c 100%),url('./assets/quest-forest-v1.png') center top/100% auto no-repeat;filter:brightness(.8) blur(3px);mask-image:linear-gradient(#000 75%,transparent)}
#tab-quests{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
#tab-quests .home-dashboard{width:100%;min-width:0;padding:0}
.character-dashboard .home-overview{display:grid;grid-template-columns:minmax(0,44fr) minmax(0,56fr);gap:16px;align-items:center;margin:0;position:relative;min-height:188px}
.home-overview:after{content:'';position:absolute;left:calc((100% - 16px)*.44 + 7px);top:12px;bottom:12px;width:1px;background:linear-gradient(transparent,#e2c16a77 30%,#a0874c66 70%,transparent);box-shadow:0 0 5px #e8bd4a22;pointer-events:none}
.character-dashboard .home-portrait{position:relative;display:block;width:100%;height:188px;padding:0;min-width:0;border:0;border-radius:0;background:none;isolation:isolate;overflow:visible;cursor:pointer}
.character-dashboard .quest-wheel{position:absolute;left:0;top:12px;width:100%;aspect-ratio:1;border:1px solid #fff4b0;border-radius:50%;box-shadow:0 0 4px #fff9c5,0 0 13px #fac65088,0 0 24px #da9b3e44,inset 0 0 14px #fff9c344;z-index:0;filter:saturate(1.25)}
.character-dashboard .quest-wheel:after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(ellipse at 26% 17%,#ffffff44,transparent 45%),radial-gradient(ellipse at 52% 62%,#0008 5%,transparent 57%),linear-gradient(125deg,#fff1a222,transparent 40%,#030c2344);box-shadow:inset -5px -6px 14px #02071270,inset 2px 3px 9px #fff5b555;pointer-events:none}
.character-dashboard .quest-wheel.no-category-data:before{content:'';position:absolute;inset:-1px;border-radius:50%;background:conic-gradient(#e5aaff,#ffc466,#399cff,#54fff0,#ff8ec0,#9eff79,#ffe46e,#e5aaff);padding:1px;mask:linear-gradient(#fff 0 0) content-box exclude,linear-gradient(#fff 0 0);filter:blur(1px)}
.character-dashboard .hero-figure{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);transform-origin:50% 96%;width:100%;height:80%;z-index:2;animation:hero-breathe 4.8s ease-in-out infinite;pointer-events:none}
.character-dashboard .home-avatar-art,.character-dashboard .home-avatar-glow{position:absolute;inset:0;display:block;width:100%;height:100%;background:url('./assets/home-hero-reference-v1.png') center bottom/contain no-repeat;pointer-events:none}
.character-dashboard .home-avatar-art{filter:drop-shadow(4px 4px 4px #000a) drop-shadow(0 0 1px #ffe7a4) drop-shadow(0 0 3px #efac3b77)}
.character-dashboard .home-avatar-glow{opacity:0;filter:brightness(1.7) saturate(.6) drop-shadow(0 0 6px #ffd76c);mix-blend-mode:screen}
.character-dashboard .home-avatar-glow.quest-glow{animation:soft-hero-glow 1.5s ease-in-out both}
.character-dashboard .home-avatar-glow.level-glow-effect{animation:strong-hero-glow 2.1s ease-in-out both;filter:brightness(3) saturate(.5) drop-shadow(0 0 9px #fff0a5) drop-shadow(0 0 17px #ffc33b)}
.character-dashboard .hero-floor{position:absolute;width:91%;height:32px;left:50%;bottom:6px;transform:translateX(-50%);z-index:1;overflow:visible;filter:drop-shadow(0 0 3px #ffdd6c) drop-shadow(0 0 8px #ffb923);pointer-events:none}
.character-dashboard .home-avatar-level{display:none}
.character-dashboard .category-stats{min-width:0;display:grid;gap:0;padding:5px 0;background:linear-gradient(110deg,#080e14b0,#070c1080);border-radius:4px}
.character-dashboard .category-stat{display:grid;grid-template-columns:17px minmax(0,1fr) 37px 27px;align-items:center;gap:4px;min-height:23px;border-bottom:1px solid #b1995d25;font-size:11px;line-height:1.15;color:#f2ece0}
.character-dashboard .category-stat:last-child{border:0}.category-mark{color:var(--category)}.category-mark svg{display:block;width:17px;height:17px;filter:drop-shadow(0 0 3px color-mix(in srgb,var(--category) 40%,transparent))}
.category-name{white-space:nowrap;letter-spacing:-.25px}.category-stat b{font-size:10px;font-weight:400;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.category-meter{display:block;height:5px;border-radius:8px;overflow:hidden;background:linear-gradient(#464943,#292d2c);box-shadow:inset 0 1px 1px #ffffff15}
.category-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,color-mix(in srgb,var(--category) 65%,white),var(--category));box-shadow:0 0 7px var(--category);transition:width .65s ease}
.character-dashboard .home-status-strip{display:grid;grid-template-columns:minmax(92px,1fr) minmax(0,1fr) minmax(0,1fr);align-items:center;margin:7px 0 13px;min-height:62px;border:1px solid #9d874b70;border-radius:12px;background:linear-gradient(120deg,#252a204d,#10181ac9);box-shadow:inset 0 1px 2px #f7d77b15,0 0 9px #0004;font-variant-numeric:tabular-nums lining-nums}
.home-character-stats{display:flex;flex-direction:column;gap:4px;padding:8px 10px;color:#f2dc92;line-height:1.2}.home-character-stats #homeLevel{font-size:14px;font-weight:600}.home-coin{color:#d8c996;font-size:13px;display:flex;gap:5px;align-items:center}.home-coin b{font-weight:500;color:#e9dfbe}
.home-total-stat,.home-complete-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:44px;gap:5px;border-left:1px solid #af975133;padding:4px}
.home-total-stat>span,.home-complete-stat>span{font-size:10px;line-height:1.15;color:#c5c5b8;white-space:nowrap}
.home-total-stat strong,.home-complete-stat strong{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;font-size:22px;font-weight:500;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-feature-settings:'tnum' 1,'lnum' 1;white-space:nowrap;letter-spacing:0;color:#f2e4b8;text-shadow:0 1px 3px #000}
.completion-number{display:grid;grid-template-columns:12px auto 12px;gap:3px;align-items:center;max-width:100%}.completion-laurel{font-size:22px;line-height:1;color:#cbaa59;text-shadow:0 0 3px #cb9d3344}.laurel-left{transform:rotate(-23deg)}.laurel-right{transform:scaleX(-1) rotate(-23deg)}
.home-resources{display:none}
.home-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #c4a04999;padding:10px 0 0;margin:0 0 12px;min-height:44px}.home-list-heading h2{display:flex;align-items:center;gap:7px;font-size:18px;font-weight:400;margin:0;color:#eeeade;white-space:nowrap}.home-list-heading h2 svg{width:23px;height:23px;color:#e5cb69}.active-caption{display:flex;align-items:center;gap:7px;font-size:11px;color:#dbc89c}#activeQuestCount{display:grid;place-items:center;width:26px;height:26px;border:1px solid #d3b452;border-radius:9px;font-size:15px;font-weight:400;color:#e9d58f}
#homeQuestList{display:grid;gap:7px}.home-quest{border:1px solid #a99154a0;border-left:3px solid var(--category);border-radius:9px;overflow:hidden;background:radial-gradient(ellipse at 0 30%,color-mix(in srgb,var(--category) 12%,transparent),transparent 62%),linear-gradient(125deg,#0d1519f2,#080d11f0);box-shadow:inset 0 1px 4px #e2c16b22,0 0 6px #c6a54a15;transition:box-shadow .3s,border-color .3s}
.home-quest.is-open{border-color:#e0c06d;box-shadow:inset 0 1px 5px #efd18c33,0 0 8px #d2b14c44}
#tab-quests .quest-expand{display:grid;grid-template-columns:35px minmax(0,1fr) 44px;grid-template-rows:auto 6px;gap:4px 8px;align-items:center;width:100%;min-height:55px;text-align:left;background:linear-gradient(115deg,#e5be4a08,transparent 70%);border:0;border-radius:0;padding:8px;color:#eee6d3;cursor:pointer}
.home-quest.is-open .quest-expand{background:linear-gradient(110deg,color-mix(in srgb,var(--category) 18%,transparent),transparent 70%);box-shadow:inset 0 -1px #c3a55e66,0 1px 8px #d2ad4322}
.quest-category{grid-column:1;grid-row:1/3;display:flex;align-items:center;justify-content:center;border-right:1px solid #b4a06b33;align-self:stretch;padding-right:6px;color:var(--category)}.quest-category svg{width:26px;height:26px;filter:drop-shadow(0 0 4px color-mix(in srgb,var(--category) 45%,transparent))}.category-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#tab-quests .quest-title{grid-column:2;grid-row:1;font-size:14px;line-height:1.3;letter-spacing:-.15px;overflow-wrap:anywhere;color:#eeeae0}
.quest-percent{grid-column:3;grid-row:1/3;display:flex;align-items:center;justify-content:flex-end;gap:7px;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}.quest-percent>span{font-size:18px;color:#eadcb9}
.quest-progress{grid-column:2;grid-row:2;height:6px;margin:0;border:1px solid #baaa7888;border-radius:8px;background:linear-gradient(#454840,#282e2a);overflow:hidden;box-shadow:inset 0 1px 2px #0005}.quest-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,color-mix(in srgb,var(--category) 65%,white),var(--category));box-shadow:0 0 7px var(--category);transition:width .65s cubic-bezier(.2,.65,.25,1)}
.quest-steps-shell{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .38s ease,opacity .3s ease}.home-quest.is-open .quest-steps-shell{grid-template-rows:1fr;opacity:1}.quest-steps-clip{min-height:0;overflow:hidden}.quest-steps{margin:0 8px 0 20px;padding:0 0 8px 14px;border-left:1px solid #ba9c56aa}
.quest-step{display:flex;align-items:center;position:relative;gap:9px;min-height:44px;border-bottom:1px solid #b19d6633;font-size:14px;line-height:1.3;color:#e1e0d7;cursor:pointer}.quest-step:before{content:'';position:absolute;left:-14px;top:50%;width:9px;border-top:1px solid #c3a35c}.quest-step span{transition:color .35s,opacity .35s}.quest-step input{appearance:none;-webkit-appearance:none;display:grid;place-items:center;width:20px;height:20px;flex-shrink:0;border:1px solid #e1d19b;border-radius:3px;background:#080f11;margin:0;transition:background .25s,box-shadow .3s,border-color .3s}.quest-step input:checked{background:color-mix(in srgb,var(--category) 26%,#111b13);border-color:var(--category);box-shadow:0 0 6px color-mix(in srgb,var(--category) 45%,transparent)}.quest-step input:checked:after{content:'✓';font-size:18px;line-height:1;color:var(--category);animation:check-appear .3s ease}.quest-step:has(input:checked) span{color:#b6c7ae}.step-done{animation:step-glint .65s ease}
.home-quest-actions{display:flex;gap:6px;flex-wrap:wrap;padding-top:9px}.home-quest-actions button{flex:1;min-height:44px;padding:5px;border:1px solid #83764b;border-radius:6px;background:linear-gradient(#27281e,#111813);color:#e7d9b1;font-size:12px;box-shadow:inset 0 1px 2px #efd89918}.home-quest-actions button:disabled{opacity:.4}.quest-steps p{font-size:13px;color:#b7af99}
.daily-quest{position:relative;margin-top:16px;padding:14px;border:1px solid #c7a64c;border-radius:14px;min-height:100px;background:linear-gradient(90deg,#090e13e8,#11130f77),url('./assets/quest-mountains-v1.png') center/cover;box-shadow:inset 0 1px 4px #f7dd8b33,0 0 8px #bd902122;overflow:hidden}.archive-mountains{display:none}.daily-label{font-size:15px;color:#f0e9d7;margin-bottom:12px}#dailyQuest{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:8px}#dailyQuest p{grid-column:1/-1;font-size:13px;line-height:1.5;color:#c9c5b5;margin:0}#dailyQuest strong{font-size:14px;font-weight:400;line-height:1.4}.daily-icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid #d0ac48;border-radius:8px;color:var(--category,#efcf60);background:color-mix(in srgb,var(--category,#efcf60) 16%,#101516)}.daily-icon svg{width:26px;height:26px}#dailyQuest button{min-height:44px;border:1px solid #e1be56;border-radius:8px;background:linear-gradient(#554322,#161b13);color:#fce594;font-size:12px;padding:7px;box-shadow:inset 0 1px 5px #ffce6255,0 0 7px #dbae3433}
/* Fixed touch controls: capture above the restored four-tab navigation. */
body:has(#tab-quests:not(.hidden)){--home-nav-height:66px}
body:has(#tab-quests:not(.hidden)) .tabbar{display:flex;position:fixed;z-index:20;bottom:0;min-height:calc(var(--home-nav-height) + env(safe-area-inset-bottom));box-sizing:border-box;max-width:430px;padding:5px 10px calc(5px + env(safe-area-inset-bottom));gap:4px;background:linear-gradient(#24291fed,#101711fa);border-top:1px solid #b59d5b;box-shadow:0 -2px 12px #0009}
body:has(#tab-quests:not(.hidden)) .tabbar .tab{min-height:54px;font-size:12px;color:#c0bdab;background:none;border:1px solid transparent;border-radius:7px;padding:4px}.tabbar .tab svg{width:23px;height:23px}body:has(#tab-quests:not(.hidden)) .tabbar .tab.active{color:#f6df8b;background:linear-gradient(#5a523066,#2b302066);border-color:#9a875488}
#tab-quests .home-capture{position:fixed;z-index:19;left:50%;transform:translateX(-50%);bottom:calc(var(--home-nav-height) + env(safe-area-inset-bottom) + 8px);width:calc(100% - 24px);max-width:406px;box-sizing:border-box;display:flex;align-items:center;gap:8px;margin:0;padding:8px;border:1px solid #ac975c;border-radius:15px;background:linear-gradient(120deg,#29291ff5,#0c1213fa);box-shadow:0 0 10px #0008,inset 0 1px 2px #ffdb7a22}
.home-capture .capture-prompt{flex:1;min-width:0;padding:11px 8px;border:1px solid #a49466;border-radius:10px;background:linear-gradient(120deg,#4a483c66,#1e252088);font:italic 15px/1.5 Georgia,serif;color:#d3c6a3;white-space:nowrap}
.home-capture button:not(.capture-prompt){display:grid;place-items:center;width:46px;height:48px;flex-shrink:0;border:1px solid #e2c770;border-radius:10px;background:linear-gradient(125deg,#63502d77,#151b15);box-shadow:inset 0 1px 5px #e8c37133,0 0 4px #dfb63c22;color:#efd176}.home-capture button:not(.capture-prompt) svg{width:26px;height:26px}
#tab-quests .quest-composer{position:fixed;z-index:30;bottom:calc(var(--home-nav-height) + env(safe-area-inset-bottom) + 8px);left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:406px;box-sizing:border-box;max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - var(--home-nav-height) - env(safe-area-inset-bottom) - 20px);overflow:auto;overscroll-behavior:contain;padding:12px;border:1px solid #d4b86c;border-radius:14px;background:radial-gradient(ellipse at 15% 0,#72602a33,transparent 65%),linear-gradient(145deg,#182326,#0a1215);box-shadow:0 0 0 100vmax #000a,0 0 18px #d3a33344,inset 0 1px 2px #ffe7a833;animation:composer-rise .38s cubic-bezier(.2,.8,.2,1)}
.quest-composer .composer-heading{display:flex;align-items:center;justify-content:space-between;color:#e5d8b8;font-size:15px}.quest-composer .input,.quest-composer textarea,.quest-composer select{background:#09120f;color:#eee6d2;border-color:#877b56;font-size:16px;box-sizing:border-box;max-width:100%}.quest-composer .input{width:100%;margin:8px 0}.quest-options summary{min-height:44px}.quest-composer .entry-row{display:flex;gap:6px;align-items:center}.quest-composer .entry-row input{min-width:0;flex:1}#questSteps{font:16px/1.4 inherit;min-height:90px}.composer-footer{text-align:right}.home-capture .recording{box-shadow:0 0 10px #e7a937}
.hero-particles{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:visible}.hero-particles span{position:absolute;left:50%;top:12%;width:var(--size);height:var(--size);border-radius:50%;background:#fff4bb;box-shadow:0 0 5px #ffce55,0 0 10px #ffd343;opacity:0}.hero-particles.celebrating span{animation:hero-spark 1.3s var(--delay) ease-out both}.hero-particles.celebrating:before{content:'';position:absolute;left:50%;top:10%;width:24px;height:24px;border-radius:50%;background:#fff7cb;box-shadow:0 0 22px 12px #ffd95d;animation:hero-flash .65s ease-out both}
@keyframes hero-breathe{0%,100%{transform:translateX(-50%) scale(1) rotate(-.25deg)}50%{transform:translateX(-50%) scale(1.012,1.018) rotate(.25deg)}}
@keyframes hero-spark{0%{opacity:0;transform:translate(-50%,0) scale(.3)}15%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),var(--dy)) scale(.15)}}
@keyframes hero-flash{0%{transform:translate(-50%,-50%) scale(.1);opacity:0}20%{opacity:.9}100%{transform:translate(-50%,-50%) scale(3);opacity:0}}
@keyframes check-appear{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes step-glint{0%{background:#e1d87b22}100%{background:transparent}}
@keyframes composer-rise{from{opacity:0;translate:0 35px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:380px){.character-dashboard .home-overview{gap:14px;grid-template-columns:minmax(0,43fr) minmax(0,57fr)}.home-overview:after{left:calc((100% - 14px)*.43 + 6px)}.character-dashboard .category-stat{grid-template-columns:16px minmax(0,1fr) 29px 25px;gap:3px;font-size:10.5px}.home-list-heading h2{font-size:17px}.active-caption{font-size:10px}}
@media(min-width:410px){.character-dashboard .home-portrait{height:202px}.character-dashboard .category-stat{grid-template-columns:18px minmax(0,1fr) 42px 29px;font-size:12px;min-height:24px}.category-stat b{font-size:11px}}
@media(prefers-reduced-motion:reduce){#tab-quests *,#tab-quests *:before{animation:none!important;transition:none!important}.hero-particles{display:none}}

body:has(#tab-quests:not(.hidden)) .toast{bottom:calc(158px + env(safe-area-inset-bottom));border-radius:10px;background:#263023f5;border-color:#baa264}

/* Quest entry and arrival use the same gold edge as the quest cards. */
#tab-quests .quest-composer.is-closing{animation:composer-away .28s ease both;pointer-events:none}
.composer-eyebrow{display:block;color:#b4a36c;font-size:10px;letter-spacing:.12em;text-transform:uppercase;margin-bottom:3px}
.composer-heading h2{font-size:23px;font-family:Georgia,serif;font-weight:400;line-height:1.15;margin:0;color:#f4e7c1}
.composer-field-label{display:block;margin-top:19px;color:#cfc8b6;font-size:12px}
#tab-quests .quest-composer .input,#tab-quests .quest-composer select,#tab-quests .quest-composer textarea{border-radius:9px;border-color:#8e7a485c;background:#091315;box-shadow:inset 0 1px 4px #0004;min-height:48px;padding:11px;font-size:16px}
#tab-quests .quest-composer .input:focus,#tab-quests .quest-composer select:focus,#tab-quests .quest-composer textarea:focus{outline:1px solid #d9be6b;box-shadow:0 0 8px #dfba5233}
#tab-quests .quest-composer #closeComposer,#tab-quests .quest-composer .mic{border-radius:9px;border-color:#aa8c4f88;background:linear-gradient(#333523,#121c18);color:#dbc997;min-width:44px;min-height:44px}
#tab-quests .quest-composer .quest-options{margin-top:12px;padding:0 10px 9px;border:1px solid #8f784c44;border-radius:10px;background:#070e111f}
#tab-quests .quest-composer .quest-options summary{color:#d4c89e;font-size:14px}
#tab-quests .quest-composer .composer-footer{margin-top:17px;border-top:1px solid #bfa05233;padding-top:12px}
#tab-quests .quest-composer #addQuestBtn{width:100%;border:1px solid #d2ae52;border-radius:10px;background:linear-gradient(110deg,#6e5c2b,#282f20);box-shadow:inset 0 1px 3px #fadd8b44,0 0 10px #dcb34222;color:#fff1bd;font-size:16px;min-height:48px}
#tab-quests .quest-composer #voiceStatus{font-size:11px;color:#939e97;line-height:1.4;margin-top:12px}
#tab-quests .home-capture .capture-prompt{display:block;text-align:left;min-height:48px;border:1px solid #a49466;border-radius:10px;cursor:pointer;max-width:100%;box-shadow:inset 0 1px 3px #dbbf6922}
.home-quest.is-new{animation:quest-arrival 1.6s ease both}
@keyframes composer-away{from{opacity:1;translate:0 0;scale:1}to{opacity:0;translate:0 40px;scale:.97}}
@keyframes quest-arrival{0%{opacity:.1;transform:translateY(12px);box-shadow:0 0 0 #ffde6b00}28%{opacity:1;transform:translateY(0);border-color:#f9db7b;box-shadow:0 0 15px #ffe16e66,inset 0 0 12px #ffe47c22}100%{opacity:1;transform:translateY(0)}}
@keyframes soft-hero-glow{0%,100%{opacity:0}40%{opacity:.48}65%{opacity:.32}}
@keyframes strong-hero-glow{0%{opacity:0}22%{opacity:1}45%{opacity:.75}62%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){#tab-quests .home-quest.is-new{border-color:#f0d27b}}
.completion-laurel{display:block;width:12px;height:28px;font-size:0;text-shadow:none}.completion-laurel svg{display:block;width:12px;height:28px;filter:drop-shadow(0 0 2px #cba54a33)}.laurel-left{transform:none}.laurel-right{transform:scaleX(-1)}
#tab-hero .warrior-art.quest-glow{animation:full-hero-soft 1.5s ease both}
#tab-hero .warrior-art.level-glow-effect{animation:full-hero-strong 2.1s ease both}
@keyframes full-hero-soft{0%,100%{filter:brightness(1)}40%{filter:brightness(1.25) drop-shadow(0 0 5px #e5c56a)}65%{filter:brightness(1.15) drop-shadow(0 0 3px #dbc578)}}
@keyframes full-hero-strong{0%,100%{filter:brightness(1)}25%,65%{filter:brightness(1.8) drop-shadow(0 0 9px #ffe297) drop-shadow(0 0 14px #ffd157)}45%{filter:brightness(1.4) drop-shadow(0 0 6px #f8dc77)}}
/* XP below the portrait; compact counters and a single fixed bottom dock. */
body:has(#tab-quests:not(.hidden)) .shell{padding-bottom:calc(300px + env(safe-area-inset-bottom))}
.character-dashboard .home-overview{row-gap:0}
.character-dashboard .home-level-progress{grid-column:1;min-width:0;align-self:start;padding:1px 2px 0;margin-top:-5px}
.home-level-caption{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:5px;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums lining-nums}
.home-level-caption strong{font-size:11px;color:#ead695;font-weight:600}.home-level-caption>span{font-size:10px;color:#c5c7b7}
.home-xp-track{height:6px;border:1px solid #b29d5f80;border-radius:9px;background:linear-gradient(#292f2b,#101a17);box-shadow:inset 0 1px 2px #0006;overflow:hidden}.home-xp-track i{display:block;height:100%;background:linear-gradient(90deg,#8c7f48,#f7d87a);box-shadow:0 0 6px #e9ce6a66;border-radius:inherit;transition:width .65s ease}
.character-dashboard .home-status-strip{max-width:292px;margin:10px 0 10px auto;min-height:44px;grid-template-columns:68px minmax(0,1fr) minmax(0,1fr);border-radius:10px}
.character-dashboard .home-character-stats{padding:5px 7px;gap:0}.home-coin{gap:4px;font-size:12px}.coin-icon{width:23px;height:22px;flex-shrink:0;filter:drop-shadow(0 0 3px #ce9f3c44)}
.character-dashboard .home-total-stat,.character-dashboard .home-complete-stat{min-height:34px;gap:3px;padding:3px}
.character-dashboard .home-total-stat>span,.character-dashboard .home-complete-stat>span{font-size:9px}
.character-dashboard .home-total-stat strong,.character-dashboard .home-complete-stat strong{font-size:18px;line-height:1}
.character-dashboard .completion-laurel,.character-dashboard .completion-laurel svg{height:21px;width:10px}.completion-number{grid-template-columns:10px auto 10px;gap:2px}
.character-dashboard .quest-wheel{filter:saturate(1.65) brightness(1.15);box-shadow:0 0 4px #fffad1,0 0 12px #ffd86599,0 0 24px #ddba5555,inset 0 0 9px #fff0af44}
.character-dashboard .quest-wheel:after{background:radial-gradient(ellipse at 25% 16%,#ffffff50,transparent 48%),radial-gradient(ellipse at 50% 68%,#0003,transparent 52%);box-shadow:inset -3px -4px 8px #02071240,inset 2px 3px 7px #fff9cf66}
#tab-quests .home-dock{position:fixed;z-index:19;left:50%;transform:translateX(-50%);bottom:calc(var(--home-nav-height) + env(safe-area-inset-bottom) + 8px);width:calc(100% - 24px);max-width:406px;display:flex;flex-direction:column;gap:8px;isolation:isolate}
#tab-quests .home-dock .daily-quest{position:relative;width:100%;margin:0;padding:9px 11px;min-height:82px;max-height:126px;overflow:auto;background:linear-gradient(90deg,#090e13ee,#11130fb0),url('./assets/quest-mountains-v1.png') center/cover;box-shadow:inset 0 1px 3px #ffe6a333,0 1px 9px #000a}
#tab-quests .home-dock .daily-label{font-size:13px;margin-bottom:6px;line-height:1.2}
#tab-quests .home-dock #dailyQuest p{font-size:11px;line-height:1.4}
#tab-quests .home-dock #dailyQuest strong{font-size:12px;line-height:1.25}
#tab-quests .home-dock #dailyQuest button{font-size:12px;min-height:44px}
#tab-quests .home-dock .home-capture{position:relative;left:auto;bottom:auto;transform:none;width:100%;margin:0}
body:has(#tab-quests:not(.hidden)) .toast{bottom:calc(255px + env(safe-area-inset-bottom))}
/* Matching poses share a planted foot line; movement is paused for reduced motion. */
.character-dashboard .hero-figure{height:84%;bottom:16px;animation:hero-idle-weight 7s ease-in-out infinite}
.character-dashboard .home-avatar-art,.character-dashboard .home-avatar-glow{background:none}
.character-dashboard .hero-pose{position:absolute;left:50%;bottom:0;width:auto;height:100%;aspect-ratio:1/2;transform:translateX(-50%);display:block;background-image:url('./assets/home-hero-idle-v1.png');background-size:300% 100%;background-repeat:no-repeat;pointer-events:none}
.character-dashboard .pose-neutral{background-position:0% 50%;animation:pose-rest 28s ease-in-out infinite}
.character-dashboard .pose-turn{background-position:50% 50%;animation:pose-turn 28s ease-in-out infinite}
.character-dashboard .pose-inspect{background-position:100% 50%;animation:pose-inspect 28s ease-in-out infinite}
@keyframes pose-rest{0%,21%,36%,57%,75%,100%{opacity:1}22%,35%,58%,74%{opacity:0}}
@keyframes pose-turn{0%,21%,36%,100%{opacity:0}22%,35%{opacity:1}}
@keyframes pose-inspect{0%,57%,75%,100%{opacity:0}58%,74%{opacity:1}}
@keyframes hero-idle-weight{0%,100%{transform:translateX(-50%) translateY(0) rotate(-1deg) scale(1)}30%{transform:translateX(calc(-50% + 2px)) translateY(-1px) rotate(.6deg) scale(1.015,1.025)}65%{transform:translateX(calc(-50% - 2px)) translateY(0) rotate(-.6deg) scale(.995,1.01)}}
@media(prefers-reduced-motion:reduce){.character-dashboard .pose-neutral{opacity:1}.character-dashboard .pose-turn,.character-dashboard .pose-inspect{opacity:0}}

.hidden .character-dashboard .hero-figure,.hidden .character-dashboard .hero-pose{animation-play-state:paused}
/* One planted idle: lower body remains still, only head and arms articulate. */
.character-dashboard .hero-figure{animation:none;transform:translateX(-50%)}
.character-dashboard .hero-pose.pose-neutral{animation:none;opacity:1;background:none}
.character-dashboard .idle-layer{position:absolute;inset:0;background:url('./assets/home-hero-idle-v1.png') 0% 50%/300% 100% no-repeat}
.character-dashboard .idle-body{clip-path:url(#idleBodyClip)}
.character-dashboard .idle-head{clip-path:polygon(30% 0,70% 0,70% 20%,30% 20%);transform-origin:49% 18%;animation:idle-head-nod 6.8s ease-in-out infinite}
.character-dashboard .idle-arm-left{clip-path:polygon(0 22%,28% 22%,28% 70%,0 70%);transform-origin:27% 25%;animation:idle-hand-left 5.6s ease-in-out infinite}
.character-dashboard .idle-arm-right{clip-path:polygon(78% 22%,100% 22%,100% 56%,78% 56%);transform-origin:80% 25%;animation:idle-hand-right 6.4s ease-in-out infinite}
@keyframes idle-head-nod{0%,100%{transform:rotate(-.6deg)}45%{transform:rotate(1.1deg)}70%{transform:rotate(.2deg)}}
@keyframes idle-hand-left{0%,100%{transform:rotate(0)}50%{transform:rotate(.7deg)}}
@keyframes idle-hand-right{0%,100%{transform:rotate(0)}50%{transform:rotate(-.8deg)}}
.hidden .character-dashboard .idle-layer{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.character-dashboard .idle-layer{animation:none;transform:none}}
