/* =========================================================================
   RANGMANCH — MAKEOVERS v2 (themes.css)
   -------------------------------------------------------------------------
   Pure look-and-feel: themes repaint via the CSS variables the base
   stylesheet is built on, then layer decorations. Every decoration is
   pointer-events:none and sits BELOW the profile drawer (z 70/80), so
   nothing functional is ever covered or blocked.

     nautanki    Nautanki Mela      — THE SHOWSTOPPER. Maximum mela.
     prithvi     Prithvi Monsoon    — café bulbs, layered rain, lightning
     yakshagana  Yakshagana Blaze   — embers, twin medallions, torchlight
     nukkad      Nukkad Beat        — stamp-slams, spray art, marching tape

   No data-theme attribute = the untouched original look.
   ========================================================================= */

/* ---------- switcher button + menu ---------------------------------------- */

.theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 5px 12px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--brass);
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  transition: border-color .15s, color .15s, transform .15s;
  align-self: center;
}
.theme-btn:hover { border-color: var(--brass); color: var(--brass-bright); transform: translateY(-1px); }
.theme-btn .music-dot { color: var(--ok); animation: th-pulse 1.4s ease-in-out infinite; }

/* z-index 60 counts only against siblings INSIDE .brand, which styles.css lifts
   to z-index 50 precisely so this menu clears the masthead's marquee/bunting
   decor (z-index 41). Isolation makes that promise explicit: the menu can never
   be flattened back into the masthead's own layer by a future theme. */
.theme-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  isolation: isolate;
  min-width: 296px; padding: 8px;
  background: var(--velvet-raised); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.theme-menu .eyebrow { display: block; padding: 6px 10px 4px; }
.theme-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; background: none; border: none; border-radius: 8px;
  color: var(--ivory); text-align: left; font-size: 13.5px;
  transition: background .12s, transform .12s;
}
.theme-menu-item:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(2px); }
.theme-menu-item .swatches { display: flex; gap: 3px; flex: none; }
.theme-menu-item .swatches i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.theme-menu-item .t-name { display: block; font-weight: 600; }
.theme-menu-item .t-tag { display: block; font-size: 11px; color: var(--smoke); }
.theme-menu-item .t-check { margin-left: auto; color: var(--brass-bright); font-size: 14px; visibility: hidden; }
.theme-menu-item.on .t-check { visibility: visible; }
.theme-music-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; padding: 9px 10px 5px;
  border-top: 1px solid var(--line-soft);
  color: var(--smoke); font-size: 12.5px;
}
.theme-music-row .music-toggle {
  margin-left: auto; width: 38px; height: 20px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; position: relative;
  transition: background .15s, border-color .15s;
}
.theme-music-row .music-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--smoke); transition: left .15s, background .15s;
}
.theme-music-row .music-toggle.on { background: var(--curtain); border-color: var(--brass); }
.theme-music-row .music-toggle.on::after { left: 20px; background: var(--brass-bright); }
.theme-music-hint { padding: 2px 10px 6px; font-size: 10.5px; color: var(--smoke); opacity: .8; }

/* ---------- shared decoration machinery ------------------------------------ */

#theme-stage { position: fixed; inset: 0; z-index: 35; pointer-events: none; overflow: hidden; }
#theme-stage * { pointer-events: none; }
#theme-stage .mega-art { position: absolute; opacity: .085; }
#theme-stage .mega-art svg { width: 100%; height: 100%; display: block; }

#theme-transition { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

/* trivia pop-ups */
.greenroom-note {
  position: fixed; left: 18px; bottom: 18px; z-index: 65;
  width: min(324px, calc(100vw - 36px));
  padding: 14px 16px 12px;
  background: var(--velvet-raised); border: 1px solid var(--brass);
  border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px);
  transition: transform .35s ease, opacity .35s ease;
}
.greenroom-note.show { opacity: 1; transform: translateY(0); }
.greenroom-note .eyebrow { display: block; margin-bottom: 5px; }
.greenroom-note p { font-size: 13px; line-height: 1.5; color: var(--ivory); }
.greenroom-note .note-close {
  position: absolute; top: 6px; right: 8px; pointer-events: auto;
  background: none; border: none; color: var(--smoke); font-size: 15px; padding: 4px;
}
.greenroom-note .note-close:hover { color: var(--ivory); }
.greenroom-note .note-sticker {
  position: absolute; top: -14px; right: 14px; font-size: 24px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.4));
  animation: th-wiggle 2.4s ease-in-out infinite;
}

