/* Prototype E, "Calm edition": Calm's layout; its blue gradient becomes the logo's crimson running to near-black. */
:root {
  --top: #7A1A1E; --mid: #4A0E15; --low: #1C070B; --ink: #FFFFFF; --muted: rgba(255, 255, 255, .72);
  --glass: rgba(255, 255, 255, .1); --glass-2: rgba(255, 255, 255, .16); --line: rgba(255, 255, 255, .16);
  --red: #F9393B; --font: Figtree, Inter, system-ui, -apple-system, sans-serif; --mini: 0px; color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--low); }
body { font: 400 17px/1.5 var(--font); color: var(--ink); min-height: 100dvh; -webkit-font-smoothing: antialiased; background: linear-gradient(180deg, var(--top) 0%, var(--mid) 45%, var(--low) 100%) fixed; }
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 #fff; outline-offset: 2px; border-radius: 12px; }
#view { max-width: 640px; margin: 0 auto; padding-bottom: calc(110px + var(--mini) + env(safe-area-inset-bottom)); outline: none; }
.page { padding: max(16px, env(safe-area-inset-top)) 16px 0; }
.center { text-align: center; }
.left { text-align: left; }

/* scenic top, as on Calm's home */
.scene { position: relative; min-height: 560px; display: flex; flex-direction: column; }
.scene > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, transparent 25%, rgba(74, 14, 21, .25) 55%, var(--top) 100%); }
.sc-bar, .sc-mid { position: relative; z-index: 1; }
.sc-bar { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
.logo { height: 30px; width: auto; filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .35)); }
.rb { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(30, 6, 10, .45); backdrop-filter: blur(10px); border: 1px solid var(--line); flex: none; }
.rb.solid { background: #fff; color: var(--mid); }
.rb[aria-pressed="true"] { background: #fff; color: var(--mid); }
.rb .ic { width: 20px; height: 20px; }
.back { margin-bottom: 8px; }
.sc-mid { margin-top: auto; padding: 0 16px 18px; text-align: center; }
.ring { --f: 0; width: 120px; height: 120px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#FFD9A0 calc(var(--f) * 360deg), rgba(255, 255, 255, .22) 0); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .6); }
.ring > div { width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #8E2428, #3A0B12); display: grid; place-content: center; }
.ring b { font-size: 40px; line-height: 1; font-weight: 700; }
.ring small { font-size: 13px; color: var(--muted); }
.days { display: flex; justify-content: center; gap: 10px; }
.days span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.days i { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; border: 1.5px solid transparent; }
.days .on i { background: rgba(255, 255, 255, .3); border-color: #fff; }
.days .ic { width: 18px; }
.sc-mid p { color: rgba(255, 255, 255, .9); font-size: 15px; margin-top: 12px; }

.body { padding: 0 16px; }
.promo { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); backdrop-filter: blur(14px); text-align: left; margin-top: 8px; }
.promo > span:nth-child(2) { flex: 1; min-width: 0; }
.promo b { display: block; font-size: 18px; }
.promo small { display: block; color: var(--muted); font-size: 14px; }
.pr-ic { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: rgba(255, 255, 255, .15); flex: none; }
.pr-ic img { width: 100%; height: 100%; }
.hello { font-size: 24px; font-weight: 500; margin: 26px 0 0; }
.h1 { font-size: 32px; font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 4px 0 6px; }
.h2 { font-size: 22px; font-weight: 500; margin: 30px 0 12px; }
.sub { color: var(--muted); font-size: 16px; }
.sub.small { font-size: 14px; margin-top: 6px; }
.kick { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .02em; }

.shelf { margin-top: 28px; }
.shelf h2 { font-size: 22px; font-weight: 500; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.shelf h2 a { font-size: 15px; font-weight: 500; color: var(--muted); }
.hs { display: flex; gap: 12px; 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; }

/* cards: image on top, text below (no text over a deity's face) */
.wc { width: 290px; }
.wc-img, .sq-img { display: block; position: relative; border-radius: 16px; overflow: hidden; background: var(--glass); }
.wc-img { aspect-ratio: 16 / 10; }
.wc-img.big { aspect-ratio: 16 / 11; }
.wc-img img, .sq-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.chip { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(20, 4, 8, .7); backdrop-filter: blur(6px); }
.chip .ic { width: 12px; height: 12px; }
.chip.live { color: #fff; background: var(--red); }
.wc b, .sq b, .story b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; margin-top: 10px; }
.wc small, .sq small, .story small { color: var(--muted); font-size: 14px; }
.sq { width: 150px; }
.sq-img { aspect-ratio: 1; }
.sq-img.tall { aspect-ratio: 3 / 4; }
.story { width: 170px; }
.daily { display: block; }
.who { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.who > span:nth-child(2) { flex: 1; min-width: 0; }
.who b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.who small { display: block; color: var(--muted); font-size: 14px; }
.av { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--glass); }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.5); transform-origin: center 20%; }
.av.lg { width: 84px; height: 84px; }
.av.xl { width: 150px; height: 150px; margin: 4px auto 14px; display: block; box-shadow: 0 0 0 6px rgba(255, 255, 255, .12); }

.feel { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 0 16px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-size: 19px; text-align: left; }
.feel b { flex: 1; font-weight: 500; }
.em { width: 40px; height: 40px; border-radius: 50%; background: #FFD9A0; color: var(--mid); display: grid; place-items: center; }
.rcs { display: flex; flex-direction: column; gap: 10px; }
.rc { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); }
.rc-img { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; flex: none; background: var(--glass); }
.rc-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pi { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(20, 4, 8, .7); display: grid; place-items: center; }
.pi .ic { width: 12px; height: 12px; }
.rc small { display: block; color: var(--muted); font-size: 13px; }
.rc b { display: block; font-size: 19px; font-weight: 600; line-height: 1.2; }
.rc em { display: block; font-style: normal; color: var(--muted); font-size: 14px; }
.rc.done .num { background: #fff; color: var(--mid); }
.num { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-weight: 700; flex: none; margin: 0 6px; }
.ex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ex a, .tiles a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.tiles a[aria-current] { background: #fff; color: var(--mid); }

/* pills, search */
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 10px; padding: 0 16px; scrollbar-width: none; }
.pills > * { flex: none; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); font-weight: 500; font-size: 15px; }
.pills [aria-current="true"] { background: #fff; color: var(--mid); border-color: #fff; }
.pills .ic { width: 16px; }
.search { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .5); margin: 14px 0 16px; }
.search input { flex: 1; background: none; border: 0; outline: none; color: #fff; font: inherit; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 28px; border-radius: 999px; background: #fff; color: var(--mid); font-weight: 700; font-size: 17px; }
.pill.ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid var(--line); }
.pill.wide { width: 100%; margin-top: 12px; }
.acts { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 16px 0 6px; }
.acts .pill { flex: 1; max-width: 260px; }
.big-play { width: 88px; height: 88px; border-radius: 50%; background: #fff; color: var(--mid); display: grid; place-items: center; margin: 18px auto 6px; box-shadow: 0 0 0 10px rgba(255, 255, 255, .12); }
.big-play .ic { width: 34px; height: 34px; }

/* lists, grids */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; 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: 12px; overflow: hidden; flex: none; background: var(--glass); }
.th img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.rt { flex: 1; min-width: 0; text-align: left; }
.rt b { display: block; font-weight: 600; line-height: 1.25; }
.rt small { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: var(--glass); }
.pt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pt span { position: relative; z-index: 1; padding: 30px 12px 10px; background: linear-gradient(180deg, transparent, rgba(20, 4, 8, .92) 45%); }
.pt b { display: block; font-size: 16px; font-weight: 600; line-height: 1.2; }
.pt small { color: var(--muted); font-size: 13px; }
.deis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 8px; }
.deis a { display: flex; flex-direction: column; align-items: center; text-align: center; }
.deis b { font-weight: 600; margin-top: 6px; }
.deis small { color: var(--muted); font-size: 13px; }
.sky { width: 110px; height: 160px; border-radius: 16px; overflow: hidden; border: 2px solid transparent; }
.sky[aria-pressed="true"] { border-color: #fff; }
.sky img { width: 100%; height: 100%; object-fit: cover; }

/* detail */
.m-art { width: min(100%, 340px); aspect-ratio: 4 / 5; margin: 0 auto 16px; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8); }
.m-art.wide { width: 100%; aspect-ratio: 16 / 11; }
.m-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.words { margin-top: 24px; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.w-h { display: flex; justify-content: space-between; align-items: center; }
.w-h h2 { font-size: 20px; font-weight: 500; }
.tg { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); font-size: 14px; font-weight: 600; }
.tg[aria-pressed="true"] { background: #fff; color: var(--mid); }
.ln { padding: 8px 0; }
.tr { font-size: 20px; font-weight: 600; line-height: 1.4; }
.sa { font-family: "Noto Sans Devanagari", var(--font); color: #FFD9A0; font-size: 19px; }
.me { color: var(--muted); font-size: 16px; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 6px 0; }
.pbar { height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .18); margin: 16px 0 0; overflow: hidden; }
.pbar i { display: block; height: 100%; background: #fff; }
.center .pill { margin-top: 14px; }
.vid { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; margin: 14px 0 4px; }
.read { font-size: 20px; line-height: 1.6; margin: 14px 0; }
.steps { margin-top: 12px; }
.steps div { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps span { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--mid); display: grid; place-items: center; font-weight: 700; flex: none; }
.steps b { display: block; }
.steps p { color: var(--muted); }
.steps p b { color: #fff; }
.r-art { position: relative; width: min(72vw, 280px); aspect-ratio: 4 / 5; margin: 16px auto 16px; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8); }
.r-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.r-t { font-size: 26px; font-weight: 600; line-height: 1.15; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats div { padding: 16px 8px; border-radius: 16px; background: rgba(255, 255, 255, .08); text-align: center; }
.stats b { display: block; font-size: 28px; font-weight: 700; }
.stats small { color: var(--muted); font-size: 13px; }

/* floating glass tab bar */
#tabs { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; max-width: 560px; margin: 0 auto; }
.tb { display: flex; padding: 6px; border-radius: 999px; background: rgba(255, 220, 220, .16); backdrop-filter: blur(24px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.tb a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 56px; border-radius: 999px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.tb a[aria-current] { background: rgba(255, 255, 255, .22); color: #fff; }
#mini { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 19; max-width: 540px; margin: 0 auto; }
#mini:not(:empty) { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 16px; background: rgba(60, 12, 18, .85); backdrop-filter: blur(20px); border: 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 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }

/* Calm-style player */
#player { position: fixed; inset: 0; z-index: 50; background: #12040A; transform: translateY(100%); transition: transform .36s cubic-bezier(.2, .8, .2, 1); overflow: clip; }
#player.open { transform: none; }
.pp-bg { position: absolute; inset: 0; background: center / cover; filter: brightness(.38) saturate(1.1); }
.pp { position: relative; height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
.pp-top { display: flex; justify-content: space-between; align-items: center; }
.pp-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.pp-av { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.pp-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.4); transform-origin: center 20%; }
.pp-mid h2 { font-size: 30px; font-weight: 600; line-height: 1.15; }
.pp-mid > p { color: rgba(255, 255, 255, .85); margin: 12px 0 18px; }
.cred { display: flex; justify-content: center; gap: 40px; }
.cred span { display: flex; flex-direction: column; font-size: 15px; }
.cred small { font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }
.pp-words { overflow-y: auto; max-height: 100%; padding: 6px 2px; mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent); }
.pp-icons { display: flex; justify-content: center; gap: 14px; margin: 10px 0; }
.sl { color: var(--muted); font-size: 14px; }
.pp-c { display: flex; justify-content: center; align-items: center; gap: 40px; margin: 10px 0 6px; }
.pp-c button { width: 52px; height: 52px; display: grid; place-items: center; }
.pp-c .ic { width: 28px; height: 28px; }
.pp-play .ic { width: 44px !important; height: 44px !important; }
#seek { width: 100%; accent-color: #fff; height: 28px; }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* feelings sheet */
#sheet { position: fixed; inset: 0; z-index: 60; background: rgba(10, 2, 5, .6); display: none; align-items: flex-end; }
#sheet.open { display: flex; }
.sh-in { width: 100%; max-width: 640px; margin: 0 auto; background: linear-gradient(180deg, #5A1218, #2A0A10); border-radius: 26px 26px 0 0; padding: 14px 18px calc(28px + env(safe-area-inset-bottom)); }
.sh-in h2 { font-size: 26px; font-weight: 600; margin-top: 8px; }
.sh-in p { color: var(--muted); }
.moods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.moods a { min-height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-weight: 600; font-size: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
