@font-face {
  font-family: Outfit;
  src: url("./fonts/outfit-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Outfit, "Nirmala UI", sans-serif;
  color: #322820;
  background: #f7f1e7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #322820;
  --muted: #786e63;
  --line: #e6dccd;
  --paper: #fffdf9;
  --saffron: #a95128;
  --saffron-soft: #f7e6d9;
  --green: #56765d;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; min-width: 320px; overflow-x: clip; }
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #a95128; outline-offset: 3px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 5; transform: translateY(-160%); background: var(--ink); color: white; padding: 10px 14px; border-radius: 5px; }
.skip-link:focus { transform: translateY(0); }
.topbar { height: 72px; padding: 0 max(28px, calc((100vw - 1240px) / 2)); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.025em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px 11px 11px 3px; background: var(--saffron); color: white; font: 600 16px "Nirmala UI", sans-serif; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; font-weight: 500; }
.top-note { color: var(--muted); font-size: 13px; }
.page-shell { width: min(1240px, calc(100% - 56px)); margin: 0 auto; }
.intro { min-height: 192px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 0 34px; }
.eyebrow, .panel-kicker { margin: 0 0 9px; color: var(--saffron); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
h1, h2, p { text-wrap: pretty; }
.intro h1 { margin: 0; font-size: clamp(32px, 4vw, 47px); line-height: 1.1; letter-spacing: -.055em; font-weight: 550; }
.intro-copy { max-width: 580px; margin: 10px 0 0; color: var(--muted); line-height: 1.55; font-size: 15px; }
.privacy-note { margin: 0 0 2px; color: #675d52; white-space: nowrap; font-size: 13px; }
.privacy-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(310px, .72fr); align-items: start; gap: 18px; }
.reading-panel, .counter-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.reading-panel { overflow: hidden; }
.reading-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 18px; background: #fffdf9f2; backdrop-filter: blur(14px); border-bottom: 1px solid #eee7de; }
.reading-header .panel-kicker { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.reading-header h2 { margin: 0; font: 600 23px "Nirmala UI", sans-serif; letter-spacing: -.02em; }
.language-mark { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 12px "Nirmala UI", sans-serif; }
.language-mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.opening-guide { display: flex; align-items: flex-start; gap: 12px; margin: 14px 28px 3px; padding: 13px 15px; border: 1px solid #eedfca; border-radius: 9px; background: #fcf7ec; }
.guide-symbol { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #f5e7cf; color: #9a5a2b; }
.guide-symbol svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.opening-guide strong { color: #5a3d2a; font-size: 13px; font-weight: 650; }
.opening-guide div span { display: block; margin-top: 3px; color: #786e63; font-size: 12px; line-height: 1.45; }
.verses { max-height: min(72vh, 900px); overflow: auto; padding: 6px 28px 30px; scrollbar-color: #cbbbaa transparent; scrollbar-width: thin; }
.verse { padding: 18px 14px 19px; border-bottom: 1px solid #f0e9df; border-radius: 5px; transition: background-color 220ms ease, border-color 220ms ease; scroll-margin-block: 100px; }
.verse:last-child { border-bottom: 0; }
.verse-label { display: block; margin-bottom: 8px; color: #96897b; font: 11px Outfit, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.verse-text { margin: 0; color: #43372d; font: 500 clamp(18px, 1.8vw, 22px)/1.9 "Nirmala UI", "Noto Serif Devanagari", serif; }
.verse.is-active { background: #fbf4e8; border-color: #e8cfaa; }
.word { border-radius: 3px; transition: color 180ms ease, background-color 180ms ease; }
.word.is-read { color: var(--saffron); }
.word.is-current { background: #efdbb7; color: #472e1c; box-shadow: 0 0 0 2px #efdbb7; }
.counter-panel { position: sticky; top: 18px; padding: 24px 24px 21px; }
.counter-topline { display: flex; align-items: center; gap: 8px; color: var(--saffron); font-size: 12px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.goal-symbol { display: grid; width: 21px; height: 21px; place-items: center; }
.goal-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.counter-panel h2 { margin: 8px 0 14px; max-width: 260px; color: #665b50; font-size: 16px; line-height: 1.3; letter-spacing: -.02em; font-weight: 550; }
.count-display { display: flex; align-items: baseline; gap: 7px; }
.count-number { color: var(--ink); font-size: clamp(62px, 7.5vw, 86px); line-height: .98; font-weight: 500; letter-spacing: -.08em; font-variant-numeric: tabular-nums; transition: color 220ms ease; }
.count-total { color: #95897c; font-size: 20px; font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 5px; background: #eee6db; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--saffron); transition: width 380ms cubic-bezier(.2,.75,.25,1); }
.progress-copy { margin: 8px 0 19px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.session-card { min-height: 99px; padding: 13px 14px; border: 1px solid #eee6da; border-radius: 8px; background: #fbf8f2; }
.session-status { display: flex; align-items: center; gap: 8px; color: #63594e; font-size: 12px; font-weight: 600; }
.status-indicator { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: #eee9e1; color: #84776a; }
.status-indicator svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.session-card.is-listening .status-indicator { background: #e4ede2; color: #4f7457; animation: breathe 1.8s ease-in-out infinite; }
.session-card.is-error .status-indicator { background: #b84435; color: #fff; }
.transcript { min-height: 37px; margin: 9px 0 0; color: #82786d; font: 15px/1.5 "Nirmala UI", sans-serif; }
.listen-button { width: 100%; min-height: 49px; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 7px; background: var(--saffron); color: #fff; font-weight: 650; cursor: pointer; transition: transform 180ms ease, background 180ms ease; }
.listen-button:hover { background: #90411f; transform: translateY(-1px); }
.listen-button:active, .manual-button:active, .reset-button:active { transform: scale(.985); }
.listen-button.is-listening { background: #5f765d; }
.button-symbol { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.manual-button, .reset-button { width: 100%; min-height: 43px; border: 0; background: transparent; color: #574b3f; font-size: 13px; font-weight: 600; cursor: pointer; transition: color 180ms ease, transform 180ms ease; }
.manual-button { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf9; }
.manual-button svg, .reset-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.manual-button:hover { border-color: #c9a98e; color: var(--saffron); }
.reset-button { display: flex; min-height: 35px; align-items: center; justify-content: center; gap: 6px; color: #82776a; text-decoration: underline; text-decoration-color: #cfc3b5; text-underline-offset: 3px; }
.reset-button:hover { color: #6c3424; }
.voice-note { margin: 11px 0 0; color: #82786d; font-size: 11px; line-height: 1.5; }
.page-footer { display: flex; justify-content: space-between; padding: 24px 2px 35px; color: #82786d; font-size: 12px; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px #e4ede280; } }
@media (max-width: 900px) {
  .topbar { height: 64px; padding-inline: 22px; }
  .page-shell { width: min(100% - 32px, 680px); }
  .intro { min-height: 0; align-items: flex-start; flex-direction: column; gap: 15px; padding: 32px 0 24px; }
  .intro-copy { font-size: 14px; }
  .practice-layout { grid-template-columns: minmax(0, 1fr); }
  .counter-panel { position: static; display: grid; grid-row: 1; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 17px; }
  .counter-topline { grid-column: 1; grid-row: 1; }
  .counter-panel h2 { grid-column: 1; grid-row: 2; max-width: none; margin: 6px 0 8px; font-size: 14px; }
  .count-display { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .count-number { font-size: 48px; }
  .count-total { font-size: 14px; }
  .progress-track, .progress-copy, .session-card, .listen-button, .manual-button, .reset-button, .voice-note { grid-column: 1 / -1; }
  .progress-track { margin-top: 6px; }
  .progress-copy { margin: 7px 0 11px; }
  .session-card { min-height: 73px; }
  .transcript { min-height: 22px; margin-top: 7px; }
  .listen-button { min-height: 47px; margin-top: 11px; }
  .manual-button { min-height: 41px; margin-top: 7px; }
  .reset-button { justify-self: center; width: auto; padding-inline: 14px; }
  .voice-note { margin-top: 5px; }
  .verses { max-height: none; overflow: visible; padding-inline: 16px; }
  .reading-header { padding-inline: 19px; }
  .opening-guide { margin-inline: 18px; }
}
@media (max-width: 460px) {
  .top-note { font-size: 11px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 33px; height: 33px; }
  .intro h1 { font-size: 34px; }
  .privacy-note { font-size: 12px; }
  .counter-panel { padding: 14px; }
  .count-number { font-size: 42px; }
  .count-total { font-size: 13px; }
  .reading-header h2 { font-size: 20px; }
  .verse { padding-inline: 8px; }
  .verse-text { font-size: 19px; }
  .page-footer { font-size: 11px; }
  .opening-guide { margin: 12px 12px 2px; padding: 11px; }
  .opening-guide strong { font-size: 12px; }
  .opening-guide div span { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
