/* Graha Dristi web app. Tokens copied from lib/core/theme/app_theme.dart ("Traditional"). */
@font-face { font-family: "GD Serif Deva"; src: url(/assets/fonts/NotoSerifDevanagari-Bold.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "GD Serif"; src: url(/assets/fonts/NotoSerif-Bold.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
:root {
  --primary: #7A1F2B; --on-primary: #fff; --primary-c: #F6DCD8; --on-primary-c: #3B0A11;
  --secondary: #944510; --secondary-c: #FCE3C6; --tertiary: #7D5A0F; --tertiary-c: #F5E3B3;
  --surface: #FBF3E4; --on-surface: #2A1A14; --on-variant: #5C4A42;
  --s-lowest: #FFFBF4; --s-low: #F8EEDD; --s: #F4E8D4; --s-high: #FFF9EE; --s-highest: #EDDFC6;
  --outline: #8C7A6B; --outline-v: #DCC8A6;
  --good: #2E6B30; --good-c: #DCEFD9; --bad: #B0281C; --bad-c: #F9DCD7; --caution: #8F5200; --caution-c: #FBE8CC;
  --radius: 18px; --radius-s: 12px;
  --shadow: 0 1px 2px rgba(58, 20, 10, .06), 0 4px 14px rgba(58, 20, 10, .06);
  --serif: "GD Serif", "GD Serif Deva", "Noto Serif", "Noto Serif Devanagari", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Mangal", sans-serif;
  --tabbar-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--surface); color: var(--on-surface); font: 16px/1.55 var(--sans); }
a { color: var(--primary); }
.ic { width: 22px; height: 22px; flex: none; }
h1, h2, h3, .serif { font-family: var(--serif); }
.small { font-size: .82rem; color: var(--on-variant); }
.muted { color: var(--on-variant); }

/* ---------- App bar ---------- */
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; padding: .55rem max(1rem, env(safe-area-inset-left)) .55rem 1rem; background: var(--primary); color: var(--on-primary); box-shadow: 0 2px 10px rgba(58,20,10,.18); }
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; min-width: 0; }
.brand img { border-radius: 9px; background: #fff; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .32rem .7rem; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; text-decoration: none; font-size: .9rem; border: 1px solid rgba(255,255,255,.22); max-width: 52vw; }
.pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .ic { width: 18px; height: 18px; }
.pill:active { background: rgba(255,255,255,.26); }

/* ---------- Layout: bottom tab bar on phones, side rail on wide screens ---------- */
.layout { display: block; }
.content { max-width: 760px; margin: 0 auto; padding: 1rem 1rem calc(var(--tabbar-h) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; min-height: calc(100vh - 52px); min-height: calc(100dvh - 52px); }
.content > * { flex: none; }
.tabbar { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--s-high); border-top: 1px solid var(--outline-v); box-shadow: 0 -4px 16px rgba(58,20,10,.06); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--on-variant); text-decoration: none; font: 500 .72rem/1.2 var(--sans); background: none; border: 0; cursor: pointer; padding: 0; }
.tab .ic { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background .15s; }
.tab.on { color: var(--primary); font-weight: 700; }
.tab.on .ic { background: var(--primary-c); }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 96px 1fr; }
  .tabbar { position: sticky; top: 52px; height: calc(100vh - 52px); flex-direction: column; justify-content: flex-start; gap: .6rem; padding-top: 1rem; border-top: 0; border-right: 1px solid var(--outline-v); box-shadow: none; }
  .tab { flex: none; height: 68px; }
  .content { padding-bottom: 0; }
  .foot { border-radius: 16px 16px 0 0; }
}