/* shared keyframes */
@keyframes th-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes th-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes th-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes th-spin { to { transform: rotate(360deg); } }
@keyframes th-spin-rev { to { transform: rotate(-360deg); } }
@keyframes th-flicker { 0%, 100% { opacity: .85; } 42% { opacity: .55; } 60% { opacity: 1; } 78% { opacity: .65; } }
@keyframes th-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes th-wiggle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes th-chase { to { background-position: 32px 0; } }
@keyframes th-fall {
  0%   { transform: translateY(-6vh) rotate(0deg) translateX(0); }
  25%  { transform: translateY(22vh) rotate(120deg) translateX(14px); }
  50%  { transform: translateY(50vh) rotate(240deg) translateX(-12px); }
  75%  { transform: translateY(78vh) rotate(320deg) translateX(10px); }
  100% { transform: translateY(108vh) rotate(420deg) translateX(-6px); }
}
@keyframes th-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: .9; }
  100% { transform: translateY(-72vh) translateX(24px); opacity: 0; }
}
@keyframes th-twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: .9; transform: scale(1.15); } }
@keyframes th-rain-move { to { background-position: 0 640px; } }
@keyframes th-lightning { 0%, 95.4%, 96.4%, 100% { opacity: 0; } 95.8% { opacity: .16; } 96% { opacity: .05; } 96.2% { opacity: .12; } }
@keyframes th-steam { to { stroke-dashoffset: -120; } }
@keyframes th-beam {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(24deg); }
}
@keyframes th-ripple {
  0% { transform: scale(.4); opacity: .6; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes th-firework {
  0%, 78% { opacity: 0; transform: scale(.3); }
  84% { opacity: .95; transform: scale(1.05); }
  92% { opacity: .5; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* pop-up entrance per theme */
@keyframes th-note-chit {
  0% { opacity: 0; transform: translateY(40px) rotate(-7deg) scale(.85); }
  60% { opacity: 1; transform: translateY(-6px) rotate(2.5deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) rotate(-.6deg) scale(1); }
}
@keyframes th-note-lift {
  0% { opacity: 0; transform: translateY(22px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes th-note-flame {
  0% { opacity: 0; transform: scaleY(.55) translateY(26px); filter: brightness(2.1) saturate(1.6); }
  55% { opacity: 1; filter: brightness(1.35); }
  100% { opacity: 1; transform: scaleY(1) translateY(0); filter: brightness(1); }
}
@keyframes th-note-stamp {
  0% { opacity: 0; transform: scale(1.65) rotate(5deg); }
  62% { opacity: 1; transform: scale(.96) rotate(-2.5deg); }
  80% { transform: scale(1.02) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-1.4deg); }
}

/* transition overlays */
#theme-transition .tt-panel {
  position: absolute; top: 0; bottom: 0; width: 51%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 18px, rgba(255,255,255,.05) 18px 36px),
    var(--curtain, #7a2436);
  box-shadow: 0 0 60px rgba(0,0,0,.6) inset;
}
#theme-transition .tt-panel.l { left: 0; animation: tt-curtain-l 1.3s ease-in-out forwards; }
#theme-transition .tt-panel.r { right: 0; animation: tt-curtain-r 1.3s ease-in-out forwards; }
#theme-transition .tt-flash {
  position: absolute; top: 50%; left: 50%; font-size: 58px; opacity: 0;
  animation: tt-flash 1.3s ease-in-out forwards;
}
@keyframes tt-curtain-l { 0% { transform: translateX(-101%); } 36%, 64% { transform: translateX(0); } 100% { transform: translateX(-101%); } }
@keyframes tt-curtain-r { 0% { transform: translateX(101%); } 36%, 64% { transform: translateX(0); } 100% { transform: translateX(101%); } }
@keyframes tt-flash {
  0%, 30% { opacity: 0; transform: translate(-50%,-50%) scale(.5) rotate(0deg); }
  46%, 56% { opacity: 1; transform: translate(-50%,-50%) scale(1.1) rotate(354deg); }
  75%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(.7) rotate(360deg); }
}
#theme-transition .tt-dim {
  position: absolute; inset: 0; background: #05070a; opacity: 0;
  animation: tt-dim 1.3s ease-in-out forwards;
}
#theme-transition .tt-bulbglow {
  position: absolute; top: 42%; left: 50%; width: 260px; height: 260px; margin-left: -130px;
  border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255,207,138,.9), rgba(255,207,138,.15) 55%, transparent 70%);
  animation: tt-bulbglow 1.3s ease-in-out forwards;
}
@keyframes tt-dim { 0% { opacity: 0; } 34%, 66% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tt-bulbglow { 0%, 30% { opacity: 0; } 44%, 58% { opacity: .9; } 72%, 100% { opacity: 0; } }
#theme-transition .tt-fire {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd54f 0 18%, #ff7b1f 40%, #c62f10 62%, #2b0a02 82%);
  animation: tt-fire 1.3s ease-in-out forwards;
  filter: blur(2px);
}
@keyframes tt-fire {
  0% { transform: scale(0); opacity: 0; }
  30% { opacity: 1; }
  40%, 60% { transform: scale(60); opacity: 1; }
  100% { transform: scale(60); opacity: 0; }
}
#theme-transition .tt-stripes {
  position: absolute; inset: -20% -10%;
  background: repeating-linear-gradient(-45deg, #191919 0 44px, #f5b301 44px 88px);
  animation: tt-stripes 1.3s cubic-bezier(.65,0,.35,1) forwards;
}
@keyframes tt-stripes {
  0% { transform: translateX(-115%) skewX(-6deg); }
  36%, 62% { transform: translateX(0) skewX(0); }
  100% { transform: translateX(115%) skewX(6deg); }
}
#theme-transition .tt-confetti span {
  position: absolute; top: -4vh; width: 9px; height: 14px; border-radius: 2px;
  animation: th-fall linear forwards;
}

