/* Panchangam Today Card — compact home-page card. */
.tpgc {
	--tpgc-bg1: #3a0a0a;
	--tpgc-bg2: #240505;
	--tpgc-ink: #fff4e4;
	--tpgc-soft: rgba(255, 236, 210, 0.72);
	--tpgc-faint: rgba(255, 236, 210, 0.14);
	--tpgc-line: rgba(241, 222, 151, 0.18);
	--tpgc-gold: #f1de97;
	--tpgc-saffron: #f0954a;
	--tpgc-bad: #ff8a7a;
	--tpgc-good: #8fe0a8;
	--tpgc-r: 22px;

	container-type: inline-size;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: clamp(18px, 3.2vw, 30px);
	border-radius: var(--tpgc-r);
	border: 1px solid rgba(241, 222, 151, 0.28);
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(240, 149, 74, 0.28) 0%, rgba(240, 149, 74, 0) 55%),
		linear-gradient(160deg, var(--tpgc-bg1) 0%, var(--tpgc-bg2) 100%);
	color: var(--tpgc-ink);
	box-shadow: 0 18px 40px -18px rgba(49, 8, 8, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	font-size: 15px;
	line-height: 1.4;
	text-align: left;
}
.tpgc *,
.tpgc *::before,
.tpgc *::after { box-sizing: border-box; }
.tpgc p,
.tpgc h3,
.tpgc ul,
.tpgc li { margin: 0; padding: 0; list-style: none; }
.tpgc svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* Soft sun ring in the corner */
.tpgc__glow {
	position: absolute;
	z-index: -1;
	top: -90px;
	right: -90px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: repeating-conic-gradient(from 0deg, rgba(241, 222, 151, 0.10) 0deg 3deg, transparent 3deg 15deg);
	-webkit-mask: radial-gradient(circle, transparent 38%, #000 39%, #000 70%, transparent 71%);
	mask: radial-gradient(circle, transparent 38%, #000 39%, #000 70%, transparent 71%);
	pointer-events: none;
}

/* Loading skeleton */
.tpgc__skeleton { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 180px; }
.tpgc--ready .tpgc__skeleton { display: none; }
.tpgc__om { font-size: 34px; color: var(--tpgc-gold); opacity: 0.8; }
.tpgc__bar { display: block; width: 70%; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--tpgc-faint), rgba(255, 236, 210, 0.26), var(--tpgc-faint)); background-size: 200% 100%; animation: tpgc-shine 1.4s linear infinite; }
.tpgc__bar--short { width: 45%; }
@keyframes tpgc-shine { to { background-position: -200% 0; } }
.tpgc__noscript { color: var(--tpgc-gold); }

/* Header */
.tpgc-head { display: flex; align-items: center; gap: 14px; }
.tpgc-head__mark {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #ffd9a8 0%, var(--tpgc-saffron) 55%, #b4441f 100%);
	box-shadow: 0 0 0 4px rgba(241, 222, 151, 0.16), 0 0 26px rgba(240, 149, 74, 0.55);
	color: #4a0d0d;
	font-size: 28px;
	line-height: 1;
}
.tpgc-head__mark span { transform: translateY(-1px); }
.tpgc-head__text { min-width: 0; }
.tpgc .tpgc-head__kicker {
	color: var(--tpgc-gold);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.tpgc[lang="te"] .tpgc-head__kicker,
.tpgc[lang="hi"] .tpgc-head__kicker { letter-spacing: 0.02em; font-size: 14px; }
.tpgc .tpgc-head__day {
	color: var(--tpgc-ink);
	font-family: 'Alkatra', inherit;
	font-size: clamp(22px, 5cqi, 30px);
	font-weight: 700;
	line-height: 1.15;
	margin-top: 2px;
}
.tpgc .tpgc-head__date { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--tpgc-soft); font-size: 14px; margin-top: 2px; }
.tpgc-head__place { display: inline-flex; align-items: center; gap: 4px; color: var(--tpgc-gold); }

