@font-face{font-family:Instrument;src:url("./instrumentserif-regular.ttf") format("truetype");font-display:swap}
@font-face{font-family:Instrument;src:url("./instrumentserif-italic.ttf") format("truetype");font-style:italic;font-display:swap}
:root{color-scheme:light;--ink:#243e36;--soft:#4d5d4d;--pine:#315747;--paper:#f6e8cf;--serif:Instrument,"Iowan Old Style",Georgia,serif;--sans:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font:100%/1.45 var(--sans);color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit;color:inherit}a{color:inherit;text-decoration:none}button{cursor:pointer;border:0;background:none;padding:0}button,a{touch-action:manipulation}button:disabled{opacity:.65}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #805829;outline-offset:3px;border-radius:3px}
[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.landscape{position:fixed;inset:0;pointer-events:none;background:#efe1c6 url("./dawn.webp") 74% 51%/cover no-repeat;z-index:0}
.landscape:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#fff6e842 0%,#fff6e83d 36%,#fff6e800 62%,#193e3926 100%)}
.app{position:relative;z-index:1;min-height:100vh;min-height:100svh;height:100dvh;display:flex;flex-direction:column;padding:max(env(safe-area-inset-top),14px) max(env(safe-area-inset-right),22px) max(env(safe-area-inset-bottom),14px) max(env(safe-area-inset-left),22px)}
header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.brand,.journal-link{display:inline-flex;align-items:center;min-height:44px;gap:7px}
.brand{font:1.77rem/1 var(--serif);letter-spacing:-.035em}.brand img{width:30px;height:30px}
.journal-link{font-size:.91rem;font-weight:520}.journal-link svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
main{flex:1;min-height:0;display:flex}.scene{flex:1;min-width:0;text-align:center;padding-top:clamp(10px,6.7svh,68px)}
h1{margin:0;font:400 clamp(3.1rem,15vw,5rem)/.95 var(--serif);letter-spacing:-.03em;overflow-wrap:anywhere;outline:none}
h1 em,#change,#custom{font-style:italic;color:var(--pine)}
#moods{max-width:290px;display:flex;flex-wrap:wrap;gap:0 17px;justify-content:center;margin:22px auto 0}
.mood{display:inline-flex;align-items:center;gap:6px;min-height:44px;font:1.28rem var(--serif);padding:0 2px}
.mood:before{content:"";background:var(--tone);width:7px;height:7px;border-radius:45% 65% 48% 53%;box-shadow:0 0 0 1px #3a483419}
.mood:nth-child(1){--tone:#907690}.mood:nth-child(2){--tone:#7795a1}.mood:nth-child(3){--tone:#c67857}.mood:nth-child(4){--tone:#85857d}.mood:nth-child(5){--tone:#7c9067}.mood:nth-child(6){--tone:#c6923e}
.text-btn,.low-link,.ink{min-height:44px;display:inline-flex;align-items:center;justify-content:center;font-size:.94rem;font-weight:510}
.text-btn{color:var(--soft);text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:#54625166;text-underline-offset:4px;padding:0 5px}
.own-word{margin-top:4px}
.low-link{position:absolute;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);white-space:nowrap;color:#fff6df;text-shadow:0 1px 4px #142a23,0 0 10px #142a23;background:radial-gradient(ellipse,#16392e65,transparent 72%);padding:0 20px}
.ink{padding:0 23px;border-radius:26px;background:var(--pine);color:#fff8e7}.actions{display:flex;justify-content:center;align-items:center;gap:19px;flex-wrap:wrap;margin-top:15px}
.lead{margin:0 0 6px;font:1.38rem var(--serif);color:var(--soft)}
#change{font-family:var(--serif);line-height:1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:#70836966;text-underline-offset:7px}
#custom,textarea{display:block;border:0;background:transparent;text-align:inherit;width:min(100%,440px);margin-inline:auto;resize:none;appearance:none}
#custom{font:italic clamp(2.4rem,11vw,4rem)/1.15 var(--serif);padding:0 4px}
textarea{font:1.32rem/1.35 var(--serif);padding:3px 2px;min-height:58px;max-height:110px;margin-top:20px;border-bottom:1px solid #53614c50}
textarea::placeholder,#custom::placeholder{color:#5a634e;opacity:1}
.sub,.fine{color:var(--soft);margin:14px auto;max-width:35ch}.sub{font:1.3rem/1.35 var(--serif)}.fine{font-size:.87rem}.error{color:#823726;margin:7px 0 0;font-size:.92rem}
.water{position:absolute;left:0;right:0;height:24%;bottom:8%;overflow:hidden;pointer-events:none;display:grid;place-items:center}
.floating-word{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;max-width:min(78%,430px);text-align:center;overflow-wrap:anywhere;padding:7px 17px 10px;background:#f4e4bbf5;border-radius:65% 5% 55% 8% / 30% 25% 30% 18%;font:italic 1.55rem/1.15 var(--serif);box-shadow:0 3px 8px #25433432}
.swap{margin-top:6px}
body:is([data-view=journal],[data-view=entry],[data-view=confirm]) .landscape:after{background:linear-gradient(180deg,#fbefdaee 0%,#fbefdcee 53%,#fbefdcbb 84%,#fbefdc75)}
.reading{display:flex;flex-direction:column;align-items:center;min-height:0;padding-bottom:10px}
.reading h1{font-size:clamp(2.7rem,11vw,4.8rem);flex-shrink:0}.reading .fine{margin:8px 0 14px}
.pages{overflow-y:auto;overscroll-behavior:contain;max-width:550px;width:100%;text-align:left;margin-inline:auto}
.entry-row{display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;border-bottom:1px solid #50634f37;width:100%;padding:11px 0;min-height:52px}
.entry-row strong{font:1.62rem var(--serif);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-row time{font-size:.8rem;flex-shrink:0;color:var(--soft)}
.entry-text{white-space:pre-wrap;overflow-wrap:anywhere;font:1.45rem/1.42 var(--serif);margin:12px auto 0}
.entry-text p{margin:0 0 8px}.entry-text p:empty{display:none}.quiet-delete{font-size:.84rem;margin-top:8px}
.reading .actions,.reading .quiet-delete{flex-shrink:0}
@media(hover:hover) and (pointer:fine){.entry-row:hover strong,.mood:hover,.text-btn:hover{text-decoration:underline;text-underline-offset:4px}.ink:hover{background:#234333}}
@media(min-aspect-ratio:11/10) and (min-width:650px){
 .landscape{background-image:url("./lake.webp");background-position:68% center}.landscape:after{background:linear-gradient(90deg,#fff1d7dc 0%,#fff1d7b8 30%,#fff1d72a 60%,transparent 78%)}
 .app{padding:clamp(22px,4vh,54px) clamp(32px,6vw,108px)}.brand{font-size:2.12rem}.brand img{width:38px;height:38px}
 .scene{text-align:left;padding-top:clamp(9px,9vh,115px);padding-left:clamp(0px,5vw,85px)}
 h1{font-size:clamp(3.8rem,7.2vw,7.3rem)}#moods{max-width:364px;margin:25px 0 0;justify-content:flex-start;column-gap:24px}.mood{font-size:1.5rem}.own-word{margin-top:12px}
 textarea,#custom{margin-inline:0}.actions{justify-content:flex-start}.low-link{bottom:4vh;left:auto;transform:none;color:var(--pine);background:none;text-shadow:none;padding:0;text-decoration:underline;text-underline-offset:4px}
 .sub,.fine{margin-left:0}.reading{align-items:flex-start}.pages,.entry-text{margin-inline:0}.lead{font-size:1.65rem}.water{bottom:7%;height:30%}
}
@media(max-height:680px){.scene{padding-top:clamp(6px,3svh,20px)}h1{font-size:clamp(2.6rem,10svh,4.2rem)}#moods{margin-top:10px}.own-word{margin-top:0}.actions{margin-top:10px}}
@media(max-height:420px){.app{padding-top:4px;padding-bottom:4px}.scene{padding-top:0}h1{font-size:2.5rem}.lead{font-size:1.08rem}.text-btn,.ink,.mood{min-height:40px}.own-word{margin-top:0}textarea{margin-top:8px;min-height:40px;height:45px}.low-link{position:static;transform:none;margin-inline:8px;color:var(--pine);text-shadow:none;background:none}.reading{padding-top:0}.water{height:21%;bottom:2%}}
body.keyboard .app{min-height:0;height:var(--visible-height,100dvh)}
body.keyboard .scene{padding-top:4px}body.keyboard .lead{font-size:1.05rem}body.keyboard #reflect h1,body.keyboard #custom{font-size:2.65rem}body.keyboard textarea{margin-top:9px}body.keyboard .actions{margin-top:8px}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
