/* Sri Yantra Navavaran Pooja — UI dimensions are Unity design px (1920x1080 reference,
   CanvasScaler ConstantPixelSize, scaleFactor = height/1080 → --s = 100vh/1080).
   Every value below is lifted from RitualController.cs / UiKit.cs; see comment tags. */
:root {
  --s: calc(100vh / 1080);            /* CSS px = Unity px * (window.innerHeight/1080) */
  --DGRose: #FF2D95; --DGCrimson: #E11D48; --DGBlush: #FBCFE8; --DGPearl: #FFF7FB;
  --DGInk: #3B0B24; --DGDeep: #9D174D;
  --Ink: rgba(15,5,23,0.86); --InkSoft: rgba(20,8,31,0.62);
  --Veil: rgba(13,5,20,0.10); --Gold: rgb(255,214,107); --Maroon: rgba(77,15,26,0.94);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05010a; }
body { font-family: 'Manrope', system-ui, sans-serif; color: #fff; }
#scene { position: fixed; inset: 0; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#ui > * { pointer-events: auto; }
#ui a { color: #fff; }

/* UiKit.Plaque: DGDeep border, fill inset 3px (Stretch 3) */
.plaque { overflow: hidden;
  background: var(--Maroon);
  border: calc(3px * var(--s)) solid var(--DGDeep);
  color: #fff;
}
.plaque-inner { background: inherit; margin: calc(3px * var(--s)); height: calc(100% - 6px * var(--s)); }
.dgborder { border-color: var(--DGDeep); background: var(--DGInk); }
.btn { overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--Maroon); border: calc(3px * var(--s)) solid var(--DGDeep);
  color: #fff; cursor: pointer; user-select: none; line-height: 1.15;
  /* UiKit.TextButton colors: highlighted (1,0.75,0.85), pressed (0.55,0.08,0.22) */
  transition: background .08s linear, color .08s linear;
}
.btn:hover { background: rgb(255,191,217); color: var(--DGInk); }
.btn:active { background: rgb(140,20,56); color: #fff; }

/* Goddess: 430x860, center, y +40 (anchoredPosition (0,40) = 40 px UP) */
#goddess {
  position: absolute; left: 50%; top: 50%;
  width: calc(430px * var(--s)); height: calc(860px * var(--s));
  transform: translate(-50%, -50%) translateY(calc(-40px * var(--s)));
  opacity: 0; z-index: 15; pointer-events: none;
}

/* Slide background: 1700x470, bottom-center, y 22 (pivot (0.5,0)) */
#slideBackdrop {
  position: absolute; left: 50%; bottom: calc(22px * var(--s)); transform: translateX(-50%);
  background: var(--Veil);           /* UiKit.Veil, 10% alpha */
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
#slideA, #slideB { position: absolute; object-fit: fill; opacity: 0; }

/* Header background: 1360x210, top-center, y -26 (pivot (0.5,1) → 26 px below the top edge) */
#headerBackdrop {
  position: absolute; left: 50%; top: calc(26px * var(--s)); transform: translateX(-50%);
  background: var(--Veil);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
#headerImg { object-fit: fill; }

/* Progress bar: 64x512, right edge, anchoredPosition (-26,-40), pivot (1,0.5) */
#progressBar {
  position: absolute; right: calc(26px * var(--s)); top: 50%;
  transform: translateY(-50%) translateY(calc(-40px * var(--s)));
  width: calc(64px * var(--s)); height: calc(512px * var(--s)); object-fit: fill;
  z-index: 25; pointer-events: none;
}

/* Branding: 520x190 top-left (26, -22), label font 22 -> 44 (UiKit doubling ≤34) */
#branding {
  position: absolute; left: calc(26px * var(--s)); top: calc(22px * var(--s));
  width: calc(520px * var(--s)); height: calc(190px * var(--s));
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: calc(44px * var(--s)); font-weight: 600; cursor: pointer; z-index: 30; background: var(--Ink);
}
#branding span { white-space: pre-line; line-height: 1.25; padding: calc(8px*var(--s)); }

/* Title panel: 480x250 top-right (-26,-22); titleBox h130; next button y -142, h 84 */
#titlePanel { position: absolute; right: calc(26px * var(--s)); top: calc(22px * var(--s)); width: calc(480px * var(--s)); height: calc(250px * var(--s)); z-index: 30; }
.titletext {
  height: calc(130px * var(--s)); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: calc(10px * var(--s)); font-size: calc(40px * var(--s));  /* Label 20 -> 40 */
  font-weight: 700; background: var(--Ink); white-space: pre-line;
}
#nextBtn { position: absolute; top: calc(142px * var(--s)); left: 0; width: 100%; height: calc(84px * var(--s)); font-size: calc(40px * var(--s)); font-weight: 700; }

