:root{
  --paper:#ffffff; --blush:#ffe3ec; --rose:#f2a3ba; --cherry:#d6245c; --cherry-deep:#a3153f; --ink:#2b1a20; --soft:#7a5b66; --gold:#ffcf5c;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; min-height:100dvh; color:var(--ink); background-color:var(--paper);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='%23f2a3ba'%3E%3Cpath transform='translate(8 8) scale(.5)' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3Cpath transform='translate(36 36) scale(.5)' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/g%3E%3C/svg%3E");
  font-family:"Gaegu","Comic Sans MS","Chalkboard SE",cursive; font-size:22px; line-height:1.2; overflow-x:hidden;
  -webkit-tap-highlight-color:transparent;
}
.page{position:relative; max-width:430px; margin:0 auto; padding:calc(22px + env(safe-area-inset-top)) 18px calc(36px + env(safe-area-inset-bottom))}
a{color:inherit}
:focus-visible{outline:3px solid var(--ink); outline-offset:3px}

/* name */
.name{position:relative; padding:0 4px}
h1{display:inline-block; margin:0; font-size:76px; line-height:.82; font-weight:700; letter-spacing:-1px; cursor:pointer; user-select:none; -webkit-user-select:none}
.scribble{display:block; width:210px; height:16px; margin:2px 0 0 2px; color:var(--cherry)}
.scribble path{stroke-dasharray:260; stroke-dashoffset:260; animation:draw .9s .2s ease-out forwards}
.scribble.again path{animation:none}
@keyframes draw{to{stroke-dashoffset:0}}
.bio{margin:6px 0 0; font-size:24px; background:var(--paper); display:inline-block; padding:0 6px 0 2px}

/* stickers: drag them anywhere */
.sticker{position:absolute; z-index:30; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none;
  transform:translate(var(--tx,0px), var(--ty,0px)) rotate(var(--rot,0deg)); filter:drop-shadow(0 2px 2px rgba(70,20,40,.28))}
