/* =====================================================================
   अपना गाँव — पूरे पोर्टल की 3D थीम (प्रवेश-द्वार वाली भाषा)

   यह सिर्फ़ ऊपर से चढ़ी परत है: पन्ने का HTML वैसा ही रहता है, इसलिए
   index.html में दूसरे बदलाव नहीं टूटते। ag-theme.js पैनलों पर
   .ag-p (बाहरी) / .ag-pi (भीतरी) लगाता है; JS न चले तो पुराना रूप रहता है।
   झुकाव सिर्फ़ छोटे कार्डों पर, और सिर्फ़ माउस पर — नक्शे वाले पैनल को
   कभी transform नहीं (Leaflet के क्लिक व पूरी-स्क्रीन नक्शा बिगड़ते हैं)।
   ===================================================================== */
:root {
    --ag-bg: #04060f;
    --ag-gold: #fbbf24;
    --ag-amber: #f59e0b;
    --ag-line: rgba(148, 163, 184, .14);
    --ag-line-gold: rgba(251, 191, 36, .26);
    --ag-panel: linear-gradient(165deg, rgba(17, 24, 39, .84), rgba(6, 10, 22, .92));
}
@property --ag-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

html { background: var(--ag-bg); }
body.bg-slate-950 { background: transparent !important; }
::selection { background: rgba(251, 191, 36, .85); color: #111; }
::-webkit-scrollbar-thumb { background: linear-gradient(#f59e0b, #b45309) !important; }

/* ---------------- पृष्ठभूमि: रोशनी, घूमती सुनहरी जाली, दाना ---------------- */
#agAppBg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--ag-bg); }
#agAppBg .au { position: absolute; inset: -25%;
    background: radial-gradient(34% 30% at 16% 20%, rgba(245, 158, 11, .15), transparent 62%),
                radial-gradient(30% 26% at 88% 10%, rgba(16, 185, 129, .11), transparent 62%),
                radial-gradient(42% 36% at 72% 94%, rgba(79, 70, 229, .15), transparent 62%);
    animation: agtAurora 26s ease-in-out infinite alternate; }
#agAppBg .fl { position: absolute; left: -60%; right: -60%; bottom: -38%; height: 62%;
    background-image: linear-gradient(rgba(245, 158, 11, .07) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(245, 158, 11, .07) 1px, transparent 1px);
    background-size: 72px 72px; transform: perspective(640px) rotateX(74deg); transform-origin: 50% 0;
    -webkit-mask-image: linear-gradient(to top, #000 6%, transparent 82%); mask-image: linear-gradient(to top, #000 6%, transparent 82%);
    animation: agtFloor 9s linear infinite; }
#agAppBg .gr { position: absolute; inset: 0; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes agtAurora { to { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.06); } }
@keyframes agtFloor { to { background-position: 0 72px, 0 0; } }

/* ---------------- ऊपर की पट्टी: नारंगी की जगह काँच ---------------- */
body > .from-amber-600.bg-gradient-to-r {
    background: linear-gradient(90deg, rgba(120, 53, 15, .55), rgba(6, 78, 59, .32), rgba(120, 53, 15, .55)) !important;
    color: #fde68a !important; border-bottom: 1px solid var(--ag-line-gold); box-shadow: none !important;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body > .from-amber-600.bg-gradient-to-r .text-slate-950,
body > .from-amber-600.bg-gradient-to-r .text-amber-950 { color: #fde68a !important; }
body > .from-amber-600.bg-gradient-to-r a:hover { color: #fff !important; }

/* ---------------- हेडर ---------------- */
header.glass-panel {
    background: linear-gradient(180deg, rgba(6, 10, 22, .86), rgba(6, 10, 22, .66)) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: transparent !important; }
header.glass-panel::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, .75), rgba(52, 211, 153, .55), transparent);
    background-size: 200% 100%; animation: agtLine 8s linear infinite; }
@keyframes agtLine { to { background-position: -200% 0; } }
#brandRow > div:first-child {
    background: linear-gradient(145deg, #fcd34d, #d97706) !important; border: 0 !important;
    box-shadow: 0 12px 26px -8px rgba(245, 158, 11, .75), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
    animation: agtLogo 7s ease-in-out infinite; }
@keyframes agtLogo { 0%, 100% { transform: perspective(240px) rotateY(-14deg) rotateX(8deg); } 50% { transform: perspective(240px) rotateY(14deg) rotateX(-6deg); } }
#gaonName { background: linear-gradient(90deg, #fff 10%, #fde68a 60%, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- टैब ---------------- */
#tabNav { background: rgba(2, 6, 23, .6) !important; border: 1px solid var(--ag-line) !important; border-radius: 18px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 12px 30px -18px rgba(0, 0, 0, .8) !important; }
#tabNav .tab-btn { border-radius: 13px !important; transition: color .25s, background .25s, transform .25s, box-shadow .25s; }
#tabNav .tab-btn:not(.active-tab):hover { background: rgba(251, 191, 36, .09); color: #fde68a !important; }
#tabNav .tab-btn.active-tab {
    background: linear-gradient(135deg, #fcd34d, #f59e0b 55%, #d97706) !important; color: #1c1206 !important;
    box-shadow: 0 10px 26px -8px rgba(245, 158, 11, .75), inset 0 1px 0 rgba(255, 255, 255, .5) !important; transform: translateY(-1px); }
#tabNav .tab-btn.active-tab * { color: #1c1206 !important; }

/* ---------------- पैनल ---------------- */
.ag-p { position: relative; background: var(--ag-panel) !important;
    box-shadow: 0 0 0 1px var(--ag-line), 0 30px 70px -42px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05) !important;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease; }
.ag-p:not(.ag-accent) { border-color: transparent !important; }
.ag-p.ag-accent { box-shadow: 0 0 0 1px rgba(251, 191, 36, .1), 0 30px 70px -42px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05) !important; }
main .ag-p.glass-panel { -webkit-backdrop-filter: none; backdrop-filter: none; }   /* फ़ोन पर भारी धुंधलापन नहीं — पीछे वैसे भी गहरा है */
.ag-pi { position: relative; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .35s ease; }
.ag-pi:not(.ag-accent) { border-color: var(--ag-line) !important; }

