/* =====================================================================================================================
   Desktop layer: macOS-style sidebar, the animated hero, the dashboard grid, and a calm entrance for every page.
   Everything respects html[data-motion="calm"] (Options, Reduce motion).
   ===================================================================================================================== */

/* ---- sidebar: vibrancy, one-line rows, accent selection, status card ---- */
.wbody { grid-template-columns: 232px 1fr; }
.mac-side { padding: 10px 10px 12px; gap: 1px; background: var(--p-sidebar-material); }
.mac-side .p-sidebar-header { font: 600 11px var(--ui); letter-spacing: .04em; text-transform: none; color: var(--label3); min-height: 24px; margin-top: 14px; padding: 0 10px; display: flex; align-items: center; }
.mac-side .p-sidebar-header:first-child { margin-top: 4px; }
.mac-side .p-sidebar-row { display: flex; align-items: center; gap: 9px; height: 32px; min-height: 32px; padding: 0 9px; border-radius: 7px; color: var(--label); position: relative; }
.mac-side .p-sidebar-row:hover { background: color-mix(in srgb, var(--label) 6%, transparent); }
.mac-side .p-sidebar-row .p-sidebar-icon { width: 20px; height: 20px; display: grid; place-items: center; color: var(--accent); flex: none; }
.mac-side .p-sidebar-row .p-sidebar-icon .ico { width: 17px; height: 17px; }
.mac-side .mac-lbl { display: flex; flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.mac-side .mac-lbl .lbl { font: 500 14px/1.2 var(--deva); white-space: nowrap; }
.mac-side .mac-lbl .sub { display: block; font: 400 11.5px var(--ui); color: var(--label3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-side .p-sidebar-detail { font: 400 10.5px var(--ui); color: var(--label3); opacity: 0; transition: opacity .15s; }
.mac-side .p-sidebar-row:hover .p-sidebar-detail { opacity: 1; }
.mac-side .p-sidebar-row.p-selected { background: var(--accent); color: #fff; box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.mac-side .p-sidebar-row.p-selected .p-sidebar-icon, .mac-side .p-sidebar-row.p-selected .sub, .mac-side .p-sidebar-row.p-selected .p-sidebar-detail { color: #fff; }
.mac-side .p-sidebar-row.p-selected .sub { opacity: .75; } .mac-side .p-sidebar-row.p-selected .p-sidebar-detail { opacity: .8; }
.side-card { margin: 0 2px; padding: 10px 11px; border-radius: 9px; background: color-mix(in srgb, var(--label) 5%, transparent); box-shadow: 0 0 0 .5px var(--mac-hair) inset; }
.side-card div { display: flex; align-items: center; gap: 7px; font: 500 12px var(--ui); } .side-card i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.side-card small { display: block; margin-top: 4px; font: 400 10.5px/1.4 var(--ui); color: var(--label3); }

/* ---- entrance: quick and quiet, not a show - iOS transitions read as instant, never as a performance ---- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.page > *, .dash > *, .tiles > * { animation: rise .22s cubic-bezier(.2, .7, .2, 1) both; }
.page > *:nth-child(2) { animation-delay: .02s; } .page > *:nth-child(3) { animation-delay: .04s; } .page > *:nth-child(4) { animation-delay: .06s; }
.tiles > *:nth-child(1) { animation-delay: .02s; } .tiles > *:nth-child(2) { animation-delay: .04s; } .tiles > *:nth-child(3) { animation-delay: .06s; } .tiles > *:nth-child(4) { animation-delay: .08s; }
.dash-side > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; } .dash-side > *:nth-child(2) { animation-delay: .1s; } .dash-side > *:nth-child(3) { animation-delay: .16s; } .dash-side > *:nth-child(4) { animation-delay: .22s; }
.win.opt-full .page > * { animation: none; }

/* ---- hero: a moving sky ---- */
@keyframes drift { 0% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } 100% { background-position: 0% 40%; } }
@keyframes sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
.hero { min-height: 232px; padding: 26px 32px 24px; border-radius: 16px; margin-bottom: 20px; background: radial-gradient(120% 140% at 85% 20%, rgba(124, 140, 255, .55), transparent 55%), linear-gradient(120deg, #172A58 0%, #1F4FC8 48%, #4338CA 100%); background-size: 160% 160%, 100% 100%; animation: drift 18s ease-in-out infinite, rise .5s both; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 18% 120%, rgba(255, 255, 255, .1), transparent 50%); pointer-events: none; }
.hero::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09), transparent); animation: sheen 9s ease-in-out 1.2s infinite; pointer-events: none; }
.hero-in { position: relative; z-index: 1; }
.hero .yr { color: #FCD9A0; letter-spacing: .04em; }
.hero .big { font-size: 56px; }
.hero .a1, .hero .a2, .hero .a3 { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; } .hero .a1 { animation-delay: .08s; } .hero .a2 { animation-delay: .16s; } .hero .a3 { animation-delay: .26s; }
.hero .glass { animation: pop .5s cubic-bezier(.2, .7, .2, 1) both; min-width: 112px; }
.hero .glass:nth-child(1) { animation-delay: .34s; } .hero .glass:nth-child(2) { animation-delay: .4s; } .hero .glass:nth-child(3) { animation-delay: .46s; } .hero .glass:nth-child(4) { animation-delay: .52s; }
.hero .nav2 { z-index: 2; }
.round.wide { width: auto; padding: 0 16px; border-radius: 22px; font: 600 14px var(--ui); }

/* ---- dashboard grid ---- */
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.sec-cap { font: 650 15px var(--deva); margin: 2px 4px 10px; display: flex; align-items: baseline; gap: 10px; }
.sec-cap small { font: 400 11.5px var(--ui); color: var(--label3); }
.dash-side .sec-cap:not(:first-child) { margin-top: 20px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--surface); border-radius: 12px; padding: 14px 16px 16px; box-shadow: var(--mac-lift); transition: box-shadow .2s, transform .25s var(--spring); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 0 0 .5px var(--mac-hair), 0 10px 26px rgba(15, 23, 42, .1); }
.tile .th { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.tile .th b { font: 600 13px var(--deva); color: var(--tint, var(--label2)); letter-spacing: .01em; }
.tile .tb { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--tint); color: #fff; }
.tile .th .tb { --tint: var(--accent); } .tile .tb .ico { width: 15px; height: 15px; }
.tile .tc .v { font: 700 22px/1.25 var(--deva); display: block; }
.tile .tc .v small { display: block; margin: 2px 0 0; font: 400 13px var(--deva); color: var(--label2); }
.tile .tc .then { display: block; font: 400 13px var(--deva); color: var(--label2); margin-top: 3px; }
.panel-s { background: var(--surface); border-radius: 12px; padding: 12px 16px; box-shadow: var(--mac-lift); }
.panel-s .event { padding: 9px 0; font: 500 14px/1.45 var(--deva); } .panel-s .alert { margin: 2px 0 8px; border-radius: 9px; }
@media (max-width: 1080px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } .hero .big { font-size: 40px; } }
html[data-motion="calm"] .hero, html[data-motion="calm"] .hero::after { animation: none !important; }
@media print { .hero::after { display: none; } }

/* selected sidebar row: white text, quiet shortcut */
.mac-side .mac-row.p-selected, .mac-side .p-sidebar-row.p-selected { background: var(--accent); }
.mac-side .mac-row.p-selected .lbl, .mac-side .p-sidebar-row.p-selected .lbl { color: #fff; }
.mac-side .p-sidebar-row.p-selected .p-sidebar-detail { background: none; color: #fff; padding: 0; border-radius: 0; box-shadow: none; }
.wbody { grid-template-columns: 250px 1fr; }
.mac-side .mac-lbl .sub { font-size: 11px; }

/* ---- every other page: large titles, calm tables, tidy toolbars ---- */
.top h1 { font: 700 26px/1.2 var(--deva); letter-spacing: -.015em; }
.top h1 small { font: 400 12.5px var(--ui); color: var(--label3); }
.tbl-wrap { border-radius: 12px; overflow: auto; }
.tbl-wrap thead th { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface) 86%, var(--p-sidebar-material)); backdrop-filter: blur(12px); font: 600 11.5px var(--deva); color: var(--label2); border-bottom: .5px solid var(--mac-hair); box-shadow: 0 1px 0 var(--mac-hair); }
.tbl-wrap tbody tr { transition: background .12s; }
.tbl-wrap tbody tr:nth-child(even) { background: color-mix(in srgb, var(--label) 2.2%, transparent); }
.tbl-wrap tbody tr:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tbl-wrap tbody tr.today { background: color-mix(in srgb, var(--gold) 14%, transparent); box-shadow: inset 3px 0 0 var(--gold); }
.tabs { gap: 2px; padding: 3px; border-radius: 9px; background: color-mix(in srgb, var(--label) 6%, transparent); display: inline-flex; flex-wrap: wrap; }
.tabs button { border-radius: 6px; padding: 5px 13px; font: 500 13px var(--deva); }
.tabs button.on, .tabs button.active { background: var(--surface); box-shadow: 0 .5px 2px rgba(0, 0, 0, .2), 0 0 0 .5px var(--mac-hair); }
.panel, .fact, .chart { border-radius: 12px; }

/* =====================================================================================================================
   Fonts (all SIL Open Font Licence, bundled in vendor/fonts; nothing is fetched):
   Manrope for the interface, Noto Sans Devanagari for Devanagari labels and tables, Fraunces for English display type,
   Tiro Devanagari Hindi for Devanagari display type. Long reading text keeps Source Serif 4 and Noto Serif Devanagari.
   ===================================================================================================================== */
@font-face { font-family: "Manrope"; src: url("vendor/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: block; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("vendor/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: block; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SansDeva"; src: url("vendor/fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: block; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "SansDeva"; src: url("vendor/fonts/noto-sans-devanagari-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: block; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("vendor/fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: block; }
@font-face { font-family: "Fraunces"; src: url("vendor/fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: block; }
@font-face { font-family: "TiroHindi"; src: url("vendor/fonts/tiro-devanagari-hindi-devanagari-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "TiroHindi"; src: url("vendor/fonts/tiro-devanagari-hindi-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ui: "Manrope", "SansDeva", system-ui, sans-serif;
  --deva: "SansDeva", "Manrope", sans-serif;
  --display: "Fraunces", "TiroHindi", "SansDeva", serif;
  --display-deva: "TiroHindi", "Fraunces", "SansDeva", serif;
}
body { font-family: var(--ui); font-feature-settings: "kern", "liga", "tnum" 0; }
table, .tbl-wrap td, .tile .tc, .glass b, .sb { font-variant-numeric: tabular-nums; }

/* display type */
.hero .big { font: 400 66px/1.05 var(--display-deva); letter-spacing: 0; text-shadow: 0 2px 20px rgba(10, 20, 60, .35); }
.hero .big small { font: 400 24px var(--display-deva); opacity: .9; margin-left: 14px; }
.hero .en { font: italic 400 18px/1.3 var(--display); letter-spacing: .005em; opacity: .92; font-variation-settings: "opsz" 24; }
.hero .yr { font: 600 15px var(--deva); letter-spacing: .08em; text-transform: uppercase; }
.hero .lunar { font: 400 24px/1.3 var(--display-deva); margin-top: 6px; }
.hero .glass span { font: 500 11.5px var(--deva); opacity: .8; } .hero .glass b { font: 700 18px var(--ui); }
.top h1, .set-title { font: 500 30px/1.15 var(--display-deva); letter-spacing: 0; }
.set-title { font-size: 30px; } .set-title small { font: 500 14px var(--deva); }
.top h1 small, .sec-cap small { font-family: var(--ui); }
.sec-cap { font: 500 18px var(--display-deva); }
.tile .tc .v { font: 400 28px/1.2 var(--display-deva); }
.tile .th b { font: 600 12.5px var(--deva); letter-spacing: .03em; }
.card h2, .sec-head h2, .panel h3, .optc h3 { font-family: var(--display-deva); font-weight: 400; }
.optc h3 { font: 600 11px var(--ui); letter-spacing: .08em; }
.oh-t, .wordmark { font-family: var(--display); font-weight: 600; letter-spacing: -.005em; }
.win-title, .mb, .menupop button { font-family: var(--ui); }
.mac-side .mac-lbl .lbl { font: 600 13.5px/1.2 var(--deva); }
th { font-family: var(--deva); }
td b, .row .k, .chip, .seg button, .tabs button, .btn { font-family: var(--deva); }

/* ---- the owner's own fonts, as in the Android app: KN Swami for Devanagari, VAG for Latin letters and the digits 0-9 ---- */
@font-face { font-family: "KNSwami"; src: url("vendor/fonts/knswami-regular.otf") format("opentype"); font-weight: 100 500; font-display: block; unicode-range: U+0900-097F, U+200C-200D, U+25CC; }
@font-face { font-family: "KNSwami"; src: url("vendor/fonts/knswami-bold.otf") format("opentype"); font-weight: 600 900; font-display: block; unicode-range: U+0900-097F, U+200C-200D, U+25CC; }
@font-face { font-family: "VAG"; src: url("vendor/fonts/vag-regular.otf") format("opentype"); font-weight: 100 500; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+2212; }
@font-face { font-family: "VAG"; src: url("vendor/fonts/vag-bold.otf") format("opentype"); font-weight: 600 900; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+2212; }
@font-face { font-family: "VAG"; src: url("vendor/fonts/vag-italic.otf") format("opentype"); font-weight: 100 900; font-style: italic; font-display: block; unicode-range: U+0000-00FF, U+2000-206F; }
/* Options, Appearance, Font: "Reading" (default, Manrope and Noto Sans Devanagari) or "Classic" (VAG and KN Swami) */
html[data-font="classic"] {
  --ui: "VAG", "KNSwami", "Manrope", "SansDeva", system-ui, sans-serif;
  --deva: "KNSwami", "VAG", "SansDeva", sans-serif;
}

/* ---- ease of use: labelled toolbar, place dialog, date dialog, kundali start screen ---- */
.tsel { display: flex; align-items: center; gap: 6px; padding: 0 2px 0 10px; height: 100%; cursor: default; }
.tl { font: 500 11px var(--ui); color: var(--label3); white-space: nowrap; }
.tsel .mac-sel, .tplace #cplacet { font: 600 13px var(--deva); }
.tplace { gap: 6px; }
.mac-sel { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 18px !important; border: 0; outline: none; color: var(--label); }
.sheet:has(.pp) { width: min(720px, 94vw); padding: 18px 20px 20px; }
.sheet:has(.posterdlg) { width: min(460px, 94vw); padding: 16px 18px 18px; }
.pd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .pd-head h3 { margin: 0 auto 0 0; font: 500 22px var(--display-deva); }
.pd-body { display: flex; justify-content: center; background: color-mix(in srgb, var(--label) 4%, transparent); border-radius: 12px; padding: 10px; margin-bottom: 14px; }
.pd-body canvas { width: 100%; max-width: 380px; aspect-ratio: 4 / 5; border-radius: 10px; box-shadow: var(--mac-lift); }
/* the poster's own Customize panel: a title field and show/hide checkboxes, the same "what to show, what to call it"
   control as the Android app's poster Customize tab - tucked under the header, open only when asked for */
.pd-custom { background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 0 0 .5px var(--mac-hair) inset; }
.pc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .pc-row label { font: 600 13px var(--deva); color: var(--label2); flex: none; }
.pc-row .in { flex: 1; }
.pc-show { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.pc-chk { display: flex; align-items: center; gap: 8px; font: 500 13px var(--deva); color: var(--label); cursor: pointer; }
.pc-chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.pp-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; } .pp-head h3 { margin: 0; font: 500 24px var(--display-deva); }
.pp-head .faint { font: 400 11.5px var(--ui); }
.pp-search { position: relative; } .pp-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--label3); }
.pp-search .in { padding-left: 38px; height: 42px; font-size: 15.5px; border-radius: 10px; } .pp-n { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 400 11.5px var(--ui); color: var(--label3); }
.pp .plist { max-height: 42vh; margin-top: 10px; border-radius: 10px; box-shadow: 0 0 0 .5px var(--mac-hair); padding: 4px; }
.pp .plist button { position: relative; min-height: 38px; padding: 8px 12px; border-radius: 7px; font: 500 14.5px var(--deva); gap: 12px; align-items: center; }
.pp .plist button.on { background: var(--accent); color: #fff; } .pp .plist button.on .faint { color: rgba(255, 255, 255, .8); }
.pp .plist .g { position: sticky; top: 0; background: var(--surface); padding: 10px 12px 4px; font: 600 11px var(--ui); letter-spacing: .04em; }
.now { font: 600 10px var(--ui); font-style: normal; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); margin-left: 6px; } .plist button.on .now { background: rgba(255, 255, 255, .25); color: #fff; }
.rm { font-style: normal; width: 22px; height: 22px; line-height: 21px; text-align: center; border-radius: 50%; margin-left: 8px; opacity: .6; } .rm:hover { opacity: 1; background: rgba(0, 0, 0, .15); }
.pp-add { margin-top: 12px; border-top: .5px solid var(--mac-hair); padding-top: 10px; } .pp-add summary { cursor: default; font: 600 13px var(--ui); color: var(--accent); padding: 4px 0; } .pp-add .grid2 { margin-top: 8px; }
.chk { display: flex; align-items: center; gap: 8px; font: 400 13px var(--deva); height: 38px; }
.dp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .dp-h { font: 600 12px var(--ui); color: var(--label3); margin-bottom: 6px; }
.dp-bs { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 6px; } .dp-wd { margin-top: 8px; font: 500 14px var(--display); font-style: italic; color: var(--label2); }
.dp-q { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; } .dp-q .btn { padding: 5px 12px; min-height: 30px; font-size: 12.5px; }
.kstart { display: grid; grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.kstart .kform { grid-template-columns: 1fr 1fr; gap: 14px 16px; } .kstart .kform .field:nth-child(1), .kstart .kform .field:nth-child(4), .kstart .kform .kfull { grid-column: 1 / -1; }
.klib { background: var(--surface); border-radius: 12px; padding: 14px 16px; box-shadow: var(--mac-lift); }
.klib-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; } .klib-h b { font: 500 18px var(--display-deva); }
.klist { margin-top: 8px; max-height: 46vh; overflow-y: auto; }
.klist .saved { display: flex; align-items: center; gap: 4px; border-top: .5px solid var(--mac-hair); padding: 2px 0; }
.kopen { flex: 1; text-align: left; padding: 8px 8px; border-radius: 7px; min-width: 0; } .kopen:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.kopen b { display: block; font: 600 14px var(--deva); } .kopen span { font: 400 11.5px var(--ui); color: var(--label3); }
.klist .btn.ghost { padding: 2px 9px; min-height: 26px; }
@media (max-width: 1020px) { .kstart { grid-template-columns: 1fr; } }

/* ---- Today: the day sheet ---- */
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 6px 4px 14px; }
.dh-bs { font: 500 34px/1.15 var(--display-deva); letter-spacing: 0; } .dh-bs small { font: 400 20px var(--display-deva); color: var(--label3); margin-left: 12px; }
.dh-sub { margin-top: 4px; font: 500 13.5px var(--deva); color: var(--label2); } .dh-sub span { color: var(--label3); margin: 0 4px; }
.dh-r { text-align: right; flex: none; } .dh-clock { font: 600 30px/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .01em; } .dh-note { font: 400 11.5px var(--ui); color: var(--label3); margin-top: 4px; }
.nowbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 14px; margin-bottom: 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--accent) 25%, transparent); font: 500 13px var(--deva); }
.nowbar[hidden] { display: none; } .nb-t { font: 700 11px var(--deva); letter-spacing: .06em; color: #fff; background: var(--accent); padding: 2px 9px; border-radius: 99px; }
.nb-i b { font-weight: 700; } .nb-i em { font-style: normal; color: var(--label3); font-size: 12px; margin-left: 4px; } .nb-i.good b { color: var(--ok); } .nb-i.bad b { color: var(--danger); }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border-radius: 12px; box-shadow: var(--mac-lift); margin-bottom: 14px; }
.kpis > div { padding: 11px 14px; border-left: .5px solid var(--mac-hair); min-width: 0; } .kpis > div:first-child { border-left: 0; }
.kpis span { display: block; font: 500 11px var(--deva); color: var(--label3); } .kpis b { display: block; font: 650 16px/1.35 var(--deva); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; } .dcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dcard { background: var(--surface); border-radius: 16px; padding: 14px 18px 16px; box-shadow: var(--mac-lift); animation: rise .22s cubic-bezier(.2, .7, .2, 1) both; }
.dcard h3 { display: flex; align-items: baseline; gap: 10px; font: 500 17px var(--display-deva); margin: 0 0 8px; padding-bottom: 8px; border-bottom: .5px solid var(--mac-hair); } .dcard h3 small { font: 400 11.5px var(--ui); color: var(--label3); }
.dt { width: 100%; border-collapse: collapse; } .dt th, .dt td { text-align: left; padding: 7px 8px; border-top: .5px solid var(--mac-hair); vertical-align: top; font: 500 14px/1.4 var(--deva); }
.dt thead th { border-top: 0; font: 600 11px var(--deva); color: var(--label3); padding-top: 2px; } .dt tbody tr:first-child th, .dt tbody tr:first-child td { border-top: 0; }
.dt td small { color: var(--label3); font-size: 11.5px; margin-left: 2px; } .dt .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt .gn { font-weight: 650; } .rt { font-style: normal; color: var(--danger); font-size: 12px; margin-left: 4px; }
.pj th { width: 74px; color: var(--accent); font: 600 13px var(--deva); } .pj td .v { font: 650 15.5px var(--deva); display: inline; } .pj td .v small { margin-left: 6px; font: 400 12.5px var(--deva); color: var(--label2); }
.pj td .then { display: block; font: 400 12.5px var(--deva); color: var(--label2); }
.dt tbody tr:hover td, .dt tbody tr:hover th { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.klist2 { display: flex; flex-direction: column; } .kr { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-top: .5px solid var(--mac-hair); border-radius: 0; font: 500 13.5px var(--deva); } .kr:first-child { border-top: 0; }
.kr i { width: 7px; height: 7px; border-radius: 50%; flex: none; } .kr.bad i { background: var(--danger); } .kr.good i { background: var(--ok); }
.kr span { flex: 1; } .kr b { font: 600 13px var(--ui); font-variant-numeric: tabular-nums; color: var(--label2); white-space: nowrap; }
.kr.now { background: color-mix(in srgb, var(--gold) 16%, transparent); box-shadow: inset 3px 0 0 var(--gold); border-radius: 6px; } .kr.now b { color: var(--label); }
.dcard .event { padding: 8px 2px; font: 500 14px/1.45 var(--deva); } .dcard .alert { margin: 2px 0 8px; border-radius: 9px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .acts button { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--label) 4%, transparent); text-align: left; font: 600 13.5px var(--deva); box-shadow: 0 0 0 .5px var(--mac-hair) inset; transition: background .15s, transform .2s var(--spring); }
.acts button:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); } .acts button:active { transform: scale(.97); }
.acts .ic-badge { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.acts .ico { width: 17px; height: 17px; color: var(--accent); } .acts kbd { display: block; font: 400 10.5px var(--ui); color: var(--label3); margin-top: 1px; }
.acts #dposter { grid-column: 1 / -1; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(3, 1fr); } .kpis > div:nth-child(4) { border-left: 0; } }

/* ---- readability: clearer contrast, larger small text, calmer weights ---- */
:root { --label2: #334155; --label3: #5B6B82; }
:root[data-theme="dark"] { --label2: #CBD5E1; --label3: #94A3B8; }
body { font-size: var(--t-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.tl, .dh-note, .kpis span, .dt thead th, .dcard h3 small, .sec-cap small, .mac-side .mac-lbl .sub, .pp-head .faint, .klib-h .faint, .kopen span, .sb { font-size: var(--t-small); }
.sb { color: var(--label2); }
.mac-side .mac-lbl .lbl { font: 600 14.5px/1.25 var(--deva); } .mac-side .p-sidebar-header { font-size: 12px; color: var(--label3); }
.dt th, .dt td { font: 500 15px/1.5 var(--deva); } .pj th { font-size: 14px; } .pj td .v { font-size: 16.5px; } .pj td .then, .pj td .v small { font-size: 13.5px; }
.kr { font-size: 14.5px; } .kr b { font-size: 14px; } .kpis b { font-size: 17px; } .kpis span { font-weight: 600; }
.dh-sub { font-size: 14.5px; } .nowbar { font-size: 14px; }
.tbl-wrap td, .tbl-wrap th { font-size: 14.5px; } .tbl-wrap td small { font-size: 12.5px; color: var(--label2); }
.opt-row .t { font-size: 15px; } .opt-row .d { font-size: 12.5px; }
.pf-photo { width: 64px; height: 64px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--bg, var(--accent-soft)); box-shadow: 0 0 0 .5px var(--mac-hair); color: var(--accent); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; } .pf-photo span { font: 650 20px var(--ui); } .pf-photo .ico { width: 26px; height: 26px; }
.prose { font-size: 16px; line-height: 1.75; color: var(--label); }
.mac-sel, .in { font-size: 14px; }
td, th, .row .k, .chip, .btn, .seg button, .tabs button { font-weight: 500; }
th { font-weight: 650; }
.dcard { min-width: 0; overflow: hidden; } .dt { table-layout: auto; } .pj td { overflow-wrap: anywhere; }
.pj td .v { display: block; } .pj td .v small { display: block; margin: 1px 0 0; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================================================================
   Software navigation: the module ribbon replaces the sidebar. Options becomes a Preferences window with icon tabs.
   ===================================================================================================================== */
.wbody { grid-template-columns: 1fr !important; } .mac-side { display: none !important; }
/* ---- the module nav as an iOS-style grouped segmented control: two floating pill trays, a solid accent-filled capsule
   for the active tab, no tab-strip notch or hairline border - the "premium iOS" look (Control Centre / Settings tabs) ---- */
.ribbon { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-top: .5px solid var(--mac-hair); background: var(--surface); }
.rb-g { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: color-mix(in srgb, var(--label) 5%, transparent); box-shadow: 0 0 0 .5px var(--mac-hair) inset; }
.rb-sep { display: none; }
.rb { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding: 8px 15px; border-radius: 11px; color: var(--label2); transition: background .22s cubic-bezier(.2, .7, .2, 1), color .22s ease, transform .18s var(--spring), box-shadow .22s ease; }
.rb .ico { width: 19px; height: 19px; stroke-width: 1.8; } .rb span { font: 600 13.5px/1.2 var(--deva); white-space: nowrap; }
.rb:hover { background: color-mix(in srgb, var(--label) 7%, transparent); color: var(--label); }
.rb:active { transform: scale(.95); }
/* tinted, not filled: a solid accent fill is this app's language for "do this" (Calculate chart, Match, Save as
   PNG) - using it for "you are here" too would make one colour mean two things (color.md › Best practices:
   "Avoid using the same color to mean different things"). Primary navigation also isn't what a segmented control
   is for (segmented-controls.md › Platform considerations: "Use a tab view ... instead of a segmented control
   ... for view switching" between separate sections) - a tinted selection reads as a location, not a button. */
.rb.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--accent) 20%, transparent) inset; }
.rb.on:hover { background: color-mix(in srgb, var(--accent) 19%, transparent); }
.rb.on::after { display: none; }
.rb-grow { flex: 1; } .rb-find, .rb-ico { align-self: center; }
.rb-find { display: flex; align-items: center; gap: 8px; height: 34px; min-width: 210px; padding: 0 12px; border-radius: 17px; background: color-mix(in srgb, var(--label) 6%, transparent); box-shadow: 0 0 0 .5px var(--mac-hair) inset; color: var(--label3); font: 500 13px var(--ui); transition: background .2s ease, transform .18s var(--spring); }
.rb-find:hover { background: color-mix(in srgb, var(--label) 9%, transparent); } .rb-find:active { transform: scale(.97); } .rb-find .ico { width: 15px; height: 15px; } .rb-find span { flex: 1; text-align: left; } .rb-find kbd { font: 400 11px var(--ui); opacity: .8; }
.rb-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--label2); transition: background .2s ease, color .2s ease, transform .18s var(--spring); }
.rb-ico:hover { background: color-mix(in srgb, var(--label) 8%, transparent); color: var(--label); } .rb-ico:active { transform: scale(.92); } .rb-ico .ico { width: 17px; height: 17px; }
.ctxbar.mac-toolbar.p-window-titlebar-row { height: 42px; padding: 0 12px; background: var(--bg); border-top: .5px solid var(--mac-hair); border-bottom: .5px solid var(--mac-hair); }
.win.opt-full .ribbon { display: none; }
.page { padding: 18px 28px 36px; max-width: 1480px; margin: 0 auto; }