/* ---------- Cards & typography ---------- */
.page-title { font-size: 1.5rem; line-height: 1.25; color: var(--primary); margin: .2rem 0 .15rem; }
.page-sub { color: var(--on-variant); margin: 0 0 1rem; font-size: .93rem; }
.card { background: var(--s-lowest); border: 1px solid var(--outline-v); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.card-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-size: 1.08rem; color: var(--primary); }
.card-title .ic { color: var(--secondary); }
.card-title a { color: inherit; text-decoration: none; }
.card-title .more { margin-left: auto; font: 600 .85rem var(--sans); color: var(--secondary); display: flex; align-items: center; }
.card-title .more .ic { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 1.15rem 1.15rem 1rem; margin: 0 0 1rem; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #B4532A 0%, #8E2A2A 45%, #5E1520 100%); box-shadow: 0 8px 26px rgba(94,21,32,.28); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(255,230,190,.25); box-shadow: 0 0 0 22px rgba(255,230,190,.06), 0 0 0 46px rgba(255,230,190,.04); }
.hero .eyebrow { display: flex; align-items: center; gap: .35rem; font-size: .82rem; opacity: .9; }
.hero .eyebrow .ic { width: 16px; height: 16px; }
.hero .big { font-family: var(--serif); font-size: 1.85rem; line-height: 1.2; margin: .35rem 0 .1rem; }
.hero .sub { opacity: .92; font-size: .95rem; }
.hero .facts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.hero .chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); color: #fff; }
.hero p.lead { margin: .8rem 0 0; font-size: .95rem; line-height: 1.55; opacity: .96; }

.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .7rem; border-radius: 999px; font-size: .84rem; background: var(--s); color: var(--on-surface); border: 1px solid var(--outline-v); text-decoration: none; white-space: nowrap; }
.chip .ic { width: 16px; height: 16px; }
.chip.good { background: var(--good-c); color: var(--good); border-color: transparent; font-weight: 600; }
.chip.bad { background: var(--bad-c); color: var(--bad); border-color: transparent; font-weight: 600; }
.chip.caution { background: var(--caution-c); color: var(--caution); border-color: transparent; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.scroller { align-items: flex-start; display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .1rem .1rem .5rem; margin: 0 -.1rem; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }

/* Live "right now" */
.live { display: grid; gap: .6rem; }
.live-row { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border-radius: var(--radius-s); background: var(--s-low); }
.live-row .ic { color: var(--secondary); }
.live-row b { display: block; }
.live-row .end { margin-left: auto; }
.live[hidden] { display: none; }
.arc { width: 100%; max-width: 360px; height: auto; display: block; margin: .2rem auto .1rem; }
.arc-labels { max-width: 360px; margin: 0 auto; }
.arc-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--on-variant); }

/* Element tiles (tithi, nakshatra…) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.el { background: var(--s-lowest); border: 1px solid var(--outline-v); border-radius: var(--radius-s); padding: .7rem .8rem; }
.el .k { font-size: .78rem; color: var(--on-variant); text-transform: uppercase; letter-spacing: .03em; }
html[data-lang="ne"] .el .k, html[data-lang="hi"] .el .k { text-transform: none; letter-spacing: 0; }
.el .v { font-family: var(--serif); font-size: 1.12rem; color: var(--primary); line-height: 1.3; margin: .15rem 0; }
.el .s { font-size: .8rem; color: var(--on-variant); }
.bar { height: 5px; background: var(--s-highest); border-radius: 99px; margin-top: .45rem; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--secondary), #D08A2E); border-radius: 99px; transition: width .4s; }

/* Stat tiles (sunrise…) */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.stat { text-align: center; background: var(--s-low); border-radius: var(--radius-s); padding: .6rem .3rem; }
.stat .ic { color: var(--secondary); }
.stat b { display: block; font-size: 1.02rem; margin-top: .1rem; }
.stat span { font-size: .74rem; color: var(--on-variant); }
@media (max-width: 380px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Key/value */
.kv { margin: 0; display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--outline-v); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--on-variant); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }

/* Time rows (kalams, choghadiya, hora) */
.rows { display: grid; gap: .4rem; }
.trow { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--radius-s); background: var(--s-low); border-left: 4px solid var(--outline-v); }
.trow.good { border-left-color: var(--good); }
.trow.avoid { border-left-color: var(--bad); }
.trow.neutral { border-left-color: var(--caution); }
.trow .name { font-weight: 600; }
.trow .time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--on-variant); font-size: .9rem; text-align: right; }
.trow.now { background: var(--secondary-c); box-shadow: inset 0 0 0 1.5px var(--secondary); }
.trow .now-tag { display: none; font-size: .7rem; font-weight: 700; color: #fff; background: var(--secondary); border-radius: 99px; padding: .05rem .45rem; }
.trow.now .now-tag { display: inline-block; }
.trow.past { opacity: .55; }

/* Segmented control / tabs */
.seg { display: flex; gap: .25rem; padding: .25rem; background: var(--s); border-radius: 999px; margin: 0 0 .8rem; overflow-x: auto; scrollbar-width: none; }
.seg a, .seg button { flex: 1; text-align: center; padding: .42rem .8rem; border-radius: 999px; text-decoration: none; color: var(--on-variant); font: 600 .88rem var(--sans); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg .on { background: var(--s-lowest); color: var(--primary); box-shadow: var(--shadow); }
html.js .tabs .panel { display: none; }
html.js .tabs .panel.on { display: block; }
.tabs .panel + .panel { margin-top: 1rem; }
html.js .tabs .panel + .panel { margin-top: 0; }

/* Date strip */
.datestrip { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem 0 .6rem; scrollbar-width: none; margin-bottom: .4rem; }
.datestrip::-webkit-scrollbar { display: none; }
.dchip { flex: none; width: 54px; text-align: center; padding: .4rem 0; border-radius: 14px; background: var(--s-lowest); border: 1px solid var(--outline-v); text-decoration: none; color: var(--on-surface); }
.dchip span { display: block; font-size: .7rem; color: var(--on-variant); }
.dchip b { display: block; font-size: 1.1rem; }
.dchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.dchip.on span { color: rgba(255,255,255,.85); }
.dchip.today:not(.on) { border-color: var(--secondary); box-shadow: inset 0 0 0 1px var(--secondary); }
.datebar { display: flex; align-items: center; gap: .5rem; }
.datebar .datestrip { flex: 1; }
.datepick { position: relative; flex: none; width: 44px; height: 54px; margin-bottom: .6rem; border-radius: 14px; border: 1px solid var(--outline-v); background: var(--s-lowest); display: grid; place-items: center; color: var(--primary); }
.datepick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* Grids of tiles (home quick links, more sheet) */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.tile { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: .85rem .4rem; border-radius: 16px; background: var(--s-lowest); border: 1px solid var(--outline-v); text-decoration: none; color: var(--on-surface); font-size: .84rem; font-weight: 600; line-height: 1.25; }
.tile .ic { width: 28px; height: 28px; padding: 9px; box-sizing: content-box; border-radius: 14px; background: var(--primary-c); color: var(--primary); }
.tile:nth-child(3n+2) .ic { background: var(--secondary-c); color: var(--secondary); }
.tile:nth-child(3n) .ic { background: var(--tertiary-c); color: var(--tertiary); }

/* Signs */
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .65rem; }
.sign { display: flex; flex-direction: column; gap: .35rem; padding: .8rem; border-radius: 16px; background: var(--s-lowest); border: 1px solid var(--outline-v); text-decoration: none; color: var(--on-surface); }
.sign .top { display: flex; align-items: center; gap: .55rem; }
.glyph { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--primary); background: var(--primary-c); font-size: 1rem; }
.glyph.big { width: 64px; height: 64px; font-size: 1.5rem; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.sign b { font-family: var(--serif); color: var(--primary); }
.sign .head { font-size: .83rem; color: var(--on-variant); line-height: 1.4; }
.sign-mini { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 72px; text-decoration: none; color: var(--on-surface); font-size: .78rem; text-align: center; }
.sign-mini.on .glyph { background: var(--primary); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--caution); }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); }

