/* Telugu Panchangam — mobile-first, theme-proof styles. */
.tpg {
	--tpg-accent: #b4441f;
	--tpg-ink: #2b1d14;
	--tpg-soft: #6f5a4b;
	--tpg-paper: #fffaf3;
	--tpg-card: #ffffff;
	--tpg-line: #eedfcc;
	--tpg-tint: color-mix(in srgb, var(--tpg-accent) 9%, #fff8ee);
	--tpg-good: #2f7a4a;
	--tpg-bad: #b3261e;
	--tpg-gold: #d99a2b;
	--tpg-r: 18px;
	box-sizing: border-box;
	max-width: 880px;
	margin: 1.5em auto;
	color: var(--tpg-ink);
	background: var(--tpg-paper);
	border: 1px solid var(--tpg-line);
	border-radius: var(--tpg-r);
	box-shadow: 0 1px 2px rgba(60, 30, 10, .05), 0 12px 32px -18px rgba(60, 30, 10, .25);
	overflow: hidden;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}
.tpg *, .tpg *::before, .tpg *::after { box-sizing: border-box; }
.tpg h2, .tpg h3, .tpg p, .tpg ul, .tpg dl, .tpg dd { margin: 0; padding: 0; }
.tpg ul { list-style: none; }
.tpg li { margin: 0; }
.tpg button {
	-webkit-appearance: none; appearance: none;
	margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	color: inherit; font: inherit; line-height: inherit; letter-spacing: normal; text-transform: none;
	min-height: 0; width: auto; cursor: pointer;
}
.tpg button:focus-visible, .tpg input:focus-visible { outline: 2px solid var(--tpg-accent); outline-offset: 2px; }
.tpg .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tpg .tpg-en { display: block; font-size: .72em; font-weight: 500; color: var(--tpg-soft); letter-spacing: .01em; }
.tpg .tpg-muted { color: var(--tpg-soft); font-size: .9em; }

/* Loading */
.tpg .tpg-loading { display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 220px; color: var(--tpg-soft); }
.tpg .tpg-loading__om { font-size: 1.6em; color: var(--tpg-accent); animation: tpg-pulse 1.4s ease-in-out infinite; }
@keyframes tpg-pulse { 50% { opacity: .35; } }
.tpg .tpg-noscript { padding: 1em; text-align: center; }

/* Header */
.tpg .tpg-head {
	padding: 18px 16px 14px;
	background:
		radial-gradient(120% 140% at 100% 0, color-mix(in srgb, var(--tpg-gold) 22%, transparent) 0, transparent 55%),
		var(--tpg-tint);
	border-bottom: 1px solid var(--tpg-line);
}
.tpg .tpg-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tpg .tpg-title { font-size: 1.35em; font-weight: 700; line-height: 1.25; color: var(--tpg-accent); }
.tpg .tpg-title .tpg-en { font-size: .55em; text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }

.tpg .tpg-locbtn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 12px 8px 10px !important;
	background: var(--tpg-card) !important;
	border: 1px solid var(--tpg-line) !important;
	border-radius: 999px !important;
	font-size: .92em; font-weight: 600; line-height: 1.2;
	max-width: 100%;
}
.tpg .tpg-locbtn:hover { border-color: var(--tpg-accent) !important; }
.tpg .tpg-locbtn--static { cursor: default; }
.tpg .tpg-locname small { font-weight: 500; color: var(--tpg-soft); margin-left: 4px; }
.tpg .tpg-pin { width: 12px; height: 12px; flex: none; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--tpg-accent); box-shadow: inset 0 0 0 3px var(--tpg-accent), inset 0 0 0 6px #fff; }
.tpg .tpg-caret { width: 7px; height: 7px; flex: none; border-right: 2px solid var(--tpg-soft); border-bottom: 2px solid var(--tpg-soft); transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.tpg .tpg-locbtn[aria-expanded="true"] .tpg-caret { transform: rotate(-135deg) translate(-2px, 0); }

.tpg .tpg-datebar { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.tpg .tpg-nav {
	flex: none; width: 40px; height: 40px;
	display: grid !important; place-items: center;
	border-radius: 50% !important; background: var(--tpg-card) !important; border: 1px solid var(--tpg-line) !important;
	font-size: 1.5em !important; line-height: 1 !important; color: var(--tpg-accent) !important;
}
.tpg .tpg-nav:hover { background: var(--tpg-accent) !important; color: #fff !important; }
.tpg .tpg-datebox { flex: 1; min-width: 0; text-align: center; }
.tpg .tpg-vara { display: block; font-size: 1.2em; line-height: 1.3; }
.tpg .tpg-vara .tpg-en { display: inline; font-size: .62em; margin-left: 6px; }
.tpg .tpg-gdate { color: var(--tpg-soft); font-size: .92em; }

.tpg .tpg-datetools { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.tpg .tpg-today {
	padding: 6px 14px !important; border-radius: 999px !important; font-size: .85em; font-weight: 600;
	background: var(--tpg-accent) !important; color: #fff !important;
}
.tpg .tpg-today:disabled { opacity: .45; cursor: default; }
.tpg .tpg-dateinput {
	padding: 5px 10px !important; border: 1px solid var(--tpg-line) !important; border-radius: 999px !important;
	background: var(--tpg-card) !important; color: var(--tpg-ink) !important; font: inherit; font-size: .85em !important;
	height: auto !important; width: auto !important; min-height: 0 !important; box-shadow: none !important; margin: 0 !important;
}

/* Location panel */
.tpg .tpg-panel { padding: 14px 16px 16px; background: var(--tpg-card); border-bottom: 1px solid var(--tpg-line); }
.tpg .tpg-panel[hidden] { display: none; }
.tpg .tpg-geo {
	display: flex !important; align-items: center; justify-content: center; gap: 10px; width: 100% !important;
	padding: 12px 16px !important; border-radius: 12px !important; background: var(--tpg-accent) !important; color: #fff !important;
	font-weight: 600;
}
.tpg .tpg-geo .tpg-pin { background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--tpg-accent); }
.tpg .tpg-geo small { opacity: .85; font-weight: 500; }
.tpg .tpg-geomsg { font-size: .88em; color: var(--tpg-soft); margin: 8px 0 0 !important; min-height: 0; }
.tpg .tpg-geomsg:empty { display: none; }
.tpg .tpg-search {
	display: block; width: 100% !important; margin: 12px 0 8px !important; padding: 10px 14px !important;
	border: 1px solid var(--tpg-line) !important; border-radius: 12px !important; background: var(--tpg-paper) !important;
	font: inherit; font-size: 1em !important; color: var(--tpg-ink) !important; box-shadow: none !important; height: auto !important;
}
.tpg .tpg-citylist { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; border: 1px solid var(--tpg-line); }
.tpg .tpg-citylist button {
	display: flex !important; align-items: baseline; justify-content: space-between; gap: 10px; width: 100% !important;
	padding: 10px 14px !important; text-align: left; border-bottom: 1px solid var(--tpg-line) !important;
}
.tpg .tpg-citylist li:last-child button { border-bottom: 0 !important; }
.tpg .tpg-citylist button:hover, .tpg .tpg-citylist button[aria-selected="true"] { background: var(--tpg-tint) !important; }
.tpg .tpg-citylist button[aria-selected="true"] span { color: var(--tpg-accent); font-weight: 700; }
.tpg .tpg-citylist small { color: var(--tpg-soft); font-size: .82em; }
.tpg .tpg-cgroup { position: sticky; top: 0; padding: 6px 14px; font-size: .75em; font-weight: 700; letter-spacing: .04em; color: var(--tpg-accent); background: var(--tpg-tint); border-bottom: 1px solid var(--tpg-line); }
.tpg .tpg-cempty { padding: 14px; color: var(--tpg-soft); text-align: center; }

/* Body */
.tpg .tpg-body { padding: 16px; display: grid; gap: 16px; }
.tpg .tpg-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tpg .tpg-chips li {
	padding: 6px 12px; border-radius: 12px; background: var(--tpg-card); border: 1px solid var(--tpg-line);
	font-size: .9em; font-weight: 600; text-align: center; line-height: 1.35;
}
.tpg .tpg-chips li:first-child { background: var(--tpg-accent); color: #fff; border-color: var(--tpg-accent); }
.tpg .tpg-chips li:first-child .tpg-en { color: rgba(255, 255, 255, .82); }

.tpg .tpg-sun { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpg .tpg-sun__item { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--tpg-card); border: 1px solid var(--tpg-line); border-radius: 14px; min-width: 0; }
.tpg .tpg-sun__item--moon { grid-column: 1 / -1; }
.tpg .tpg-sun__item small { display: block; font-size: .78em; color: var(--tpg-soft); line-height: 1.3; }
.tpg .tpg-sun__item strong { display: block; font-size: 1.05em; line-height: 1.35; }
.tpg .tpg-sun__item strong .tpg-en { display: inline; margin-left: 6px; }
.tpg .tpg-sub { display: block; font-size: .8em; font-weight: 500; color: var(--tpg-soft); }
.tpg .tpg-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; position: relative; }
.tpg .tpg-sun__item--rise .tpg-ico { background: radial-gradient(circle at 50% 70%, #ffcf5c 0 9px, transparent 10px), linear-gradient(#fff3d6, #ffe0a3); }
.tpg .tpg-sun__item--set .tpg-ico { background: radial-gradient(circle at 50% 78%, #f08a3c 0 9px, transparent 10px), linear-gradient(#ffe2cc, #f9c09a); }
.tpg .tpg-sun__item--moon .tpg-ico { background: #283a63; overflow: hidden; }
.tpg .tpg-sun__item--moon .tpg-ico::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; box-shadow: -5px 2px 0 0 #f5e6b8; transform: translateX(5px); }

.tpg .tpg-limbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tpg .tpg-limb { padding: 12px; background: var(--tpg-card); border: 1px solid var(--tpg-line); border-radius: 14px; border-top: 3px solid var(--tpg-accent); min-width: 0; }
.tpg .tpg-limb h3 { font-size: .82em !important; font-weight: 700; color: var(--tpg-accent); line-height: 1.3; margin-bottom: 6px !important; letter-spacing: .02em; }
.tpg .tpg-limb h3 .tpg-en { display: inline; margin-left: 4px; font-size: .9em; }
.tpg .tpg-limb__item { display: block; padding: 4px 0; }
.tpg .tpg-limb__item.is-next { border-top: 1px dashed var(--tpg-line); margin-top: 4px; padding-top: 8px; opacity: .8; }
.tpg .tpg-limb__name { display: block; font-size: 1.1em; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tpg .tpg-limb__item.is-next .tpg-limb__name { font-size: .95em; }
.tpg .tpg-limb__till { display: block; font-size: .82em; color: var(--tpg-soft); margin-top: 2px; }
.tpg .tpg-day { display: inline-block; font-size: .85em; padding: 0 6px; border-radius: 6px; background: var(--tpg-tint); color: var(--tpg-accent); font-weight: 600; white-space: nowrap; }

.tpg .tpg-times { display: grid; gap: 12px; }
.tpg .tpg-tgroup { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--tpg-line); background: var(--tpg-card); }
.tpg .tpg-tgroup h3 { font-size: .9em !important; font-weight: 700; margin-bottom: 4px !important; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.tpg .tpg-tgroup h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tpg .tpg-tgroup h3 .tpg-en { display: inline; }
.tpg .tpg-tgroup--good h3 { color: var(--tpg-good); }
.tpg .tpg-tgroup--good h3::before { background: var(--tpg-good); }
.tpg .tpg-tgroup--bad h3 { color: var(--tpg-bad); }
.tpg .tpg-tgroup--bad h3::before { background: var(--tpg-bad); }
.tpg .tpg-trow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--tpg-line); }
.tpg .tpg-trow:first-child { border-top: 0; }
.tpg .tpg-trow dt { font-weight: 600; font-size: .95em; min-width: 0; }
.tpg .tpg-trow dd { text-align: right; font-variant-numeric: tabular-nums; font-size: .92em; white-space: normal; }
.tpg .tpg-trow.is-key dd { color: var(--tpg-bad); font-weight: 700; }

.tpg .tpg-foot { font-size: .75em; color: var(--tpg-soft); text-align: center; line-height: 1.5; }
.tpg .tpg-error { padding: 1em; text-align: center; color: var(--tpg-bad); }

@media (min-width: 640px) {
	.tpg .tpg-head { padding: 22px 24px 16px; }
	.tpg .tpg-body { padding: 20px 24px 22px; gap: 18px; }
	.tpg .tpg-panel { padding: 16px 24px; }
	.tpg .tpg-title { font-size: 1.6em; }
	.tpg .tpg-sun { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tpg .tpg-sun__item--moon { grid-column: auto; }
	.tpg .tpg-limbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
	.tpg .tpg-times { grid-template-columns: 1fr 1fr; }
	.tpg .tpg-vara { font-size: 1.35em; }
}
@media (prefers-reduced-motion: reduce) { .tpg-loading__om { animation: none; } }
.tpg .tpg-today[hidden] { display: none !important; }

/* Language switch + header tools (1.1.0) */
.tpg .tpg-en--inline { display: inline; margin-left: 6px; }
.tpg .tpg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.tpg .tpg-lang {
	display: inline-flex; padding: 3px; gap: 2px;
	background: rgba(255, 255, 255, .75); border: 1px solid var(--tpg-line); border-radius: 999px;
}
.tpg .tpg-lang button {
	padding: 6px 12px !important; border-radius: 999px !important; line-height: 1.25 !important;
	font-size: .86em !important; font-weight: 600 !important; color: var(--tpg-soft) !important; white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.tpg .tpg-lang button:hover { color: var(--tpg-accent) !important; }
.tpg .tpg-lang button[aria-pressed="true"] {
	background: var(--tpg-accent) !important; color: #fff !important;
	box-shadow: 0 1px 2px rgba(60, 30, 10, .2) !important;
}
.tpg .tpg-title { flex: 1 1 auto; min-width: 0; }
@media (min-width: 640px) {
	.tpg .tpg-head__row { align-items: center; }
	.tpg .tpg-tools { width: auto; justify-content: flex-end; }
}
@media (max-width: 380px) {
	.tpg .tpg-lang button { padding: 6px 10px !important; }
}

/* Page title follows the language (1.1.1): hide the card's own heading. */
.tpg.tpg--page-heading .tpg-title { display: none; }
.tpg.tpg--page-heading .tpg-head__row { justify-content: center; }
.tpg.tpg--page-heading .tpg-tools { justify-content: center; }
