:root{--ink:#2e2620;--p:#f6efe2;--brown:#5a3424;--soft:#7a5444;--note-width:340px;--note-height:380px}
@media (hover:hover){:root{--pop:.12s}} /* on a computer the lid's pop leads its motion a beat, tuned by ear */
*{box-sizing:border-box;margin:0}
body{display:flex;flex-direction:column;height:100dvh;font-family:Nunito,system-ui,sans-serif;color:var(--brown);overflow-x:hidden;background:
radial-gradient(circle at 6% 70%,rgba(255,226,190,.9) 0 2%,transparent 9%),
radial-gradient(circle at 95% 75%,rgba(255,230,200,.9) 0 3%,transparent 10%),
radial-gradient(circle at 92% 20%,rgba(255,240,225,.8) 0 4%,transparent 14%),
radial-gradient(ellipse at 50% 0%,#fdf0e8,#f8dfd2 55%,#f1cfc0)}
.bar{width:100%} /* full width in the column layout */
main{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:1000px;margin:0 auto;padding:0 24px 24px}
.stage{display:grid;justify-items:center;align-content:center;flex:1;min-height:0;container-type:size} /* fills the screen between the top bar and the footer */
.compose{position:fixed;inset:0;z-index:40;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;padding:20px;background:rgba(90,52,36,.3);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.compose[hidden]{display:none}
.fullcard{width:min(340px,100%);padding:34px 28px 26px;border-radius:18px;background:#fffaf5;box-shadow:0 24px 60px rgba(90,52,36,.35);display:grid;justify-items:center;gap:10px;text-align:center;color:var(--brown)}
.fullcard h2{margin:0;font-size:1.5rem}
.fullcard p{margin:0 0 12px;opacity:.7}
.later{border:0;background:none;font:inherit;color:var(--brown);opacity:.6;cursor:pointer;padding:8px}
.later:hover{opacity:1}
.opt{display:flex;align-items:center;gap:12px;width:100%;padding:13px 16px;border:0;border-radius:14px;background:#f6ebe2;font:600 1rem Nunito,sans-serif;color:var(--brown);cursor:pointer;text-align:left}
.opt:hover{background:#f1dfd3}
.opt svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.polar{background:#fdfaf5;padding:14px 14px 0;transform:rotate(-2deg)}
.pimg img,.pimg video{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#e9dccd}
.pcap{display:block;width:100%;height:58px;border:0;outline:0;background:none;font:500 24px Caveat,cursive;color:var(--ink);text-align:center}
.pcap::placeholder{color:rgba(46,38,32,.35)}
.kcard h2{font-size:1.25rem;font-weight:600;text-align:center;margin-bottom:14px}
.kgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:2px 0 6px}
.kgrid button{aspect-ratio:1;border:0;border-radius:12px;background:#f6ebe2;padding:8px;cursor:pointer}
.kgrid button.on{background:#ead8c8;box-shadow:inset 0 0 0 2px var(--brown)}
.kgrid svg{display:block;width:100%;height:auto}
#kdrop:disabled{opacity:.5;cursor:default}
.tok.keep{background:none;box-shadow:none;filter:drop-shadow(0 1px 2px rgba(90,52,36,.35))}
.tok.keep svg{display:block;width:100%;height:100%}
.kcard{background:#fffaf5;border-radius:18px;padding:16px 16px 0;box-shadow:0 18px 40px rgba(150,90,60,.22)}
.sheet.keep .face{background:radial-gradient(ellipse at 50% 42%,rgba(255,250,240,.65) 0%,rgba(255,250,240,.25) 38%,transparent 72%);padding:30px 14px 18px;text-align:center} /* a keepsake floats on its own, no card */
.sheet.keep :is(#rmedia,.umedia) > svg{display:block;width:72%;aspect-ratio:1/1;margin:0 auto 8px;filter:drop-shadow(0 8px 6px rgba(90,52,36,.14)) drop-shadow(0 2px 2px rgba(90,52,36,.08))}
.lift.kp{background:none;box-shadow:none} /* a keepsake in flight is just itself, at its own size */
.fly.kp{transform-origin:50% 50%}
.kp svg{display:block;width:100%;height:100%}
/* records: a song on vinyl, its cover as the label; it turns while it plays */
.vinyl{position:relative;display:block;aspect-ratio:1/1;border-radius:50%}
.disc{position:absolute;inset:0;border-radius:50%;background:repeating-radial-gradient(circle,#1d1815 0 1.6%,#2b2420 1.8% 2.4%);box-shadow:0 2px 6px rgba(40,25,15,.35)}
.label{position:absolute;inset:31%;border-radius:50%;background:#c08a6c center/cover}
.disc::after{content:"";position:absolute;inset:48.4%;border-radius:50%;background:#fbf3ea}
.vinyl::after{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 20deg,transparent,rgba(255,255,255,.14) 8%,transparent 18%,transparent 50%,rgba(255,255,255,.14) 58%,transparent 68%);pointer-events:none} /* the shine stays still while the record turns */
.disc{animation:spin 1.8s linear infinite paused} /* 33 rpm; it turns only while it plays, and stops where it is */
.vinyl.on .disc{animation-play-state:running}
@keyframes spin{to{transform:rotate(1turn)}}
.sheet.keep :is(#rmedia,.umedia) .vinyl{width:72%;margin:0 auto 12px}
.vinyl.own .label{background:#f4e7cf} /* your own audio: a plain cream label */
.upl{display:block;margin-top:8px;padding:10px;border:1px dashed #d8b9a8;border-radius:12px;text-align:center;font:600 .9rem Nunito,sans-serif;color:var(--soft);cursor:pointer}
.upl:hover{background:#f6ebe2}
.lift.rec{background:none} /* a record in flight is just the disc, round, at its own size */
.fly.rec{transform-origin:50% 50%}
.spin{display:block;width:100%;border:0;padding:0;background:none;cursor:pointer;touch-action:none}
.player audio{display:none}
.song{font:600 .95rem Nunito,sans-serif;color:var(--brown)}
.am{display:inline-block;margin-top:6px;font:600 .8rem Nunito,sans-serif;color:var(--soft)}
.sq{display:block;width:100%;padding:11px 14px;border:1px solid #e6cfc3;border-radius:12px;background:#fff;font:600 1rem Nunito,sans-serif;color:var(--brown);outline:0}
.sq:focus{border-color:#9a5b45}
.slist{display:grid;gap:2px;max-height:38vh;overflow-y:auto;margin-top:8px}
.slist button{display:flex;align-items:center;gap:10px;width:100%;padding:6px;border:0;border-radius:10px;background:none;text-align:left;font:inherit;color:var(--brown);cursor:pointer}
.slist button.on{background:#ead8c8}
.slist .vinyl{flex:none;width:40px}
.slist span{min-width:0}
.slist b,.slist small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.slist b{font-size:.95rem}
.slist small{opacity:.7}
.slist p{padding:10px;text-align:center;opacity:.6}
.lib{position:fixed;inset:0;z-index:45;display:flex;align-items:flex-end;justify-content:center;background:rgba(253,243,236,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.lib[hidden]{display:none}
.libpanel{display:flex;flex-direction:column;width:min(560px,100%);max-height:85dvh;background:var(--paper-grain,none),#fffaf5;border-radius:24px 24px 0 0;box-shadow:0 -10px 40px rgba(90,52,36,.2)}
.libbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 22px;padding:16px 16px 10px}
.seg{display:flex;gap:14px}
.seg button{border:0;background:none;padding:4px 0;font:600 .9rem Nunito,sans-serif;color:var(--soft);cursor:pointer}
.seg button.on{color:var(--brown);box-shadow:inset 0 -2px 0 var(--brown)}
.libbar > .mj-close{position:relative;top:0;right:0;margin-left:auto}
.libitems{overflow-y:auto;overscroll-behavior:contain;padding:0 16px 24px;display:grid;gap:10px}
.libitems h3{margin:14px 2px 0;font:500 1.15rem Fraunces,Georgia,serif;color:var(--brown)}
.lcard{display:grid;gap:4px;text-align:left;border:0;border-radius:4px;padding:12px 14px;background:var(--p);box-shadow:0 2px 6px rgba(90,52,36,.12);cursor:pointer;color:var(--ink)}
.lcard p{margin:0;font:500 22px/1.15 Caveat,cursive;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.lmeta{display:flex;align-items:center;gap:6px;font:500 15px Caveat,cursive;opacity:.6}
.lmeta svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lcard.lv{grid-template-columns:56px 1fr;column-gap:14px;align-items:center}
.lpic{grid-row:span 2;width:56px;height:56px;display:grid;place-items:center}
.lpic svg{width:48px;height:48px}
.lpic .vinyl{width:52px}
.lph{box-sizing:border-box;width:50px;height:58px;padding:3px 3px 9px;background:#fdfaf5;box-shadow:0 1px 3px rgba(90,52,36,.3);transform:rotate(-3deg)}
.lph img{display:block;width:100%;height:100%;object-fit:cover;background:#e9dccd}
.lnone{text-align:center;color:var(--soft);margin:24px 0}
.count:not(:empty)::after{content:" \203A";opacity:.6}
.jarwrap .drop{margin-top:8px}

/* writing paper */
.write{position:relative;width:var(--note-width);max-width:100%}
.write > .drop{display:block;margin:18px auto 0}
.paper,.face{background-color:var(--p);color:var(--ink);font:500 26px/32px Caveat,cursive}
.paper{position:relative;height:var(--note-height);padding:30px 24px 24px 24px;border-radius:3px;box-shadow:0 2px 0 rgba(255,255,255,.4) inset;transition:background-color .3s}
textarea{width:100%;height:100%;border:0;outline:0;resize:none;background:none;color:inherit;font:inherit;padding:0}
textarea::placeholder{color:rgba(46,38,32,.35)}
.tools{display:flex;align-items:center;gap:10px;margin-top:22px}
.tints{display:flex;gap:5px}
:is(#rmedia,.umedia) :is(img,video){display:block;width:100%;max-height:32vh;object-fit:contain;margin-bottom:14px;background:#fff;border-radius:2px}
:is(#rmedia,.umedia) audio{display:block;width:100%;margin-bottom:14px}
.sw{width:22px;height:22px;border-radius:50%;border:2px solid transparent;background:var(--p);box-shadow:0 1px 3px rgba(90,52,36,.25);cursor:pointer;outline-offset:3px}
.sw.on{border-color:var(--brown)}
.drop{font:600 1.05rem Nunito,sans-serif;color:#fff;background:linear-gradient(#ad7058,#875140);border:0;border-radius:999px;padding:13px 20px;white-space:nowrap;cursor:pointer;box-shadow:0 6px 16px rgba(135,81,64,.35);transition:transform .2s,box-shadow .2s}
@media (hover:hover){.drop:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(135,81,64,.45)}} /* no stuck hover after a tap on touch screens */
.drop:disabled{opacity:.5;cursor:default;transform:none}

/* jar */
.jarwrap{position:relative;display:flex;flex-direction:column;align-items:center}
body:has(#reader:not([hidden]):not(.bare)) .jarwrap *{animation-play-state:paused} /* and its fireflies rest, so nothing behind the note is redrawn while it is read */
.dots{display:flex;margin-top:2px}
.dots[hidden]{display:none}
.dots button{box-sizing:content-box;width:9px;height:9px;padding:7px;border:0;border-radius:50%;background:#e2c4b4;background-clip:content-box;cursor:pointer} /* a small dot, an easy tap */
.dots button.on{background-color:var(--brown)}

.jar{margin-top:14em;font-size:min((100cqw - 16px) / 100,(100cqh - 130px) / 150.8)} /* jar.css draws the jar; this sets its size: as wide as the screen allows, as tall as the room leaves. Room above it (14em) for the open lid, so it never reaches the header */
.in .hero,.in .trial{display:none}
.lid{cursor:pointer;transition:transform .45s cubic-bezier(.4,1.6,.5,1) max(0s,calc(var(--lag,0s) - .125s))} /* closing: it touches down .155s in; its thud is played to be heard then (THUD) */
.lid.open{transform:translate(-12.1em,-14em) rotate(-18deg);transition-delay:calc(var(--lag,0s) + var(--pop,0s))} /* opens as its pop is heard (--lag: sound.js) */
#sticker{--s:1.5rem;--st:62%}
@media (min-width:900px) and (min-height:800px){.jar{font-size:min(3.3px,(100cqh - 130px) / 150.8)}#sticker{--s:1.875rem}} /* a bigger jar on big screens: 330px wide */
.count{margin-top:18px;min-height:1.4em;font-weight:600;font-size:1.1rem;line-height:1.4;cursor:pointer} /* its line is kept before the count is written, so nothing below it moves */
.sample{display:block;margin:12px auto 0;border:0;background:none;font:600 .95rem Nunito,sans-serif;color:#9a5b45;cursor:pointer}
.sample[hidden]{display:none}

/* folded notes */
.pile{position:absolute;inset:0} /* every note in the jar, as one layer: a shake moves them all at once */
.tok{position:absolute;width:63px;height:36px;border:0;padding:0;border-radius:2px;cursor:pointer;z-index:1;
background:var(--p);
box-shadow:0 2px 4px rgba(90,52,36,.3);transition:filter .2s}
.tok.ph img{position:absolute;right:4px;top:4px;width:18px;height:18px;object-fit:cover;border:1.5px solid #fff;box-shadow:0 1px 2px rgba(90,52,36,.35);transform:rotate(8deg);background:#e9dccd}
.tok.ph::before{content:"";position:absolute;z-index:1;right:11px;top:2px;width:5px;height:5px;border-radius:50%;background:#c0473f;box-shadow:0 1px 1px rgba(0,0,0,.3)}
.tok.vid::after{content:"";position:absolute;z-index:1;right:10px;top:10px;border-left:5px solid #fff;border-top:3.5px solid transparent;border-bottom:3.5px solid transparent}
.tok.pol{box-sizing:border-box;width:56px;height:66px;padding:4px 4px 11px;background:#fdfaf5;border-radius:1px;box-shadow:0 1px 3px rgba(90,52,36,.3)}
.tok.pol img{display:block;width:100%;height:48px;object-fit:cover;background:#e9dccd}
.tok.pol.vid::after{right:auto;left:25px;top:23px;border-left-width:7px;border-top-width:5px;border-bottom-width:5px}
.tok:focus-visible{filter:brightness(1.15) drop-shadow(0 0 6px rgba(255,200,130,.7));outline:0}
@media (hover:hover){.tok:hover{filter:brightness(1.15) drop-shadow(0 0 6px rgba(255,200,130,.7))}} /* a tapped note keeps no stuck glow on touch screens */
.ff{position:absolute;z-index:2;width:4px;height:4px;border-radius:50%;background:#fff3cf;box-shadow:0 0 7px 3px rgba(255,214,140,.8);pointer-events:none;animation:float var(--d) ease-in-out infinite alternate}
.jar.still .ff{animation-play-state:paused} /* fireflies hold still while the jar shakes, so a phone need not redraw the whole jar each frame */
@keyframes float{0%{transform:translate(0,0);opacity:.2}50%{opacity:1}100%{transform:translate(var(--x),var(--y));opacity:.3}}

/* flying note */
.fly{position:fixed;z-index:50;pointer-events:none;transform-origin:50% 75%}
.unfold{z-index:70}
.lift{position:fixed;z-index:65;border-radius:3px;background:linear-gradient(rgba(0,0,0,.08),rgba(255,255,255,.15)),var(--p);pointer-events:none}
.half{position:absolute;left:0;width:100%;height:50%}
.half.top{top:0;z-index:2;transform-origin:50% 100%}
.half.bot{top:50%}
.clip{position:absolute;inset:0;overflow:hidden;contain:paint;isolation:isolate}
.face{position:absolute;left:0;top:0;width:100%;height:200%;padding:30px 24px 24px 24px;white-space:pre-wrap;overflow-wrap:break-word}
.half.bot .face{top:-100%}
.back{position:absolute;inset:0;opacity:0;background:linear-gradient(0deg,rgba(0,0,0,.08),rgba(255,255,255,.15)),var(--p)} /* drawn upside down: the fold flips it */
.fly .tok{top:50%;left:0;width:100%;height:50%;opacity:0;z-index:3;border-radius:6px}

/* reader */
.reader{position:fixed;inset:0;z-index:60;display:grid;grid-template-columns:minmax(0,292px);place-items:center;place-content:center;gap:18px;padding:24px;touch-action:none;overscroll-behavior:contain}
.reader[hidden]{display:none}
.reader::before{content:"";position:absolute;inset:0;z-index:-1;background:rgba(253,243,236,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:opacity .5s} /* the dimmed, blurred room: a fixed blur that only fades */
.reader.bare::before{opacity:0}
.sheet{position:relative;width:100%;min-height:300px} /* notes lie flat: no shadow while written, flying or read */
.rmore{position:absolute;top:0;right:2px;z-index:2;width:44px;height:32px;border:0;border-radius:8px;background:none;color:var(--brown);opacity:.55;cursor:pointer;display:grid;place-items:center}
.rmore:hover{opacity:1}
.rmore svg{width:26px;height:26px;fill:currentColor}
.rmenu{position:absolute;top:34px;right:4px;z-index:3;min-width:150px;padding:6px;background:#fffaf5;border-radius:12px;box-shadow:0 10px 30px rgba(90,52,36,.25);display:grid}
.rmenu[hidden]{display:none}
.rmenu button{border:0;background:none;text-align:left;padding:10px 12px;border-radius:8px;font:inherit;color:var(--brown);cursor:pointer}
.rmenu button:hover{background:rgba(90,52,36,.07)}
.rmenu .del{color:#b0493f}
.tools[hidden]{display:none}
#etools{justify-self:stretch;margin:0}
#rtext[contenteditable]{user-select:text;-webkit-user-select:text;cursor:text;outline:0;caret-color:var(--ink)}
.rrow{position:relative;width:100%;display:grid;align-items:start;min-height:calc(var(--note-height) + 88px);cursor:grab} /* one stage for every kind of note, each starting at its top, so switching never moves the page or the heart and menu */
.rrow > .sheet{grid-area:1/1}
#sheet{z-index:1;will-change:transform;cursor:grab;user-select:none;-webkit-user-select:none;touch-action:none} /* the page moves it; only a long note's text scrolls under the finger */
#sheet img{-webkit-user-drag:none}
.sheet.pola .face{background:#fdfaf5;padding:30px 14px 18px}
.sheet.pola :is(#rmedia,.umedia) > :is(img,video):first-of-type{max-height:none;aspect-ratio:1/1;object-fit:cover;margin-bottom:10px;background:#e9dccd}
.pl{background:#fdfaf5;padding:30px 14px 0;box-sizing:border-box}
.pl img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#e9dccd}
.fly.pl{transform-origin:50% 50%}
.under{z-index:0;pointer-events:none;overflow:hidden}
.ract svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ract{position:absolute;top:0;right:46px;z-index:2;width:38px;height:32px;border:0;border-radius:8px;background:none;color:var(--brown);opacity:.55;cursor:pointer;display:grid;place-items:center}
.ract:hover,.ract.on{opacity:1}
.ract.on{color:#c4544f}
.ract.on svg{fill:currentColor}
.racts{display:flex;align-items:center;gap:16px}
.sheet .face{position:relative;height:auto;min-height:300px;max-height:88vh;overflow:hidden}
.sheet time,.unfold time{display:block;margin-top:14px;text-align:right;font-size:20px;opacity:.55}

/* a text note unfolding looks exactly like the open sheet it becomes */
.unfold .face:has(> .umedia:empty){display:flex;flex-direction:column;padding:38px 30px 24px;border-radius:2px}
.unfold .face:has(> .umedia:empty) time{margin-top:auto;padding-top:10px}
#notice{z-index:80}
#nmsg{opacity:1;font-size:1.05rem}


/* Memory destination picker */
.move-card {
  width:340px;
  max-width:100%;
  padding:26px 22px;
  border-radius:24px;
  background:#fff8f2;
  color:#5a3424;
  text-align:center;
  box-shadow:0 10px 30px rgba(90,52,36,.18);
}
.move-card h2 {
  margin:0;
  font-size:1.25rem;
}
.move-card p {
  margin:8px 0 18px;
  font-size:.9rem;
  color:#9a7565;
}
.move-list {
  display:grid;
  gap:8px;
  max-height:45vh;
  overflow-y:auto;
}
.move-choice {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px;
  border:1px solid #e6cfc3;
  border-radius:12px;
  background:#fffaf5;
  color:#694938;
  text-align:left;
  font:600 .95rem Nunito,sans-serif;
  cursor:pointer;
}
.move-choice:hover:not(:disabled) {
  background:#f6e8df;
}
.move-choice:disabled {
  opacity:.45;
  cursor:default;
}
.move-choice small {
  margin-left:auto;
  color:#9a7565;
}
.move-icon {
  display:grid;
  place-items:center;
  width:24px;
  color:#ad7058;
}
.move-icon svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
}
.move-card .later {
  margin-top:14px;
}


/* Subtle paper grain */
:root {
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.065'/%3E%3C/svg%3E");
}

.paper,
.fly:not(.pl):not(.kp) .face,
.sheet:not(.pola):not(.keep) > .face {
  background-image: var(--paper-grain);
  background-size: 160px 160px;
}

.fly .half .back,
.lift:not(.pl):not(.kp):not(.rec) {
  background-image:
    var(--paper-grain),
    linear-gradient(
      rgba(0,0,0,.08),
      rgba(255,255,255,.15)
    );
  background-size: 160px 160px, 100% 100%;
}


/* Accessible touch targets */
.ract::after {
  content: "";
  position: absolute;
  inset: -6px -3px;
}

.rmore::after {
  content: "";
  position: absolute;
  inset: -6px 0;
}

.ract:focus-visible,
.rmore:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}


/* text notes: a fixed sheet; long text scrolls inside it */
.sheet:not(.pola):not(.keep) > .face {
  display: flex;
  flex-direction: column;
  height: var(--note-height);
  min-height: var(--note-height);
  max-height: var(--note-height);
  overflow: hidden;
  padding: 38px 30px 24px;
  border-radius: 2px;
}

.sheet:not(.pola):not(.keep) > .face > :is(#rtext,.utext) {
  flex: 0 1 auto;
  min-height: 0;
  margin-right: -19px;
  padding-right: 19px;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(90,52,36,.22) transparent;
}

.sheet:not(.pola):not(.keep) > .face > :is(#rmedia,.umedia) {
  flex-shrink: 0;
}

.sheet:not(.pola):not(.keep) > .face > time {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 10px;
}

#txt::-webkit-scrollbar {
  width: 4px;
}

#txt::-webkit-scrollbar-thumb {
  background: rgba(90,52,36,.35);
  border-radius: 4px;
}

#noteCounter {
  position: absolute;
  bottom: 5px;
  right: 12px;
  font: 600 11px Nunito, sans-serif;
  opacity: .5;
  pointer-events: none;
}

#noteCounter[hidden] {
  display: none;
}

#noteCounter.at-limit {
  color: #b0493f;
  opacity: .85;
}


#rtext::-webkit-scrollbar {
  width: 3px;
}

#rtext::-webkit-scrollbar-track {
  background: transparent;
}

#rtext::-webkit-scrollbar-thumb {
  background: rgba(90,52,36,.22);
  border-radius: 8px;
}

#rtext::-webkit-scrollbar-thumb:hover {
  background: rgba(90,52,36,.4);
}


/* keepsakes and records: caption and date centred */
.sheet.keep :is(#rtext,.utext) {
  text-align: center;
  overflow-wrap: anywhere;
}

.sheet.keep :is(#rtext,.utext):empty {
  display: none;
}

/* editing a record or keepsake with no caption: the line shows, so there is somewhere to type */
.sheet.keep #rtext[contenteditable] {
  display: block;
  min-height: 32px;
}

.sheet.keep #rtext[contenteditable]:empty::before {
  content: "Add a few words";
  opacity: .35;
}

.sheet.keep time {
  text-align: center;
  margin-top: 8px;
  opacity: .5;
}

/* a long note's text scrolls under the finger, and edits; anywhere else a drag moves between notes */
#sheet:not(.pola):not(.keep) #rtext {
  cursor: grab;
}

#sheet:not(.pola):not(.keep) #rtext.scrollable {
  touch-action: pan-y;
  cursor: default;
}

#edate {
  display: block;
  margin: 14px 0 0 auto;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed rgba(90,52,36,.35);
  background: none;
  font: 500 20px Caveat, cursive;
  color: var(--ink);
}

.sheet:not(.pola):not(.keep) > .face > #edate {
  margin-top: auto;
}

.sheet.keep #edate {
  margin: 8px auto 0;
}

#sheet #rtext[contenteditable] {
  touch-action: pan-y;
  cursor: text;
}

.tojars{position:absolute;top:0;left:24px;z-index:1;color:var(--soft);font-weight:600;text-decoration:none} /* a jar's own page: back to My Jars, taking no room from the jar */
.hero{text-align:center;padding-top:4px}
.hero h1{margin:0;font:500 clamp(1.5rem,4.5vw,2.2rem)/1.15 Fraunces,Georgia,serif;letter-spacing:-.01em}
.hero p{margin:6px auto 0;max-width:30em;font-size:clamp(.95rem,2.6vw,1.05rem);line-height:1.4;color:var(--soft)}
.trial{margin:4px 0 0;font-size:.8rem;color:var(--soft);opacity:.8}
html:not(.in) body{height:auto;min-height:100dvh} /* a visitor's page scrolls on to more about Memory Jars; the jar still fills the first screen. At least the screen tall, so the background never repeats in stripes while the page loads */
html:not(.in) main{flex:none;height:calc(100lvh - 68px)} /* 68px: the top bar. lvh: the screen with the browser bars hidden, so the jar keeps one size while the page scrolls */
.in .intro{display:none}
.intro{width:100%;max-width:1000px;margin:0 auto;padding:32px 24px 48px;display:grid;gap:64px;text-align:center}
.intro h2{margin-bottom:20px;font:500 clamp(1.4rem,4vw,1.9rem)/1.2 Fraunces,Georgia,serif}
.intro ol,.intro ul{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.intro li{display:grid;gap:6px;justify-items:center;align-content:start;padding:22px 18px;border-radius:18px;background:rgba(255,250,245,.7);box-shadow:0 8px 24px rgba(90,52,36,.08)}
.intro b{font:600 1.1rem Nunito,sans-serif}
.intro span{color:var(--soft);line-height:1.45}
.how ol{counter-reset:step}
.how li::before{counter-increment:step;content:counter(step);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#f6dccf;font-weight:700}
.ideas ul{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.ideas svg{width:40px;height:40px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.trust li{background:none;box-shadow:none}
.cta .drop{display:inline-block;text-decoration:none}
.sheet.keep .face{background:rgba(255,250,245,.55)} /* a keepsake or record on a plain see-through card */
