/* Bunnimoo 6.3.0 — celebrations & rewards (bm-joy.js). Soft pastel, no flashing; the calm version has no movement. */
.joy-layer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px 16px calc(18px + var(--safe-b, 0px));
  background: radial-gradient(ellipse at 50% 38%, rgba(255, 246, 214, .985) 0%, rgba(253, 236, 245, .98) 45%, rgba(232, 236, 252, .985) 100%); animation: joyIn .35s ease-out both; }
.joy-layer.out { animation: joyOut .25s ease-in both; }
@keyframes joyIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes joyOut { to { opacity: 0; } }
.joy-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.joy-bit { position: absolute; pointer-events: none; will-change: transform, opacity; }
.joy-bit svg { width: 100%; height: 100%; display: block; }
.joy-bit.dot { border-radius: 50%; }
.joy-card { position: relative; width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.joy-pet { position: relative; width: 188px; height: 188px; display: flex; align-items: center; justify-content: center; }
.joy-pet .charwrap { width: 170px; height: 170px; position: relative; z-index: 1; }
.joy-glow { position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 221, 120, .55) 0%, rgba(255, 190, 214, .35) 45%, rgba(255, 255, 255, 0) 70%); animation: joyGlow 2.6s ease-in-out infinite alternate; }
@keyframes joyGlow { from { transform: scale(.92); opacity: .75; } to { transform: scale(1.06); opacity: 1; } }
.joy-bun.joy-spin { animation: joySpin 1.1s cubic-bezier(.4, 0, .3, 1) both; }
@keyframes joySpin { 0% { transform: rotateY(0) } 50% { transform: rotateY(180deg) scale(1.04) } 100% { transform: rotateY(360deg) } }
.joy-hearts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.joy-hearts svg { position: absolute; width: 30px; height: 30px; bottom: 40%; opacity: 0; animation: joyHeart 2.2s ease-out .5s both; }
.joy-hearts svg:nth-child(1) { left: 8%; animation-delay: .45s; }
.joy-hearts svg:nth-child(2) { left: 46%; width: 36px; height: 36px; animation-delay: .8s; }
.joy-hearts svg:nth-child(3) { right: 6%; animation-delay: 1.1s; }
@keyframes joyHeart { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-110px) scale(1.1); } }
.joy-card h2 { margin: 2px 0 0; font-size: 2.6rem; line-height: 1.1; font-weight: 900; color: #5a4fc0; letter-spacing: -.01em; text-shadow: 0 2px 0 #fff, 0 6px 18px rgba(120, 100, 200, .18); }
html:not(.rm) .joy-layer:not(.calm) .joy-card h2 { animation: joyPop .6s cubic-bezier(.3, 1.6, .5, 1) .15s both; }
@keyframes joyPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.joy-sub { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--ink-2, #4f4b66); }
.joy-got { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.joy-got figure { margin: 0; width: 112px; padding: 10px 6px 8px; background: #fff; border-radius: 22px; box-shadow: 0 6px 16px rgba(80, 70, 140, .12); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.joy-got figcaption { font-size: .82rem; font-weight: 700; color: #463c5a; line-height: 1.25; }
html:not(.rm) .joy-layer:not(.calm) .joy-got figure { animation: joyPop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
html:not(.rm) .joy-layer:not(.calm) .joy-got figure:nth-child(1) { animation-delay: .7s; }
html:not(.rm) .joy-layer:not(.calm) .joy-got figure:nth-child(2) { animation-delay: .95s; }
html:not(.rm) .joy-layer:not(.calm) .joy-got figure:nth-child(3) { animation-delay: 1.2s; }
.joy-die { position: relative; display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--jbg, #fff0a8); align-items: center; justify-content: center; box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(91, 79, 115, .12), 0 4px 10px rgba(80, 70, 140, .18); overflow: hidden; }
.joy-die svg { width: 40px; height: 40px; }
.joy-shine { position: absolute; top: 6px; left: 12px; width: 18px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .7); transform: rotate(-25deg); }
.joy-gi { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 18px; background: #fff7e6; }
.joy-gi svg { width: 42px; height: 42px; }
.joy-next { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 360px; background: rgba(255, 255, 255, .85); border-radius: 18px; padding: 8px 12px; margin-top: 4px; }
.joy-ni { flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; }
.joy-ni svg { width: 100%; height: 100%; }
.joy-nb { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; color: #463c5a; text-align: start; }
.joy-bar { display: block; height: 10px; border-radius: 6px; background: #ece8f7; overflow: hidden; }
.joy-bar b { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffd36e, #ff9fb8); transition: width .8s ease; }
.joy-unl { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 8px 14px; border-radius: 18px; background: #fff6d6; color: #6a4b00; font-size: .95rem; }
.joy-unl svg { width: 34px; height: 34px; flex: 0 0 auto; }
.joy-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; margin-top: 8px; }
.joy-btns .btn { width: 100%; justify-content: center; }
.joy-tobook svg { width: 22px; height: 22px; }
/* calm version: a still, soft glow and the sticker; nothing moves */
.joy-layer.calm { background: rgba(244, 241, 252, .97); animation-duration: .6s; }
.joy-layer.calm .joy-glow { animation: none; opacity: .9; }
.joy-layer.calm .joy-card h2 { font-size: 2.1rem; color: #6a62b8; text-shadow: none; }
.joy-layer.calm .joy-got-star { display: none; }
html.rm .joy-layer, html.rm .joy-glow, html.rm .joy-bun { animation: none !important; }
/* mini celebration: a pill near the top and a few stars */
.joy-pill { position: fixed; z-index: 91; top: calc(14px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 999px;
  background: #fff; color: #463c5a; box-shadow: 0 8px 22px rgba(80, 70, 140, .2); font-size: 1rem; animation: joyPill .4s cubic-bezier(.3, 1.5, .5, 1) both; pointer-events: none; }
.joy-pill.out { opacity: 0; transition: opacity .4s ease; }
.joy-pi { width: 32px; height: 32px; display: inline-flex; }
.joy-pi svg { width: 100%; height: 100%; }
@keyframes joyPill { from { transform: translate(-50%, -16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
html.rm .joy-pill { animation: none; }
.joy-minifx { position: fixed; inset: 0 0 auto 0; height: 46vh; z-index: 89; pointer-events: none; overflow: hidden; }
/* sticker book: celebrations page + treasure */
.joy-book h2 small { font-size: .8em; color: #8a829c; font-weight: 700; margin-inline-start: 6px; }
.joy-stks { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-top: 8px; }
.joy-stk { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.joy-stk figcaption { font-size: .74rem; font-weight: 700; color: #463c5a; line-height: 1.2; display: flex; flex-direction: column; }
.joy-stk figcaption small { font-weight: 500; color: #8a829c; }
.joy-stk:nth-child(odd) .joy-die { transform: rotate(-4deg); }
.joy-stk:nth-child(even) .joy-die { transform: rotate(3deg); }
html:not(.rm) .joy-stk.fresh .joy-die { animation: joyPop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.joy-tr { display: flex; flex-wrap: wrap; gap: 8px; }
.joy-tri { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; font-size: .78rem; color: #463c5a; }
.joy-tri b { font-size: 1.05rem; }
.joy-tri .joy-gi { width: 48px; height: 48px; border-radius: 14px; }
.joy-tri .joy-gi svg { width: 32px; height: 32px; }
.joy-tri.none { opacity: .45; }
.joy-treasure .joy-next { margin-top: 12px; background: #f7f5fd; }
@media (max-height: 640px) { .joy-pet { width: 140px; height: 140px; } .joy-pet .charwrap { width: 128px; height: 128px; } .joy-card h2 { font-size: 2.1rem; } .joy-got figure { width: 98px; } .joy-die, .joy-gi { width: 52px; height: 52px; } }

/* ---------------- parent journal (bm-journal.js) ---------------- */
.pj { display: flex; flex-direction: column; gap: 12px; }
.pj .card { margin: 0; }
.pj-ht { display: flex; gap: 12px; align-items: flex-start; }
.pj-hi { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; background: #f1edff; display: inline-flex; align-items: center; justify-content: center; }
.pj-hi svg { width: 30px; height: 30px; }
.pj-head h2 { margin: 0 0 2px; }
.pj-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border-radius: 18px; padding: 6px 8px; box-shadow: var(--shadow); }
.pj-nav b { font-size: 1rem; }
.pj-nav .btn svg { width: 20px; height: 20px; }
html[dir="rtl"] .pj-nav .btn:first-child svg { transform: scaleX(-1); }
html:not([dir="rtl"]) .pj-nav .pj-fwd svg { transform: scaleX(-1); }
.pj-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.12rem; }
.pj-sec h3 svg { width: 26px; height: 26px; flex: 0 0 auto; }
.pj-acts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pj-acts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: #f7f5fd; }
.pj-an { font-weight: 700; }
.pj-am { color: var(--muted, #67637d); font-size: .92rem; white-space: nowrap; }
.pj-feels { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.pj-fe { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: #fff7e6; font-weight: 600; }
.pj-fe b { background: #fff; border-radius: 999px; padding: 0 8px; font-size: .9rem; }
.pj-ff, .pj-fd i { display: inline-flex; width: 28px; height: 28px; }
.pj-ff svg, .pj-fd i svg { width: 100%; height: 100%; }
.pj-fdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pj-fd { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; background: #faf9fd; border-radius: 10px; padding: 4px 2px; }
.pj-fd small { font-size: .7rem; color: var(--muted, #67637d); }
.pj-fd span { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.pj-fd i { width: 20px; height: 20px; }
.pj-rtwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px -4px 0; }
.pj-rt { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .82rem; }
.pj-rt th { font-weight: 600; color: var(--muted, #67637d); text-align: center; white-space: nowrap; }
.pj-rt thead th small { display: block; font-size: .7rem; font-weight: 400; }
.pj-rt tbody th { text-align: start; color: var(--ink, #2e2b3f); display: flex; align-items: center; gap: 4px; min-width: 92px; font-size: .78rem; }
.pj-rt tbody th small { display: block; color: var(--muted, #67637d); font-weight: 400; }
.pj-rti { width: 22px; height: 22px; display: inline-flex; flex: 0 0 auto; }
.pj-rti svg { width: 100%; height: 100%; }
.pj-rt td { text-align: center; border-radius: 8px; background: #f5f4f9; color: #b8b4c8; padding: 6px 1px; min-width: 34px; font-size: .78rem; }
.pj-rt td.on { background: #e4f4ec; color: #2e7a5a; font-weight: 700; }
.pj-day { padding: 10px 0; border-top: 1px solid var(--line, rgba(46, 43, 63, .07)); }
.pj-day:first-of-type { border-top: 0; }
.pj-dh { margin-bottom: 6px; }
.pj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pj-tag { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid #e2def0; background: #fff; color: var(--ink-2, #4f4b66); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 36px; }
.pj-tag svg { width: 18px; height: 18px; }
.pj-tag.on { background: #ece9ff; border-color: #8f86e0; color: #3d3580; font-weight: 700; }
.pj-ta { width: 100%; border: 1.5px solid #e2def0; border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 1rem; resize: vertical; background: #fdfcff; color: var(--ink, #2e2b3f); }
.pj-ta:focus { outline: 3px solid rgba(120, 128, 227, .35); border-color: #7880e3; }
.pj-saved { display: flex; align-items: center; gap: 6px; color: #2e7a5a; font-weight: 600; margin: 6px 0 0; }
.pj-saved svg { width: 18px; height: 18px; }
.pj-visit, .pj-dash { width: 100%; }
.pj-priv { display: flex; gap: 8px; align-items: flex-start; }
.pj-priv svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.pj-backb { align-self: flex-start; }
html[dir="rtl"] .pj-backb svg { transform: scaleX(-1); }
.pj-range { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.pj-askl { display: flex; flex-direction: column; gap: 6px; }
.pj-share { display: flex; flex-direction: column; gap: 8px; }
.pj-share .btn { width: 100%; justify-content: center; }
.pj-share .btn svg { width: 20px; height: 20px; }
.pj-sum h3 { margin: 0; font-size: 1.15rem; }
.pj-sum p { margin: 2px 0 0; color: var(--muted, #67637d); }
.pj-sumh { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 2px solid #f1edff; }
.pj-sum h4 { margin: 14px 0 4px; color: #5a4fc0; font-size: 1rem; }
.pj-sum ul { margin: 0; padding-inline-start: 20px; }
.pj-sum li { margin: 2px 0; line-height: 1.45; }
.pj-foot { margin-top: 16px !important; font-size: .8rem; color: #7a7590 !important; border-top: 1px solid #eee; padding-top: 8px; }
.pj-jm { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: start; border: 1.5px solid #e2def0; background: #fff; border-radius: 16px; padding: 10px 14px; margin-top: 8px; font: inherit; color: inherit; cursor: pointer; }
.pj-jm small { color: var(--muted, #67637d); }
.pj-jm.on { border-color: #8f86e0; background: #f3f1ff; }
#pj-print { display: none; }
@media print {
  html.pj-printing body > *:not(#pj-print) { display: none !important; }
  html.pj-printing #pj-print { display: block !important; padding: 12mm; color: #000; font-size: 12pt; }
  html.pj-printing #pj-print .pj-hi { display: none; }
  html.pj-printing body { background: #fff !important; }
}
