/* Hallmark · shape: app screen · genre: atmospheric · theme: Midnight (deal 2/3, seed sikh-scripture-live-kirtan-db0e·aa038e8c·2026-11-08·r0) · redesign: full
 * nav: kept (top bar and five tabs) · signature: today's Hukamnama line over the night sky · states: loading skeleton, empty, error, full
 * axes: dark/grotesk-sans/warm brand signal · posture: committed · contrast: pass · brand kept: the gold of the Ik Onkar replaces the theme's azure · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R3 V4 · weakest: R, the home tiles are still a grid of wells; they are the app's own map, so they stay, square and quiet */
/* Hallmark · kept: #/history/baba-deep-singh and "4 days" are today's Sakhi and the streak count, which change by date; the record was taken on another day, nothing was removed */
/* Hallmark · waive 38iii · h1 .t-pa · the Punjabi line under each title is the title in a second language, not an accented word */
/* Hallmark · answered F6 · .ns-day, .streak-count b, .count · Mona Sans draws a slashed zero in tabular figures; single figures that never sit in a column take proportional ones */
/* Hallmark · waive 39b · button.tile on the home grid · home tiles are picture cards with icon and two-language label, not inline controls */
/* Sarovar. Calm and sacred: a midnight-blue ground, one gold light, square-cut wells, wide light titles, the Gurmukhi given the room. */
:root {
  --r: 0;
  --font-title: "Mona Sans", "Noto Sans Gurmukhi", system-ui, sans-serif;
  --bg: oklch(97.5% 0.008 85);
  --surface: oklch(99.5% 0.004 85);
  --raised: oklch(94% 0.012 85);
  --ink: oklch(22% 0.04 264);
  --muted: oklch(47% 0.03 260);
  --line: oklch(22% 0.04 264 / 0.12);
  --accent: #8a6414;
  --accent-ink: #ffffff;
  --primary: oklch(25% 0.06 264);
  --primary-ink: oklch(97.5% 0.008 85);
  --bead: rgba(22, 25, 31, .18);
  --mark: rgba(138, 100, 20, .1);
  --live: #d4213a;
  --size: 26px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --bar: 58px;
  /* Fixed colours, named once so every rule reads a token */
  --night: oklch(14% 0.048 264);
  --night-deep: oklch(15% 0.05 264);
  --scrim-rgb: 6, 10, 24;
  --sky-ink: #f7f3ec;
  --sky-ink-rgb: 247, 243, 236;
  --sky-gold: #ffe9bd;
  --splash-ink: #f2efe8;
  --gold: #e3bd74;
  --player-bg: #05070d;
  --shadow-rgb: 10, 14, 28;
  --tint-light: rgba(22, 25, 31, .08);
  --tint-oled: rgba(255, 255, 255, .1);
  --tint-parchment: rgba(43, 33, 22, .08);
  --on-solid: #f7f3ec;
  --quiz-right: #1f7a4d;
  --quiz-wrong: #7a1f35;
  --dot-gurpurab: #e0487f;
  --dot-history: #d9a13a;
  --dot-bhagat: #9a78d8;
  --dot-sangrand: #3fae7f;
  --dot-masya: #8796ad;
  --dot-puranmashi: #4aa8dc;
  --heat-1: #f5b642; --heat-2: #f29a2e; --heat-3: #ec7a24; --heat-4: #e2531f; --heat-5: #d02a1c;
  --heat-ink-1: #e7a12e; --heat-ink-2: #ea8a24; --heat-ink-3: #e86d1f; --heat-ink-4: #df4c1d; --heat-ink-5: #d02a1c;
  --heat-ink-contrast: #ff7a3d;
  --vis-full: #c2410c;
  --vis-short: #15803d;
  --map-ink: #16191f;
  --map-link: #8a6414;
  --font-gurmukhi: "Noto Sans Gurmukhi", sans-serif;
  /* High contrast is an accessibility mode: pure black and white on purpose */
  --hc-black: #000; --hc-white: #fff; --hc-raised: #1c1c1c; --hc-yellow: #ffe14d;
  --hc-bead: #666; --hc-mark: #333; --hc-live: #ff5a68;
  --hc-vis-full: #ff9f43; --hc-vis-short: #7bed9f;
}
:root[data-theme="dark"] {
  --bg: oklch(14% 0.048 264);
  --surface: oklch(18.5% 0.052 264);
  --raised: oklch(23% 0.055 264);
  --ink: oklch(95% 0.012 85);
  --muted: oklch(74% 0.035 256);
  --line: oklch(30% 0.058 264);
  --accent: oklch(81% 0.1 80);
  --accent-ink: oklch(16% 0.05 264);
  --primary: oklch(81% 0.1 80);
  --primary-ink: oklch(16% 0.05 264);
  --bead: rgba(255, 255, 255, .18);
  --mark: rgba(227, 189, 116, .12);
  --live: #ff4757;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: oklch(14% 0.048 264);
    --surface: oklch(18.5% 0.052 264);
    --raised: oklch(23% 0.055 264);
    --ink: oklch(95% 0.012 85);
    --muted: oklch(74% 0.035 256);
    --line: oklch(30% 0.058 264);
    --accent: oklch(81% 0.1 80);
    --accent-ink: oklch(16% 0.05 264);
    --primary: oklch(81% 0.1 80);
    --primary-ink: oklch(16% 0.05 264);
    --bead: rgba(255, 255, 255, .18);
    --mark: rgba(227, 189, 116, .12);
    --live: #ff4757;
  }
}
:root[data-contrast] {
  --bg: var(--hc-black);
  --surface: var(--hc-black);
  --raised: var(--hc-raised);
  --ink: var(--hc-white);
  --muted: var(--hc-white);
  --line: var(--hc-white);
  --accent: var(--hc-yellow);
  --accent-ink: var(--hc-black);
  --primary: var(--hc-yellow);
  --primary-ink: var(--hc-black);
  --bead: var(--hc-bead);
  --mark: var(--hc-mark);
  --live: var(--hc-live);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-app, "Mona Sans", "Noto Sans Gurmukhi", system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, label { touch-action: manipulation; }
button, .btn, .row, .tabs a, .icon-btn, .chips, .segment, .tile, .story-card, .card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, select, textarea { font-size: 16px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { max-width: 680px; margin: 0 auto; padding: 24px 20px 32px; outline: none; overflow-wrap: anywhere; animation: none; }

.ico { display: inline-flex; flex: none; width: 22px; height: 22px; }
.ico svg { width: 100%; height: 100%; stroke-width: 1.6; }

.bi { display: inline-flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.t-pa { display: block; margin-top: 2px; font-size: .85em; font-weight: 400; color: var(--muted); }
p .bi, h1 .bi, h2 .bi { display: block; }
h1, h2 { text-wrap: balance; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.brand { font-size: 18px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand small { display: none; }
.onkar { color: var(--accent); font-weight: 500; }
.top-actions { display: inline-flex; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; border: 0; border-radius: var(--r);
  font-size: 18px; font-weight: 500; text-decoration: none;
}
.icon-btn .ico { width: 22px; height: 22px; }

/* Tabs */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--line);
}
.tabs a { display: flex; align-items: center; justify-content: center; height: var(--bar); color: var(--muted); text-decoration: none; transition: color .16s var(--ease); }
.tabs a .ico { width: 26px; height: 26px; }
.tabs a.on { color: var(--ink); }
.tabs a.on .ico svg { stroke-width: 2; }
.tab-pill { display: none; }
.simple .tabs { grid-template-columns: 1fr; }
.simple .tabs a:not([data-tab=home]) { display: none; }
.on-air .tabs a[data-tab=live] { color: var(--live); }
.on-air .tabs a[data-tab=live] .ico { animation: on-air 1.4s ease-in-out infinite; }
@keyframes on-air { 50% { opacity: .35; } }

/* Type */
h1 { margin: 0 0 4px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
h1 .t-pa { margin-top: 8px; font-size: 17px; letter-spacing: 0; }
h2 { margin: 32px 0 4px; font-size: 15px; font-weight: 600; line-height: 1.3; }
h2 .t-pa { display: inline; margin-left: 8px; font-size: 14px; }
h2 .bi { display: block; }
h2 .t-en { display: inline; }
.sub { margin: 0 0 16px; font-size: 15px; color: var(--muted); }
.sub .t-pa { margin-top: 2px; }
summary.sub { margin-top: 32px; padding: 12px 0; cursor: pointer; }
.credit { margin-top: 32px; font-size: 13px; color: var(--muted); }
.credit .bi { display: block; }
.credit a { color: inherit; }
.back { display: inline-block; padding: 8px 0; color: var(--muted); text-decoration: none; }
.state { padding: 48px 12px; text-align: center; color: var(--muted); }
.state .t-pa { margin-top: 4px; }

/* Home: the sky behind the Hukamnama, with a solid page sliding over it */
#night, #scrim { display: none; position: fixed; inset: 0; width: 100%; height: 100%; }
#night { z-index: -2; object-fit: cover; object-position: 72% 70%; background: var(--night); opacity: 0; transition: opacity .8s var(--ease); }
#night.ready { opacity: 1; }
#scrim { z-index: -1; background: linear-gradient(180deg, rgba(var(--scrim-rgb), .62) 0%, rgba(var(--scrim-rgb), .22) 16%, rgba(var(--scrim-rgb), .3) 30%, rgba(var(--scrim-rgb), .78) 55%, rgba(var(--scrim-rgb), .92) 100%); }
#band { display: none; }
:root[data-theme="dark"]:not([data-contrast]) body[data-page=home] #night,
:root[data-theme="dark"]:not([data-contrast]) body[data-page=home] #scrim { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not([data-contrast]) body[data-page=home] #night,
  :root:not([data-theme]):not([data-contrast]) body[data-page=home] #scrim { display: block; }
}
:root[data-theme="dark"]:not([data-contrast]) body[data-page=home] { background: transparent; }
:root[data-theme="dark"]:not([data-contrast]) html { background: var(--night); }
body[data-page=home] main { max-width: none; padding: 0; }
body[data-page=home]:not(.scrolled) .top { background: transparent; border-color: transparent; }
:root[data-theme="dark"] body[data-page=home]:not(.scrolled) .top { color: var(--sky-ink); }
body[data-page=home] { padding-bottom: 0; }
.home-sky {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: calc(82svh - 56px); max-width: 680px; margin: 0 auto; padding: 24px 20px 28px;
}
.sky-date { margin: 0 0 16px; font-size: 14px; color: var(--sky-ink); }
.sky-date span { color: rgba(var(--sky-ink-rgb), .8); margin-left: 8px; }
.sky-label { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--sky-gold); }
.sky-label .t-pa { color: rgba(var(--sky-ink-rgb), .85); }
.home-sky .gurbani { font-size: clamp(30px, 8.6vw, 44px); line-height: 1.35; color: var(--sky-ink); }
.home-sky .sky-meaning { margin: 12px 0 20px; max-width: 34em; font-size: 17px; line-height: 1.5; color: rgba(var(--sky-ink-rgb), .92); }
.sky-actions { display: flex; align-items: center; gap: 8px; }
.sky-actions .btn { flex: 1; }
.sky-round { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; cursor: pointer; color: var(--sky-ink); background: rgba(var(--sky-ink-rgb), .14); border: 0; border-radius: var(--r); transition: background-color .16s var(--ease); }
:root[data-theme="light"] .home-sky, :root:not([data-theme]) .home-sky { --sky-text: var(--ink); }
:root[data-theme="light"] .home-sky .gurbani, :root[data-theme="light"] .sky-meaning, :root[data-theme="light"] .sky-date, :root[data-theme="light"] .sky-date span, :root[data-theme="light"] .sky-round { color: var(--ink); }
:root[data-theme="light"] .sky-round { background: var(--tint-light); }
:root[data-theme="light"] .sky-label, :root[data-theme="light"] .sky-label .t-pa { color: var(--ink); }
:root[data-contrast] .sky-label, :root[data-contrast] .sky-label .t-pa { color: var(--ink); }
:root[data-theme="light"] .home-sky { min-height: 0; padding-top: 16px; }
:root[data-theme="light"] .sheet { border-radius: 0; }
:root[data-contrast] .home-sky .gurbani, :root[data-contrast] .sky-meaning, :root[data-contrast] .sky-date, :root[data-contrast] .sky-date span, :root[data-contrast] .sky-round { color: var(--ink); }
:root[data-contrast] .sky-round { background: var(--bg); border: 2px solid var(--ink); }
:root[data-contrast] body[data-page=home] { background: var(--bg); }
.sheet { background: var(--bg); border-top: 1px solid var(--line); border-radius: 0; padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom)); }
.sheet-inner { max-width: 680px; margin: 0 auto; padding: 8px 20px 32px; }
.sheet h2 { margin-top: 28px; color: var(--muted); font-weight: 500; }

