@charset "UTF-8";
:root {
  color-scheme: light;
  --jade: #254b40;
  --jade-deep: #1d3c33;
  --jade-soft: #e6eee8;
  --gold: #b38b4b;
  --gold-soft: #f2e6ce;
  --paper: #faf8f1;
  --surface: #fffefa;
  --ink: #283a33;
  --muted: #77827c;
  --line: #e8e6dc;
  --rose: #c98370;
  --shadow: 0 12px 38px rgba(40, 58, 51, .07);
  font-family: "Noto Sans Myanmar", "Myanmar Text", "Padauk", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(179, 139, 75, .52); outline-offset: 3px; }
.app-shell { width: min(100%, 680px); margin: 0 auto; min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.topbar { height: 76px; padding: 12px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(37, 75, 64, .08); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 17px; letter-spacing: .01em; color: var(--jade-deep); }
.brand-copy .offline-status { font-size: 9px; color: var(--muted); }
.offline-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--gold); }
.offline-status[data-state="ready"] { color: var(--jade); }
.offline-status[data-state="ready"]::before { background: #68a17b; }
.offline-status[data-state="error"] { color: #a05240; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-button { border: 1px solid var(--line); background: var(--surface); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--jade); transition: background .2s, transform .2s; }
.icon-button:active { transform: scale(.94); }
.icon-button svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-button svg path:first-child { stroke: none; }
.sound-button[aria-pressed="false"] { color: #98a19a; background: #f0efe9; }
.sound-button[aria-pressed="false"] .sound-wave { display: none; }
.theme-button { font-size: 19px; line-height: 1; }
.install-button { border: 0; background: var(--jade); color: white; border-radius: 999px; padding: 8px 10px; font-size: 10px; cursor: pointer; }
.install-button[hidden] { display: none; }
.main-content { padding: 25px 20px 20px; }
.view[hidden] { display: none; }
.welcome-line { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: 11px; letter-spacing: .035em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(21px, 5vw, 27px); line-height: 1.48; font-weight: 700; color: var(--jade-deep); }
h2 { margin: 0; font-size: 16px; line-height: 1.5; color: var(--jade-deep); }
.date-pill { display: grid; gap: 1px; white-space: nowrap; background: var(--jade-soft); color: var(--jade); border-radius: 999px; padding: 6px 11px; font-size: 11px; text-align: right; }
.date-pill small { color: var(--muted); font-size: 9px; line-height: 1.2; }
.summary-strip { display: flex; align-items: center; justify-content: center; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 13px 16px; box-shadow: 0 5px 15px rgba(40,58,51,.025); }
.summary-item { display: grid; text-align: center; gap: 2px; min-width: 108px; }
.summary-item span { color: var(--muted); font-size: 11px; }
.summary-item strong { color: var(--jade); font-size: 20px; line-height: 1.4; }
.summary-divider { height: 34px; width: 1px; background: var(--line); }
.counting-card { position: relative; overflow: hidden; margin-top: 17px; padding: 17px 16px 16px; border-radius: 25px; background: radial-gradient(circle at 50% 38%, #f7f3e7 0, #f5f1e6 39%, #f0eee3 100%); text-align: center; }
.counting-card::before, .counting-card::after { content: ""; position: absolute; width: 170px; height: 170px; border: 1px solid rgba(179,139,75,.12); border-radius: 50%; pointer-events: none; }
.counting-card::before { top: 60px; left: -122px; }
.counting-card::after { bottom: -120px; right: -116px; }
.card-kicker { position: relative; z-index: 1; margin: 0 0 1px; color: var(--muted); font-size: 12px; }
.counter-orbit { --progress: 0%; position: relative; display: grid; place-items: center; width: 240px; height: 240px; margin: 0 auto; border-radius: 50%; background: conic-gradient(var(--gold) var(--progress), #e5e2d7 0); filter: drop-shadow(0 6px 10px rgba(64, 77, 61, .06)); transition: background .28s ease; }
.counter-orbit::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #f5f1e6; }
.orbit-inner { position: relative; z-index: 1; display: grid; place-items: center; gap: 7px; }
.progress-caption { color: #77827c; font-size: 12px; }
.count-button { display: grid; place-items: center; align-content: center; width: 170px; height: 170px; border-radius: 50%; border: 1px solid rgba(179,139,75,.34); background: radial-gradient(circle at 35% 26%, #fffefa, #f8f5e9 68%, #f1ead9); box-shadow: inset 0 2px 8px rgba(255,255,255,.85), 0 5px 17px rgba(37,75,64,.09); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, box-shadow .2s ease; }
.count-button:active { transform: scale(.965); box-shadow: inset 0 2px 12px rgba(179,139,75,.17); }
.count-number { color: var(--jade-deep); font-size: 45px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.count-denominator { color: var(--gold); font-size: 14px; }
.count-cta { margin-top: 8px; color: var(--muted); font-size: 12px; }
.bead { position: absolute; z-index: 2; width: 9px; height: 9px; background: var(--gold); border: 2px solid #f5f1e6; border-radius: 50%; box-shadow: 0 1px 4px rgba(40,58,51,.18); }
.bead-one { top: 20px; left: 115px; }.bead-two { right: 8px; top: 117px; background: #76927c; }.bead-three { left: 11px; bottom: 53px; background: var(--rose); }
.count-hint { margin: -1px 0 7px; color: var(--muted); font-size: 11px; }
.session-timing { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 18px; width: min(100%, 330px); margin: 9px auto 10px; padding: 9px 12px; border: 1px solid rgba(37,75,64,.09); border-radius: 14px; background: rgba(255,254,250,.58); }
.session-time { display: grid; gap: 3px; text-align: center; min-width: 0; }
.session-time span { color: var(--muted); font-size: 9px; }
.session-time strong { color: var(--jade); font-size: 13px; font-variant-numeric: tabular-nums; }
.session-time-divider { width: 1px; height: 27px; flex: 0 0 1px; background: var(--line); }
.finish-session-button { position: relative; z-index: 1; min-height: 37px; margin: 0 0 7px; padding: 7px 15px; border: 1px solid rgba(37,75,64,.2); border-radius: 999px; background: var(--jade); color: white; font-size: 11px; cursor: pointer; transition: opacity .2s, background .2s; }
.finish-session-button:disabled { opacity: .5; cursor: not-allowed; }
.finish-session-button:not(:disabled):active { background: var(--jade-deep); }
.undo-button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 13px; border: 1px solid rgba(37,75,64,.14); border-radius: 999px; background: rgba(255,254,250,.72); color: var(--jade); font-size: 12px; cursor: pointer; transition: opacity .2s, background .2s; }
.undo-button:disabled { opacity: .44; cursor: not-allowed; }
.undo-button svg, .backup-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.round-settings { margin-top: 22px; padding: 1px 1px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.selected-size { color: var(--jade); background: var(--jade-soft); border-radius: 999px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.bead-stepper { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; margin-top: 14px; }
.stepper-button { min-height: 48px; border: 1px solid rgba(37,75,64,.2); border-radius: 14px; color: white; background: var(--jade); font-size: 25px; line-height: 1; cursor: pointer; }
.stepper-button:disabled { opacity: .38; cursor: not-allowed; }
.stepper-value { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; color: var(--jade); background: var(--surface); font-size: 22px; }
.round-lock-hint { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.size-chip { min-height: 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--jade); font-size: 14px; cursor: pointer; transition: .18s ease; }
.size-chip[aria-pressed="true"] { border-color: var(--jade); color: white; background: var(--jade); box-shadow: 0 4px 10px rgba(37,75,64,.13); }
.custom-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.custom-form label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.custom-input-wrap { display: flex; gap: 9px; }
.custom-input-wrap input { min-width: 0; flex: 1; min-height: 43px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px; }
.custom-input-wrap input::placeholder { color: #a4aaa4; }
.apply-button { flex: 0 0 auto; border: 0; border-radius: 12px; padding: 8px 15px; background: var(--gold-soft); color: #735c34; font-size: 12px; cursor: pointer; }
.apply-button:active { background: #e9d5b4; }
.weekly-peek { display: flex; align-items: center; gap: 11px; margin: 20px 0 4px; padding: 13px 14px; border: 1px solid rgba(37,75,64,.09); border-radius: 16px; background: var(--surface); }
.sound-settings { margin-top: 18px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sound-settings .eyebrow { margin-bottom: 3px; }
.sound-settings h2 { font-size: 14px; }
.sound-choice-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sound-choice-row select { min-width: 0; flex: 1; min-height: 44px; padding: 8px 30px 8px 11px; border: 1px solid rgba(37,75,64,.18); border-radius: 12px; background: #fffefa; color: var(--jade); font-size: 12px; }
.sound-preview-button { min-height: 44px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(179,139,75,.4); border-radius: 12px; background: var(--gold-soft); color: #735c34; font-size: 11px; cursor: pointer; }
.sound-preview-button:active { background: #e9d5b4; }
.sound-offline-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.install-guide { margin-top: 18px; padding: 15px 14px 14px; border: 1px solid rgba(37,75,64,.13); border-radius: 17px; background: linear-gradient(135deg, #f0faf4, #fffefa); }
.install-guide-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.install-guide-heading h2 { font-size: 14px; }
.install-guide-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(135deg, #55b89a, #1d5d4b); font-size: 20px; }
.install-guide-intro { margin: 8px 0 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.install-steps { display: grid; gap: 7px; margin: 0; padding-left: 20px; color: var(--ink); font-size: 10px; line-height: 1.75; }
.install-steps strong { color: var(--jade-deep); }
.install-guide-button { width: 100%; min-height: 42px; margin-top: 12px; border: 0; border-radius: 11px; color: white; background: linear-gradient(135deg, #2d856a, #1d5d4b); font-size: 11px; cursor: pointer; }
.install-guide-button:active { transform: scale(.985); }
.merit-banner { margin: 0 0 15px; padding: 14px 15px; border: 1px solid rgba(179,139,75,.2); border-radius: 17px; background: linear-gradient(135deg, #fff9eb, #fffefa 60%, #f4ead3); }
.merit-banner h3 { margin: 10px 0 5px; color: var(--gold); font-size: 12px; }
.merit-banner blockquote { margin: 0 0 6px; color: var(--jade-deep); font-size: 13px; font-weight: 700; line-height: 1.75; }
.merit-banner p:not(.eyebrow) { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.8; }
.observance-note { font-size: 20px; font-weight: 700; line-height: 1.65; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.weekly-peek-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); border-radius: 50%; font-size: 18px; }
.weekly-peek > div:nth-child(2) { display: grid; gap: 1px; flex: 1; }
.weekly-peek span { color: var(--muted); font-size: 11px; }
.weekly-peek strong { color: var(--jade); font-size: 14px; }
.text-link { border: 0; background: transparent; color: var(--jade); font-size: 11px; cursor: pointer; white-space: nowrap; }
.text-link span { font-size: 19px; vertical-align: -1px; color: var(--gold); }
.page-heading { margin: 5px 0 20px; }
.page-heading h1 { margin-bottom: 5px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.history-highlight { padding: 15px 16px; border-radius: 17px; background: var(--jade); color: white; }
.history-highlight:empty { display: none; }
.highlight-date { margin: 0 0 9px; color: rgba(255,255,255,.72); font-size: 11px; }
.highlight-values { display: flex; gap: 25px; }
.highlight-stat { display: grid; gap: 2px; }
.highlight-stat span { color: rgba(255,255,255,.7); font-size: 10px; }
.highlight-stat strong { color: white; font-size: 19px; }
.history-sessions { display: grid; gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.2); }
.history-sessions-heading { color: rgba(255,255,255,.75); font-size: 10px; }
.history-session-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.09); }
.history-session-times { display: grid; gap: 3px; color: white; font-size: 10px; }
.history-session-times small { color: rgba(255,255,255,.66); font-size: 9px; }
.history-session-beads { color: #f4d99c; font-size: 10px; white-space: nowrap; }
.history-list-heading { display: flex; justify-content: space-between; align-items: center; margin: 21px 1px 10px; }
.history-list-heading h2 { font-size: 15px; }
.history-list-heading span { color: var(--muted); font-size: 10px; }
.history-list { display: grid; gap: 8px; }
.history-row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border .2s, background .2s; }
.history-row.selected { border-color: rgba(37,75,64,.42); background: #f2f5f0; }
.history-day-marker { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 12px; color: var(--jade); background: var(--jade-soft); font-size: 11px; }
.history-row-copy { min-width: 0; display: grid; gap: 3px; flex: 1; }
.history-row-copy strong { color: var(--jade-deep); font-size: 12px; font-weight: 600; }
.history-row-copy small { color: var(--muted); font-size: 10px; }
.history-row-total { color: var(--jade); font-size: 12px; font-weight: 700; white-space: nowrap; }
.history-arrow { color: #a3a9a2; font-size: 19px; }
.empty-state { margin: 13px 0; padding: 27px 17px; border: 1px dashed #d9d8cd; border-radius: 16px; text-align: center; color: var(--muted); }
.empty-state:not([hidden]) { display: grid; justify-items: center; gap: 7px; }
.empty-lotus { color: var(--gold); font-size: 24px; }
.empty-state strong { color: var(--jade); font-size: 14px; }
.empty-state span:last-child { font-size: 11px; line-height: 1.8; }
.backup-button { width: 100%; min-height: 47px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(37,75,64,.2); border-radius: 13px; color: var(--jade); background: transparent; font-size: 12px; cursor: pointer; }
.backup-button:active { background: var(--jade-soft); }
.total-card { position: relative; overflow: hidden; padding: 21px 20px 19px; border-radius: 21px; color: white; background: linear-gradient(130deg, #254b40, #315e4d); box-shadow: 0 12px 26px rgba(37,75,64,.14); }
.total-label { display: block; color: rgba(255,255,255,.76); font-size: 12px; }
.total-card > strong { display: block; margin: 8px 0 6px; font-size: clamp(34px, 9vw, 48px); line-height: 1.2; font-variant-numeric: tabular-nums; }
.total-foot { color: rgba(255,255,255,.75); font-size: 11px; }
.total-foot b { color: #f4d99c; font-weight: 700; }
.total-flower { position: absolute; right: 15px; top: 0; color: rgba(255,255,255,.11); font-size: 100px; line-height: 1.2; transform: rotate(-15deg); }
.period-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.period-card { display: flex; align-items: center; gap: 10px; padding: 12px 10px; min-height: 72px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.period-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 10px; }
.day-icon { color: #806139; background: var(--gold-soft); }.week-icon { color: var(--jade); background: var(--jade-soft); }
.period-card div { min-width: 0; display: grid; gap: 4px; }
.period-card div span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.period-card strong { color: var(--jade-deep); font-size: 13px; }
.week-chart-card { margin-top: 17px; padding: 16px 14px 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.week-chart-card h2 { font-size: 14px; }
.week-chart { height: 152px; margin-top: 17px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; align-items: end; border-bottom: 1px solid var(--line); }
.chart-day { height: 100%; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 6px; min-width: 0; }
.chart-bar-area { align-self: end; width: 100%; height: 112px; display: flex; align-items: end; justify-content: center; }
.chart-bar { width: min(24px, 70%); min-height: 3px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #caaa70, #a98245); transition: height .25s ease; }
.chart-bar.today { background: linear-gradient(180deg, #59826d, var(--jade)); }
.chart-day-label { padding-bottom: 7px; color: var(--muted); font-size: 9px; }
.chart-day-label.today { color: var(--jade); font-weight: 700; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 680px); display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px 20px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(37,75,64,.1); background: rgba(255,254,250,.96); backdrop-filter: blur(14px); }
.nav-item { display: grid; justify-items: center; gap: 3px; padding: 3px; border: 0; background: transparent; color: #8e9890; font-size: 10px; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--jade); font-weight: 700; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); width: max-content; max-width: calc(100% - 34px); padding: 10px 15px; border-radius: 12px; background: #1f3c34; color: white; text-align: center; font-size: 11px; line-height: 1.6; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 600px) {
  .app-shell { margin: 18px auto; min-height: calc(100vh - 36px); border: 1px solid rgba(37,75,64,.1); border-radius: 25px; overflow: hidden; background: var(--paper); box-shadow: 0 15px 60px rgba(40,58,51,.08); padding-bottom: 91px; }
  .bottom-nav { bottom: 18px; border-radius: 0 0 25px 25px; }
  .topbar { padding-inline: 28px; }
  .main-content { padding-inline: 29px; }
}
@media (max-width: 370px) {
  .main-content { padding-inline: 15px; }
  .topbar { padding-inline: 15px; }
  .counter-orbit { width: 218px; height: 218px; }
  .count-button { width: 155px; height: 155px; }
  .weekly-peek { gap: 8px; padding-inline: 10px; }
  .weekly-peek span, .text-link { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }


/* Calendar and observance notices */
.calendar-info-card { margin: 13px 0 15px; padding: 11px 14px; border: 1px solid rgba(37,75,64,.12); border-radius: 15px; background: linear-gradient(115deg, #fffefa, #f1f4eb); }
.calendar-info-copy { display: grid; gap: 3px; }
.calendar-info-copy strong { color: var(--jade-deep); font-size: 12px; line-height: 1.75; }
.calendar-info-copy span { color: var(--muted); font-size: 10px; }
.observance-note { margin: 8px 0 0; padding: 7px 10px; border-radius: 10px; color: #71562c; background: #f7ecd5; font-size: 11px; line-height: 1.6; }
.observance-note[hidden] { display: none; }
.observance-note.uposatha { color: #fff; background: linear-gradient(100deg, #4a7562, var(--jade)); }
.observance-note.eve { color: #72582f; background: var(--gold-soft); }
.history-calendar-info { margin-top: 12px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.08); }
.history-calendar-info strong { display: block; color: white; font-size: 11px; line-height: 1.7; }
.history-calendar-info span { color: rgba(255,255,255,.7); font-size: 9px; }
.history-observance { margin-top: 6px; color: #ffe3a7; font-size: 10px; }

/* The count target is a tactile-looking bead with one travelling progress bead. */
.counter-orbit { --progress-angle: 0deg; background: #deded2; }
.counter-orbit::before { inset: 8px; background: #f5f1e6; }
.progress-bead-track { position: absolute; z-index: 2; inset: 0; border-radius: 50%; transform: rotate(var(--progress-angle)); transition: transform .28s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.progress-bead { position: absolute; top: 3px; left: 50%; width: 21px; height: 21px; border: 2px solid #fffdf6; border-radius: 50%; background: radial-gradient(circle at 33% 27%, #fff7d9 0 14%, #c79e58 52%, #8d6b37 100%); box-shadow: 0 2px 8px rgba(40,58,51,.32), inset 0 1px 2px rgba(255,255,255,.8); transform: translateX(-50%); }
.count-button { position: relative; overflow: hidden; width: 170px; height: 170px; border: 4px solid #fffdf7; background: radial-gradient(circle at 31% 24%, #fffefa 0 12%, #f7f1df 48%, #ddca9d 100%); box-shadow: inset -7px -9px 15px rgba(121,91,45,.12), inset 2px 3px 7px rgba(255,255,255,.95), 0 8px 22px rgba(37,75,64,.18); transition: transform .12s ease, background .15s ease, box-shadow .18s ease; }
.count-button::before { content: ""; position: absolute; top: 18%; left: 21%; width: 28%; height: 14%; border-radius: 50%; background: rgba(255,255,255,.46); filter: blur(3px); transform: rotate(-30deg); pointer-events: none; }
.count-button:active { transform: scale(.93); background: radial-gradient(circle at 35% 28%, #fff6df 0 12%, #ead7ab 50%, #c5a366 100%); box-shadow: inset -2px -3px 7px rgba(90,67,34,.2), 0 2px 6px rgba(37,75,64,.15); }
.count-button.is-counted { animation: count-bead-pulse .22s ease-out; }
@keyframes count-bead-pulse { 0% { transform: scale(1); } 40% { transform: scale(.92); background-color: #edd59e; } 100% { transform: scale(1); } }

/* Explicit daily-practice versus named-commitment selector. */
.program-choice-settings { display: grid; gap: 9px; margin-top: 16px; padding: 14px; border: 1px solid rgba(37,75,64,.11); border-radius: 16px; background: var(--surface); }
.program-choice-copy .eyebrow { margin-bottom: 2px; }
.program-choice-copy h2 { font-size: 14px; }
.program-choice-settings select, .plan-form-card select, .plan-form-card input { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid rgba(37,75,64,.17); border-radius: 11px; background: #fffefa; color: var(--jade-deep); font: inherit; font-size: 12px; }
.program-choice-settings select:disabled { opacity: .7; }
.program-choice-settings p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

/* Vow/commitment programs */
.plan-form-card { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 20px rgba(40,58,51,.035); }
.plan-form-card > label, .plan-form-row label, .custom-duration-field label { display: block; margin-bottom: 5px; color: var(--jade-deep); font-size: 11px; }
.plan-form-card input::placeholder { color: #a4aaa4; }
.plan-form-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.plan-target-row { margin-top: 2px; }
.plan-form-row > div { min-width: 0; }
.plan-form-card input[type="date"] { min-width: 0; }
.custom-duration-field[hidden] { display: none; }
.plan-date-preview { min-height: 18px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.create-plan-button { min-height: 45px; padding: 9px 14px; border: 0; border-radius: 12px; background: var(--jade); color: white; font-size: 12px; cursor: pointer; transition: transform .16s, background .16s; }
.create-plan-button:active { transform: scale(.98); background: var(--jade-deep); }
.plan-list-section { margin-top: 20px; }
.plan-list, .plan-stats-list { display: grid; gap: 9px; }
.plan-card, .plan-stat-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.plan-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan-card-heading strong, .plan-stat-card strong { color: var(--jade-deep); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.plan-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: var(--jade); background: var(--jade-soft); font-size: 9px; }
.plan-status.ended { color: #7b766b; background: #f0efe9; }
.plan-status.pending { color: #79613a; background: var(--gold-soft); }
.plan-date-range { margin: 6px 0; color: var(--muted); font-size: 10px; }
.plan-target-summary, .plan-card-totals, .plan-stat-card small { color: var(--jade); font-size: 10px; line-height: 1.7; }
.plan-use-button { min-height: 35px; margin-top: 8px; padding: 6px 11px; border: 1px solid rgba(37,75,64,.18); border-radius: 10px; background: var(--jade-soft); color: var(--jade); font-size: 10px; cursor: pointer; }
.plan-use-button:disabled { opacity: .55; cursor: default; }

/* Split totals and history detail */
.history-category-summary { display: grid; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.history-category-row { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.78); font-size: 10px; }
.history-category-row strong { color: #fff; font-size: 10px; font-weight: 600; text-align: right; }
.history-row-copy small { line-height: 1.6; }
.split-summary-card { display: grid; gap: 9px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.split-summary-title { margin: 0; color: var(--muted); font-size: 10px; }
.split-summary-row { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--jade-deep); font-size: 11px; }
.split-summary-row strong { color: var(--jade); font-size: 12px; text-align: right; }
.plan-stats-section { margin-top: 17px; }

/* Rotation button reflects the app preference; CSS continues to reflow when the OS rotates. */
.rotation-button[aria-pressed="false"] { color: #9aa29c; background: #f0efe9; }
.rotation-button[aria-pressed="true"] { color: var(--jade); }

@media (min-width: 760px) and (orientation: portrait) {
  .app-shell { width: min(100%, 920px); }
  .main-content { padding-inline: 30px; }
  #countView:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); align-items: start; column-gap: 22px; }
  #countView > .welcome-line, #countView > .calendar-info-card, #countView > .dhammapada-banner, #countView > .merit-banner, #countView > .achievement-banner, #countView > .summary-strip { grid-column: 1 / -1; }
  #countView > .counting-card { grid-column: 1; grid-row: 4 / span 4; }
  #countView > .round-settings { grid-column: 2; grid-row: 4; margin-top: 10px; }
  #countView > .program-choice-settings { grid-column: 2; grid-row: 5; }
  #countView > .sound-settings { grid-column: 2; grid-row: 6; }
  #countView > .weekly-peek { grid-column: 2; grid-row: 7; margin-top: 12px; }
  .bottom-nav { width: min(100%, 920px); }
  .counting-card { margin-top: 10px; }
}
@media (orientation: landscape) and (max-height: 620px) and (min-width: 500px) {
  .app-shell { width: 100%; min-height: 100svh; margin: 0; padding-bottom: calc(65px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  .topbar { height: 58px; padding: 7px 18px; }
  .brand-mark { width: 37px; height: 37px; }
  .main-content { padding: 10px 18px 14px; }
  #countView:not([hidden]) { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(270px, .9fr); align-items: start; gap: 9px 18px; }
  #countView > .welcome-line, #countView > .calendar-info-card, #countView > .dhammapada-banner, #countView > .merit-banner, #countView > .achievement-banner, #countView > .summary-strip { grid-column: 1 / -1; }
  #countView > .welcome-line { margin-bottom: 0; }
  #countView > .calendar-info-card { margin: 0; padding-block: 7px; }
  #countView > .summary-strip { padding-block: 7px; }
  #countView > .counting-card { grid-column: 1; grid-row: 4 / span 4; margin-top: 0; padding: 9px 12px 11px; }
  #countView > .round-settings { grid-column: 2; grid-row: 4; margin-top: 0; }
  #countView > .program-choice-settings { grid-column: 2; grid-row: 5; margin-top: 0; padding: 10px 12px; }
  #countView > .sound-settings { grid-column: 2; grid-row: 6; margin-top: 0; padding: 10px 12px; }
  #countView > .weekly-peek { grid-column: 2; grid-row: 7; margin: 0; padding-block: 8px; }
  .counter-orbit { width: min(42vh, 218px); height: min(42vh, 218px); }
  .count-button { width: min(30vh, 152px); height: min(30vh, 152px); }
  .count-number { font-size: 37px; }
  .bottom-nav { bottom: 0; width: 100%; grid-template-columns: repeat(4, 1fr); padding-block: 5px calc(5px + env(safe-area-inset-bottom)); border-radius: 0; }
  .toast { bottom: calc(59px + env(safe-area-inset-bottom)); }
}
@media (max-width: 410px) {
  .top-actions { gap: 5px; }
  .rotation-button, .sound-button { width: 36px; height: 36px; }
  .plan-form-row { grid-template-columns: 1fr; }
  .history-category-row { font-size: 9px; }
}

@media (min-width: 760px) and (orientation: landscape) {
  .app-shell { width: min(100%, 1100px); }
  .main-content { padding-inline: 30px; }
  #countView:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: start; column-gap: 24px; }
  #countView > .welcome-line, #countView > .calendar-info-card, #countView > .dhammapada-banner, #countView > .merit-banner, #countView > .achievement-banner, #countView > .summary-strip { grid-column: 1 / -1; }
  #countView > .counting-card { grid-column: 1; grid-row: 4 / span 4; }
  #countView > .round-settings { grid-column: 2; grid-row: 4; margin-top: 10px; }
  #countView > .program-choice-settings { grid-column: 2; grid-row: 5; }
  #countView > .sound-settings { grid-column: 2; grid-row: 6; }
  #countView > .weekly-peek { grid-column: 2; grid-row: 7; }
  .bottom-nav { width: min(100%, 1100px); }
}

.period-split { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.55; }


/* Jade devotional theme, segmented ring and achievement treatment. */
:root { --jade-bright: #55b89a; --jade-glow: #a5f2d4; }
.calendar-info-copy span#englishCalendarDate { color: var(--jade); font-weight: 700; }
.dhammapada-banner { margin: 0 0 15px; padding: 14px 15px; border: 1px solid rgba(37,75,64,.15); border-radius: 17px; background: linear-gradient(135deg, #eff9f3, #fffefa 60%, #e7f3ec); box-shadow: 0 8px 20px rgba(37,75,64,.06); }
.banner-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.banner-heading h2 { font-size: 14px; }
.verse-number { padding: 4px 8px; border-radius: 999px; color: var(--jade); background: #d9f1e5; font-size: 9px; white-space: nowrap; }
.dhammapada-banner blockquote { margin: 10px 0 6px; color: var(--jade-deep); font-family: Georgia, "Noto Sans Myanmar", serif; font-size: 13px; line-height: 1.75; }
.dhammapada-banner p:not(.eyebrow) { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.8; }
.offline-note { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.achievement-banner { margin: 0 0 15px; padding: 18px 16px; border-radius: 20px; text-align: center; color: white; background: radial-gradient(circle at 50% 0, #79d9b5, #1d5d4b 62%, #143b31); box-shadow: 0 12px 25px rgba(25,88,70,.2); animation: achievement-rise .55s ease-out; }
.achievement-banner[hidden] { display: none; }
.achievement-logo { width: 92px; height: 92px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.22)); }
.achievement-banner h2 { color: white; font-size: 16px; }
.achievement-banner p:not(.eyebrow) { margin: 5px 0 10px; color: rgba(255,255,255,.85); font-size: 11px; }
.achievement-banner .eyebrow { color: var(--jade-glow); }
.achievement-banner .text-link { color: white; }
.achievement-list { display: grid; gap: 10px; }
.achievement-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(37,75,64,.14); border-radius: 17px; background: linear-gradient(135deg, #f0faf4, #fffefa); }
.achievement-card-logo { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 4px 10px rgba(37,75,64,.15); }
.achievement-card strong { color: var(--jade-deep); font-size: 13px; }
.achievement-card p { margin: 3px 0; color: var(--jade); font-size: 10px; }
.achievement-card small { color: var(--muted); font-size: 9px; }
@keyframes achievement-rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.counter-orbit { background: conic-gradient(var(--jade-bright) var(--progress-angle), #dce8e1 0); box-shadow: 0 0 0 1px rgba(37,75,64,.08), 0 8px 20px rgba(37,75,64,.08); }
.progress-bead { background: radial-gradient(circle at 32% 25%, #e8fff6 0 12%, var(--jade-bright) 48%, #1f735b 100%); box-shadow: 0 0 14px rgba(85,184,154,.65), 0 2px 8px rgba(40,58,51,.32), inset 0 1px 2px rgba(255,255,255,.85); animation: jade-bead-glow 1.8s ease-in-out infinite; }
.count-button { background: radial-gradient(circle at 31% 24%, #effff8 0 12%, #ccefe0 50%, #73c4a5 100%); border-color: #eafff6; }
.count-button:active { background: radial-gradient(circle at 35% 28%, #f3fff9 0 12%, #a7e5ca 50%, #4da485 100%); }
.size-chip[aria-pressed="true"], .finish-session-button { background: linear-gradient(135deg, #2d856a, #1d5d4b); }
@keyframes jade-bead-glow { 0%, 100% { filter: brightness(.95); } 50% { filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce) { .progress-bead { animation: none; } }

html[data-theme="dark"] { color-scheme: dark; --paper: #101a17; --surface: #17241f; --ink: #e7f1eb; --muted: #a9bbb0; --line: #2b4037; --jade-soft: #1f3d32; --gold-soft: #4a3c24; }
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .topbar, html[data-theme="dark"] .summary-strip, html[data-theme="dark"] .round-settings, html[data-theme="dark"] .program-choice-settings, html[data-theme="dark"] .sound-settings, html[data-theme="dark"] .install-guide, html[data-theme="dark"] .plan-form-card, html[data-theme="dark"] .plan-card, html[data-theme="dark"] .plan-stat-card, html[data-theme="dark"] .history-row, html[data-theme="dark"] .split-summary-card, html[data-theme="dark"] .weekly-peek, html[data-theme="dark"] .achievement-card { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .counting-card { background: radial-gradient(circle at 50% 38%, #1d2c26 0, #17241f 55%, #13201b 100%); }
html[data-theme="dark"] .counter-orbit::before { background: #17241f; }
html[data-theme="dark"] .dhammapada-banner, html[data-theme="dark"] .merit-banner { background: linear-gradient(135deg, #19352b, #17241f); border-color: #315446; }
html[data-theme="dark"] .dhammapada-banner blockquote, html[data-theme="dark"] .merit-banner blockquote, html[data-theme="dark"] .dhammapada-banner p:not(.eyebrow), html[data-theme="dark"] .merit-banner p:not(.eyebrow) { color: var(--ink); }
html[data-theme="dark"] .count-button { background: radial-gradient(circle at 31% 24%, #d8fff0 0 12%, #6fc5a2 50%, #286b55 100%); }
html[data-theme="dark"] .program-choice-settings select, html[data-theme="dark"] .plan-form-card select, html[data-theme="dark"] .plan-form-card input, html[data-theme="dark"] .sound-choice-row select { color: var(--ink); background: #20332b; border-color: #3d5b4d; }
