/* A small mountain world, shared by every page. */
:root{--bg:#172c45;--ink:#fff0d7;--muted:#d4e0de;--accent:#f4c17b;--line:#c8d8d14a;--paper:#203c48;--wash:#203c48f2}
:root[data-theme=day]{--bg:#b7c8c6;--ink:#203d37;--muted:#314d45;--accent:#754921;--line:#4669574d;--paper:#e6e9d8;--wash:#e5eadcf2}
.landscape,:root[data-theme=day] .landscape{background-image:url('./assets/storybook-mountains-night.webp');background-position:center bottom;opacity:1;filter:none}
:root[data-theme=day] .landscape{background-image:url('./assets/storybook-mountains-day.webp');filter:none}
.landscape-tint{background:linear-gradient(180deg,#0b1d3518,transparent 60%,#14262c42)}
:root[data-theme=day] .landscape-tint{background:linear-gradient(180deg,#f2d1a416,transparent 65%,#193c3120)}
body:not([data-page=home]) .landscape,:root[data-theme=day] body:not([data-page=home]) .landscape{opacity:1}
body:not([data-page=home]) .landscape-tint{background:linear-gradient(180deg,#172c45e8 10%,#172c459e 50%,#132637b5)}
:root[data-theme=day] body:not([data-page=home]) .landscape-tint{background:linear-gradient(180deg,#b7c8c6e8 10%,#c2d0bfb8 50%,#b9cbbdcc)}
.topbar{width:min(900px,calc(100% - 64px));padding:5px 19px 9px;border:1px solid var(--line);border-radius:29px 34px 27px 32px;background:color-mix(in srgb,var(--paper) 89%,transparent);box-shadow:0 4px 0 #092e3212}
.topbar .logo{font-size:2.65rem}
.topbar nav a{font-size:1.55rem}
.page-home{min-height:calc(100svh - 174px);padding-top:10px;padding-bottom:20px}
.home-scene{min-height:580px;grid-template-columns:minmax(0,1fr) minmax(300px,44%) minmax(0,1fr)}
.home-greeting{inset:17px 13% auto;font-size:clamp(4.4rem,7vw,6rem);text-shadow:0 2px 20px #162c3822}
.home-name{font-size:clamp(3.4rem,5.7vw,4.7rem);margin:0 0 70px 0;text-shadow:0 2px 18px #142c4380}
.home-study{margin:0 0 62px 0;max-width:230px;padding:16px 18px 19px;background:color-mix(in srgb,var(--paper) 94%,transparent);border:1px solid var(--line);border-radius:19px 24px 21px 26px;box-shadow:0 4px 0 #17342318;text-shadow:none}
.study-year,.study-school{color:var(--ink)}
.study-subject{font-size:clamp(2rem,3.1vw,2.8rem)}
:root[data-theme=day] .home-name{text-shadow:0 2px 12px #dce4cfd6,0 0 28px #dce4cf8c}
.home-avatar-wrap{position:relative;grid-column:2;grid-row:1 / -1;align-self:end;width:116%;margin:65px 0 0 -8%;z-index:3;text-align:center}
.home-avatar{position:relative;width:100%;height:490px;display:block;padding:0;isolation:isolate;touch-action:pan-y;border-radius:42% 42% 25% 25%;outline-offset:-12px}
#avatarCanvas{position:absolute;inset:0;display:block;pointer-events:none}
#avatarCanvas canvas,#avatarCanvas>svg{width:100%;height:100%;display:block}
.avatar-fallback{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);height:87%;width:auto;max-width:95%;object-fit:contain;mask-image:linear-gradient(#000 87%,transparent)}
.home-avatar[data-render-state=ready] .avatar-fallback{display:none}
.avatar-hint{font:400 1.35rem/1.4 var(--hand);margin:0 auto 10px;color:var(--ink);width:max-content;max-width:95%;padding:3px 16px 6px;border-radius:20px;background:color-mix(in srgb,var(--paper) 89%,transparent)}
.avatar-hint span{font-family:var(--body);font-size:13px;opacity:.85;white-space:nowrap}
.hello-bubble{position:absolute;top:-20px;left:65%;z-index:5;min-width:174px;max-width:calc(100% - 12px);padding:12px 27px 14px;background:#fff4db;color:#29443e;border:2px solid #b6b993;border-radius:24px 27px 22px 8px;box-shadow:0 5px 0 #1a352424;transform:translateX(-5%) rotate(3deg);pointer-events:none;transition:opacity 1.6s ease,translate 1.6s ease}
.hello-bubble::after{content:"";position:absolute;bottom:-11px;left:22px;width:17px;height:17px;background:#fff4db;border-right:2px solid #b6b993;border-bottom:2px solid #b6b993;transform:skew(-18deg) rotate(37deg);border-radius:0 0 5px}
.hello-bubble.is-fading{opacity:0;translate:0 -8px}
.hello-bubble.is-popping{animation:hello-pop .28s ease-out}
.hello-language{display:block;font:600 12px/1.4 var(--body);letter-spacing:.08em;text-transform:uppercase;margin-bottom:3px}
.hello-word{display:block;font:600 2.9rem/1.2 var(--hand);white-space:nowrap}
.hello-word:lang(ne),.hello-word:lang(hi){font-family:'Noto Sans Devanagari','Nirmala UI',sans-serif;font-size:2.35rem;line-height:1.5}
.hello-pronunciation{display:block;font:400 13px/1.4 var(--body);margin-top:2px;opacity:.75}
.hello-pronunciation:empty{display:none}
@keyframes hello-pop{0%{scale:.82;opacity:0}70%{scale:1.04}100%{scale:1;opacity:1}}
.site-footer,:root[data-theme=day] body[data-page=home] .site-footer{color:#fff5dd;text-shadow:0 1px 6px #162c36}
.page-heading,.story-block h2,.collection h2{letter-spacing:-.02em}
.page-about .about-intro,.personal-notes{padding:28px 32px;background:var(--wash);border:1px solid var(--line);border-radius:28px 20px 29px 22px;box-shadow:0 5px 0 #15332a12}
.personal-notes{margin-top:22px}
.personal-notes p:last-child,.page-about .about-intro p:last-child{margin-bottom:0}
.people-note,.note-card{border-radius:22px 17px 25px 20px;box-shadow:0 6px 0 #0c2b2426;background:var(--wash)}
.people-note{padding:18px 18px 25px}
.photo-placeholder{border-radius:14px;background:#637c6717}
.note-grid{row-gap:32px}
.note-card summary{border-radius:inherit}
.note-card:hover{box-shadow:0 9px 0 #0c2b2426}
.note-content{border-radius:0 0 20px 20px}
.post-link{border-radius:15px;background:color-mix(in srgb,var(--paper) 65%,transparent)}
.chapter-nav{background:var(--wash);padding:6px 18px;border-radius:28px}
.end-block{background:var(--wash);border:1px solid var(--line);border-radius:32px 24px 37px 28px;padding:40px 28px;box-shadow:0 7px 0 #123d2526}
.cloud-veil{background:#203c53}.cloud{filter:brightness(.77) saturate(.7)}
:root[data-theme=day] .cloud-veil{background:#bdccca}:root[data-theme=day] .cloud{filter:brightness(.88) saturate(.3)}
@media(min-width:1600px){.home-scene{min-height:650px}.home-avatar{height:545px}.home-avatar-wrap{margin-top:70px}.home-name{font-size:5rem;margin-bottom:80px}.home-study{margin-bottom:88px}}
@media(max-width:900px){.home-scene{grid-template-columns:minmax(0,1fr) 42% minmax(0,1fr);min-height:540px}.home-avatar{height:460px}.home-greeting{inset:25px 6% auto;font-size:5rem}.home-name{font-size:3.55rem;margin-bottom:55px}.home-study{margin-left:10px;margin-bottom:66px}.study-subject{font-size:2.3rem}.study-year,.study-school{font-size:13px}}
@media(max-width:700px){.home-name{font-size:3rem}.study-subject{font-size:2rem}.home-greeting{font-size:4.6rem}.home-avatar-wrap{width:129%;margin-left:-14.5%}.hello-bubble{left:42%;min-width:152px;padding:10px 20px}.hello-word{font-size:2.6rem}}
@media(max-width:620px){.topbar{width:calc(100% - 32px);margin-top:14px;padding:8px 18px 12px;gap:1px 15px;border-radius:23px 27px 24px 29px}.topbar nav{gap:26px}.topbar nav a{font-size:1.4rem}.topbar .logo{font-size:2.4rem}.page-home{min-height:calc(100svh - 214px);padding-top:14px}.home-scene{min-height:0;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;column-gap:22px}.home-greeting{inset:8px 5% auto;font-size:3.8rem}.home-avatar-wrap{grid-column:1 / -1;grid-row:1;justify-self:center;width:min(360px,100%);margin:42px 0 0}.home-avatar{height:365px}.avatar-hint{font-size:1.15rem;padding-inline:13px;margin-bottom:15px}.avatar-hint span{font-size:12px}.hello-bubble{top:8px;left:43%;padding:10px 18px 13px;min-width:142px;transform:rotate(3deg)}.hello-word{font-size:2.5rem}.hello-word:lang(ne),.hello-word:lang(hi){font-size:2rem}.hello-language{font-size:12px}.home-name{grid-column:1;grid-row:2;font-size:2.85rem;margin:8px 0 15px}.home-study{grid-column:2;grid-row:2;margin:10px 0 15px;max-width:155px}.study-subject{font-size:1.9rem}.study-year,.study-school{font-size:13px}.site-footer{padding-top:14px}.page-about .about-intro,.personal-notes{padding:22px}.end-block{padding:32px 18px}.note-grid{row-gap:26px}}
@media(max-width:370px){.topbar nav{gap:19px}.topbar nav a{font-size:1.35rem}.home-greeting{font-size:3.2rem;inset:10px 2% auto}.home-avatar{height:330px}.home-avatar-wrap{margin-top:35px}.home-name{font-size:2.45rem}.home-study{max-width:130px}.study-subject{font-size:1.72rem}.hello-bubble{left:40%;min-width:136px;padding-inline:15px}.avatar-hint span{font-size:12px}.home-scene{column-gap:14px}.avatar-hint{font-size:1.1rem}}
@media(prefers-reduced-motion:reduce){.hello-bubble{transition:none}.hello-bubble.is-popping{animation:none}}
@media(max-width:900px) and (min-width:621px){.hello-bubble{left:55%;top:-18px}}
@media(max-width:620px){.home-avatar-wrap{margin-top:78px}.home-avatar{height:395px}#avatarCanvas{top:80px}.avatar-fallback{height:calc(100% - 96px)}.hello-bubble{top:0;left:50%;transform:translateX(-50%) rotate(3deg);padding:8px 22px 10px}.hello-word{font-size:2.25rem}.hello-word:lang(ne),.hello-word:lang(hi){font-size:1.8rem;line-height:1.25}.hello-bubble::after{left:47%}.avatar-hint span{display:none}}
@media(max-width:370px){.home-avatar-wrap{margin-top:69px}.home-avatar{height:370px}#avatarCanvas{top:75px}.home-greeting{font-size:3.2rem}}
@media(max-width:900px){.home-study{padding:13px 12px 16px;margin-left:0;max-width:100%}}
@media(max-width:620px){.home-study{padding:12px 10px 14px;max-width:100%;margin-top:0}.home-name{margin-top:16px}.study-subject{font-size:1.75rem}.study-year,.study-school{font-size:13px}}
@media(max-width:370px){.home-scene{column-gap:10px}.home-study{padding-inline:8px}.study-subject{font-size:1.56rem}.study-school{font-size:12px}}