.sticker svg{display:block; width:100%; pointer-events:none}
.sticker.held{cursor:grabbing; scale:1.12; transition:scale .1s}
.sticker.plop{animation:plop .34s ease-out}
@keyframes plop{0%{scale:1.12}45%{scale:.92}75%{scale:1.04}100%{scale:1}}
.s-bow{right:8px; top:4px; width:72px; padding:6px; color:var(--cherry); --rot:12deg; filter:none}
.s-star{left:-2px; bottom:34px; width:58px; --rot:-14deg}
.s-star svg{fill:var(--gold); stroke:#fff; stroke-width:1.6; stroke-linejoin:round; paint-order:stroke}
.s-heart{right:-8px; top:-26px; width:54px; --rot:14deg}
.s-heart svg{fill:var(--cherry); stroke:#fff; stroke-width:1.8; stroke-linejoin:round; paint-order:stroke}
.s-xo{right:22px; bottom:-20px; padding:0 10px 2px; background:#fff; border:2px solid var(--cherry); border-radius:4px; color:var(--cherry); font-weight:700; font-size:24px; line-height:1.3; --rot:-7deg}

/* polaroid stack */
.stack{position:relative; height:calc(min(100vw,430px) * .96); margin-top:22px; touch-action:pan-y; border-radius:6px}
.pol{
  position:absolute; left:50%; top:6px; width:66%; margin:0; padding:10px 10px 46px; background:#fff; border-radius:3px;
  box-shadow:0 12px 26px rgba(70,20,40,.2), 0 0 0 1px rgba(70,20,40,.06);
  transform:translate(calc(-50% + var(--x,0px)), var(--y,0px)) rotate(var(--r,0deg));
  transition:transform .3s cubic-bezier(.2,.8,.2,1); cursor:grab; user-select:none; -webkit-user-select:none; touch-action:pan-y;
  animation:drop .5s calc(var(--i) * 80ms + 80ms) cubic-bezier(.2,.9,.3,1.2) backwards;
}
.pol.dragging{transition:none; cursor:grabbing}
@keyframes drop{from{opacity:0; translate:0 -44px; scale:1.08}to{opacity:1; translate:0 0; scale:1}}
.pol img{display:block; width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; border-radius:2px; pointer-events:none; background:var(--blush)}
.pol figcaption{position:absolute; left:0; right:0; bottom:9px; text-align:center; font-size:25px; white-space:nowrap}
.tape{position:absolute; top:-13px; left:50%; width:88px; height:26px; margin-left:-44px; transform:rotate(-3deg);
  background:repeating-linear-gradient(90deg, rgba(242,163,186,.86) 0 8px, rgba(255,214,226,.86) 8px 16px)}
.hint{position:absolute; z-index:20; right:0; bottom:-40px; min-height:44px; border:0; background:var(--paper); font:inherit; font-size:21px; color:var(--cherry); padding:4px 10px; cursor:pointer; transform:rotate(-4deg); border-radius:4px}

/* the lock */
.lock{position:relative; margin-top:48px}
.cover{
  display:flex; align-items:center; gap:14px; width:100%; min-height:92px; padding:14px 18px; border:0; text-align:left; cursor:pointer;
  font:inherit; color:#fff; background:var(--cherry); border-radius:10px; box-shadow:0 6px 0 var(--cherry-deep);
  outline:2px dashed rgba(255,255,255,.55); outline-offset:-8px; transition:transform .08s, box-shadow .08s;
}
.cover:active{transform:translateY(4px); box-shadow:0 2px 0 var(--cherry-deep)}
.cover:focus-visible{outline:3px solid var(--ink); outline-offset:3px}
.padlock{flex:none; width:46px; height:54px; overflow:visible}
.shackle{transform-origin:14px 26px; transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.lock.open .shackle{transform:rotate(-32deg) translateY(-2px)}
.cover b{display:block; font-size:33px; line-height:.95}
.cover .state{display:block; font-size:21px}
.inside{margin:12px 2px 0; padding:14px 16px 18px; background:var(--blush); border-radius:10px; border:2px dashed var(--rose); animation:reveal .22s ease-out}
@keyframes reveal{from{opacity:0; translate:0 -8px}to{opacity:1; translate:0 0}}
.inside p{margin:0 0 10px; font-size:23px}
.go{display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:56px; padding:8px 16px; border-radius:8px; background:var(--ink); color:#fff; text-decoration:none; font-weight:700; font-size:23px; box-shadow:0 5px 0 #000; transition:transform .08s, box-shadow .08s}
a.go:active{transform:translateY(4px); box-shadow:0 1px 0 #000}
.go.soon{justify-content:center; background:#fff; color:var(--soft); box-shadow:none; border:2px dashed var(--rose); font-weight:400}

/* the link page */
.sheet{
  position:relative; margin-top:36px; padding:34px 16px 6px; border-radius:6px; border:1.5px solid rgba(43,26,32,.16);
  background:repeating-linear-gradient(#fff 0 57px, #ffd0de 57px 58px); background-position:0 34px;
  box-shadow:0 14px 30px rgba(70,20,40,.14); transform:rotate(.6deg);
}
.sheet::before{content:""; position:absolute; left:0; right:0; top:10px; height:14px;
  background:radial-gradient(circle at 50% 50%, var(--blush) 0 5px, rgba(43,26,32,.22) 5px 6px, transparent 6.5px) 0 0/34px 14px repeat-x}
h2{margin:0; height:58px; line-height:58px; font-size:34px; font-weight:700}
.row{position:relative; z-index:1; display:flex; align-items:center; gap:12px; height:58px; text-decoration:none; font-size:31px; font-weight:700; white-space:nowrap}
.row svg{flex:none; width:26px; height:26px; fill:#fff; stroke:var(--cherry); stroke-width:2; transition:fill .1s, transform .12s}
.row span{margin-right:auto}
.row small{font-family:"DM Sans",system-ui,sans-serif; font-weight:400; font-size:13px; color:var(--soft); overflow:hidden; text-overflow:ellipsis}
.row i{font-style:normal; color:var(--cherry); transition:transform .12s}
.row::after{content:""; position:absolute; left:38px; bottom:11px; height:4px; width:0; background:var(--rose); border-radius:2px; transition:width .18s ease-out; z-index:-1}
.row:hover svg,.row:active svg,.row:focus-visible svg,.row.done svg{fill:var(--cherry)}
.row:hover svg,.row:active svg{transform:scale(1.15) rotate(-8deg)}
.row:hover i,.row:active i{transform:translateX(4px)}
.row:hover::after,.row:active::after,.row:focus-visible::after{width:calc(var(--u) * 1px)}

footer{margin-top:44px; text-align:center; font-family:"DM Sans",system-ui,sans-serif; font-size:12px; color:var(--soft)}
footer span{background:var(--paper); padding:2px 8px}

/* hearts made by tapping */
.stamp{position:fixed; z-index:50; width:var(--size,26px); height:var(--size,26px); margin:calc(var(--size,26px) / -2) 0 0 calc(var(--size,26px) / -2); fill:var(--cherry); pointer-events:none; rotate:var(--rot,0deg); animation:stamp .7s ease-out forwards}
@keyframes stamp{0%{scale:.2; opacity:1}35%{scale:1.25; opacity:1}100%{scale:1; translate:0 -26px; opacity:0}}
.pop{position:fixed; z-index:50; width:18px; height:18px; margin:-9px 0 0 -9px; fill:var(--cherry); pointer-events:none; animation:pop .6s ease-out forwards}
@keyframes pop{from{translate:0 0; scale:.4; opacity:1}to{translate:var(--dx) var(--dy); scale:1.1; opacity:0}}

@media (max-width:389px){
  .row{font-size:27px; gap:9px}
  .row small{font-size:12px}
}
@media (max-width:359px){
  h1{font-size:64px}
  .scribble{width:176px}
  .row small{display:none}
  .cover{padding:14px 12px; gap:10px}
  .cover b{font-size:27px}
  .cover .state{font-size:18px}
  .go{font-size:21px}
  .s-bow{width:60px}
}

.note,.ps{display:none}

/* desktop: an open diary lying on the heart paper */
@media (min-width:1000px){
  body{display:flex; flex-direction:column; justify-content:center; padding:40px 0 120px}
  .page{
    max-width:none; width:min(1180px, calc(100vw - 72px)); min-height:min(770px, calc(100dvh - 160px)); margin:0 auto; padding:0;
    display:grid; grid-template-columns:1fr 1fr; align-items:stretch;
    background:#fff; border:14px solid var(--cherry); border-radius:12px; outline:2px dashed rgba(255,255,255,.6); outline-offset:-9px;
    box-shadow:0 8px 0 var(--cherry-deep), 0 34px 60px rgba(70,20,40,.28);
  }
  /* the fold between the two pages */
  .page::before{content:""; position:absolute; z-index:5; top:0; bottom:0; left:50%; width:76px; margin-left:-38px; pointer-events:none;
    background:linear-gradient(90deg, rgba(70,20,40,0), rgba(70,20,40,.06) 36%, rgba(70,20,40,.2) 50%, rgba(70,20,40,.06) 64%, rgba(70,20,40,0))}
  /* ribbon bookmark hanging out of the bottom */
  .page::after{content:""; position:absolute; z-index:0; top:100%; right:96px; width:30px; height:84px; margin-top:14px; background:var(--rose);
    clip-path:polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); pointer-events:none}
  .left,.right{position:relative; min-width:0; padding:40px 36px 40px}
  .left{display:flex; flex-direction:column}
  .right{padding-bottom:96px}
  h1{font-size:104px}
  .scribble{width:290px; height:20px}
  .bio{font-size:27px}
  .s-bow{width:88px; right:6px; top:10px}

  /* photos lie scattered on the left page; grab any of them */
  .stack{flex:1; height:auto; min-height:500px; margin-top:20px; touch-action:none}
  .pol{left:var(--sx,0%); top:var(--sy,0%); width:37%; padding:9px 9px 42px; touch-action:none;
    transform:translate(var(--x,0px), var(--y,0px)) rotate(var(--r,0deg));
    transition:transform .25s cubic-bezier(.2,.8,.2,1), scale .15s, box-shadow .15s}
  .pol:hover{scale:1.04; box-shadow:0 20px 34px rgba(70,20,40,.28), 0 0 0 1px rgba(70,20,40,.06)}
  .pol:nth-of-type(5n+1){--sx:33%; --sy:25%; --r:-3deg}
  .pol:nth-of-type(5n+2){--sx:-2%; --sy:0%; --r:-7deg}
  .pol:nth-of-type(5n+3){--sx:65%; --sy:2%; --r:6deg}
  .pol:nth-of-type(5n+4){--sx:0%; --sy:50%; --r:5deg}
  .pol:nth-of-type(5n+5){--sx:64%; --sy:49%; --r:-5deg}
  .pol figcaption{font-size:clamp(15px, 1.55vw, 22px); bottom:9px}
  .tape{width:66px; height:22px; margin-left:-33px; top:-11px}
  .hint{display:none}
  .note{display:block; position:absolute; left:0; right:0; bottom:-26px; margin:0; text-align:center; font-size:21px; color:var(--cherry)}
  .s-star{left:auto; right:-18px; bottom:250px; width:62px}

  .lock{margin-top:4px}
  .go{font-size:26px}
  /* the right page is the ruled paper itself */
  .sheet{margin:34px -36px 0; padding:0 36px; border:0; border-radius:0; box-shadow:none; transform:none; background-position:0 0}
  .sheet::before{display:none}
  .s-heart{right:34px; top:-34px; width:58px}
  .s-xo{right:70px; bottom:-62px}
  .ps{display:block; position:absolute; left:36px; bottom:30px; margin:0; font-size:21px; color:var(--soft); transform:rotate(-2deg)}
  footer{position:absolute; left:0; right:0; top:100%; margin-top:54px}
}
@media (min-width:1200px){
  .left,.right{padding:44px 54px 44px}
  .sheet{margin:34px -54px 0; padding:0 54px}
  .ps{left:54px}
}
@media (min-width:1600px) and (min-height:960px){
  .page{width:1340px; min-height:860px}
  .left,.right{padding:54px 68px 52px}
  h1{font-size:122px}
  .scribble{width:340px; height:23px}
  .bio{font-size:30px}
  .sheet{margin:40px -68px 0; padding:0 68px}
  .ps{left:68px; bottom:40px; font-size:23px}
  .note{font-size:23px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important; transition:none !important}
  .scribble path{stroke-dashoffset:0}
}
