/* =====================================================================================================
   வாசி · Vaasi — pranayama practice, an Oliyon Research tool (vaasi.oliyonresearch.com)
   Two themes (NK, 3 November 2026): day = the Oliyon paper look, night = the dawn sky with a brass lamp.
   html[data-mode="light"|"dark"] is set by assets/js/boot.js before the first paint (auto = by the clock).
   The navy header bar, flame badge and footer are the same in both, as in every Oliyon Research tool.
   Text sizes are Thoothu's (oliyonresearch docs/SHARED-SPEC.md §4 "Text sizes").
   Layout: one centred practice column (max 580px) under the shared header; a session takes the whole screen.
   ===================================================================================================== */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Tamil"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/noto-sans-tamil-tamil-wght-normal.woff2") format("woff2"); unicode-range: U+0964-0965,U+0B82-0BFA,U+200C-200D,U+20B9,U+25CC; }
@font-face { font-family: "Noto Sans Tamil"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/noto-sans-tamil-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Serif Tamil"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/noto-serif-tamil-tamil-wght-normal.woff2") format("woff2"); unicode-range: U+0964-0965,U+0B82-0BFA,U+200C-200D,U+20B9,U+25CC; }
@font-face { font-family: "Noto Serif Tamil"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/noto-serif-tamil-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* ---- day (default): Oliyon paper ---- */
  --bg: #f8f5ee;
  --surface: #ffffff;
  --surface-2: #f2eee4;
  --tint: rgba(0, 31, 91, .035);
  --line: #e2dccd;
  --line-strong: #c9c0aa;
  --ink: #001f5b;
  --ink-2: #33456e;
  --muted: #5d6b8a;
  --lamp: #e9a108;          /* the gold button, as .oh-cta */
  --lamp-hover: #feb001;
  --on-lamp: #001a45;
  --lamp-text: #8f5600;     /* gold that passes contrast on paper */
  --lamp-soft: rgba(233, 161, 8, .14);
  --lamp-line: rgba(233, 161, 8, .55);
  --flame: #f0a003;
  --c-in: #17809b; --c-in2: #3a9bb3; --c-hold: #b87400; --c-out: #c4553a; --c-holdout: #6a5acd;
  --c-rest: #2f8a55; --c-prep: #7a705c; --c-stroke: #c4553a; --c-meditate: #6a5acd;
  --ok: #1d6b45; --warn: #8a5a00; --bad: #a3261c;
  --seat: #fbf8f2; --dot-off: rgba(0, 31, 91, .16); --track: rgba(0, 31, 91, .08); --strip: rgba(0, 31, 91, .06);
  --nose-off: rgba(0, 31, 91, .08); --nose-line: rgba(0, 31, 91, .3);
  --pl-1: #fffdf8; --pl-2: #efe9dc;
  --navbar: rgba(255, 255, 255, .92);
  --tip: #001f5b; --tip-ink: #ffffff; --scrim: rgba(0, 20, 50, .45);
  --caution-ink: #5b3a00; --note-bg: rgba(233, 161, 8, .08); --note-line: rgba(233, 161, 8, .35);
  --heat-0: #ece6d8; --heat-1: rgba(233, 161, 8, .3); --heat-2: rgba(233, 161, 8, .5); --heat-3: rgba(233, 161, 8, .75); --heat-4: #c98a00;
  --dots: rgba(0, 31, 91, .05);
  --glow: rgba(240, 160, 3, .10);

  --f-display: "Noto Serif Tamil", "Source Serif 4", Georgia, serif;
  --f-body: "Noto Sans Tamil", "Source Sans 3", system-ui, sans-serif;
  --r: 16px;
  /* Thoothu's text sizes */
  --fs-xs: 12.5px; --fs-s: 13.5px; --fs-m: 15px; --fs-h3l: 17px; --fs-l: 19px; --fs-xl: 26px; --fs-2xl: 34px; --fs-3xl: 54px;
  --oh-max: 1152px;
  color-scheme: light;
}
html[data-mode="dark"] {
  /* ---- night: the sky before dawn, a brass lamp ---- */
  --bg: #0e1322;
  --surface: #161d31;
  --surface-2: #1f2843;
  --tint: rgba(255, 255, 255, .025);
  --line: #2d3858;
  --line-strong: #44527a;
  --ink: #efe8d8;
  --ink-2: #cfd4e2;
  --muted: #9ea7c0;
  --lamp: #f2b45c;
  --lamp-hover: #f6c178;
  --on-lamp: #23170a;
  --lamp-text: #f2b45c;
  --lamp-soft: rgba(242, 180, 92, .14);
  --lamp-line: rgba(242, 180, 92, .45);
  --c-in: #8fd3e3; --c-in2: #b6e6f0; --c-hold: #f2b45c; --c-out: #f08e74; --c-holdout: #ab9ee9;
  --c-rest: #93c9a2; --c-prep: #cfc7b3; --c-stroke: #f08e74; --c-meditate: #ab9ee9;
  --ok: #86d0a0; --warn: #e8bb5a; --bad: #ec7b66;
  --seat: #090c16; --dot-off: rgba(239, 232, 216, .16); --track: rgba(255, 255, 255, .06); --strip: rgba(255, 255, 255, .05);
  --nose-off: rgba(239, 232, 216, .12); --nose-line: rgba(239, 232, 216, .3);
  --pl-1: #141b30; --pl-2: #090c16;
  --navbar: rgba(14, 19, 34, .9);
  --tip: #0a0e1a; --tip-ink: #efe8d8; --scrim: rgba(5, 8, 16, .66);
  --caution-ink: #e9dcc0; --note-bg: rgba(232, 187, 90, .07); --note-line: rgba(232, 187, 90, .25);
  --heat-0: #1f2843; --heat-1: rgba(242, 180, 92, .3); --heat-2: rgba(242, 180, 92, .52); --heat-3: rgba(242, 180, 92, .76); --heat-4: #f2b45c;
  --dots: rgba(239, 232, 216, .045);
  --glow: rgba(242, 180, 92, .11);
  color-scheme: dark;
}
html[data-lang="ta"] .en { display: none !important; }
html[data-lang="en"] .ta { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0, var(--glow), transparent 62%),
    radial-gradient(circle, var(--dots) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-m);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0; text-wrap: balance; line-height: 1.25; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.xs { font-size: var(--fs-xs); }
