/* ============================================================
   Sukoon ਸੁਕੂਨ — design system
   ============================================================ */

@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/Fraunces.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gurmukhi';
  src: url('../assets/fonts/NotoGurmukhi.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F6ECD6;
  --cream-2: #FBF5E8;
  --brown: #5C3418;
  --brown-deep: #4A2810;
  --gold: #C48C28;
  --gold-lt: #F2C35B;
  /* gold that still passes AA as small text on cream */
  --gold-ink: #8A5F12;
  --magenta: #96184F;
  --maroon: #6E1228;
  --indigo: #121A33;
  --night-card: #1C2547;
  --night-text: #F3E6C8;

  /* plum is for selection and quiet emphasis — never the accent */
  --plum: #7A1741;
  --plum-tint: rgba(150, 24, 79, .075);
  --hairline: rgba(196, 140, 40, .52);

  --bg: #F6ECD6;
  --card: #FDF7E9;
  --text: #5C3418;
  --text-strong: #4A2810;
  --muted: #7A5A3C;
  --line: #E6D3AE;
  --line-soft: rgba(196, 140, 40, .26);
  --nav-bg: rgba(253, 247, 233, .94);
  --nav-icon: #7A5A3C;
  --nav-on: var(--plum);
  --shadow: 0 28px 54px -30px rgba(74, 40, 16, .40), 0 4px 12px -6px rgba(74, 40, 16, .10);
  --shadow-sm: 0 16px 32px -22px rgba(74, 40, 16, .34), 0 2px 6px -2px rgba(74, 40, 16, .08);
  --header-glow: 0 1px 10px rgba(255, 248, 230, .92);

  /* one type scale */
  --t-display: 2rem;
  --t-title: 1.375rem;
  --t-body: 1.0625rem;
  --t-cap: .875rem;
  --r: 24px;
  --fs: 1;
}

html[data-theme='night'] {
  --plum: #E9C3D2;
  --plum-tint: rgba(233, 195, 210, .10);
  --hairline: rgba(196, 140, 40, .42);
  --gold-ink: #F2C35B;

  --bg: #121A33;
  --card: #1D2749;
  --text: #F3E6C8;
  --text-strong: #FBF0DA;
  --muted: #C3B294;
  --line: #39405E;
  --line-soft: rgba(196, 140, 40, .26);
  --nav-bg: rgba(29, 39, 73, .94);
  --nav-icon: #C9B79A;
  --shadow: 0 28px 54px -30px rgba(0, 0, 0, .65), 0 4px 12px -6px rgba(0, 0, 0, .35);
  --shadow-sm: 0 16px 32px -22px rgba(0, 0, 0, .55), 0 2px 6px -2px rgba(0, 0, 0, .3);
  --header-glow: 0 2px 12px rgba(12, 16, 30, .7);
}

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--fs)); -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #1c130a;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .6s ease;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(196, 140, 40, .3); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.ser, .serif { font-family: 'Fraunces', Georgia, serif; }
.gur { font-family: 'Gurmukhi', 'Noto Sans Gurmukhi', sans-serif; line-height: 1.6; }

#backdrop {
  position: fixed;
  inset: -8%;
  z-index: 0;
  background: url('../assets/img/headers/header-day.webp') center 40% / cover no-repeat;
  filter: blur(26px) brightness(.55) saturate(1.1);
  transform: scale(1.12);
  transition: background-image .6s ease;
}
html[data-theme='night'] #backdrop {
  background-image: url('../assets/img/headers/header-night.webp');
  filter: blur(26px) brightness(.42) saturate(1.05);
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  transition: background-color .6s ease;
}
@media (min-width: 700px) {
  .app { box-shadow: 0 0 90px rgba(0, 0, 0, .5); }
}

/* ---------------- screens & transitions ---------------- */
.screens { position: relative; height: 100dvh; overflow: hidden; }

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  transition: opacity .4s ease, background-color .6s ease;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.screen::-webkit-scrollbar { display: none; }
.screen.no-scroll { overflow: hidden; padding-bottom: 0; }
.screen.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.screen.is-active .screen-inner { animation: screenIn .45s ease; }
.screen.leaving { opacity: 0; visibility: visible; pointer-events: none; }
.app.has-mini .screen { padding-bottom: calc(196px + env(safe-area-inset-bottom)); }
.app.has-mini .screen.no-scroll { padding-bottom: 0; }

@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.screen-inner { min-height: 100%; position: relative; }

.stagger > * {
  opacity: 0;
  animation: cardUp .6s ease forwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes cardUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- shared type ---------------- */
.h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: var(--t-title);
  line-height: 1.3;
  color: var(--text-strong);
  letter-spacing: -.01em;
}
.sec { margin-top: 32px; padding: 0 20px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }

/* every former text link is now a quiet secondary pill */
.link-gold {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  font: 500 .875rem 'Inter', sans-serif;
  color: var(--text-strong);
  transition: background-color .3s ease, border-color .3s ease;
}

.page-head { padding: calc(32px + env(safe-area-inset-top)) 22px 8px; }
.page-kicker {
  font: 600 var(--t-cap) 'Fraunces', serif;
  color: var(--gold-ink);
  letter-spacing: .02em;
}
.page-title {
  font: 600 var(--t-display)/1.2 'Fraunces', serif;
  color: var(--text-strong);
  margin-top: 8px;
  letter-spacing: -.015em;
}
.page-title-gur {
  font: 600 var(--t-title)/1.6 'Gurmukhi', sans-serif;
  color: var(--muted);
  margin-top: 8px;
}

.empty { padding: 56px 32px; text-align: center; color: var(--muted); }
.empty p { font: 500 var(--t-body)/1.6 'Inter', sans-serif; }
.empty-sub { font-size: var(--t-cap) !important; margin-top: 8px; }

/* ---------------- media ---------------- */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, rgba(196, 140, 40, .14), rgba(196, 140, 40, .04) 45%, rgba(196, 140, 40, .14));
  background-size: 200% 100%;
  animation: shimmerBg 1.8s linear infinite;
}
.media:has(img.ld) { animation: none; background: rgba(92, 52, 24, .08); }
html[data-theme='night'] .media:has(img.ld) { background: rgba(0, 0, 0, .25); }
.media img, .media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media img { opacity: 0; transition: opacity .5s ease; }
.media img.ld { opacity: 1; }
.media video { opacity: 0; transition: opacity .9s ease; z-index: 2; }
.media video.ready { opacity: 1; }

@keyframes shimmerBg {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

/* ---------------- header ---------------- */
.hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #cbb894;
}
.hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: scale(1.06);
}
.hero-media img, .hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(30, 18, 8, .16), transparent 34%),
    linear-gradient(180deg, transparent 56%, var(--bg) 100%);
  transition: background .6s ease;
}
.hero-copy {
  position: absolute;
  left: 22px;
  right: 64px;
  top: calc(28px + env(safe-area-inset-top));
  z-index: 3;
  will-change: transform, opacity;
}
.hero-kicker {
  font: 600 var(--t-body) 'Fraunces', serif;
  color: var(--brown-deep);
  text-shadow: var(--header-glow);
  line-height: 1.35;
}
.hero-title {
  font: 700 var(--t-display)/1.6 'Gurmukhi', sans-serif;
  color: var(--brown-deep);
  text-shadow: 0 2px 12px rgba(255, 248, 230, .95), 0 1px 2px rgba(255, 248, 230, .9);
  margin-top: .1em;
}
.hero--night .hero-kicker,
.hero--night .hero-title {
  color: #FBF0DA;
  text-shadow: 0 1px 4px rgba(10, 14, 30, .7), 0 0 18px rgba(10, 14, 30, .55);
}
html[data-theme='night'] .hero--night .hero-fade { background: linear-gradient(180deg, rgba(4, 8, 20, .3), transparent 34%), linear-gradient(180deg, transparent 54%, var(--bg) 100%); }