/* Preferences window */
.set { grid-template-columns: 1fr !important; grid-template-rows: auto 1fr; }
.set-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px 0; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, var(--bg)), color-mix(in srgb, var(--surface) 40%, var(--bg))); border-bottom: .5px solid var(--mac-hair); }
.set-top .set-back { align-self: center; margin-bottom: 6px; flex: none; } .set-top .set-find { width: 200px; align-self: center; margin-bottom: 6px; flex: none; }
.set-top .set-list { flex: 1; flex-direction: row; justify-content: center; gap: 2px; flex-wrap: wrap; }
.set-top .set-row { flex-direction: column; width: auto; min-width: 82px; gap: 4px; padding: 8px 10px 7px; border-radius: 8px 8px 0 0; text-align: center; }
.set-top .set-row .set-lbl { align-items: center; } .set-top .set-lbl small { display: none; }
.set-top .set-row .opt-ico { width: 30px; height: 30px; }
.set-top .set-row.on { background: var(--bg); color: var(--accent); box-shadow: 0 -.5px 0 var(--mac-hair), -.5px 0 0 var(--mac-hair), .5px 0 0 var(--mac-hair); }
.set-top .set-row.on .opt-ico { background: var(--tint); }
.set-top .set-row.on::after { content: ""; display: block; }
.set-pane { max-width: 780px; }