[hidden] { display: none !important; }
.gap14 { gap: 14px !important; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Header ----------
   The shared Oliyon Research header (oliyon-header.css, a copy of oliyonresearch docs/brand/header/, loaded after
   this file). Here: the navy band with the kolam and the round flame badge, as in every tool (Ilakkam, Anu). */
.site-header { position: sticky; top: 0; z-index: 30; color: #fff; background: linear-gradient(100deg, #001a45 0%, #002663 55%, #0a3a8a 100%); box-shadow: 0 2px 10px rgba(0,26,69,.25); }
.site-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 Q34 28 52 28 Q34 28 28 52 Q22 28 4 28 Q22 28 28 4 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.35' stroke-width='1'/%3E%3Ccircle cx='28' cy='28' r='1.3' fill='%23feb001' fill-opacity='0.5'/%3E%3C/svg%3E");
}
.oh-flame .flame-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.oh-flame .badge { animation: badge-breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.oh-flame .halo { animation: halo-pulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.oh-flame .flame-body { animation: flame-sway 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.oh-flame .outer { animation: flame-outer 1.35s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.oh-flame .mid { animation: flame-mid .95s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.oh-flame .core { animation: flame-core .7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.oh-flame .blue { animation: flame-blue 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flame-sway { 0%, 100% { transform: rotate(-2.2deg); } 35% { transform: rotate(1.6deg); } 65% { transform: rotate(2.4deg); } }
@keyframes flame-outer { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.97, 1.05); } 60% { transform: scale(1.03, .97); } 80% { transform: scale(.99, 1.03); } }
@keyframes flame-mid { 0%, 100% { transform: scale(1, 1) translateY(0); opacity: .95; } 40% { transform: scale(.94, 1.08) translateY(-1px); opacity: 1; } 75% { transform: scale(1.05, .96) translateY(1px); opacity: .9; } }
@keyframes flame-core { 0%, 100% { transform: scale(1, 1); opacity: .95; } 50% { transform: scale(.9, 1.1); opacity: 1; } }
@keyframes flame-blue { 0%, 100% { transform: scale(1, 1); opacity: .8; } 50% { transform: scale(1.12, .9); opacity: 1; } }
@keyframes halo-pulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes badge-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
/* the day / night switch sits beside the language pill, drawn like it (a round outlined button) */
.oh-theme { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: transparent; color: #fff; cursor: pointer; flex: none; }
.oh-theme:hover { border-color: #feb001; background: rgba(255,255,255,.1); }
.oh-theme svg { width: 17px; height: 17px; }
.oh-theme .i-sun, html[data-mode="dark"] .oh-theme .i-moon { display: none; }
html[data-mode="dark"] .oh-theme .i-sun { display: block; }

/* ---------- Flame (hero, footer) ---------- */
.flame { position: relative; display: grid; place-items: center; }
.flame__glow {
  position: absolute; inset: 15% 5% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 160, 3, 0.38), rgba(240, 160, 3, 0) 70%);
  filter: blur(6px); animation: glow 3.2s ease-in-out infinite;
}
.flame__shape { position: relative; width: 100%; height: auto; transform-origin: 50% 100%; animation: flicker 3.2s ease-in-out infinite; }
.flame__shape path { fill: var(--flame); }
.is-paused .flame__glow, .is-paused .flame__shape { animation-play-state: paused; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 20% { transform: scale(0.985, 1.025) skewX(-1.2deg); } 45% { transform: scale(1.01, 0.985) skewX(0.8deg); } 70% { transform: scale(0.99, 1.03) skewX(1.4deg); } }
@keyframes glow { 0%, 100% { opacity: 0.75; transform: scale(1); } 45% { opacity: 1; transform: scale(1.06); } 70% { opacity: 0.85; transform: scale(0.97); } }

/* ---------- Hero (practice page): kicker, the living flame among breath rings, what Vaasi is ---------- */
.hero { text-align: center; padding: 22px 16px 6px; }
.hero__light { position: relative; width: min(100%, 260px); aspect-ratio: 300 / 150; margin: 0 auto; }
.hero__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero__rings circle { fill: none; stroke: var(--flame); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: breathe-ring 12s ease-in-out infinite; }
.hero__rings circle:nth-child(2) { animation-delay: -1.2s; opacity: .7; }
.hero__rings circle:nth-child(3) { animation-delay: -2.4s; opacity: .45; }
.hero__rings .dot { fill: var(--flame); stroke: none; animation: none; opacity: .55; }
@keyframes breathe-ring { 0%, 100% { transform: scale(.82); stroke-opacity: .22; } 33% { transform: scale(1); stroke-opacity: .5; } 66% { transform: scale(1); stroke-opacity: .42; } }
.is-paused .hero__rings circle { animation-play-state: paused; }
.hero__flame { position: absolute; left: 50%; bottom: 4px; width: 50px; transform: translateX(-50%); }
.hero__brand { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; line-height: 1.3; color: var(--ink); margin-top: 4px; }
.hero__tagline { font-family: var(--f-display); font-weight: 600; font-size: .85rem; color: var(--lamp-text); margin-top: 2px; }
.hero__lockup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; max-width: 520px; margin: 14px auto 0; }
.hero__lockup::before, .hero__lockup::after { content: ''; height: 2px; background: var(--ink); border-radius: 2px; opacity: .85; }
.hero__title { font-size: 1.55rem; color: var(--ink); line-height: 1.32; }
.hero__ladder { max-width: 34rem; margin: 8px auto 0; font-family: var(--f-display); font-weight: 600; font-size: 1rem; color: var(--lamp-text); line-height: 1.5; }
.hero__lede { max-width: 34rem; margin: 8px auto 0; font-size: 1rem; line-height: 1.8; color: var(--ink-2); }
@media (min-width: 760px) {
  .hero { padding-top: 30px; }
  .hero__light { width: 330px; }
  .hero__flame { width: 62px; }
  .hero__brand { font-size: 1.7rem; }
  .hero__tagline { font-size: .95rem; }
  .hero__title { font-size: clamp(1.75rem, 3.6vw, 2.55rem); }
  .hero__ladder, .hero__lede { font-size: 1.08rem; }
}

/* ---------- shell ---------- */
main { flex: 1; }
.app { max-width: 580px; margin: 0 auto; padding: 18px 16px 40px; }
@media (max-width: 899px) { body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); } }
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  display: grid; gap: 14px; box-shadow: 0 1px 2px rgba(0, 31, 91, .04);
}
html[data-mode="dark"] .card { background: linear-gradient(180deg, rgba(255,255,255,.018), transparent 40%), var(--surface); box-shadow: none; }
.card h2 { font-size: var(--fs-l); }
.card h3 { font-size: 15.5px; font-family: var(--f-body); font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 8px; }
.eyebrow { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
:lang(ta) .eyebrow, :lang(ta) .section-title { letter-spacing: .02em; font-size: var(--fs-s); text-transform: none; }

/* ---------- Footer (as every Oliyon Research tool) ---------- */
.site-footer { background: #001f5b; color: #dfe6f5; padding: 40px 0 26px; margin-top: 8px; }
.site-footer .wrap { max-width: var(--oh-max); margin: 0 auto; padding: 0 16px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer__brand { display: grid; gap: .6rem; align-content: start; }
.footer__brand .flame { width: 2.2rem; justify-items: start; }
.footer__brand .flame__glow { display: none; }
.footer__brand .footer__name { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; color: #fff; line-height: 1.25; }
.footer__brand p { color: #b9c4dc; max-width: 22rem; font-size: 15px; }
.footer__col h2 { font-family: var(--f-body); font-size: 14.5px; font-weight: 700; color: var(--flame); margin-bottom: .6rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: 15px; }
.footer__bottom { margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: 13.5px; color: #9fb0d0; }
.footer__note { flex-basis: 100%; }
.install { display: grid; gap: .4rem; justify-items: start; }
.install[hidden], .install__btn[hidden], .install__ios[hidden] { display: none; }
.install__btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgba(240,160,3,.6); background: transparent; color: #fff; border-radius: 999px; padding: .3rem .9rem; font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.install__btn:hover { border-color: var(--flame); background: rgba(255,255,255,.08); }
.install__btn svg { width: 1rem; height: 1rem; flex: none; }
.install__ios { color: #c9d2e2; max-width: 36ch; }
@media (max-width: 56rem) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; } .footer__col:last-child { grid-column: 1 / -1; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font-size: var(--fs-s); font-weight: 500;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--lamp); color: var(--on-lamp); border-color: var(--lamp); font-weight: 600; }
.btn.primary:hover { background: var(--lamp-hover); border-color: var(--lamp-hover); }
.btn.big { min-height: 56px; font-size: var(--fs-m); padding: 0 26px; width: 100%; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-xs); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: inline-grid; place-items: center; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--lamp-text); padding: 0; font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- today ---------- */
.today { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ring { width: 76px; height: 76px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 22px; }
.week { display: flex; justify-content: space-between; max-width: 220px; margin-top: 6px; }
.week span { width: 22px; display: grid; justify-items: center; gap: 3px; font-size: 10px; color: var(--muted); }
.week i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); display: block; }
.week i.on { background: var(--lamp); border-color: var(--lamp); }
.week i.today { box-shadow: 0 0 0 2px rgba(242,180,92,.35); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.chip.lamp { color: var(--lamp-text); border-color: var(--lamp-line); }

/* ---------- technique card ---------- */
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tc-head > div { min-width: 0; }
.tc-head .btn { white-space: nowrap; flex: none; }
.tc-name { font-size: var(--fs-xl); }
.tc-sub { color: var(--muted); font-size: var(--fs-s); margin-top: 4px; }
.ratio-hero {
  font-family: var(--f-display); font-size: var(--fs-3xl); line-height: 1; letter-spacing: .02em;
  display: flex; align-items: baseline; justify-content: center; gap: .18em; padding: 10px 0 2px; flex-wrap: wrap;
}
.ratio-hero .sep { color: var(--line); font-size: .7em; }
.ratio-hero .zero { opacity: .35; }
.ratio-cap { text-align: center; font-size: var(--fs-s); color: var(--muted); }

.phases { display: grid; gap: 6px; }
.prow {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 46px; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px; background: var(--tint); border: 1px solid transparent;
}
.prow .dot { width: 12px; height: 12px; border-radius: 50%; }
.prow .nm { display: grid; line-height: 1.2; }
.prow .nm small { color: var(--muted); font-size: var(--fs-xs); }
.prow .secs { text-align: right; color: var(--muted); font-size: var(--fs-s); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font-size: 18px; line-height: 1; padding: 0; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output, .stepper .val { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: var(--fs-s); color: var(--muted); }
.unit-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--lamp); height: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { flex: 1 1 120px; background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.fact b { display: block; font-family: var(--f-display); font-weight: 400; font-size: var(--fs-l); }
.fact span { font-size: var(--fs-xs); color: var(--muted); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px;
  padding: 7px 13px; font-size: var(--fs-s); min-height: 36px;
}
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); border-color: var(--lamp); }

details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-s); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; color: var(--muted); font-size: 18px; }
details.more[open] summary::after { content: "−"; }
details.more .inner { display: grid; gap: 12px; padding-top: 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked { background: var(--lamp-soft); border-color: var(--lamp); }
.switch input:checked::after { transform: translateX(18px); background: var(--lamp); }
.inline-fields { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-s); color: var(--muted); }
.inline-fields input[type="number"] { width: 64px; }
input[type="number"], input[type="text"], input[type="time"], input[type="search"], input[type="email"], select, textarea {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 40px; color: var(--ink);
}
textarea { width: 100%; min-height: 70px; resize: vertical; }
select { max-width: 100%; }

.info ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.caution { border-left: 3px solid var(--warn); padding: 6px 0 6px 12px; font-size: var(--fs-s); color: var(--caution-ink); }

/* ---------- library ---------- */
.tabs2 { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs2 button { flex: 1; border: 0; background: none; padding: 9px 8px; border-radius: 999px; color: var(--muted); font-size: var(--fs-s); }
.tabs2 button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; }
.list { display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: left;
}
.item.current { border-color: var(--lamp); }
.item h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-h3l); }
.item .alt { color: var(--muted); font-size: var(--fs-s); }
.item .desc { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--muted); }
.item .meta { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.item .acts { display: flex; gap: 6px; }
.ratio-chip { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-m); color: var(--ink); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.steps-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.steps-line .arrow { opacity: .5; }
.progress-bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--lamp); border-radius: 999px; }
.section-title { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 2px -2px; }

