/* Brain Dump: one cute daily-journal page. Dotted paper on a pink gingham desk, soft folded sticky notes,
   a kitten peeking over the schedule, thin handwriting on faint ruled lines. */
@font-face { font-family: "Mali"; font-weight: 300; src: url("fonts/mali-vietnamese-300.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 300; src: url("fonts/mali-latin-ext-300.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 300; src: url("fonts/mali-latin-300.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 400; src: url("fonts/mali-vietnamese-400.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 400; src: url("fonts/mali-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 400; src: url("fonts/mali-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 500; src: url("fonts/mali-vietnamese-500.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 500; src: url("fonts/mali-latin-ext-500.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Mali"; font-weight: 500; src: url("fonts/mali-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }

:root {
  --ink: #74686c; --ink-2: #9a8e92; --head: #64585c; --faint: #cbbfc3;
  --pink: #f4a6b8; --pink-d: #e98ca3; --red: #ec7f97;
  --blue: #e3effc; --blue-b: #c5dbf2; --pinkn: #fce6ec; --pink-b: #f4cad5; --yel: #fdf0c9; --yel-b: #f2dc9e;
  --lilac: #efe8fb; --lilac-b: #d9cdf2; --rev: #fdebf0; --rev-b: #f5cbd6;
  --hand: "Mali", system-ui, sans-serif;
  --paper: #fffcfb; --dot: #f2e2e6; --check: rgba(247, 160, 182, 0.32);
}
/* the day's mood tints the paper and the cloth */
body[data-mood="vui"] { --paper: #fffbef; --dot: #f3e6c6; --check: rgba(245, 196, 110, 0.3); }
body[data-mood="yeu"] { --paper: #fff6f8; --dot: #f6d4de; --check: rgba(244, 140, 170, 0.4); }
body[data-mood="met"] { --paper: #fbf9fe; --dot: #e6def3; --check: rgba(190, 170, 230, 0.32); }
body[data-mood="buon"] { --paper: #f7fafe; --dot: #dbe6f3; --check: rgba(140, 180, 230, 0.3); }
body[data-mood="cang"] { --paper: #f6fcf8; --dot: #d9ecdf; --check: rgba(130, 200, 160, 0.3); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: #f7f2ee; color: var(--ink); font: 300 15px/1.5 var(--hand); overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: #fbd6df; }

/* the gingham cloth under the page */
.gingham {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: #fff;
  background-image: linear-gradient(90deg, var(--check) 50%, transparent 50%), linear-gradient(var(--check) 50%, transparent 50%);
  background-size: 24px 24px;
  clip-path: polygon(100% 6%, 100% 100%, 0 100%, 0 64%, 24% 72%, 48% 60%, 72% 42%, 88% 20%);
}

.acct { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: var(--pink); color: #fff; font-weight: 500; box-shadow: 0 3px 10px rgba(233, 140, 163, 0.35); }

/* the page: a soft sheet of dotted paper */
.page {
  position: relative; max-width: 980px; margin: max(30px, env(safe-area-inset-top)) auto 18px; padding: 28px 34px 36px;
  background-color: var(--paper); border-radius: 26px; transition: background-color 0.6s;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.2px); background-size: 16px 16px;
  box-shadow: 0 0 0 1px #f1e3e6, 0 18px 50px rgba(150, 110, 120, 0.16);
}
@media (max-width: 720px) { .page { margin: 62px 10px 18px; padding: 20px 16px 26px; border-radius: 20px; } }

.head { text-align: center; margin-bottom: 16px; }
.head h1 { margin: 0; font: 500 clamp(30px, 5.4vw, 40px)/1.15 var(--hand); color: var(--head); letter-spacing: 0.5px; }
.head h1::before, .head h1::after { content: "✦"; font-size: 0.42em; color: var(--pink); vertical-align: 0.7em; margin: 0 10px; }
.head h1::after { color: #a9cbef; }
.daynav { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.daynav button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; }
.daynav button:hover { background: #fbe8ed; }
.date { margin: 0; font: 300 16px var(--hand); color: var(--ink-2); }
.daynav .back { width: auto; padding: 0 10px; height: 24px; border-radius: 99px; font-size: 13px; background: #fbe8ed; color: var(--pink-d); }

.cols { display: grid; grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 34px; align-items: start; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; gap: 24px; } .cols > .right { display: contents; } .cols .mood-row { order: -3; } .cols .journal { order: -2; } .cols > .left { order: -1; } }
.left { display: grid; gap: 30px; padding-top: 54px; }
.right { display: grid; gap: 24px; }

/* folded sticky notes */
.note { position: relative; padding: 14px 16px 18px; border: 1.5px solid var(--b); background: var(--bg); border-radius: 10px 10px 2px 10px; min-height: 108px; }
.note::after { content: ""; position: absolute; right: -1.5px; bottom: -1.5px; width: 22px; height: 22px; background: linear-gradient(135deg, var(--b) 0 49%, var(--paper) 51%); border-top-left-radius: 6px; transition: background 0.6s; }
.note.blue { --bg: var(--blue); --b: var(--blue-b); }
.note.pink { --bg: var(--pinkn); --b: var(--pink-b); }
.note.yellow { --bg: var(--yel); --b: var(--yel-b); }
.note.lilac { --bg: var(--lilac); --b: var(--lilac-b); min-height: 0; }
.cat-peek { position: absolute; top: -60px; left: 14px; width: 90px; height: auto; }
.note h2, .ideas h2, .journal h2, .review h2 { margin: 0 0 8px; font: 400 18px var(--hand); color: var(--head); }
.note h2 { text-align: center; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(111, 99, 103, 0.45); text-underline-offset: 5px; }
.note.peek h2 { text-align: right; }
.n { font: 400 11px var(--hand); color: var(--pink-d); vertical-align: 4px; margin-left: 2px; }
.n:empty { display: none; }
.sticker-tl { position: absolute; top: 9px; left: 10px; width: 32px; height: 32px; }
.note.yellow h2 { padding-left: 28px; }
.star { position: absolute; font-size: 15px; }
.star.s1 { right: 34px; bottom: 26px; color: #a9cbef; }
.star.s2 { right: 54px; bottom: 12px; color: #f2c66b; font-size: 12px; }
.deco { display: flex; justify-content: center; gap: 9px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--pink-b); font-size: 12px; color: var(--red); }
.deco .y { color: #e8be5a; } .deco .b { color: #8db6ea; }

/* handwritten lists */
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.lines:empty::after { content: attr(data-empty); display: block; padding: 2px 2px; color: var(--faint); font-size: 14px; }
.item { display: flex; align-items: flex-start; gap: 8px; padding: 3px 4px; border-radius: 8px; transition: background 0.15s; }
.item:hover { background: rgba(255, 255, 255, 0.55); }
.box { flex: none; width: 15px; height: 15px; margin-top: 4px; border-radius: 4px; border: 1.3px solid #d6b3bd; background: rgba(255, 255, 255, 0.8); display: grid; place-items: center; padding: 0; }
.box::after { content: "✓"; font: 500 13px/1 var(--hand); color: var(--red); transform: scale(0); transition: transform 0.2s; margin-top: -2px; }
.item.done .box::after { transform: scale(1.2) rotate(-8deg); }
.body { flex: 1; min-width: 0; cursor: pointer; }
.t { display: block; font: 300 15px/1.45 var(--hand); color: var(--ink); word-wrap: break-word; }
.item.done .t { text-decoration: line-through; text-decoration-color: rgba(236, 127, 151, 0.7); color: #c2b6ba; }
.time { flex: none; font: 400 13px/1.7 var(--hand); color: var(--ink-2); min-width: 40px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1px; }
.tag, .due, .flag { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 99px; font-size: 10.5px; line-height: 16px; background: rgba(255, 255, 255, 0.7); color: var(--ink-2); }
.due.today { color: #b98a1c; background: #fff5d8; }
.due.late { color: var(--red); background: #ffeaef; }
.flag { color: var(--red); background: #ffeaef; }
.pin { flex: none; margin-top: 2px; font-size: 12px; color: #b9a5dc; }

/* mood: words, the chosen one underlined with a little heart */
.mood-row { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; font: 400 16px var(--hand); }
.mood-row .label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; color: var(--head); }
.moods { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.moods button { position: relative; border: 0; background: none; padding: 2px 6px; font: 300 15px var(--hand); color: var(--faint); transition: color 0.15s; }
.moods button:hover { color: var(--ink-2); }
.moods button.on { color: var(--pink-d); font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.moods button.on::after { content: "♥"; position: absolute; top: -8px; right: -3px; font-size: 9px; color: var(--red); animation: pop 0.3s ease-out; }
.mood-name { display: none; }

/* the journal: thin handwriting on faint ruled lines */
.journal { position: relative; }
.journal h2 { display: flex; align-items: baseline; gap: 10px; }
.saved { font: 300 12px var(--hand); color: #9ac6a6; }
.journal textarea {
  width: 100%; min-height: 290px; resize: vertical; border: 0; outline: none; padding: 0 4px; color: var(--ink);
  font: 300 16px/30px var(--hand); background: transparent;
  background-image: linear-gradient(transparent 29px, #f5e0e6 29px, #f5e0e6 30px); background-size: 100% 30px; background-attachment: local;
}
.journal textarea::placeholder { color: #d4c9cd; }
.found { margin-top: 12px; padding: 10px 12px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.85); border: 1px dashed var(--pink-b); }
.found p { margin: 0 0 8px; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.found p b { font-weight: 500; color: var(--pink-d); }
.preview { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 1px 2px 1px 10px; border-radius: 99px; font-size: 14px; border: 1px solid var(--line, #f4cad5); background: var(--fill, #fff); animation: pop 0.25s ease-out; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.chip small { color: var(--ink-2); font-size: 11px; }
.chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--pink); color: #fff; font: 500 14px/1 var(--hand); padding: 0; }
.chip button:hover { background: var(--pink-d); }
.chip.task { --fill: #fdf0f3; } .chip.buy { --fill: #fff7e2; --line: #f2dc9e; } .chip.idea { --fill: #eef5fe; --line: #c5dbf2; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border-radius: 99px; border: 0; background: var(--pink); color: #fff; font: 400 15px var(--hand); box-shadow: 0 3px 8px rgba(233, 140, 163, 0.28); }
.btn:active { transform: scale(0.96); }
.btn.small { min-height: 26px; padding: 0 11px; font-size: 13px; margin-left: auto; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--pink-b); box-shadow: none; }
.btn.danger { color: var(--red); }
.link { border: 0; background: none; color: var(--pink-d); font-size: 13px; text-decoration: underline; padding: 6px 0 0; }

/* the pink "coming up" card */
.review { position: relative; padding: 14px 16px 16px; border: 1.5px solid var(--rev-b); background: var(--rev); border-radius: 14px; }
.review h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.review .tick { color: var(--red); }
.cat-hug { position: absolute; right: 8px; bottom: -10px; width: 76px; height: auto; pointer-events: none; }
.review .lines { padding-right: 74px; min-height: 56px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.day { display: grid; justify-items: center; padding: 4px 0 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.7); border: 1px solid transparent; font: 400 14px var(--hand); line-height: 1.2; color: var(--ink); }
.day small { font-size: 10px; color: var(--ink-2); }
.day i { height: 4px; display: flex; gap: 2px; margin-top: 2px; }
.day i span { width: 4px; height: 4px; border-radius: 50%; background: var(--pink-d); }
.day.today { border-color: var(--pink); }
.day.on { background: var(--pink); color: #fff; }
.day.on small { color: #fff; }
.day.on i span { background: #fff; }

/* the month of moods */
.month { max-width: 440px; --vui: #fbe0a0; --yeu: #f8bfcf; --met: #d9ccf2; --buon: #c4daf2; --cang: #c2e6cf; }
.month h2 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; font: 400 18px var(--hand); color: var(--head); }
.month h2 > span:first-child::before { content: "☾ "; color: #c9b5ea; }
.m-nav { display: inline-flex; align-items: center; gap: 2px; font: 300 14px var(--hand); color: var(--ink-2); }
.m-nav b { font-weight: 400; min-width: 74px; text-align: center; }
.m-nav button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); font-size: 16px; }
.m-nav button:hover { background: #fbe8ed; }
.m-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.m-grid i { font-style: normal; text-align: center; font-size: 10.5px; color: var(--ink-2); }
.md { position: relative; aspect-ratio: 1; border: 1px solid #f1e3e7; border-radius: 9px; background: rgba(255, 255, 255, 0.75); font: 300 12px var(--hand); color: var(--ink-2); padding: 0; transition: transform 0.15s; }
.md:hover { transform: scale(1.08); }
.md.vui { background: var(--vui); border-color: transparent; color: var(--ink); }
.md.yeu { background: var(--yeu); border-color: transparent; color: var(--ink); }
.md.met { background: var(--met); border-color: transparent; color: var(--ink); }
.md.buon { background: var(--buon); border-color: transparent; color: var(--ink); }
.md.cang { background: var(--cang); border-color: transparent; color: var(--ink); }
.md.wrote::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--pink-d); }
.md.today { box-shadow: 0 0 0 1.5px var(--pink); }
.md.on { box-shadow: 0 0 0 2px var(--head); font-weight: 500; }
.m-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 11px; color: var(--ink-2); }
.m-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; background: var(--c); }
.m-legend .vui { --c: var(--vui); } .m-legend .yeu { --c: var(--yeu); } .m-legend .met { --c: var(--met); } .m-legend .buon { --c: var(--buon); } .m-legend .cang { --c: var(--cang); }
.m-legend .wrote::before { width: 4px; height: 4px; border-radius: 50%; vertical-align: 2px; background: var(--pink-d); }

.ideas h2::before { content: "✦ "; color: #f2c66b; font-size: 0.8em; }
.ideas .notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.sticky { position: relative; min-height: 84px; padding: 16px 12px 10px; border-radius: 3px 3px 12px 3px; font: 300 14px/1.4 var(--hand); color: var(--ink); cursor: pointer; box-shadow: 0 4px 10px rgba(150, 110, 90, 0.1); transform: rotate(var(--r, -1.5deg)); transition: transform 0.2s; word-wrap: break-word; }
.sticky::before { content: ""; position: absolute; top: -7px; left: 50%; width: 38px; height: 13px; margin-left: -19px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(220, 200, 205, 0.5); transform: rotate(-3deg); }
.sticky:hover { transform: rotate(0) scale(1.03); }

.done-box summary { list-style: none; cursor: pointer; font: 400 15px var(--hand); color: var(--ink-2); padding: 2px 0; }
.done-box summary::-webkit-details-marker { display: none; }
.done-box summary::before { content: "▸ "; color: var(--pink); }
.done-box[open] summary::before { content: "▾ "; }
.done-box .lines { margin-top: 4px; }

.hello { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 10px 6px; }
.hello h2 { margin: 6px 0 0; font: 400 22px var(--hand); color: var(--head); }
.hello p { margin: 0 0 6px; color: var(--ink-2); max-width: 420px; }

/* edit dialog */
.edit { border: 0; border-radius: 20px; padding: 0; width: min(420px, calc(100vw - 32px)); background: #fffcfb; color: var(--ink); box-shadow: 0 24px 50px rgba(110, 80, 90, 0.25); }
.edit::backdrop { background: rgba(90, 70, 76, 0.28); }
.edit form { display: grid; gap: 12px; padding: 20px 18px 18px; }
.edit h3 { margin: 0; font: 400 20px var(--hand); color: var(--head); }
.edit textarea, .edit input[type="date"], .edit input[type="time"] { width: 100%; border: 1px solid var(--pink-b); border-radius: 10px; padding: 8px 12px; font: inherit; color: var(--ink); background: #fff; }
.edit textarea { font: 300 16px/1.45 var(--hand); resize: vertical; }
.edit .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.edit .checkrow { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cats button { padding: 7px 2px; border-radius: 10px; border: 1px solid var(--pink-b); background: #fff; font-size: 13px; }
.cats button.on { background: #fdebf0; color: var(--pink-d); border-color: var(--pink); }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; }
.edit-actions .danger { margin-right: auto; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); padding: 8px 18px; border-radius: 99px; background: #fff; color: var(--ink); box-shadow: 0 8px 20px rgba(110, 80, 90, 0.18); font-size: 14px; transition: transform 0.3s, opacity 0.3s; z-index: 50; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { color: var(--red); }
.foot { text-align: center; color: var(--faint); font-size: 11px; padding: 4px 16px 24px; }

/* stickers stuck on the page */
.stickers { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.journal > :not(.stickers) { position: relative; z-index: 1; }
.journal > h2 { z-index: 5; }
.stk { position: absolute; width: 52px; height: 52px; transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s)); filter: drop-shadow(0 3px 3px rgba(120, 80, 90, 0.18)); touch-action: none; }
.stk img { width: 100%; height: 100%; display: block; -webkit-user-select: none; user-select: none; }
.stk.new { animation: stick 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.stk-x { display: none; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #fff; background: var(--red); color: #fff; font: 500 14px/1 var(--hand); padding: 0; }
.sticking .stk { pointer-events: auto; cursor: grab; outline: 1.5px dashed rgba(236, 127, 151, 0.6); outline-offset: 3px; border-radius: 8px; }
.sticking .stk.drag { cursor: grabbing; z-index: 2; transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) * 1.15)); }
.sticking .stk-x { display: grid; place-items: center; }
.stk-btn { margin-left: auto; border: 1px dashed var(--pink-b); background: rgba(255, 255, 255, 0.7); border-radius: 99px; padding: 2px 10px; font: 300 12px var(--hand); color: var(--pink-d); }
.sticking .stk-btn { background: var(--pink); color: #fff; border-style: solid; }
.tray { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(560px, calc(100vw - 20px)); padding: 10px 12px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--pink-b); box-shadow: 0 12px 30px rgba(110, 80, 90, 0.2); display: grid; gap: 6px; animation: rise 0.25s ease-out; }
.tray p { margin: 0; font-size: 12px; color: var(--ink-2); text-align: center; }
.tray-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.tray-row button { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 1px solid #f6e3e8; background: #fffafb; padding: 5px; }
.tray-row button:active { transform: scale(0.9); }
.tray-row img { width: 100%; height: 100%; }
.tray .btn { justify-self: center; margin: 0; }

/* sakuga-style tick: squash, smoke puffs, speed lines and a sound word */
.item.ticking { animation: squash 0.42s cubic-bezier(0.3, 1.5, 0.5, 1); }
.item.ticking .box::after { transform: scale(1.3) rotate(-8deg); }
.item.ticking .t { text-decoration: line-through; text-decoration-color: var(--red); }
.fx { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.fx .puff { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1.5px solid #f4a6b8; opacity: 0; animation: puff 0.75s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
.fx .ray { position: absolute; left: 0; top: -1px; width: 15px; height: 2px; border-radius: 2px; background: var(--red); transform-origin: 0 50%; transform: rotate(var(--a)) translateX(8px) scaleX(0); animation: ray 0.42s ease-out forwards; }
.fx .sfx { position: absolute; left: 12px; top: -40px; white-space: nowrap; font: 500 22px/1 var(--hand); color: var(--red); letter-spacing: 1px; text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 2px 2px #fff, -2px -2px #fff, 2px -2px #fff, -2px 2px #fff, 3px 4px 0 rgba(236, 127, 151, 0.3); transform-origin: 0 100%; animation: sfx 1s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }
@keyframes squash { 0% { transform: scale(1); } 25% { transform: scale(1.04, 0.84); } 55% { transform: scale(0.98, 1.07); } 100% { transform: scale(1); } }
@keyframes puff { 0% { opacity: 1; transform: translate(0, 0) scale(0.3); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s)); } }
@keyframes ray { 45% { transform: rotate(var(--a)) translateX(13px) scaleX(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(30px) scaleX(0.2); opacity: 0; } }
@keyframes sfx { 0% { transform: scale(0.2) rotate(calc(var(--r) - 25deg)); opacity: 0; } 30% { transform: scale(1.25) rotate(var(--r)); opacity: 1; } 45% { transform: scale(0.95) rotate(var(--r)); } 60% { transform: scale(1.04) rotate(var(--r)); } 80% { opacity: 1; } 100% { transform: translateY(-12px) scale(1) rotate(var(--r)); opacity: 0; } }
@keyframes stick { 0% { transform: translate(-50%, -50%) rotate(calc(var(--r) - 30deg)) scale(0.2); } 100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s)); } }
@keyframes rise { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* search button, next to the account button */
.acct.find-btn { right: 62px; background: #fff; color: var(--pink-d); border-color: #fbe0e7; font-size: 22px; line-height: 1; box-shadow: 0 3px 10px rgba(233, 140, 163, 0.2); }
/* reminders */
.bell { margin-top: 10px; border: 1px dashed var(--blue-b); background: rgba(255, 255, 255, 0.6); border-radius: 99px; padding: 2px 10px 2px 8px; font: 300 12px var(--hand); color: var(--ink-2); filter: grayscale(1); opacity: 0.8; }
.bell.on { filter: none; opacity: 1; border-style: solid; color: #5f8fc9; background: #fff; }
.bell.on { animation: wiggle 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes wiggle { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-6deg); } 93% { transform: rotate(5deg); } 96% { transform: rotate(-3deg); } }
/* this week, summed up */
.sum { position: relative; padding: 14px 16px 14px; border: 1.5px solid var(--lilac-b); background: linear-gradient(160deg, #f8f3ff, #fff4f7); border-radius: 14px; }
.sum h2 { margin: 0 0 10px; font: 400 18px var(--hand); color: var(--head); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.sum-cat { position: absolute; top: -40px; right: 18px; width: 70px; height: auto; transform: scaleX(-1); }
.sum-moods { display: flex; gap: 6px; justify-content: space-between; max-width: 360px; }
.sm { display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 0; }
.sm i { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); border: 1px dashed #e3d6e6; transition: transform 0.15s; }
.sm i[style] { border: 0; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.05); }
.sm:hover i { transform: scale(1.12); }
.sm small { font-size: 10px; color: var(--ink-2); }
.sm.today small { color: var(--pink-d); font-weight: 500; }
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.sum-stats div { display: grid; justify-items: center; text-align: center; padding: 6px 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.75); }
.sum-stats b { font: 500 18px/1.2 var(--hand); color: var(--pink-d); }
.sum-stats small { font-size: 10px; line-height: 1.25; color: var(--ink-2); }
.sum-say { margin: 10px 0 0; font: 400 14px var(--hand); color: var(--head); }
@media (max-width: 420px) { .sum-stats { grid-template-columns: repeat(2, 1fr); } }
/* search dialog */
.edit.find { width: min(520px, calc(100vw - 24px)); max-height: min(78vh, 640px); margin-top: max(60px, 8vh); }
.find-head { position: sticky; top: 0; display: flex; gap: 8px; padding: 14px 14px 10px; background: var(--paper); z-index: 1; }
.find-head input { flex: 1; min-width: 0; border: 1px solid var(--pink-b); border-radius: 99px; padding: 8px 14px; font: 300 15px var(--hand); color: var(--ink); background: #fff; outline: none; }
.find-head input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px #fde6ec; }
.find-head .btn.small { margin: 0; }
.find-res { padding: 0 14px 16px; display: grid; gap: 6px; }
.find-res h4 { margin: 8px 0 2px; font: 400 13px var(--hand); color: var(--ink-2); }
.find-hint { margin: 6px 2px; font-size: 13px; color: var(--ink-2); }
.hit { display: grid; gap: 2px; text-align: left; border: 1px solid #f4e4e8; background: #fff; border-radius: 12px; padding: 8px 10px; }
.hit:hover { border-color: var(--pink-b); }
.hit-d { justify-self: start; padding: 0 8px; border-radius: 99px; background: #f5eef0; font-size: 11px; line-height: 18px; color: var(--ink); }
.hit-l { font: 300 14px/1.4 var(--hand); color: var(--ink); }
.hit small { font-size: 11px; color: var(--ink-2); }
mark { background: #ffe1a8; color: inherit; border-radius: 3px; padding: 0 1px; }

/* export / install */
.tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.tool { border: 1px dashed var(--pink-b); background: rgba(255, 255, 255, 0.75); border-radius: 99px; padding: 4px 12px; font: 300 13px var(--hand); color: var(--ink-2); }
.tool:hover { color: var(--pink-d); border-style: solid; }