.para { font-size: 1.02rem; line-height: 1.7; margin: 0; }
.advice { display: grid; gap: .5rem; }
.advice > div { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .75rem; border-radius: var(--radius-s); line-height: 1.5; }
.advice > div .ic { margin-top: 2px; }
.advice .do { background: var(--good-c); }
.advice .do .ic { color: var(--good); }
.advice .dont { background: var(--bad-c); }
.advice .dont .ic { color: var(--bad); }
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.area { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .55rem .7rem; border-radius: var(--radius-s); background: var(--s-low); font-size: .92rem; }

/* Festivals */
.fests { display: grid; gap: .55rem; }
.fest { display: flex; gap: .8rem; align-items: center; padding: .6rem; border-radius: var(--radius-s); background: var(--s-low); text-decoration: none; color: var(--on-surface); }
.dbadge { flex: none; width: 54px; text-align: center; border-radius: 12px; background: var(--s-lowest); border: 1px solid var(--outline-v); padding: .3rem 0; }
.dbadge b { display: block; font-size: 1.25rem; line-height: 1.1; color: var(--primary); font-family: var(--serif); }
.dbadge span { display: block; font-size: .68rem; color: var(--on-variant); }
.fest .t { font-weight: 700; }
.fest .m { font-size: .82rem; color: var(--on-variant); line-height: 1.4; }