/* =========================================================================
   THEME · NAUTANKI MELA — THE SHOWSTOPPER 🎪
   Rani pink, marigold and parrot green under an aubergine sky. Marquee
   bulbs chase the masthead, garlands and petals never stop, spotlights
   sweep the crowd, a giant mela mask breathes behind the ledger.
   ========================================================================= */

html[data-theme="nautanki"] {
  --ink: #1c0a22;
  --ink-deep: #120516;
  --velvet: #2c1036;
  --velvet-raised: #3a1548;
  --curtain: #d81b7f;
  --curtain-deep: #9c0f5a;
  --brass: #f5b301;
  --brass-bright: #ffd24d;
  --ivory: #fff3e0;
  --smoke: #c39fb4;
  --line: rgba(245, 179, 1, 0.30);
  --line-soft: rgba(245, 179, 1, 0.14);
  --ok: #58b368;
  --danger: #ff5470;
  --shadow: 0 18px 50px rgba(20, 0, 30, 0.65);
}
html[data-theme="nautanki"] body {
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(216, 27, 127, 0.18), transparent 60%),
    radial-gradient(900px 700px at 88% 110%, rgba(88, 179, 104, 0.15), transparent 60%),
    radial-gradient(700px 500px at 8% 108%, rgba(245, 179, 1, 0.10), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.016) 0 22px, transparent 22px 44px),
    var(--ink);
}
html[data-theme="nautanki"] ::selection { background: var(--curtain); color: #fff; }

/* the marquee: chasing bulbs along the top, double jhalar bunting below */
html[data-theme="nautanki"] .masthead::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  pointer-events: none; z-index: 41;
  background-image: radial-gradient(circle 2.6px at 8px 3.5px, #ffd24d 0 2.6px, rgba(255, 210, 77, .2) 3.4px, transparent 5px);
  background-size: 32px 7px; background-repeat: repeat-x;
  animation: th-chase 1.1s steps(4) infinite;
}
html[data-theme="nautanki"] .masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -25px; height: 26px;
  pointer-events: none; z-index: 41;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='14' viewBox='0 0 72 14'%3E%3Cpath d='M0 0l12 13L24 0z' fill='%23d81b7f'/%3E%3Cpath d='M24 0l12 13L48 0z' fill='%23f5b301'/%3E%3Cpath d='M48 0l12 13L72 0z' fill='%2358b368'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='14' viewBox='0 0 72 14'%3E%3Cpath d='M0 0l12 13L24 0z' fill='%2358b368'/%3E%3Cpath d='M24 0l12 13L48 0z' fill='%23d81b7f'/%3E%3Cpath d='M48 0l12 13L72 0z' fill='%23f5b301'/%3E%3C/svg%3E");
  background-repeat: repeat-x, repeat-x;
  background-position: 0 0, 36px 11px;
  opacity: .95;
}
/* shimmering title */
html[data-theme="nautanki"] .brand h1 {
  background: linear-gradient(100deg, #ffd24d 0%, #ff7ab8 30%, #ffd24d 50%, #7ee08a 70%, #ffd24d 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: nautanki-shimmer 6s linear infinite;
}
html[data-theme="nautanki"] .brand h1 em { color: transparent; -webkit-text-fill-color: transparent; }
@keyframes nautanki-shimmer { to { background-position: -300% 0; } }
html[data-theme="nautanki"] .stub { transition: transform .18s, box-shadow .18s; }
html[data-theme="nautanki"] .stub:hover {
  transform: translateY(-3px) rotate(-.4deg);
  box-shadow: 0 14px 40px rgba(216, 27, 127, 0.28), 0 0 0 1px rgba(245, 179, 1, .35);
}
html[data-theme="nautanki"] .btn { box-shadow: 0 2px 18px rgba(245, 179, 1, 0.4); }

/* stage decorations */
#theme-stage .nk-garland { position: absolute; top: -6px; font-size: 22px; letter-spacing: 2px; writing-mode: vertical-rl; opacity: .92; animation: th-sway 5.5s ease-in-out infinite; transform-origin: top center; }
#theme-stage .nk-garland.g1 { left: 12px; }
#theme-stage .nk-garland.g2 { right: 12px; animation-delay: -2.7s; }
#theme-stage .nk-garland.g3 { left: 44px; font-size: 17px; opacity: .6; animation-delay: -1.4s; }
#theme-stage .nk-garland.g4 { right: 44px; font-size: 17px; opacity: .6; animation-delay: -4s; }
#theme-stage .nk-wheel { position: absolute; bottom: 76px; right: 20px; font-size: 44px; opacity: .85; animation: th-spin 9s linear infinite; filter: drop-shadow(0 0 12px rgba(216,27,127,.5)); }
#theme-stage .nk-dancer { position: absolute; bottom: 84px; left: 20px; font-size: 34px; animation: th-float 3.6s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(245,179,1,.45)); }
#theme-stage .nk-petal { position: absolute; top: -6vh; animation: th-fall linear infinite; }
#theme-stage .nk-spark { position: absolute; color: #ffd24d; animation: th-twinkle ease-in-out infinite; text-shadow: 0 0 8px rgba(255, 210, 77, .9); }
#theme-stage .nk-firework { position: absolute; font-size: 34px; animation: th-firework 7.5s ease-out infinite; }
#theme-stage .nk-firework.f1 { top: 14%; left: 8%; }
#theme-stage .nk-firework.f2 { top: 20%; right: 10%; animation-delay: -3.7s; }
#theme-stage .nk-beam {
  position: absolute; top: -12vh; width: 210px; height: 76vh;
  transform-origin: top center; opacity: .10;
  background: linear-gradient(180deg, rgba(255, 210, 77, .95), transparent 78%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  animation: th-beam 11s ease-in-out infinite;
}
#theme-stage .nk-beam.b1 { left: 16%; }
#theme-stage .nk-beam.b2 { right: 16%; animation-delay: -5.5s; animation-duration: 13s; }
#theme-stage .nk-rangoli {
  position: absolute; bottom: -110px; left: -110px; width: 300px; height: 300px;
  border-radius: 50%; opacity: .16;
  background:
    repeating-conic-gradient(from 0deg, #d81b7f 0deg 20deg, #f5b301 20deg 40deg, #58b368 40deg 60deg);
  -webkit-mask: radial-gradient(circle, transparent 0 30%, #000 31% 46%, transparent 47% 58%, #000 59% 74%, transparent 75%);
  mask: radial-gradient(circle, transparent 0 30%, #000 31% 46%, transparent 47% 58%, #000 59% 74%, transparent 75%);
  animation: th-spin 42s linear infinite;
}
#theme-stage .nk-mask-art { top: 10vh; right: -90px; width: 460px; height: 552px; animation: th-breathe 8s ease-in-out infinite; }
#theme-stage .nk-dhol-art { bottom: -60px; left: 30%; width: 380px; height: 300px; animation: th-float 7s ease-in-out infinite; }
html[data-theme="nautanki"] .greenroom-note { border-width: 2px; border-style: dashed; }
html[data-theme="nautanki"] .greenroom-note.show { animation: th-note-chit .65s cubic-bezier(.34,1.56,.64,1) both; }
html[data-theme="nautanki"] .greenroom-note::before {
  content: ""; position: absolute; top: -1px; left: 10px; right: 10px; height: 5px;
  background: repeating-linear-gradient(90deg, #d81b7f 0 14px, #f5b301 14px 28px, #58b368 28px 42px);
  border-radius: 0 0 4px 4px;
}

/* =========================================================================
   THEME · PRITHVI MONSOON
   ========================================================================= */

html[data-theme="prithvi"] {
  --ink: #0f151c;
  --ink-deep: #090d12;
  --velvet: #17222b;
  --velvet-raised: #1e2c37;
  --curtain: #b0562e;
  --curtain-deep: #83371a;
  --brass: #e0a458;
  --brass-bright: #ffcf8a;
  --ivory: #f5ead8;
  --smoke: #8fa1ad;
  --line: rgba(224, 164, 88, 0.26);
  --line-soft: rgba(224, 164, 88, 0.12);
  --ok: #7fae7a;
  --danger: #d4634f;
  --shadow: 0 18px 50px rgba(2, 8, 14, 0.7);
}
html[data-theme="prithvi"] body {
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(224, 164, 88, 0.09), transparent 60%),
    radial-gradient(900px 700px at 12% 112%, rgba(176, 86, 46, 0.20), transparent 60%),
    var(--ink);
}
html[data-theme="prithvi"] ::selection { background: var(--curtain); color: var(--ivory); }
html[data-theme="prithvi"] .masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 11px;
  pointer-events: none; z-index: 41;
  background-image: radial-gradient(circle 3.5px at 16px 5px, #ffcf8a 0 3.5px, rgba(255, 207, 138, .25) 4.5px, transparent 6px);
  background-size: 32px 11px; background-repeat: repeat-x;
  animation: th-flicker 3.2s ease-in-out infinite;
}
html[data-theme="prithvi"] .brand h1 em { color: var(--brass-bright); text-shadow: 0 0 16px rgba(255, 207, 138, .4); }
html[data-theme="prithvi"] .stub:hover { box-shadow: 0 12px 36px rgba(224, 164, 88, 0.18); }

#theme-stage .pv-rain, #theme-stage .pv-rain2 {
  position: absolute; inset: -40px 0; opacity: .5;
  background-image: linear-gradient(170deg, transparent 0 46%, rgba(173, 208, 234, 0.10) 48%, transparent 52%);
  background-size: 26px 160px;
  animation: th-rain-move 8s linear infinite;
}
#theme-stage .pv-rain2 {
  opacity: .3; background-size: 42px 230px;
  background-image: linear-gradient(168deg, transparent 0 47%, rgba(173, 208, 234, 0.14) 49%, transparent 52%);
  animation-duration: 5.5s;
}
#theme-stage .pv-lightning { position: absolute; inset: 0; background: #cfe4f2; opacity: 0; animation: th-lightning 16s linear infinite; }
#theme-stage .pv-chai { position: absolute; bottom: 88px; left: 20px; font-size: 30px; opacity: .8; animation: th-float 5s ease-in-out infinite; }
#theme-stage .pv-umbrella { position: absolute; top: 30%; right: 2%; font-size: 26px; opacity: .55; animation: th-sway 6.5s ease-in-out infinite; }
#theme-stage .pv-kettle-art { bottom: -40px; right: -60px; width: 400px; height: 400px; }
#theme-stage .pv-kettle-art .steam {
  stroke-dasharray: 16 18;
  animation: th-steam 5s linear infinite;
}
#theme-stage .pv-kettle-art .steam.s2 { animation-duration: 6.4s; animation-delay: -2s; }
#theme-stage .pv-kettle-art .steam.s3 { animation-duration: 7.6s; animation-delay: -4s; }
html[data-theme="prithvi"] .greenroom-note.show { animation: th-note-lift .6s ease-out both; }

