:root{
  color-scheme:light;
  --ink:#4c2932;--rose:#80374a;--paper:#fff5e9;--cream:#fff8ed;--gold:#f5d6a7;
  --glass:linear-gradient(150deg,#fff4e5fa,#fce1d6ee);
  font-family:"Instrument Sans",system-ui,-apple-system,sans-serif;
  color:var(--cream);background:#625246;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100svh;overflow-x:hidden}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.63;cursor:default}
button:focus-visible,input:focus-visible,[tabindex="-1"]:focus-visible{outline:3px solid #a6465b;outline-offset:4px}
.house-photo,.petals{position:fixed;inset:0;z-index:-3;overflow:hidden;pointer-events:none}
.house-photo picture,.house-photo img{position:absolute;inset:0;width:100%;height:100%;display:block}
.house-photo img{object-fit:cover;object-position:50% 46%}
.house-photo picture+picture{opacity:0;transition:opacity 1.9s ease-in-out}
body.is-alt-photo .house-photo picture+picture{opacity:1}
.house-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#34271d66,transparent 43%),linear-gradient(0deg,#36261f90,transparent 51%,#2c221e52)}
.door-shell{position:relative;isolation:isolate;min-height:100svh;padding:0 clamp(20px,3.1vw,54px)}
.door-header{position:relative;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px 0 12px}
.door-brand{display:flex;align-items:center;gap:10px;font:700 clamp(17px,2vw,24px)/1 Georgia,serif;text-shadow:0 2px 10px #231510b0}
.door-brand span{font-size:29px}
.door-tools{display:flex;gap:8px;align-items:center}
.glass-button{
  min-height:44px;padding:.55rem .95rem;border:1px solid #ffedceb3;border-radius:22px;
  color:#fff9f0;background:#503929b3;box-shadow:0 3px 13px #2719093b;
  font-weight:650;font-size:.88rem;white-space:nowrap;
}
.glass-button:hover{background:#743b3b}
#doorMotion{min-width:44px;padding:.45rem}
.shadow-nav{
  position:absolute;left:0;top:50%;transform:translateY(-46%);display:grid;gap:17px;
  width:clamp(111px,11vw,175px);padding:19px 15px;border:1px solid #f9e8cf73;
  border-radius:22px;background:linear-gradient(155deg,#f5e3c748,#6d51487a);
  box-shadow:0 15px 45px #39251654;backdrop-filter:blur(13px);
}
.shadow-nav strong{font:650 .82rem/1.15 system-ui;white-space:nowrap}
.shadow-nav i{display:block;width:80%;height:13px;border-radius:999px;background:#fff2d077;filter:blur(5px)}
.shadow-nav i:nth-of-type(2n){width:61%;background:#eeb4ba85}
.shadow-nav i:nth-of-type(3n){width:92%}
.scene{
  position:relative;z-index:1;display:grid;grid-template-columns:minmax(240px,.78fr) minmax(414px,1.3fr);
  align-items:center;gap:clamp(18px,3.7vw,64px);margin-left:clamp(132px,13vw,210px);
  min-height:calc(100svh - 84px);padding:20px 0 75px;
}
.gift-card,.door-dialog,.activity-dialog{
  color:var(--ink);background:var(--glass);border:1px solid #fff0d6;
  box-shadow:inset 0 0 0 4px #fff3e585,0 14px 54px #3f211b67,0 0 20px #ebb38a33;
  border-radius:30px;text-align:center;
}
.gift-card{
  position:relative;width:min(100%,382px);z-index:2;margin:clamp(60px,18vh,180px) auto 0;
  padding:clamp(18px,3.1vw,43px) 24px 24px;
}
.gift-card::before{
  content:"";position:absolute;inset:9px;border:1px solid #bf846459;border-radius:23px;pointer-events:none;
}
.gift-emblem{display:block;margin:0 auto 8px;color:#af4860;font-size:clamp(2.4rem,6vw,4.6rem);line-height:1;filter:drop-shadow(0 3px 5px #c56e6240)}
h1,h2{font-family:Georgia,"Times New Roman",serif;color:#793748;line-height:1.09;margin:0;text-wrap:balance}
.gift-card h1{font-size:clamp(34px,3.72vw,53px);font-style:italic;font-weight:650;margin:0 0 17px}
p{line-height:1.56;margin:.55rem 0}
.gift-hint{font-size:.9rem;margin:.8rem 0 0}
.primary{
  display:inline-grid;place-items:center;min-height:48px;padding:.65rem 1.2rem;
  border:1px solid #fff3d3;border-radius:15px;color:#fff8ef;background:linear-gradient(#aa5868,#833a4d);
  box-shadow:0 4px 10px #74373639;cursor:pointer;font-weight:720;text-align:center;
}
.primary:hover{background:#783344}
.grove{position:relative;align-self:center;min-width:0;height:clamp(385px,69vh,694px);display:flex;flex-direction:column;justify-content:flex-end}
.tree-illustration{
  position:absolute;pointer-events:none;inset:-2% -5% 1% -8%;z-index:-1;
  background:url("/welcome/tree.webp") center bottom/contain no-repeat;
  filter:drop-shadow(0 9px 10px #2011045c);
}
.tree-halo{
  position:absolute;z-index:-2;pointer-events:none;inset:14% -6% 0 -10%;
  background:radial-gradient(ellipse at 57% 60%,#ffe1a838 0,transparent 63%);
}
.tree-label{
  align-self:center;position:absolute;top:28%;margin-left:10%;z-index:1;
  min-height:44px;padding:.4rem 1.05rem;
  color:#583124;background:linear-gradient(#ffebcd,#f2c9a1);
  border:1px solid #7b4a35;border-radius:14px;box-shadow:0 0 0 3px #fff0c78c,0 5px 17px #30211960;
  font:bold clamp(17px,2vw,24px) Georgia,serif;white-space:nowrap;
}
.tree-label:hover{background:#fff4de}
.tree-mail{position:absolute;inset:26% 10% 23% 1%;pointer-events:none}
.envelope{
  --left:50%;--top:50%;--tilt:0deg;
  position:absolute;left:var(--left);top:var(--top);transform:translate(-50%,-50%) rotate(var(--tilt));
  pointer-events:auto;isolation:isolate;width:68px;height:47px;min-width:44px;min-height:44px;
  padding:0;color:#9c4356;background:#f6dbbe;border:1px solid #9e5d426b;border-radius:5px;
  box-shadow:0 5px 12px #43221674,inset 0 0 5px #fff4cfb0;
  text-align:center;transition:transform .18s,box-shadow .18s;
}
.envelope::before{
  content:"";position:absolute;left:50%;top:-24px;width:22px;height:25px;transform:translateX(-50%);
  border:2px solid #f7dbad;border-radius:72% 67% 7% 0;clip-path:polygon(0 0,100% 0,100% 100%,62% 100%,53% 33%,48% 33%,38% 100%,0 100%);
  filter:drop-shadow(0 1px 1px #402119);
}
.envelope::after{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(150deg,#fff0d5 49%,#b575542b 50%,transparent 52%),linear-gradient(215deg,#f8dbc0 49%,#ae694a36 50%,transparent 52%);
  clip-path:polygon(0 0,100% 0,50% 66%);
}
.envelope span{display:block;font-size:1rem;margin-top:.28rem;text-shadow:0 1px 0 #f5c7bc}
.envelope[data-read="true"]{background:#e9c4a5;color:#865151}
.envelope:hover,.envelope:focus-visible{transform:translate(-50%,-54%) rotate(0deg) scale(1.07);box-shadow:0 6px 20px #fbc799c4}
.tree-footer{
  position:relative;align-self:center;width:min(100%,550px);display:flex;flex-direction:column;gap:8px;
  color:#fffaf0;text-align:center;background:#34251ed9;border:1px solid #ffedcb88;
  border-radius:18px;padding:9px clamp(8px,1.8vw,16px) 10px;box-shadow:0 6px 20px #21171048;
}
.tree-topics,.tree-pages{display:flex;justify-content:center;align-items:center;gap:5px;flex-wrap:wrap}
.tree-topics button,.tree-pages button{
  min-height:42px;border:1px solid transparent;background:none;border-radius:10px;color:#fff9ee;
  padding:.4rem .58rem;font:600 .79rem/1.17 system-ui;
}
.tree-topics button[aria-pressed="true"],.tree-topics button:hover,.tree-pages button:hover{
  color:#3b2821;background:#ffebcf;border-color:#e5bb91;
}
.tree-pages{font-size:.77rem}
.tree-pages button{padding-inline:.5rem;min-width:44px}
.tree-pages button:disabled{opacity:.45}
.petals{z-index:0}
.petal{
  position:absolute;top:-40px;left:var(--x);width:var(--size);height:calc(var(--size)*.72);
  border-radius:72% 34% 62% 36%;background:#f6b0b7;box-shadow:inset 2px 1px #fff4e9a0;
  opacity:var(--opacity);animation:drift var(--duration) var(--delay) linear infinite;
}
@keyframes drift{from{transform:translate3d(0,-40px,0) rotate(0)}to{transform:translate3d(var(--drift),calc(100svh + 80px),0) rotate(340deg)}}
.pets{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:hidden}
.scenic-pet{position:absolute;width:var(--pet-size);height:auto;filter:drop-shadow(0 4px 5px #3d251664);animation:petwander 14s ease-in-out infinite;animation-delay:var(--pet-delay)}
@keyframes petwander{0%,100%{transform:translate(0,0) rotate(-4deg)}50%{transform:translate(var(--pet-trip),-10px) rotate(6deg)}}
.duck{left:36%;bottom:16px;--pet-size:65px;--pet-delay:-1s;--pet-trip:24px}
.cat{right:21%;bottom:18px;--pet-size:76px;--pet-delay:-6s;--pet-trip:22px}
.baby{right:7%;bottom:14px;--pet-size:69px;--pet-delay:-4s;--pet-trip:-18px}
.princess{left:4%;bottom:14px;--pet-size:80px;--pet-delay:-8s;--pet-trip:24px}
.bear-target{
  position:fixed;z-index:4;left:var(--bear-x,21vw);bottom:clamp(13px,2.4vh,35px);
  width:74px;height:70px;padding:0;border:0;background:none;
  transition:left .55s cubic-bezier(.22,.61,.36,1);filter:drop-shadow(0 6px 8px #3822197a);
}
.bear-target img{width:100%;height:100%;object-fit:contain;animation:bearbob 1.8s ease-in-out infinite}
@keyframes bearbob{50%{transform:translateY(-6px) rotate(6deg)}}
.door-dialog,.activity-dialog{
  width:min(460px,calc(100vw - 32px));max-height:min(88vh,720px);max-height:min(88dvh,720px);
  margin:auto;padding:25px clamp(17px,5vw,30px);overflow:auto;
}
.door-dialog::backdrop,.activity-dialog::backdrop{background:#30201f4f}
.door-dialog h1,.activity-dialog h2{font-size:clamp(28px,6vw,39px);margin:.35rem 0 .75rem}
.scene-icon{display:block;font-size:2.15rem;line-height:1;margin:0 auto .5rem}
.love,.status{color:#77364b}
.status{margin:.6rem 0 0;min-height:1.2em;font-size:.86rem}
.status:empty{min-height:0;margin:0}
.door-dialog label{display:block;font-weight:660;line-height:1.45;margin:.55rem 0 .75rem}
.door-dialog input{
  display:block;width:100%;min-height:48px;margin:0 0 .75rem;padding:.7rem .9rem;border:1px solid #9f6274;
  border-radius:11px;background:#fffaf3;color:#4c2932;letter-spacing:.07em;
}
.door-dialog .primary{width:100%}
.moods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:13px 0}
.mood{
  display:grid;justify-items:center;align-content:center;gap:3px;min-height:64px;padding:6px 2px;color:#622e40;
  background:#fff5eb;border:1px solid #d7a9a8;border-radius:12px;font-size:.83rem;
}
.mood span{font-size:1.3rem}
.mood:hover{background:#f5dccf}
.return,.paper-action{
  min-height:44px;border:1px solid transparent;background:none;color:#74364a;
  border-radius:10px;padding:.35rem .7rem;font-weight:660;cursor:pointer;
}
.return{text-decoration:underline;margin:.35rem auto 0}
.paper-action:hover,.return:hover{background:#e9bdba7a}
.activity-dialog{text-align:left;padding-top:16px}
.activity-dialog h2,.activity-dialog .scene-icon{text-align:center}
.dialog-toolbar,.activity-actions{display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap}
.dialog-toolbar{justify-content:flex-end}
.dialog-toolbar button{min-width:44px}
.activity-actions{justify-content:center;margin-top:.65rem}
.letter-body{font-size:1.04rem;line-height:1.7;margin:1rem 0}
.letter-counter{text-align:center;color:#74364a;font-size:.87rem}
.letter-list{list-style:none;margin:.6rem 0;padding:0;display:grid;gap:4px}
.letter-list button{
  display:flex;align-items:center;justify-content:space-between;text-align:left;width:100%;
  min-height:44px;padding:.4rem .6rem;border:0;border-bottom:1px solid #dcb1a85e;border-radius:5px;background:none;color:#56303b;font-weight:620
}
.letter-list button:hover{background:#fbe7dd}
.letter-list small{font-weight:500;margin-left:.6rem;color:#773d4f}
.bear-dialog-pic{width:min(120px,30vw);height:auto;display:block;margin:0 auto}
.bear-pips{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:.75rem 0}
.bear-pips span{width:13px;height:13px;border-radius:50%;border:1px solid #ac727c}
.bear-pips .caught{background:#b15c71}
body.effects-paused .petal,body.effects-paused .scenic-pet,body.effects-paused .bear-target img{animation-play-state:paused}
body.effects-paused .house-photo picture,body.effects-paused .bear-target{transition:none}
@media(max-width:1060px){
  .shadow-nav{width:115px;padding:16px 10px}
  .scene{margin-left:128px;grid-template-columns:minmax(200px,.7fr) minmax(340px,1.15fr);gap:12px}
  .tree-illustration{inset:-1% -3% 1% -5%}
  .tree-footer{width:100%}
}
@media(max-width:760px){
  .door-shell{padding:0 15px}
  .door-header{justify-content:center;padding:15px 0 4px}
  .door-brand,.shadow-nav{display:none}
  .door-tools{max-width:100%;justify-content:center}
  .glass-button{font-size:.83rem;padding-inline:.77rem}
  .scene{margin:0;display:flex;flex-direction:column;align-items:stretch;gap:1px;min-height:0;padding:0 0 78px}
  .gift-card{width:min(86%,348px);margin:clamp(38px,11vh,99px) auto 5px;padding:15px 15px 16px;border-radius:24px}
  .gift-card h1{font-size:clamp(34px,10vw,54px);margin:0 0 10px}
  .gift-card .primary{min-height:44px}
  .gift-emblem{font-size:2.2rem;margin:0 0 5px}
  .gift-hint{font-size:.75rem;margin:.65rem 0 0}
  .grove{align-self:stretch;height:clamp(305px,48vh,435px)}
  .tree-illustration{inset:-5% -15% 5% -11%}
  .tree-label{top:20%;min-height:42px;font-size:17px;margin-left:12%}
  .tree-mail{inset:31% 6% 39% 0}
  .envelope{width:52px;height:44px}
  .envelope::before{height:18px;top:-17px}
  .tree-footer{width:min(100%,425px);padding:4px 4px 5px;border-radius:14px}
  .tree-topics{gap:1px}
  .tree-topics button,.tree-pages button{min-height:40px;font-size:.7rem;padding-inline:.34rem}
  .tree-pages button{min-height:36px}
  .duck{display:none}
  .baby{right:10px;--pet-size:47px;bottom:8px}
  .princess{left:7px;--pet-size:52px;bottom:8px}
  .cat{right:25%;--pet-size:49px;bottom:8px}
  .bear-target{width:54px;height:53px;bottom:11px}
}
@media(max-width:342px){
  .door-shell{padding-inline:11px}
  .tree-topics button{font-size:.64rem;padding-inline:.2rem}
  .envelope{width:47px}
}
@media(prefers-reduced-motion:reduce){
  .petal,.scenic-pet,.bear-target img{animation:none}
  .petal{top:var(--still-y)}
  .house-photo picture,.bear-target,.envelope{transition:none}
}
@media(min-width:761px){.shadow-nav{left:calc(-1 * clamp(132px,13vw,210px))}}
@media(min-width:761px) and (max-width:1060px){.shadow-nav{left:-128px}}
html,.door-shell{overflow-x:clip}
.door-spark{
  position:fixed;z-index:6;pointer-events:none;color:#ffe8b9;
  font:600 20px/1 Georgia,serif;text-shadow:0 0 8px #e38763;
  animation:door-spark .68s ease-out both;
}
@keyframes door-spark{
  from{transform:translate(-50%,-50%) scale(.55);opacity:1}
  to{transform:translate(var(--dx),var(--dy)) rotate(55deg) scale(1.1);opacity:0}
}
.grove[data-tree="1"] .tree-illustration{filter:drop-shadow(0 9px 10px #2011045c) hue-rotate(-12deg) saturate(.80)}
.grove[data-tree="2"] .tree-illustration{filter:drop-shadow(0 9px 10px #2011045c) hue-rotate(16deg) saturate(1.09)}
.grove[data-tree="3"] .tree-illustration{filter:drop-shadow(0 9px 10px #2011045c) hue-rotate(-22deg) saturate(1.17)}