/* माउस के साथ चलती हल्की रोशनी */
.ag-p::after, .ag-pi::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(251, 191, 36, .09), transparent 45%);
    transition: opacity .35s ease; }
.ag-p:hover::after, .ag-pi:hover::after { opacity: 1; }
.ag-map::after { display: none; }

/* छोटे कार्ड माउस की ओर झुकते हैं (सिर्फ़ जब माउस ऊपर हो) */
.ag-tilting { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px);
    box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(251, 191, 36, .32) !important; }

/* मुख्य कार्डों पर घूमती सुनहरी किनार */
.ag-glow::before, #agHero::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
    background: conic-gradient(from var(--ag-ang), rgba(251, 191, 36, 0) 0deg, rgba(251, 191, 36, .85) 70deg, rgba(52, 211, 153, .6) 140deg, rgba(251, 191, 36, 0) 220deg, rgba(251, 191, 36, 0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: agtBorder 8s linear infinite; }
@keyframes agtBorder { to { --ag-ang: 360deg; } }

/* बटन, शीर्षक, नक्शा */
html body .bg-amber-500 { background: linear-gradient(135deg, #fcd34d, #f59e0b 55%, #d97706) !important;
    box-shadow: 0 10px 24px -12px rgba(245, 158, 11, .8), inset 0 1px 0 rgba(255, 255, 255, .45); }
main h2 { text-shadow: 0 0 30px rgba(251, 191, 36, .16); }
#map { box-shadow: 0 0 0 1px rgba(251, 191, 36, .3), 0 0 70px -24px rgba(251, 191, 36, .4), 0 40px 80px -40px rgba(0, 0, 0, .9); }
body.map-faux-full #map, :fullscreen #map { box-shadow: none; }
#portalFooter { background: linear-gradient(180deg, rgba(4, 6, 15, .5), rgba(4, 6, 15, .96)) !important; border-top: 1px solid var(--ag-line-gold) !important; }

/* ---------------- हरकत: टैब बदलते ही ऊपर उठना, स्क्रॉल पर कार्ड उभरना ---------------- */
@media (prefers-reduced-motion: no-preference) {
    .tab-content:not(.hidden) { animation: agtTabIn .6s cubic-bezier(.2, .8, .2, 1) backwards; }
    @supports (animation-timeline: view()) {
        main .ag-p:not(.ag-map) { animation: agtReveal linear both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
    }
}
@keyframes agtTabIn { from { translate: 0 16px; } }
@keyframes agtReveal { from { opacity: 0; translate: 0 44px; scale: .97; } to { opacity: 1; translate: none; scale: none; } }

/* ---------------- गाँव + किसान: एक ही कार्ड (गजेटियर के सबसे ऊपर) ----------------
   बाएँ: नमस्ते, आपका खेत, मौसम, मंडी... (kisan.js बनाता है, #kisanCard यहीं भीतर है)
   दाएँ: इसी गाँव के असली खसरों का घूमता 3D नक्शा, तीन आँकड़े, तीन रास्ते।
   गाँव का नाम यहाँ दोबारा नहीं — वह ऊपर हेडर में है। */
/* overflow: clip (hidden नहीं) — hidden से भीतर का sticky (दाएँ हिस्से का चिपकना) टूट जाता है;
   पुराने ब्राउज़र जो clip नहीं जानते, hidden पर लौटते हैं (तब बस चिपकता नहीं, बाक़ी सब वैसा) */
#agHero { position: relative; isolation: isolate; overflow: hidden; overflow: clip; border-radius: 28px;
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start;
    padding: clamp(14px, 2vw, 20px);
    background: radial-gradient(40% 90% at 94% 20%, rgba(245, 158, 11, .15), transparent 62%),
                radial-gradient(40% 70% at 0% 100%, rgba(16, 185, 129, .07), transparent 60%), var(--ag-panel);
    box-shadow: 0 0 0 1px var(--ag-line-gold), 0 40px 90px -40px rgba(0, 0, 0, .95); }
#agHero .hx-main { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; }
/* दाएँ हिस्से की ऊँचाई बाएँ के साथ नहीं खिंचती (पहले खिंचती थी — कोई टाइल खुलते ही ऐनिमेशन 900px नीचे
   चला जाता था और ऊपर बड़ा ख़ाली डिब्बा बचता था)। अब यह ऊपर टिका रहता है, और बाएँ की सूची लंबी हो तो
   स्क्रॉल के साथ चिपककर साथ चलता है। ऐनिमेशन की ऊँचाई पक्की; उसके नीचे की जगह फ़ीड की। */
#agHero .hx-side { position: sticky; top: calc(var(--hdr-h, 76px) + 10px); align-self: start; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 22px;
    max-height: calc(100vh - var(--hdr-h, 76px) - 22px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    background: radial-gradient(80% 60% at 50% 30%, rgba(245, 158, 11, .10), transparent 70%), rgba(2, 6, 23, .5);
    box-shadow: inset 0 0 0 1px var(--ag-line); }
#agHero .s3 { position: relative; flex: 0 0 auto; height: 172px; min-height: 0; perspective: 800px; perspective-origin: 50% 30%; }
#agHero .s3 .ag-plane { width: min(170px, 60%); top: 52%; }
#agHero .s3 .ag-beam { height: 60px; }
#agHero .none { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); font-size: 11.5px; color: #94a3b8; z-index: 3; text-align: center; }
/* "गाँव आज (2026)" पट्टी — बाएँ हिस्से में, टाइलों के नीचे (ag-theme.js बनाता है, fillSatyaSlots भरता है) */
#agGlance { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ag-line); }
#agGlance .hx-gh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 8px; font-size: 12.5px; font-weight: 900; color: #fde68a; }
#agGlance .hx-gh span { font-size: 10px; font-weight: 600; color: #64748b; }
.ag-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ag-gb { display: block; text-align: left; padding: 0; background: none; border: 0; cursor: pointer; min-width: 0; }
.ag-gt { display: flex; flex-direction: column; gap: 1px; min-width: 0; height: 100%; padding: 8px 10px; border-radius: 13px; border-left: 3px solid #64748b;
    background: linear-gradient(160deg, rgba(30, 41, 59, .6), rgba(15, 23, 42, .78)); box-shadow: inset 0 0 0 1px var(--ag-line); transition: transform .2s, box-shadow .2s; }
.ag-gb:hover .ag-gt { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .4); }
.ag-gl1 { font-size: 10.5px; font-weight: 700; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-gt > b { font-size: 19px; line-height: 1.15; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-gl2 { font-size: 10px; line-height: 1.3; color: #64748b; }
/* "गाँव में क्या है" — छोटे खाने: लंबा नाम (मतदान केंद्र, बैंक…) दो पंक्ति में, कटे नहीं */
.ag-gsub { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin: 12px 0 6px; font-size: 11.5px; font-weight: 900; color: #7dd3fc; }
.ag-gsub span { font-size: 10px; font-weight: 600; color: #64748b; }
.ag-gt.am > b { font-size: 13.5px; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-gt.am .ag-gl2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-gt .ag-gl2 { overflow-wrap: anywhere; }
/* दबाने पर खुलने वाला ब्योरा-पट्टा */
.ag-gd { margin-top: 10px; padding: 10px; border-radius: 16px; background: rgba(2, 6, 23, .55); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .28); }
.ag-gd[hidden], .ag-gd [data-gd][hidden] { display: none; }
.ag-gdh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; color: #e0f2fe; }
.ag-gdh button { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #cbd5e1; background: rgba(30, 41, 59, .9); border: 1px solid rgba(100, 116, 139, .5); cursor: pointer; }
.ag-gd .gz-card, .ag-gd > [data-gd] > div:first-child { margin-top: 0; }
.ag-geo { margin-top: 8px; font-size: 10.5px; line-height: 1.5; color: #94a3b8; }
#agHero .ct { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#agHero .ct button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px;
    border-radius: 12px; cursor: pointer; font: 800 11.5px/1.1 'Mukta', sans-serif; color: #e2e8f0;
    background: rgba(15, 23, 42, .85); border: 1px solid var(--ag-line); transition: transform .2s, border-color .2s, color .2s; }
#agHero .ct button i { font-style: normal; font-size: 18px; line-height: 1; }
#agHero .ct button:hover { transform: translateY(-2px); border-color: rgba(251, 191, 36, .45); color: #fde68a; }

/* किसान वाला हिस्सा — अब इसी कार्ड के भीतर, अपना अलग डिब्बा नहीं */
#kisanCard .kc-hi { font-size: clamp(21px, 2.3vw, 28px) !important; font-weight: 400 !important; line-height: 1.15 !important;
    color: #fff !important; text-shadow: 0 0 28px rgba(251, 191, 36, .25); }   /* 🙏 अपने रंग में रहे — इसलिए gradient-text नहीं */
#kisanCard .kc-date { font-size: 11.5px !important; color: #94a3b8 !important; margin-top: 2px; }
#kisanCard .kc-t { position: relative; border-radius: 16px !important; padding: 10px 12px !important;
    background: linear-gradient(160deg, rgba(30, 41, 59, .6), rgba(15, 23, 42, .78)) !important;
    border-top-color: var(--ag-line) !important; border-right-color: var(--ag-line) !important; border-bottom-color: var(--ag-line) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
#kisanCard .kc-t:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
    border-top-color: rgba(251, 191, 36, .35) !important; border-right-color: rgba(251, 191, 36, .35) !important; border-bottom-color: rgba(251, 191, 36, .35) !important; }
#kisanCard .kc-t.border-amber-400 { box-shadow: 0 0 0 1px rgba(251, 191, 36, .55), 0 0 26px -8px rgba(251, 191, 36, .5); }
#kisanCard .kc-src { opacity: .8; }

@media (max-width: 900px) {
    #agHero { grid-template-columns: 1fr; gap: 12px; padding: 14px; border-radius: 24px; }
    #agHero .hx-side { padding: 0; background: none; box-shadow: none; position: static; max-height: none; overflow: visible; }
    #agHero .s3 { position: absolute; top: -26px; right: -48px; width: 200px; height: 160px; min-height: 0; opacity: .5; z-index: 1; pointer-events: none; }
    #agHero .s3 .ag-plane { width: 150px; }
    #agHero .s3 .ag-beam { height: 50px; }
    #agHero .none { display: none; }
    #kisanCard .kc-head { padding-right: 90px; }
}
@media (max-width: 380px) {
    #agHero .ct button { font-size: 10px; min-height: 48px; padding: 3px 1px; }
    #agHero .ct button i { font-size: 16px; }
}


/* ---------------- 25.09 — छोटे-मोटे गैप व ताज़गी ---------------- */
/* "नमस्ते … जी!" वाली पट्टी — अब इसी कार्ड के भीतर सबसे ऊपर (ag-theme.js ले आता है), हर टैब पर नहीं */
#agHero #userWelcomeKhatedarBar { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    padding: 0 0 12px !important; margin: 0 0 12px !important; border-bottom: 1px solid var(--ag-line) !important; }
#agHero #userWelcomeKhatedarBar::before, #agHero #userWelcomeKhatedarBar::after { display: none !important; }
#agHero #userWelcomeKhatedarBar h2 { font-size: clamp(18px, 2vw, 23px) !important; }
@media (max-width: 767px) {
    /* बटन एक ही पंक्ति में, अंगूठे से सरकाएँ — दो पंक्तियों में टूटकर जगह न घेरें */
    #agHero #userWelcomeKhatedarBar > div:last-child { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    #agHero #userWelcomeKhatedarBar > div:last-child::-webkit-scrollbar { display: none; }
    #agHero #userWelcomeKhatedarBar > div:last-child > * { flex-shrink: 0; }
}

/* टाइलें विषम हों तो आख़िरी अकेली न रहे — पूरी चौड़ाई ले (फ़ोन 2 स्तंभ, बड़े पर्दे 3 स्तंभ)।
   सिर्फ़ टाइलों का डिब्बा (#kcTiles): पहले यह `#kisanCard .grid` पर था, और डेस्कटॉप पर मौसम के दिनों वाले
   grid का चौथा कार्ड भी पूरी चौड़ाई में खिंच जाता था (फ़ोन पर नहीं, क्योंकि वहाँ नियम 640px से ऊपर का था)। */
#kcTiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) {
    #kcTiles > :last-child:nth-child(odd) { grid-column: auto; }
    #kcTiles > :last-child:nth-child(3n+2) { grid-column: span 2; }
    #kcTiles > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}

/* पूरी चौड़ाई का पहला टाइल (क्या बोएँ) गिनती में जुड़ता है, इसलिए ऊपर के "आख़िरी टाइल" नियम एक खाने से खिसक जाते —
   बाक़ी टाइलों की गिनती के हिसाब से आख़िरी को सीधा करो (फ़ोन 2 स्तंभ, बड़े पर्दे 3 स्तंभ) */
#kcTiles > .kc-wide ~ :last-child:nth-child(odd) { grid-column: auto; }
#kcTiles > .kc-wide ~ :last-child:nth-child(even) { grid-column: 1 / -1; }
@media (min-width: 640px) {
    #kcTiles > .kc-wide ~ :last-child:nth-child(3n+1) { grid-column: auto; }
    #kcTiles > .kc-wide ~ :last-child:nth-child(3n+2) { grid-column: 1 / -1; }
    #kcTiles > .kc-wide ~ :last-child:nth-child(3n) { grid-column: span 2; }
}
/* 🌱 क्या बोएँ — पहली स्क्रीन का सबसे ऊपर वाला, पूरी चौड़ाई का टाइल */
#kcTiles > .kc-wide { grid-column: 1 / -1; padding: 12px 14px; border-color: rgba(74, 222, 128, .5); background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(2, 6, 23, .78) 70%); box-shadow: 0 0 0 1px rgba(74, 222, 128, .12), 0 8px 26px rgba(22, 163, 74, .12); }
#kcTiles > .kc-wide > div:nth-child(2) { font-size: 21px; }
#kcTiles > .kc-wide > div:first-child { font-size: 12px; color: #86efac; }
#kcTiles > .kc-wide > div:last-child { font-size: 11.5px; }

/* फ़ोन: गाँव का नाम पढ़ने लायक (पुराना 9.5px वाला नियम बैज के लिए था, नाम पर भी लग गया था) */
@media (max-width: 640px) {
    #brandRow h1 span#gaonName { font-size: 16px !important; padding: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28vw; display: block; }
    /* ऊपर की पट्टी: तीन पंक्तियों की जगह एक — बाक़ी बातें नीचे "कानूनी अस्वीकरण" में हैं */
    body > .from-amber-600.bg-gradient-to-r { padding: 5px 10px !important; flex-wrap: nowrap !important; justify-content: center !important; }
    body > .from-amber-600.bg-gradient-to-r > div:last-child { display: none !important; }
    body > .from-amber-600.bg-gradient-to-r > div:first-child > span:first-child { font-size: 10.5px !important; padding: 2px 10px !important;
        max-width: calc(100vw - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    /* खण्डों के बड़े शीर्षक — फ़ोन पर तीन-तीन पंक्तियाँ न घेरें */
    main .tab-content h2 { font-size: 1.3rem !important; line-height: 1.3 !important; }
}


@media (prefers-reduced-motion: reduce) {
    #agAppBg *, #agHero *, #brandRow > div:first-child, header.glass-panel::after,
    .ag-glow::before, #agHero::before { animation: none !important; }
}


/* ---------------- इलाक़े की हलचल (feed.js) — दाएँ हिस्से में, ऐनिमेशन के नीचे ---------------- */
#agDock { min-width: 0; }
#agDock .fd { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px;
    background: rgba(15, 23, 42, .7); box-shadow: inset 0 0 0 1px var(--ag-line); }
#agDock .fd-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#agDock .fd-h b { font-size: 12.5px; font-weight: 900; color: #fde68a; }
#agDock .fd-h span { font-size: 10px; color: #94a3b8; text-align: right; }
#agDock .fd-tabs { display: flex; gap: 4px; }
#agDock .fd-tabs button, #agDock .fd-scope button, #agDock .fd-chips button {
    flex: 1 1 0; min-width: 0; padding: 6px 4px; border-radius: 10px; font: 800 11px/1.2 'Mukta', sans-serif; color: #cbd5e1; cursor: pointer;
    background: rgba(2, 6, 23, .6); border: 1px solid var(--ag-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#agDock .fd-tabs button.on, #agDock .fd-scope button.on, #agDock .fd-chips button.on { color: #1c1206; border-color: transparent; background: linear-gradient(135deg, #fcd34d, #f59e0b 60%, #d97706); }
#agDock .fd-tabs button[hidden] { display: none; }
#agDock .fd-pane[hidden] { display: none; }
#agDock .fd-scope, #agDock .fd-chips { display: flex; gap: 4px; margin-top: 2px; }
#agDock .fd-chips { flex-wrap: wrap; } #agDock .fd-chips button { flex: 0 1 auto; padding: 5px 9px; }
#agDock #fdCompose textarea { width: 100%; resize: vertical; min-height: 54px; max-height: 140px; padding: 8px 10px; border-radius: 12px; font-size: 13px; color: #fff;
    background: rgba(2, 6, 23, .75); border: 1px solid #334155; outline: none; }
#agDock #fdCompose textarea:focus { border-color: #38bdf8; }
#agDock .fd-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
#agDock #fdCnt { font: 500 11px 'Outfit', monospace; color: #64748b; } #agDock #fdCnt.warn { color: #fbbf24; }
#agDock #fdMsg { flex: 1; min-width: 0; font-size: 11px; color: #fda4af; line-height: 1.25; }
#agDock #fdSend { margin-left: auto; padding: 6px 14px; border-radius: 10px; font: 900 12px 'Mukta', sans-serif; color: #04121f; cursor: pointer; background: #38bdf8; border: 0; }
#agDock #fdSend:disabled { opacity: .5; }
#agDock .fd-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; scrollbar-width: thin; margin-top: 6px; }
#agDock .fd-post { display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(2, 6, 23, .55); border: 1px solid var(--ag-line); }
#agDock .fd-av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #1e293b; border: 1px solid rgba(251, 191, 36, .35); }
#agDock .fd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 11px; }
#agDock .fd-meta b { color: #fcd34d; font-weight: 800; } #agDock .fd-meta i { font-style: normal; color: #7dd3fc; font-size: 10px; } #agDock .fd-meta span { color: #64748b; font-size: 10px; }
#agDock .fd-title { font-size: 12px; font-weight: 800; color: #fff; margin-top: 1px; }
#agDock .fd-post p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: #e2e8f0; white-space: pre-line; overflow-wrap: anywhere; }
#agDock .fd-more { margin-top: 3px; font-size: 10.5px; font-weight: 800; color: #7dd3fc; background: none; border: 0; padding: 0; cursor: pointer; }
#agDock .fd-note { font-size: 11.5px; line-height: 1.45; color: #94a3b8; padding: 6px 2px; }
#agDock .fd-who { font-size: 11.5px; font-weight: 800; color: #e2e8f0; margin: 6px 0 2px; }
#agDock .fd-go { width: 100%; padding: 9px 10px; border-radius: 12px; font: 900 12.5px 'Mukta', sans-serif; color: #e2e8f0; cursor: pointer; background: rgba(2, 6, 23, .8); border: 1px solid #475569; }
#agDock .fd-go:hover { border-color: #fbbf24; color: #fde68a; }
#agDock .fd-embed { margin-top: 4px; border-radius: 12px; overflow: hidden; max-height: 430px; overflow-y: auto; background: rgba(2, 6, 23, .6); min-height: 60px; }
#agDock .fd-ext { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 800; color: #7dd3fc; text-decoration: none; }
#agDock #fdKarmList { max-height: 280px; }
#agDock article { min-width: 0; }
@media (max-width: 900px) { #agDock .fd-list { max-height: 220px; } #agDock #fdKarmList { max-height: 320px; } }

/* AI ग्राम सहायक व सूत्रधार संवाद (feed.js) — 5 पंक्तियों का सतत लाइव प्रवाह */
#agDock .fd-agent-stream {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(51, 65, 85, .55);
}
#agDock .fd-agent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 2px 2px;
}
#agDock .fd-agent-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
#agDock .fd-agent-title b {
    font-size: 11.5px;
    font-weight: 900;
    color: #fde68a;
    letter-spacing: -0.1px;
    white-space: nowrap;
}
#agDock .fd-agent-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, .85);
    animation: fdPulse 1.8s infinite;
}
@keyframes fdPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}
#agDock .fd-agent-pill {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .3);
    padding: 1px 5px;
    border-radius: 999px;
}
#agDock .fd-agent-vname {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    color: #fbbf24;
    white-space: nowrap;
}
#agDock .fd-agent-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 290px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.4) rgba(15, 23, 42, 0.4);
}
#agDock .fd-agent-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 11px;
    background: rgba(2, 6, 23, .65);
    border: 1px solid rgba(51, 65, 85, .5);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
    animation: fdRowIn .35s ease-out;
}
#agDock .fd-agent-row:hover {
    background: rgba(15, 23, 42, .88);
    border-color: rgba(251, 191, 36, .45);
}
@keyframes fdRowIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#agDock .fd-agent-av {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0f172a;
    border: 1px solid rgba(251, 191, 36, .35);
    font-size: 13px;
    margin-top: 1px;
    user-select: none;
}
#agDock .fd-agent-body {
    flex: 1 1 auto;
    min-width: 0;
}
#agDock .fd-agent-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 5px;
    font-size: 10.5px;
    line-height: 1.25;
}
#agDock .fd-agent-name {
    color: #fde68a;
    font-weight: 800;
}
#agDock .fd-agent-role {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 600;
}
#agDock .fd-agent-loc {
    color: #38bdf8;
    font-size: 9px;
}
#agDock .fd-agent-time {
    color: #64748b;
    font-size: 9px;
    margin-left: auto;
}
#agDock .fd-agent-text {
    margin: 2px 0 0;
    font-size: 11.5px;
    line-height: 1.4;
    color: #e2e8f0;
    overflow-wrap: anywhere;
}
#agDock .fd-agent-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9.5px;
    color: #64748b;
    padding: 2px 2px 0;
}
#agDock .fd-agent-refresh-btn {
    background: none;
    border: 0;
    color: #38bdf8;
    cursor: pointer;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}
