/*
 * Manifest 369: the tool's own components, styled in the site's design language (24 Nov 2026, on the UltraCompress Pro
 * template). The first part is the shared block of Stardust Room's file, unchanged (tokens, page, hero, buttons, fields,
 * windows, toasts, information sections, text rules, cards, sliders and switches). Base: /libs/site-pages.css (tokens,
 * Inter and Space Grotesk, theme toggle, focus rings) and /libs/shared-nav.css (the site's header and footer). The second
 * part is the tool: the stage (its colours follow the session, dawn, day or night, not the page theme), the session
 * buttons, the 3-6-9 mandala, the writing line, the overlays (first wish, after a session, breathing), full screen and the
 * card with five tabs. Light is the default; dark applies when <html> has no data-theme. Written by hand: this file is the
 * source.
 */

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
}

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.block { display: block; }
.hint { color: var(--text-3); font-size: 0.8rem; font-weight: 400; line-height: 1.45; }
.err { color: var(--bad); font-size: 0.85rem; font-weight: 600; }
.err:empty { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9999px; font-family: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; padding: 12px 24px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.35); padding: 11px 23px; }
.btn-danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; transform: translateY(-2px); }
.btn-sm { font-size: 0.85rem; padding: 9px 16px; }
.btn-secondary.btn-sm, .btn-danger.btn-sm { padding: 8px 15px; }
.btn-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover { border-color: var(--brand); color: var(--link); background: var(--surface); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn:focus-visible, .link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shell-hint { margin-top: 14px; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.input, .select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--placeholder); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.select { width: auto; max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
.select option { color: #0a0a14; background: #fff; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip .ico { width: 15px; height: 15px; color: var(--link); }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Windows ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog--narrow { width: min(420px, calc(100vw - 16px)); }
.dialog--wide { width: min(680px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-head { padding: 18px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { margin: 0; font-size: 1.15rem; }
.dialog-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.2s ease, color 0.2s ease; }
.dialog-close:hover { border-color: var(--brand); color: var(--link); }
.dialog-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 210px); display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { padding: 14px 20px; border-top: 1px solid var(--surface-border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-message { margin: 0; color: var(--text); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.good { border-left-color: #4ade80; }
.toast.bad { border-left-color: #f87171; }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== Manifest 369 components ===== */

/* ----- The site's text rules (p, ul, li, headings) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) ol, :where(.app-shell) li, :where(.app-shell) dl, :where(.app-shell) dd, :where(.dialog) p, :where(.dialog) ul, :where(.dialog) li, :where(.mm-focus) p { margin: 0; line-height: 1.5; }
:where(.app-shell) h2, :where(.app-shell) h3, :where(.app-shell) h4, :where(.mm-focus) h2 { margin: 0; line-height: 1.25; }
:root { --head: 81px; }
@media (max-width: 639.98px) { :root { --head: 65px; } }
.app-shell { scroll-margin-top: calc(var(--head) + 16px); }
.info-section > p { color: var(--text-2); max-width: 60rem; margin: 0 0 1rem; }

/* ----- Cards: the site's white cards, one layer ----- */
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sub-title { font-size: 1rem; color: var(--text-strong); margin-bottom: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }

/* sliders and switches (Frequency Studio's) */
.value { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 32px; margin: 0; padding: 0; background: transparent; cursor: pointer; --fill: 50%; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 12px; border-radius: 9999px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--brand) 0, var(--brand-2) var(--fill), var(--surface-2) var(--fill), var(--surface-2) 100%); }
.range::-moz-range-track { height: 12px; border-radius: 9999px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--brand) 0, var(--brand-2) var(--fill), var(--surface-2) var(--fill), var(--surface-2) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: #ffffff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #ffffff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.925rem; color: var(--text-strong); }
.switch-row .hint { font-weight: 400; display: block; margin-top: 2px; }
.switch-text { display: flex; flex-direction: column; min-width: 0; }
.switch { position: relative; width: 52px; height: 44px; flex: none; padding: 0; border: 0; background: transparent; cursor: pointer; }
.switch::before { content: ""; position: absolute; left: 3px; top: 8px; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); transition: background 0.2s ease; }
.switch::after { content: ""; position: absolute; top: 12px; left: 7px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
.switch[aria-checked="true"]::before { background: var(--gradient-brand); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 16px; }

/* ----- Layout: the stage beside the card with five tabs; one above the other on narrow screens ----- */
.mm-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; --stage-h: clamp(620px, calc(100vh - var(--head) - 32px), 780px); }
@supports (height: 100svh) { .mm-layout { --stage-h: clamp(620px, calc(100svh - var(--head) - 32px), 780px); } }
@media (min-width: 1000px) { .mm-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); --stage-h: clamp(680px, calc(100vh - var(--head) - 48px), 820px); } }
.mm-slot { position: relative; min-width: 0; height: var(--stage-h); border-radius: 16px; background: #2a1660; scroll-margin-top: calc(var(--head) + 12px); }
.mm-slot-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #ede9fe; font-weight: 600; }
main [hidden], .dialog [hidden], .mm-focus [hidden] { display: none !important; }

/* ----- The stage. Its colours follow the session, not the page theme. ----- */
.mm-stage { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; background: #2a1660; color: #ffffff; isolation: isolate; -webkit-tap-highlight-color: transparent; --acc: #fde68a; --acc-2: #f472b6; --mm-size: 1.2rem; --mm: clamp(200px, min(58vw, calc(var(--stage-h) - 390px)), 330px); }
.mm-stage[data-ses="a"] { --acc: #a5f3fc; --acc-2: #a78bfa; }
.mm-stage[data-ses="n"] { --acc: #ddd6fe; --acc-2: #fde68a; }
.mm-stage[data-size="s"] { --mm-size: 1.02rem; }
.mm-stage[data-size="l"] { --mm-size: 1.45rem; }
.mm-sky, .mm-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mm-sky { z-index: 0; }
.mm-fx { z-index: 6; pointer-events: none; }   /* above the ritual, below the messages: confetti falls behind their words */

/* the bar at the top */
.mm-top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-tools { display: flex; gap: 8px; }
.mm-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; white-space: nowrap; padding: 8px 16px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(20, 10, 50, 0.32); color: #ffffff; font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; max-width: 100%; }
.mm-pill:hover { background: rgba(20, 10, 50, 0.5); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.mm-pill-star { color: var(--acc); }
.mm-tool { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(20, 10, 50, 0.32); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.mm-tool:hover { background: rgba(20, 10, 50, 0.5); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.mm-tool .ico-on { display: none; }
.mm-tool[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #3b0764; border-color: transparent; }
.mm-tool[aria-pressed="true"] .ico-on { display: inline; }
.mm-tool[aria-pressed="true"] .ico-off { display: none; }
.mm-pill:focus-visible, .mm-tool:focus-visible, .mm-ses:focus-visible, .mm-main:focus-visible, .mm-ghost:focus-visible, .mm-cat:focus-visible, .mm-ex:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* ----- The ritual ----- */
.mm-ritual { position: absolute; inset: 68px 20px 16px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity 0.5s ease, transform 0.5s ease; }
.mm-stage.is-over .mm-ritual { opacity: 0; transform: scale(0.96); pointer-events: none; visibility: hidden; transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0.4s; }
.mm-sessions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mm-ses { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 14px 7px 11px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.26); background: rgba(20, 10, 50, 0.3); color: #ffffff; font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, border-color 0.25s ease; }
.mm-ses:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.6); }
.mm-ses-emoji { font-size: 1.05rem; line-height: 1; }
.mm-ses-num { font-variant-numeric: tabular-nums; opacity: 0.85; font-weight: 700; }
.mm-ses[aria-pressed="true"] { background: #ffffff; color: #2e1065; border-color: transparent; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25); }
.mm-ses.is-done .mm-ses-num::after { content: " \2713"; color: #16a34a; }
.mm-ses[aria-pressed="false"].is-done .mm-ses-num::after { color: #86efac; }

.mm-mandala-wrap { position: relative; width: var(--mm); height: var(--mm); flex: none; }
.mm-mandala { position: absolute; inset: 0; }
.mm-svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; transition: transform 0.6s ease, filter 0.6s ease; }
.mm-line { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 0.7; }
.mm-line--faint { stroke: rgba(255, 255, 255, 0.14); stroke-dasharray: 1.5 3; }
.mm-dot { fill: rgba(255, 255, 255, 0.65); }
.mm-dot--key { fill: #fde68a; }
.mm-tri { fill: none; stroke: rgba(253, 230, 138, 0.32); stroke-width: 0.9; transition: stroke 1s ease, stroke-width 1s ease; }
.mm-tri.is-lit { stroke: #fde68a; stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(253, 230, 138, 0.9)); }
.mm-flow { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.6; transition: stroke 1s ease; }
.mm-flow.is-lit { stroke: rgba(221, 214, 254, 0.75); }
.mm-hit { fill: none; stroke: none; }
.mm-track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.6; stroke-dasharray: 2 3; }
.mm-flower { transform-box: fill-box; transform-origin: center; animation: mm-spin 240s linear infinite; }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.mm-petal { fill-opacity: 0.14; stroke: rgba(255, 255, 255, 0.5); stroke-width: 0.9; transform-box: fill-box; transform-origin: 50% 100%; transition: fill-opacity 0.7s ease, stroke 0.7s ease; }
.mm-ring.is-active .mm-petal:not(.is-lit) { stroke: rgba(255, 255, 255, 0.85); animation: mm-wait 2.6s ease-in-out infinite; }
@keyframes mm-wait { 50% { stroke: rgba(255, 255, 255, 0.35); } }
.mm-petal.is-lit { fill-opacity: 1; stroke: rgba(255, 255, 255, 0.95); filter: drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.7)); }
.mm-petal.is-pop { animation: mm-pop 0.8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mm-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.mm-core { fill: rgba(255, 255, 255, 0.1); stroke: rgba(255, 255, 255, 0.4); stroke-width: 0.8; }
.mm-svg.is-complete .mm-core { fill: rgba(253, 230, 138, 0.3); stroke: #fde68a; }
.mm-svg.is-bloom { animation: mm-bloom 2.2s ease-in-out; }
@keyframes mm-bloom { 0% { transform: scale(1) rotate(0); } 35% { transform: scale(1.12) rotate(20deg); filter: drop-shadow(0 0 18px rgba(253, 230, 138, 0.9)); } 100% { transform: scale(1) rotate(0); } }
.mm-count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; line-height: 1; pointer-events: none; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.mm-count-now { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: calc(var(--mm) * 0.115); font-variant-numeric: tabular-nums; }
.mm-count-of { font-size: 0.7rem; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.mm-count.is-bump .mm-count-now { animation: mm-bump 0.5s ease; }
@keyframes mm-bump { 40% { transform: scale(1.35); color: var(--acc); } }

.mm-aff { color: #ffffff; display: block; max-width: 38rem; text-align: center; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; font-size: var(--mm-size); line-height: 1.35; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
.mm-aff-emoji { display: inline-block; font-size: 1.25em; line-height: 1; margin-right: 8px; vertical-align: -0.12em; }
.mm-aff-emoji:empty { display: none; }
.mm-write { display: flex; gap: 8px; width: min(600px, 100%); }
.mm-input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 20px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.36); background: rgba(20, 10, 50, 0.36); color: #ffffff; font-family: inherit; font-size: 1rem; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.3s ease; }
.mm-input::placeholder { color: rgba(255, 255, 255, 0.78); }
.mm-input:focus { border-color: #ffffff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2); }
.mm-input.is-close { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(253, 230, 138, 0.22); }
.mm-input.is-gone { color: transparent; }
.mm-input.is-shake { animation: mm-shake 0.4s ease; }
@keyframes mm-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.mm-input--light { width: 100%; flex: none; }
.mm-main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 9999px; background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6); color: #ffffff; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 6px 24px rgba(236, 72, 153, 0.4); transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; }
.mm-main:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(236, 72, 153, 0.55); }
.mm-main:disabled { opacity: 0.5; cursor: not-allowed; }
.mm-main .ico { width: 18px; height: 18px; }
.mm-whisper { min-height: 1.5em; max-width: 36rem; text-align: center; font-size: 0.875rem; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.mm-whisper.is-soft { animation: mm-fade 0.5s ease; }
@keyframes mm-fade { from { opacity: 0; transform: translateY(4px); } }

/* ----- Overlays on the stage ----- */
.mm-over { position: absolute; inset: 64px 16px 16px; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 14px; text-align: center; overflow-y: auto; animation: mm-fade 0.5s ease; }
.mm-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.mm-welcome-card { width: min(560px, 100%); margin: auto; padding: 22px; border-radius: 20px; background: rgba(18, 10, 52, 0.74); border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mm-welcome-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(1.4rem, 3.4vw, 1.9rem); font-weight: 700; color: #ffffff; }
.mm-welcome-text, .mm-welcome-note { font-size: 0.92rem; color: rgba(255, 255, 255, 0.88); }
.mm-welcome-note { font-size: 0.8rem; }
.mm-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.mm-cats--tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.mm-cats--tiles .mm-cat { flex-direction: column; gap: 3px; padding: 8px 2px; border-radius: 14px; font-size: 0.72rem; min-height: 58px; justify-content: center; }
.mm-cats--tiles .mm-cat span:first-child { font-size: 1.35rem; line-height: 1; }
.mm-cat { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.08); color: #ffffff; font-family: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
.mm-cat:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.6); }
.mm-cat[aria-pressed="true"] { background: #ffffff; color: #2e1065; border-color: transparent; }
.mm-examples { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mm-ex { width: 100%; text-align: left; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #ffffff; font-family: inherit; font-size: 0.875rem; line-height: 1.4; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
.mm-ex:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.45); }
.mm-tip { min-height: 1.4em; font-size: 0.85rem; color: #fde68a; }
.mm-tip.is-good { color: #86efac; }
.mm-after-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(1.7rem, 4.4vw, 2.6rem); font-weight: 700; line-height: 1.15; color: #ffffff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35); max-width: 30rem; }
.mm-after-line { font-size: 1.1rem; color: rgba(255, 255, 255, 0.95); max-width: 32rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.mm-after-step { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(460px, 100%); padding: 14px 16px; border-radius: 16px; background: rgba(18, 10, 52, 0.55); border: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.95rem; }
.mm-after-step p { color: #ffffff; }
.mm-after-step strong { color: var(--acc); }
.mm-after-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mm-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(20, 10, 50, 0.35); color: #ffffff; font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
.mm-ghost:hover { background: rgba(255, 255, 255, 0.16); border-color: #ffffff; transform: translateY(-1px); }
.mm-ghost[aria-pressed="true"] { background: #ffffff; color: #14532d; border-color: transparent; }
.mm-seal { width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; background: radial-gradient(circle at 35% 30%, #fff7d6, #fbbf24 45%, #f472b6); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18), 0 0 40px rgba(253, 230, 138, 0.75); animation: mm-seal 1s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mm-seal { from { transform: scale(0.2) rotate(-40deg); opacity: 0; } }

/* breathing and the guided visualisation */
.mm-orb { width: min(220px, 50vw); aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.95), rgba(253, 230, 138, 0.75) 35%, rgba(244, 114, 182, 0.45) 65%, rgba(139, 92, 246, 0) 72%); transform: scale(0.55); transition-property: transform, opacity; transition-timing-function: ease-in-out; box-shadow: 0 0 60px rgba(253, 230, 138, 0.35); }
.mm-orb span { width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.85); filter: blur(6px); }
.mm-orb.is-in { transform: scale(1); }
.mm-breathe-word { color: #ffffff; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.6rem; font-weight: 600; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.mm-breathe-guide { color: #ffffff; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.25rem; font-weight: 500; max-width: 30rem; min-height: 3em; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.mm-breathe-guide.is-soft { animation: mm-fade 1.2s ease; }
.mm-breathe-left { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }

/* ----- Full screen: the stage in the browser's top layer ----- */
.mm-focus { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #2a1660; color: #ffffff; overflow: hidden; }
.mm-focus::backdrop { background: #1a1040; }
.mm-focus-slot { position: absolute; inset: 0; }
.mm-stage.is-focus { border-radius: 0; --mm: clamp(220px, min(70vw, calc(100vh - 380px)), 440px); }

/* ----- The card with five tabs ----- */
.mm-panel { padding: 0; gap: 0; overflow: hidden; }
@media (min-width: 1000px) { .mm-panel { height: var(--stage-h); } }
.mm-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; border-bottom: 1px solid var(--surface-border); flex: none; }
.mm-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.mm-tabs button span { font-size: 1.15rem; line-height: 1; }
.mm-tabs button:hover { color: var(--link); }
.mm-tabs button[aria-selected="true"] { background: var(--tint-brand); color: var(--link); box-shadow: inset 0 0 0 1px var(--tint-brand-border); }
.mm-tabs button:focus-visible, .mm-pane:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mm-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.mm-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mm-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.mm-subsection { display: flex; flex-direction: column; gap: 10px; }

/* today */
.mm-daily { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, #312e81, #6d28d9 55%, #be185d); color: #ffffff; box-shadow: 0 10px 30px rgba(109, 40, 217, 0.25); }
.mm-flip { display: flex; flex-direction: column; gap: 6px; }
.mm-flip.is-flip { animation: mm-flip 0.7s ease; }
@keyframes mm-flip { 0% { transform: perspective(600px) rotateY(0); } 50% { transform: perspective(600px) rotateY(90deg); opacity: 0.2; } 100% { transform: perspective(600px) rotateY(0); } }
.mm-daily .sub-title { color: #e9d5ff; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.mm-daily-text { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.15rem; font-weight: 600; line-height: 1.4; color: #ffffff; }
.mm-daily-cat { font-size: 0.82rem; color: #f5d0fe; }
.mm-daily .btn-secondary { background: rgba(255, 255, 255, 0.12); color: #ffffff; border-color: rgba(255, 255, 255, 0.34); }
.mm-daily .btn-secondary:hover:not(:disabled) { color: #ffffff; border-color: #ffffff; }
.mm-todaylist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mm-trow { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text-strong); font-family: inherit; text-align: left; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.mm-trow:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--surface-hover-shadow); }
.mm-trow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mm-trow-emoji { font-size: 1.4rem; line-height: 1; text-align: center; }
.mm-trow-name { display: block; font-weight: 700; font-size: 0.92rem; }
.mm-trow-hint { display: block; font-size: 0.78rem; color: var(--text-2); }
.mm-trow.is-done { border-color: rgba(22, 101, 52, 0.35); background: var(--ok-soft); }
.mm-dots { display: grid; grid-template-columns: repeat(9, 7px); gap: 3px; justify-content: end; direction: rtl; }
.mm-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); direction: ltr; }
.mm-dots i.is-lit { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.mm-moods button { font-size: 0.85rem; }
.mm-moods button span { font-size: 1.15rem; line-height: 1; }
.mm-step-text { font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.mm-step-text.is-empty { font-weight: 400; color: var(--text-2); }
#stepBtn[aria-pressed="true"] { background: var(--ok); box-shadow: none; }
.mm-grat { display: flex; flex-direction: column; gap: 8px; }
.mm-grat .label { font-weight: 500; color: var(--text-2); }
.mm-jarcount { font-size: 0.85rem; color: var(--text-2); }

/* intentions */
.mm-wishes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mm-wish { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.mm-wish:hover { box-shadow: var(--surface-hover-shadow); transform: translateY(-2px); }
.mm-wish.is-focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.mm-wish-tile { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.mm-wish-text { font-weight: 600; color: var(--text-strong); line-height: 1.4; overflow-wrap: anywhere; }
.mm-wish-meta { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }
.mm-wish-plan { font-size: 0.8rem; color: var(--text-2); margin-top: 4px; overflow-wrap: anywhere; }
.mm-wish-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mm-act { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 11px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); color: var(--text-2); font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.mm-act:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.mm-act:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mm-act--gold { border-color: rgba(217, 119, 6, 0.45); color: var(--warn); }
.mm-act--del:hover { border-color: var(--danger); color: var(--danger); }
.mm-act[aria-pressed="true"] { background: var(--gradient-brand); color: #ffffff; border-color: transparent; }
.mm-wishes--done .mm-wish { background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(236, 72, 153, 0.08)); border-color: rgba(217, 119, 6, 0.35); }
.mm-wishes--rest .mm-wish { opacity: 0.85; }
.mm-empty { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 0.9rem; text-align: center; }

/* journey */
.mm-jhead { display: flex; align-items: center; gap: 14px; }
.mm-jring { position: relative; width: 64px; height: 64px; flex: none; }
.mm-jring svg { width: 64px; height: 64px; transform: rotate(-90deg); display: block; }
.mm-jring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.mm-jring-fg { fill: none; stroke: #f59e0b; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 169.65; stroke-dashoffset: 169.65; transition: stroke-dashoffset 1s ease; }
.mm-jring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--text-strong); }
.mm-beads { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.mm-beads i { aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); }
.mm-beads i.is-key { border-width: 2px; }
.mm-beads i.is-done { background: radial-gradient(circle at 35% 30%, #fff7d6, #fbbf24 50%, #ec4899); border-color: transparent; box-shadow: 0 0 8px rgba(251, 191, 36, 0.45); }
.mm-beads i.is-today { border: 2px solid var(--brand); animation: mm-bead 1.8s ease-in-out infinite; }
@keyframes mm-bead { 50% { box-shadow: 0 0 0 4px var(--ring); } }
.mm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mm-stats div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.mm-stats dt { font-size: 0.75rem; color: var(--text-2); font-weight: 600; }
.mm-stats dd { margin: 2px 0 0; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.mm-chart { display: flex; align-items: flex-end; gap: 4px; height: 100px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.mm-chart i { flex: 1 1 0; min-width: 0; border-radius: 5px 5px 2px 2px; background: var(--line); min-height: 3px; }
.mm-chart i[data-v="1"] { background: #94a3b8; } .mm-chart i[data-v="2"] { background: #a78bfa; } .mm-chart i[data-v="3"] { background: #818cf8; } .mm-chart i[data-v="4"] { background: #f472b6; } .mm-chart i[data-v="5"] { background: #f59e0b; }
.mm-notes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mm-note { display: flex; align-items: flex-start; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.mm-note-text { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--text); overflow-wrap: anywhere; }
.mm-note-day { display: block; font-size: 0.72rem; color: var(--text-3); }
.mm-jar { position: relative; width: 72px; height: 88px; margin: 4px auto; border: 3px solid var(--line-strong); border-top-width: 0; border-radius: 10px 10px 22px 22px; overflow: hidden; }
.mm-jar::before { content: ""; position: absolute; top: 0; left: -3px; right: -3px; height: 9px; background: var(--line-strong); border-radius: 4px; }
.mm-jar-fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill, 0%); background: linear-gradient(180deg, #fde68a, #f59e0b); transition: height 0.8s ease; }
.mm-jar-fill::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.5px, transparent 2px); background-size: 12px 14px; opacity: 0.6; }
.mm-badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mm-badge { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.mm-badge-emoji { font-size: 1.4rem; line-height: 1; flex: none; filter: grayscale(1); opacity: 0.45; }
.mm-badge.is-earned { border-color: var(--tint-brand-border); background: var(--tint-brand); }
.mm-badge.is-earned .mm-badge-emoji { filter: none; opacity: 1; }
.mm-badge-name { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-strong); }
.mm-badge-how { display: block; font-size: 0.75rem; color: var(--text-2); line-height: 1.35; }

/* calm */
.mm-ambs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mm-amb { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--chip-border); background: var(--surface); color: var(--text-strong); font-family: inherit; font-size: 0.875rem; font-weight: 600; text-align: left; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.mm-amb span:first-child { font-size: 1.35rem; line-height: 1; }
.mm-amb:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--surface-hover-shadow); }
.mm-amb[aria-pressed="true"] { background: var(--tint-brand); box-shadow: inset 0 0 0 2px var(--brand); color: var(--link); border-color: transparent; }
.mm-amb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mm-amb.is-playing::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.4); opacity: 0.6; } }

/* more */
.mm-times { display: flex; flex-direction: column; gap: 8px; }
.mm-times .field { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.mm-times .input { width: 160px; flex: none; }
.mm-sharepreview { width: 150px; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; box-shadow: var(--surface-shadow); background: var(--surface-2); }
.mm-sharepreview canvas { width: 100%; height: 100%; display: block; }
.mm-keys { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-2); }

/* windows */
.dialog--board { width: min(1040px, calc(100vw - 16px)); }
.mm-textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.mm-tip--page { color: var(--warn); font-size: 0.85rem; }
.mm-tip--page.is-good { color: var(--ok); }
.mm-cats--page { justify-content: flex-start; }
.mm-cats--page .mm-cat { border-color: var(--chip-border); background: var(--surface); color: var(--text-2); }
.mm-cats--page .mm-cat:hover { border-color: var(--brand); color: var(--link); }
.mm-cats--page .mm-cat[aria-pressed="true"] { background: var(--gradient-brand); color: #ffffff; border-color: transparent; }
.mm-cats--page .mm-cat:focus-visible { outline-color: var(--brand); }
.mm-exlist { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 2px; }
.mm-exlist button { text-align: left; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 0.875rem; line-height: 1.4; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.mm-exlist button:hover { border-color: var(--brand); color: var(--link); }
.mm-exlist button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mm-emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-emojis button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--chip-border); background: var(--surface); font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0; transition: transform 0.2s ease, border-color 0.2s ease; }
.mm-emojis button:hover { transform: translateY(-2px); border-color: var(--brand); }
.mm-emojis button[aria-pressed="true"] { border-color: transparent; box-shadow: inset 0 0 0 2px var(--brand); background: var(--tint-brand); }
.mm-emojis button:focus-visible, .mm-colors button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mm-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-colors button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.mm-colors button:hover { transform: scale(1.08); }
.mm-colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand); }
.mm-plan-wish { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.mm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mm-bcard { position: relative; min-height: 150px; padding: 16px; border-radius: 18px; color: #ffffff; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); overflow: hidden; transition: transform 0.3s ease; }
.mm-bcard:hover { transform: translateY(-4px) rotate(-0.5deg); }
.mm-bcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 60%); pointer-events: none; }
.mm-bcard-emoji { font-size: 2rem; line-height: 1; }
.mm-bcard-text { color: #ffffff; position: relative; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25); }
.mm-bcard-done { position: absolute; top: 12px; right: 12px; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 9999px; background: rgba(255, 255, 255, 0.92); color: #92400e; }

/* ----- Narrow screens ----- */
@media (max-width: 999px) { .mm-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
    .mm-pane { padding: 16px; }
    .mm-top { top: 10px; left: 10px; right: 64px; }   /* the right end stays free for the site's round theme button */
    .mm-stage.is-focus .mm-top { right: 10px; }
    .mm-ritual { inset: 62px 12px 12px; gap: 10px; }
    .mm-over { inset: 60px 10px 10px; }
    .mm-welcome-card { padding: 16px; gap: 10px; }
    .mm-cats--tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mm-examples .mm-ex:nth-child(3) { display: none; }
    .mm-write { flex-direction: column; }
    .mm-main { width: 100%; }
    .mm-welcome-card .mm-main { width: 100%; }
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
    .mm-badges { grid-template-columns: minmax(0, 1fr); }
    .mm-board { grid-template-columns: minmax(0, 1fr); }
    .mm-stage { --mm: clamp(190px, min(60vw, calc(var(--stage-h) - 420px)), 280px); }
}
@media (max-width: 399px) { .mm-ambs { grid-template-columns: minmax(0, 1fr); } }

/* still pictures: the device asks for reduced motion, or Calm is chosen */
.mm-stage.is-still .mm-flower, .mm-stage.is-still .mm-petal, .mm-stage.is-still .mm-svg, .mm-stage.is-still .mm-count-now { animation: none !important; }
.mm-stage.is-still .mm-orb { transition-property: opacity; }
.mm-stage.is-still .mm-orb.is-in { transform: scale(0.7); opacity: 1; }
.mm-stage.is-still .mm-orb:not(.is-in) { opacity: 0.55; transform: scale(0.7); }
@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .toast, .seg button, .chip, .switch::before, .switch::after, .mm-tool, .mm-pill, .mm-ses, .mm-main, .mm-ghost, .mm-cat, .mm-ex, .mm-amb, .mm-tabs button, .mm-ritual, .dialog[open], .mm-over, .mm-trow, .mm-wish, .mm-act, .mm-bcard, .mm-flip, .mm-beads i, .mm-seal, .mm-whisper, .mm-input, .mm-breathe-guide { transition: none; animation: none; }
}

/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The mandala is a picture. */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]) { min-height: 44px; }
    main input[type="range"] { height: 44px; }
    main .seg button { min-height: 44px; min-width: 44px; }
    main .mm-tool { width: 44px; height: 44px; }
    main .mm-pill, .mm-focus .mm-pill, main .mm-ses, .mm-focus .mm-ses, main .mm-cat, main .mm-act { min-height: 44px; }
    main :is(p, li, dt, .hint, .label, .select, .input, .seg button, .muted, .small, .switch-row, .link, .mm-tabs button, .mm-pill, .mm-ses, .mm-cat, .mm-ex, .mm-ghost, .mm-whisper, .mm-tip, .mm-amb, .mm-stats dt, .mm-badge-name, .mm-badge-how, .mm-keys, .value, .mm-trow-name, .mm-trow-hint, .mm-wish-meta, .mm-wish-plan, .mm-act, .mm-note-text, .mm-note-day, .mm-jarcount, .mm-count-of, .mm-daily-cat, .mm-kicker) { font-size: 1rem; }
    main .btn { font-size: 1rem; }
    .mm-focus :is(.mm-pill, .mm-ses, .mm-ghost, .mm-whisper, .mm-tip, .mm-cat, .mm-ex, .mm-breathe-left, .mm-after-step, .mm-count-of, .mm-kicker, .mm-welcome-text, .mm-welcome-note, p) { font-size: 1rem; }
    .mm-focus .mm-tool { width: 44px; height: 44px; }
    .dialog :is(p, li, .label, .input, .btn, .hint, .mm-exlist button, .mm-cat) { font-size: 1rem; }
    .dialog .btn, .dialog .input, .dialog .mm-cat, .dialog .mm-exlist button, .dialog .chip { min-height: 44px; }
    .dialog .chip { font-size: 1rem; }
    .dialog .dialog-close { width: 44px; height: 44px; }
    /* display words stay large: the rule above reaches every p */
    main p.mm-aff, .mm-focus p.mm-aff { font-size: max(1.05rem, var(--mm-size)); }
    main p.mm-after-line, .mm-focus p.mm-after-line { font-size: 1.15rem; }
    main p.mm-breathe-word, .mm-focus p.mm-breathe-word { font-size: 1.5rem; }
    main p.mm-breathe-guide, .mm-focus p.mm-breathe-guide { font-size: 1.2rem; }
    main p.mm-daily-text { font-size: 1.15rem; }
    main p.mm-plan-wish, .dialog p.mm-plan-wish { font-size: 1.1rem; }
    main .mm-stats dd { font-size: 1.2rem; }
}
.mm-breathe-word.is-wish { font-size: var(--mm-size); max-width: 30rem; overflow-wrap: anywhere; }