/* day timeline */
.dtl { background: var(--surface); border-radius: 14px; padding: 14px 18px 16px; box-shadow: var(--mac-lift); margin-bottom: 14px; }
.dtl-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; } .dtl-h h3 { display: flex; align-items: baseline; gap: 10px; font: 600 17.5px var(--display-deva); margin: 0; letter-spacing: -.005em; } .dtl-h h3 small { font: 400 12.5px var(--ui); color: var(--label3); }
/* the legend reads as small iOS-style tinted pills, not a bare colour-swatch key */
.dtl-key { display: flex; gap: 6px; flex-wrap: wrap; }
.dtl-key span { display: inline-flex; align-items: center; gap: 5px; padding: 3.5px 10px 3.5px 8px; border-radius: 999px; font: 600 11px var(--deva); line-height: 1; }
.dtl-key span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dtl-key .g { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); } .dtl-key .g::before { background: var(--ok); }
.dtl-key .b { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); } .dtl-key .b::before { background: var(--danger); }
.dtl-key .k { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); } .dtl-key .k::before { border-radius: 2px; width: 9px; height: 4px; background: var(--danger); }
.dtl-key .a { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); } .dtl-key .a::before { border-radius: 2px; width: 9px; height: 4px; background: var(--ok); }
/* the sub-legend sits right above the bands it names, not stranded up by the title - each label is next to its own evidence */
.dtl-key.sub { margin: 14px 0 5px; } .dtl-key.sub span { font-size: 10.5px; padding: 3px 9px 3px 7px; }
/* one continuous stadium bar (as iOS draws a segmented timeline, e.g. Health's sleep stages) - hairline dividers between
   segments instead of each one being its own separately-rounded, disconnected pill */