/* ---------- progress ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tile b { display: block; font-family: var(--f-display); font-weight: 500; font-size: var(--fs-2xl); line-height: 1.1; }
.tile span { font-size: var(--fs-xs); color: var(--muted); }
.chart-wrap { position: relative; overflow-x: auto; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--tip); border: 1px solid var(--line); color: var(--tip-ink);
  font-size: var(--fs-xs); padding: 5px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 3;
}
.legend { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); justify-content: flex-end; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font-family: var(--f-display); font-weight: 400; font-size: 44px; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); border: 1px solid currentColor; }
.hist { display: grid; gap: 8px; }
.hrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hrow:last-child { border-bottom: 0; }
.hrow .t { font-weight: 600; }
.hrow .d { font-size: var(--fs-xs); color: var(--muted); }
.hrow .n { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--muted); font-style: italic; }
.hrow .x { background: none; border: 0; color: var(--muted); font-size: var(--fs-xs); padding: 4px; }
.sync { display: flex; gap: 8px; align-items: center; font-size: var(--fs-s); color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync.cloud i { background: var(--ok); }
.sync.err i { background: var(--warn); }

/* ---------- settings ---------- */
.set-group { display: grid; gap: 4px; }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; min-height: 44px; }
.set-row label { font-size: var(--fs-s); }
.set-row select, .set-row input[type="time"] { min-width: 150px; }
.vol { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; font-size: var(--fs-s); }
.note { font-size: var(--fs-s); color: var(--muted); background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 12px; padding: 10px 12px; }