/* Hint: 1500x90 bottom y470, color (1,0.86,0.5,0.85), font 30 -> 60 */
#hint {
  position: absolute; left: 50%; bottom: calc(470px * var(--s)); transform: translateX(-50%);
  width: calc(1500px * var(--s)); height: calc(90px * var(--s));
  display: none; align-items: center; justify-content: center; text-align: center;
  font-size: calc(60px * var(--s)); font-weight: 700;
  color: rgb(255,219,127); opacity: 0.85; z-index: 25; pointer-events: none;
}

/* TouchHere 420x420; TouchArea button 230x230; TouchAreaImage 190x190 */
#touchHere { position: absolute; width: calc(420px * var(--s)); height: calc(420px * var(--s));
  transform: translate(-50%,-50%); opacity: 0; z-index: 27; pointer-events: none; }
#touchArea { position: absolute; width: calc(230px * var(--s)); height: calc(230px * var(--s));
  transform: translate(-50%,-50%); z-index: 28; cursor: pointer; }
#touchAreaImg { position: absolute; width: calc(190px * var(--s)); height: calc(190px * var(--s));
  transform: translate(-50%,-50%); opacity: 0; z-index: 26; pointer-events: none; }

/* Material selection panel: 760x780 top-right; box h300 (2nd Anchor call, line 1121);
   dropdown y -330 h130 font 34 -> 68; Next y -500 h160 font 34 -> 68 */
#materialPanel {
  position: absolute; right: calc(26px * var(--s)); top: calc(22px * var(--s));
  width: calc(760px * var(--s)); height: calc(780px * var(--s));
  display: none; flex-direction: column; align-items: stretch; z-index: 35; background: none; border: none;
  max-width: calc(100vw - 52px * var(--s));
  box-sizing: border-box;
}
#materialPanel .box { height: calc(300px * var(--s)); background: var(--Ink); display: flex; align-items: center; justify-content: center; }
#materialPanel h2 { font-size: calc(68px * var(--s)); text-align: center; white-space: pre-line; line-height: 1.3; }
#materialSelect {
  height: calc(130px * var(--s)); margin-top: calc(30px * var(--s));
  font-size: calc(68px * var(--s)); font-weight: 700;
  background: var(--Maroon); color: #fff; border: calc(3px * var(--s)) solid var(--DGDeep);
  text-align: center; appearance: none;
}
#materialSelect option { background: var(--DGInk); }
#materialNext { width: 100%; height: calc(160px * var(--s)); margin-top: calc(40px * var(--s)); font-size: calc(68px * var(--s)); font-weight: 800; }

/* Pooja selection (BuildSelectPanel) — sizes verbatim; heading 46 (not doubled, >34) */
#poojaSelection {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; z-index: 40;
}
#poojaSelection h1 { font-family: 'Playfair Display', serif; font-size: calc(46px * var(--s)); height: calc(60px * var(--s)); margin-bottom: calc(58px * var(--s)); text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
#poojaSelection .temple { font-size: calc(52px * var(--s)); color: var(--DGBlush); margin-bottom: calc(28px * var(--s)); text-align: center; }  /* 26 -> 52 */
#poojaButtons { display: flex; flex-direction: column; align-items: center; }
#poojaButtons .opt { width: calc(880px * var(--s)); height: calc(220px * var(--s)); margin-bottom: calc(16px * var(--s));
  background-size: contain; background-repeat: no-repeat; background-position: center; color: transparent; font-weight: 800; }
#poojaButtons .opt.nofx { color: #fff; }
#poojaPrompt { margin-top: calc(28px * var(--s)); font-size: calc(64px * var(--s)); font-weight: 600; }  /* 32 -> 64 */
#filmCredit {
  position: absolute; bottom: calc(16px * var(--s)); left: 50%; transform: translateX(-50%);
  width: calc(1500px * var(--s)); text-align: center;
  font-family: 'Playfair Display', serif; font-size: calc(68px * var(--s)); color: var(--DGRose);  /* 34 -> 68 */
  text-shadow: 0 0 6px var(--DGInk), 0 2px 4px var(--DGInk); white-space: nowrap;
}

/* End card (BuildFinishedPanel) */
#endCard { position: absolute; inset: 0; display: none; background: #05010a; z-index: 60; }
#endCardTop {
  position: absolute; left: 50%; top: calc(36px * var(--s)); transform: translateX(-50%);
  width: calc(1000px * var(--s)); height: calc(200px * var(--s));
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: calc(64px * var(--s)); font-weight: 700; white-space: pre-line; line-height: 1.35;  /* 32 -> 64 */
}
#twitchWrap { position: absolute; left: 50%; top: calc(344px * var(--s)); transform: translateX(-50%);
  width: calc(1000px * var(--s)); height: calc(562px * var(--s)); background: #000; }