/* Year · month · paksha */
.tpgc .tpgc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tpgc-chip {
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--tpgc-line);
	background: rgba(255, 255, 255, 0.04);
	color: var(--tpgc-ink);
	font-size: 13px;
	white-space: nowrap;
}
.tpgc-chip--main { border-color: transparent; background: linear-gradient(135deg, var(--tpgc-saffron), #c9592a); color: #fff; font-weight: 600; }

/* Live status */
.tpgc .tpgc-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--tpgc-line);
}
.tpgc-status__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--tpgc-gold); box-shadow: 0 0 0 0 currentColor; }
.tpgc-status--bad { background: rgba(255, 138, 122, 0.12); border-color: rgba(255, 138, 122, 0.35); color: #ffd2ca; }
.tpgc-status--bad .tpgc-status__dot { background: var(--tpgc-bad); color: rgba(255, 138, 122, 0.6); animation: tpgc-pulse 1.8s ease-out infinite; }
.tpgc-status--good { background: rgba(143, 224, 168, 0.12); border-color: rgba(143, 224, 168, 0.35); color: #d6f6e0; }
.tpgc-status--good .tpgc-status__dot { background: var(--tpgc-good); color: rgba(143, 224, 168, 0.6); animation: tpgc-pulse 1.8s ease-out infinite; }
.tpgc-status--next { color: var(--tpgc-ink); font-weight: 500; }
.tpgc-status--clear { color: var(--tpgc-soft); font-weight: 500; }
@keyframes tpgc-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
	.tpgc-status__dot, .tpgc__bar { animation: none !important; }
}

/* Tithi · Nakshatra · Yoga · Karana */
.tpgc-angas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.tpgc-anga {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(255, 248, 236, 0.97);
	color: #2b1d14;
	box-shadow: inset 0 3px 0 var(--tpgc-saffron);
	min-width: 0;
}
.tpgc-anga__label { color: #b4441f; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.tpgc-anga__name { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tpgc-anga__till { color: #6f5a4b; font-size: 12.5px; }
.tpgc-day {
	display: inline-block;
	margin-left: 3px;
	padding: 0 6px;
	border-radius: 6px;
	background: rgba(240, 149, 74, 0.2);
	color: inherit;
	font-size: 0.85em;
	font-weight: 600;
}
.tpgc-anga .tpgc-day { background: #fbe1cf; color: #b4441f; }

/* Sunrise · sunset · moon */
.tpgc .tpgc-sky { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.tpgc-sky li { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 14.5px; }
.tpgc-sky li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tpgc-sky small { color: var(--tpgc-soft); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpgc-sky__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; flex: 0 0 auto; }
.tpgc-sky__ico--rise { background: rgba(255, 210, 120, 0.16); color: #ffd27a; }
.tpgc-sky__ico--set { background: rgba(240, 149, 74, 0.18); color: var(--tpgc-saffron); }
.tpgc-sky__ico--moon { background: rgba(198, 210, 255, 0.14); color: #dfe5ff; }

/* Timings */
.tpgc-times { display: grid; grid-template-columns: 1fr; gap: 0 22px; margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--tpgc-line); }
.tpgc .tpgc-time { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--tpgc-line); font-size: 14px; }
.tpgc-times__col:last-child .tpgc-time:last-child { border-bottom: 0; }
.tpgc-time__label { display: inline-flex; align-items: center; gap: 8px; color: var(--tpgc-soft); }
.tpgc-time__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tpgc-bad); flex: 0 0 auto; }
.tpgc-time--good .tpgc-time__label::before { background: var(--tpgc-good); }
.tpgc-time__val { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.tpgc-time--rahu .tpgc-time__label { color: var(--tpgc-ink); font-weight: 700; }
.tpgc-time--rahu .tpgc-time__val { color: #ffb4a8; font-weight: 700; }
.tpgc-dash { margin: 0 4px; opacity: 0.7; }

/* Call to action */
.tpgc .tpgc-cta,
.tpgc .tpgc-cta:visited {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	padding: 12px 18px;
	border-radius: 14px;
	background: linear-gradient(135deg, #f6e7b0, var(--tpgc-gold) 45%, #e2b65a);
	color: #3a0a0a;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	box-shadow: 0 8px 18px -10px rgba(241, 222, 151, 0.9);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tpgc .tpgc-cta:hover,
.tpgc .tpgc-cta:focus-visible { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(241, 222, 151, 1); color: #3a0a0a; }
.tpgc .tpgc-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tpgc-cta svg { font-size: 18px; }
.tpgc-error { color: var(--tpgc-soft); }

/* Telugu and Hindi script reads best a touch larger */
.tpgc[lang="te"] .tpgc-chip,
.tpgc[lang="hi"] .tpgc-chip { font-size: 14px; }
.tpgc[lang="te"] .tpgc-anga__label,
.tpgc[lang="hi"] .tpgc-anga__label { font-size: 13px; }
.tpgc[lang="te"] .tpgc-anga__till,
.tpgc[lang="hi"] .tpgc-anga__till { font-size: 13.5px; }
.tpgc[lang="te"] .tpgc .tpgc-time,
.tpgc[lang="te"] .tpgc-time,
.tpgc[lang="hi"] .tpgc-time { font-size: 15px; }
.tpgc[lang="te"] .tpgc-sky small,
.tpgc[lang="hi"] .tpgc-sky small { font-size: 12.5px; }
.tpgc[lang="te"] .tpgc-head__date,
.tpgc[lang="hi"] .tpgc-head__date { font-size: 15px; }

/* Wider spaces (home page section, tablet & desktop) */
@container (min-width: 620px) {
	.tpgc-times { grid-template-columns: 1fr 1fr; }
	.tpgc-times__col--good .tpgc-time:last-child,
	.tpgc-times__col--bad .tpgc-time:last-child { border-bottom: 0; }
	.tpgc-cta { width: max-content; margin-left: auto; }
}
@container (min-width: 820px) {
	.tpgc-angas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tpgc-head__mark { width: 64px; height: 64px; font-size: 32px; }
	.tpgc-sky { max-width: 640px; }
}
/* Phones and sidebars: icon above text so all three fit in one row */
@container (max-width: 520px) {
	.tpgc .tpgc-sky { gap: 6px; }
	.tpgc-sky li { flex-direction: column; text-align: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--tpgc-line); }
	.tpgc-sky li > span:last-child { align-items: center; }
	.tpgc-sky small { white-space: normal; }
	.tpgc-sky__ico { width: 30px; height: 30px; font-size: 16px; }
	.tpgc-anga { padding: 10px 12px; }
	.tpgc-anga__name { font-size: 16px; }
}