/* ---------- bottom tab bar (phones only; on wide screens the header carries the sections) ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--navbar); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.nav .in { max-width: 580px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav a { color: var(--muted); padding: 9px 2px 8px; display: grid; justify-items: center; gap: 3px; font-size: 12px; text-decoration: none; text-align: center; line-height: 1.2; min-width: 0; }
:lang(ta) .nav a { font-size: 11px; }
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { color: var(--lamp-text); }
@media (min-width: 900px) { .nav { display: none; } }

/* ---------- sheet (dialog) ---------- */
.sheet-back { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: grid; align-items: end; justify-items: center; }
.sheet {
  width: 100%; max-width: 580px; max-height: 92%; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 16px;
  animation: up .22s ease-out;
}
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h2 { font-size: var(--fs-xl); }
.sheet .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet .acts .btn { flex: 1 1 140px; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.moods button { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 8px 2px; display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11px; line-height: 1.2; min-height: 64px; }
.moods button b { font-family: var(--f-display); font-weight: 400; font-size: 22px; color: var(--ink); }
.moods button[aria-pressed="true"] { border-color: var(--lamp); background: var(--lamp-soft); color: var(--ink); }
.big-timer { font-family: var(--f-display); font-size: 72px; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; }
.rstep { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rstep .ctl { display: flex; gap: 4px; }
.rstep .ctl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0; }
.rstep .fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-s); color: var(--muted); }
.rstep .fields input[type="number"] { width: 70px; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--tip); color: var(--tip-ink); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-size: var(--fs-s); z-index: 90; }