/* ---- Prithvi Monsoon extravaganza: café script, bulbs, real rain ---- */
html[data-theme="prithvi"] .eyebrow,
html[data-theme="prithvi"] .sub,
html[data-theme="prithvi"] .hint,
html[data-theme="prithvi"] .greenroom-note,
html[data-theme="prithvi"] .theme-menu-item .t-tag,
html[data-theme="prithvi"] .stub .card-sub {
  font-family: "Kalam", "Segoe Print", "Comic Sans MS", cursive; letter-spacing: 0.02em;
}
html[data-theme="prithvi"] h2 { text-shadow: 0 0 24px rgba(224, 164, 88, 0.28); }
html[data-theme="prithvi"] .brand h1 { animation: pv-bulb-breathe 5.5s ease-in-out infinite; }
@keyframes pv-bulb-breathe {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 207, 138, 0.15); }
  50% { text-shadow: 0 0 26px rgba(255, 207, 138, 0.45); }
}
html[data-theme="prithvi"] .btn:not(.ghost):not(.danger) { box-shadow: 0 0 14px rgba(224, 164, 88, 0.22); }
html[data-theme="prithvi"] .stub { transition: box-shadow .3s, transform .3s; }
html[data-theme="prithvi"] .stub:hover { transform: translateY(-2px); }