.dtl-bar { position: relative; padding-bottom: 16px; }
.dtl-ch { display: flex; height: 48px; border-radius: 999px; overflow: hidden; box-shadow: 0 0 0 .5px var(--mac-hair); }
.dtl-ch > div { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
.dtl-ch > div:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: color-mix(in srgb, currentColor 16%, transparent); }
.dtl-ch .g { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); } .dtl-ch .b { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.dtl-ch b { font: 650 13.5px var(--deva); white-space: nowrap; letter-spacing: -.005em; }
.dtl-ch small { font: 600 11px var(--ui); opacity: .8; font-variant-numeric: tabular-nums; margin-top: 1px; }
.dtl-bands { position: relative; height: 16px; margin-top: 6px; } .tb { position: absolute; top: 0; height: 5px; border-radius: 999px; } .tb.k { background: var(--danger); top: 0; } .tb.k2 { background: color-mix(in srgb, var(--danger) 70%, var(--gold)); top: 5px; } .tb.k3 { background: color-mix(in srgb, var(--danger) 45%, var(--gold)); top: 10px; } .tb.a { background: var(--ok); top: 5px; height: 6px; }
/* the "now" slug: a scrubber, not a bare line - a small knob rides the top like a playhead, the way iOS marks "you are here" on a timeline */
.dtl-now { position: absolute; top: -2px; bottom: 10px; width: 2px; background: var(--accent); border-radius: 999px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); transition: left 1s linear; }
.dtl-now::before { content: ""; position: absolute; top: -6px; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 0 2.5px var(--surface), 0 1px 5px rgba(0, 0, 0, .28); }
.dtl-now[hidden] { display: none; }
.dtl-ends { display: flex; justify-content: space-between; font: 650 12px var(--ui); color: var(--label3); font-variant-numeric: tabular-nums; margin-top: 2px; }
.set { padding: 0 !important; gap: 0 !important; border-top: 0 !important; min-height: 0 !important; align-items: stretch !important; justify-content: stretch !important; display: grid !important; grid-template-rows: auto minmax(0, 1fr) !important; }
.set-main { min-height: 0; overflow-y: auto; }