/* text over artwork always sits on a soft scrim */
.hero--lib { height: 224px; }
.hero--lib .hero-fade {
  background:
    radial-gradient(120% 78% at 50% 4%, rgba(26, 15, 7, .66) 0%, rgba(26, 15, 7, .28) 44%, rgba(26, 15, 7, 0) 70%),
    linear-gradient(180deg, rgba(26, 15, 7, .26), rgba(26, 15, 7, 0) 46%),
    linear-gradient(180deg, rgba(26, 15, 7, 0) 58%, var(--bg) 100%);
}
.hero--lib .hero-copy {
  left: 0;
  right: 0;
  top: calc(40px + env(safe-area-inset-top));
  text-align: center;
}
.hero--lib .hero-kicker {
  color: #FFF6E6;
  text-shadow: 0 1px 8px rgba(24, 14, 6, .55);
}
.hero--lib .hero-title {
  color: #FFF6E6;
  text-shadow: 0 2px 14px rgba(24, 14, 6, .6);
}
.hero--more { height: 232px; }
.hero--more .hero-fade {
  background:
    radial-gradient(88% 76% at 16% 6%, rgba(26, 15, 7, .62) 0%, rgba(26, 15, 7, .24) 48%, rgba(26, 15, 7, 0) 74%),
    linear-gradient(180deg, rgba(26, 15, 7, .24), rgba(26, 15, 7, 0) 44%),
    linear-gradient(180deg, rgba(26, 15, 7, 0) 56%, var(--bg) 100%);
}
.hero--more .hero-kicker { color: #FFF6E6; text-shadow: 0 1px 8px rgba(24, 14, 6, .5); }
.hero--more .hero-title { color: #FFF6E6; text-shadow: 0 2px 14px rgba(24, 14, 6, .55); }

/* ---------------- home ---------------- */
.home-body { padding-bottom: 6px; }
.gb-wrap { position: relative; z-index: 3; margin: -44px 18px 0; }

.gbcard {
  position: relative;
  background: var(--card);
  border-radius: var(--r);
  padding: 32px 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: background-color .6s ease, box-shadow .6s ease;
}
.gbcard-strip,
.about-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: url('../assets/img/ui/phulkari-strip-tile.webp') repeat-x center / auto 7px;
}
.gb-kicker {
  text-align: center;
  font: 600 var(--t-cap) 'Inter', sans-serif;
  letter-spacing: .16em;
  color: var(--gold-ink);
  margin-bottom: 16px;
}
.gb-line {
  text-align: center;
  font: 700 var(--t-title)/1.6 'Gurmukhi', sans-serif;
  color: var(--text-strong);
  max-width: 30ch;
  margin: 0 auto;
}
.gbcard.playing .gb-line {
  background: linear-gradient(100deg, var(--text-strong) 0%, var(--text-strong) 40%, #E0A93A 50%, var(--text-strong) 60%, var(--text-strong) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 4.5s linear infinite;
}
@keyframes shimmerText {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}
.gb-pa {
  text-align: center;
  font: 400 var(--t-cap)/1.6 'Gurmukhi', sans-serif;
  color: var(--muted);
  margin-top: 16px;
}
.gb-en {
  text-align: center;
  font: italic 400 var(--t-cap)/1.6 'Inter', sans-serif;
  color: var(--muted);
  margin-top: 8px;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
}
.gb-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
}

.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--plum);
  display: grid;
  place-items: center;
  transition: background-color .3s ease;
  flex: none;
}

/* the one magenta action: flat, solid, no glow */
.brass {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--magenta);
  color: #FFF6E4;
  display: grid;
  place-items: center;
  transition: opacity .3s ease;
  flex: none;
}
.brass .brass-ic { display: grid; place-items: center; }
.brass:active { opacity: .85; }
.brass.playing { background: var(--magenta); }
/* secondary play buttons stay quiet */
.brass-sm {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--plum);
}

/* crop the painted phulkari frame out of the artwork thumbnails */
.med-thumb img, .cont-thumb img, .soon-thumb img, .mini-thumb img { transform: scale(1.14); }
.tile-media img, .tile-media video { transform: scale(1.16); }
.sleep-media img, .sleep-media video { transform: scale(1.26); }

/* one button system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 var(--t-body) 'Inter', sans-serif;
  text-align: center;
  transition: opacity .3s ease, background-color .3s ease, border-color .3s ease, color .3s ease;
}
.btn:active { opacity: .86; }
.btn.primary { background: var(--magenta); color: #FFF6E4; }
.btn.ghost { background: transparent; color: var(--text-strong); border-color: var(--hairline); }
.btn.danger { background: var(--maroon); color: #FFF6E4; }
.btn.full { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 20px; font-size: var(--t-cap); }
.btn:disabled { opacity: .45; pointer-events: none; }
html[data-theme='night'] .btn.ghost { color: var(--night-text); }
.brass-lg {
  position: absolute;
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
  width: 84px;
  height: 84px;
  z-index: 6;
}
.brass-lg:active { transform: translateX(-50%); }

/* mood tiles */
.mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.tile {
  position: relative;
  height: 168px;
  border: 1px solid var(--hairline);
  padding: 0;
  border-radius: var(--r);
  overflow: hidden;
  text-align: left;
  color: #FFF6E6;
  box-shadow: var(--shadow-sm);
  transition: opacity .3s ease;
  background: #2a1a10;
}
.tile:active { opacity: .92; }
.tile-media { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 10, 6, .9) 0%, rgba(16, 10, 6, .42) 46%, rgba(16, 10, 6, .04) 74%);
  pointer-events: none;
}
.tile-tx {
  position: absolute;
  left: 16px;
  right: 14px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
.tile-tx b { font: 600 var(--t-body)/1.3 'Fraunces', serif; }
.tile-tx .gur { font-size: var(--t-cap); line-height: 1.6; opacity: .95; }

/* pind sounds */
.pind-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 16px -20px 0;
  padding: 2px 20px 8px;
  scrollbar-width: none;
}
.pind-row::-webkit-scrollbar { display: none; }
.pind {
  flex: none;
  width: 104px;
  background: none;
  border: 0;
  padding: 0;
  text-align: center;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pind-ring {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--hairline);
  overflow: hidden;
  margin-bottom: 2px;
  transition: opacity .3s ease;
}
.pind:active .pind-ring { opacity: .85; }
.pind-media { width: 100%; height: 100%; border-radius: 50%; }
.pind-media img, .pind-media video { transform: scale(1.16); }
.pind b { font: 600 var(--t-cap)/1.3 'Inter', sans-serif; white-space: nowrap; }
.pind .gur {
  font: 400 var(--t-cap)/1.6 'Gurmukhi', sans-serif;
  color: var(--muted);
  white-space: nowrap;
}

/* course card */
.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 24px 52px 24px 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: background-color .6s ease, opacity .3s ease;
}
.course-card:active { opacity: .92; }
.cc-kicker { font: 600 var(--t-cap) 'Inter', sans-serif; letter-spacing: .14em; color: var(--muted); }
.cc-title { font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); }
.cc-sub { font: 400 var(--t-cap)/1.6 'Gurmukhi', sans-serif; color: var(--muted); }
.cc-dots { display: flex; gap: 7px; margin-top: 10px; }
.cc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.cc-dots i.done { background: var(--gold); box-shadow: 0 0 6px rgba(196, 140, 40, .6); }
.cc-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--gold); }

/* continue */
.continue-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.cont-thumb { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; flex: none; }
.cont-media { width: 100%; height: 100%; }
.cont-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cont-tx small { font: 600 var(--t-cap) 'Inter', sans-serif; letter-spacing: .12em; color: var(--muted); }
.cont-tx b {
  font: 600 var(--t-body)/1.3 'Fraunces', serif;
  color: var(--text-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cont-tx .gur { font-size: var(--t-cap); line-height: 1.6; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 4px; overflow: hidden; }
.cont-bar i { display: block; height: 100%; border-radius: 2px; background: var(--gold); }
.cont-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; color: var(--plum);
  border: 1px solid var(--hairline);
  display: grid; place-items: center; flex: none;
}

/* coming soon */
.soon-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--hairline);
  opacity: .88;
}
.soon-thumb { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; flex: none; filter: saturate(.75) brightness(.95); }
.soon-media { width: 100%; height: 100%; }
.soon-tx { flex: 1; min-width: 0; }
.soon-tx b { display: block; font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); }
.soon-tx .gur { display: block; font-size: var(--t-cap); line-height: 1.6; color: var(--muted); margin-top: 2px; }
.soon-tx small { display: block; font: 500 var(--t-cap)/1.4 'Inter', sans-serif; color: var(--muted); margin-top: 6px; }
.soon-sec { margin-top: 32px; }

.streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 0 16px;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--muted);
}
.streak-ic { color: var(--gold); display: grid; place-items: center; }
.streak.lit { color: var(--text); }
.streak.lit .streak-ic { filter: drop-shadow(0 0 7px rgba(242, 195, 91, .8)); }

/* ---------------- library ---------------- */
.search-wrap { position: relative; z-index: 4; margin: -24px 18px 0; }
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font: 400 var(--t-body) 'Inter', sans-serif;
  color: var(--text);
}
.search input::placeholder { color: var(--muted); opacity: .9; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .5; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 18px 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips.tight { padding: 0; flex-wrap: wrap; overflow: visible; }
/* selected = soft plum tint, gold hairline, plum text */
.chip {
  flex: none;
  padding: 0 18px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.chip:active { opacity: .85; }
.chip.on {
  background: var(--plum-tint);
  border-color: rgba(196, 140, 40, .85);
  color: var(--plum);
  font-weight: 600;
}

.lib-list { padding-bottom: 10px; }
.sleep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.sleep-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r);
  overflow: hidden;
  background: #1a2238;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: opacity .3s ease;
  outline-offset: 3px;
}
.sleep-card:active { opacity: .92; }
.sleep-media { position: absolute; inset: 0; }
.sleep-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, rgba(10, 14, 28, .95), rgba(10, 14, 28, .18) 58%, transparent);
}
.sc-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  background: rgba(20, 14, 8, .42);
  border: 1px solid rgba(255, 246, 230, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FFF6E6;
  font: 600 var(--t-cap) 'Inter', sans-serif;
  padding: 4px 12px;
  border-radius: 999px;
}
.sc-tx {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  color: #FFF6E6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.sc-tx b { font: 600 var(--t-body)/1.3 'Fraunces', serif; }
.sc-tx .gur { font-size: var(--t-cap); line-height: 1.6; opacity: .95; }

.save-dot {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 246, 230, .26);
  background: rgba(18, 14, 10, .45);
  backdrop-filter: blur(8px);
  color: #FFF6E6;
  display: grid;
  place-items: center;
  transition: background-color .3s ease, color .3s ease;
}
.save-dot:active { opacity: .85; }
.save-dot.saved { background: var(--gold-lt); border-color: transparent; color: #3a2408; }
.save-dot.saving { color: var(--gold-lt); }
.save-dot.saving svg { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.save-dot.on-card {
  position: static;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--plum);
  border: 1px solid var(--hairline);
  backdrop-filter: none;
  flex: none;
}
.save-dot.on-card.saved { background: var(--gold-lt); color: #3a2408; border-color: transparent; }

.med-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.med-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: opacity .3s ease;
}
.med-row:active { opacity: .92; }
.med-thumb { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; flex: none; }
.med-tx { flex: 1; min-width: 0; }
.med-tx b { display: block; font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); }
.med-tx .gur { display: block; font-size: var(--t-cap); line-height: 1.6; color: var(--muted); margin-top: 2px; }
.med-tx small { display: block; font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); margin-top: 6px; white-space: nowrap; }

.saved-mixes { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.saved-mix {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  cursor: pointer;
}
.saved-mix-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--plum-tint); color: var(--plum); display: grid; place-items: center; flex: none; }
.saved-mix-tx { flex: 1; min-width: 0; }
.saved-mix-tx b { display: block; font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); }
.saved-mix-tx span { font: 400 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.saved-mix-go { color: var(--muted); }

/* ---------------- player ---------------- */
.player-inner { min-height: 100dvh; }
.player {
  position: relative;
  background: var(--bg);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .45s ease, opacity .45s ease;
}
.player.dragging { transition: none; }
.player.closing { transform: translateY(22%); opacity: 0; }
.player-scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  overflow: visible;
  background: #1a1208;
}
.ps-media { position: absolute; inset: 0; overflow: hidden; }
.ps-media img, .ps-media video { border-radius: 0; transform: scale(1.18); }
.ps-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 8, 6, .4), transparent 28%), linear-gradient(0deg, rgba(10, 8, 6, .32), transparent 38%);
}
.ps-btn {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 246, 230, .24);
  background: rgba(22, 15, 9, .42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FFF6E6;
  display: grid;
  place-items: center;
  z-index: 7;
}
.ps-close { left: 18px; }
.ps-more { right: 18px; }
.ps-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  z-index: 2;
  background: url('../assets/img/ui/phulkari-strip-wide.webp') center / cover no-repeat;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .18);
}
/* controls anchored in a card near the bottom */
.player-panel {
  position: relative;
  z-index: 5;
  margin: -20px 12px 12px;
  padding: 64px 20px 20px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  text-align: center;
  transition: background-color .6s ease;
}
.p-title { font: 600 var(--t-title)/1.3 'Fraunces', serif; color: var(--text-strong); }
.p-sub {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font: 500 var(--t-cap) 'Inter', sans-serif;
}
.p-sub .gur { font-size: var(--t-cap); line-height: 1.6; }
.p-dot { opacity: .6; }
.p-seek-wrap { margin-top: 16px; }
.p-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) var(--p, 0%), var(--line) var(--p, 0%));
  outline: none;
  cursor: pointer;
}
.p-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--plum);
  border: 0;
  box-shadow: 0 0 0 4px var(--card);
}
.p-seek::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--plum); border: 0;
  box-shadow: 0 0 0 4px var(--card);
}
.p-times {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--muted);
}
.p-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}
.p-skip {
  background: none;
  border: 0;
  padding: 8px;
  color: var(--text-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  min-height: 44px;
}
html[data-theme='night'] .p-skip { color: var(--night-text); }
.p-skip small { font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.p-mode { font: 600 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.p-chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.p-chips::-webkit-scrollbar { display: none; }
.p-chips .chip { flex: none; min-height: 44px; padding: 0 16px; font-size: var(--t-cap); }
.p-sounds {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text-strong);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  transition: background-color .3s ease;
}
.p-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  overflow: hidden;
  pointer-events: none;
  opacity: .75;
}
.p-edge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: .6;
  -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 100%);
  mask-image: linear-gradient(to top, #000 20%, transparent 100%);
}

/* ---------------- breathe ---------------- */
.breathe-inner {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.scene { position: absolute; inset: 0; }
.scene img, .scene video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transform-origin: center; }
.scene video { opacity: .55; }
.scene video.ready { opacity: .55; }
.scene-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(30, 20, 8, .22), transparent 26%),
    linear-gradient(0deg, var(--bg) 0%, rgba(246, 236, 214, .82) 13%, rgba(246, 236, 214, .12) 34%, transparent 46%);
  transition: background .6s ease;
}
html[data-theme='night'] .scene-wash {
  background:
    linear-gradient(180deg, rgba(2, 6, 18, .3), transparent 26%),
    linear-gradient(0deg, var(--bg) 0%, rgba(18, 26, 51, .85) 14%, rgba(18, 26, 51, .14) 36%, transparent 48%);
}
/* header sits in a frosted pill so it reads over any frame of the scene */
.scene-head {
  position: absolute;
  top: calc(24px + env(safe-area-inset-top));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  text-align: center;
  z-index: 3;
  padding: 10px 26px 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 246, 230, .2);
  background: rgba(44, 26, 10, .4);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}
