/* Calculator (js/life/calc.js) and Calm (js/life/calm.js). */

/* ── calculator ── */
.calc-card { max-width: 520px; margin-inline: auto; width: 100%; }
.calc-screen { background: var(--paper-2); border-radius: var(--r-ctl); padding: 10px 14px 12px; margin-bottom: 12px; text-align: right; min-height: 104px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.calc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; }
.calc-mem { color: var(--ink-soft); }
.calc-expr { font-size: 1.05rem; color: var(--ink-soft); overflow-wrap: anywhere; word-break: break-all; }
.calc-out { font-size: 2.1rem; font-weight: 800; line-height: 1.15; min-height: 2.4rem; overflow-wrap: anywhere; word-break: break-all; font-variant-numeric: tabular-nums; }
.calc-out.err { font-size: 1rem; font-weight: 600; color: var(--bad); }
.calc-keys { display: flex; flex-direction: column; gap: 8px; }
.calc-basic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-mems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-sci { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.calc-k { min-height: 54px; border: 0; border-radius: 16px; background: var(--raised); color: var(--ink); font: inherit; font-size: 1.25rem; font-weight: 700; box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; touch-action: manipulation; }
.calc-sci .calc-k { min-height: 42px; font-size: .95rem; }
.calc-k.m { min-height: 36px; font-size: .85rem; color: var(--ink-soft); }
.calc-k.fn { background: var(--paper-2); }
.calc-k.fn.on { background: var(--me-tint); box-shadow: inset 0 0 0 2px var(--me); }
.calc-k.op { background: var(--you-tint); }
.calc-k.eq { background: var(--me); color: var(--accent-ink, #fff); box-shadow: none; }
.calc-k:active { transform: scale(.96); }
.calc-k:focus-visible { outline: 3px solid var(--me); outline-offset: 2px; }
.calc-hist { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.calc-hist button { width: 100%; display: flex; justify-content: space-between; gap: 10px; border: 0; background: var(--paper-2); color: var(--ink); border-radius: 12px; padding: 8px 12px; font: inherit; text-align: left; cursor: pointer; }
.calc-he { color: var(--ink-soft); overflow-wrap: anywhere; min-width: 0; }
.calc-form select, .calc-form input { width: 100%; }
.calc-sys { display: flex; flex-direction: column; gap: 8px; }
.calc-sys-row { display: grid; grid-template-columns: repeat(calc(var(--n) + 1), minmax(0, 1fr) auto); align-items: center; gap: 4px; }
.calc-sys-row input { min-width: 0; width: 100%; text-align: center; padding-inline: 4px; }
.calc-sys-row span { font-weight: 700; white-space: nowrap; padding-right: 2px; }
.calc-ans { font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; overflow-wrap: anywhere; }
.calc-steps { margin: 8px 0 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; line-height: 1.4; overflow-wrap: anywhere; }

/* ── calm ── */
.wb-sos { margin-bottom: 12px; width: 100%; border: 0; border-radius: var(--r); padding: 18px 16px; background: linear-gradient(135deg, var(--me), var(--you)); color: #fff; font: inherit; font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 6px 18px var(--glow, rgba(0,0,0,.15)); }
.wb-sos small { display: block; font-weight: 600; font-size: .8rem; opacity: .9; }
.wb-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wb-tool { border: 0; border-radius: var(--r-ctl); background: var(--raised); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); padding: 12px; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.wb-tool b { font-size: .98rem; }
.wb-tool small { color: var(--ink-soft); line-height: 1.3; }
.wb-breathe { display: grid; place-items: center; gap: 14px; padding: 8px 0 4px; text-align: center; }
.wb-orb-wrap { width: min(70vw, 260px); aspect-ratio: 1; display: grid; place-items: center; }
.wb-orb { width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--me) 35%, white), var(--me)); box-shadow: 0 0 0 10px var(--me-tint), 0 0 40px var(--glow, rgba(0,0,0,.15)); transition-property: width; transition-timing-function: ease-in-out; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.6rem; }
.wb-cue { font-size: 1.4rem; font-weight: 800; min-height: 1.8rem; }
.wb-sub { color: var(--ink-soft); min-height: 1.2rem; }
.wb-ground-n { font-size: 3rem; font-weight: 800; color: var(--me); line-height: 1; }
.wb-step { text-align: center; display: grid; gap: 10px; justify-items: center; }
.wb-step p { max-width: 34ch; margin: 0; line-height: 1.45; }
.wb-dots { display: flex; gap: 6px; justify-content: center; }
.wb-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.wb-dots i.on { background: var(--me); }
.wb-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-scale .chip { min-width: 40px; justify-content: center; }
.wb-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 6px; }
.wb-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; min-width: 0; }
.wb-bars i { width: 100%; max-width: 18px; border-radius: 6px 6px 2px 2px; background: var(--me); min-height: 3px; }
.wb-bars i.anx { background: var(--you); }
.wb-bars small { font-size: .62rem; color: var(--ink-soft); }
.wb-legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-soft); }
.wb-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--me); vertical-align: -1px; }
.wb-legend span.anx::before { background: var(--you); }
.wb-crisis { border: 2px solid var(--bad); }
.wb-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wb-lines li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wb-lines li > div { min-width: 0; flex: 1 1 180px; }
.wb-guide p, .wb-guide li { line-height: 1.5; }
.wb-quote { font-size: 1.15rem; font-weight: 700; text-align: center; line-height: 1.45; padding: 10px 4px; min-height: 4.5em; display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .wb-orb { transition-duration: 0s !important; } }

/* ── bank & e-wallet picker (js/life/money/institutions.js) ── */
.inst-initials { display: grid !important; place-items: center; color: #fff !important; font-weight: 800; font-size: .72rem; letter-spacing: .02em; padding: 0 !important; }
.inst-badge .inst-initials { font-size: .8rem; }
.inst-group { position: sticky; top: -4px; z-index: 1; background: var(--paper); padding: 6px 8px 2px; }
.inst-group small { font-weight: 800; color: var(--ink-soft); }
.inst-other span.grow { font-weight: 700; }
