/* Mantra on the sitting screen. Tokens only; one primary action; only transform and opacity move. It extends the timer sheet
   (#sheet-in.tm, js/practice-sheets.js timer()): the same h2 (#sheet-h), position (#dh-pos), line (#dh-text), clock (#dh-clock), bar,
   Pause/End and Sound row. A plain sitting has no data-view and is unchanged. data-view is one of: text, japa, anchor. */

/* ---- text and japa: the clock moves to the top right, the stage takes the middle ---- */
.mt-clock[hidden],.mt-stage[hidden],.mt-links:empty{display:none}
.mt-feet{display:contents}
.mt-undo-foot:disabled{opacity:.5}
.mt-stage{display:contents}
#sheet-in.tm:is([data-view=text],[data-view=japa]) .ps-timer-art,
#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-clock{display:none}
/* the position stays for a screen reader; the bar and Next say it to the eye */
#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-pos{position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;clip:rect(0 0 0 0)}
#sheet-in.tm:is([data-view=text],[data-view=japa]) .ps-timer-body{padding-inline:var(--sp-4);gap:var(--sp-2)}
#sheet-in.tm:is([data-view=text],[data-view=japa]) .tm-mid{flex:none;min-height:0;gap:var(--sp-1)}
#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-under{display:none}
#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-bar{margin-top:var(--sp-2)}
#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-name{display:none}
.mt-clock::after{content:attr(data-of);margin-left:var(--sp-2);font:400 var(--fs-sm)/1 var(--font-ui);letter-spacing:0;color:var(--muted)}
.mt-clock{margin-left:auto;margin-right:var(--sp-2);font-size:var(--fs-xl);line-height:28px;font-weight:500;letter-spacing:.5px;color:var(--ink-mid)}
#sheet-in[data-timer-state=ready] .mt-clock{color:var(--muted)}
#sheet-in[data-timer-state=running] .mt-clock,#sheet-in[data-timer-state=paused] .mt-clock{color:var(--ink)}
@media (max-height:700px){#sheet-in.tm:is([data-view=text],[data-view=japa]) #sheet-h{font-size:var(--fs-xl);line-height:28px;margin:0}#sheet-in.tm:is([data-view=text],[data-view=japa]) #dh-text{display:none}}

/* the text pane: the reader's own verses (.rd-text) on paper, scrolled by hand */
.mt-pane{position:relative;flex:1;min-height:0;width:100%;overflow:auto;overscroll-behavior:contain;background:var(--surface);border:1px solid var(--hair);border-radius:var(--r-xl);padding:var(--sp-3) var(--sp-3) var(--sp-5) var(--sp-2);text-align:left;-webkit-overflow-scrolling:touch}
.mt-pane .rd-text{gap:var(--sp-3);max-width:36rem;margin-inline:auto}
.mt-pane .rd-text.deva .rd-t{font-size:var(--mt-size,24px);line-height:calc(var(--mt-size,24px) * 1.75)}
.mt-pane .rd-text.latin .rd-t{font-size:calc(var(--mt-size,24px) - 6px);line-height:calc(var(--mt-size,24px) + 6px)}
/* the person's size (Text sheet): the verse's size on the pane, the sample and the card */
.sz-s{--mt-size:22px}.sz-m{--mt-size:24px}.sz-l{--mt-size:26px}.sz-xl{--mt-size:30px}
.mt-pane .rd-v{padding:var(--sp-2) var(--sp-2) var(--sp-2) 0;border-radius:var(--r-md);cursor:pointer;-webkit-tap-highlight-color:transparent}
.mt-pane .rd-v[aria-current=true]{box-shadow:inset 0 0 0 1px var(--edge)}
.mt-pane .rd-v[aria-current=true] .rd-n{color:var(--flame);font-weight:600}
.mt-pane .rd-n{align-self:flex-start;padding-top:var(--sp-2)}
.mt-pane .rd-head{font-size:var(--fs-md)!important;line-height:24px!important;color:var(--muted)}
.mt-pane .mt-wait{margin:0;color:var(--muted);text-align:center}
.mt-pane .mt-aid{max-width:36rem;margin:var(--sp-3) auto 0;font-size:var(--fs-sm);line-height:20px;color:var(--muted);text-align:center;text-wrap:balance}
.mt-roman{display:block;margin-top:var(--sp-1);font-family:var(--font-verse);font-size:var(--fs-lg);line-height:28px;color:var(--ink-mid)}
.mt-roman .rd-l{display:block;padding-left:1.5em;text-indent:-1.5em}
/* in the silence that follows, the text stays until the person hides it (Hide the text) */
.mt-links{display:flex;align-items:center;justify-content:center;gap:var(--sp-2);flex:none;min-height:var(--tap);color:var(--muted);font-size:var(--fs-sm);text-align:center}
.mt-links .linkish{margin:0;min-height:var(--tap);padding:var(--sp-2) var(--sp-3);font-size:var(--fs-md);color:var(--muted)}

/* ---- japa: the whole stage is one bead ---- */
.mt-tap{position:relative;flex:1 1 0;min-height:0;container-type:size;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-3);width:100%;padding:var(--sp-4) var(--sp-3);border:1px solid var(--edge);border-radius:var(--r-xl);background:var(--surface);color:var(--ink);font:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;transition:transform var(--t-press) var(--ease-decel)}
.mt-tap:active:not(:disabled){transform:scale(var(--press-lg))}
.mt-tap:disabled{opacity:1;color:var(--ink)}
.mt-ring{container-type:inline-size;position:relative;flex:none;height:clamp(150px,calc(100cqh - 132px),288px);width:auto;max-width:100%;aspect-ratio:1}
.mt-ring .mt-rsvg{display:block;width:100%;height:100%}
.mt-ring .d{fill:none;stroke:var(--line-strong);stroke-width:1}
.mt-ring .d.on{fill:var(--flame);stroke:var(--flame)}
.mt-mantra{position:absolute;inset:17%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-1);text-align:center}
.mt-mantra .dv{font-family:var(--font-verse);font-size:clamp(18px,8.4cqw,var(--mt-size,30px));line-height:1.5;text-wrap:balance}
.mt-mantra .dv span{display:block}
.mt-mantra.one .dv{white-space:nowrap;font-size:clamp(var(--fs-xl),26cqw,76px);line-height:1.2}
.mt-mantra .ro{font-family:var(--font-verse);font-size:clamp(var(--fs-sm),6.4cqw,var(--fs-lg));line-height:1.35;color:var(--ink-mid);text-wrap:balance}
.mt-mantra .ro span{display:block}
.mt-count{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 var(--sp-2);justify-content:center;flex:none}
.mt-count b{flex:none;font-size:var(--fs-hero);line-height:44px;font-weight:500;font-variant-numeric:tabular-nums}
.mt-count span{font-size:var(--fs-md);color:var(--muted);white-space:nowrap}
.mt-count .mt-done{color:var(--good);font-weight:600}
.mt-hint{flex:none;font-size:var(--fs-md);color:var(--ink)}
@media (min-width:1024px){.mt-tap{max-width:540px;margin-inline:auto}}
/* Undo takes back one bead; it lives in the footer row beside Sound and Count, away from the card, and keeps its place before Begin */
.mt-undo-foot{align-items:center;margin-block:0}
.mt-goal{display:none}
@media (max-height:700px){.mt-goal{display:inline}#sheet-in[data-silent=true] #dh-text,#sheet-in.tm[data-view=text][data-silent=true] #dh-text{display:block}}

/* a name of several words (Hare Krishna) is a block above a smaller ring; the Roman line gives way on a short card */
.mt-mantra.multi{position:static;inset:auto;flex:none;gap:var(--sp-1);width:100%}
.mt-mantra.multi .dv{font-size:clamp(var(--fs-md),5.4cqw,var(--fs-xl));line-height:1.45}
.mt-mantra.multi .ro{font-size:var(--fs-sm);line-height:1.3}
.mt-ring.hollow{flex:1 1 0;height:auto;min-height:64px;max-height:200px;aspect-ratio:1}
@container (max-height:340px){.mt-mantra.multi .ro{display:none}}
@media (min-width:1024px){.mt-pane{max-width:540px;margin-inline:auto}}
@media (max-height:700px){#sheet-in.tm:is([data-view=anchor],[data-silent=true]) .ps-timer-art{display:none}}
@media (max-width:400px){.sheet.snd .st-grp:has(#mt-size-s) .row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---- the live #dh-text is flex-shrinkable; the anchor line must keep its height ---- */
#sheet-in.tm[data-view] #dh-text{flex:none}
@media (max-width:400px){#sheet-in.tm[data-view=anchor] #sheet-h{font-size:var(--fs-2xl);line-height:34px}}

/* ---- a plain meditation's anchor: the day's one line, in the display face, instead of the generic sentence ---- */
#sheet-in.tm[data-view=anchor] #dh-text{max-width:17em;margin-top:var(--sp-3);font-family:var(--font-display);font-size:var(--fs-xl);line-height:32px;text-wrap:balance;color:var(--ink)}

/* ---- the Text and Count sheets, built like the Sound sheet (chips, hints, Done) ---- */
.txt-sample{padding:var(--sp-3) var(--sp-4);border:1px solid var(--hair);border-radius:var(--r-xl);background:var(--surface);font-family:var(--font-verse);font-size:var(--mt-size,24px);line-height:calc(var(--mt-size,24px) * 1.75)}
.txt-sample .mt-roman{margin-top:0}
.sheet.snd:has(.txt-sample,.cnt)>.sheet-foot:last-child{margin-top:auto}

/* ---- the path sheet: today's sitting as its parts ---- */
.mt-parts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.mt-parts li{display:flex;gap:var(--sp-3);align-items:baseline;padding:var(--sp-3) 0;border-bottom:1px solid var(--hair)}
.mt-parts li:last-child{border-bottom:0}
.mt-parts .min{flex:none;min-width:3.4em;font-variant-numeric:tabular-nums;color:var(--muted)}
.mt-parts .what{flex:1;min-width:0;font-weight:500}

@media (prefers-reduced-motion:reduce){.mt-tap{transition:none}.mt-tap:active:not(:disabled){transform:none}}

/* the standalone reader's Roman letters and size (library: js/reader.js readerHtml, index.html readerRender) */
.rd-opts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2)}
/* the reader's own sizes (22/38, 20/36 under 375px, 24/40, 26/44) times the chosen step: M is exactly as it was */
.rd-sized .rd-text.deva .rd-t{--rd-fs:22px;--rd-lh:38px;--rd-k:1;font-size:calc(var(--rd-fs) * var(--rd-k));line-height:calc(var(--rd-lh) * var(--rd-k))}
@media (max-width:374px){.rd-sized .rd-text.deva .rd-t{--rd-fs:20px;--rd-lh:36px}}
@media (min-width:600px){.rd-sized .rd-text.deva .rd-t{--rd-fs:24px;--rd-lh:40px}}
@media (min-width:1024px){.rd-sized .rd-text.deva .rd-t{--rd-fs:26px;--rd-lh:44px}}
.rd-sized.sz-s .rd-text.deva .rd-t{--rd-k:.9}.rd-sized.sz-l .rd-text.deva .rd-t{--rd-k:1.1}.rd-sized.sz-xl .rd-text.deva .rd-t{--rd-k:1.25}
.rd-opts{column-gap:var(--sp-4);row-gap:var(--sp-2)}
.rd-opts .rd-grp{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2)}
@media (max-width:400px){.rd-opts .rd-grp{display:grid;grid-template-columns:1fr 1fr;width:100%}.rd-opts .rd-grp>.small{grid-column:1/-1}} /* a phone: Size is two by two, like the Text sheet */
.rd-half{display:inline-block;max-width:100%;padding-left:var(--sp-4);text-indent:calc(-1 * var(--sp-4));text-wrap:balance} /* each half wraps in even rows, never a last row of one word */
/* a half and its Roman under it are one unit: a phone wraps per unit, so the rows of the one match the rows of the other */
.rd-unit{display:inline-block;max-width:100%;vertical-align:top;text-indent:0}
.rd-unit .rd-half{display:block;max-width:100%}
.rd-l,.mt-roman .rd-l{text-wrap:balance}
.rd-nb{white-space:nowrap}

.rd-sized .mt-roman{font-size:max(var(--fs-sm), calc(var(--rd-fs) * var(--rd-k) * .75));line-height:1.55}
.rd-sized .rd-l{text-wrap:balance}

/* ---- a visualization: one step, one plain sentence, the clock quiet under it, the short stop line in view (js/visual.js) ---- */
/* data-view=steps: the step's name is the heading, "Step 3 of 8" under it, the sentence in the display face; no medal, no "Next:", no glow
   and nothing that moves; the stop line is where Back-and-Pause sit within reach, in the same place ready and running */
#sheet-in.tm[data-view=steps] .ps-timer-art,
#sheet-in.tm[data-view=steps] #dh-next{display:none}
#sheet-in.tm[data-view=steps] #dh-text{max-width:19em;margin-top:var(--sp-5);font-family:var(--font-display);font-size:var(--fs-card);line-height:36px;min-height:calc(4 * 36px);text-wrap:balance;color:var(--ink)}
#sheet-in.tm[data-view=steps] #dh-clock{margin-top:var(--sp-5);font-size:var(--fs-2xl);line-height:40px;color:var(--muted)}
#sheet-in.tm[data-view=steps] .tm-mid{justify-content:center}
#sheet-in.tm[data-view=steps] .mt-links{margin-top:var(--sp-3)}
.mt-links #mt-stop{max-width:26em;text-wrap:balance;color:var(--muted);font-size:var(--fs-sm);line-height:20px}
#sheet-in.tm[data-view=steps] #sheet-h{font-size:var(--fs-xl);line-height:30px}
@media (max-height:700px){#sheet-in.tm[data-view=steps] #dh-text{margin-top:var(--sp-3);font-size:var(--fs-xl);line-height:30px;min-height:calc(4 * 30px)}#sheet-in.tm[data-view=steps] #dh-clock{margin-top:var(--sp-3);font-size:var(--fs-2xl);line-height:34px}}

/* the day sheet's steps, the stop line and the card's tradition tag and source */
.vs-steps li{padding:var(--sp-2) 0}
.vs-steps .min{min-width:6.6em}
.vs-steps .what{font-weight:400}
.vs-stop{display:flex;flex-direction:column;gap:var(--sp-2);padding:var(--sp-3) var(--sp-4);border:1px solid var(--edge);border-radius:var(--r-xl);background:var(--surface)}
.vs-stop p{margin:0;text-wrap:pretty}
.pa-tagrow{margin:0}
.pa-tag{display:inline-flex;align-items:center;min-height:var(--sp-6);padding:0 var(--sp-3);border:1px solid var(--edge);border-radius:var(--r-pill);font-size:var(--fs-sm);line-height:20px;color:var(--ink-mid);background:var(--surface)}
.pa-source{margin:0;text-wrap:pretty}