/* Month calendar */
.monthbar { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.monthbar h1 { flex: 1; text-align: center; margin: 0; font-size: 1.35rem; color: var(--primary); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--outline-v); background: var(--s-lowest); color: var(--primary); text-decoration: none; cursor: pointer; flex: none; }
.icon-btn.ghost { visibility: hidden; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { text-align: center; font-size: .74rem; font-weight: 700; color: var(--on-variant); padding: .2rem 0; }
.cal .wd.sat { color: var(--bad); }
.cell { position: relative; min-height: 64px; border-radius: 12px; background: var(--s-lowest); border: 1px solid var(--outline-v); padding: .25rem .3rem; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.cell .n { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.cell .s { font-size: .64rem; color: var(--on-variant); line-height: 1.15; }
.cell .f { font-size: .62rem; line-height: 1.15; color: var(--primary); font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cell.sat .n { color: var(--bad); }
.cell.today { background: var(--secondary-c); border-color: var(--secondary); }
.cell.has-fest::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); }
.cell.blank { background: none; border: 0; cursor: default; }
@media (min-width: 600px) { .cell { min-height: 84px; } .cell .s { font-size: .72rem; } .cell .f { font-size: .7rem; } }

/* Bottom sheets */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 85vh; border-radius: 22px 22px 0 0; background: var(--s-lowest); color: var(--on-surface); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
dialog.sheet::backdrop { background: rgba(42,26,20,.45); }
dialog.sheet[open] { animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 22px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem .5rem; font-size: 1.05rem; }
.sheet-head .icon-btn { width: 36px; height: 36px; }
.sheet-list { display: grid; padding: 0 .6rem 1.2rem; }
.row-link { display: flex; align-items: center; gap: .7rem; padding: .8rem .6rem; border-radius: 12px; text-decoration: none; color: var(--on-surface); }
.row-link:hover, .row-link.on { background: var(--s-low); }
.row-link .ic { color: var(--secondary); }
.row-link .end { margin-left: auto; color: var(--primary); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; padding: 0 1rem 1.4rem; }
.sheet-body { padding: 0 1rem 1.3rem; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.1rem; border-radius: 999px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; border: 0; cursor: pointer; font-size: .95rem; }
.btn.tonal { background: var(--primary-c); color: var(--on-primary-c); }
.btn.block { width: 100%; }
.field { display: grid; gap: .25rem; font-size: .85rem; color: var(--on-variant); }
.field input, .field select { font: inherit; font-size: 1rem; color: var(--on-surface); padding: .6rem .7rem; border-radius: 12px; border: 1px solid var(--outline-v); background: var(--s-lowest); }
.form-row { display: grid; grid-template-columns: 1.1fr 1.4fr .9fr; gap: .5rem; margin-bottom: .8rem; }
.result { margin-top: .9rem; padding: .9rem; border-radius: var(--radius-s); background: var(--secondary-c); font-family: var(--serif); font-size: 1.25rem; color: var(--primary); text-align: center; min-height: 3.2rem; }
.result:empty { display: none; }

.foot { margin: auto -1rem 0; padding: 1rem 1rem 1.2rem; border-top: 1px solid var(--outline-v); background: var(--s-low); }
.foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .7rem 0 .3rem; font-size: .88rem; }
.foot-links a { color: var(--on-variant); text-decoration: none; }
.foot-links a:hover { color: var(--primary); text-decoration: underline; }
.foot .small { margin: .2rem 0; }
.foot .appbox { margin-top: 0; }
.foot-spacer { height: 1.5rem; }
.appbox { display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; border-radius: var(--radius); background: var(--tertiary-c); color: #3d2e00; }
.appbox p { margin: 0; font-size: .92rem; }
.appbox .ic { color: var(--tertiary); width: 30px; height: 30px; }
.ad { margin: 0 0 1rem; min-height: 100px; }
.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 12px); background: var(--on-surface); color: #fff; padding: .5rem .9rem; border-radius: 12px; font-size: .85rem; z-index: 30; }
.prose h1 { color: var(--primary); }
.prose h2 { color: var(--primary); font-size: 1.15rem; }

/* Root chooser */
body.bare { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, #8E2A2A 0%, #5E1520 60%, #3B0A11 100%); }
.splash { width: min(440px, 92vw); text-align: center; color: #fff; padding: 2rem 0; }
.splash img { border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.splash h1 { font-size: 1.9rem; margin: .8rem 0 .3rem; }
.splash p { opacity: .88; margin: 0 0 1.5rem; }
.splash .row-link { background: rgba(255,255,255,.1); color: #fff; margin-bottom: .55rem; border: 1px solid rgba(255,255,255,.18); }
.splash .row-link .ic { color: #F5C77E; }
.splash .row-link small { display: block; opacity: .8; font-size: .8rem; }
.q-good { color: var(--good); } .q-avoid { color: var(--bad); } .q-neutral { color: var(--caution); }
.live-row.alert { background: var(--bad-c); }
.live-row .small { display: block; }
.ic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); flex: none; margin: 0 .2rem; }
#sheet-day .fest { background: var(--s-low); }

/* Period day strip (week = one row, month = 7-column grid) */
.dstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dstat { text-align: center; border-radius: 12px; padding: .35rem 0 .45rem; background: var(--s-low); position: relative; }
.dstat span { display: block; font-size: .66rem; color: var(--on-variant); }
.dstat b { display: block; font-size: .98rem; }
.dstat i { display: block; width: 8px; height: 8px; border-radius: 50%; margin: .15rem auto 0; background: var(--caution); }
.dstat.good { background: var(--good-c); } .dstat.good i { background: var(--good); }
.dstat.bad { background: var(--bad-c); } .dstat.bad i { background: var(--bad); }
ul.plain { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; line-height: 1.55; }
/* Planet rows */
.prows { display: grid; gap: .5rem; }
.prow { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius-s); background: var(--s-low); }
.prow .glyph { font-size: .9rem; }
.prow .pmain { flex: 1; min-width: 0; }
.prow .pside { text-align: right; }
.fest .glyph { width: 40px; height: 40px; }

/* ---- Expandable life areas (daily / yearly Rashifal) ---- */
.areas-d { display: grid; gap: .45rem; }
.area-d { border-radius: var(--radius-s); background: var(--s-low); }
.area-d > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .8rem; cursor: pointer; list-style: none; font-weight: 600; }
.area-d > summary::-webkit-details-marker { display: none; }
.area-d > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--on-variant); border-bottom: 2px solid var(--on-variant); transform: rotate(45deg); margin: -4px .2rem 0 .3rem; transition: transform .15s; flex: none; }
.area-d[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.area-d > summary .chip { margin-left: auto; }
.area-d > summary > .ic { display: none; }
.area-d > :not(summary) { padding: 0 .9rem .8rem; }
.area-d ul.plain { padding-left: 1.9rem; }
ul.plain li.pos::marker { color: var(--good); }
ul.plain li.neg::marker { color: var(--bad); }

/* ---- Tables (yearly month grid, Kundali planets) ---- */
.table-wrap { overflow-x: auto; margin: 0 -.2rem; }
.mtab, .ptab { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mtab th, .mtab td, .ptab th, .ptab td { padding: .45rem .4rem; text-align: center; border-bottom: 1px dashed var(--outline-v); white-space: nowrap; }
.mtab tbody th, .ptab tbody th { text-align: left; font-weight: 600; }
.mtab thead th, .ptab thead th { color: var(--on-variant); font-weight: 600; font-size: .8rem; }
.ptab td:first-child, .ptab th:first-child { text-align: left; }
.hcell { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; border-radius: 8px; font-weight: 700; }
.hcell.good { background: var(--good-c); color: var(--good); }
.hcell.bad { background: var(--bad-c); color: var(--bad); }
.ptab tr.now td, .ptab tr.now th { background: var(--secondary-c); }

/* ---- Kundali maker ---- */
.kform { display: grid; gap: .75rem; }
.kform .two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.field textarea { font: inherit; }
.place-box { position: relative; }
.place-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: .25rem 0 0; padding: .3rem; list-style: none; background: var(--s-lowest); border: 1px solid var(--outline-v); border-radius: 12px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.place-list:empty { display: none; }
.place-list li button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; color: var(--on-surface); font-size: .92rem; }
.place-list li button:hover, .place-list li button:focus-visible { background: var(--s); }
.form-msg { margin: 0; padding: .65rem .8rem; border-radius: 12px; font-size: .92rem; }
.form-msg.err { background: var(--bad-c); color: var(--bad); }
.form-msg.ok { background: var(--good-c); color: var(--good); }
.form-msg:empty { display: none; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.chart-wrap { max-width: 420px; margin: 0 auto; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-wrap .ln { stroke: var(--primary); stroke-width: 1.6; fill: none; }
.chart-wrap .bg { fill: var(--s-lowest); stroke: var(--primary); stroke-width: 2.4; }
.chart-wrap .sg { fill: var(--on-variant); font: 600 11px var(--sans); }
.chart-wrap .pl { fill: var(--on-surface); font: 700 13px var(--sans); }
.chart-wrap .pl.asc { fill: var(--primary); }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.fact { padding: .6rem .7rem; border-radius: var(--radius-s); background: var(--s-low); }
.fact span { display: block; font-size: .78rem; color: var(--on-variant); }
.fact b { font-family: var(--serif); font-size: 1.05rem; color: var(--primary); }
.krow { display: flex; align-items: center; gap: .7rem; padding: .7rem .2rem; border-bottom: 1px dashed var(--outline-v); text-decoration: none; color: inherit; }
.krow:last-child { border-bottom: 0; }
.krow .glyph { flex: none; }
.krow .m { font-size: .85rem; color: var(--on-variant); }
.hidden { display: none !important; }

/* ---- Account ---- */
.auth-card { max-width: 440px; margin: 0 auto; }
.btn.outline { background: var(--s-lowest); color: var(--on-surface); border: 1px solid var(--outline-v); }
.btn.outline svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: .6rem; color: var(--on-variant); font-size: .85rem; margin: .2rem 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--outline-v); }
.linkbtn { all: unset; color: var(--primary); cursor: pointer; font-weight: 600; font-size: .9rem; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .9rem; }
.pill-acct { padding: .2rem; }
.sub-h { font: 600 .95rem var(--sans); color: var(--on-variant); margin: 1rem 0 .3rem; }
h1.big { margin: 0; font-weight: 700; }
.h1-pre { display: block; font: 600 .8rem var(--sans); opacity: .85; letter-spacing: .02em; margin-bottom: .1rem; }
.group-h { font: 700 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--on-variant); padding: .9rem .4rem .3rem; }
.fest.past { opacity: .55; }
