/* Base tokens and page reset */
:root {
  --gold: #a6742e;
  --gold-line: #b0803a;
  --rose: #9e4a5c;
  --ink: #78503a;
  /* Devanagari falls through to Kalam (script) / Tiro Devanagari Hindi (serif); English keeps Great Vibes / Lora */
  --font-script: "Great Vibes", "Kalam", cursive;
  --font-serif: "Lora", "Tiro Devanagari Hindi", Georgia, serif;
  --font-deva: "Tiro Devanagari Hindi", "Devanagari Sangam MN", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #f4eee2;
  color: var(--ink);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading,
body.is-opening { overflow: hidden; }

img, video { display: block; max-width: 100%; }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* no page scrolling while the doors are shown (closed or opening) */
html.is-locked, html:has(body.is-loading), html:has(body.is-opening) { overflow: hidden; }

/* Language switch (English | हिन्दी): small pill sitting on the bottom border line (clear of the content), above the doors too */
.lang-toggle {
  position: fixed;
  right: calc(max(6px, clamp(10px, 2.2vmin, 26px) - 13px) + env(safe-area-inset-right, 0px));
  bottom: calc(max(6px, clamp(10px, 2.2vmin, 26px) - 13px) + env(safe-area-inset-bottom, 0px)); /* never touches the screen edge */
  z-index: 11;
  display: flex;
  padding: 3px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(253, 248, 238, 0.92);
  box-shadow: 0 2px 8px rgba(60, 30, 10, 0.18);
}
.lang-toggle button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 13px/1.3 var(--font-serif);
  color: var(--ink);
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--gold); color: #fff8ea; }
@media (max-width: 480px) {
  .lang-toggle { padding: 2px; }
  .lang-toggle button { padding: 3px 8px; font-size: 12px; }
}

/* safety-net note (js/watchdog.js): shown only if the invitation could not start */
.site-fail { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(120, 70, 40, 0.35); }
.site-fail__card { max-width: 340px; padding: 22px 24px 20px; text-align: center; background: #fdf8ee; border: 1.5px solid var(--gold-line); border-radius: 14px; box-shadow: 0 12px 30px rgba(60, 30, 10, 0.35); color: #6b4a32; font-family: var(--font-serif); }
.site-fail__title { margin: 0 0 6px; font-family: var(--font-script); font-size: 38px; line-height: 1.1; color: #a6742e; }
.site-fail__line { margin: 0; font-size: 16px; line-height: 1.5; }
.site-fail__btn { margin-top: 16px; min-height: 44px; padding: 0.6em 1.8em; border: 1.5px solid #b0803a; border-radius: 999px; background: #fff8ea; font: inherit; font-size: 16px; color: #7a4e1e; }

/* larger touch areas for small controls (invisible; the look is unchanged) */
.lang-toggle button { position: relative; }
.lang-toggle button::after { content: ""; position: absolute; inset: -9px -3px; }