/* the drooping bulb string */
#theme-stage .pv-bulbwire { position: absolute; top: 0; left: 0; right: 0; height: 64px; opacity: 0.85; }
#theme-stage .pv-bulbwire svg { width: 100%; height: 100%; }
#theme-stage .pv-bulbwire path { stroke: rgba(224, 164, 88, 0.45); }
#theme-stage .pv-bulbwire .bulb {
  fill: #ffd98a;
  filter: drop-shadow(0 0 6px rgba(255, 217, 138, 0.9));
  animation: pv-glow 3.4s ease-in-out infinite;
}
@keyframes pv-glow { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* actual raindrops: streaks, blurred back curtain, beads on the glass, splashes */
#theme-stage .pv-drop {
  position: absolute; top: -8vh; width: 1.6px; border-radius: 2px;
  background: linear-gradient(rgba(207, 228, 242, 0), rgba(207, 228, 242, 0.75));
  animation: pv-fall linear infinite;
}
#theme-stage .pv-drop.d2 { width: 1px; filter: blur(0.7px); }
@keyframes pv-fall { to { transform: translate3d(var(--dx, -3vw), 116vh, 0); } }
#theme-stage .pv-bead {
  position: absolute;
  border-radius: 45% 55% 60% 40% / 60% 55% 45% 40%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), rgba(207, 228, 242, 0.18) 55%, rgba(207, 228, 242, 0.05));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  animation: pv-slide ease-in infinite;
}
@keyframes pv-slide {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.85; }
  70% { opacity: 0.7; }
  100% { transform: translateY(36vh) translateX(5px); opacity: 0; }
}
#theme-stage .pv-splash {
  position: absolute; width: 14px; height: 5px; opacity: 0;
  border: 1px solid rgba(207, 228, 242, 0.5); border-radius: 50%;
  animation: pv-ripple ease-out infinite;
}
@keyframes pv-ripple { 0% { transform: scale(0.2); opacity: 0.7; } 80% { opacity: 0.15; } 100% { transform: scale(2.5); opacity: 0; } }

