/* सूर्य मॉकअप: साझा शैली। एक संकरा फ़ोन-जैसा स्तंभ; चार काल, चार रंग; टाइलें इन्हीं वर्गों से बनती हैं। */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --ink: #1d2140; --muted: #5b6080; --line: #dfe2ee;
  --sun: #d97a00; --sun-soft: #ffe9c2; --on-sun: #ffffff;
  --shashvat: #b8860b; --bhoot: #9a4b2f; --vartaman: #2f7a52; --bhavishya: #3d4fa8;
  --ok: #2f7a52; --wait: #a0620a;
  --display: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  --text: "Mukta", "Noto Sans Devanagari", system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12142a; --surface: #1c1f3b; --ink: #eef0fb; --muted: #a6abc9; --line: #30345a;
  --sun: #ffab3d; --sun-soft: #3a2c12; --on-sun: #1d1400;
  --shashvat: #e2b84a; --bhoot: #e08a6a; --vartaman: #6cc497; --bhavishya: #93a2f2;
  --ok: #6cc497; --wait: #f0b455; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #12142a; --surface: #1c1f3b; --ink: #eef0fb; --muted: #a6abc9; --line: #30345a;
  --sun: #ffab3d; --sun-soft: #3a2c12; --on-sun: #1d1400;
  --shashvat: #e2b84a; --bhoot: #e08a6a; --vartaman: #6cc497; --bhavishya: #93a2f2;
  --ok: #6cc497; --wait: #f0b455; color-scheme: dark }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.55; }
#app { max-width: 480px; margin: 0 auto; padding-block: 12px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1, h2, p { margin: 0; }
.h1, .brand { font-family: var(--display); font-weight: 400; text-wrap: balance; }
.h1 { font-size: 1.6rem; line-height: 1.25; }
.brand { font-size: 3rem; line-height: 1.1; }
.h2 { font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.lede { color: var(--muted); }
.fine { font-size: .84rem; color: var(--muted); }
.center { text-align: center; }
small { display: block; font-size: .84rem; color: var(--muted); }

/* पंक्ति के रंग */
.r-shashvat { --row: var(--shashvat); } .r-bhoot { --row: var(--bhoot); } .r-vartaman { --row: var(--vartaman); } .r-bhavishya { --row: var(--bhavishya); }
.w-bal { --w: var(--vartaman); } .w-kishor { --w: var(--bhavishya); } .w-tarun { --w: var(--bhoot); } .w-vayask { --w: var(--shashvat); }

/* प्रवेश */
.login, .who { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; }
.sun-mark { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--sun) 0 42%, transparent 43%), repeating-conic-gradient(var(--sun) 0 8deg, transparent 8deg 30deg); }
.who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.who-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--w); border-radius: var(--r); padding: 12px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); color: var(--ink); font-family: var(--display); font-size: 1.2rem; flex: none; }
.pill { font-size: .76rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--w, var(--line)); color: var(--w, var(--muted)); white-space: nowrap; }
.tag { font-size: .76rem; color: var(--muted); }

/* ऊपर की पट्टी */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bar-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-t { min-width: 0; } .bar-t strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; display: block; line-height: 1.2; }
.sun-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.4rem; line-height: 1; flex: none; }
.chip { border: 1px solid var(--w); color: var(--ink); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: .84rem; white-space: nowrap; }
.link { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; align-self: flex-start; }

/* घर का पन्ना */
.hello { display: flex; gap: 14px; align-items: center; }
.hello > div:last-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.petals { width: 104px; height: 104px; flex: none; }
.petal { fill: var(--line); } .petal.lit { fill: var(--row); } .core { fill: var(--sun); }
.petal.r-shashvat { --row: var(--shashvat); } .petal.r-bhoot { --row: var(--bhoot); } .petal.r-vartaman { --row: var(--vartaman); } .petal.r-bhavishya { --row: var(--bhavishya); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-wrap { display: flex; flex-direction: column; gap: 8px; }
.grid-head, .grid-row { display: grid; grid-template-columns: 56px repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-head span { text-align: center; } .grid-head strong { font-size: .9rem; }
.grid-head small, .row-name small { font-size: .7rem; line-height: 1.2; }
.row-name { display: flex; flex-direction: column; justify-content: center; color: var(--row); } .row-name strong { font-size: .84rem; }
.tile { min-width: 0; min-height: 96px; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-bottom: 4px solid var(--row); border-radius: var(--r); padding: 10px 8px; }
.tile strong { font-family: var(--display); font-weight: 400; font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; }
.tile small { font-size: .7rem; line-height: 1.25; }
.tile.lit { background: color-mix(in srgb, var(--row) 14%, var(--surface)); }
.tile.soon { border-style: dashed; border-bottom-style: solid; } .tile em { font-style: normal; font-size: .68rem; color: var(--muted); margin-top: auto; }

/* टाइल के अंदर */
.tile-head { border-left: 4px solid var(--row); padding-left: 12px; }
.ask { font-family: var(--display); font-size: 1.3rem; line-height: 1.3; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tab { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 6px 4px; text-align: center; }
.tab.on { background: var(--ink); border-color: var(--ink); color: var(--bg); } .tab.on small { color: inherit; opacity: .8; }
.tab strong { display: block; font-size: .95rem; } .tab small { font-size: .7rem; }
.body { display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* टाइलों के लिए साझा टुकड़े */
.card { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.card.flat { cursor: default; }
.card-t { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; } .card-t strong { min-width: 0; overflow-wrap: anywhere; }
.card.locked { opacity: .55; }
.row-btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--row, var(--line)); border-radius: var(--r); padding: 12px; }
.row-btn > span:first-child { min-width: 0; } .chev { color: var(--muted); font-size: 1.3rem; }
.btn { background: var(--sun); color: var(--on-sun); border: 1px solid var(--sun); border-radius: 999px; padding: 10px 18px; font-weight: 600; align-self: flex-start; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--line); font-weight: 500; }
.note { background: var(--sun-soft); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.note.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 16px; color: var(--muted); text-align: center; }
.state { font-size: .8rem; font-weight: 600; } .s-ok, .s-mine { color: var(--ok); } .s-wait { color: var(--wait); }
.meter { width: 100%; height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; } .meter span { display: block; height: 100%; background: var(--sun); }
.dots { display: flex; gap: 3px; flex: none; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--row, var(--sun)); }
.guru-card { display: flex; gap: 12px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; } .facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.facts dt { font-size: .76rem; color: var(--muted); } .facts dd { margin: 0; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; max-width: 92%; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--sun-soft); border-color: transparent; } .msg strong { font-size: .8rem; color: var(--muted); }
.say { display: flex; gap: 8px; } .say input { flex: 1; min-width: 0; }
input[type="text"], textarea, select { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.form { display: flex; flex-direction: column; gap: 8px; } .form label, .inline { font-size: .86rem; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 12px; margin: 0; } legend { font-size: .82rem; color: var(--muted); padding: 0 4px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--ink) !important; font-size: .95rem !important; }
.prose { display: flex; flex-direction: column; gap: 10px; max-width: 65ch; } .prose .shlok { font-family: var(--display); font-size: 1.15rem; border-left: 4px solid var(--sun); padding-left: 12px; }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .9rem; max-width: calc(100% - 32px); text-align: center; z-index: 20; }