.scene-head p {
  font: 600 var(--t-cap) 'Fraunces', serif;
  color: #FFF6E6;
  letter-spacing: .02em;
}
.scene-head h1 {
  font: 700 var(--t-display)/1.6 'Gurmukhi', sans-serif;
  color: #FFF6E6;
  margin-top: 2px;
}
.breathe-stage {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 148px 24px 16px;
  text-align: center;
}
.orb-wrap {
  position: relative;
  width: 196px;
  height: 196px;
  display: grid;
  place-items: center;
  flex: none;
}
.orb-glow {
  position: absolute;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 195, 91, .5), rgba(242, 195, 91, .14) 55%, transparent 72%);
  filter: blur(3px);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1), opacity .6s;
  will-change: transform;
}
.orb {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #FFF8DE, #F2C35B 58%, #C48C28 100%);
  box-shadow: 0 0 42px rgba(242, 195, 91, .7), inset -6px -8px 20px rgba(150, 96, 18, .22);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1);
  will-change: transform;
  transform: scale(.7);
}
.orb.holding {
  animation: orbBreathe 4.5s ease-in-out infinite;
}
@keyframes orbBreathe {
  0%, 100% { box-shadow: 0 0 38px rgba(242, 195, 91, .6), inset -6px -8px 20px rgba(150, 96, 18, .22); }
  50% { box-shadow: 0 0 54px rgba(242, 195, 91, .85), inset -6px -8px 20px rgba(150, 96, 18, .22); }
}
.phase {
  margin-top: 32px;
  padding: 14px 30px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(196, 140, 40, .4);
  background: rgba(253, 247, 233, .84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px -28px rgba(30, 20, 6, .55);
  min-width: 220px;
}
html[data-theme='night'] .phase {
  border-color: rgba(196, 140, 40, .34);
  background: rgba(20, 28, 54, .82);
}
.phase-pa {
  font: 700 var(--t-title)/1.6 'Gurmukhi', sans-serif;
  color: var(--brown-deep);
}
html[data-theme='night'] .phase-pa { color: var(--night-text); }
.phase-en {
  font: 600 var(--t-cap) 'Inter', sans-serif;
  color: var(--text-strong);
  margin-top: 4px;
}
html[data-theme='night'] .phase-en { color: rgba(243, 230, 200, .88); }
.phase.swap .phase-pa, .phase.swap .phase-en { animation: fadeSwap .45s ease; }
@keyframes fadeSwap {
  from { opacity: 0; }
  to { opacity: 1; }
}
.guide-skip {
  margin-top: 16px;
  min-height: 44px;
  padding: 0 22px;
  background: rgba(253, 247, 233, .88);
  border: 1px solid rgba(196, 140, 40, .55);
  border-radius: 999px;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--plum);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.breathe-foot {
  position: relative;
  z-index: 4;
  padding: 0 24px calc(120px + env(safe-area-inset-bottom));
}
.b-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(92, 52, 24, .18);
  overflow: hidden;
  margin-bottom: 16px;
}
html[data-theme='night'] .b-progress { background: rgba(255, 255, 255, .16); }
.b-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  transition: width .3s linear;
}
.b-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.b-setting {
  justify-self: start;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(253, 247, 233, .88);
  font: 600 var(--t-cap) 'Inter', sans-serif;
  color: var(--text-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html[data-theme='night'] .b-setting { background: rgba(29, 39, 73, .86); color: var(--night-text); }
.b-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: var(--magenta);
  color: #FFF6E4;
  display: grid;
  place-items: center;
  transition: opacity .3s ease;
}
.b-play:active { opacity: .85; }
.b-play.is-playing { background: var(--magenta); }
.b-left {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(253, 247, 233, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--text-strong);
}
html[data-theme='night'] .b-left { background: rgba(29, 39, 73, .82); color: var(--night-text); }

.done-veil {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(22, 14, 8, .48);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .5s ease;
}
.done-veil.on { opacity: 1; }
.done-card {
  background: var(--card);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 340px;
  transform: translateY(12px);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.done-veil.on .done-card { transform: none; }
.done-orb {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(242, 195, 91, .18);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.done-card h2 { font: 600 var(--t-title)/1.3 'Fraunces', serif; color: var(--text-strong); }
.done-gur { font: 700 var(--t-body)/1.6 'Gurmukhi', sans-serif; color: var(--gold-ink); margin-top: 8px; }
.done-sub { font: 400 var(--t-cap)/1.6 'Inter', sans-serif; color: var(--muted); margin-top: 8px; }
.done-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.toggle-list { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }

/* ---------------- SOS ---------------- */
.sos-inner {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--night-text);
}
.sos-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 75% at 50% 8%, rgba(110, 18, 40, .46), transparent 62%),
    radial-gradient(95% 70% at 50% 102%, rgba(110, 18, 40, .62), transparent 70%),
    linear-gradient(168deg, #121A33 0%, #1B1533 46%, #341426 100%);
}
.sos-top {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
  font: 600 .8125rem 'Inter', sans-serif;
  opacity: .9;
}
.sos-x {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 246, 230, .26);
  color: inherit;
  display: grid;
  place-items: center;
}
.sos-mid {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 88px 28px 112px;
  transition: opacity .5s ease;
}
.sos-mid.fade { opacity: .25; }
.sos-lead {
  font: 400 var(--t-title)/1.5 'Fraunces', serif;
  color: #F8EAD6;
  max-width: 280px;
  margin: 0 auto;
}
.sos-gur {
  font: 700 var(--t-display)/1.6 'Gurmukhi', sans-serif;
  color: var(--gold-lt);
  margin-top: 8px;
}
.sos-orb-wrap {
  position: relative;
  width: 208px;
  height: 208px;
  margin: 18px auto 4px;
  display: grid;
  place-items: center;
}
.sos-glow {
  position: absolute;
  width: 208px; height: 208px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 195, 91, .26), transparent 68%);
}
.sos-orb {
  width: 98px; height: 98px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #FFF8DE, #F2C35B 58%, #C48C28 100%);
  box-shadow: 0 0 46px rgba(242, 195, 91, .55);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1);
  transform: scale(.72);
}
.sos-phase {
  font: 500 var(--t-body) 'Inter', sans-serif;
  color: rgba(243, 230, 200, .94);
  margin-top: 8px;
}
.sos-phase.swap { animation: fadeSwap .45s ease; }
.sos-count { font: 600 var(--t-title) 'Fraunces', serif; color: rgba(243, 230, 200, .9); margin-top: 8px; }
.sos-progress {
  width: 190px; height: 3px;
  margin: 22px auto 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
}
.sos-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); transition: width .4s linear; }
.sos-end {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 12, 26, .6);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .5s ease;
}
.sos-end.on { opacity: 1; }
.sos-end-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  background: rgba(29, 39, 73, .97);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 32px 24px 24px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, .45);
}
.sos-end-card h2 { font: 600 var(--t-title)/1.3 'Fraunces', serif; color: var(--night-text); }
.sos-end-card p { font: 400 var(--t-cap)/1.6 'Inter', sans-serif; color: rgba(243, 230, 200, .84); margin-top: 8px; }
.sos-end-actions { display: flex; gap: 12px; margin-top: 24px; }
.sos-end-actions .btn { flex: 1; }
.sos-end-card .link-quiet { margin-top: 16px; color: var(--night-text); border-color: var(--hairline); }

/* ---------------- simran ---------------- */
.simran-inner {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sim-head {
  position: relative;
  z-index: 3;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 40px);
  margin: calc(16px + env(safe-area-inset-top)) auto 0;
  padding: 10px 26px 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 246, 230, .2);
  background: rgba(44, 26, 10, .4);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}