#agDock .fd-agent-refresh-btn:hover {
    color: #7dd3fc;
    background: rgba(56, 189, 248, .12);
}

/* प्रोफ़ाइल (profile.js): आड़ी पंक्तियाँ बिना स्क्रॉलबार के; सिर्फ़ प्रोफ़ाइल के भीतर */
.pf-noscroll { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pf-noscroll::-webkit-scrollbar { display: none; }

/* 3D मैप के ऊपर गाँव में चल रही चर्चा (HUD) व मोडल का दृश्य संरक्षण */
#agRecentDiscussionsHUD {
    z-index: 5000 !important;
    pointer-events: auto !important;
}
#agVillagerModal, #agPaharModal, #agRosterModal, #agMandiModal, #agZevModal, #agYojanaModal {
    z-index: 5200 !important;
}

/* भाषा चयन मेनू (Language Picker Dropdown) का शीर्ष स्टैकिंग स्तर — हेडर मेनू के ऊपर */
header { position: sticky !important; top: 0 !important; z-index: 1000 !important; }
#headerRowMain, header > div:first-child { position: relative !important; z-index: 10000 !important; }
#headerActionGroup { position: relative !important; z-index: 10001 !important; }
#agLanguagePicker { position: relative !important; z-index: 10002 !important; }
#agLanguagePicker.open { z-index: 10005 !important; }
#agLanguageMenu, .al-menu, #agLanguagePicker .al-menu {
    position: fixed !important;
    z-index: 2147483647 !important;
    min-width: 190px !important;
    max-height: min(72vh, 480px) !important;
    overflow-y: auto !important;
    padding: 6px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(245, 215, 130, .45) !important;
    background: #0b1120 !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(245, 215, 130, .45) !important;
    pointer-events: auto !important;
}
#agLanguageMenu button, .al-menu button, #agLanguagePicker .al-menu button {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 38px !important;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #e2e8f0 !important;
    font: 700 14px/1.2 Mukta, "Noto Sans", sans-serif !important;
    cursor: pointer !important;
    text-align: left !important;
    position: relative !important;
    z-index: 2147483647 !important;
    pointer-events: auto !important;
}
#agLanguageMenu button small, .al-menu button small {
    font: 600 10.5px Mukta, sans-serif !important;
    color: #94a3b8 !important;
}
#agLanguageMenu button:hover, #agLanguageMenu button:focus-visible,
.al-menu button:hover, .al-menu button:focus-visible {
    background: rgba(245, 215, 130, .14) !important;
    outline: none !important;
}
#agLanguageMenu button[aria-checked="true"], .al-menu button[aria-checked="true"] {
    background: linear-gradient(135deg, #f5d782, #e8ad4d) !important;
    color: #111827 !important;
}
#agLanguageMenu button[aria-checked="true"] small, .al-menu button[aria-checked="true"] small {
    color: #3f3f46 !important;
}
#tabNav { position: relative !important; z-index: 1 !important; }