/* Rows replace cards everywhere */
.row, .card, .story-card {
  position: relative;
  display: grid; align-items: center; column-gap: 16px;
  width: 100%; min-height: 60px; padding: 12px 24px 12px 0;
  color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  transition: opacity .12s var(--ease);
}
.row { grid-template-columns: 26px minmax(0, 1fr) auto; }
.row:active, .card:active, .story-card:active, .result:active { opacity: .55; }
.row::after, .card::after, .story-card::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg); opacity: .6;
}
.row .ico { color: var(--accent); }
.row-glyph { display: inline-flex; justify-content: center; width: 26px; color: var(--accent); font-size: 20px; line-height: 1; }
.row-title { display: block; font-size: 17px; font-weight: 500; line-height: 1.3; }
.row-sub { display: block; margin-top: 1px; font-size: 15px; color: var(--muted); line-height: 1.3; }
.row-end { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-live .row-sub { color: inherit; }
.on-air .row-live .ico { color: var(--live); animation: on-air 1.4s ease-in-out infinite; }
.on-air .row-live .row-sub { color: var(--live); }
.week { display: inline-flex; gap: 4px; align-items: center; }
.week i { width: 9px; height: 9px; border-radius: 50%; background: var(--bead); }
.week i.on { background: var(--accent); }
.week i.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--muted); }
.simple .row { min-height: 96px; grid-template-columns: 36px minmax(0, 1fr); }
.simple .row .ico { width: 34px; height: 34px; }
.simple .row-glyph { width: 36px; font-size: 28px; }
.simple .row-title { font-size: 24px; }
.simple .row-sub { font-size: 18px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.list.cols { grid-template-columns: minmax(0, 1fr); }
.card, .story-card { grid-template-columns: minmax(0, 1fr); font-size: 17px; font-weight: 500; line-height: 1.3; }
.card small { display: block; margin-top: 1px; font-size: 15px; font-weight: 400; color: var(--muted); }
.story-card { grid-template-columns: auto minmax(0, 1fr); }
.story-card > span:only-child { grid-column: 1 / -1; }
.story-card b { display: block; font-size: 17px; font-weight: 500; }
.story-card small { display: block; margin-top: 1px; font-size: 15px; color: var(--muted); }
.bubble { display: inline-flex; align-items: center; color: var(--accent); }
.story-card.playing { color: var(--accent); }
.mine-label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 13px; }
.live-badge { display: inline-block; margin-left: 8px; padding: 0 4px; background: var(--live); color: var(--on-solid); border-radius: var(--r); font-family: inherit; font-size: 11px; font-weight: 700; vertical-align: 2px; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 16px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
  border: 1px solid transparent; border-radius: var(--r);
  font-size: 16px; font-weight: 600; text-align: center; text-decoration: none;
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); opacity: .85; }
.btn:disabled { background: var(--raised); color: var(--muted); border-color: var(--line); cursor: not-allowed; opacity: .8; }
.btn:disabled:active { transform: none; }
.btn .bi { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn .t-pa { margin: 0; color: inherit; opacity: .7; }
.btn small { font-weight: 400; opacity: .7; }
.btn.alt, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.gold { background: var(--primary); color: var(--primary-ink); }
.btn.off { visibility: hidden; }
.btn.wide { width: 100%; margin: 12px 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.quick .btn { flex: 1 1 128px; }
.quick .btn.wide { flex-basis: 100%; margin: 0; }
.place .btn { min-height: 44px; font-size: 15px; font-weight: 500; background: transparent; color: var(--ink); border-color: var(--line); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 8px; }
.pager .btn { background: transparent; color: var(--ink); border-color: var(--line); }
.round { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; cursor: pointer; color: inherit; background: transparent; border: 0; border-radius: var(--r); }
.round:disabled { color: var(--muted); opacity: .5; cursor: not-allowed; }

/* Reader */
.reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.reader-head .sub { margin-bottom: 8px; }
.save { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0 4px 8px; cursor: pointer; background: transparent; border: 0; font-size: 15px; color: var(--muted); }
.save .t-pa { display: none; }
.save[aria-pressed=true] { color: var(--accent); }
.verse { padding: 12px 0; scroll-margin-top: 80px; transition: background-color .25s var(--ease); }
.verse.para { margin-top: 12px; }
.verse.hit { margin: 0 -12px; padding: 12px; background: var(--mark); border-radius: var(--r); }
.verse.now { margin: 0 -12px; padding: 12px; background: var(--mark); border-radius: var(--r); }
.verse.heading .gurbani { text-align: center; font-size: calc(var(--size) - 4px); color: var(--muted); }
.gurbani { margin: 0; font-family: var(--font-gurbani, "Noto Serif Gurmukhi", serif); font-size: var(--size); font-weight: 400; line-height: 1.55; overflow-wrap: anywhere; }
.translit { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.meaning { margin: 8px 0 0; font-size: 16px; color: var(--muted); max-width: 65ch; }
.meaning[lang=en] { color: var(--ink); opacity: .86; }
.line-share { display: inline-flex; align-items: center; margin: 2px 0 0 -8px; width: 40px; height: 36px; justify-content: center; padding: 0; cursor: pointer; background: transparent; border: 0; color: var(--muted); opacity: .75; }
.line-share .ico { width: 17px; height: 17px; }
.line-share .bi { display: none; }
.story-para { padding: 16px 0; }
.story-en { margin: 0; max-width: 65ch; font-size: calc(var(--size) - 8px); line-height: 1.55; }
.story-pa { margin: 8px 0 0; max-width: 65ch; font-size: calc(var(--size) - 9px); line-height: 1.65; color: var(--muted); }
.story-para .story-pa:first-child { margin-top: 0; color: var(--ink); }
.jump { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.jump input { max-width: 110px; }
.jump .btn { min-height: 48px; background: transparent; color: var(--ink); border-color: var(--line); }

/* Fields */
select, input[type=search], input[type=number], input[type=time] {
  width: 100%; min-height: 48px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
input[type=range] { width: 100%; min-height: 40px; accent-color: var(--accent); }
.search-form { display: grid; gap: 8px; margin-bottom: 16px; }
.near-search { margin: 0 0 16px; }
.result { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.result .gurbani { font-size: 21px; }
.result small { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Segments and chips */
.segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 8px 0 16px; padding: 4px; background: var(--raised); border-radius: var(--r); }
.segment.two { grid-template-columns: 1fr 1fr; margin-top: 0; }
.segment button, .segment a { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 2px 4px; cursor: pointer; background: transparent; border: 0; border-radius: var(--r); font-size: 15px; font-weight: 500; text-decoration: none; }
.segment .bi { flex-direction: row; align-items: baseline; gap: 4px; }
.segment .t-pa { margin: 0; font-size: 13px; }
.segment button[aria-pressed=true], .segment a.on { background: var(--surface); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.chips button { min-height: 40px; padding: 4px 12px; cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.chips button[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* Live */
.player { position: relative; aspect-ratio: 16 / 9; margin: 8px -20px; overflow: hidden; background: var(--player-bg); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-link { background: var(--raised); }
.player-link a, .player-listen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 12px; color: inherit; font: inherit; text-align: center; text-decoration: none; cursor: pointer; background: transparent; border: 0; }
.player-link .bi, .player-listen .bi { align-items: center; }
.player-link b, .player-listen b { font-size: 17px; font-weight: 600; }
.player-link small, .player-listen small { font-size: 13px; color: var(--muted); }

/* Places */
.place { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line); }
.place b { display: block; font-size: 17px; font-weight: 500; line-height: 1.3; }
.place small { display: block; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.place > div:first-of-type { padding-right: 44px; }
.place .quick { margin: 8px 0 0; }
.my-gurdwara { position: absolute; top: 6px; right: -8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; background: transparent; border: 0; color: var(--muted); }
.my-gurdwara[aria-pressed=true] { color: var(--accent); }

/* Simran */
.bead { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(100%, 340px); aspect-ratio: 1; margin: 16px auto 24px; padding: 0; cursor: pointer; background: transparent; border: 0; border-radius: 50%; color: var(--ink); touch-action: manipulation; transition: transform .1s var(--ease); -webkit-user-select: none; user-select: none; }
.bead:active { transform: scale(.985); }
.mala { position: absolute; inset: 0; }
.mala svg { display: block; width: 100%; height: 100%; }
.mala circle { fill: var(--bead); transition: fill .15s var(--ease); }
.mala circle.on { fill: var(--accent); }
.mala circle.guru { fill: var(--accent); }
.bead .bi { align-items: center; font-size: 16px; color: var(--muted); }
.count { font-size: 72px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bead.complete::after { content: ""; position: absolute; inset: 2%; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; animation: mala-done .9s var(--ease) both; }
@keyframes mala-done { from { transform: scale(.94); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }

/* Notifications */
.reminder { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.reminder label { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; font-weight: 500; }
.reminder input[type=checkbox], .family-row input { flex: none; width: 24px; height: 24px; accent-color: var(--accent); }
.reminder input[type=time] { width: auto; max-width: 100%; font-variant-numeric: tabular-nums; }
.family-row { justify-content: flex-start; cursor: pointer; }
.family-size { display: grid; gap: 8px; margin-bottom: 12px; font-weight: 500; }
.apply-list { margin: 12px 0 16px; padding-left: 24px; font-size: 20px; line-height: 1.7; }

/* Calendar */
.cal-pager { margin: 8px 0 12px; }
.cal-pager .btn { min-width: 112px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-week { margin-bottom: 4px; text-align: center; font-size: 12px; color: var(--muted); }
.cal-blank { min-height: 58px; }
.cal-day { display: flex; flex-direction: column; align-items: center; min-height: 58px; padding: 4px 0; border-radius: var(--r); text-decoration: none; }
.cal-day b { font-size: 16px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cal-day small { font-size: 10.5px; line-height: 14px; color: var(--muted); white-space: nowrap; }
.cal-dots { display: flex; gap: 2px; margin-top: 2px; }
.cal-dots i { width: 5px; height: 5px; }
.cal-day.today { background: var(--primary); color: var(--primary-ink); }
.cal-day.today small { color: inherit; opacity: .7; }
.dot-gurpurab, .dot-history, .dot-bhagat, .dot-sangrand, .dot-masya, .dot-puranmashi { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.dot-gurpurab { background: var(--dot-gurpurab); }
.dot-history { background: var(--dot-history); }
.dot-bhagat { background: var(--dot-bhagat); }
.dot-sangrand { background: var(--dot-sangrand); }
.dot-masya { background: var(--dot-masya); }
.dot-puranmashi { background: var(--dot-puranmashi); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 16px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-entry { display: grid; grid-template-columns: 48px 8px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); scroll-margin: 80px; }
.cal-entry.hit { background: var(--mark); }
.cal-date b { display: block; font-size: 17px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cal-date small { font-size: 12px; color: var(--muted); }

/* Listening */
.listen { display: grid; gap: 8px; margin: 8px 0 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.listen-head { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.listen-head b { font-size: 17px; font-weight: 500; }
.listen-head small { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.listen .btn.wide { margin: 0; }
.listen-note { margin: 0; font-size: 13px; color: var(--muted); }
.radio-bar, .scroll-bar {
  position: fixed; z-index: 4; left: 0; right: 0; bottom: calc(var(--bar) + 1px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.radio-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.radio-toggle { flex: none; background: var(--primary); color: var(--primary-ink); border-radius: 50%; }
.radio-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.radio-name .bi { display: flex; min-width: 0; }
.radio-name .t-en { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.radio-name .t-pa { font-size: .82em; }
.eq { display: inline-flex; flex: none; align-items: flex-end; gap: 2px; width: 14px; height: 14px; }
.eq i { flex: 1; height: 100%; background: var(--accent); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.path-bar { display: block; padding: 8px 12px 12px; }
.path-top { display: flex; align-items: center; gap: 4px; }
.path-bar input[type=range] { display: block; min-height: 28px; }
.path-time { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.path-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 2px; }
.path-skip { width: 52px; height: 48px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.path-main { width: 56px; height: 56px; }
#pathSize .ico { transition: transform .16s var(--ease); }
.path-bar.compact { display: flex; align-items: center; gap: 4px; padding: 8px 8px; }
.path-bar.compact .path-top { flex: 1; min-width: 0; }
.path-bar.compact input[type=range], .path-bar.compact .path-time, .path-bar.compact .path-skip { display: none; }
.path-bar.compact .path-controls { order: -1; margin: 0; }
.path-bar.compact .path-main { width: 44px; height: 44px; }
.path-bar.compact #pathSize .ico { transform: rotate(180deg); }
.scroll-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 12px; }
.scroll-bar .btn { flex: 1; max-width: 260px; min-height: 44px; background: transparent; color: var(--ink); border-color: var(--line); white-space: nowrap; font-weight: 500; }
body:has(.scroll-bar:not([hidden])) main { padding-bottom: 80px; }
.has-radio main { padding-bottom: 96px; }
.has-radio .scroll-bar { bottom: calc(var(--bar) + 58px + env(safe-area-inset-bottom)); }
.has-path main { padding-bottom: 248px; }
.has-path .scroll-bar { bottom: calc(var(--bar) + 186px + env(safe-area-inset-bottom)); }
.path-compact main { padding-bottom: 128px !important; }
body.path-compact .scroll-bar { bottom: calc(var(--bar) + 58px + env(safe-area-inset-bottom)); }
.big-text.has-path:not(.path-compact) .scroll-bar { display: none; }

/* Learn */
.letter-detail { min-height: 56px; margin: 8px 0 12px; font-size: 20px; font-weight: 500; }
.letter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-bottom: 16px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.letter { aspect-ratio: 1; min-height: 48px; cursor: pointer; background: var(--bg); border: 0; color: var(--ink); font-family: var(--font-gurbani, serif); font-size: 28px; line-height: 1; }
.quiz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quiz-grid .letter { aspect-ratio: auto; height: 96px; font-size: 44px; border: 1px solid var(--line); border-radius: var(--r); }
.letter.right { background: var(--quiz-right); color: var(--on-solid); }
.letter.wrong { background: var(--quiz-wrong); color: var(--on-solid); }
.quiz-q { margin: 16px 0 8px; font-size: 22px; }

/* Timing tool */
.timing-line { min-height: 120px; margin: 16px 0; }
.timing-next { min-height: 96px; font-size: 20px; }
.timing-out { width: 100%; min-height: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }

/* Settings */
.settings {
  position: fixed; top: calc(56px + env(safe-area-inset-top)); left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; align-content: start;
  overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 40px;
  background: var(--bg);
  animation: panel-in .2s var(--ease);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
.settings label, .set-group { display: flex; flex-direction: column; gap: 8px; font-size: 17px; font-weight: 500; }
.settings small { font-size: 14px; font-weight: 400; color: var(--muted); }
.settings label.check { flex-direction: row; align-items: center; gap: 12px; min-height: 48px; }
.settings label.check small { display: block; }
.settings input[type=checkbox] { flex: none; width: 26px; height: 26px; accent-color: var(--accent); }
.set-title { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.set-title small { display: block; font-size: 16px; }
.set-sample { grid-column: 1 / -1; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 18px; }
.set-group { grid-column: 1 / -1; }
.set-label small { display: block; }
.size-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.size-picker button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 68px; padding: 4px; cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: var(--r); }
.size-picker span { line-height: 1.1; font-weight: 600; }
.size-picker small { font-size: 12px; }
.size-picker button[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.size-picker button[aria-pressed=true] small { color: inherit; }
#setFamily { grid-column: 1 / -1; flex-direction: column; gap: 0; margin: 0; }
.set-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.set-actions .btn { flex-direction: column; gap: 0; }
.set-actions small, #setFamily small { font-size: 13px; color: inherit; opacity: .7; }

/* Share */
dialog.share { width: calc(min(92vw, 460px) / var(--ui, 1)); max-height: calc(92vh / var(--ui, 1)); max-height: calc(92dvh / var(--ui, 1)); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; color: var(--ink); background: var(--surface); border: 0; border-radius: var(--r); }
dialog.share[open] { animation: dialog-in .25s var(--ease); }
dialog.share::backdrop { background: rgba(var(--scrim-rgb), .7); }
dialog.share .btn:not(.gold) { background: transparent; color: var(--ink); border-color: var(--line); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Opening */
#splash { position: fixed; inset: 0; z-index: 50; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--splash-ink); background: var(--night); transition: background-color .3s var(--ease); -webkit-user-select: none; user-select: none; }
.splash-mark { font-family: var(--font-gurmukhi); font-size: 96px; line-height: 1.1; color: var(--gold); animation: mark-in .5s var(--ease) backwards; }
.splash-name { margin-top: 8px; font-size: 24px; font-weight: 500; letter-spacing: -.01em; transition: opacity .15s var(--ease); }
#splash.leaving { background: transparent; }
#splash.leaving .splash-name { opacity: 0; }
@keyframes mark-in { from { opacity: 0; transform: scale(.94); } }

/* Loading */
.skeleton { display: grid; gap: 12px; padding: 24px 20px; animation: fade-in .2s var(--ease) .15s both; }
@keyframes fade-in { from { opacity: 0; } }
.sk { display: block; background: var(--raised); border-radius: var(--r); animation: sk 1.4s ease-in-out infinite; }
.sk-title { width: 60%; height: 34px; }
.sk-line { width: 40%; height: 15px; margin-bottom: 8px; }
.sk-block { height: 64px; }
@keyframes sk { 50% { opacity: .5; } }

/* High contrast */
:root[data-contrast] .row, :root[data-contrast] .card, :root[data-contrast] .story-card { border-bottom-width: 2px; }
:root[data-contrast] .btn.alt, :root[data-contrast] .btn.ghost { border-width: 2px; }
:root[data-contrast] .cal-day { border: 1px solid var(--ink); }

/* Bold */
:root[data-bold] body { font-weight: 600; }
:root[data-bold] .gurbani, :root[data-bold] .story-en, :root[data-bold] .story-pa, :root[data-bold] .meaning, :root[data-bold] .sub, :root[data-bold] small, :root[data-bold] .t-pa, :root[data-bold] .row-sub { font-weight: 600; }
:root[data-bold] h1, :root[data-bold] h2, :root[data-bold] b, :root[data-bold] .btn, :root[data-bold] .row-title { font-weight: 700; }

/* Large text */
.big-text main { padding-left: 16px; padding-right: 16px; }
.big-text .sheet-inner, .big-text .home-sky { padding-left: 16px; padding-right: 16px; }
.big-text .home-sky .gurbani { font-size: 26px; }
.big-text .home-sky { min-height: 0; padding-top: 12px; }
.big-text h1 { font-size: 26px; }
.big-text .top { padding: env(safe-area-inset-top) 4px 0 12px; }
.big-text .brand { font-size: 0; }
.big-text .brand .onkar { font-size: 20px; }
.big-text .icon-btn { width: 40px; }
.big-text .row-end { display: none; }
.big-text .row { grid-template-columns: 26px minmax(0, 1fr); }
.big-text .row.row-streak { grid-template-columns: 26px minmax(0, 1fr); }
.big-text .row-streak .row-end { display: inline-flex; grid-column: 2; margin-top: 8px; }
.big-text .player { margin-left: -16px; margin-right: -16px; }
.big-text .quick .btn { flex-basis: 100%; }
.big-text .reader-head { flex-wrap: wrap; }
.big-text .tabs a .ico { width: 22px; height: 22px; }
.big-text .cal-day small { display: none; }
.big-text .cal-day, .big-text .cal-blank { min-height: 44px; }
.big-text .cal-pager .btn { min-width: 0; }
.big-text .letter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.big-text .segment button, .big-text .chips button { padding-left: 4px; padding-right: 4px; font-size: 14px; }
.big-text .segment .bi { flex-direction: column; align-items: center; gap: 0; }
.big-text .reminder input[type=time] { width: 100%; }
.big-text .scroll-bar .round { width: 36px; height: 40px; }
.big-text .scroll-bar .btn { padding: 4px 8px; gap: 4px; font-size: 13px; }
.big-text .scroll-bar .btn .ico { width: 16px; height: 16px; }
.big-text .path-controls { gap: 4px; }
.big-text .path-skip { width: 44px; font-size: 14px; }
.big-text .path-main { width: 48px; height: 48px; }
.big-text .path-bar.compact { padding: 4px; gap: 2px; }
.big-text .path-bar.compact .path-main { width: 40px; height: 40px; }
.big-text .path-bar.compact .path-top .round { width: 30px; flex: none; }
.big-text .path-bar.compact .radio-name { font-size: 14px; }
.big-text .path-bar.compact .t-en { white-space: normal; overflow-wrap: normal; }
.big-text .path-bar.compact .t-pa { display: none; }

/* Laptop */
@media (min-width: 900px) {
  .tabs { left: 0; right: 0; }
  .tabs a { max-width: none; }
  .home-sky .gurbani { font-size: 44px; }
  .player { margin-left: 0; margin-right: 0; border-radius: var(--r); }
}

/* Mouse only, so a state never sticks after a tap */
@media (hover: hover) and (pointer: fine) {
  .row:hover .row-title, .card:hover, .story-card:hover b, .result:hover small { color: var(--accent); }
  .btn:hover { opacity: .88; }
  .icon-btn:hover, .round:hover, .line-share:hover { background: var(--raised); opacity: 1; }
  .tabs a:hover { color: var(--ink); }
  .sky-round:hover { background: rgba(var(--sky-ink-rgb), .24); }
  .chips button:hover, .segment button:hover { border-color: var(--muted); }
  .cal-day:hover { background: var(--raised); }
  .cal-day.today:hover { background: var(--primary); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: color, background-color, border-color, opacity !important; }
  .on-air .tabs a[data-tab=live] .ico, .on-air .row-live .ico, .eq i, .sk { animation: none !important; }
  .eq i { transform: scaleY(.7); }
  #night { transition: none; }
  .btn:active, .bead:active { transform: none; }
  .bead.complete::after { animation: fade-in .3s ease both; }
}
@media (prefers-reduced-transparency: reduce) {
  #scrim { background: rgba(var(--scrim-rgb), .88); }
}

/* Home screen: illustrated tiles, the date and the streak. Solid surfaces, no glass or glow. */
.sheet-inner > .row { min-height: 56px; }
.day-row { display: grid; gap: 8px; margin: 16px 0 8px; }
.ns-card, .streak, .tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.ns-card { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px; }
.ns-top { display: flex; align-items: center; gap: 12px; }
.ns-day { font-size: 42px; font-weight: 500; letter-spacing: -.02em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.ns-month { display: block; font-size: 18px; font-weight: 500; }
.ns-top small { display: block; font-size: 15px; color: var(--muted); }
.ns-next { padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.ns-next small { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 500; color: var(--accent); }
.streak { display: flex; align-items: center; gap: 16px; padding: 16px; }
.streak-count { flex: none; width: 76px; }
.streak-count b { display: block; font-size: 42px; font-weight: 500; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.streak-count .bi { margin-top: 4px; font-size: 13px; color: var(--muted); }
.streak-side { flex: 1; min-width: 0; }
.streak-side > small { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.streak .week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day i { width: 18px; height: 18px; border-radius: 50%; background: var(--bead); }
.day.on i { background: var(--accent); }
.day.today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.day small { font-size: 12px; line-height: 16px; color: var(--muted); }
.day.today small { color: var(--ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; min-height: 124px; padding: 16px; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .12s var(--ease), border-color .16s var(--ease); }
.tile .bubble { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 8px; color: var(--accent); background: var(--raised); border-radius: 50%; }
.tile b { font-size: 17px; font-weight: 500; line-height: 1.3; }
.tile small, .tile .row-sub { display: block; margin: 0; font-size: 15px; color: var(--muted); }
.tile:active { transform: scale(.98); }
.tile.t-wide { grid-column: 1 / -1; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; align-items: center; min-height: 0; width: 100%; }
.tile.t-wide .bubble { grid-row: span 2; margin: 0; }
.tile.t-wide b { align-self: end; }
.tile.t-wide small { align-self: start; }
.bubble-aa { font-size: 22px; font-weight: 600; }
.rich { display: block; width: 36px; height: 36px; }
.rich svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rich svg g, .rich svg circle { transform-box: view-box; transform-origin: 24px 24px; }
.tile:active .hop { animation: hop .45s var(--ease); }
.tile:active .swing { animation: swing .7s var(--ease); transform-origin: 24px 8px; }
.tile:active .spin { animation: turn .8s var(--ease); }
.tile:active .lotus { animation: bloom .45s var(--ease); }
.tile:active .unroll { animation: tip .45s var(--ease); }
.tile:active .core { animation: pulse .45s var(--ease); }
@keyframes hop { 40% { transform: translateY(-5px); } }
@keyframes swing { 25% { transform: rotate(12deg); } 55% { transform: rotate(-9deg); } 80% { transform: rotate(4deg); } }
@keyframes turn { to { transform: rotate(180deg); } }
@keyframes bloom { 40% { transform: translateY(-3px) scale(1.15); } }
@keyframes tip { 40% { transform: rotate(-6deg); } }
@keyframes pulse { 40% { transform: scale(1.2); } }
@media (hover: hover) and (pointer: fine) {
  .tile:hover, .ns-card:hover, .streak:hover { border-color: var(--muted); }
  .tile:hover .hop { animation: hop .45s var(--ease); }
  .tile:hover .swing { animation: swing .7s var(--ease); transform-origin: 24px 8px; }
  .tile:hover .spin { animation: turn .8s var(--ease); }
  .tile:hover .lotus { animation: bloom .45s var(--ease); }
  .tile:hover .unroll { animation: tip .45s var(--ease); }
  .tile:hover .core { animation: pulse .45s var(--ease); }
}
.on-air .tile.row-live { border-color: var(--live); }
.on-air .tile.row-live .bubble { animation: on-air 1.4s ease-in-out infinite; }
.on-air .tile.row-live .row-sub { color: var(--live); }
@media (min-width: 620px) { .day-row { grid-template-columns: 1fr 1.25fr; } }
@media (min-width: 620px) { .tile.t-wide.row-live, .tile.t-wide:has(.rich-radio) { grid-column: span 1; } }
.big-text .day-row { grid-template-columns: 1fr; }
.big-text .streak { flex-direction: column; align-items: stretch; }
.big-text .streak-count { width: auto; }
.big-text .tiles { grid-template-columns: 1fr; }
.big-text .tile { grid-column: 1 / -1; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; align-items: center; min-height: 0; }
.big-text .tile .bubble { grid-row: span 2; margin: 0; }
.big-text .tile b { align-self: end; }
.big-text .tile small { align-self: start; }
:root[data-contrast] .ns-card, :root[data-contrast] .streak, :root[data-contrast] .tile { border: 2px solid var(--ink); }
:root[data-contrast] .tile .bubble { background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  .tile:active *, .tile:hover *, .on-air .tile.row-live .bubble { animation: none !important; }
  .tile:active { transform: none; }
}
.btn, .row-title, .tile b { overflow-wrap: normal; }
.big-text .sky-actions { flex-wrap: wrap; }
.big-text .sky-actions .btn { flex: 1 1 100%; }
.big-text .sky-round { flex: 1; }

/* The opening shows the official logo */
#splash { background: var(--night-deep); }

/* Counting by voice */
.voice { margin-bottom: 8px; }
.voice .btn.wide { margin: 0 0 8px; }
.voice-level { display: none; height: 4px; margin-bottom: 12px; overflow: hidden; background: var(--bead); border-radius: 2px; }
.voice.on .voice-level { display: block; }
.voice-level i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.voice-sense { display: grid; gap: 8px; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.voice-sense .bi { flex-direction: row; align-items: baseline; gap: 8px; }
.voice-sense .t-pa { margin: 0; }
.voice-status { margin: 8px 0 0; }

/* Embedded ads and sponsors: clearly labelled and never with scripture */
.ad-slot { display: block; margin: 16px 0; }
.sponsor { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.sponsor b { display: block; font-size: 16px; font-weight: 500; }
.ad-label { display: block; margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.ad-label .bi { flex-direction: row; gap: 8px; }
.ad-label .t-pa { margin: 0; }
.native-ad-box { height: 320px; }
.live-ad { margin: 8px 0 4px; }
.live-ad-box { height: 50px; }
body.has-banner main, body.has-banner .sheet { padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom) + var(--banner-h, 60px) + 12px); }
.set-ads .btn { flex-direction: column; }
.set-ads .btn small { display: block; color: inherit; opacity: .8; }
.native-ad .ad-head { display: flex; justify-content: space-between; align-items: baseline; }
.native-ad .ad-head .link-btn { min-height: 32px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: underline; }
.set-ads { display: grid; gap: 8px; margin: 16px 0; }
.set-ads .link-btn { background: none; border: 0; padding: 4px; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; }
.set-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.set-links a, .set-links button { min-height: 44px; display: inline-flex; align-items: center; padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; }

/* Reading themes beyond light and the sky */
:root[data-theme="oled"] {
  --bg: #000; --surface: #0b0b0c; --raised: #17171a; --ink: #f2efe8; --muted: #a8a8ad;
  --line: rgba(255, 255, 255, .12); --accent: #e3bd74; --accent-ink: #1d1404; --primary: #e3bd74; --primary-ink: #000;
  --bead: rgba(255, 255, 255, .2); --mark: rgba(227, 189, 116, .14); --live: #ff4757;
}
:root[data-theme="parchment"] {
  --bg: #f4ecd8; --surface: #fbf6e9; --raised: #ebe1c6; --ink: #2b2116; --muted: #6b5b45;
  --line: rgba(43, 33, 22, .14); --accent: #8a5a14; --accent-ink: #fbf6e9; --primary: #2b2116; --primary-ink: #fbf6e9;
  --bead: rgba(43, 33, 22, .2); --mark: rgba(138, 90, 20, .13); --live: #c0182e;
}
:root[data-theme="oled"] .home-sky, :root[data-theme="parchment"] .home-sky { --sky-text: var(--ink); min-height: 0; padding-top: 16px; }
:root[data-theme="oled"] .home-sky .gurbani, :root[data-theme="oled"] .sky-meaning, :root[data-theme="oled"] .sky-date, :root[data-theme="oled"] .sky-date span, :root[data-theme="oled"] .sky-round, :root[data-theme="oled"] .sky-label, :root[data-theme="oled"] .sky-label .t-pa,
:root[data-theme="parchment"] .home-sky .gurbani, :root[data-theme="parchment"] .sky-meaning, :root[data-theme="parchment"] .sky-date, :root[data-theme="parchment"] .sky-date span, :root[data-theme="parchment"] .sky-round, :root[data-theme="parchment"] .sky-label, :root[data-theme="parchment"] .sky-label .t-pa { color: var(--ink); }
:root[data-theme="oled"] .sky-round { background: var(--tint-oled); }
:root[data-theme="parchment"] .sky-round { background: var(--tint-parchment); }
:root[data-theme="oled"] .sheet, :root[data-theme="parchment"] .sheet { border-radius: 0; }
:root[data-theme="oled"] body[data-page=home] .top, :root[data-theme="parchment"] body[data-page=home] .top { color: var(--ink); }

/* Vishraam: colour only, so line breaks and spacing stay exactly as printed */
:root[data-theme="dark"], :root[data-theme="oled"] { --vis-full: #fb923c; --vis-short: #4ade80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --vis-full: #fb923c; --vis-short: #4ade80; } }
:root[data-contrast] { --vis-full: var(--hc-vis-full); --vis-short: var(--hc-vis-short); }
.vis-full { color: var(--vis-full); }
.vis-short { color: var(--vis-short); }

.check.senior { font-weight: 600; }

/* Resume note sits above the tab bar for a few seconds */
.resume-note {
  position: fixed; z-index: 7; left: 12px; right: 12px; bottom: calc(var(--bar) + 12px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  padding: 8px 16px; color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px;
}
.link-btn { min-height: 40px; padding: 0; color: var(--accent); background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* The streak burns hotter day by day */
.day.on.heat-1 i { background: var(--heat-1); }
.day.on.heat-2 i { background: var(--heat-2); }
.day.on.heat-3 i { background: var(--heat-3); }
.day.on.heat-4 i { background: var(--heat-4); }
.day.on.heat-5 i { background: var(--heat-5); }
.streak-count b { display: flex; align-items: center; gap: 4px; }
.streak-count b .ico { width: 28px; height: 28px; flex: none; }
.streak-count b .ico svg { fill: currentColor; stroke: none; }
.streak-count.heat-1 b { color: var(--heat-ink-1); }
.streak-count.heat-2 b { color: var(--heat-ink-2); }
.streak-count.heat-3 b { color: var(--heat-ink-3); }
.streak-count.heat-4 b { color: var(--heat-ink-4); }
.streak-count.heat-5 b { color: var(--heat-ink-5); }
:root[data-contrast] .streak-count[class*=heat] b { color: var(--heat-ink-contrast); }

/* Sun-based reminders */
.sun-box { margin-top: 28px; }
.sun-box h2 { margin: 0 0 4px; font-size: 20px; }
.reminder.sun { flex-wrap: wrap; row-gap: 8px; }
.sun-when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.sun-when select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 8px; }

/* Gurdwara map */
.map-box { height: 62vh; min-height: 320px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--raised); }
.map-box .state { padding: 24px; }
.map-pop { display: grid; gap: 4px; min-width: 160px; font: 15px/1.35 var(--font-app, system-ui, sans-serif); color: var(--map-ink); }
.map-pop a { color: var(--map-link); font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font-size: 22px; }
.sun-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; }

/* Poster preview: a plain image sized to leave room for the buttons on any phone */
.share-preview { display: block; width: auto; height: auto; max-width: 100%; max-height: calc((100vh - 260px) / var(--ui, 1)); max-height: calc((100dvh - 260px) / var(--ui, 1)); margin: 0 auto; border-radius: var(--r); aspect-ratio: 4 / 5; object-fit: contain; }

/* Redesign: calm and sacred. Wide light titles, square wells stepped in lightness, one gold light. */
h1 { font-family: var(--font-title); font-weight: 300; font-stretch: 125%; font-size: 34px; letter-spacing: -.015em; line-height: 1.08; }
h1 .t-pa { font-stretch: 100%; font-weight: 400; }
h2 { font-size: 16px; font-weight: 500; }
.brand { font-family: var(--font-title); font-weight: 400; font-stretch: 125%; font-size: 19px; }
.brand .onkar { font-stretch: 100%; }
.set-title { font-family: var(--font-title); font-weight: 300; font-stretch: 125%; font-size: 28px; }
.set-title small { font-stretch: 100%; }
.splash-name { font-family: var(--font-title); font-weight: 300; font-stretch: 125%; font-size: 28px; }
.ns-day, .streak-count b, .count { font-family: var(--font-title); font-weight: 300; font-stretch: 125%; letter-spacing: -.03em; }
.count { font-size: 88px; line-height: 1; }
.ns-day, .streak-count b { font-size: 46px; }

/* One primary per screen in gold; everything else is an outline on the ground */
.btn { font-weight: 500; }
.btn.alt, .btn.ghost, .pager .btn, .jump .btn, .scroll-bar .btn, .place .btn { border-color: var(--line); }
.sky-round { border-radius: var(--r); }
.chips button[aria-pressed=true], .size-picker button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.segment { padding: 0; gap: 0; background: transparent; border: 1px solid var(--line); }
.segment button[aria-pressed=true], .segment a.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.segment button[aria-pressed=true] .t-pa, .segment a.on .t-pa { color: inherit; opacity: .75; }

/* The tab bar marks the current place with a thin gold line, nothing else */
.tabs a { position: relative; }
.tabs a.on::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--accent); }

/* Home wells: depth by a step of lightness, no outline, no bubble */
.sheet { border-top: 0; }
.ns-card, .streak, .tile { border: 0; background: var(--surface); }
.tile { min-height: 112px; gap: 4px; transition: background-color var(--dur-short, .22s) var(--ease); }
.tile .bubble { width: auto; height: auto; justify-content: flex-start; margin-bottom: 16px; background: transparent; border-radius: 0; }
.tile.t-wide { grid-template-columns: 40px minmax(0, 1fr); }
.tile:active { transform: none; background: var(--raised); }
.tile:active *, .tile:hover * { animation: none !important; }
.ns-next { border-top-color: var(--line); }
.tiles, .day-row { gap: 2px; }
.day-row { margin-bottom: 2px; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover, .ns-card:hover, .streak:hover { background: var(--raised); }
}
.big-text .tile .bubble { margin: 0; }
:root[data-contrast] .tile .bubble { background: transparent; }

/* Read: the two doors at the top are rows, so the one gold button is Nitnem's */
.read-doors { margin: 8px 0 0; border-top: 1px solid var(--line); }
.read-doors .row-title { font-size: 18px; }

/* The live dot and the reader's marks stay square like the rest */
.verse.hit, .verse.now { border-radius: var(--r); }
.hukam-actions .btn:first-child { flex-basis: 100%; }
.hukam-actions .btn:not(:first-child) { min-height: 48px; }
.ns-day, .streak-count b, .count { font-variant-numeric: proportional-nums; font-feature-settings: "zero" 0, "tnum" 0; }

/* Native feel: every control answers the moment a finger lands, not when it lifts */
.tabs a:active, .icon-btn:active, .round:active, .sky-round:active, .line-share:active, .save:active { opacity: .55; }
.chips button:active, .segment button:active, .size-picker button:active { background: var(--raised); }
.tabs a, .icon-btn, .round, .line-share, .save { transition: opacity var(--dur-micro, .12s) var(--ease); }
dialog.share { overscroll-behavior: contain; }

/* Room for the ad banner that sits on top of the tab bar */

.offline-note { margin: 8px 0 16px; padding: 12px 16px; border-left: 2px solid var(--accent); background: var(--surface); font-size: 15px; }
.ad-check { margin: 12px 0; font-size: 13px; color: var(--muted); }
.ad-check pre { white-space: pre-wrap; font-size: 12px; margin: 8px 0 0; }