/* =====================================================================================================================
   Full polish pass: one page header, one panel style, one row style across Muhurta, Patro, Graha, Kundali and Matching
   ===================================================================================================================== */
.top { align-items: flex-end; margin-bottom: 14px; padding: 2px 2px 12px; border-bottom: .5px solid var(--mac-hair); }
.top .chip#plc { display: none; }
.top h1 { font: 500 32px/1.12 var(--display-deva); letter-spacing: 0; }
.top h1 small { display: block; margin-top: 5px; font: 500 13.5px var(--deva); color: var(--label2); }
.tabs { margin-bottom: 14px; }
.sun2 { justify-content: center; gap: 36px; padding: 9px 14px; border-radius: 10px; box-shadow: var(--mac-lift); font: 700 15px var(--deva); margin-bottom: 14px; }
.dual { gap: 16px; align-items: start; }
.panel { border-radius: 12px; box-shadow: var(--mac-lift); }
.panel > h3 { text-align: left; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent); font: 650 14.5px var(--deva); padding: 10px 16px; border-bottom: .5px solid var(--mac-hair); letter-spacing: .01em; }
.panel > h4 { text-align: left; background: none; font: 500 12.5px var(--deva); color: var(--label3); padding: 8px 16px 2px; }
.mrow { padding: 9px 16px; min-height: 40px; font: 500 14.5px var(--deva); transition: background .12s; }
.mrow:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.mrow b { font-weight: 650; } .mrow .tv { font: 600 13.5px var(--ui); color: var(--label2); }
.mrow.hot { background: color-mix(in srgb, var(--gold) 15%, transparent); box-shadow: inset 3px 0 0 var(--gold); } .mrow.hot .tv { color: var(--label); }
.mrow.note { font-size: 13.5px; line-height: 1.6; }
/* month bars on Patro and Graha read as a toolbar, not a card */
.card.pad:has(> #mp), .card.pad:has(> .round) { display: flex; gap: 10px; align-items: center; padding: 8px 12px !important; border-radius: 10px; margin-bottom: 12px; }
.round { background: color-mix(in srgb, var(--label) 6%, transparent); color: var(--label); }
.round:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.tbl-wrap { box-shadow: var(--mac-lift); }
.gt td, .gt th { font-variant-numeric: tabular-nums; }
.field label { font: 600 12px var(--deva); color: var(--label2); letter-spacing: .01em; }
.in { height: 38px; border-radius: 8px; box-shadow: 0 0 0 .5px var(--mac-hair) inset; background: var(--surface); } .in:focus { outline: none; box-shadow: var(--mac-ring); }
.btn { border-radius: 8px; font-weight: 600; letter-spacing: .01em; } .btn:not(.alt):not(.ghost) { box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn:active { transform: scale(.98); }
.doctabs { border-bottom: .5px solid var(--mac-hair); margin-bottom: 14px; }
.card, .fact, .chart { transition: box-shadow .2s; }
.toast { border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
/* quiet scrollbars everywhere */
::-webkit-scrollbar { width: 11px; height: 11px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--label) 22%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--label) 38%, transparent); background-clip: content-box; } ::-webkit-scrollbar-track { background: transparent; }