.ik {
  display: block;
  font: 700 1.75rem/1.15 'Gurmukhi', sans-serif;
  color: #F6D782;
}
.sim-kicker {
  font: 600 var(--t-cap) 'Fraunces', serif;
  color: #FFF6E6;
  margin-top: 2px;
}
.sim-title {
  font: 700 var(--t-display)/1.6 'Gurmukhi', sans-serif;
  color: #FFF6E6;
  margin-top: 2px;
}
.sim-body {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 16px 18px calc(112px + env(safe-area-inset-bottom));
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.sim-body::-webkit-scrollbar { display: none; }
.mala-wrap {
  position: relative;
  width: min(300px, 42vh, 80vw);
  aspect-ratio: 1;
  flex: none;
  display: grid;
  place-items: center;
  margin-top: -2px;
}
.mala { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mala-thread { fill: none; stroke: rgba(90, 50, 20, .25); stroke-width: 1; stroke-dasharray: 2 6; }
.bead {
  fill: rgba(255, 245, 226, .72);
  stroke: rgba(90, 50, 20, .42);
  stroke-width: 1;
  transition: fill .35s ease, transform .35s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.bead.lit {
  fill: #F2C35B;
  stroke: rgba(120, 70, 20, .7);
  transform: scale(1.22);
  filter: drop-shadow(0 0 3px rgba(242, 195, 91, .9));
}
.sim-disc {
  position: relative;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, rgba(58, 34, 14, .52), rgba(38, 22, 9, .62));
  border: 1px solid rgba(255, 241, 214, .34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 32px rgba(255, 240, 210, .08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  transition: transform .25s ease;
}
.sim-disc.pulse { animation: discPulse .45s ease; }
@keyframes discPulse {
  0% { opacity: .82; }
  40% { opacity: 1; }
  100% { opacity: 1; }
}
.sim-w {
  font: 700 var(--t-body) 'Gurmukhi', sans-serif;
  color: #F6D782;
}
.sim-n { font: 700 var(--t-display)/1.2 'Fraunces', serif; color: #fff; margin-top: 2px; }
.sim-o { font: 500 var(--t-cap) 'Inter', sans-serif; color: #FFF6E6; margin-top: 2px; }
.mala-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(242, 195, 91, .7);
  opacity: 0;
  pointer-events: none;
}
.mala-ripple.on { animation: ripple .95s ease-out; }
@keyframes ripple {
  0% { opacity: .85; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.14); }
}
.sim-hint {
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: #3F2410;
  text-shadow: 0 1px 10px rgba(255, 248, 230, .95);
  margin-top: 8px;
  text-align: center;
}
.sim-hint .gur { font-size: var(--t-cap); line-height: 1.6; }
.sim-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
/* chips sit over artwork, so they carry their own frosted ground */
.sim-goals .chip {
  background: rgba(253, 247, 233, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-strong);
}
.sim-goals .chip.on {
  background: #FAECF1;
  border-color: var(--gold);
  color: var(--plum);
}
.sim-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.sg-tx { min-width: 0; }
.sg-tx b { display: block; font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); }
.sg-tx span { display: block; font: 400 var(--t-cap)/1.5 'Inter', sans-serif; color: var(--muted); margin-top: 4px; }
.sim-sound-row {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sim-sound-row label { font: 500 var(--t-cap) 'Inter', sans-serif; color: #3F2410; text-shadow: 0 1px 8px rgba(255, 248, 230, .95); flex: none; }
.sim-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}
/* quiet pill, not an underlined link */
.link-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--text-strong);
  text-decoration: none;
  transition: background-color .3s ease;
}
.sim-under .link-quiet {
  color: var(--plum);
  background: rgba(253, 247, 233, .88);
  border-color: rgba(196, 140, 40, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-shadow: none;
}

/* ---------------- mixer ---------------- */
.mixer-inner {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding-bottom: 220px;
}
.data-group { margin-top: 32px; }
.data-group .row { padding: 12px 4px; min-height: 0; }
.data-group .row-tx span { max-width: 34ch; }
.mix-body { padding: 0 18px; }
.mx-body { padding: 0 18px; }
.mx-saved { margin-top: 10px; }
.mx-saved .sheet-label { margin-bottom: 8px; }
.mx-saved-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.mx-saved-row::-webkit-scrollbar { display: none; }
.mx-saved-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--text);
}
.mx-saved-chip small { color: var(--muted); font-size: var(--t-cap); }
.mx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 8px;
  margin-top: 24px;
}
.mx-btn {
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0;
  color: var(--text);
}
.mx-ring {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--hairline);
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.mx-btn.on .mx-ring {
  background: var(--plum-tint);
  border-color: rgba(196, 140, 40, .85);
  color: var(--plum);
}
.mx-btn b { font: 600 .8125rem/1.35 'Inter', sans-serif; text-align: center; }
.mx-btn .gur { font: 400 var(--t-cap)/1.6 'Gurmukhi', sans-serif; color: var(--muted); text-align: center; }
.mx-mix { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.mx-empty { font: 400 var(--t-cap)/1.6 'Inter', sans-serif; color: var(--muted); text-align: center; padding: 8px 0; }
.mx-slider { background: var(--card); border: 1px solid var(--hairline); border-radius: 20px; padding: 14px 16px; }
.mx-slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.mx-slider-head span:first-child { font: 600 var(--t-cap) 'Inter', sans-serif; color: var(--text-strong); }
.mx-slider-head .gur { font-size: var(--t-cap); line-height: 1.6; color: var(--muted); }
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--plum);
  border: 0;
  box-shadow: 0 0 0 4px var(--card);
}
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--plum); border: 0; }
.mx-timers { margin-top: 18px; justify-content: center; }
/* transport docked above the tab bar, always within thumb reach */
.mx-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(104px + env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), 448px);
  z-index: 110;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: background-color .6s ease;
}
#mx-save { margin-top: 24px; }
.mx-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}
.mx-left { font: 600 .8125rem 'Inter', sans-serif; color: var(--muted); }
.mx-play {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 0;
  background: var(--magenta);
  color: #FFF6E4;
  display: grid;
  place-items: center;
  justify-self: center;
  transition: opacity .3s ease;
}
.mx-play:active { opacity: .85; }
.mx-play.on { background: var(--magenta); }
.mx-max { justify-self: end; font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.mx-controls .btn { grid-column: span 3; }

/* ---------------- course ---------------- */
.course-inner { padding-bottom: 18px; }
.course-progress {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin-top: 16px;
  overflow: hidden;
}
.course-progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.course-count { font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); margin-top: 8px; }
.course-body { padding: 0 16px; }
.path { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.path::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 34px;
  left: 34px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 13px);
}
.day-node { position: relative; display: flex; gap: 12px; padding: 12px 0; }
.day-mark { width: 72px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 2; }
.day-diya {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--hairline);
}
.day-num { font: 600 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.day-node.done .day-diya { background: rgba(196, 140, 40, .14); color: var(--text-strong); }
.day-node.current .day-diya { background: var(--plum-tint); border-color: rgba(196, 140, 40, .85); color: var(--plum); }
.day-node.waiting .day-diya { color: var(--muted); }
.day-card {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-sm);
}
.day-node.locked .day-card, .day-node.waiting .day-card { opacity: .72; }
.day-card small { font: 600 var(--t-cap) 'Inter', sans-serif; letter-spacing: .14em; color: var(--muted); }
.day-card h3 { font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); margin-top: 6px; }
.day-card p { font: 400 var(--t-cap)/1.65 'Inter', sans-serif; color: var(--muted); margin-top: 8px; }
.day-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); }
.day-state.done { color: var(--text-strong); }
.course-done-card {
  margin: 24px 4px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 28px 20px;
  box-shadow: var(--shadow-sm);
}
.course-done-card b { display: block; font: 600 var(--t-body) 'Fraunces', serif; color: var(--text-strong); }
.course-done-card p { font: 400 var(--t-cap)/1.65 'Inter', sans-serif; color: var(--muted); margin-top: 8px; }

