/* Ram Naam Sadhana - Jaap screen (#/jaap, #/jaap/history). Colours come from the tokens in app.css. */
.jp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.jp-h1 { margin: 4px 2px; min-width: 0; }
.jp-headchip { flex: none; min-height: 40px; font-weight: 650; }

/* sankalp strip */
.jp-sk-strip { display: flex; align-items: center; gap: 10px; background: var(--soft2); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 12px; margin: 4px 0 10px; font-size: .95em; line-height: 1.35; }
.jp-sk-strip.ask { background: var(--amberbg); border-color: transparent; }
.jp-sk-strip.ask.skipped { background: var(--soft2); border-color: var(--line); }
.jp-sk-strip .btn { flex: none; min-height: 44px; }
.jp-sk-ic { font-size: 1.3em; flex: none; }

/* style + mode */
.jp-segs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jp-segs .seg { padding: 3px; gap: 3px; }
.jp-segs .seg button { font-size: .95em; padding: 8px 2px; min-height: 46px; white-space: normal; line-height: 1.15; overflow-wrap: anywhere; }
.jp-segs > * { min-width: 0; }

/* the big circle: the ring is today's progress, the inside is the tap target */
.jp-dial-wrap { display: grid; place-items: center; margin: 14px 0 8px; }
/* as big as the phone allows, but small enough on a short screen to stay above the tabs */
.jp-dial { --p: 0; --d: max(210px, min(78vw, 300px, calc(100vh - 370px))); width: var(--d); height: var(--d); border-radius: 50%; border: 0; padding: 12px; cursor: pointer; color: inherit; font: inherit;
  background: conic-gradient(var(--saffron) calc(var(--p) * 1%), var(--soft) 0); box-shadow: var(--shadow);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.jp-dial.done { background: var(--gold); }
.jp-dial:focus-visible { outline: 3px solid var(--saffron2); outline-offset: 4px; }
.jp-dial-in { width: 100%; height: 100%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 32%, var(--card), var(--soft2) 70%, var(--soft)); color: var(--maroon); line-height: 1.1; transition: transform .08s; }
.jp-dial.tap:active .jp-dial-in, .jp-dial.pop .jp-dial-in { animation: jp-pop .16s ease-out; }
@keyframes jp-pop { 40% { transform: scale(.96); } }
.jp-ram { font-size: 1.5em; font-weight: 800; letter-spacing: .02em; }
.jp-num { font-size: clamp(2.3em, 13vw, 3.3em); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.jp-of { font-size: .86em; color: var(--muted); font-weight: 600; }
.jp-mala { margin-top: 6px; font-size: .8em; font-weight: 650; background: var(--soft); color: var(--maroon); border-radius: 999px; padding: 3px 10px; }
.jp-dial.voice { cursor: default; }
.jp-dial.voice.listening { animation: jp-breathe 2.4s ease-in-out infinite; }
@keyframes jp-breathe { 50% { box-shadow: 0 0 0 10px var(--soft), var(--shadow); } }

.jp-hint { margin: 2px 0 8px; }
.jp-ctl .btn { width: 100%; }
.jp-big { min-height: 58px; font-size: 1.08em; }

/* voice */
.jp-listen { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 650; margin: 6px 0 4px; min-height: 30px; text-align: center; }
.jp-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--line); flex: none; transition: background .1s, box-shadow .1s; }
.jp-listen.live .jp-dot { background: #E9A66B; }
.jp-dot.on, .jp-listen.live .jp-dot.on { background: var(--good); box-shadow: 0 0 0 5px var(--goodbg); }
.jp-meter { height: 14px; margin: 6px 0 12px; }
.jp-meter > i { transition: width .1s linear; }
.jp-learn { margin-top: 4px; }
.jp-learn h2 { font-size: 1.05em; }
.jp-relearn { margin-top: 10px; }

/* stats */
.jp-bar-main { margin: 8px 0 10px; height: 12px; }
.jp-kv { margin-bottom: 4px; }
.jp-kv .kv small, .jp-hsum .kv small { display: block; font-size: .72em; color: var(--muted); font-weight: 600; line-height: 1.3; }
.jp-tg { margin-top: 10px; gap: 8px; }

/* manual add */
.jp-man .chips { margin: 8px 0; }
.jp-man-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; font-weight: 600; }
.jp-man-row input { flex: 1 1 110px; width: auto; min-width: 100px; max-width: 180px; font-size: 1.1em; text-align: center; }

/* sheets */
.jp-sklist { margin-top: 4px; }
.jp-sk { flex-direction: column; align-items: flex-start; text-align: left; margin-top: 8px; gap: 2px; line-height: 1.3; }
.jp-sk.on { border-color: var(--saffron); background: var(--soft); }
.jp-sk-last { background: var(--amberbg); }
.jp-presets .btn { justify-content: space-between; margin-top: 8px; gap: 12px; text-align: left; }
.jp-presets .btn b { font-size: 1.1em; }
.jp-done h2 { margin-top: 4px; }
.jp-done-n { font-size: 1.1em; font-weight: 650; }
.jp-done-sk { background: var(--soft2); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.jp-bless { margin-top: 12px; }
.jp-cal-big { font-size: 1.2em; font-weight: 750; text-align: center; margin: 10px 0 2px; color: var(--saffron2); }
.jp-cal-ok { font-size: 3em; text-align: center; color: var(--good); line-height: 1.2; }
.jp-steps li { margin: 8px 0; }

/* history: 30 columns, a dashed target line (its bottom in jaap.js assumes the 18px padding-top) */
.jp-hsum .kv span { font-size: 1.15em; }
.jp-chart { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 170px; padding-top: 18px; border-bottom: 2px solid var(--line); }
.jp-col { flex: 1 1 0; min-width: 0; height: 100%; border: 0; padding: 0; margin: 0; background: none; display: flex; align-items: flex-end; cursor: pointer; border-radius: 4px 4px 0 0; }
.jp-col::before { content: none; }
.jp-col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--soft); }
.jp-col.has i { background: #E9A66B; }
.jp-col.hit i { background: linear-gradient(180deg, var(--gold), var(--saffron)); }
.jp-col.today i { box-shadow: 0 0 0 2px var(--maroon); }
.jp-col:focus-visible { outline: 2px solid var(--saffron2); }
.jp-tline { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--gold); pointer-events: none; z-index: 1; }
.jp-tline span { position: absolute; right: 0; bottom: 2px; font-size: .68em; color: var(--muted); background: var(--card); padding: 0 4px; border-radius: 6px; font-weight: 650; }
.jp-clabels { display: flex; gap: 2px; margin-top: 3px; }
.jp-clabels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: .66em; color: var(--muted); overflow: visible; white-space: nowrap; }
.jp-days li { min-height: 56px; }

@media (max-width: 340px) {
  .jp-segs { grid-template-columns: 1fr; }
  .jp-dial { --d: 80vw; }
}
@media (prefers-reduced-motion: reduce) {
  .jp-dial.pop .jp-dial-in, .jp-dial.tap:active .jp-dial-in, .jp-dial.voice.listening { animation: none; }
}
