/* Wala · Meditate on this. Colours are variables so each Wala look can set its own. */
.wm {
  --wm-bg: #0d0f14;
  --wm-bg2: #18202c;
  --wm-ink: #f3efe6;
  --wm-dim: rgba(243, 239, 230, .22);
  --wm-light: #ffd98a;
  --wm-key: #9fd3ff;
  --wm-mark: rgba(255, 217, 138, .28);
  position: fixed; inset: 0; z-index: 9999;
  display: grid; grid-template-rows: auto auto 1fr auto;
  background: radial-gradient(120% 80% at 50% 0%, var(--wm-bg2), var(--wm-bg) 70%);
  color: var(--wm-ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  opacity: 0; transition: opacity .25s ease;
}
.wm.in { opacity: 1; }
html.wm-open, html.wm-open body { overflow: hidden; }
[data-theme="light"] .wm { --wm-bg: #f6f2ea; --wm-bg2: #fffaf0; --wm-ink: #1d1a16; --wm-dim: rgba(29, 26, 22, .2); --wm-light: #b86b00; --wm-key: #1f5fa8; --wm-mark: rgba(184, 107, 0, .18); }

.wm-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.wm-icon { width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 28px; line-height: 1; cursor: pointer; border-radius: 50%; }
.wm-step { text-align: center; font-size: 14px; letter-spacing: .02em; opacity: .7; }
.wm-ring { width: 34px; height: 34px; justify-self: end; transform: rotate(-90deg); }
.wm-ring circle { fill: none; stroke-width: 3; }
.wm-ring-bg { stroke: var(--wm-dim); }
.wm-ring-fg { stroke: var(--wm-light); stroke-linecap: round; transition: stroke-dasharray .25s linear; }

.wm-cue { text-align: center; font-size: 20px; font-weight: 600; min-height: 1.6em; margin: 10px 0 4px; }
.wm-body { overflow-y: auto; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; -webkit-tap-highlight-color: transparent; }
.wm-body > :first-child { margin-top: auto; }
.wm-body > :last-child { margin-bottom: auto; }
.wm-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding-top: 10px; }

.wm-btn { min-height: 48px; padding: 0 22px; border-radius: 24px; border: 1px solid var(--wm-dim); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.wm-btn.primary { background: var(--wm-light); border-color: var(--wm-light); color: #1b1408; }
.wm-btn.ghost { border-color: transparent; opacity: .7; }
.wm-btn:disabled { opacity: .5; }
.wm-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wm-chip { min-height: 42px; padding: 0 16px; border-radius: 21px; border: 1px solid var(--wm-dim); background: none; color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
.wm-chip.on { border-color: var(--wm-light); background: var(--wm-mark); }

.wm-preview { margin: 0; font: 22px/1.5 Georgia, "Times New Roman", serif; text-align: center; }
.wm-ref { display: block; font-style: normal; font-size: 13px; opacity: .65; margin-top: 2px; }
.wm-big-ref { font-size: 16px; }

/* Breathing orb */
.wm-orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--wm-light), transparent 70%); opacity: .85; transform: scale(.6); }
.wm-orb.grow { transform: scale(1.25); transition: transform 4s ease-in-out; }
.wm-orb.shrink { transform: scale(.6); transition: transform 6s ease-in-out; }

/* The verse, line by line and word by word */
.wm-verse { font: clamp(22px, 5.6vw, 30px)/1.45 Georgia, "Times New Roman", serif; text-align: center; }
.wm-verse.long { font-size: clamp(19px, 4.6vw, 24px); }
.wm-line { margin: 0 0 .35em; transition: opacity .5s ease; }
.wm-line.dim { opacity: .22; }
.wm-w { transition: color .2s ease, opacity .3s ease, text-shadow .2s ease; border-radius: 4px; }
.wm-w.on { color: var(--wm-light); text-shadow: 0 0 18px rgba(255, 217, 138, .45); }
.wm-w.join { font-family: system-ui, sans-serif; font-size: .78em; opacity: .55; }
.lvl-2 .wm-w.key, .lvl-3 .wm-w.key, .lvl-4 .wm-w.key { color: var(--wm-key); }
.lvl-2 .wm-w.key.on, .lvl-3 .wm-w.key.on { color: var(--wm-light); }
.lvl-3 .wm-w:not(.key):not(.on):not(.done) { opacity: .12; }
.lvl-4 .wm-w:not(.on):not(.done) { opacity: .06; }
.lvl-4 .wm-w.key:not(.on):not(.done) { opacity: .3; }
.wm-w.marked { background: var(--wm-mark); }
.wm-w.tappable { cursor: pointer; padding: 0 1px; }
.wm-hint, .wm-note, .wm-small { font-size: 13px; opacity: .6; margin: 0; text-align: center; }
.wm.paused .wm-cue::after { content: " \00b7 paused"; opacity: .6; font-weight: 400; }

.wm-question { font: 24px/1.4 Georgia, serif; text-align: center; margin: 0; }
.wm-declare { font: clamp(22px, 5.4vw, 28px)/1.45 Georgia, serif; text-align: center; margin: 0; }
.wm-declare.pulse { animation: wm-pulse .6s ease; }
@keyframes wm-pulse { 50% { color: var(--wm-light); } }
.wm-dots { display: flex; gap: 10px; }
.wm-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--wm-light); }
.wm-dot.on { background: var(--wm-light); }
.wm-prayer { font: 22px/1.5 Georgia, serif; text-align: center; margin: 0; font-style: italic; }
.wm-kept { margin: 0; font-size: 15px; text-align: center; }
.wm-done { min-height: 1.4em; font-size: 14px; margin: 0; color: var(--wm-light); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .wm, .wm-line, .wm-w, .wm-orb.grow, .wm-orb.shrink, .wm-ring-fg { transition: none; }
  .wm-declare.pulse { animation: none; }
}

/* Large text (a setting the believer keeps on this phone) */
.wm-large { font-size: 20px; }
.wm-large .wm-verse { font-size: clamp(28px, 7vw, 38px); }
.wm-large .wm-verse.long { font-size: clamp(24px, 6vw, 30px); }
.wm-large .wm-declare, .wm-large .wm-question, .wm-large .wm-prayer { font-size: 28px; }
.wm-pace { margin-top: -4px; }
.wm-foot a.wm-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Make it yours: the changed words fade out, the personal words fade in, lit. */
.wm-morph .wm-w { transition: opacity .8s ease, color .8s ease, text-shadow .8s ease; }
.wm-morph.fade-going .going { opacity: .08; }
.wm-morph .coming { opacity: 0; }
.wm-morph.show-coming .coming { opacity: 1; color: var(--wm-light); text-shadow: 0 0 18px rgba(255, 217, 138, .45); }
.wm { background: radial-gradient(120% 80% at 50% 0%, var(--wm-bg2), var(--wm-bg) 70%); }