/* ---------------- more ---------------- */
.more-inner { padding-bottom: 8px; }
.more-body { padding: 0 18px; }
.profile-card {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: -28px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  flex: none;
  background: var(--plum-tint);
  border: 1px solid rgba(196, 140, 40, .6);
  color: var(--plum);
  display: grid;
  place-items: center;
  font: 600 var(--t-title) 'Fraunces', serif;
}
.profile-tx { flex: 1; min-width: 0; }
.profile-tx small { font: 600 var(--t-cap) 'Inter', sans-serif; letter-spacing: .12em; color: var(--muted); }
.profile-tx b { display: block; font: 600 var(--t-body)/1.35 'Fraunces', serif; color: var(--text-strong); margin-top: 4px; }
.profile-tx span { display: block; margin-top: 2px; font: 400 var(--t-cap)/1.5 'Inter', sans-serif; color: var(--muted); }
.setgroup {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: background-color .6s ease;
}
.setgroup .sheet-label { margin: 0 0 14px; }
.setgroup.rows { padding: 6px 12px; }
.sheet-label {
  font: 600 var(--t-cap) 'Inter', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.seg {
  display: flex;
  gap: 6px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
}
.seg-btn {
  flex: 1;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--text);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.seg-btn.on {
  background: var(--plum-tint);
  border-color: rgba(196, 140, 40, .85);
  color: var(--plum);
  font-weight: 600;
}
.swatches { display: flex; gap: 24px; }
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 2px;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--text);
  min-width: 56px;
}
.sw {
  width: 42px; height: 42px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(92, 52, 24, .18);
  transition: box-shadow .25s ease, transform .25s ease;
}
.swatch.on .sw { box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px var(--card); transform: scale(1.02); }
.sw-auto { background: linear-gradient(90deg, #F6ECD6 0 50%, #121A33 50% 100%); }
.sw-day { background: #F6ECD6; }
.sw-night { background: #121A33; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-row b { display: block; font: 600 var(--t-body) 'Inter', sans-serif; color: var(--text-strong); }
.toggle-row span { display: block; margin-top: 4px; font: 400 var(--t-cap)/1.55 'Inter', sans-serif; color: var(--muted); }
.switch {
  position: relative;
  width: 52px; height: 32px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(122, 90, 60, .16);
  flex: none;
  transition: background-color .35s ease;
}
html[data-theme='night'] .switch { background: rgba(255, 255, 255, .14); }
.switch i {
  position: absolute;
  top: 4px; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .35s ease, background-color .35s ease;
}
.switch.on { background: var(--plum-tint); }
.switch.on i { background: var(--plum); transform: translateX(20px); }
.reminder-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.reminder-note { flex: 1; min-width: 160px; font: 400 var(--t-cap)/1.55 'Inter', sans-serif; color: var(--muted); }

/* reminder time picker, dressed like the rest of the app */
.time-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  flex: none;
  transition: border-color .3s ease;
}
.time-field:focus-within { border-color: var(--gold); }
.time-ic { color: var(--gold); display: grid; place-items: center; }
.field.time {
  position: relative;
  width: 108px;
  max-width: none;
  min-height: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font: 600 var(--t-body) 'Inter', sans-serif;
  color: var(--text-strong);
  letter-spacing: .02em;
}
.field.time:focus { box-shadow: none; }
.field.time::-webkit-datetime-edit { padding: 0; }
.field.time::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.field.time::-webkit-datetime-edit-hour-field:focus,
.field.time::-webkit-datetime-edit-minute-field:focus,
.field.time::-webkit-datetime-edit-ampm-field:focus {
  background: var(--plum-tint);
  color: var(--plum);
  border-radius: 6px;
  outline: none;
}
.field.time::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 12px 8px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  color: var(--text);
}
.row:last-child { border-bottom: 0; }
.row-ic {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
}
.row-tx { flex: 1; min-width: 0; }
.row-tx b { display: block; font: 600 var(--t-body) 'Inter', sans-serif; color: var(--text-strong); }
.row-tx span { display: block; margin-top: 2px; font: 400 var(--t-cap)/1.5 'Inter', sans-serif; color: var(--muted); }
.row > svg { color: var(--muted); flex: none; }
/* resetting is a calm, separate action — not an alarm */
.row.calm .row-ic { color: var(--plum); }
.more-foot { text-align: center; font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); padding: 32px 0 8px; }

/* ---------------- about ---------------- */
.about-hero { position: relative; height: 300px; overflow: hidden; }
.about-media { position: absolute; inset: 0; }
.about-media img, .about-media video { transform: scale(1.14); }
.about-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 6, .1), transparent 45%, var(--bg) 100%); }
.about-back {
  position: absolute;
  left: 18px;
  top: calc(16px + env(safe-area-inset-top));
  transform: rotate(90deg);
  z-index: 5;
}
.about-card {
  position: relative;
  margin: -28px 18px 0;
  background: var(--card);
  border-radius: var(--r);
  padding: 40px 26px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
}
.about-kicker { text-align: center; font: 600 var(--t-cap) 'Fraunces', serif; letter-spacing: .08em; color: var(--gold-ink); }
.about-title { text-align: center; font: 600 var(--t-title)/1.3 'Fraunces', serif; color: var(--text-strong); margin-top: 8px; }
.about-body { margin-top: 8px; }
.about-body p { font: 400 var(--t-body)/1.72 'Inter', sans-serif; color: var(--text); margin-top: 16px; }
.about-sign { font: 600 var(--t-cap) 'Inter', sans-serif; color: var(--muted); margin-top: 24px; }
.about-diya { display: block; text-align: center; color: var(--gold); margin-top: 24px; }

/* ---------------- onboarding ---------------- */
#onboarding { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
#onboarding.on { pointer-events: auto; }
#onboarding .ob {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1208;
  opacity: 0;
  transition: opacity .45s ease;
  overflow: hidden;
}
#onboarding.on .ob { opacity: 1; }
.ob-scene { position: absolute; inset: 0; }
.ob-scene img, .ob-scene video { inset: -12%; width: 124%; height: 124%; transform: none; }
.ob-scene video { opacity: .9; }
.ob-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 8, 16, .25) 0%, rgba(10, 8, 16, 0) 26%, rgba(10, 8, 16, .62) 60%, rgba(10, 8, 16, .95) 100%);
}
.ob-skip {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 20px;
  z-index: 6;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 230, .3);
  background: rgba(22, 15, 9, .34);
  color: #FFF6E6;
  font: 500 var(--t-cap) 'Inter', sans-serif;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ob-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 0 24px calc(34px + env(safe-area-inset-bottom));
  color: #fff;
  transition: opacity .16s ease;
}
.ob-body.fading { opacity: 0; }
.ob-step { animation: cardUp .5s cubic-bezier(.2, .8, .2, 1); }
.ob-kicker {
  text-align: center;
  font: 600 var(--t-body)/1.6 'Gurmukhi', sans-serif;
  color: var(--gold-lt);
}
.ob-title {
  text-align: center;
  font-size: var(--t-display);
  line-height: 1.25;
  font-weight: 600;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .5);
}
.ob-title .serif { font-family: 'Fraunces', serif; }
.ob-title .gur { display: block; font: 700 var(--t-title)/1.6 'Gurmukhi', sans-serif; color: var(--gold-lt); margin-top: 8px; }
.ob-line {
  text-align: center;
  font: 400 var(--t-body)/1.65 'Inter', sans-serif;
  color: rgba(255, 248, 235, .92);
  margin-top: 16px;
}
.ob-h2 { font: 600 var(--t-title)/1.35 'Fraunces', serif; color: #FBF0DA; }
.ob-sub { font: 400 var(--t-cap)/1.6 'Inter', sans-serif; color: rgba(255, 248, 235, .82); margin-top: 8px; }
.ob-body .field { margin-top: 18px; background: rgba(255, 250, 238, .95); color: #4A2810; box-shadow: none; }
.ob-step .btn.wide { margin-top: 24px; }
.btn.wide { width: 100%; }
.ob-choices { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.ob-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 248, 235, .22);
  background: rgba(24, 16, 12, .52);
  color: #FFF6E6;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .35s ease, background-color .35s ease;
}
.ob-choice:active { opacity: .9; }
.ob-choice.on {
  border-color: rgba(242, 195, 91, .75);
  background: rgba(196, 140, 40, .16);
}
.ob-choice-ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 140, 40, .5);
  color: var(--gold-lt);
  flex: none;
}
.ob-choice > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.ob-choice b { font: 600 var(--t-body) 'Fraunces', serif; }
.ob-choice span span { font: 400 var(--t-cap)/1.5 'Inter', sans-serif; color: rgba(255, 248, 235, .82); }
.ob-choice.on span span { color: rgba(255, 248, 235, .95); }

/* ---------------- sheets ---------------- */
#sheets .veil {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(14, 9, 4, .46);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#sheets .veil.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 301;
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  transform: translate(-50%, 105%);
  transition: transform .45s ease, background-color .5s ease;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .26);
}
.sheet.on { transform: translate(-50%, 0); }
.sheet-grip {
  width: 38px; height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 10px auto 0;
  flex: none;
}
.sheet-x {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.sheet-scroll { overflow-y: auto; padding: 20px 24px calc(32px + env(safe-area-inset-bottom)); }
.sheet-title { font: 600 var(--t-title)/1.3 'Fraunces', serif; color: var(--text-strong); padding-right: 56px; }
.sheet-body { margin-top: 16px; }
.sheet-text { font: 400 var(--t-body)/1.65 'Inter', sans-serif; color: var(--muted); }
.sheet-actions { display: flex; gap: 12px; margin-top: 24px; }
.sheet-actions .btn { flex: 1; }
.sheet-note { font: 400 var(--t-cap)/1.6 'Inter', sans-serif; color: var(--muted); margin-top: 16px; }
.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font: 400 var(--t-cap) 'Inter', sans-serif;
  color: var(--muted);
}
.sheet-row b { font-weight: 600; color: var(--text-strong); }
.field {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--hairline);
  background: transparent;
  font: 400 var(--t-body) 'Inter', sans-serif;
  color: var(--text);
  outline: none;
}
.field:focus { border-color: var(--gold); }
.field.small { min-height: 44px; padding: 8px 14px; font-size: var(--t-cap); }
.field-label { display: block; font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--muted); margin-bottom: 8px; }
.slider-row { margin-top: 24px; }
.slider-row label { display: block; font: 600 var(--t-body) 'Inter', sans-serif; color: var(--text-strong); margin-bottom: 12px; }
.mood-answers { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.mood-answer {
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--hairline);
  background: transparent;
  font: 500 var(--t-body) 'Inter', sans-serif;
  color: var(--text-strong);
  text-align: left;
  transition: background-color .3s ease;
}
.mood-answer:active { background: var(--plum-tint); }

