/* Bunnimoo 5.3 — roadmap 2 wave A (bm-a.js). Calm, no flashing; html.rm (reduce motion) stills every loop. */
/* A13 / A14: filters on the root element keep fixed overlays working */
html.bma-soft { filter: saturate(.62); }
html.bma-warm { filter: sepia(.18) saturate(.88) brightness(.93); }
html.bma-soft.bma-warm { filter: sepia(.18) saturate(.55) brightness(.93); }
.bma-heard { box-shadow: 0 0 0 4px #c9d0f7 !important; }

/* hubs */
.bma-hub .hub-grid { margin-top: 6px; }
.ht-calmkit { background: linear-gradient(160deg, #ffffff 40%, #e4f4ec); }
.ht-talkkit { background: linear-gradient(160deg, #ffffff 40%, #eef0fc); }
.ht-sleeps { background: linear-gradient(160deg, #ffffff 40%, #efe9fb); }

/* A1 shape breathing */
.bma-shapes { display: flex; flex-direction: column; gap: 10px; }
.bma-seg { display: flex; gap: 6px; }
.bma-seg .seg-btn { flex: 1; min-height: 48px; }
.bma-shstage { position: relative; margin: 4px auto 0; width: min(86vw, 330px); aspect-ratio: 1; background: radial-gradient(circle at 50% 45%, #ffffff 0%, #eef6fd 70%, #e3edfb 100%); border-radius: 36px; box-shadow: var(--shadow); }
.bma-shsvg { width: 100%; height: 100%; padding: 22px; overflow: visible; }
.bma-sseg { stroke: #d6dcf3; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; transition: stroke .8s ease; }
.bma-sseg.ph-in.on { stroke: #9fd3f2; } .bma-sseg.ph-out.on { stroke: #a8dcb9; } .bma-sseg.ph-hold.on { stroke: #e6d2a2; }
.bma-dot { fill: #f6a9bf; stroke: #ffffff; stroke-width: 4; filter: drop-shadow(0 2px 4px rgba(120, 80, 120, .25)); }
.bma-shword { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 4px 16px; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(74, 84, 137, .1); font-size: 24px; font-weight: 600; color: var(--ink-2); pointer-events: none; white-space: nowrap; }
.bma-round { text-align: center; min-height: 24px; margin: 0; color: var(--muted); }

/* A2 hold-to-hug */
.bma-hug { display: flex; flex-direction: column; gap: 8px; }
.bma-hugstage { --hug-ms: 3000ms; position: relative; width: min(80vw, 300px); aspect-ratio: 1; margin: 8px auto 0; display: flex; align-items: center; justify-content: center; }
.bma-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.bma-ringbg { fill: #fff6f9; stroke: #f3dbe4; stroke-width: 10; }
.bma-ringfg { fill: none; stroke: #f6a9bf; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 629; stroke-dashoffset: 629; transition: stroke-dashoffset 1.2s ease-out; }
.bma-hugstage.holding .bma-ringfg { stroke-dashoffset: 0; transition: stroke-dashoffset var(--hug-ms) linear; }
.bma-hugstage.done .bma-ringfg { stroke-dashoffset: 0; stroke: #f4b9c9; transition: none; }
.bma-hugbun { position: relative; z-index: 1; background: none; border: 0; padding: 0; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; border-radius: 50%; }
.bma-hugbun .charwrap.mid { width: min(52vw, 190px); }
.bma-hugbtns[hidden] { display: none !important; }
.bma-hugfx .hg-heart { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; animation: hgFloat 3.2s ease-out forwards; }
.bma-hugfx .hg-heart svg { width: 100%; height: 100%; }
.bma-hugfx { position: absolute; inset: 0; pointer-events: none; }
.bma-heart { position: absolute; top: 18%; width: 34px; height: 34px; opacity: 0; animation: bmaHeart 3.4s ease-out forwards; }
.bma-heart.h0 { inset-inline-start: 18%; } .bma-heart.h1 { inset-inline-start: 46%; animation-delay: .5s; top: 8%; } .bma-heart.h2 { inset-inline-end: 16%; animation-delay: 1s; }
.bma-heart svg { width: 100%; height: 100%; }
@keyframes bmaHeart { 0% { opacity: 0; transform: translateY(10px); } 25% { opacity: .9; } 100% { opacity: 0; transform: translateY(-30px); } }
html.rm .bma-heart { animation: none !important; opacity: .85; transform: none; }
.bma-hugtext { text-align: center; font-size: 19px; min-height: 28px; margin: 4px 0; color: var(--ink-2); }

/* A4 countdown */
.bma-count { display: flex; flex-direction: column; gap: 8px; }
.bma-cdstage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 10px; background: linear-gradient(#f3f6fe, #eaf6f0); border-radius: 32px; box-shadow: var(--shadow); }
.bma-cdnum { font-size: 76px; line-height: 1; font-weight: 700; color: #7f8dcc; font-variant-numeric: tabular-nums; }
.bma-cdbun { transform: translateY(calc(var(--k) * 6px)) scale(calc(1 - var(--k) * .14)); transform-origin: 50% 100%; transition: transform 1.6s ease; }
.bma-cdbun .charwrap.mid { width: 150px; }
.bma-cddots { display: flex; gap: 6px; margin-top: 14px; }
.bma-cddots i { width: 12px; height: 12px; border-radius: 50%; background: #dfe3f6; transition: background .8s; }
.bma-cddots i.on { background: #a8dcb9; }
.bma-cdtext { text-align: center; font-size: 19px; min-height: 28px; margin: 4px 0; }

/* A5 calm lights */
.bma-lights { display: flex; flex-direction: column; gap: 10px; }
.bma-ltstage { position: relative; display: block; width: 100%; height: min(58vh, 430px); border: 0; padding: 0; border-radius: 34px; overflow: hidden; background: #f4f7fd; box-shadow: var(--shadow); }
.pal-night .bma-ltstage { background: #2f3760; }
.pal-sunset .bma-ltstage { background: #fff4ec; }
.pal-forest .bma-ltstage { background: #f2f8ef; }
.bma-blob { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(6px); opacity: .9; animation: bmaDrift 26s ease-in-out infinite alternate; }
.bma-blob.b0 { top: -8%; inset-inline-start: -10%; }
.bma-blob.b1 { top: 30%; inset-inline-end: -16%; animation-duration: 31s; animation-delay: -6s; }
.bma-blob.b2 { bottom: -14%; inset-inline-start: 6%; animation-duration: 35s; animation-delay: -12s; }
.bma-blob.b3 { top: 20%; inset-inline-start: 20%; width: 46%; animation-duration: 40s; animation-delay: -3s; }
@keyframes bmaDrift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(12%, 8%) scale(1.08); } 100% { transform: translate(-8%, 14%) scale(.95); } }
html.rm .bma-blob { animation: none !important; }
.bma-ltchips .chip-btn.sel { background: var(--lilac); box-shadow: inset 0 0 0 2px var(--lilac-d); }

/* A3 worry box */
.bma-worry { display: flex; flex-direction: column; gap: 10px; }
.bma-wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bma-wpic { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; min-height: 96px; background: #ffffff; border-radius: 20px; box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.15; text-align: center; }
.bma-wpic svg { width: 40px; height: 40px; }
.bma-wpic.sel { box-shadow: 0 0 0 3px #b9c3f0, var(--shadow); background: #f5f6fe; }
.bma-wlabel input { width: 100%; min-height: 52px; border-radius: 16px; border: 2px solid var(--lilac-2); padding: 10px 14px; font: inherit; background: #ffffff; }
.bma-wput svg { width: 30px; height: 30px; }
.bma-boxstage { position: relative; height: 210px; margin-top: 6px; background: linear-gradient(#fbf7f1, #f4ece0); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; }
.bma-box { position: absolute; bottom: 18px; inset-inline-start: 50%; width: 130px; height: 130px; transform: translateX(-50%); }
[dir="rtl"] .bma-box { transform: translateX(50%); }
.bma-box svg { width: 100%; height: 100%; }
.bma-wcard { position: absolute; top: 14px; inset-inline-start: 50%; width: 64px; height: 64px; margin-inline-start: -32px; padding: 8px; background: #ffffff; border-radius: 16px; box-shadow: var(--shadow); transition: transform 1.8s ease-in, opacity 1.8s ease-in; z-index: 1; }
.bma-wcard svg { width: 100%; height: 100%; }
.bma-boxstage.in .bma-wcard { transform: translateY(96px) scale(.5); opacity: 0; }
.bma-boxstage.still .bma-wcard { transition: none; }
html.rm .bma-wcard { transition: opacity .6s ease !important; }
html.rm .bma-boxstage.in .bma-wcard { transform: none; opacity: 0; }
.bma-boxbun { position: absolute; bottom: 4px; inset-inline-end: 10px; }
.bma-boxbun .charwrap.small { width: 92px; }
.bma-kept { font-size: 19px; margin: 6px 0 0; }
.bma-tell { align-self: center; }
.bma-tell.on { background: #e4f4ec; box-shadow: inset 0 0 0 2px #8fd6b5; }
.bma-tell svg { width: 28px; height: 28px; }

/* A6 show-a-grown-up cards */
.bma-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bma-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 10px; border-radius: 24px; background: #ffffff; box-shadow: var(--shadow); font-size: 17px; font-weight: 600; text-align: center; }
.bma-card svg { width: 54px; height: 54px; }
.bma-card.c-break, .bma-bigcard.c-break { background: #eef6fd; } .bma-card.c-loud, .bma-bigcard.c-loud { background: #f1f0fd; }
.bma-card.c-help, .bma-bigcard.c-help { background: #fff7e6; } .bma-card.c-stop, .bma-bigcard.c-stop { background: #fdf1ee; }
.bma-card.c-quiet, .bma-bigcard.c-quiet { background: #eef7f2; } .bma-card.c-hug, .bma-bigcard.c-hug { background: #fdf0f4; }
.overlay.bma-ovfull { background: #f4f5fd; }
.bma-bigcard { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); background: #ffffff; text-align: center; cursor: pointer; }
.bma-bci svg { width: min(58vw, 240px); height: min(58vw, 240px); }
.bma-bct { font-size: clamp(34px, 10vw, 52px); font-weight: 700; line-height: 1.15; color: var(--ink); }

/* A7 yes / no */
.bma-yngrid { display: flex; flex-direction: column; gap: 12px; }
.bma-ynb { display: flex; align-items: center; gap: 18px; min-height: 120px; padding: 12px 22px; border-radius: 30px; background: #ffffff; box-shadow: var(--shadow); font-size: 32px; font-weight: 700; }
.bma-ynb svg { width: 84px; height: 84px; flex: none; }
.bma-ynb.yn-yes { background: #f1faf5; } .bma-ynb.yn-no { background: #f2f3fd; } .bma-ynb.yn-maybe { background: #fffaf0; min-height: 96px; font-size: 26px; }
.bma-ynb.yn-maybe svg { width: 64px; height: 64px; }
.bma-ynb.on { box-shadow: 0 0 0 4px #b9c3f0, var(--shadow); }

/* A8 choice board */
.bma-choice { display: flex; flex-direction: column; gap: 10px; }
.bma-chgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bma-chgrid.setup { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bma-cho { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 8px 4px; border-radius: 20px; background: #ffffff; box-shadow: var(--shadow); font-size: 15px; text-align: center; transition: opacity .6s ease; }
.bma-cho svg { width: 42px; height: 42px; }
.bma-cho.sel { box-shadow: 0 0 0 3px #b9c3f0, var(--shadow); background: #f5f6fe; }
.bma-cho.big { min-height: 168px; font-size: 21px; font-weight: 600; border-radius: 28px; }
.bma-cho.big svg { width: 84px; height: 84px; }
.bma-chgrid.n2 .bma-cho.big, .bma-chgrid.n3 .bma-cho.big { min-height: 200px; }
.bma-chgrid.n3 .bma-cho.big:last-child { grid-column: 1 / -1; }
.bma-cho.chosen { box-shadow: 0 0 0 4px #a8dcb9, var(--shadow); background: #f1faf5; }
.bma-cho.dim { opacity: .45; }
.bma-chq { font-size: 21px; font-weight: 600; color: var(--ink); min-height: 30px; }

/* A9 sleeps until */
.bma-sleeps { display: flex; flex-direction: column; gap: 10px; }
.bma-slcard { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(#ffffff, #f2eefc); }
.bma-slcard h2 { margin: 2px 0; }
.bma-slpic svg { width: 64px; height: 64px; }
.bma-slleft { font-size: 22px; font-weight: 700; color: #6a5bb5; margin: 2px 0; }
.bma-moons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; align-items: center; max-width: 320px; }
.bma-moons i svg { width: 32px; height: 32px; }
.bma-moons b { font-size: 15px; color: var(--muted); margin-inline-start: 6px; }
.bma-sun svg { width: 56px; height: 56px; }
.bma-slgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.bma-slp { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 84px; padding: 8px 4px; border-radius: 18px; background: #f8f8fe; box-shadow: inset 0 0 0 2px var(--lilac); font-size: 14.5px; }
.bma-slp svg { width: 36px; height: 36px; }
.bma-slp.sel { background: #efeafc; box-shadow: inset 0 0 0 3px #b9a6e8; }
.bma-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 16px; }
.bma-field input { min-height: 50px; border-radius: 14px; border: 2px solid var(--lilac-2); padding: 8px 12px; font: inherit; background: #ffffff; color: var(--ink); }
.bma-slchip { position: absolute; top: 10px; inset-inline-end: 8px; z-index: 6; display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 7px; min-height: 44px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 3px 10px rgba(74, 84, 137, .14); font-size: 18px; font-weight: 700; color: #6a5bb5; }
.bma-sli svg { width: 26px; height: 26px; display: block; }

/* settings + insights */
.bma-set h3 { margin: 14px 0 6px; font-size: 16px; }
.bma-ins h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 6px; font-size: 16px; }
.bma-emobar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 6px; }
.bma-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bma-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 10px; border-radius: 12px; background: #f7f8fd; font-size: 15px; }
.bma-list li > span:first-child:not(.bma-sw) { flex: 1; }
.bma-sw { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.bma-list li .bma-sw + * { flex: 1; }
.bma-x { margin-inline-start: auto; color: var(--ink-2); }
.bma-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e4f4ec; color: #2e7a5a; font-size: 13px; }
.bma-note { background: #fff7e6; border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.bma-mins { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 112px; padding-top: 6px; }
.bma-mcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; font-size: 12px; color: var(--muted); }
.bma-mcol i { display: block; width: 70%; max-width: 26px; border-radius: 8px 8px 4px 4px; background: #c9d0f7; }
.bma-mcol b { font-size: 12.5px; color: var(--ink-2); }