/* 2D नक्शे से उड़ान बटन हटाना — 3D मैप में ही उपलब्ध */
#agEarthBtn {
    display: none !important;
}




/* ☀️ दिन की रोशनी (ag-sunlit) में पढ़ने लायक रंग — हल्के आसमानी/सफ़ेद पटल पर गहरे रंग */
html.ag-sunlit #tabNav .tab-btn:not(.active-tab),
html.ag-sunlit #tabNav .tab-btn:not(.active-tab) span { color: #1e293b !important; }
html.ag-sunlit #tabNav .tab-btn:not(.active-tab):hover,
html.ag-sunlit #tabNav .tab-btn:not(.active-tab):hover span { color: #0f172a !important; }
html.ag-sunlit #welcomeUserEmail,
html.ag-sunlit #gaonTagline { color: #334155 !important; }
html.ag-sunlit #agHero h2 { color: #0f172a !important; }
html.ag-sunlit #agHero h2 > span:not([class]) { color: inherit !important; }
html.ag-sunlit header .text-emerald-200,
html.ag-sunlit header .text-emerald-300 { color: #065f46 !important; }
html.ag-sunlit header .text-amber-200,
html.ag-sunlit header .text-amber-300 { color: #78350f !important; }
html.ag-sunlit header .text-cyan-200,
html.ag-sunlit header .text-cyan-300 { color: #0e7490 !important; }
html.ag-sunlit .gz2-pr b,
html.ag-sunlit .gz2-pr em { color: #be123c !important; }
html.ag-sunlit .gz2-vs.lo { color: #c2410c !important; }
html.ag-sunlit .fd-agent-ai-badge { color: #065f46 !important; background: rgba(16, 185, 129, .18) !important; }
html.ag-sunlit #agDock .fd-agent-vname { color: #92400e !important; }

/* हीरो का ऊपरी पट्टी: बटनों की पंक्ति सिकुड़ सके — वरना desktop पर नमस्ते/नाम की जगह 0 हो जाती थी */
#agHero .glass-panel > .flex-wrap.shrink-0 { flex-shrink: 1 !important; min-width: 0 !important; }
html.ag-sunlit #agHero button[class*="bg-amber-500/20"] { color: #78350f !important; }
html.ag-sunlit #agHero button[class*="bg-emerald-500/20"] { color: #065f46 !important; }
#agHero .glass-panel:has(> .flex-wrap.shrink-0) { flex-wrap: wrap !important; row-gap: 10px; }

/* 🧹 3D नक्शा: फ़ालतू बटन और सेटिंग वाली खिड़कियाँ छिपी (मोबाइल पर दिक़्क़त थी)।
   रखे हैं: चौपाल पर बैठें, भू-नक्शा, सुधारें (admin), बाइक, ड्रोन, बैठक, उड़ान, बंद। */
#v3d .chip:not([data-v="sit-chaupal"]):not([data-v="mosaic-toggle"]):not([data-v="fix"]):not([data-v="bike"]):not([data-v="drone"]),
#v3d [data-v="power-toggle"], #v3d [data-v="hydro-toggle"], #v3d [data-v="sat-toggle"], #v3d [data-v="roads-info"],
#v3d [data-v="ai-expand"], #v3d [data-v="zev-audit"], #v3d [data-v="talk"], #v3d [data-v="yojana"], #v3d [data-v="speak-welcome"],
#v3d [data-w="adj"], #v3d [data-w="adjout"], #v3d #v3dW, #v3d #v3dWHud, #v3d #v3dSatModal, #v3d #v3dSatCr,
#v3d #v3dName, #v3d #v3dSubttl, #v3d #v3dCred { display: none !important; }