/* ---------------- toast & banner ---------------- */
.toasts {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 420px);
  z-index: 350;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 100%;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--text-strong);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  text-align: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s ease;
}
.toast.on { opacity: 1; transform: none; }
.banner {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 24px), 440px);
  transform: translateX(-50%) translateY(-16px);
  z-index: 320;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .4s ease, transform .4s ease;
}
.banner.on { opacity: 1; transform: translateX(-50%); }
.banner-ic { color: var(--gold); display: grid; place-items: center; }
.banner-tx { flex: 1; min-width: 0; }
.banner-tx b { display: block; font: 600 var(--t-cap) 'Fraunces', serif; color: var(--text-strong); }
.banner-tx span { display: block; margin-top: 2px; font: 400 var(--t-cap)/1.45 'Inter', sans-serif; color: var(--muted); }
.banner-x { background: none; border: 0; color: var(--muted); width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.sheet-body .sheet-label { margin: 24px 0 12px; }
.sheet-body > .sheet-label:first-child { margin-top: 0; }

/* ---------------- nav & mini ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 448px);
  height: 76px;
  border-radius: 38px;
  z-index: 120;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: 0 22px 44px -26px rgba(74, 40, 16, .6), 0 2px 8px -4px rgba(74, 40, 16, .16), inset 0 0 0 1px var(--hairline);
  transition: background-color .6s ease, opacity .35s ease, transform .35s ease, visibility .35s;
}
html[data-theme='night'] .tabbar { box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .8), inset 0 0 0 1px var(--hairline); }
.app[data-nav='off'] .tabbar { opacity: 0; visibility: hidden; pointer-events: none; }
.nav-pill {
  position: absolute;
  top: 10px;
  left: 0;
  height: 56px;
  width: 70px;
  border-radius: 28px;
  background: var(--plum-tint);
  box-shadow: inset 0 0 0 1px rgba(196, 140, 40, .7);
  transition: transform .45s ease, width .45s ease, opacity .3s ease;
  pointer-events: none;
  z-index: 0;
}
.nav-item {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  background: transparent;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--nav-icon);
  transition: color .35s ease;
  padding: 0;
}
.nav-ic { display: grid; place-items: center; height: 22px; }
.nav-label {
  font: 500 .8125rem 'Inter', sans-serif;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nav-item.on { color: var(--nav-on); }
.nav-item.on .nav-label { font-weight: 600; }

.mini {
  position: fixed;
  z-index: 119;
  left: 50%;
  bottom: calc(102px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  width: min(calc(100% - 32px), 448px);
  height: 64px;
  border-radius: 22px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -24px rgba(74, 40, 16, .6), inset 0 0 0 1px var(--hairline);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
  overflow: hidden;
}
.mini.on { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%); }
.mini-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--hairline);
}
.mini-main {
  position: absolute;
  inset: 0 104px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  text-align: left;
  padding: 0 0 0 10px;
  min-width: 0;
}
.mini-thumb {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 11px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
  background: rgba(0, 0, 0, .12);
}
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mini-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mini-text b {
  font: 600 var(--t-body)/1.3 'Fraunces', serif;
  color: var(--text-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-text span {
  font: 400 var(--t-cap)/1.6 'Gurmukhi', sans-serif;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-btn {
  position: absolute;
  right: 56px;
  top: 10px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--plum);
  display: grid;
  place-items: center;
}
.mini-btn.mini-x { right: 4px; top: 12px; width: 44px; height: 44px; border-color: transparent; color: var(--muted); }
.mini-prog {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 1px;
  background: rgba(196, 140, 40, .2);
  overflow: hidden;
}
.mini-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }

/* ---------------- desktop ---------------- */
@media (min-width: 700px) {
  .screen { border-radius: 0; }
}

/* ---------------- motion preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .media video, .scene video, .mk-video { display: none !important; }
  .stagger > * { opacity: 1; }
}

@media (hover: hover) {
  .tile:hover, .sleep-card:hover, .med-row:hover, .course-card:hover { opacity: .94; }
  .chip:hover { background: rgba(196, 140, 40, .1); }
  .chip.on:hover { background: var(--plum-tint); }
  .link-gold:hover, .link-quiet:hover, .p-sounds:hover { background: var(--plum-tint); }
  .round-btn:hover, .cont-play:hover, .mini-btn:hover { background: var(--plum-tint); }
}

/* ============================================================
   FIX 2026-11-18: onboarding welcome art fills the screen edge to edge
   ============================================================ */
#onboarding .ob {
  width: 100vw;
  max-width: none;
  left: 0;
  transform: none;
  height: 100%;
  min-height: 100dvh;
  padding: 0;
  margin: 0;
}
#onboarding .ob-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#onboarding .ob-scene img,
#onboarding .ob-scene video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}
#onboarding .ob-shade {
  background:
    linear-gradient(180deg, rgba(21, 11, 26, 0) 55%, rgba(21, 11, 26, .75) 100%),
    linear-gradient(180deg, rgba(21, 11, 26, .35) 0%, rgba(21, 11, 26, 0) 22%);
}
#onboarding .ob-body {
  max-width: 520px;
  margin: 0 auto;
}

/* FIX 2026-11-18 (2): let the welcome art escape the 480px app frame */
#onboarding { position: fixed; inset: 0; z-index: 60; }
#onboarding .ob { position: fixed; inset: 0; top: 0; left: 0; width: 100vw; max-width: none; height: 100%; min-height: 100dvh; transform: none; margin: 0; padding: 0; }
#onboarding .ob-scene, #onboarding .ob-scene img, #onboarding .ob-scene video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }

/* ============================================================
   FIX 2026-11-18 (round 2): mixer bottom area, bedtime reminder
   ============================================================ */

/* Mixer: the play dock sits directly above the tab bar instead of floating over
   the sliders, and the scroll area reserves dock height + tab bar height +
   safe area, so the last slider is always fully visible and usable. */
#s-mixer { padding-bottom: calc(var(--dock-h, 96px) + 92px + 20px + env(safe-area-inset-bottom)); }
.mixer-inner { padding-bottom: 0; }
.mx-dock { bottom: calc(92px + 10px + env(safe-area-inset-bottom)); z-index: 110; }
.mx-timers { flex-wrap: wrap; }

/* bedtime reminder */
.bedtime-body { margin-top: 18px; }
.bedtime-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bedtime-day {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  font: 600 var(--t-cap) 'Inter', sans-serif;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.bedtime-day.on {
  background: var(--plum-tint);
  border-color: rgba(196, 140, 40, .7);
  color: var(--text-strong);
}
.bedtime-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bedtime-actions .btn { min-height: 48px; padding: 0 18px; font-size: var(--t-cap); }
.bedtime-actions .btn[disabled] { opacity: .45; pointer-events: none; }
.bedtime-help { margin-top: 12px; font: 400 var(--t-cap)/1.55 'Inter', sans-serif; color: var(--muted); }
.banner-play {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--magenta);
  color: #FFF6E4;
}

/* ---------------- breathe v27 (ਸਾਹ picker) — scoped to .screen-breathe ---------------- */
.screen-breathe {
  --bx-plum: #2a1430;
  --bx-gold: #c9962f;
  --bx-cream: #f6eedf;
  --bx-rust: #8a3b1e;
  --bx-magenta: #9c1b4f;
  --bx-ink: #2a1430;
  /* the background sits on the scrolling screen itself, so it stays put while the column scrolls */
  background:
    linear-gradient(180deg, rgba(246, 238, 223, .92) 0%, rgba(246, 238, 223, .55) 22%, rgba(246, 238, 223, 0) 42%),
    url('../assets/img/ui/bg-breathe-dawn.webp') center / cover no-repeat,
    #efe0cf;
  color: var(--bx-ink);
}
.screen-breathe .bx {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 22px 16px;
  display: flex;
  flex-direction: column;
}
.screen-breathe .bx-head { padding: 8px 0 0; }
.screen-breathe .bx-title {
  font: 700 2.5rem/1.3 'Gurmukhi', 'Noto Sans Gurmukhi', sans-serif;
  color: var(--bx-ink);
}
.screen-breathe .bx-tag {
  font: 400 .9375rem/1.45 'Inter', sans-serif;
  color: #3b2232;
  margin-top: 2px;
}