/* ---- Kundali: a chart workspace, not a banner ---- */
.kstart.hidden { display: none !important; }
.hub-head { background: var(--surface); color: var(--label); border-radius: 12px; padding: 14px 20px 14px; box-shadow: var(--mac-lift) !important; border-left: 4px solid var(--gold); margin-bottom: 14px; }
.hub-name { font: 500 28px/1.15 var(--display-deva); } .hub-sub { color: var(--label2); opacity: 1; font-size: 13.5px; }
.hub-head .btn.alt { background: color-mix(in srgb, var(--label) 7%, transparent); color: var(--label); }
.hub-stats { margin: 12px 0 10px; } .hub-stat { border-left-color: var(--mac-hair); } .hub-stat span { color: var(--label3); opacity: 1; font: 600 11.5px var(--deva); } .hub-stat b { font: 650 17px/1.35 var(--deva); }
.hub-pills span { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-weight: 650; }
.hub-work { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 18px; }
.hub-work .chart { padding: 10px 12px 12px; } .hub-work .chart h5 { font: 650 14px var(--deva); margin: 2px 4px 6px; color: var(--accent); }
.hub-work .chart svg { width: 100%; height: auto; display: block; }
.hub-wt .tbl-wrap { border-radius: 12px; } .hub-wt .pro-t th, .hub-wt .pro-t td { padding: 8px 10px; }
.hub-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.hub-tile { min-height: 92px; padding: 12px 14px; border-radius: 12px; } .hub-tile:hover { transform: none; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--tint) 40%, transparent), 0 6px 18px rgba(15, 23, 42, .08) !important; }
.hub-t { font-size: 15px; } .hub-s { font-size: 12.5px; }
@media (max-width: 1100px) { .hub-work { grid-template-columns: 1fr; } }

