:root{
  --paper:#fbeef0; --ink:#3b1f28; --muted:#87606c; --rose:#c4476b; --wine:#6e2540; --rule:#f0d0d9; --sheet:#fff8f9;
  box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){--paper:#24121a;--ink:#f7dfe6;--muted:#c99aab;--rose:#ef8aa9;--wine:#ffb8cb;--rule:#41232f;--sheet:#2e1821}
}
:root[data-theme="dark"]{--paper:#24121a;--ink:#f7dfe6;--muted:#c99aab;--rose:#ef8aa9;--wine:#ffb8cb;--rule:#41232f;--sheet:#2e1821}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--paper);color:var(--ink);font:400 1.1rem/1.7 'Newsreader',Georgia,serif}
.wrap{max-width:700px;margin:0 auto;padding:36px 22px 70px}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--rose);outline-offset:3px}
.linkbtn{background:none;border:0;padding:0;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.top{text-align:right;font-size:.9rem}
.sec-intro{margin:10px 0 0;color:var(--muted);max-width:34em}

/* intro */
h1{font-size:clamp(3.4rem,15vw,5.6rem);line-height:.95;font-weight:600;letter-spacing:-.02em;color:var(--wine);margin:26px 0 0}
.squiggle{display:block;width:210px;max-width:60%;margin:4px 0 0;color:var(--rose)}
.role{font-family:'Caveat',cursive;font-size:1.85rem;line-height:1.2;color:var(--rose);margin:14px 0 0;transform:rotate(-1.5deg);transform-origin:left}
.about{margin:28px 0 0;max-width:34em}
.facts{list-style:none;padding:0;margin:22px 0 0;font-family:'Caveat',cursive;font-size:1.55rem;line-height:1.5;color:var(--muted)}
.facts li::before{content:"– ";color:var(--rose)}

/* about me */
.me{margin:64px 0 0}
.me .lead{margin:14px 0 0;max-width:34em}
.stickies{display:grid;grid-template-columns:1fr 1fr;gap:22px 20px;margin:30px 0 8px}
.sticky{position:relative;padding:22px 18px 16px;border-radius:2px;background:color-mix(in srgb,var(--rose) 13%,var(--sheet));box-shadow:2px 3px 0 var(--rule);transform:rotate(-1.4deg);transition:transform .25s ease}
.sticky:nth-child(4n+2){transform:rotate(1.2deg);background:color-mix(in srgb,var(--wine) 9%,var(--sheet))}
.sticky:nth-child(4n+3){transform:rotate(.8deg);background:color-mix(in srgb,var(--muted) 14%,var(--sheet))}
.sticky:nth-child(4n+4){transform:rotate(-1deg)}
.sticky::before{content:"";position:absolute;top:-9px;left:50%;width:56px;height:18px;margin-left:-28px;background:color-mix(in srgb,var(--rose) 35%,transparent);transform:rotate(-3deg)}
.sticky:hover{transform:rotate(0) translateY(-3px)}
.sticky h3{font-family:'Caveat',cursive;font-weight:600;font-size:1.5rem;line-height:1.1;color:var(--rose);margin:0 0 4px}
.sticky p{margin:0;font-size:1.02rem;line-height:1.5}
.pull{font:italic 400 clamp(1.3rem,4vw,1.6rem)/1.4 'Newsreader',Georgia,serif;color:var(--wine);margin:26px 0 0;max-width:24em;padding-left:16px;border-left:3px solid var(--rose)}
.acts{display:flex;gap:16px;font-size:.85rem}
.sticky .acts{margin-top:8px}
.sticky.editing{transform:none;display:grid;gap:8px}
.sticky.editing textarea{min-height:80px}
.sticky.add{background:transparent;border:1.5px dashed var(--rose);box-shadow:none;display:grid;place-items:center;min-height:110px;transform:none}
.sticky.add::before{display:none}
.sticky.add button,.letter.add button{background:none;border:0;font-family:'Caveat',cursive;font-size:1.6rem;color:var(--rose)}

/* connections */
.connect{margin:64px 0 0}
.links{list-style:none;padding:0;margin:16px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.links a{display:block;height:100%;padding:12px 16px 14px;border:1.5px solid var(--rose);background:var(--sheet);box-shadow:3px 3px 0 var(--rule);color:var(--ink);text-decoration:none;transition:transform .2s,box-shadow .2s}
.links a:hover,.links a:focus-visible{transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--rose)}
.links .lbl{display:block;font-family:'Caveat',cursive;font-size:1.6rem;line-height:1.2;color:var(--rose)}
.links .handle{display:block;color:var(--muted);font-size:1rem;overflow-wrap:anywhere}
.stamps{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0 0}
.stamps span{border:1.5px solid var(--wine);color:var(--wine);padding:1px 16px;font-family:'Caveat',cursive;font-size:1.45rem;line-height:1.4}

/* quote */
.quote{margin:64px 0 0;padding:0 0 0 .6em}
.quote blockquote{margin:0;text-indent:-.45em;font:italic 400 clamp(1.5rem,5vw,2.1rem)/1.4 'Newsreader',Georgia,serif;color:var(--wine);max-width:22em}

/* letters */
.letters{margin:64px 0 0}
.letterlist{display:grid;gap:14px;margin-top:20px}
.letter{margin:0;padding:0;border:1.5px solid var(--rose);background:var(--sheet);box-shadow:3px 3px 0 var(--rule)}
.letter summary{list-style:none;cursor:pointer;padding:12px 16px;font-family:'Caveat',cursive;font-size:1.55rem;line-height:1.3;color:var(--rose);display:flex;justify-content:space-between;align-items:center;gap:12px}
.letter summary::-webkit-details-marker{display:none}
.letter summary::after{content:"+";font-size:1.7rem}
.letter[open] summary::after{content:"\2212"}
.letter .body{margin:0;padding:0 16px 14px;white-space:pre-wrap}
.letter .acts{padding:0 16px 12px}
.letter.editing{display:grid;gap:8px;padding:14px 16px}
.letter.editing textarea{min-height:140px}
.letter.add{background:transparent;border:1.5px dashed var(--rose);box-shadow:none;display:grid;place-items:center;min-height:70px}

/* diary */
.diary-head{margin:68px 0 14px}
h2{font-size:2rem;font-weight:600;margin:0;color:var(--wine)}
.filters{margin-top:6px;font-family:'Caveat',cursive;font-size:1.4rem}
.filters button{background:none;border:0;padding:0 14px 0 0;color:var(--muted)}
.filters button[aria-pressed="true"]{color:var(--rose);text-decoration:underline wavy;text-underline-offset:5px}
.page{position:relative;background:var(--sheet);background-image:repeating-linear-gradient(transparent 0 31px,var(--rule) 31px 32px);border-radius:2px;padding:14px 22px 16px 62px;margin:0 0 22px;box-shadow:0 1px 0 var(--rule),3px 4px 0 var(--rule);line-height:32px}
.page:nth-of-type(even){transform:rotate(.4deg)}
.page::before{content:"";position:absolute;left:44px;top:0;bottom:0;width:1px;background:var(--rose);opacity:.6}
.page time{font-family:'Caveat',cursive;font-size:1.3rem;color:var(--muted)}
.page .mood{float:right;font-family:'Caveat',cursive;font-size:1.3rem;color:var(--rose)}
.page h3{font-size:1.45rem;font-weight:600;margin:0;line-height:32px;color:var(--wine)}
.page p{margin:0;white-space:pre-wrap}
.page .del{font-size:.85rem}.page .actions{margin-top:2px}
.actions{display:flex;gap:18px}
.empty{color:var(--muted);font-style:italic}
.status{color:var(--muted);font-style:italic}

/* forms */
#composer{margin:0 0 26px;border-bottom:1px dashed var(--rose);padding-bottom:16px}
#composer summary{cursor:pointer;font-family:'Caveat',cursive;font-size:1.6rem;color:var(--rose)}
form{display:grid;gap:12px;margin-top:10px}
input,textarea,select{width:100%;font:inherit;font-size:1rem;color:var(--ink);background:transparent;border:0;border-bottom:1px solid var(--rose);padding:6px 2px;border-radius:0}
select option{color:#3b1f28}
textarea{min-height:110px;resize:vertical;border:1px solid var(--rose);padding:8px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.btns{display:flex;gap:18px;align-items:center}
.save{justify-self:start;background:var(--wine);color:var(--paper);border:0;border-radius:2px;padding:7px 20px;font-family:'Caveat',cursive;font-size:1.3rem}
.note{font-size:.85rem;color:var(--muted);margin:0}

/* guestbook */
.guest{margin:64px 0 0}
.guest form{max-width:34em}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.gmsgs{margin-top:26px;display:grid;gap:18px}
.gmsg{border-left:3px solid var(--rose);padding:2px 0 2px 14px}
.gmsg .who{font-family:'Caveat',cursive;font-size:1.45rem;line-height:1.2;color:var(--rose)}
.gmsg time{color:var(--muted);font-size:.85rem;margin-left:10px}
.gmsg p{margin:0;white-space:pre-wrap}
.pending{margin-top:26px;padding:14px 16px;border:1.5px dashed var(--rose);display:grid;gap:14px}

/* footer + unlock */
footer{margin-top:56px;color:var(--muted);font-size:1rem}
footer p{margin:0 0 6px}
.unlock{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:10px}
.unlock input{width:190px}
.err{color:var(--rose);font-size:.85rem;width:100%}

@media (max-width:520px){.stickies,.links{grid-template-columns:1fr}.row{grid-template-columns:1fr}.page{padding-left:52px}.page::before{left:36px}}
@media (prefers-reduced-motion:reduce){.sticky,.links a{transition:none}}