/* orb */
.screen-breathe .bx-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 14px;
  transition: min-height .4s ease, padding .4s ease;
}
.screen-breathe .bx-orb-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  flex: none;
}
.screen-breathe .bx-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fffaf0 0%, #fbf3e3 62%, #f4e6cc 100%);
  box-shadow:
    0 0 0 10px rgba(242, 214, 160, .18),
    0 0 44px 18px rgba(232, 190, 110, .42),
    0 0 90px 30px rgba(232, 190, 110, .2);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1), box-shadow 1.2s ease, opacity 1.2s ease;
  will-change: transform;
}
.screen-breathe .bx-orb.full {
  box-shadow:
    0 0 0 12px rgba(242, 214, 160, .24),
    0 0 56px 24px rgba(232, 190, 110, .55),
    0 0 110px 40px rgba(232, 190, 110, .26);
}
.screen-breathe .bx-phase {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 12px;
}
.screen-breathe .bx-pa {
  font: 700 1.4rem/1.45 'Gurmukhi', 'Noto Sans Gurmukhi', sans-serif;
  color: var(--bx-ink);
}
.screen-breathe .bx-en {
  font: 500 .875rem/1.4 'Inter', sans-serif;
  color: #3b2232;
  margin-top: 0;
}
.screen-breathe .bx-phase.swap .bx-pa,
.screen-breathe .bx-phase.swap .bx-en { animation: fadeSwap .45s ease; }

/* picker */
.screen-breathe .bx-picker { transition: opacity .3s ease; }
.screen-breathe .bx-h2 {
  font: 800 1.3rem/1.25 'Fraunces', Georgia, serif;
  color: var(--bx-ink);
  margin: 0 0 10px;
}
.screen-breathe .bx-h2-sm { font-size: 1.15rem; margin-top: 14px; margin-bottom: 8px; }
.screen-breathe .bx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.screen-breathe .bx-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 96px;
  padding: 11px 13px 12px;
  text-align: left;
  border-radius: 22px;
  border: 1.5px solid rgba(138, 59, 30, .16);
  background: rgba(246, 238, 223, .9);
  color: var(--bx-ink);
  box-shadow: 0 14px 30px -24px rgba(42, 20, 48, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .15s ease;
}
.screen-breathe .bx-card:active { transform: scale(.98); }
.screen-breathe .bx-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.screen-breathe .bx-card-pa { font: 700 1.15rem/1.45 'Gurmukhi', 'Noto Sans Gurmukhi', sans-serif; color: var(--bx-ink); }
.screen-breathe .bx-card-en { font: 500 var(--t-cap) 'Inter', sans-serif; color: var(--bx-rust); }
.screen-breathe .bx-card-sub { font: 400 .8125rem/1.35 'Inter', sans-serif; color: #3b2232; }
.screen-breathe .bx-card-time { font: 500 .8125rem 'Inter', sans-serif; color: var(--bx-rust); margin-top: auto; }
.screen-breathe .bx-card.on {
  background: var(--bx-plum);
  border-color: var(--bx-gold);
  border-width: 2px;
}
.screen-breathe .bx-card.on .bx-card-pa,
.screen-breathe .bx-card.on .bx-card-sub { color: var(--bx-cream); }
.screen-breathe .bx-card.on .bx-card-en,
.screen-breathe .bx-card.on .bx-card-time { color: var(--bx-gold); }

.screen-breathe .bx-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.screen-breathe .bx-chip {
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid rgba(138, 59, 30, .18);
  background: rgba(246, 238, 223, .92);
  font: 500 var(--t-body) 'Inter', sans-serif;
  color: var(--bx-ink);
  transition: background-color .25s ease, color .25s ease;
}
.screen-breathe .bx-chip.on { background: var(--bx-magenta); border-color: var(--bx-magenta); color: var(--bx-cream); }

.screen-breathe .bx-start {
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--bx-plum);
  color: var(--bx-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font: 500 1.125rem 'Inter', sans-serif;
  box-shadow: 0 20px 36px -22px rgba(42, 20, 48, .8);
}
.screen-breathe .bx-start .gur { font-size: 1.15rem; line-height: 1.4; }
.screen-breathe .bx-start-ic { color: var(--bx-gold); display: grid; place-items: center; }
.screen-breathe .bx-start:active { opacity: .9; }

.screen-breathe .bx-opts {
  text-align: center;
  margin-top: 4px;
  font: 400 .875rem 'Inter', sans-serif;
  color: var(--bx-ink);
}
.screen-breathe .bx-opt {
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 4px;
  min-height: 40px;
  font: 500 .875rem 'Inter', sans-serif;
  text-shadow: 0 0 8px rgba(246, 238, 223, .95), 0 0 2px rgba(246, 238, 223, .9);
  color: var(--bx-ink);
  transition: opacity .2s ease;
}
.screen-breathe .bx-opt.off { opacity: .5; text-decoration: line-through; }

/* session */
.screen-breathe .bx-session {
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  animation: fadeSwap .3s ease;
}
.screen-breathe .bx-session[hidden] { display: none; }
.screen-breathe .bx-skip {
  min-height: 40px;
  padding: 0 18px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 150, 47, .7);
  background: rgba(246, 238, 223, .9);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--bx-ink);
}
.screen-breathe .bx-progress {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(42, 20, 48, .16);
  overflow: hidden;
}
.screen-breathe .bx-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bx-gold), #e7bb5c);
  transition: width .3s linear;
}
.screen-breathe .bx-left {
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(246, 238, 223, .75);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--bx-ink);
}
.screen-breathe .bx-pause {
  width: 68px;
  height: 68px;
  margin-top: 18px;
  border-radius: 50%;
  border: 2px solid var(--bx-gold);
  background: var(--bx-plum);
  color: var(--bx-gold);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 34px -20px rgba(42, 20, 48, .85);
}
.screen-breathe .bx-end {
  margin-top: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 238, 223, .7);
  font: 500 var(--t-cap) 'Inter', sans-serif;
  color: var(--bx-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* running: picker fades out, orb moves to the vertical centre */
.screen-breathe .bx.is-leaving .bx-picker { opacity: 0; pointer-events: none; }
.screen-breathe .bx.is-running .bx-picker { display: none; }
.screen-breathe .bx.is-running .bx-stage {
  min-height: calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  justify-content: center;
  padding: 0 0 8px;
}

/* bigger orb while breathing */
.screen-breathe .bx.is-running .bx-orb-wrap { width: 240px; height: 240px; }
.screen-breathe .bx.is-running .bx-orb { width: 168px; height: 168px; margin: -84px 0 0 -84px; }
.screen-breathe .bx.is-running .bx-pa { font-size: 1.75rem; }
.screen-breathe .bx.is-running .bx-en { font-size: 1rem; }

/* done card sits over the whole screen, under the tab bar */
.screen-breathe .done-veil { position: fixed; z-index: 110; }

@media (max-height: 700px) {
  .screen-breathe .bx-orb-wrap { width: 160px; height: 160px; }
  .screen-breathe .bx-orb { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
  .screen-breathe .bx-stage { padding: 6px 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-breathe .bx-orb { transform: none !important; transition: box-shadow 1.2s ease, opacity 1.2s ease; }
  .screen-breathe .bx-orb:not(.full) { opacity: .82; }
  .screen-breathe .bx-picker, .screen-breathe .bx-stage { transition: none; }
}

/* v28: centred headings (owner 2026-11-25) */
.screen-breathe .bx-head, .screen-breathe .bx-title, .screen-breathe .bx-tag, .screen-breathe .bx-h2 { text-align: center; }

/* v29: desktop shows the app as a 9:16 phone frame (owner 2026-11-25) */
@media (min-width: 700px) {
  .app {
    width: min(100vw, calc(100dvh * 9 / 16));
    max-width: none;
    height: 100dvh;
    min-height: 0;
    transform: translateZ(0);
  }
  .screens { height: 100%; }
  #onboarding .ob { width: 100%; min-height: 100%; }
}
