/* Bunnimoo 5.9 — audio pack: calm-corner tabs, songs, bedtime stories (bm-m.js); tap feedback */
html { touch-action: manipulation; }
.bmm-tabs { display: flex; gap: 6px; margin: 4px 0 10px; padding: 4px; border-radius: 999px; background: var(--lilac, #eef0fc); }
.bmm-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 999px; font-size: 16px; color: var(--ink-2, #4f4b66); }
.bmm-tab svg { width: 24px; height: 24px; }
.bmm-tab.on { background: #fff; color: var(--ink, #2e2b3f); box-shadow: 0 2px 8px rgba(74, 84, 137, .14); font-weight: 600; }
.bmm-tab:focus-visible, .bmm-card:focus-visible { outline: 3px solid var(--lilac-d, #5a63c4); outline-offset: 2px; }
.bmm-pane[hidden] { display: none !important; }
.snd-grid.bmm-pane { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.bmm-psub { grid-column: 1 / -1; margin: 0 0 2px; }
.bmm-snd span { font-size: 13.5px; line-height: 1.2; text-align: center; padding: 0 3px; }
.calm-panel.bmm-on-stories .vol, .calm-panel.bmm-on-stories > .chips, .calm-panel.bmm-on-stories .calm-go, .calm-panel.bmm-on-stories .calm-hint { display: none !important; }
.bmm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.bmm-card { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 10px 12px; border-radius: 20px; background: #fff; box-shadow: var(--shadow, 0 6px 18px rgba(74, 84, 137, .10)); text-align: start; }
.bmm-ci { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #eef0fc; }
.bmm-ci svg { width: 30px; height: 30px; }
.bmm-ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bmm-ct b { font-size: 15.5px; font-weight: 600; line-height: 1.25; color: var(--ink, #2e2b3f); }
.bmm-ct small { font-size: 13px; color: var(--muted, #67637d); }
.bmm { max-width: 640px; margin: 0 auto; }
.bmm-moon { display: flex; justify-content: center; margin: 2px 0 4px; }
.bmm-moon .charwrap { width: 120px; }
.bmm-timer, .bmm-rate { flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.bmm-timer .chip-btn, .bmm-rate .chip-btn { flex: 1 0 auto; padding: 0 12px; }
.bmm-tl { display: flex; align-items: center; gap: 6px; flex: 1 0 100%; color: var(--ink-2, #4f4b66); font-size: 15px; }
.bmm-tl svg { width: 22px; height: 22px; }
.bmm-stitle { text-align: center; margin: 4px 0 10px; font-size: 22px; }
.bmm-text { background: #fbfaf7; border-radius: 24px; padding: 14px 18px; box-shadow: inset 0 0 0 2px #ece8f6; max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bmm-p { font-size: 19px; line-height: 1.75; margin: 0 0 14px; color: #6d6a83; transition: color .6s ease, background-color .6s ease; border-radius: 12px; padding: 2px 6px; }
.bmm-p.on { color: #2e2b3f; background: #f1effb; }
.bmm-ctl { display: flex; justify-content: center; margin: 14px 0 4px; }
.bmm-pp { display: inline-flex; align-items: center; gap: 10px; min-width: 200px; justify-content: center; }
.bmm-pp svg { width: 28px; height: 28px; }
.bmm-left { text-align: center; min-height: 1.4em; margin: 2px 0; }
#bmm-dimmer { position: fixed; inset: 0; z-index: 9000; background: rgba(18, 20, 44, .8); opacity: 0; pointer-events: none; transition: opacity 2.5s ease; }
html.bmm-dim #bmm-dimmer { opacity: 1; pointer-events: auto; }
#bmm-dimmer.catch { pointer-events: auto; } /* the tap that woke the screen never lands on a button underneath */
@media (prefers-reduced-motion: reduce) { .bmm-p, #bmm-dimmer { transition: none; } }
html.rm .bmm-p, html.rm #bmm-dimmer { transition: none; }
@media (min-width: 700px) { .bmm-text { max-height: 52vh; } .bmm-p { font-size: 20px; } }

/* ---- 5.9 tester feedback: a MUCH bigger rabbit everywhere (the hero), sized by the room it stands in ---- */
.room { container-type: size; }
.stage .charwrap { width: min(80vw, 330px); }
@supports (width: 1cqh) {
  .stage .charwrap { width: min(86cqw, calc(86cqh / 1.227), 360px) !important; }
}
/* the room gets a fixed, generous share of the screen; the care buttons sit right under it, the day strip and links below */
.screen-home .home > .room { flex: none !important; height: clamp(250px, 52dvh, 520px) !important; min-height: 0 !important; max-height: none !important; order: 2; }
.screen-home .home > * { order: 6; }
.screen-home .home > .topbar { order: 0; } .screen-home .home > .actions { order: 3; } .screen-home .home > .nownext { order: 4; } .screen-home .home > .quick { order: 5; } .screen-home .home > .wake-bar { order: 3; }
@media (min-width: 700px) { .screen-home .home > .room { height: clamp(300px, 56dvh, 560px) !important; } }
.splash-char .charwrap.big { width: min(78vw, 340px, calc((100dvh - 330px) / 1.227)); min-width: 180px; }
.ob-char .charwrap { width: min(62vw, 260px, calc((100dvh - 420px) / 1.227)); min-width: 150px; }
.calm-scene .charwrap { width: min(58vw, 250px) !important; }
.bmc-gstage .charwrap.big, .bmc-tgbun .charwrap.big { width: min(76vw, 310px); }
.bmc-tubbun .charwrap.mid, .bmc-bedroom .charwrap.mid, .bmc-scene .charwrap.mid, .bmc-wbbun .charwrap.mid, .bmc-vpic .charwrap.mid { width: min(62vw, 240px); }
.bma-hugbun .charwrap.mid { width: min(66vw, 250px); }
.breathe .b-bun .charwrap.mid { width: min(60vw, 240px); }
.b-char .charwrap { width: min(52vw, 220px) !important; }
.bmd-preview .charwrap.mid, .bmd-epbox .charwrap.mid { width: min(62vw, 240px); }
.bmd-partybun .charwrap.mid, .bmd-byebun .charwrap.mid, .bmd-fortbun .charwrap.mid { width: min(56vw, 210px); }
.bmb-wchar .charwrap.small, .bmb-loading .charwrap.small { width: 150px; }
.bmm-moon .charwrap { width: 150px; }
/* a young rabbit is still big enough to love: growth shows in the ears and a gentler size step */
.charwrap.g1 svg.char { transform: scale(.86); } .charwrap.g2 svg.char { transform: scale(.9); } .charwrap.g3 svg.char { transform: scale(.95); }
#stage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* long press = a hug: a slow, soft squeeze (no motion with reduced motion; the hearts and words still come) */
/* 6.2.6: the hug is bm-hug.js (hold to snuggle, ease back); the old release squeeze and pose swap are retired */
.charwrap.bmm-hug .whole { animation: none; }
.charwrap.hg-in { scale: 1.045 .955; transform-origin: 50% 92%; transition: scale .5s cubic-bezier(.45, 0, .25, 1), filter .5s ease; animation: hgBreathe 2.6s ease-in-out .5s infinite alternate; }
@keyframes hgBreathe { from { scale: 1.045 .955; } to { scale: 1.065 .985; } }
.charwrap.hg-out { transform-origin: 50% 92%; transition: scale .65s cubic-bezier(.33, 0, .2, 1), filter .6s ease; }
.charwrap.hg-in.hg-glow, html.rm .charwrap.hg-in { animation: none !important; scale: none; filter: drop-shadow(0 0 14px rgba(255, 160, 190, .9)); }
@media (prefers-reduced-motion: reduce) { .charwrap.hg-in { animation: none !important; scale: none; filter: drop-shadow(0 0 14px rgba(255, 160, 190, .9)); } }
.fx .heart.hg-soft { animation: hgFloat 3.2s ease-out forwards; }
@keyframes hgFloat { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 20% { opacity: .95; } 100% { opacity: 0; transform: translateY(-72px) scale(1); } }
html.rm .fx .heart.hg-soft, html.rm .bma-hugfx .hg-heart { animation: hgFade 2.2s ease forwards; }
@media (prefers-reduced-motion: reduce) { .fx .heart.hg-soft, .bma-hugfx .hg-heart { animation: hgFade 2.2s ease forwards; } }
@keyframes hgFade { 0% { opacity: 0; } 25% { opacity: .9; } 100% { opacity: 0; } }
@keyframes bmmHug { 0%, 100% { transform: scale(1, 1); } 35% { transform: scale(1.05, .95); } 65% { transform: scale(1.03, .97); } }
html.rm .charwrap.bmm-hug .whole { animation: none; }
@media (prefers-reduced-motion: reduce) { .charwrap.bmm-hug .whole { animation: none; } }

/* language always in reach */
.lang-block { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0 2px; }
.lang-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; color: var(--ink-2, #4f4b66); }
.lang-label svg { width: 22px; height: 22px; }
.lang-pick.lang-big { margin: 0; gap: 12px; }
.lang-pick.lang-big .lp { min-width: 140px; min-height: 60px; border-radius: 30px; font-size: 22px; font-weight: 600; }
/* 6.2.7.4: Russian words are longer: let them hyphenate (Chrome and Safari know Russian) instead of spilling out of bubbles and buttons */
html[lang="ru"] body { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
html[lang="ru"] .say { overflow-wrap: anywhere; }
/* 6.2.7.4: three languages (עברית · English · Русский) fit one row on a 320–390 px phone */
.lang-pick.lang-big.lang-3 { gap: 8px; padding: 0 8px; }
.lang-pick.lang-big.lang-3 .lp { min-width: 0; flex: 1 1 0; max-width: 140px; padding: 0 6px; font-size: 19px; white-space: nowrap; -webkit-hyphens: manual; hyphens: manual; }
.lang-pick .lp, .seg-btn, .btn { -webkit-hyphens: manual; hyphens: manual; }
.bmm-langrow { display: flex; justify-content: flex-end; margin: 0 0 4px; }
.bmm-lang { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow, 0 6px 18px rgba(74, 84, 137, .10)); font-size: 15px; color: var(--ink, #2e2b3f); }
.bmm-lang svg { width: 20px; height: 20px; }
.topbar .bmm-lang-home { width: auto; min-width: 44px; padding: 0 10px; font-size: 14px; }
@media (max-width: 380px) { .topbar .bmm-lang-home span { display: none; } }