/* monsoon sky traffic + street life */
#theme-stage .pv-cloud { position: absolute; font-size: 44px; opacity: 0.22; animation: pv-drift linear infinite; }
#theme-stage .pv-cloud.c1 { top: 4vh; animation-duration: 85s; }
#theme-stage .pv-cloud.c2 { top: 10vh; font-size: 58px; animation-duration: 115s; animation-delay: -45s; }
#theme-stage .pv-cloud.c3 { top: 2vh; font-size: 34px; animation-duration: 98s; animation-delay: -70s; }
@keyframes pv-drift { from { left: -12vw; } to { left: 112vw; } }
#theme-stage .pv-walker { position: absolute; bottom: 4vh; font-size: 30px; opacity: 0.6; animation: pv-walk 48s linear infinite; }
@keyframes pv-walk {
  0% { left: -8vw; transform: translateY(0); }
  25% { transform: translateY(-4px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-4px); }
  100% { left: 108vw; transform: translateY(0); }
}
#theme-stage .pv-boat { position: absolute; bottom: 1.5vh; font-size: 22px; opacity: 0.5; animation: pv-sail 74s linear infinite; }
@keyframes pv-sail { 0% { left: 110vw; transform: rotate(2deg); } 50% { transform: rotate(-3deg); } 100% { left: -10vw; transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  #theme-stage .pv-bulbwire .bulb, #theme-stage .pv-cloud, #theme-stage .pv-walker,
  #theme-stage .pv-boat, html[data-theme="prithvi"] .brand h1 { animation: none; }
}

/* =========================================================================
   THEME · YAKSHAGANA BLAZE
   ========================================================================= */

html[data-theme="yakshagana"] {
  --ink: #150704;
  --ink-deep: #0c0302;
  --velvet: #271009;
  --velvet-raised: #34150b;
  --curtain: #c62f10;
  --curtain-deep: #8e1f08;
  --brass: #ffb300;
  --brass-bright: #ffd54f;
  --ivory: #ffefd0;
  --smoke: #bb8f6d;
  --line: rgba(255, 179, 0, 0.32);
  --line-soft: rgba(255, 179, 0, 0.14);
  --ok: #7fae7a;
  --danger: #ff6b4a;
  --shadow: 0 18px 50px rgba(10, 1, 0, 0.75);
}
html[data-theme="yakshagana"] body {
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(255, 179, 0, 0.11), transparent 60%),
    radial-gradient(760px 560px at 6% 108%, rgba(198, 47, 16, 0.32), transparent 62%),
    radial-gradient(760px 560px at 94% 108%, rgba(198, 47, 16, 0.32), transparent 62%),
    var(--ink);
}
html[data-theme="yakshagana"] ::selection { background: var(--curtain); color: var(--ivory); }
html[data-theme="yakshagana"] .brand h1 em { color: var(--brass); text-shadow: 0 0 20px rgba(255, 179, 0, .55); }
html[data-theme="yakshagana"] .masthead { border-bottom: 2px solid var(--brass); }
html[data-theme="yakshagana"] .stub:hover { box-shadow: 0 12px 40px rgba(198, 47, 16, 0.34); }

