/* Prototype D, "Insight edition": Insight Timer's layout, in the logo's colours (red roundel, black, white). */
:root {
  --bg: #F8F6F3; --card: #FFFFFF; --soft: #F0EDE8; --ink: #1A1A1A; --muted: #6E6A64; --line: #E7E3DC;
  --red: #E8322F; --red-soft: #FDECEB; --serif: "Crimson Pro", Georgia, serif; --sans: Inter, system-ui, -apple-system, sans-serif;
  --tabs: 70px; --mini: 0px; color-scheme: light;
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
body { font: 400 17px/1.5 var(--sans); color: var(--ink); background: var(--bg); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
body.has-mini { --mini: 70px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.ic { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 10px; }
#view { max-width: 640px; margin: 0 auto; padding: 0 16px calc(var(--tabs) + var(--mini) + 32px + env(safe-area-inset-bottom)); outline: none; }

/* top banner (Insight's teal course banner, here the logo red) */
.banner { display: flex; align-items: center; gap: 14px; margin: 0 -16px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; background: var(--red); color: #fff; }
.bn-img { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; background: rgba(255, 255, 255, .2); }
.bn-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.banner > span:nth-child(2) { flex: 1; min-width: 0; }
.banner small { font-size: 13px; opacity: .9; }
.banner b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner em { font-style: normal; font-size: 14px; opacity: .9; }
.top { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.logo { height: 24px; width: auto; }
.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-height: 44px; padding: 0 4px; }
.streak .ic { color: var(--red); }

.intent { text-align: center; padding: 10px 0 18px; }
.intent p { color: var(--muted); font-size: 15px; }
.intent input { width: 100%; text-align: center; border: 0; background: none; font: 600 26px/1.3 var(--serif); color: var(--ink); outline: none; padding: 4px 0; }
.intent input::placeholder { color: var(--ink); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick > * { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border-radius: 16px; background: var(--soft); font: 600 19px var(--serif); text-align: left; }
.quick .ic { width: 26px; height: 26px; }
.q1 { color: #3E5C8A; } .q2 { color: var(--red); } .q3 { color: #E8A317; } .q4 { color: #7B5EA7; } .q5 { color: #3E8E5A; } .q6 { color: #C2185B; }

/* shelves and cards */
.shelf { margin-top: 30px; }
.shelf h2, .h2 { font: 600 24px/1.2 var(--serif); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.shelf h2 a { font: 600 15px var(--sans); color: var(--red); }
.shelf h2.sm { font: 500 16px var(--sans); }
.h2 { margin-top: 28px; }
.hs { display: flex; gap: 14px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hs::-webkit-scrollbar { display: none; }
.hs > * { flex: none; scroll-snap-align: start; }
.card { display: block; width: 216px; }
.card.wide { width: 100%; }
.cv { display: block; position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); }
.card.wide .cv { aspect-ratio: 16 / 11; }
.cv img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.cv.xl { aspect-ratio: 1; border-radius: 16px; margin-bottom: 14px; }
.cv.sm { width: 92px; height: 92px; flex: none; aspect-ratio: auto; }
.badge { position: absolute; left: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(20, 20, 20, .72); color: #fff; display: grid; place-items: center; }
.badge .ic { width: 18px; height: 18px; }
.tag { position: absolute; left: 8px; bottom: 8px; background: var(--red); color: #fff; font: 700 11px var(--sans); letter-spacing: .04em; padding: 3px 7px; border-radius: 4px; font-style: normal; }
.meta { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; }
.meta.red, .red { color: var(--red); }
.t { display: block; font: 600 20px/1.2 var(--serif); margin-top: 2px; }
.card.wide .t { font-size: 24px; }
.by { display: block; color: var(--muted); font-size: 14px; }
.today-line { color: var(--muted); font-size: 15px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--red); color: var(--red); font-weight: 500; font-size: 15px; }

.live { display: flex; gap: 14px; align-items: center; margin-top: 26px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.live b { display: block; font: 600 21px var(--serif); }
.live em { display: block; font-style: normal; color: var(--muted); font-size: 14px; }
.live small { font-weight: 600; font-size: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 600; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.big { min-height: 56px; font-size: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.bar { display: flex; justify-content: space-between; align-items: center; padding-top: max(10px, env(safe-area-inset-top)); min-height: 60px; }
.ib { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.ib[aria-pressed="true"] { background: var(--red); color: #fff; }
.pb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); flex: none; }
.pb .ic { width: 18px; height: 18px; }
.pb.dark { background: var(--ink); color: #fff; }

/* lists */
.h1 { font: 600 32px/1.12 var(--serif); margin: 18px 0 6px; }
.h1.c, .note.c { text-align: center; }
.note { color: var(--muted); font-size: 15px; margin: 6px 0; }
.body { color: #3A3733; font-size: 17px; }
.body.big { font: 400 21px/1.55 var(--serif); margin: 14px 0; color: var(--ink); }
.list { display: flex; flex-direction: column; }
.row, .pl-row, .day { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 72px; }
.row-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.th { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; background: var(--soft); }
.th img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.rt { flex: 1; min-width: 0; text-align: left; }
.rt b { display: block; font: 600 19px/1.25 var(--serif); }
.rt small { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row .ic, .day > .ic { color: var(--muted); width: 20px; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); margin: 8px 0 12px; position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 5; }
.search input { flex: 1; border: 0; outline: none; background: none; font: inherit; min-width: 0; color: var(--ink); }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px; scrollbar-width: none; }
.filters a { flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--soft); font-weight: 500; font-size: 15px; }
.filters a[aria-current="true"] { background: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.grid .card { width: auto; }

/* deities (Insight's teachers) */
.teachers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 10px; margin-top: 16px; }
.teachers a { display: flex; flex-direction: column; align-items: center; text-align: center; }
.av { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--soft); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--line); }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.5); transform-origin: center 22%; }
.av.big { width: 148px; height: 148px; margin: 4px auto 0; }
.teachers b { font: 600 18px var(--serif); margin-top: 8px; }
.teachers small { color: var(--muted); font-size: 13px; }
.t-head { text-align: center; margin-bottom: 16px; }
.t-head .btn { margin-top: 10px; }

/* track page */
.track .h1 { margin-top: 2px; }
.lyr-h { display: flex; align-items: baseline; justify-content: space-between; }
.toggle { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--soft); font-weight: 600; font-size: 14px; }
.toggle[aria-pressed="true"] { background: var(--red); color: #fff; }
.lyr .v { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lyr .p + .p { margin-top: 12px; }
.tr { font: 600 21px/1.4 var(--serif); }
.sa { font-family: "Noto Sans Devanagari", var(--sans); font-size: 19px; color: #8E1B1B; }
.me { color: var(--muted); font-size: 16px; margin-top: 2px; }
.prog-bar { height: 6px; border-radius: 9px; background: var(--line); margin-top: 14px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--red); }
.dn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 700; font-size: 15px; flex: none; }
.day.done .dn { background: var(--red); color: #fff; }
.vid { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; margin: 14px 0 4px; }
.steps { padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 700; }
.steps b { font: 600 19px var(--serif); }
.steps span { color: var(--muted); }

/* activity */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line); margin-top: 12px; }
.stats div { padding: 16px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats small { color: var(--muted); font-size: 13px; }
.stats b { display: block; font: 600 24px var(--serif); }
.week { display: flex; justify-content: space-between; margin-top: 18px; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.week i { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.week .on i { background: var(--red); color: #fff; }
.week .ic { width: 18px; }

/* tabs + mini */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; font-size: 12px; font-weight: 500; color: #555; }
#tabs a[aria-current] { color: var(--ink); font-weight: 700; }
#tabs a[aria-current] .ic { color: var(--red); stroke-width: 2.4; }
#mini { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); z-index: 19; }
#mini:not(:empty) { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: #fff; border-top: 1px solid var(--line); }
.mini-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
#mini .th { width: 46px; height: 46px; }
#mini .rt b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line); }
.mb i { display: block; height: 100%; width: 0; background: var(--red); }

/* full player */
#player { position: fixed; inset: 0; z-index: 50; background: var(--bg); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
#player.open { transform: none; }
.pp { max-width: 560px; margin: 0 auto; padding: 0 22px calc(28px + env(safe-area-inset-bottom)); }
.pp .cv.xl { width: min(100%, 360px); margin: 6px auto 16px; }
.pp-words { min-height: 300px; max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
#seek { width: 100%; accent-color: var(--red); height: 28px; margin-top: 10px; }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pp-c { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 14px 0; }
.pp-c button { width: 52px; height: 52px; display: grid; place-items: center; }
.pp-c .ic { width: 28px; height: 28px; }
.pp-play { width: 76px !important; height: 76px !important; border-radius: 50%; background: var(--ink); color: #fff; }
.pp-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pp-row button { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; border-radius: 999px; background: var(--soft); font-weight: 600; font-size: 15px; }

/* timer (dark, like Insight's) */
#timer { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: none; }
#timer.open { display: block; }
.tm-in { max-width: 520px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.tm-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.tm-top b { font: 600 22px var(--serif); }
.ib.light { color: #fff; }
.bowl { text-align: center; margin: 10px 0 18px; }
.bowl img { width: 150px; height: 150px; object-fit: cover; object-position: 20% 80%; border-radius: 50%; margin: 0 auto 10px; transform: scale(1); }
.bowl small { display: block; color: #aaa; font-size: 14px; }
.bowl b { font: 600 20px var(--serif); }
.tm-row { display: flex; justify-content: space-between; align-items: center; min-height: 58px; border-top: 1px solid #2a2a2a; font-size: 17px; text-align: left; }
.tm-row:last-of-type { border-bottom: 1px solid #2a2a2a; }
.tm-row em { font-style: normal; color: #bbb; display: inline-flex; align-items: center; gap: 6px; }
.tm-row .ic { width: 18px; }
.tm-go { width: 84px; height: 84px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; margin: auto auto 8px; }
.tm-go .ic { width: 34px; height: 34px; }
.tm-note { text-align: center; color: #aaa; font-size: 15px; margin-top: 10px; }
.ring { --f: 0; width: min(74vw, 300px); aspect-ratio: 1; border-radius: 50%; margin: auto; display: grid; place-items: center; background: conic-gradient(var(--red) calc(var(--f) * 360deg), #222 0); }
.ring > div { width: calc(100% - 16px); aspect-ratio: 1; border-radius: 50%; background: #000; display: grid; place-content: center; text-align: center; }
.ring b { font: 600 46px var(--serif); font-variant-numeric: tabular-nums; }
.ring small { color: #aaa; }
.ring.done .ic { width: 44px; height: 44px; margin: 0 auto 6px; color: var(--red); }
.tm-ctrls { display: flex; gap: 12px; margin-top: auto; }
.tm-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; }
.tm-end { flex: 1; min-height: 64px; border-radius: 14px; background: #1c1c1c; font-weight: 600; }
.tm-end.light { flex: none; width: 100%; background: #fff; color: #000; margin-top: auto; }