/* ---------- player ---------- */
.player {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse 80% 60% at 50% 45%, var(--pl-1), var(--pl-2) 75%); color: var(--ink);
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); overflow: hidden;
}
.pl-top { width: 100%; max-width: 580px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.pl-title { display: grid; }
.pl-title b { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-m); line-height: 1.3; }
.pl-title span { font-size: var(--fs-s); color: var(--muted); }
.pl-meta { display: flex; gap: 10px; align-items: center; }
.pl-remain { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--fs-s); text-align: right; }
.pl-main { flex: 1; width: 100%; max-width: 580px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 0; }
/* every line of the practice screen keeps one height, whatever it says (NK, 4 Nov 2026: nothing may jump between phases).
   The phase word's height does not follow its font size, which fitLabel() shrinks for long Tamil words. */
.pl-phase { font-family: var(--f-display); font-size: clamp(30px, 8vw, 46px); line-height: 1.25; text-align: center; height: calc(clamp(30px, 8vw, 46px) * 1.3); width: 100%; white-space: nowrap; overflow: hidden; transition: color .4s; display: flex; align-items: center; justify-content: center; }
.pl-sk { font-size: var(--fs-s); color: var(--muted); letter-spacing: .06em; height: 1.5em; line-height: 1.5em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* over the flame the line may wrap (long Tamil), into the empty space below it: its box keeps one line's height */
.player.is-flame .pl-sk { white-space: normal; overflow: visible; position: relative; z-index: 1; }
.pl-stage { position: relative; width: min(84vw, 46vh, 420px); aspect-ratio: 1; }
.pl-stage canvas { width: 100%; height: 100%; display: block; }
.pl-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: clamp(44px, 12vw, 72px); font-variant-numeric: tabular-nums; pointer-events: none; }
.pl-count small { font-size: .35em; color: var(--muted); }
/* two lines' room always, so a hint appearing or going ("both nostrils closed") moves nothing below it */
.pl-hint { font-size: var(--fs-s); color: var(--muted); text-align: center; height: 3em; line-height: 1.5; max-width: 34ch; overflow: hidden; display: flex; align-items: center; justify-content: center; }
/* the nostril guide: three fixed columns, so the nose never moves; only colours and the label's opacity change */
.pl-nose { display: grid; grid-template-columns: 1fr 92px 1fr; align-items: center; gap: 12px; width: min(92vw, 420px); height: 52px; }
.pl-nose[data-side=""] { visibility: hidden; }
.pl-nose svg { width: 92px; height: 48px; display: block; }
.pl-nose .lab { font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .25s; }
.pl-nose .lab.l { text-align: right; }
.pl-nose .lab.r { text-align: left; }
.pl-nose[data-side="L"] .lab.l, .pl-nose[data-side="R"] .lab.r { opacity: 1; }
.pl-nose ellipse { fill: var(--nose-off); stroke: var(--nose-line); transition: fill .2s, stroke .2s; }
.pl-nose[data-side="L"] .nL, .pl-nose[data-side="R"] .nR { fill: var(--c-in); stroke: var(--c-in); }
.pl-nose[data-side="X"] ellipse { fill: var(--c-hold); stroke: var(--c-hold); }
.pl-strip { display: flex; width: min(92vw, 420px); gap: 3px; height: 30px; }
.pl-strip .sg { position: relative; border-radius: 6px; background: var(--strip); overflow: hidden; display: grid; place-items: center; font-size: 10px; color: var(--muted); min-width: 18px; }
.pl-strip .sg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; opacity: .32; }
.pl-strip .sg span { position: relative; }
.pl-strip .sg.cur { color: var(--ink); outline: 1px solid var(--line-strong); }
.pl-round { font-size: var(--fs-s); color: var(--muted); height: 1.5em; line-height: 1.5em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-controls { width: 100%; max-width: 420px; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; align-items: center; }
.pl-controls .btn { min-height: 52px; }
.pl-paused { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); background: var(--lamp-soft); border: 1px solid var(--lamp-line); color: var(--lamp-text); padding: 6px 14px; border-radius: 999px; font-size: var(--fs-xs); white-space: nowrap; }
.dim-layer { position: fixed; inset: 0; z-index: 55; background: #000; display: grid; place-items: center; align-content: center; gap: 10px; color: #6b6458; text-align: center; }
.dim-layer .p { font-family: var(--f-display); font-size: 30px; }
.dim-layer .c { font-family: var(--f-display); font-size: 48px; font-variant-numeric: tabular-nums; }
.dim-layer .tip { font-size: var(--fs-xs); color: #3d3a34; margin-top: 30px; }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- day-theme touches ---------- */
html[data-mode="light"] .ring circle:first-child { stroke: var(--surface-2); }
html[data-mode="light"] .seg button[aria-pressed="true"] { background: var(--lamp-soft); }
html[data-mode="light"] .lang button[aria-pressed="true"] { background: var(--surface-2); }
.dim-layer { color: #6b6458; }
@media (prefers-reduced-motion: reduce) {
  .flame__glow, .flame__shape, .hero__rings circle, .oh-flame * { animation: none !important; }
}

/* ---------- meditation: flame view, japa, consent ---------- */
.medmodes { gap: 6px; }
.pl-flame { position: absolute; inset: 0; width: 100%; height: 100%; display: none; z-index: 0; }
.player > *:not(.pl-flame):not(.dim-layer) { position: relative; z-index: 1; }
.player.is-flame { background: #050302; color: #f1dfbd; }
.player.is-flame .pl-flame { display: block; }
.player.is-flame .pl-stage, .player.is-flame .pl-strip, .player.is-flame .pl-nose { visibility: hidden; }
.player.is-flame .pl-phase { color: #f6c98a !important; }
.player.is-flame .pl-sk, .player.is-flame .pl-hint, .player.is-flame .pl-round, .player.is-flame .pl-title span, .player.is-flame .pl-remain { color: #b9a07a; }
.player.is-flame .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 220, 170, .18); color: #f1dfbd; }
.player.is-flame .btn.primary { background: #7a4a12; border-color: #7a4a12; color: #fff3df; }
.player.is-flame .icon-btn { background: rgba(255,255,255,.06); border-color: rgba(255,220,170,.18); color: #f1dfbd; }
.japa { position: fixed; inset: 0; z-index: 52; display: flex; flex-direction: column; align-items: center; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: radial-gradient(ellipse 80% 60% at 50% 45%, var(--pl-1), var(--pl-2) 75%); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.jp-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; }
.jp-ring { position: relative; width: min(86vw, 52vh, 440px); aspect-ratio: 1; }
.jp-ring canvas { width: 100%; height: 100%; display: block; }
.jp-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: clamp(52px, 15vw, 88px); }
.jp-controls { grid-template-columns: 1fr 1.4fr; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--lamp); }
.bad { color: var(--bad); }
/* ---------- reports ---------- */
.rp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); color: var(--muted); }
.rp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rp-seq { display: grid; gap: 8px; }
.rp-seq .d { font-size: var(--fs-xs); color: var(--muted); min-width: 74px; }
.rp-seq .r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-bars { display: grid; gap: 8px; }
.rp-bars .b { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: var(--fs-s); }
.rp-bars .b span.v { color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-bars .b i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--lamp); display: block; }
.rp-bars .b i.m { background: var(--c-meditate); }
.legal { max-width: 760px; margin: 0 auto; padding: 22px 16px 40px; display: grid; gap: 14px; }
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 19px; margin-top: 10px; }
.legal p, .legal li { font-size: 15px; }
.legal .en { color: var(--ink-2); }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal .meta { color: var(--muted); font-size: 12.5px; }
.legal section { display: grid; gap: 8px; scroll-margin-top: 90px; }

/* ---------- account and staff pages ---------- */
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.tiles.mg { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.chart-wrap.mg svg { max-height: 220px; width: 100%; }
.hrow .chip { margin-left: 6px; vertical-align: 2px; }
.tile .xs { display: block; margin-top: 2px; }
.visit-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 22px; }
.visit-tables h3 { margin: 14px 0 2px; }
/* the staff page's four tabs: two by two on a phone, one row when there is room */
.tabs2.mg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-radius: 18px; }
.tabs2.mg button { min-width: 0; border-radius: 14px; }
/* share sheet */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row .btn { flex: 1 1 120px; }
.share-url { width: 100%; font-size: var(--fs-xs); color: var(--muted); }
/* sign-in: the Google link in the sheet, and the sign-in page */
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-xs); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.signin-page { max-width: 520px; margin: 0 auto; padding: 28px 16px 56px; }
.signin-card { display: grid; gap: 14px; }
.signin-card h1 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: var(--fs-2xl); }
.g-btn { min-height: 44px; display: flex; justify-content: center; }

/* the ten sounds and the sound credits (NK, 4 Nov 2026) */
.nada-list { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 1.5em; color: var(--ink-2, inherit); }
.nada-list li { break-inside: avoid; line-height: 1.7; }
.credits { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
