/* Design 1: a quiet home for the single action of publishing. */
html { scroll-padding-top: 16px; }
body { min-height: 100svh; background-color: #f7edda; background-attachment: fixed; }
.app-shell {
  width: min(100%, 440px);
  max-width: 440px;
  min-height: min(820px, calc(100svh - 48px));
  margin: 24px auto;
  padding: 15px 22px 0;
  display: flex;
  flex-direction: column;
  border: 2px solid #edc598;
  border-radius: 38px 36px 39px 37px;
  background: radial-gradient(ellipse at 48% 39%, #fff9e9 0%, transparent 55%), linear-gradient(165deg, #fff9ed, #fff3d8 80%, #fff9ec);
  box-shadow: 0 14px 55px #8b5e2410, inset 0 0 0 4px #fff9ee;
  overflow: clip;
}
.app-shell::after { display: none; }
.masthead { flex-shrink: 0; }
.topline { height: 24px; color: #b59c7a; font-size: 12px; letter-spacing: .5px; }
.settings-entry { min-width: 32px; min-height: 32px; margin-right: -6px; color: #b69a71; }
.settings-entry .icon { width: 20px; height: 20px; }
.brand-row { padding: 20px 0 12px; }
h1 { font-size: 33px; letter-spacing: 1px; color: #ee781f; }
.outline-heart { font-size: 26px; }
.ribbon { font-size: 14px; letter-spacing: 1.3px; margin-top: 10px; padding: 3px 23px; background: #ffeac0; }
.flower { top: 27px; width: 29px; height: 43px; }
.left-flower { left: -1px; }
.right-flower { right: -1px; }
.view-container { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-view { min-width: 0; flex: 1; padding: 10px 0 24px; }
.app-view[hidden] { display: none !important; }
.home-view { display: flex; flex-direction: column; padding: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; margin: -1px; border: 0; }
.home-panel { padding: 0; margin: 0; border: 0; background: none; box-shadow: none; min-height: 0; border-radius: 0; flex: 1; display: flex; flex-direction: column; align-items: center; }
.home-illustration { --art-size: clamp(245px, 35svh, 310px); position: relative; flex-shrink: 0; width: 100%; height: var(--art-size); display: grid; place-items: center; margin: 2px 0 8px; isolation: isolate; }
.home-illustration::before { content: ""; width: 94%; height: 30%; position: absolute; bottom: 1%; border-radius: 50%; background: radial-gradient(ellipse, #e3e8b667, #f4edbe33 55%, transparent 72%); transform: rotate(-2deg); z-index: -1; }
.home-illustration .hero-art { position: relative; inset: auto; width: var(--art-size); height: var(--art-size); aspect-ratio: 1; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; transform: rotate(0); }
.hero-art img { filter: drop-shadow(0 5px 5px #af874d0e); }
.home-illustration .hero-art .jar-count { bottom: 6%; right: 7%; padding: 2px 10px; transform: rotate(-4deg); background: #fff4d8e8; }
.home-illustration .hero-art .mini-candy { width: 24px; height: 24px; }
.floating-heart { position: absolute; top: 11%; left: 2%; color: #edac8d; font: 54px/1 Georgia, serif; transform: rotate(-16deg); text-shadow: 2px 2px 0 #fff2d6; }
.home-star { position: absolute; color: #efc660; font: 32px/1 Georgia, serif; }
.star-left { left: 5%; top: 55%; transform: rotate(-12deg); }
.star-right { right: 1%; top: 26%; font-size: 21px; color: #eac580; }
.home-flower { position: absolute; width: 26px; height: 40px; bottom: 4%; z-index: -1; }
.flower-a { left: 0; transform: rotate(-17deg); opacity: .7; }
.flower-b { right: -1px; transform: rotate(15deg) scale(.8); opacity: .8; }
.home-view .stats { align-self: stretch; margin: 7px 0 18px; gap: 9px; }
.home-view .stat { border-radius: 15px; padding: 9px 2px 10px; display: flex; flex-direction: column; gap: 2px; background: #fffaf0c9; border-color: #efdcba; box-shadow: 0 2px 0 #e8cda415; }
.home-view .stat strong { font-size: 28px; line-height: 1.3; color: #754528; }
.home-view .stat > span { font-size: 13px; letter-spacing: .3px; color: #876345; }
.home-panel .checkin-button { margin: 0; width: 100%; min-height: 56px; font-size: 20px; letter-spacing: .6px; border: 2px solid #f3b824; background: linear-gradient(110deg, #ffe995, #ffda60 65%, #ffe482); box-shadow: inset 0 3px 0 #fff5c5, 0 4px 0 #e9bc4d25; }
.home-panel .checkin-button .icon { width: 25px; height: 25px; color: #eb9567; }
.home-panel .checkin-footnote { padding-top: 13px; font-size: 14px; color: #ad7e4d; letter-spacing: .6px; }
.home-panel .checkin-footnote span { color: #ed965f; margin-left: 3px; font-size: 18px; vertical-align: -1px; }
.home-panel .week-status { font-size: 12px; line-height: 1.6; margin-top: 5px; padding: 0; border: 0; background: none; color: #b19a77; }
.home-panel .week-status.done { color: #a48c58; background: none; }
.home-privacy { display: flex; justify-content: center; align-items: center; gap: 5px; color: #b7a486; font-size: 11px; margin: 15px 0 12px; }
.home-privacy > .icon { width: 12px; height: 12px; }
.home-privacy .text-button { font-size: 11px; color: #ad9573; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: auto;
  transform: none;
  grid-template-columns: repeat(5, 1fr);
  flex-shrink: 0;
  align-self: stretch;
  width: calc(100% + 44px);
  margin: auto -22px 0;
  padding: 9px 15px max(12px, env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid #ebd3ad;
  border-radius: 0;
  box-shadow: 0 -5px 20px #a9843b04;
  background: #fffaf0ed;
  backdrop-filter: blur(12px);
}
.bottom-nav a { font-size: 12px; min-height: 45px; gap: 2px; border-radius: 12px; color: #ab865f; }
.bottom-nav .icon { width: 23px; height: 23px; }
.bottom-nav a.active { background: transparent; color: #ec7c27; }
.bottom-nav a.active .icon { fill: #ffd18b9e; stroke-width: 2; }
.app-shell:not([data-page="home"]) .brand-row { padding-top: 20px; padding-bottom: 18px; }
.app-shell:not([data-page="home"]) .ribbon { background: none; clip-path: none; font: 13px/1.6 var(--body); letter-spacing: 1px; color: #ac8d63; padding: 0; margin-top: 9px; }
.app-shell:not([data-page="home"]) h1 { font-size: 30px; }
.paper-card { border-color: #edd6b0; border-radius: 19px; padding: 17px 15px; box-shadow: 0 3px 0 #e9d1ac0e; }
.app-view .section-heading h2 { font-size: 16px; }
.app-view .section-heading .text-button { font-size: 12px; }
.week-grid { gap: 7px; margin-top: 12px; }
.week-tile { min-height: 92px; }
.week-label { font-size: 15px; }
.current-records { margin-top: 18px; }
.current-records .record-item:first-child { margin-top: 12px; }
.current-records .record-item { padding: 14px 0; }
.current-records .record-item > div { font-size: 14px; }
.current-records .record-item time { font-size: 12px; }
.current-records .modal-empty { font-size: 13px; line-height: 2; padding: 24px 0 12px; }
.page-illustration { padding: 14px 0 4px; text-align: center; }
.page-illustration img { display: block; width: 165px; height: 165px; object-fit: contain; margin: 0 auto; opacity: .9; }
.page-illustration p { color: #b29b78; font-size: 12px; margin-top: 8px; }
.wallet { border: 1px solid #eedbb2; border-radius: 16px; background: #fff4d7; padding: 13px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 17px/1.5 var(--display); margin-bottom: 16px; }
.wallet strong { font-size: 26px; margin-left: 3px; }
.wallet-candy { color: #dc9b2c; background: #ffe49a; border: 1px solid #e7bb58; border-radius: 50%; padding: 7px; display: flex; }
.wallet-candy .icon { width: 23px; height: 23px; }
.rewards-section .section-heading { margin-bottom: 10px; }
.rewards-section .section-heading h2 { font-size: 14px; color: #a28258; font-weight: 500; }
.reward-grid { grid-template-columns: 1fr; }
.reward-item { display: grid; grid-template-columns: 82px minmax(0, 1fr) 76px; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center; padding: 14px 0; min-height: 115px; }
.reward-item:not(:nth-child(3n+1)) { border-left: 0; }
.reward-item + .reward-item { border-top: 1px solid #f0e2c9; }
.reward-item:nth-child(n+4) { margin-top: 0; }
.reward-item .reward-art { grid-column: 1; grid-row: 1 / 3; text-align: center; font-size: 42px; margin: 0; }
.reward-item .reward-art.illustrated { width: 82px; height: 96px; margin: -5px 0; }
.reward-item h3 { grid-column: 2; grid-row: 1; align-self: end; min-height: 0; font-size: 16px; line-height: 1.5; padding-bottom: 4px; }
.reward-cost { grid-column: 2; grid-row: 2; align-self: start; margin: 0; font-size: 14px; color: #b4814a; }
.redeem-button { grid-column: 3; grid-row: 1 / 3; min-height: 37px; font-size: 14px; background: #ffa629; border-color: #ed9628; }
.redeem-button.restock { font-size: 12px; }
.reward-remove { display: none; grid-column: 2 / 4; grid-row: 3; justify-self: end; margin-top: 6px; padding: 3px 0; font-size: 12px; }
.rewards-section.managing .reward-remove { display: block; }
.add-reward-button { width: 100%; min-height: 48px; background: #fcf7ea; border-color: #e9d5b1; border-radius: 15px; font: 600 16px/1.5 var(--display); }
.add-reward-button .icon { width: 21px; height: 21px; margin-right: 3px; }
.view-intro { font: 14px/1.8 var(--display); text-align: center; color: #976e47; margin: -3px 0 19px; letter-spacing: .7px; }
.view-intro span { color: #e9a168; font-family: var(--body); }
.emotion-types { gap: 10px; }
.emotion-type { border-radius: 18px; padding-top: 13px; }
.emotion-type strong { font-size: 14px; }
.emotion-type > span:last-child { font-size: 11px; }
.journal-heading { margin: 22px 0 9px; }
.journal-card { background: #fffcf4c4; border: 1px solid #efddbe; border-radius: 16px; padding: 15px; margin-bottom: 11px; }
.journal-card .journal-type { font-size: 12px; color: #b79c78; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.journal-card .journal-type .icon { width: 16px; height: 16px; color: #d2a664; }
.journal-card > p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.journal-card .entry-meta { font-size: 12px; justify-content: space-between; margin-top: 10px; }
.journal-card .text-button { font-size: 12px; padding: 0; }
#ideas { position: relative; padding-bottom: 20px; display: flex; flex-direction: column; }
#idea-list { flex: 1; }
.filter-tabs { margin-bottom: 18px; }
.filter-tabs button { font-size: 14px; min-height: 34px; }
.idea-entry { border: 1px solid #eddbb8; border-radius: 16px; padding: 15px 12px; background: #fffcf5bf; margin-bottom: 12px; }
.idea-entry p { font-size: 15px; }
.idea-entry .entry-meta { font-size: 12px; }
.idea-entry .tag { font-size: 12px; background: none; padding-left: 0; color: #c5975e; }
.floating-add { position: sticky; align-self: flex-end; flex-shrink: 0; bottom: 90px; right: 0; width: 53px; height: 53px; display: grid; place-items: center; margin: 16px 0 0; color: #fff9de; border-width: 2px; }
.floating-add .icon { width: 31px; height: 31px; }
.app-view .empty-note { padding: 38px 10px; font-size: 13px; line-height: 2; }
.app-view .empty-note > button { font-size: 13px; }
.settings-section { background: #fffcf5b8; }
.settings-section summary { font-size: 16px; cursor: pointer; }
.settings-section summary > span .icon { color: #cc9154; }
.setting-row { font-size: 14px; }
.setting-row label small { font-size: 12px; }
.settings-save { margin-bottom: 2px; min-height: 40px; }
.backup-card h2 { display: flex; align-items: center; gap: 8px; font: 700 16px var(--display); }
.backup-card h2 .icon { width: 20px; height: 20px; color: #c29159; }
.backup-card .section-intro { font-size: 13px; line-height: 1.9; margin-top: 12px; }
.backup-card .section-note { font-size: 12px; }
.toast { bottom: 90px; }
/* Small confectionery illustrations, shared by the jar, buttons and feedback. */
.sweet-art { --sweet-base: #efbd43; --sweet-light: #ffe38b; --sweet-edge: #d3a046; fill: none; stroke: none; overflow: visible; }
.hero-art { isolation: isolate; }
.hero-art > img { position: relative; z-index: 2; pointer-events: none; }
.hero-art .mini-candies { z-index: 1; overflow: hidden; }
.home-illustration .hero-art .mini-candy { width: min(var(--sweet-size), calc(var(--art-size) * .105)); height: min(var(--sweet-size), calc(var(--art-size) * .105)); transform: translateX(-50%) rotate(var(--tilt)); }
.hero-art .mini-candy .sweet-art { width: 100%; height: 100%; fill: none; stroke: none; filter: drop-shadow(0 1px 1px #986b3a26); }
.hero-art .jar-count { white-space: nowrap; }
.home-panel .checkin-button .sweet-art { --sweet-base: #ed9caf; --sweet-light: #ffd0d8; --sweet-edge: #cf8c96; width: 28px; height: 28px; transform: rotate(-13deg); filter: drop-shadow(0 1px 1px #b7803a20); }
.wallet-candy { background: none; border: 0; padding: 0 3px; transform: rotate(-12deg); }
.wallet-candy .sweet-art { width: 37px; height: 37px; --sweet-base: #eb98ad; --sweet-light: #ffc6d7; --sweet-edge: #cf8098; }
.flying-candy { width: 36px; height: 36px; filter: drop-shadow(0 3px 3px #9b6e3540); }
.flying-candy .sweet-art { width: 100%; height: 100%; fill: none; stroke: none; }
.jar-pop { animation: sweet-jar-land .5s ease; }
.celebration-burst { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; contain: strict; }
.celebration-particle { position: absolute; will-change: transform, opacity; }
.confetti-ribbon { width: 6px; height: 16px; border-radius: 2px 4px 2px 3px; background: currentColor; box-shadow: inset 1px 0 0 #ffffff78; }
.confetti-ribbon:nth-child(4n) { width: 5px; height: 21px; border-radius: 5px 1px 4px 1px; }
.confetti-ribbon::after { content: ""; position: absolute; left: 2px; right: 1px; top: 2px; height: 5px; border-top: 1px solid #fff9; border-bottom: 1px solid #fff4; }
.confetti-star { width: 15px; height: 15px; }
.confetti-star .icon { width: 100%; height: 100%; fill: currentColor; stroke: #fff9; stroke-width: 1; }
.celebration-halo { position: absolute; width: 56px; height: 20px; border: 1.5px solid #f0ca77; border-radius: 50%; background: #fff1b730; animation: sweet-halo .65s ease-out both; }
.success-modal { position: relative; }
.success-bonus .sweet-art { width: 29px; height: 29px; transform: rotate(12deg); }
.success-sticker { position: absolute; top: 40px; opacity: .8; pointer-events: none; }
.success-sticker .sweet-art { width: 24px; height: 24px; }
.sticker-left { left: 25px; transform: rotate(-23deg); }
.sticker-right { right: 25px; top: 65px; transform: rotate(16deg); }
@keyframes sweet-jar-land { 0%,100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-2.5deg) scale(1.025); } 55% { transform: rotate(2deg) scale(.995); } 80% { transform: rotate(-.8deg); } }
@keyframes sweet-halo { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 0; } 20% { opacity: .8; } 100% { transform: translate(-50%,-50%) scale(2.6); opacity: 0; } }
.emotion-letter { --letter-accent: #b49667; text-align: center; padding: 6px 0 0; }
.emotion-letter.low { --letter-accent: #8c9baf; }
.emotion-letter.hurt { --letter-accent: #c39588; }
.emotion-letter.highlight { --letter-accent: #c89c3e; }
.letter-close { position: absolute; right: 12px; top: 12px; min-width: 31px; min-height: 31px; }
.letter-close .icon { width: 19px; height: 19px; }
.letter-eyebrow { color: var(--letter-accent); font-size: 12px; letter-spacing: 1.3px; display: block; margin-top: 5px; }
.letter-illustration { display: block; object-fit: contain; width: 140px; height: 140px; margin: 13px auto 17px; }
.letter-copy { padding: 0 6px; }
.letter-copy h2 { font: 700 22px/1.65 var(--display); color: #795136; text-wrap: balance; }
.letter-message { font-size: 15px; color: #9a7b58; line-height: 2; margin: 15px 0 0; text-align: left; }
.letter-saved { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 12px; color: var(--letter-accent); margin-top: 21px; }
.letter-saved .icon { width: 15px; height: 15px; }
.letter-accept { display: block; width: 85%; margin: 20px auto 0; min-height: 45px; font-size: 15px; }
.letter-again { display: inline-block; color: #ad9574; font-size: 13px; padding: 8px 12px; margin-top: 7px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #d9c5a3; }
.saved-encouragement { margin-top: 14px; padding: 12px 13px; border-left: 2px solid #e5d0a3; border-radius: 3px 12px 12px 3px; background: #f8edcf66; }
.saved-encouragement.low { background: #eaeaf344; border-color: #c9ccdc; }
.saved-encouragement.hurt { background: #f8e4dd66; border-color: #e1bfb3; }
.saved-encouragement > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #b59d7d; margin-bottom: 6px; }
.saved-encouragement > span .icon { width: 13px; height: 13px; }
.saved-encouragement strong { display: block; font: 600 14px/1.8 var(--display); color: #97794f; }
.saved-encouragement p { font-size: 13px; color: #ab9171; line-height: 1.9; margin-top: 5px; }
@media (max-height: 700px) { .letter-illustration { width: 110px; height: 110px; margin: 8px auto 12px; } .letter-copy h2 { font-size: 20px; } .letter-message { margin-top: 10px; line-height: 1.85; } .letter-saved { margin-top: 14px; } .letter-accept { margin-top: 14px; } }
@media (min-width: 800px) { .desktop-note { left: calc(50% - 420px); top: 210px; } }
@media (max-width: 500px) {
  .app-shell { width: 100%; max-width: 440px; min-height: 100svh; margin: 0 auto; padding: 16px 20px 0; border: 0; border-radius: 0; box-shadow: none; }
  .bottom-nav { width: calc(100% + 40px); margin-left: -20px; margin-right: -20px; }
  .brand-row { padding-top: 20px; }
  .home-illustration { --art-size: clamp(240px, 36svh, 325px); margin-top: 7px; }
  .home-view .stats { margin-top: 9px; }
}
@media (max-height: 740px) {
  .app-shell { padding-top: 10px; }
  .brand-row { padding-top: 12px; padding-bottom: 6px; }
  .home-illustration { --art-size: clamp(190px, 34svh, 260px); margin-top: 0; margin-bottom: 3px; }
  .home-view .stats { margin: 5px 0 13px; }
  .home-view .stat { padding-top: 7px; padding-bottom: 7px; }
  .home-view .stat strong { font-size: 25px; }
  .home-panel .checkin-button { min-height: 50px; font-size: 18px; }
  .home-panel .checkin-footnote { padding-top: 9px; font-size: 13px; }
  .home-privacy { margin: 10px 0 9px; }
  .bottom-nav { padding-top: 7px; padding-bottom: 8px; }
}
@media (max-width: 370px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 29px; }
  .ribbon { font-size: 12px; }
  .flower { width: 24px; }
  .home-panel .checkin-button { font-size: 17px; letter-spacing: .3px; }
  .home-view .stat > span { font-size: 12px; }
  .bottom-nav { width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; }
  .reward-item { grid-template-columns: 68px minmax(0, 1fr) 64px; gap: 8px; }
  .reward-item .reward-art.illustrated { width: 68px; }
  .reward-item h3 { font-size: 14px; }
  .redeem-button { font-size: 13px; }
  .emotion-type strong { font-size: 12px; }
  .emotion-type > span:last-child { font-size: 10px; }
}