#theme-stage .yk-torch { position: absolute; bottom: 86px; font-size: 34px; animation: th-flicker 1.6s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 140, 0, .85)); }
#theme-stage .yk-torch.t1 { left: 18px; }
#theme-stage .yk-torch.t2 { right: 18px; animation-delay: -.8s; }
#theme-stage .yk-ring, #theme-stage .yk-ring2 {
  position: absolute; top: 66px; left: 50%; border-radius: 50%;
}
#theme-stage .yk-ring {
  width: 360px; height: 360px; margin-left: -180px; opacity: .11;
  background: repeating-conic-gradient(from 0deg, rgba(255, 179, 0, .9) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 0 62%, #000 63%);
  mask: radial-gradient(circle, transparent 0 62%, #000 63%);
  animation: th-spin 60s linear infinite;
}
#theme-stage .yk-ring2 {
  width: 260px; height: 260px; margin-left: -130px; top: 116px; opacity: .09;
  background: repeating-conic-gradient(from 8deg, rgba(198, 47, 16, .9) 0deg 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 59%);
  mask: radial-gradient(circle, transparent 0 58%, #000 59%);
  animation: th-spin-rev 44s linear infinite;
}
#theme-stage .yk-glow-l, #theme-stage .yk-glow-r {
  position: absolute; bottom: -140px; width: 460px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 20, 0.26), transparent 65%);
  animation: th-flicker 2.3s ease-in-out infinite;
}
#theme-stage .yk-glow-l { left: -150px; }
#theme-stage .yk-glow-r { right: -150px; animation-delay: -1.1s; }
#theme-stage .yk-ember {
  position: absolute; bottom: -2vh; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, #ffd54f, #ff7b1f 70%);
  box-shadow: 0 0 8px 2px rgba(255, 123, 31, .55);
  animation: th-rise linear infinite;
}
#theme-stage .yk-face-art { top: 16vh; left: -80px; width: 420px; height: 480px; animation: th-breathe 10s ease-in-out infinite; }
html[data-theme="yakshagana"] .greenroom-note.show { animation: th-note-flame .55s ease-out both; transform-origin: bottom center; }

/* =========================================================================
   THEME · NUKKAD BEAT
   ========================================================================= */