#twitchFrame { width: 100%; height: 100%; border: 0; }
#visitTemple { position: absolute; left: 50%; top: calc(272px * var(--s)); transform: translateX(-50%);
  width: calc(280px * var(--s)); height: calc(66px * var(--s)); font-size: calc(52px * var(--s)); font-weight: 700; }  /* 26 -> 52 */
#aboutBootBtn { position: absolute; left: 50%; bottom: calc(120px * var(--s)); transform: translateX(-50%);
  width: calc(400px * var(--s)); height: calc(84px * var(--s)); font-size: calc(40px * var(--s)); font-weight: 700; }
#aboutBtn { position: absolute; right: calc(26px * var(--s)); top: calc(272px * var(--s));
  width: calc(280px * var(--s)); height: calc(66px * var(--s)); font-size: calc(52px * var(--s)); font-weight: 700; }
#aboutPanel { position: absolute; inset: 0; z-index: 90; background: #05010a; }
#aboutClose { position: absolute; right: calc(26px * var(--s)); top: calc(22px * var(--s));
  width: calc(240px * var(--s)); height: calc(70px * var(--s)); font-size: calc(36px * var(--s)); font-weight: 800; z-index: 75; }
#aboutScroll { position: absolute; left: calc(40px * var(--s)); right: calc(40px * var(--s));
  top: calc(30px * var(--s)); bottom: calc(30px * var(--s)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#aboutText { color: #fff; font-size: calc(30px * var(--s)); line-height: 1.45;
  font-family: Manrope, sans-serif; padding-right: calc(20px * var(--s)); }
#aboutText h2 { font-family: 'Playfair Display', serif; font-size: calc(52px * var(--s));
  color: rgb(255,191,217); margin: calc(10px * var(--s)) 0; }
#aboutText h3 { font-size: calc(34px * var(--s)); color: #ffd9a0; margin: calc(28px * var(--s)) 0 calc(8px * var(--s)); }
#aboutText p { margin: calc(8px * var(--s)) 0; }
#aboutText .lead { font-size: calc(32px * var(--s)); color: rgb(255,214,230); }
#aboutText .verse { font-style: italic; color: #ffe9b0; margin-left: calc(30px * var(--s)); }
#aboutText ul { margin: calc(8px * var(--s)) 0; padding-left: calc(36px * var(--s)); }
#aboutText li { margin: calc(6px * var(--s)) 0; }
#aboutText b { color: rgb(255,191,217); }
#exitBtn { position: absolute; right: calc(26px * var(--s)); top: calc(22px * var(--s));
  width: calc(240px * var(--s)); height: calc(70px * var(--s)); font-size: calc(36px * var(--s)); font-weight: 800; z-index: 65; }
/* Sponsor buttons: width colW (runtime), height 110, font 26 -> 52 (positioned by app.js) */
.sponsor { position: absolute; height: calc(110px * var(--s)); font-size: calc(52px * var(--s)); font-weight: 700; white-space: pre-line; }

/* Fullscreen toggle + exit hint (web-only, dreamgirl palette) */
#fsBtn {
  position: absolute; left: calc(12px * var(--s)); bottom: calc(12px * var(--s));
  width: calc(72px * var(--s)); height: calc(72px * var(--s));
  display: flex; align-items: center; justify-content: center;
  background: var(--Maroon); border: calc(3px * var(--s)) solid var(--DGDeep);
  color: #fff; font-size: calc(44px * var(--s)); cursor: pointer; user-select: none;
  z-index: 70;
}
#fsBtn:hover { background: rgb(255,191,217); color: var(--DGInk); }
#fsHint {
  position: absolute; left: 50%; bottom: calc(24px * var(--s)); transform: translateX(-50%);
  max-width: calc(1600px * var(--s)); padding: calc(14px * var(--s)) calc(30px * var(--s));
  background: var(--Ink); border: calc(2px * var(--s)) solid var(--DGDeep);
  color: var(--DGBlush); font-size: calc(36px * var(--s)); font-weight: 600; text-align: center;
  opacity: 0; transition: opacity 1s ease; pointer-events: none; z-index: 70;
  white-space: nowrap;
}

/* Boot splash (web-only) */
#bootSplash {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #05010a; z-index: 80; flex-direction: column; gap: calc(24px * var(--s));
  font-family: 'Playfair Display', serif; font-size: calc(30px * var(--s)); color: var(--DGBlush);
}
#bootSplash button { width: calc(420px * var(--s)); height: calc(120px * var(--s)); font-size: calc(60px * var(--s)); font-weight: 800; }
