/* ───────── WRITES · 小屋：纸与墨 ───────── */
:root{
  /* 被天光（不是灯）照着的纸：更白、更冷一点 */
  --day-paper:radial-gradient(130% 130% at 16% 6%,#FFFEF8 0,#FCF6E8 46%,#F3E8D2 100%);
}

/* ── 屋里：每样东西一张小纸签 ── */
.wroom .mark{--fg:34,24,14}
.wroom .mark .dot{border-color:#FFF9EC;background:rgba(46,26,10,.42);box-shadow:0 0 0 1px rgba(60,34,12,.25)}
.wroom .mark .ring{border-color:rgba(255,249,236,.85)}
.wroom .mark.chip .lab{background:#FCF5E6;box-shadow:0 .5rem 1.4rem rgba(70,40,12,.34),0 0 0 1px rgba(90,60,30,.1);backdrop-filter:none;-webkit-backdrop-filter:none}
.wroom .mark.chip .lab::before{background:#FFF9EC;box-shadow:0 0 .3rem rgba(60,34,12,.5)}
.wroom .mark .lab b{color:#1E140A}
.wroom .mark .lab span{color:rgba(38,26,14,.62)}
.wroom .mark.on .lab{background:#FFFDF6}
.wroom[data-mode=about] .mark,.wroom[data-mode=zen] .mark{opacity:0;visibility:hidden}

/* 「关于」：夹在本子里的一页纸 */
.wletter{position:absolute;left:50%;top:50%;width:34rem;--fg:38,26,14;color:rgb(var(--fg));opacity:0;visibility:hidden;transform:translate(-50%,-44%) rotate(-.7deg) scale(.94);transition:opacity .6s var(--ease),transform 1s var(--ease),visibility .6s;filter:drop-shadow(0 2.4rem 3rem rgba(40,20,5,.5)) drop-shadow(0 .2rem .4rem rgba(40,20,5,.3));user-select:text;-webkit-user-select:text}
.wroom[data-mode=about] .wletter{opacity:1;visibility:visible;transform:translate(-50%,-50%) rotate(-.7deg)}
.wletter .bg{position:absolute;inset:0;overflow:hidden}
.wletter .lit{background:var(--day-paper)}
.wletter .grain{opacity:.8}
.wletter .in{position:relative;padding:3.2rem 3.8rem 2.7rem}
.wletter .hd{display:flex;align-items:center;gap:.9rem;font-family:var(--f-mono);font-size:.58rem;letter-spacing:.3em;color:rgba(var(--fg),.55)}
.wletter .hd i{flex:1;height:1px;background:rgba(var(--fg),.22)}
.wletter h3{margin:1.5rem 0 1.2rem;font-family:var(--f-song);font-weight:900;font-size:2.1rem;letter-spacing:.26em;color:#1E140A}
.wletter p{margin-top:.75rem;font-family:var(--f-song);font-size:1.02rem;line-height:2.2;letter-spacing:.09em;text-align:justify;color:rgba(var(--fg),.92)}
.wletter h3+p{font-weight:700;font-size:1.16rem;line-height:2.1;color:#1E140A}
.wletter .ft{display:flex;justify-content:space-between;align-items:center;margin-top:1.9rem;padding-top:1.1rem;border-top:1px solid rgba(var(--fg),.22);font-family:var(--f-kai);font-size:1.02rem;letter-spacing:.24em}
.wletter .ft a{display:inline-flex;gap:.5rem;align-items:center;font-family:var(--f-sans);font-size:.7rem;letter-spacing:.3em;color:#9A3A22}
.wletter .ft svg{width:.62rem;height:.62rem}

/* 吉他：拨一下，弦在抖，冒一个音符 */
.twang{width:0;height:0;pointer-events:none;color:#FFF6E2}
.twang i{position:absolute;left:1.1rem;top:-5.6rem;width:1px;height:9.5rem;background:linear-gradient(180deg,transparent,rgba(255,244,214,.95) 22%,rgba(255,244,214,.95) 78%,transparent);opacity:0;transform-origin:50% 50%}
.twang i:nth-child(2){left:1.5rem}.twang i:nth-child(3){left:1.9rem}
.twang b{position:absolute;left:3.6rem;top:-4.2rem;font-family:var(--f-song);font-weight:700;font-size:1.7rem;opacity:0;text-shadow:0 0 1rem rgba(60,30,0,.8)}
.twang.go i{animation:twang .9s ease-out}
.twang.go i:nth-child(2){animation-delay:.04s}.twang.go i:nth-child(3){animation-delay:.08s}
.twang.go b{animation:note 1.5s var(--ease)}
@keyframes twang{0%{opacity:1;transform:scaleX(7)}20%{transform:translateX(.14rem) scaleX(4)}40%{transform:translateX(-.11rem) scaleX(3)}60%{transform:translateX(.07rem) scaleX(2)}80%{opacity:.7;transform:translateX(-.03rem)}100%{opacity:0;transform:none}}
@keyframes note{0%{opacity:0;transform:translateY(.6rem) rotate(-8deg)}18%{opacity:1}100%{opacity:0;transform:translateY(-3.4rem) rotate(10deg)}}
.shot .twang *{animation:none !important}

/* 看海：界面全部退场 */
.zen-tip{position:absolute;left:50%;bottom:2.6rem;transform:translateX(-50%);font-family:var(--f-sans);font-size:.7rem;letter-spacing:.5em;margin-right:-.5em;color:rgba(255,246,230,.72);opacity:0;transition:opacity 1.6s var(--ease);text-shadow:0 0 1rem rgba(40,20,0,.7)}
.wroom[data-mode=zen] .zen-tip{opacity:1}

/* ── 桌面：整张纸就是目录 ── */
.wdesk .mark .dot{border-color:#2A1C10;background:rgba(255,250,238,.5)}
.wdesk .mark .ring{border-color:rgba(42,28,16,.45)}
.wdesk .mark.chip .lab{background:#FCF5E6;box-shadow:0 .5rem 1.2rem rgba(70,40,12,.26),0 0 0 1px rgba(90,60,30,.1);backdrop-filter:none;-webkit-backdrop-filter:none}
.wdesk .mark.chip .lab::before{background:#2A1C10}
.wdesk:not([data-mode=list]) .mark{opacity:0;visibility:hidden}
.wpage,.wfold{position:absolute;left:0;top:0;--fg:34,24,14;color:rgb(var(--fg));padding:3.5em 3.7em 3em;display:flex;flex-direction:column;transition:opacity .6s var(--ease),visibility .6s}
.wpage .hd{display:flex;align-items:center;gap:.9em;padding-bottom:1.15em;border-bottom:1px solid rgba(var(--fg),.82)}
.wpage .hd .sigil{width:2.5em;height:1.25em;color:rgba(var(--fg),.9)}
.wpage .hd b{font-family:var(--f-geo);font-weight:500;font-size:.68em;letter-spacing:.56em}
.wpage .hd span{margin-left:auto;font-family:var(--f-mono);font-size:.56em;letter-spacing:.2em;color:rgba(var(--fg),.55)}
.wpage h2{margin-top:1.5em;font-family:var(--f-song);font-weight:900;font-size:1.4em;line-height:1.8;letter-spacing:.12em;color:#1E140A;white-space:nowrap}
.wpage .sec{display:flex;align-items:center;gap:.8em;margin-top:2.5em;padding-bottom:.75em}
.wpage h2+.sec{margin-top:2.7em}
.wpage .sec b{font-family:var(--f-song);font-weight:900;font-size:.9em;letter-spacing:.44em}
.wpage .sec span{font-family:var(--f-mono);font-size:.5em;letter-spacing:.3em;color:rgba(var(--fg),.5)}
.wpage .sec i{flex:1;height:1px;background:rgba(var(--fg),.2)}
.wpage .sec em{font-style:normal;font-family:var(--f-mono);font-size:.58em;letter-spacing:.14em;color:#9A3A22}
.wpage .row{display:block;width:100%;position:relative;padding:1.05em 0 1.1em;border-top:1px solid rgba(var(--fg),.14);color:inherit;transition:padding .5s var(--ease)}
.wpage .row .d{display:flex;gap:1.3em;align-items:baseline;font-family:var(--f-mono);font-size:.54em;letter-spacing:.18em;color:rgba(var(--fg),.56)}
.wpage .row .d em{font-style:normal;font-family:var(--f-sans);letter-spacing:.22em}
.wpage .row .t{display:flex;align-items:center;gap:1em;margin-top:.5em}
.wpage .row .t b{font-family:var(--f-song);font-weight:700;font-size:1.16em;letter-spacing:.08em;line-height:1.5;color:#1E140A;background:linear-gradient(#B8321F,#B8321F) 0 100% / 0 1px no-repeat;transition:background-size .6s var(--ease);padding-bottom:.12em}
.wpage .row .t svg{width:1.7em;height:.68em;margin-left:auto;flex:none;color:#B8321F;opacity:0;transform:translateX(-.7em);transition:opacity .4s,transform .5s var(--ease)}
.wpage .row .q{margin-top:.5em;font-family:var(--f-kai);font-size:.82em;letter-spacing:.07em;line-height:1.8;color:rgba(var(--fg),.64)}
.wpage .row::before{content:"";position:absolute;left:-1.5em;top:2.3em;width:.46em;height:.46em;background:#B8321F;transform:rotate(45deg) scale(0);transition:transform .4s var(--ease)}
.wpage .row.on{padding-left:.5em}
.wpage .row.on::before{transform:rotate(45deg) scale(1)}
.wpage .row.on .t b{background-size:100% 1px}
.wpage .row.on .t svg{opacity:1;transform:none}
.wpage .ft{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;font-family:var(--f-kai);font-size:.98em;letter-spacing:.34em;color:rgba(var(--fg),.78)}
.seal{width:2.5em;height:2.5em;padding:.2em;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#B8321F;border-radius:.18em;opacity:.9;transform:rotate(-2deg);box-shadow:inset 0 0 0 .1em #B8321F,inset 0 0 0 .15em rgba(255,236,206,.75)}
.seal span{font-family:var(--f-kai);font-size:.84em;line-height:1.1;letter-spacing:0;color:#FFEBCB}
.wdesk[data-mode=notes] .wpage{opacity:.42}
/* 卡片抽出来的时候，后面那张目录只是背景：点它 = 把卡片放回去 */
.wdesk[data-mode=notes] .wpage,.wdesk[data-mode=notes] .wpage *{pointer-events:none}
.wdesk[data-mode=boat] .wpage{opacity:0;visibility:hidden}

/* 笔记：从木盒里抽出来的索引卡 */
.wnotes{width:0;height:0;opacity:0;visibility:hidden;transition:opacity .5s var(--ease),visibility .5s;--fg:38,26,14;color:rgb(var(--fg))}
.wdesk[data-mode=notes] .wnotes{opacity:1;visibility:visible}
.wnotes .nc{position:absolute;left:-8.5rem;top:-15.5rem;width:21rem;height:13.6rem;overflow:hidden;border-radius:.16rem;box-shadow:0 1.5rem 2.6rem rgba(60,34,10,.42),0 .1rem .3rem rgba(60,34,10,.3);color:inherit;transition:transform .9s var(--ease);transform:translate(4rem,9rem) rotate(0) scale(.7)}
.wnotes .nc .lit{background:var(--day-paper)}
.wnotes .nc .rule{position:absolute;inset:0;background:linear-gradient(#C7493A,#C7493A) 0 3.55rem / 100% 1px no-repeat,repeating-linear-gradient(0deg,transparent 0 1.74rem,rgba(60,110,165,.2) 1.74rem calc(1.74rem + 1px));background-position:0 3.55rem,0 3.6rem}
.wdesk[data-mode=notes] .nc.b2{transform:translate(2.6rem,-1.5rem) rotate(8deg)}
.wdesk[data-mode=notes] .nc.b1{transform:translate(1.3rem,-.7rem) rotate(3.6deg)}
.wdesk[data-mode=notes] .nc.f{transform:rotate(-2.4deg)}
.wnotes .in{position:absolute;inset:0;padding:1.5rem 1.8rem}
.wnotes .k{display:flex;align-items:center;gap:.8rem;height:2rem;font-family:var(--f-mono);font-size:.58rem;letter-spacing:.26em;color:rgba(var(--fg),.56)}
.wnotes .k b{font-weight:400;color:#9A3A22}
.wnotes .k em{font-style:normal;margin-left:auto}
.wnotes h4{margin-top:.85rem;font-family:var(--f-song);font-weight:900;font-size:1.66rem;letter-spacing:.18em;line-height:1.74rem;padding:.4rem 0 .5rem;color:#1E140A}
.wnotes p{margin-top:.6rem;font-family:var(--f-kai);font-size:.92rem;line-height:1.74rem;letter-spacing:.07em;color:rgba(var(--fg),.72)}
.wnotes .go{position:absolute;right:1.8rem;bottom:1.25rem;display:flex;align-items:center;gap:.5rem;font-family:var(--f-sans);font-size:.7rem;letter-spacing:.3em;color:#9A3A22}
.wnotes .go svg{width:.62rem;height:.62rem}

/* 留一句话：写在整张纸上，折成船 */
.wfold{opacity:0;visibility:hidden;align-items:stretch}
.wdesk[data-mode=boat] .wfold{opacity:1;visibility:visible}
.wfold .creases{position:absolute;inset:0;width:100%;height:100%;color:rgba(120,80,40,.34)}
.wfold .hd{position:relative;display:flex;align-items:center;gap:1em;padding-bottom:1.15em}
.wfold .hd b{font-family:var(--f-song);font-weight:900;font-size:1.06em;letter-spacing:.5em;color:#1E140A}
.wfold .hd i{flex:1;height:1px;background:rgba(var(--fg),.3)}
.wfold .hd span{font-family:var(--f-sans);font-size:.62em;letter-spacing:.34em;color:rgba(var(--fg),.6)}
.wfold .field{position:relative;margin-top:7.6em}
.wfold textarea{display:block;width:100%;height:4.65em;border:0;outline:0;resize:none;background:none;font-family:var(--f-kai);font-size:2em;line-height:1.55em;letter-spacing:.12em;text-align:center;color:#1E140A;caret-color:#B8321F;cursor:text;user-select:text;-webkit-user-select:text;overflow:hidden}
.wfold textarea::placeholder{color:rgba(60,40,20,.34)}
.wfold .cnt{margin-top:.9em;text-align:center;font-family:var(--f-mono);font-size:.6em;letter-spacing:.24em;color:rgba(var(--fg),.5)}
.wfold .cnt b{font-weight:400;color:#9A3A22}
.wfold .act{position:relative;margin-top:auto;display:flex;align-items:center;gap:1.6em}
.wfold .act img{width:8.4em;height:8.4em;object-fit:contain;margin:-1.6em 0 -1.4em -.8em;filter:drop-shadow(0 .7em .7em rgba(70,40,10,.3))}
.wfold .go,.wpost .go{display:inline-flex;align-items:center;gap:1em;padding:.8em 1.5em .8em 1.6em;font-family:var(--f-sans);font-weight:500;font-size:.8em;letter-spacing:.42em;background:#1E140A;color:#FDF3DC;border:1px solid #1E140A;transition:background .3s,border-color .3s}
.wfold .go svg{width:1.6em;height:.64em}
.wfold .go:hover,.wpost .go:hover{background:#B8321F;border-color:#B8321F}
.wfold .act p{margin-top:.9em;font-family:var(--f-sans);font-size:.64em;letter-spacing:.2em;line-height:1.8;color:rgba(var(--fg),.6)}
.wfold .done{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:1.4em}
.wfold .done img{width:15em;height:15em;object-fit:contain;filter:drop-shadow(0 1.2em 1.2em rgba(70,40,10,.32))}
.wfold .done p{font-family:var(--f-song);font-weight:900;font-size:1.5em;letter-spacing:.4em;margin-right:-.4em;color:#1E140A}
.wdesk.folded .wfold>:not(.done){visibility:hidden}
.wdesk.folded .wfold .done{display:flex}

/* ── 一篇文章 ── */
.wpost{position:absolute;inset:0;--fg:29,27,24;color:rgb(var(--fg));pointer-events:auto;user-select:text;-webkit-user-select:text}
.wpost.is-night{--fg:226,218,202}
.wpost .rail{position:absolute;left:12.6rem;top:8.4rem;bottom:8.4rem;writing-mode:vertical-rl;display:flex;align-items:center;gap:1.1rem;font-family:var(--f-sans);font-size:.68rem;letter-spacing:.56em;color:rgba(var(--fg),.56)}
.wpost .rail i{flex:1;width:1px;background:rgba(var(--fg),.2)}
.wpost .rail span:first-child{font-family:var(--f-geo);font-weight:500;color:rgba(var(--fg),.86)}
.wpost article{position:absolute;left:25.5rem;top:7.3rem;width:40rem}
.wpost .meta{display:flex;gap:1.5rem;align-items:center;font-family:var(--f-mono);font-size:.68rem;letter-spacing:.24em;color:rgba(var(--fg),.6)}
.wpost .meta b{font-weight:400;color:#9A3A22}
.wpost .meta span{font-family:var(--f-sans);letter-spacing:.3em}
.wpost.is-night .meta b{color:#E8A070}
.wpost h1{margin-top:1.4rem;font-family:var(--f-song);font-weight:900;font-size:3.5rem;line-height:1.38;letter-spacing:.08em;color:rgb(var(--fg))}
.wpost h1 span{display:block;white-space:nowrap}
.wpost h1 span:first-child{text-indent:-.5em}
.wpost .by{margin-top:1.5rem;display:flex;align-items:center;gap:1rem;font-family:var(--f-sans);font-size:.74rem;letter-spacing:.32em;color:rgba(var(--fg),.62)}
.wpost .by i{width:2.4rem;height:1px;background:#B8321F}
.wpost .by span+span::before{content:"·";margin-right:1rem;opacity:.5}
.wpost blockquote{position:relative;margin-top:3rem;font-family:var(--f-song);font-weight:700;font-size:1.6rem;line-height:2.05;letter-spacing:.1em;text-align:justify}
.wpost blockquote::before{content:"";position:absolute;left:-2.2rem;top:.82rem;bottom:.82rem;width:.16rem;background:#B8321F}
.wpost .ph{margin-top:2.5rem;display:flex;gap:1.2rem;align-items:baseline;padding:1.15rem 1.4rem;border:1px dashed rgba(var(--fg),.32);font-family:var(--f-sans);font-size:.8rem;letter-spacing:.12em;line-height:1.95;color:rgba(var(--fg),.62)}
.wpost .ph b{flex:none;padding:.1rem .6rem;border:1px solid rgba(var(--fg),.42);font-weight:500;font-size:.64rem;letter-spacing:.3em;color:rgba(var(--fg),.8)}
/* 页边的摘句：像用铅笔抄在旁边的一句 */
.wpost aside{position:absolute;left:calc(100% + 4.6rem);top:21.6rem;width:11.5rem;padding-left:1.2rem;border-left:1px solid rgba(var(--fg),.24)}
.wpost aside b{display:block;font-family:var(--f-sans);font-weight:400;font-size:.62rem;letter-spacing:.5em;color:#9A3A22}
.wpost.is-night aside b{color:#E8A070}
.wpost aside p{margin-top:.7rem;font-family:var(--f-kai);font-size:1.02rem;line-height:1.95;letter-spacing:.08em;color:rgba(var(--fg),.78)}
.wpost .end{margin-top:2.7rem;display:flex;align-items:center;gap:2.2rem;white-space:nowrap}
.wpost .go{font-size:.78rem}
.wpost .go svg{width:.66rem;height:.66rem}
.wpost.is-night .go{background:#E8DCC4;border-color:#E8DCC4;color:#14161A}
.wpost .nx{display:flex;align-items:baseline;gap:.9rem;color:rgba(var(--fg),.7);transition:color .3s}
.wpost .nx span{font-family:var(--f-sans);font-size:.66rem;letter-spacing:.34em;color:rgba(var(--fg),.5)}
.wpost .nx b{font-family:var(--f-song);font-weight:700;font-size:.98rem;letter-spacing:.1em;border-bottom:1px solid rgba(var(--fg),.3);padding-bottom:.15rem}
.wpost .nx svg{width:1.4rem;height:.56rem;color:#B8321F;transition:transform .4s var(--ease);align-self:center}
.wpost .nx:hover{color:rgb(var(--fg))}
.wpost .nx:hover svg{transform:translateX(.3rem)}
/* 读到哪里，茶就凉到哪里 */
.wpost .tea{position:absolute;right:12.6rem;bottom:8.4rem;display:flex;flex-direction:column;align-items:center;gap:.7rem;color:rgba(var(--fg),.72)}
.wpost .tea svg{width:2.6rem;height:2.86rem}
.wpost .tea span{font-family:var(--f-sans);font-size:.64rem;letter-spacing:.4em;margin-right:-.4em;color:rgba(var(--fg),.56)}
.wpost .tea .s1,.wpost .tea .s2,.wpost .tea .s3{animation:steam 3.6s ease-in-out infinite}
.wpost .tea .s2{animation-delay:-1.2s}.wpost .tea .s3{animation-delay:-2.4s}
@keyframes steam{0%{opacity:0;transform:translateY(3px)}40%{opacity:.9}100%{opacity:.75;transform:translateY(-1px)}}
.wpost .night{position:absolute;right:12.6rem;top:8.4rem;writing-mode:vertical-rl;display:flex;align-items:center;gap:.8rem;font-family:var(--f-sans);font-size:.68rem;letter-spacing:.56em;color:rgba(var(--fg),.6);transition:color .3s}
.wpost .night i{width:.62rem;height:.62rem;border-radius:50%;box-shadow:inset -.2rem -.06rem 0 0 currentColor}
.wpost .night:hover{color:rgb(var(--fg))}

@media (orientation:portrait){
  .wletter{width:21.4rem}
  .wletter .in{padding:2.2rem 1.9rem 1.8rem}
  .wletter h3{font-size:1.7rem;margin:1.1rem 0 .8rem}
  .wletter p{font-size:.94rem;line-height:2}
  .wletter h3+p{font-size:1.02rem;line-height:2}
  .wpage,.wfold{left:1.1rem;right:1.1rem;top:4.6rem;bottom:4.6rem;width:auto;height:auto;font-size:.66rem;padding:2.4em 1.2em 2em}
  .wpage h2{font-size:1.5em;letter-spacing:.1em}
  .wpage .row::before{left:-.9em}
  .wnotes{left:50%;top:56%}
  .wnotes .nc{left:-9.5rem;top:-6.3rem;width:19rem;height:12.6rem}
  .wdesk .mark{display:none}
  .wpage .ft{align-items:center}
  .wpage .leave{display:inline-flex;align-items:center;gap:.6em;margin-left:auto;margin-right:1.4em;font-family:var(--f-sans);font-size:.92em;letter-spacing:.3em;color:#9A3A22}
  .wpage .leave svg{width:1.6em;height:.64em}
  .wfold .field{margin-top:5em}
  .wpost .rail{display:none}
  .wpost article{left:1.6rem;right:1.6rem;width:auto;top:5.4rem}
  .wpost h1{font-size:2.3rem;text-indent:0}
  .wpost blockquote{font-size:1.14rem;margin-top:2rem;line-height:2}
  .wpost blockquote::before{left:-.9rem}
  .wpost aside{position:static;width:auto;margin-top:1.6rem}
  .wpost .ph{flex-direction:column;gap:.6rem;font-size:.74rem;margin-top:1.6rem}
  .wpost .end{flex-direction:column;align-items:flex-start;gap:1.3rem;margin-top:2rem}
  .wpost .tea{display:none}
  .wpost .night{display:flex;writing-mode:horizontal-tb;right:1.4rem;top:auto;bottom:1.2rem;font-size:.66rem;letter-spacing:.3em}
}
