/* Keep the forest visible, but let reading take precedence over scenery. */
.app #content-view:not(.chat-view){background-image:linear-gradient(#f3f5e9e8,#f2f5e7e0),url('assets/ground.png');background-size:100% 100%,740px auto}
.app .lesson-body{background:none}
.app .secret-vault{padding:22px 18px;border:1px solid #b8c8ad;border-radius:20px;background:#edf1e5;gap:16px;margin-top:18px}
.app .secret-vault .sealed-seed{flex-shrink:0}
.bottom-nav [data-tab="home"]{--nav-ink:#327451}
.bottom-nav [data-tab="personal"]{--nav-ink:#42759c}
.bottom-nav [data-tab="trophy"]{--nav-ink:#977122}
.bottom-nav [data-tab="profile"]{--nav-ink:#816291}
.app .bottom-nav button{color:var(--nav-ink);opacity:.78}
.app .bottom-nav button[aria-current="page"]{color:var(--nav-ink);opacity:1}
.app .bottom-nav button[aria-current="page"] svg{stroke-width:2.5}
.app .secret-jump{width:160px;height:170px;background-size:475.603% 223.989%;background-position:97.7873% 91.446%;--foot-x:80px;--foot-y:162px}
.passage-peek{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin:0 auto 18px;padding:8px 18px;border:1px solid #91a383;border-radius:24px;color:#315b42;font-size:14px}
.passage-peek svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7}
.sam-info-dialog{width:min(90vw,430px);max-height:82dvh;margin:auto;padding:28px 24px;border:1px solid #bac7af;border-radius:22px;background:#f6f7ef;color:#243d2e;overflow:auto}
.sam-info-dialog::backdrop{background:#16352466}
.info-close{float:right;margin:-10px -10px 8px 8px}
.peek-text{clear:both;line-height:1.9;font-size:19px;margin-top:20px;white-space:pre-line}
.peek-text mark{background:#e0e9b9;color:#233c28;border-radius:3px;padding:1px 2px}
.collection-intro{font-size:16px;line-height:1.8;color:#56705a;margin:12px 0 24px}
.collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.collection-badge{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:18px 10px;border:1px solid #cad5c1;border-radius:20px;background:#f4f6ed;color:#2b4d38}
.collection-badge img{width:100%;height:120px;object-fit:contain}
.collection-badge small{font-size:12px;color:#60735b}
.collection-badge.unowned{opacity:1;color:#6d7b67}
.collection-badge.unowned strong{font-size:12px}
.badge-mystery{display:grid;place-items:center;height:120px;font-size:48px;color:#839677;font-family:Georgia,serif}
.badge-new{position:absolute;top:10px;right:10px;font-size:10px;letter-spacing:.06em;color:#fff;background:#315e42;padding:4px 6px;border-radius:6px}
.collection-detail{text-align:center;clear:both}
.collection-detail img{display:block;width:100%;max-height:300px;object-fit:contain;margin:14px auto}
.collection-detail p{font-size:14px;line-height:1.7}
.question-index:focus{outline:none}
@media(prefers-reduced-motion:reduce){.lesson-body{animation:none!important}}

/* Focused interface fixes: soft handoff, painted navigation, book-page popup. */
.intro-exit-layer{position:absolute;inset:0 0 20px;z-index:100;overflow:hidden;background:#edf1df;pointer-events:none}
.intro-exit-layer .intro-screen{height:100%}
.passage-dialog{width:min(calc(100vw - 64px),346px);max-height:68dvh;padding:22px 20px 24px;border:3px double #c9b997;border-radius:12px 15px 13px 11px;background:#faf5e7;box-shadow:inset 0 0 18px #b59b6920,0 20px 65px #18291d38;overflow:hidden}
.passage-dialog::backdrop{background:#1f302e78;backdrop-filter:blur(3px)}
.passage-dialog .info-close{position:absolute;right:8px;top:8px;float:none;margin:0;color:#776e57}
.peek-heading{padding-right:28px;padding-bottom:16px;border-bottom:1px solid #c9b99766}
.peek-heading .label{font-size:11px;letter-spacing:.08em;color:#8d7959;margin-bottom:7px}
.peek-heading h2{font-size:17px;color:#514b38;font-weight:600}
.peek-scroll{max-height:calc(68dvh - 134px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c9b997 transparent;padding-right:5px;margin-top:16px}
.passage-dialog .peek-text{margin:0;font-size:17px;line-height:1.85;color:#3f4133}
.passage-dialog mark{background:#eee1a0;color:inherit;box-shadow:0 2px 0 #e5d18470;border-radius:3px;padding:0 1px}
@media(prefers-reduced-motion:reduce){.intro-exit-layer{display:none}}

.sound-setting{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0;border-top:1px solid var(--sam-border);border-bottom:1px solid var(--sam-border);margin:20px 0}.sound-setting h2{margin-bottom:8px}.screen .sound-switch{min-width:60px;width:60px;height:44px;min-height:44px;border:0;border-radius:24px;background:#a6b09f;padding:5px;flex-shrink:0}.sound-switch span{display:block;width:34px;height:34px;background:#fffef5;border-radius:50%;transition:transform .18s}.sound-switch[aria-checked="true"]{background:#315e45}.sound-switch[aria-checked="true"] span{transform:translateX(16px)}
