@font-face{font-family:Wenkai;src:url(assets/letter.woff) format("woff");font-style:normal;font-weight:400;font-display:swap}
:root{color-scheme:light;--cream:#fff8e9;--quiet:#74594e;--line:#b8947c66;--accent:#a34f41;--ink:#4c352f;font-family:Wenkai,"Kaiti SC",KaiTi,serif}
*{box-sizing:border-box}body{margin:0;min-height:100svh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 8% 2%,#fff6e7 0%,transparent 48%),linear-gradient(118deg,#f6e7d8 0%,#f2d8c8 100%);color:var(--ink)}button{font:inherit;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #fdbf82;outline-offset:4px}button:disabled{cursor:default}button[hidden],[hidden]{display:none!important}
.top,footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:min(91%,1380px);margin:auto;position:relative;z-index:2}.top{min-height:78px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;font-size:20px;letter-spacing:.1em}.pixelHeart{display:inline-block;background:#b86050;width:20px;height:17px;clip-path:polygon(0 20%,20% 20%,20% 0,40% 0,50% 17%,60% 0,80% 0,80% 20%,100% 20%,100% 53%,50% 100%,0 53%)}.edition{font-size:15px;letter-spacing:.09em;color:var(--quiet)}main{flex:1;display:grid;align-items:center}
#home{width:min(91%,1380px);margin:auto;display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.8fr);grid-template-rows:auto auto;align-content:center;column-gap:1.4%;padding:clamp(15px,4vh,55px) 0}.intro{grid-column:1;grid-row:1;align-self:end;padding-left:6%}.salute{color:#9f5546;font-size:clamp(18px,1.5vw,24px);margin:0 0 24px}h1,h2,p{font-weight:400}h1{font-size:clamp(48px,5.35vw,89px);line-height:1.2;margin:0;letter-spacing:.04em}h1 em{font-style:normal;position:relative;white-space:nowrap}h1 em:after{content:"";position:absolute;bottom:-7px;left:3%;width:92%;height:6px;background:#c98170;clip-path:polygon(0 60%,39% 15%,86% 0,100% 45%,68% 55%,6% 100%);transform:rotate(-2deg)}.blurb{line-height:1.8;font-size:clamp(17px,1.45vw,23px);color:var(--quiet);margin:25px 0 0}.homeControls{grid-column:1;grid-row:2;align-self:start;padding-left:6%;margin-top:25px}.roomArt{align-self:center;position:relative;grid-column:2;grid-row:1/3;width:100%;min-width:0}.roomArt>img{width:100%;height:auto;display:block;clip-path:polygon(8.85% 33.40%, 11.26% 31.35%, 19.99% 25.88%, 20.05% 22.27%, 21.16% 21.29%, 24.74% 18.85%, 25.46% 18.75%, 25.52% 18.26%, 26.17% 18.26%, 27.21% 17.29%, 28.12% 17.09%, 28.32% 16.60%, 29.04% 16.50%, 29.30% 15.92%, 35.61% 12.40%, 39.32% 9.67%, 41.99% 8.40%, 47.72% 4.39%, 50.52% 3.03%, 50.78% 2.44%, 51.89% 2.44%, 53.19% 3.61%, 53.84% 3.61%, 53.97% 4.20%, 54.62% 4.20%, 54.75% 4.79%, 55.27% 4.79%, 58.79% 7.32%, 60.81% 5.96%, 62.37% 6.35%, 64.13% 7.91%, 64.71% 7.91%, 65.69% 9.08%, 66.28% 9.08%, 68.16% 10.74%, 70.44% 11.82%, 70.64% 12.40%, 71.35% 12.40%, 71.48% 12.99%, 72.20% 12.99%, 72.33% 13.57%, 74.28% 14.36%, 74.35% 14.75%, 74.87% 14.75%, 75.07% 15.23%, 76.56% 15.92%, 78.71% 17.68%, 79.36% 17.68%, 79.43% 18.16%, 80.14% 18.26%, 81.12% 19.34%, 81.71% 19.34%, 81.90% 19.92%, 82.42% 19.92%, 87.57% 23.44%, 87.83% 24.02%, 88.48% 24.02%, 88.61% 24.61%, 90.49% 25.49%, 90.56% 26.76%, 90.56% 64.36%, 90.49% 67.29%, 87.30% 70.12%, 86.59% 70.31%, 86.39% 70.90%, 85.42% 71.48%, 85.29% 72.07%, 84.64% 72.07%, 83.98% 73.14%, 82.62% 73.83%, 81.25% 75.49%, 80.66% 75.49%, 80.53% 76.07%, 79.88% 76.07%, 78.45% 77.73%, 77.02% 78.32%, 76.82% 79.00%, 76.17% 79.00%, 75.46% 80.08%, 73.89% 80.76%, 73.83% 81.25%, 73.11% 81.25%, 72.98% 81.84%, 72.33% 81.84%, 72.20% 82.42%, 71.42% 83.01%, 70.77% 83.01%, 70.57% 83.59%, 68.55% 84.77%, 68.23% 85.35%, 67.71% 85.35%, 67.51% 85.94%, 66.08% 86.52%, 65.95% 87.11%, 64.52% 87.70%, 64.32% 88.28%, 63.74% 88.28%, 63.54% 88.87%, 60.48% 90.72%, 60.35% 91.21%, 59.77% 91.21%, 59.18% 92.19%, 57.49% 92.87%, 56.51% 94.04%, 52.80% 96.48%, 52.60% 96.97%, 52.08% 96.97%, 52.02% 97.46%, 51.37% 97.46%, 50.72% 98.63%, 50.00% 98.63%, 49.93% 99.22%, 49.28% 99.22%, 49.02% 99.80%, 47.98% 99.80%, 47.85% 99.22%, 47.20% 99.22%, 47.07% 98.63%, 45.57% 98.05%, 45.38% 97.46%, 43.82% 96.97%, 43.62% 96.39%, 42.25% 95.80%, 42.06% 95.21%, 39.39% 94.04%, 38.41% 92.87%, 36.98% 92.38%, 36.65% 91.80%, 35.03% 91.11%, 34.83% 90.62%, 34.11% 90.62%, 33.98% 90.04%, 33.33% 90.04%, 33.20% 89.45%, 31.64% 88.87%, 31.58% 88.28%, 30.86% 88.28%, 30.73% 87.70%, 28.97% 87.11%, 28.84% 86.52%, 27.99% 86.52%, 27.86% 85.94%, 26.37% 85.35%, 26.17% 84.77%, 25.52% 84.77%, 25.46% 84.18%, 24.74% 84.18%, 24.61% 83.59%, 23.05% 83.01%, 22.85% 82.42%, 22.27% 82.42%, 22.14% 81.84%, 20.51% 81.25%, 20.31% 80.66%, 18.23% 79.49%, 18.16% 79.00%, 16.41% 78.32%, 16.34% 77.83%, 14.00% 76.56%, 13.15% 75.49%, 12.57% 75.49%, 10.74% 73.73%, 10.09% 73.63%, 10.03% 73.14%, 9.31% 73.05%, 8.92% 72.46%, 8.85% 69.04%)}
.primary,.secondary,.back{border-radius:4px;min-height:44px;padding:10px 23px;font-size:18px;transition:filter .15s,transform .15s}.primary{background:#a54e40;color:#fff8eb;border:1px solid #944838;box-shadow:0 3px 0 #7a3f34}.secondary,.back{background:#fff5e4f2;border:1px solid #ab8370;color:#62453b}button:hover{filter:brightness(1.08)}.primary:active,.secondary:active{transform:translateY(2px)}.hotspot{position:absolute;left:34.8%;top:46.2%;width:9.4%;height:17%;min-width:30px;min-height:44px;background:transparent;border:0;border-radius:30%}.hotspot i{position:absolute;top:5%;right:10%;width:10px;height:10px;background:#fff5bd;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 37%);animation:glint 3.2s ease-in-out infinite}@keyframes glint{0%,75%,100%{opacity:.15;transform:scale(.7)}38%{opacity:1;transform:scale(1.3)}}
.mini{position:absolute;pointer-events:none;isolation:isolate;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;background:linear-gradient(120deg,#b69179,#ead1a6 54%,#c59d76);border-radius:7% 8% 16% 14%;clip-path:polygon(9% 0,79% 3%,96% 22%,99% 89%,93% 100%,3% 97%,0 21%)}#homeMini{left:35.98%;top:52.9%;width:4.44%;height:5.68%}footer{min-height:62px;border-top:1px solid var(--line);font-size:15px;letter-spacing:.04em}.progress,.marks{display:flex;align-items:center;gap:12px}.marks{gap:5px}.marks i{width:8px;height:8px;display:block;background:#fff6e6;border:1px solid #9d7c67;transform:rotate(45deg)}.marks .filled{background:#b96551;border-color:#b96551}footer button{padding:10px 0;border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;color:var(--quiet)}
#bottle{position:relative;isolation:isolate;overflow:hidden;min-height:min(700px,73svh);display:grid;place-items:center}.viewArt{position:absolute;inset:0;overflow:hidden;z-index:-1}.windowArt{position:absolute;inset:0;opacity:.91}.windowArt img{width:100%;height:100%;object-fit:cover;display:block}.viewArt:after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 35%,#fff0d8db,#ecd2babb 55%,#be937b96);backdrop-filter:blur(5px);transition:background .55s,backdrop-filter .55s}#bottle.arrive .viewArt:after{background:#fff1dd16;backdrop-filter:blur(0)}.bottleStage{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:24px 16px 26px;transition:opacity .35s ease}.arrive .bottleStage{opacity:0;pointer-events:none}.jarCaption{text-align:center}.jarCaption h2{font-size:clamp(31px,4vw,47px);margin:0;color:#51362d;text-shadow:0 1px 5px #fff9ec}.jarCaption p{font-size:17px;margin:8px 0 0;color:#543d33;text-shadow:0 1px 3px #fff9ec}.back{position:absolute;left:4.5%;top:16px;font-size:15px;min-height:40px;padding:8px 14px}.jar{width:min(420px,88vw);aspect-ratio:340/280;position:relative;margin:3px 0 1px;filter:drop-shadow(0 9px 8px #26263665)}.glass{width:100%;height:100%;display:block}.random{font-size:16px}.bottleStage #finish{margin:10px 0 0;text-align:center}
dialog{color:var(--cream);background:transparent;padding:0;border:none;max-width:100vw;max-height:100dvh;overflow:auto}dialog::backdrop{background:#523c32ce;backdrop-filter:blur(5px)}.letterShell{width:min(470px,94vw);padding:28px 13px;text-align:center}.row{display:flex;justify-content:center;gap:14px}.bigHeart{width:150px;height:136px;margin:0 auto;filter:drop-shadow(0 8px 6px #17213299)}.bigHeart svg{width:100%;height:100%}#selectView p{font-size:25px;margin:20px 0}.paperContent{position:relative;z-index:1}.paperContent small{color:#84685c;font-size:15px;letter-spacing:.08em}.paperContent h2{font-size:clamp(26px,4vw,37px);margin:24px 0 14px}.paperContent p{line-height:1.85;font-size:clamp(19px,3vw,23px);margin:0;white-space:pre-line}.inkHeart{display:block;margin-top:16px;font-size:28px;text-align:right;color:#ab6054}#paper{position:relative;overflow:hidden;text-align:left;background:#fff1cf;color:#453538;width:100%;padding:clamp(22px,5vw,42px);border-radius:2px 7px 2px 4px;box-shadow:1px 5px 0 #cbb08e,0 12px 40px #0c172c70;perspective:650px;isolation:isolate}.creases{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 49.4%,#a98f6033 49.9%,#fff8e0 50.2%,transparent 52%),linear-gradient(0deg,transparent 49.5%,#ba9f6d38 50%,transparent 50.9%),linear-gradient(43deg,transparent 49.65%,#ac8a5d25 50%,transparent 50.4%)}#paper:after{content:"";position:absolute;right:0;bottom:0;width:23px;height:23px;background:var(--tone);clip-path:polygon(100% 0,100% 100%,0 100%)}.wing,.tip{display:none;position:absolute;inset:0;z-index:3;backface-visibility:hidden;pointer-events:none}.unfolding .wing,.unfolding .tip{display:block}.wing.left{background:var(--tone);transform-origin:0 50%;clip-path:polygon(0 0,64% 50%,0 100%);animation:peelL .75s .15s ease-in-out both}.wing.right{background:var(--shade);transform-origin:100% 50%;clip-path:polygon(100% 0,100% 100%,38% 50%);animation:peelR .75s .32s ease-in-out both}.tip{background:var(--light);transform-origin:50% 0;clip-path:polygon(0 0,100% 0,52% 65%);animation:lift .54s both}.unfolding .paperContent{animation:expose 1.04s ease-out both}@keyframes peelL{to{transform:rotateY(-150deg)}}@keyframes peelR{to{transform:rotateY(150deg)}}@keyframes lift{to{transform:rotateX(130deg)}}@keyframes expose{0%,40%{opacity:0}100%{opacity:1}}#putBack{margin-top:25px}#restart{width:min(360px,90vw);color:var(--ink);background:#fff0db;border:1px solid #b68b72;border-radius:8px;padding:26px}#restart p{line-height:1.6;font-size:19px;margin:0 0 20px}.flying{pointer-events:none;position:fixed;z-index:30;margin:0;filter:drop-shadow(0 4px 3px #2f28253d)}.flying svg{width:100%;height:100%}
@media(max-width:700px){.top{min-height:55px}.brand{font-size:17px}.edition,footer{font-size:14px}#home{width:100%;display:flex;flex-direction:column;align-items:center;padding:22px 0 25px}.intro{align-self:center;padding:0 5%;text-align:center}.salute{margin:0 0 8px;font-size:16px}h1{font-size:clamp(34px,9.6vw,58px)}h1 br{display:none}.blurb{margin:18px 0 0;font-size:16px}.blurb br{display:none}.roomArt{width:min(100%,610px);margin:7px 0 0}.homeControls{padding:0;align-self:center;margin:6px 0 0}footer{min-height:51px}.back{position:static;align-self:flex-start;margin:0 0 13px}.bottleStage{padding:15px 4.5% 22px}.jarCaption p{font-size:16px}.jar{width:min(370px,91vw)}#bottle{min-height:70svh}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-delay:0s!important;transition-duration:0s!important}}
#windowMini{left:28.78%;top:65.4%;width:7.76%;height:10.5%}
.bigHeart,.mini,.wing,.tip{pointer-events:none}

/* A letter in the afternoon light. The illustration keeps its original position
   inside the figure, so the jar hotspot tracks the printed room at any width. */
#home{
  isolation:isolate;position:relative;width:min(92%,1400px);margin:clamp(18px,3.1vh,36px) auto;
  padding:clamp(38px,5vh,66px) 2.7% clamp(31px,4vh,50px);
  grid-template-columns:minmax(265px,.9fr) minmax(0,1.5fr);column-gap:0;
  background:radial-gradient(ellipse at 86% 63%,#f3d8bc99,transparent 56%),linear-gradient(120deg,#fff9ed,#fff1df);
  border:1px solid #d5ad8e94;border-radius:6px;box-shadow:0 11px 28px -20px #87573c,3px 4px 0 -1px #f3dfca,3px 4px 0 #d3ae92;
}
#home::before{content:"";position:absolute;inset:11px;z-index:-1;pointer-events:none;border:1px solid #c38b6840;border-radius:2px}
#home::after{content:"";position:absolute;left:5%;top:0;width:26%;height:4px;background:repeating-linear-gradient(125deg,#bb7965 0 12px,transparent 12px 22px,#91aba5 22px 34px,transparent 34px 47px);opacity:.65}
.top{min-height:67px}.brand{color:#754939}.edition{letter-spacing:.15em;color:#825b4d}
.postmark{position:absolute;right:3.3%;top:-2%;width:57px;height:57px;border:2px solid #b36c53aa;border-radius:50%;display:grid;place-items:center;color:#a26650;transform:rotate(12deg);opacity:.75;pointer-events:none}
.postmark:before{content:"";position:absolute;inset:3px;border:1px dotted currentColor;border-radius:50%}
.postmark:after{content:"";position:absolute;right:83%;top:29%;width:43px;height:14px;border-top:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(-9deg) skewY(-6deg);opacity:.65}
.postmark span{font:italic 24px/1 Georgia,serif;letter-spacing:-2px}
.roomArt:before{content:"";position:absolute;bottom:1%;left:10%;width:82%;height:29%;background:radial-gradient(ellipse,#a6714d39 4%,transparent 69%);z-index:-1}
.roomArt>img{position:relative}.salute{margin-bottom:17px}.intro,.homeControls{padding-left:7%}.blurb{font-size:clamp(16px,1.38vw,22px);line-height:1.85}.homeControls{margin-top:22px}.homeControls .primary{border-radius:6px;padding-inline:27px}
#bottle{margin:14px auto;width:min(94%,1450px);border:1px solid #be977b77;border-radius:8px}
@media(max-width:700px){
 #home{width:calc(100% - 20px);padding:27px 0 24px;margin:12px auto}
 #home:before{inset:6px}.top{min-height:54px}.intro,.homeControls{padding:0 5%}
 .salute{margin:0 0 7px}.blurb{margin-top:14px;line-height:1.72;font-size:16px}.blurb br{display:block}
 .roomArt{width:min(100%,535px);margin:7px auto 1px}.postmark{width:33px;height:33px;right:5%;top:1%}.postmark span{font-size:15px}.postmark:after{width:19px;height:7px}
 .homeControls{margin:9px 0 0}#bottle{width:calc(100% - 18px);margin:9px auto}
}

#paper.blank{min-height:240px}

#bottle{grid-template-columns:minmax(0,1fr)}
.bottleStage{min-width:0}
.jar{width:min(490px,100vw);margin:6px 0 4px;flex:none}
#pieces{position:absolute;inset:0;isolation:isolate}
.glassFront{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.piece,.tiny{
  position:absolute;display:block;aspect-ratio:100/90;border:0;padding:0;background:transparent;
  transform:translate(-50%,-50%) rotate(var(--turn));touch-action:manipulation;
}
.piece{clip-path:polygon(2% 26%,15% 6%,34% 5%,50% 20%,65% 5%,85% 6%,99% 24%,98% 53%,51% 96%,2% 55%)}
.piece[data-state="open"]{transform:translate(-50%,-50%) rotate(var(--turn)) scale(.93);clip-path:polygon(6% 15%,55% 9%,95% 19%,90% 92%,48% 88%,6% 93%)}
.piece svg,.tiny svg{display:block;width:100%;height:100%}
.taken{visibility:hidden}
.piece:focus-visible{z-index:99!important;filter:drop-shadow(0 0 2px #542b1d);outline:none}
.piece:focus-visible svg path:first-child{stroke:#692c1c;stroke-width:5}
@media(hover:hover){
  .piece:hover svg path:first-child{stroke:#864635;stroke-width:3.4}
}
.jarCaption p{margin-inline:auto;max-width:36em}
.paperContent{overflow-y:auto;overscroll-behavior:contain;max-height:calc(100dvh - clamp(44px,10vw,84px) - 138px);overflow-wrap:anywhere}
.letterShell{width:min(510px,95vw);padding-block:16px}
@media(max-width:700px){
  .jar{width:min(470px,112vw)}
  .jarCaption p{min-height:2.65em;max-width:23em;line-height:1.4}
  .bottleStage{padding-bottom:24px}
  .marks{gap:3px}
}
@media(max-width:420px){
  .marks{display:none}
  .letterShell{padding:12px 6px}
  .paperContent h2{margin:16px 0 10px}
  .paperContent p{font-size:19px;line-height:1.75}
}

.topActions,.soundButton,.soundBars{display:flex;align-items:center}
.topActions{gap:clamp(9px,2vw,25px)}
.soundButton{justify-content:center;gap:8px;min-height:42px;padding:5px 13px;border:1px solid #bf9b856b;border-radius:22px;background:#fff8ec;color:#77564a;font-size:15px}
.soundBars{gap:2px;height:16px;align-items:center}
.soundBars i{width:2px;height:6px;background:currentColor;border-radius:1px}
.soundBars i:nth-child(2){height:13px}.soundBars i:nth-child(3){height:9px}
.soundButton[aria-pressed="true"] .soundBars i{animation:musicBeat 1.3s ease-in-out infinite alternate}
.soundButton[aria-pressed="true"] .soundBars i:nth-child(2){animation-delay:-.8s}
@keyframes musicBeat{from{transform:scaleY(.46)}to{transform:scaleY(1)}}
#lake{
  width:min(93%,1450px);margin:clamp(16px,3.5vh,46px) auto;display:grid;
  grid-template-columns:minmax(235px,.74fr) minmax(0,1.65fr);align-items:center;
  isolation:isolate;overflow:hidden;border:1px solid #d0ac8f;border-radius:7px;background:#fff4df;
  box-shadow:0 16px 36px -24px #80583d,2px 4px 0 -1px #f4e1c8,2px 4px 0 #d3ae92;
}
.lakeWords{padding:25px 0 30px clamp(24px,4.1vw,70px);z-index:1}
.lakeWords h1{font-size:clamp(31px,3.5vw,57px);white-space:nowrap;letter-spacing:.015em}
.lakeWords .salute{font-size:17px;color:#82604b;margin-bottom:20px}
.lakeBlurb{line-height:1.85;margin:23px 0;font-size:clamp(16px,1.25vw,21px);color:#624e42}
.lakeArt{position:relative;align-self:center;aspect-ratio:3/2}
.lakeArt img,.lakeArt video{display:block;width:100%;height:100%;object-fit:cover}
.lakeArt video{position:absolute;inset:0}
.lakeArt:after{content:"";position:absolute;inset:0 auto 0 0;width:10%;background:linear-gradient(90deg,#fff4df,transparent);pointer-events:none}
#pickBottle{position:absolute;left:45.57%;top:39.06%;width:25.07%;height:34.67%;border:0;border-radius:30%;background:transparent}
.carriedBottle{z-index:40;position:fixed;pointer-events:none;transform-origin:50% 50%;background:url(assets/erhai.webp) 60.82% 59.8%/399% 288.45% no-repeat;
 clip-path:polygon(1% 89%,10% 43%,16% 34%,28% 27%,31% 23%,28% 14%,36% 10%,37% 2%,43% 0%,66% 5%,83% 12%,84% 18%,89% 23%,89% 29%,85% 38%,90% 36%,94% 39%,93% 44%,89% 47%,98% 66%,99% 75%,88% 81%,82% 80%,80% 94%,75% 99%,39% 100%,12% 96%,3% 93%)}
.homeControls{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.lakeBack{background:transparent;border:0;border-bottom:1px solid #bc9781;padding:5px 0;color:#77564a;font-size:15px;min-height:38px}
.paperContent{max-height:calc(100dvh - clamp(44px,10vw,84px) - 180px)}
@media(max-width:700px){
  .top .edition{display:none}
  #lake{width:calc(100% - 20px);grid-template-columns:1fr;margin:12px auto 22px;align-self:start}
  .lakeArt{grid-row:1;min-width:0}
  .lakeArt:after{inset:auto 0 -1px;width:100%;height:8%;background:linear-gradient(0deg,#fff4df,transparent)}
  .lakeWords{padding:12px 8% 24px}.lakeWords .salute{font-size:15px;margin:0 0 6px}
  .lakeWords h1{font-size:36px}.lakeBlurb{margin:11px 0 15px;line-height:1.62}
  .homeControls{justify-content:center;gap:12px}
}
@media(prefers-reduced-motion:reduce){
  #lakeFilm{display:none}
  .soundButton[aria-pressed="true"] .soundBars i{animation:none}
}

/* The lake illustration and the clickable bottle share the same crop. */
#lake{width:min(93%,1130px);display:block;margin:clamp(12px,2vh,28px) auto;align-self:center}
.lakeFrame{overflow:hidden;aspect-ratio:2.18}
.lakeArt{width:100%;margin-top:-11%}
.lakeArt:after{display:none}
.lakeWords{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px clamp(18px,3.6vw,48px) 18px}
.lakeWords h1{font-size:clamp(24px,2.35vw,35px);line-height:1.35}
.lakeWords .primary{flex-shrink:0}

/* Keep the same framed view while the foreground pile is opened or put away. */
#bottle{width:min(94%,1170px)}
.viewArt:after{pointer-events:none;transition:opacity .5s,backdrop-filter .5s}
#bottle.resting .viewArt:after{opacity:0;backdrop-filter:none}
#bottle.resting .windowArt{opacity:1}
#bottle.resting .bottleStage{visibility:hidden;pointer-events:none}
#roomJar{left:27.9%;top:58.4%;width:11.7%;height:19%;min-width:44px;min-height:44px}
.roomRest{position:absolute;inset:0;pointer-events:none;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:clamp(17px,3vw,40px);background:linear-gradient(0deg,#30201bcb,transparent 27%)}
.roomWelcome{color:#fff6e4;text-shadow:0 1px 4px #40241e}
.roomWelcome p{font-size:clamp(16px,1.5vw,21px);margin:0 0 3px;line-height:1.4}
.roomWelcome h1{font-size:clamp(26px,3.2vw,41px);line-height:1.3}
.roomButtons{display:flex;align-items:center;justify-content:flex-end;gap:18px}
.roomButtons button{pointer-events:auto}
.roomButtons .lakeBack{color:#fff6e4;border-color:#e6c2a2aa;text-shadow:0 1px 4px #40241e}
.roomButtons .primary{background:#fff3de;border-color:#f1ceaa;color:#694437;box-shadow:0 2px 0 #8d6453}
@media(max-width:700px){
  #lake,#bottle{width:calc(100% - 18px)}
  .lakeFrame{aspect-ratio:3/2}
  .lakeArt{margin:0}
  .lakeWords{padding:15px 16px 18px;gap:6px}
  .lakeWords h1{font-size:clamp(20px,5.5vw,28px)}
  .lakeWords .primary,.roomButtons .primary{font-size:16px;padding-inline:18px}
  .roomRest{align-items:flex-start;padding:20px 16px;background:linear-gradient(180deg,#412a2377,transparent 24%),linear-gradient(0deg,#30201b99,transparent 20%)}
  .roomButtons{position:absolute;right:16px;left:16px;bottom:16px;justify-content:space-between}
}
@media(max-width:520px){
  .lakeFrame{position:relative;aspect-ratio:1.04}
  .lakeArt{position:absolute;top:0;height:100%;width:auto;left:52%;transform:translateX(-52%)}
}

/* Give the drifting bottle a moment before the invitation appears. */
#lake:not([hidden]) .lakeWords h1{animation:lakeInvite .8s ease-out .65s backwards}
#lake:not([hidden]) #collect{animation:lakeInvite .7s ease-out 1s backwards}
#collect:focus-visible{animation:none!important}
@keyframes lakeInvite{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}

.srOnly{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(prefers-reduced-motion:reduce){
  #lake:not([hidden]) .lakeWords h1,#lake:not([hidden]) #collect{animation:none}
}

/* The switch sits inside the illustration, with both choices visible on touchscreens. */
.lakeFrame{position:relative}
.periodSwitch{position:absolute;inset:clamp(10px,1.8vw,22px) clamp(10px,1.8vw,22px) auto auto;z-index:2;display:flex;align-items:center;gap:2px;width:max-content;min-width:0;margin:0;padding:3px;border:1px solid #b091767d;border-radius:25px;background:#fff5e7ed;box-shadow:0 2px 8px #4d362719}
.periodSwitch label{position:relative;cursor:pointer}
.periodSwitch input{position:absolute;width:1px;height:1px;opacity:0}
.periodSwitch span{display:flex;align-items:center;justify-content:center;gap:5px;min-height:36px;padding:4px 13px;border-radius:22px;color:#755d50;font-size:16px;white-space:nowrap;transition:background .2s,color .2s}
.periodSwitch i{font:20px/1 Georgia,serif}
.periodSwitch input:checked+span{background:#a14f42;color:#fff9ec}
.periodSwitch input:focus-visible+span{outline:2px solid #944639;outline-offset:2px}
#lakeFilm:not(.ready){opacity:0}
@media(min-width:701px){
  .lakeFrame{aspect-ratio:1.9}
  .lakeArt{margin-top:-1%}
}
@media(max-width:570px){
  .top .brand{white-space:nowrap;flex:none;gap:6px;font-size:16px}
  .periodSwitch{padding:2px}
  .periodSwitch span{min-height:38px;padding:3px 10px;font-size:15px}
}
:root[data-period="night"]{--quiet:#ddc9bd;--ink:#f8e7ce;--line:#a98c7b63;--cream:#fff0db;color-scheme:dark}
[data-period="night"] body{background:radial-gradient(ellipse at 18% 0%,#50404a,transparent 60%),linear-gradient(123deg,#332c38,#42333a 78%,#503a3c)}
[data-period="night"] .brand{color:#f3d5b5}
[data-period="night"] .pixelHeart{background:#db9482}
[data-period="night"] #lake{background:#46343e;border-color:#95756c;box-shadow:0 12px 28px -15px #1b101b,2px 4px 0 -1px #503c41,2px 4px 0 #7e6058}
[data-period="night"] #bottle{border-color:#ad897272}
[data-period="night"] .periodSwitch{background:#312d3dee;border-color:#b49d988f}
[data-period="night"] .periodSwitch span{color:#dfcbd0}
[data-period="night"] .periodSwitch input:checked+span{background:#e4c39d;color:#47303c}
[data-period="night"] .periodSwitch input:focus-visible+span{outline-color:#ffcd99}
[data-period="night"] .primary{background:#ad675c;border-color:#e2b09b;color:#fff7e8;box-shadow:0 3px 0 #613b3d}
[data-period="night"] .roomButtons .primary{background:#f0d8b6;color:#533835}
[data-period="night"] .viewArt:after{background:radial-gradient(ellipse at 50% 42%,#543f58c9,#392e48b8 60%,#261f37b8)}
[data-period="night"] .jarCaption h2,[data-period="night"] .jarCaption p{color:#fff0db;text-shadow:0 1px 3px #2c2234}
[data-period="night"] #bottle.arrive .viewArt:after{background:transparent}
[data-period="night"] .back{background:#423546f0;border-color:#bb998c;color:#ffe7cd}
[data-period="night"] .roomRest{background:linear-gradient(0deg,#2c1d2aca,transparent 31%)}
[data-period="night"] #windowMini{filter:brightness(.79) saturate(.88)}
[data-period="night"] #restart{color:#4d352f}
[data-period="night"] dialog::backdrop{background:#211c2cd9}
[data-period="night"] .carriedBottle{background-image:url(assets/erhai-night.webp)}


#sceneTools{display:flex;align-items:center;gap:8px;flex:none}
#sceneTools .periodSwitch{position:static;inset:auto;gap:1px;padding:2px;box-shadow:none}
#sceneTools .periodSwitch span{min-height:28px;padding:2px 8px;gap:3px;font-size:14px}
#sceneTools .periodSwitch i{font-size:15px}
#sceneTools .periodSwitch input{inset:0;width:100%;height:100%;margin:0;cursor:pointer}
#musicSwitch{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:#fff6e9;color:#846458;padding:7px;position:relative}
#musicSwitch svg{width:100%;height:100%;fill:currentColor}
#musicSwitch path{stroke:currentColor;stroke-width:1.7;fill:none}
#musicSwitch[aria-pressed="false"]:after{content:"";position:absolute;width:17px;height:1.5px;transform:rotate(-47deg);background:currentColor;box-shadow:0 1px #fff6e9}
[data-period="night"] #musicSwitch{background:#352e3c;color:#efd3ba}
[data-period="night"] #musicSwitch[aria-pressed="false"]:after{box-shadow:0 1px #352e3c}
#keptEnvelope{position:absolute;bottom:clamp(14px,2.5vw,32px);left:clamp(14px,2.5vw,32px);display:flex;align-items:center;gap:8px;min-height:40px;border:1px solid #e9ceab99;border-radius:5px;background:#4d312baf;color:#fff2d9;font-size:15px;padding:7px 12px;pointer-events:auto}
.envelopeIcon{display:inline-block;position:relative;width:26px;height:18px;background:linear-gradient(148deg,transparent 48%,#b08b68 49%,#b08b68 54%,transparent 55%) left top/51% 72% no-repeat,linear-gradient(212deg,transparent 48%,#b08b68 49%,#b08b68 54%,transparent 55%) right top/51% 72% no-repeat,#f4dcb1;border:1px solid #ac8466;border-radius:2px}
.envelopeIcon:after{content:"";position:absolute;left:10px;top:7px;width:5px;height:5px;transform:rotate(45deg);background:#ad5e48}
.roomWelcome{position:absolute;top:clamp(18px,3vw,38px);left:clamp(18px,3vw,38px)}
.roomRest{justify-content:flex-end;background:linear-gradient(180deg,#32201965,transparent 23%),linear-gradient(0deg,#30201ba8,transparent 20%)}
#roomRest .roomButtons{align-self:flex-end}
#welcomeNote{width:min(442px,calc(100vw - 30px));padding:12px 8px 17px;overflow-y:auto;overscroll-behavior:contain;text-align:center}
#welcomeNote[open] .welcomePocket{animation:lakeInvite .4s ease-out both}
.welcomePocket{position:relative;isolation:isolate;padding:0 12px 20px;margin:0 0 12px}
.welcomePocket:before{content:"";position:absolute;z-index:-1;bottom:0;inset-inline:0;height:53%;background:#c99872;border:1px solid #bd8768;border-radius:4px}
.welcomePaper{position:relative;color:#523a32;text-align:left;padding:clamp(20px,5vw,35px) clamp(18px,5vw,33px) 52px;background:repeating-linear-gradient(0deg,transparent 0 28px,#bc96761a 28px 29px),#fff4df;border:1px solid #cfac89;box-shadow:2px 2px 0 #debc97;border-radius:3px;transform:rotate(-.7deg)}
.welcomePaper h2{margin:0 0 .7em;font-size:clamp(25px,4vw,31px)}
.welcomePaper h2:focus{outline:0}
.welcomePaper p{font-size:clamp(17px,3vw,20px);line-height:1.8;margin:0 0 .6em}
.pocketFace{position:absolute;bottom:0;inset-inline:0;height:58px;background:linear-gradient(164deg,transparent 49.2%,#bb8d6d 50%,#f0cdaa 51%) left/50.1% 100% no-repeat,linear-gradient(196deg,transparent 49.2%,#bb8d6d 50%,#f0cdaa 51%) right/50.1% 100% no-repeat;filter:drop-shadow(0 2px 1px #58372c30)}
.pocketFace i{position:absolute;bottom:2px;left:50%;transform:translateX(-50%) rotate(-9deg);color:#aa5346;font:24px/1 Georgia,serif}
#welcomeNote .primary{font-size:16px}
@media(max-width:700px){
 #sceneTools{gap:5px}.roomButtons{right:13px;left:auto;bottom:14px}
 .roomButtons .lakeBack{position:absolute;bottom:calc(100% + 5px);right:0;white-space:nowrap;font-size:14px}
 #keptEnvelope{left:13px;bottom:14px;font-size:14px}
}
@media(max-width:370px){.top .brand{gap:5px;font-size:16px;white-space:nowrap}}