html[data-theme="nukkad"] {
  --ink: #f3e7c3;
  --ink-deep: #eadbab;
  --velvet: #f9f0d6;
  --velvet-raised: #fff8e3;
  --curtain: #191919;
  --curtain-deep: #000;
  --brass: #cf2b1e;
  --brass-bright: #e8402f;
  --ivory: #201a10;
  --smoke: #77683f;
  --line: rgba(25, 25, 25, 0.30);
  --line-soft: rgba(25, 25, 25, 0.14);
  --ok: #2e7d32;
  --danger: #b71c1c;
  --display: "Spline Sans Mono", ui-monospace, monospace;
  --shadow: 0 14px 36px rgba(60, 40, 0, 0.25);
}
html[data-theme="nukkad"] body {
  background:
    radial-gradient(rgba(25, 25, 25, 0.05) 1px, transparent 1.6px),
    var(--ink);
  background-size: 14px 14px;
}
html[data-theme="nukkad"] ::selection { background: #191919; color: #f3e7c3; }
html[data-theme="nukkad"] .brand h1 { text-transform: uppercase; letter-spacing: 0.04em; }
html[data-theme="nukkad"] .brand h1 em { color: var(--brass); font-style: normal; }
html[data-theme="nukkad"] .masthead { border-bottom: none; }
html[data-theme="nukkad"] .masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  pointer-events: none; z-index: 41;
  background: repeating-linear-gradient(-45deg, #191919 0 12px, #f5b301 12px 24px);
  animation: th-chase 2.4s linear infinite;
}
html[data-theme="nukkad"] .btn { box-shadow: 3px 3px 0 #191919; color: #fff8e3; }
html[data-theme="nukkad"] .btn:hover { box-shadow: 4px 4px 0 #191919; }
html[data-theme="nukkad"] .stub, html[data-theme="nukkad"] .upload-section { border: 1.5px solid #191919; }
html[data-theme="nukkad"] .stub { transition: transform .12s, box-shadow .12s; }
html[data-theme="nukkad"] .stub:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(25, 25, 25, .85); }

#theme-stage .nu-stamp {
  position: absolute; top: 120px; right: -34px; padding: 6px 40px;
  transform: rotate(18deg);
  font-family: "Spline Sans Mono", monospace; font-size: 13px; letter-spacing: .3em;
  color: #cf2b1e; border: 2px dashed #cf2b1e; opacity: 0;
  animation: nu-stamp-cycle 6s ease-in-out infinite;
}
@keyframes nu-stamp-cycle {
  0% { opacity: 0; transform: rotate(18deg) scale(1.5); }
  8%, 78% { opacity: .55; transform: rotate(18deg) scale(1); }
  92%, 100% { opacity: 0; transform: rotate(18deg) scale(1); }
}
#theme-stage .nu-mega { position: absolute; bottom: 90px; left: 20px; font-size: 30px; opacity: .8; animation: th-sway 3.2s ease-in-out infinite; }
#theme-stage .nu-wave {
  position: absolute; bottom: 92px; left: 24px; width: 46px; height: 46px;
  border: 2.5px solid #cf2b1e; border-radius: 50%; opacity: 0;
  animation: th-ripple 3.2s ease-out infinite;
}
#theme-stage .nu-wave.w2 { animation-delay: -1.6s; }
#theme-stage .nu-dafli { position: absolute; top: 40%; right: 2%; font-size: 26px; opacity: .6; animation: th-float 4.5s ease-in-out infinite; }
#theme-stage .nu-fist-art { bottom: -30px; right: 6%; width: 300px; height: 380px; opacity: .07; animation: th-float 6s ease-in-out infinite; }
#theme-stage .nu-splat { position: absolute; border-radius: 50%; opacity: .10; background: #cf2b1e; }
#theme-stage .nu-splat.s1 { top: 24%; left: 4%; width: 90px; height: 90px; background: #cf2b1e; }
#theme-stage .nu-splat.s2 { top: 27%; left: 9%; width: 26px; height: 26px; background: #191919; }
#theme-stage .nu-splat.s3 { bottom: 18%; left: 40%; width: 54px; height: 54px; background: #f5b301; opacity: .18; }
html[data-theme="nukkad"] .greenroom-note { border: 2px solid #191919; border-radius: 4px; box-shadow: 5px 5px 0 rgba(25,25,25,.85); }
html[data-theme="nukkad"] .greenroom-note.show { animation: th-note-stamp .5s cubic-bezier(.2,.9,.3,1.2) both; }

/* ---------- quiet hours ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #theme-stage, .greenroom-note .note-sticker { display: none; }
  #theme-transition { display: none !important; }
  html[data-theme] .masthead::before, html[data-theme] .masthead::after { animation: none; }
  html[data-theme="nautanki"] .brand h1 { animation: none; }
  .greenroom-note.show { animation: none !important; }
}

@media (max-width: 720px) {
  #theme-stage .mega-art, #theme-stage .nk-beam, #theme-stage .nu-stamp,
  #theme-stage .yk-ring, #theme-stage .yk-ring2, #theme-stage .nk-rangoli { display: none; }
  .theme-btn { margin-left: 6px; padding: 4px 9px; }
}