/* ---- differentiated corner radii, legible text: clear, calm software chrome, not a themed skin ------------------------
   a single flat radius pasted onto every surface is a uniform, no-point-of-view look. Each tier below gets its own
   radius, scaled to its own size (a sheet is not a chip), and pill-shaped controls (chips, segmented controls) stay
   true 999px capsules - a plain, legible shape, not a deliberate platform costume. Loaded last so it wins the cascade. ---- */
.sheet, .posterdlg .pd-body { border-radius: 22px !important; }
.card, .optc .card, .tbl-wrap, .panel, .chart, .ycard, .fact, .opt-about, .menupop, .side-card { border-radius: 14px !important; }
.hub-tile { border-radius: 12px !important; }
.chip, .seg, .tabs { border-radius: 999px !important; }
.mac-glass, .set-find, .rb-find { border-radius: 10px !important; }
.hub-ico, .soon-ico, .opt-ico { border-radius: 9px !important; }
:root { --label2: #2B3B52; --label3: #51627C; }
html[data-theme="dark"] { --label2: #D7E0EC; --label3: #A3B2C7; }
.dt td, .dt th { font-size: 15px; }

/* ---- responsive: tablet and phone widths, including the plain web build opened in a phone browser ---------------------
   the window chrome (titlebar, ribbon, context toolbar) was built for a wide desktop window and only trimmed a few
   labels down to 900px; below that it overlapped and became unreadable. This restructures the same three rows instead
   of just hiding pieces of them, and `html.web` (set once in app.js from window.__IS_WEB__) drops the native window
   controls and app menubar entirely - there is no OS window to minimise/maximise/close or app menu bar in a browser tab. ---- */
html.web .win-ctl, html.web .menubar, html.web .mac-logo { display: none; }
@media (max-width: 900px) {
  .dhead { flex-wrap: wrap; gap: 6px 16px; } .dh-r { text-align: left; }
  .dh-bs { font-size: 28px; } .dh-clock { font-size: 24px; }
}
@media (max-width: 680px) {
  .menubar, .win-sub { display: none; }
  .win-caption { height: 30px; }
  .win-title { font-size: 11px; }
  /* the ribbon becomes a swipeable strip of tabs instead of a row that must all fit at once */
  .ribbon { padding: 7px 10px; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .ribbon::-webkit-scrollbar { display: none; }
  .rb { padding: 8px 12px; } .rb span { font-size: 12.5px; }
  .rb-find { min-width: 0; width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50% !important; }
  .rb-find span, .rb-find kbd { display: none; }
  .rb-grow { flex: none; width: 4px; }
  /* the context toolbar (date, place, siddhanta, names) wraps to as many rows as it needs rather than overflowing */
  .ctxbar.mac-toolbar.p-window-titlebar-row { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .ctxbar .p-window-spacer { display: none; }
  .p-toolbar-group.mac-glass { height: 38px; }
  .mac-date { min-width: 0; }
  .tl { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .kpis > div:nth-child(odd) { border-left: 0; }
  .acts { grid-template-columns: 1fr; }
}
