@font-face {
  font-family: 'Yatra One';
  src: url('/fonts/yatra-one/yatra-one-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --night: #160306;
  --maroon: #3b0a14;
  --wine: #5c0f1f;
  --sindoor: #d0142c;
  --saffron: #ff8a1f;
  --marigold: #ffb81c;
  --gold: #f1cf7a;
  --cream: #fff4dc;
  --leaf: #2f8a45;
  --muted: #e9c9a6;
  --line: rgba(241, 207, 122, .28);
  --display: 'Yatra One', 'Palatino Linotype', Georgia, serif;
  --body: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  /* Height of the marigold toran; everything in the first screen scales off the viewport height. */
  --toran: clamp(62px, 12vh, 120px);
  --dhaki-h: clamp(150px, min(36vh, 20vw), 320px);
  /* Room the hero text leaves on its right for the dhaki (he is 264 wide for every 320 tall). */
  --dhaki-gap: calc(var(--dhaki-h) * .825 + 10px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* clip (not just hidden on body) so phones cannot pan sideways to decorations */
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; max-width: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.6 var(--body);
  color: var(--cream);
  background:
    radial-gradient(ellipse 70% 55% at 18% 0%, rgba(160, 24, 48, .75), transparent 70%),
    radial-gradient(ellipse 55% 45% at 95% 25%, rgba(190, 84, 12, .38), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(120, 16, 36, .6), transparent 70%),
    linear-gradient(#2a070e, var(--night));
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

/* ---------- marigold toran ---------- */
.toran {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--toran);
  display: flex;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  border-top: 6px solid var(--sindoor);
  box-shadow: inset 0 3px 0 var(--marigold);
  pointer-events: none;
  z-index: 1;
}
.toran .strand {
  flex: 0 0 13px;
  position: relative;
  height: calc(var(--toran) * (.22 + .5 * var(--len)));
  background: radial-gradient(circle at 50% 50%, var(--c) 0 5.500px, transparent 6px) center top / 13px 12px no-repeat round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
  transform-origin: top center;
  animation: sway 5s ease-in-out infinite alternate;
}
.toran .strand::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 9px;
  height: 14px;
  translate: -50% 0;
  border-radius: 0 60% 0 60%;
  rotate: 45deg;
  background: var(--leaf);
}
@keyframes sway {
  from { rotate: -1.200deg; }
  to { rotate: 1.200deg; }
}

/* ---------- floating embers ---------- */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.embers span {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff1c2, var(--marigold) 45%, transparent 70%);
  opacity: 0;
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  12% { opacity: .85; }
  80% { opacity: .5; }
  100% { transform: translate(var(--drift), -105vh) scale(1.200); opacity: 0; }
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--toran) - 6px) 24px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font: 400 1.150rem var(--display); letter-spacing: .04em; }
.brand svg { width: 30px; height: 30px; }
.who { display: flex; align-items: center; gap: 14px; }
.who-text { text-align: right; line-height: 1.250; }
.who-text strong { display: block; font-weight: 600; }
.who-text span { font-size: .8rem; color: var(--muted); }

/* ---------- hero ---------- */
main { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.150fr) minmax(0, 420px);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(12px, 2.500vh, 28px) 0 clamp(24px, 5vh, 64px);
}
.hero-copy { position: relative; min-width: 0; }
.mandala {
  position: absolute;
  width: min(560px, 100%, 72vh);
  left: 0;
  top: 50%;
  translate: 0 -50%;
  overflow: visible;
  color: var(--gold);
  opacity: .16;
  pointer-events: none;
  z-index: -1;
}
/* Spin the artwork inside the svg, so the svg box itself never swings past the screen edge. */
/* The viewBox is centred on 0,0, so that is the point to spin around. */
.mandala g { transform-origin: 0 0; animation: spin 160s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.eyebrow {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--marigold);
}
h1 {
  margin: 0;
  font: 400 clamp(3rem, min(9.500vw, 11.500vh), 7.400rem)/.98 var(--display);
  letter-spacing: .01em;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold) 38%, var(--saffron) 78%, #e4571b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(90, 10, 20, .9)) drop-shadow(0 14px 28px rgba(0, 0, 0, .45));
  padding-bottom: .08em;
}
.ornament { display: flex; align-items: center; gap: 14px; margin: clamp(8px, 1.800vh, 18px) 0 clamp(6px, 1.600vh, 16px); color: var(--gold); max-width: 420px; }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament i:last-child { background: linear-gradient(270deg, transparent, var(--gold)); }
.ornament svg { width: 34px; height: 34px; }
.lede { max-width: min(520px, 100% - var(--dhaki-gap)); margin: 0 0 clamp(14px, 2.400vh, 24px); font-size: 1.060rem; color: #f6dcc0; }

.facts { position: relative; }
.facts .meta, .facts .countdown { max-width: calc(100% - var(--dhaki-gap)); }
.dhaki {
  position: absolute;
  right: 0;
  bottom: 0;
  height: var(--dhaki-h);
  aspect-ratio: 264 / 320;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5));
  pointer-events: none;
}
/* Origins are in the drawing's own coordinates: each stick pivots at the hand holding it. */
.dhaki .stick-l { transform-origin: 146px 193px; animation: beat .5s ease-in-out infinite alternate; }
.dhaki .stick-r { transform-origin: 178px 158px; animation: beat .5s ease-in-out -.25s infinite alternate; }
.dhaki .bob { transform-origin: 150px 318px; animation: bob 1s ease-in-out infinite alternate; }
.dhaki .beats { animation: thump .5s ease-out infinite; }
.dhaki .plume { transform-origin: 246px 118px; animation: sway 1s ease-in-out infinite alternate; }
@keyframes beat { from { rotate: -12deg; } to { rotate: 3deg; } }
@keyframes bob { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
@keyframes thump { from { opacity: .9; } to { opacity: 0; } }

.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 clamp(14px, 2.800vh, 28px); }
.meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(59, 10, 20, .55);
  font-weight: 500;
  font-size: .92rem;
}
.meta svg { width: 18px; height: 18px; fill: none; stroke: var(--marigold); stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; }

.countdown { display: flex; gap: 12px; }
.countdown div {
  flex: 0 1 76px;
  min-width: 0;
  padding: 10px 8px 8px;
  text-align: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(208, 20, 44, .5), rgba(92, 15, 31, .55));
  border: 1px solid var(--line);
}
.countdown b { display: block; font: 400 2rem/1.100 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- cards ---------- */
.hero-panel { position: relative; min-width: 0; }
.sticks {
  position: absolute;
  width: 140px;
  right: -34px;
  top: -62px;
  z-index: 3;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5));
  pointer-events: none;
}
.sticks .pair { transform-box: view-box; transform-origin: center; animation: clack 2.400s ease-in-out infinite; }
@keyframes clack {
  0%, 100% { rotate: -5deg; }
  50% { rotate: 5deg; }
}

.card {
  position: relative;
  padding: 34px 30px 28px;
  border-radius: 22px;
  border: 1px solid rgba(241, 207, 122, .4);
  background: linear-gradient(160deg, rgba(110, 18, 38, .92), rgba(42, 7, 14, .94));
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 0 0 5px rgba(42, 7, 14, .6), inset 0 0 0 6px rgba(241, 207, 122, .22);
  backdrop-filter: blur(6px);
}
.card::before {
  content: '';
  position: absolute;
  inset: 14px 26px auto;
  height: 8px;
  background: radial-gradient(circle at 8px 0, var(--gold) 0 3px, transparent 3.500px) 0 0 / 16px 8px repeat-x;
  opacity: .7;
}
.card h2 { margin: 6px 0 2px; font: 400 1.900rem/1.150 var(--display); color: var(--gold); overflow-wrap: anywhere; }
.card-sub { margin: 0 0 20px; color: var(--muted); font-size: .92rem; }
.greet { margin: 6px 0 -6px; font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--marigold); font-weight: 600; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 5px; font-size: .8rem; font-weight: 500; color: var(--muted); }
input[type='text'], input[type='password'], input[type='search'], input[type='number'], input[type='datetime-local'] {
  color-scheme: dark;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--cream);
  background: rgba(22, 3, 6, .55);
  border: 1px solid rgba(241, 207, 122, .3);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: rgba(233, 201, 166, .5); }
input:focus-visible { border-color: var(--marigold); box-shadow: 0 0 0 3px rgba(255, 184, 28, .22); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font: 600 .95rem var(--body);
  color: var(--cream);
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, filter .15s, background .15s;
  white-space: nowrap;
}
.btn:focus-visible, .round:focus-visible, summary:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }
.btn.primary {
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  font-size: 1.020rem;
  background: linear-gradient(135deg, var(--saffron), var(--sindoor) 70%);
  box-shadow: 0 10px 24px -8px rgba(208, 20, 44, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover { filter: brightness(1.100); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }
.btn.ghost { border-color: var(--line); background: rgba(59, 10, 20, .5); color: var(--gold); }
.btn.ghost:hover { background: rgba(110, 18, 38, .8); }
.btn.danger { padding: 7px 12px; font-size: .82rem; border-color: rgba(255, 120, 120, .35); background: transparent; color: #ffb3a8; }
.btn.danger:hover { background: rgba(208, 20, 44, .25); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }

.fine { margin: 14px 0 0; font-size: .78rem; color: rgba(233, 201, 166, .75); text-align: center; }
.form-error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(208, 20, 44, .22);
  border: 1px solid rgba(255, 120, 120, .4);
  color: #ffd2cb;
  font-size: .88rem;
}
.closed { margin: 0; padding: 14px; border-radius: 12px; background: rgba(22, 3, 6, .5); border: 1px dashed var(--line); color: var(--muted); text-align: center; }

/* ---------- quantity stepper ---------- */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; padding: 14px 16px; border-radius: 16px; background: rgba(22, 3, 6, .5); border: 1px solid var(--line); }
.round {
  width: 48px;
  height: 48px;
  flex: none;
  font: 500 1.600rem/1 var(--body);
  color: var(--maroon);
  background: linear-gradient(180deg, #ffe6a6, var(--marigold));
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(255, 184, 28, .8);
  transition: transform .1s;
}
.round:hover { transform: scale(1.060); }
.round:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.qty { text-align: center; }
.qty input {
  width: 3.200ch;
  min-width: 110px;
  padding: 0;
  font: 400 3.400rem/1 var(--display);
  color: var(--gold);
  text-align: center;
  background: none;
  border: 0;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.qty input:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.qty span { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.guests { margin-bottom: 16px; }
.guests summary { cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--gold); border-radius: 6px; }
.guests-title { margin: 0; font-size: .9rem; font-weight: 500; color: var(--gold); }.guests summary em { font-style: normal; font-weight: 400; color: var(--muted); }
.guest-list { display: grid; gap: 8px; max-height: 232px; margin-top: 10px; padding-right: 4px; overflow-y: auto; scrollbar-color: var(--gold) transparent; }
.guest-list label { display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.guest-list input { padding: 9px 12px; font-size: .92rem; }

/* ---------- sections ---------- */
.block { padding: 36px 0 20px; border-top: 1px solid var(--line); }
.block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.block-head h2 { margin: 0; font: 400 2.200rem/1.100 var(--display); color: var(--gold); }
.block-head p { margin: 4px 0 0; color: var(--muted); }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

.booking { margin-bottom: 30px; }
.booking-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: .9rem; }
.booking-head strong { color: var(--cream); font-weight: 600; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }

/* ---------- pass ticket ---------- */
.ticket {
  --stub: 74px;
  display: grid;
  grid-template-columns: var(--stub) 1fr auto;
  min-height: 150px;
  color: var(--maroon);
  background: linear-gradient(135deg, #fff8e6, #ffe9bf);
  border-radius: 16px;
  overflow: hidden;
  -webkit-mask:
    radial-gradient(circle 10px at var(--stub) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 10px at var(--stub) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle 10px at var(--stub) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 10px at var(--stub) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  animation: pop .45s cubic-bezier(.2, .9, .3, 1.300) backwards;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.ticket-stub {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--sindoor), #8f0d22);
  color: var(--gold);
  border-right: 2px dashed rgba(255, 244, 220, .7);
}
.ticket-stub span { writing-mode: vertical-rl; rotate: 180deg; font: 400 1.050rem var(--display); letter-spacing: .12em; white-space: nowrap; }
.ticket-body { padding: 14px 6px 12px 18px; min-width: 0; display: flex; flex-direction: column; }
.ticket-kicker { font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #a3331c; }
.ticket-name { margin: 2px 0 6px; font: 400 1.350rem/1.150 var(--display); overflow-wrap: break-word; }
.ticket-info { font-size: .78rem; line-height: 1.450; color: #6b2a1a; }
.ticket-code { margin-top: auto; padding-top: 8px; font: 600 .95rem ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.ticket-qr { display: grid; place-items: center; padding: 14px 16px 14px 8px; }
.ticket-qr img { width: 96px; height: 96px; display: block; }

/* ---------- admin ---------- */
.admin-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-tools input { width: 280px; max-width: 100%; }
.table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(42, 7, 14, .6); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 14px; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--wine); color: var(--gold); font-weight: 600; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
tbody tr { border-top: 1px solid rgba(241, 207, 122, .12); }
tbody tr:hover { background: rgba(110, 18, 38, .45); }
td.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; color: var(--gold); }
td small { display: block; color: var(--muted); }

/* ---------- footer ---------- */
footer { position: relative; z-index: 2; padding: 34px 24px 46px; text-align: center; }
.diyas { display: flex; justify-content: center; gap: 22px; margin-bottom: 8px; }
.diyas svg { width: 46px; height: 46px; filter: drop-shadow(0 0 14px rgba(255, 184, 28, .55)); }
.diyas .flame, .flame { transform-origin: 30px 30px; animation: flicker 1.600s ease-in-out infinite alternate; }
.diyas svg:nth-child(2n) { animation-delay: -.7s; }
@keyframes flicker {
  from { transform: scale(1, 1) skewX(-3deg); }
  to { transform: scale(.92, 1.080) skewX(4deg); }
}
.shubho { margin: 0; font: 400 2rem var(--display); color: var(--gold); }

/* ---------- dhak sound toggle ---------- */
.dhak-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  font: 600 .88rem var(--body);
  color: var(--maroon);
  background: linear-gradient(180deg, #ffe6a6, var(--marigold));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .7);
  cursor: pointer;
}
.dhak-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.dhak-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dhak-btn .waves { fill: none; opacity: .3; }
.dhak-btn[aria-pressed='true'] { color: var(--cream); background: linear-gradient(135deg, var(--saffron), var(--sindoor) 70%); }
.dhak-btn[aria-pressed='true'] .waves { opacity: 1; animation: thump .5s ease-out infinite; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--maroon);
  background: linear-gradient(135deg, #ffe6a6, var(--marigold));
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .7);
  translate: -50% 80px;
  opacity: 0;
  transition: translate .3s, opacity .3s;
  pointer-events: none;
}
.toast.show { translate: -50% 0; opacity: 1; }
.toast.error { color: var(--cream); background: linear-gradient(135deg, var(--sindoor), #8f0d22); }

/* ---------- responsive ---------- */
@media (min-width: 941px) {
  .hero { min-height: calc(100vh - var(--toran) - 50px); }
}
@media (min-width: 941px) and (max-height: 720px) {
  .card { padding: 26px 26px 20px; }
  .card-sub { margin-bottom: 14px; }
  .field { margin-bottom: 10px; }
  .stepper { padding: 8px 14px; margin-bottom: 12px; }
  .qty input { font-size: 2.600rem; }
  .countdown b { font-size: 1.600rem; }
  .lede { font-size: .96rem; }
}
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-bottom: 44px; }
  .hero-panel { max-width: 460px; width: 100%; margin: 0 auto; }
  .sticks { width: 100px; right: 0; top: -52px; }
}
@media (max-width: 560px) {
  .topbar { padding: calc(var(--toran) - 4px) 16px 0; }
  .brand { font-size: .95rem; white-space: nowrap; }
  .sticks { width: 84px; right: 0; top: -42px; }
  .brand svg { width: 24px; height: 24px; }
  .who { gap: 8px; min-width: 0; }
  .who-text { min-width: 0; }
  .who-text strong { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
  .who .btn { padding: 8px 12px; font-size: .84rem; }
  .hero { padding-top: 20px; }
  .mandala { top: 130px; }
  /* Phones: the dhaki stands beside the stacked date / time / venue chips. */
  .lede, .facts .countdown { max-width: none; }
  .facts .meta { flex-direction: column; align-items: flex-start; max-width: none; }
  .dhaki { top: -6px; bottom: auto; height: 146px; }
  .dhak-btn { right: 12px; bottom: 12px; padding: 9px 13px 9px 10px; font-size: .82rem; }
  footer { padding-bottom: 76px; }
  .meta li { font-size: .86rem; padding: 7px 12px; }
  .block-head h2 { font-size: 1.800rem; }
  .block-head .btn { width: 100%; }
  .ticket-body { padding-left: 14px; }
  .ticket-qr { padding: 12px 12px 12px 6px; }
  th, td { padding: 9px 10px; }
  main { padding: 0 16px 28px; }
  .who-text span { display: none; }
  .countdown { gap: 8px; }
  .countdown div { flex: 1; }
  .countdown b { font-size: 1.600rem; }
  .card { padding: 30px 20px 22px; }
  .tickets { grid-template-columns: 1fr; }
  .ticket { --stub: 54px; }
  .ticket-qr img { width: 80px; height: 80px; }
  .admin-tools, .admin-tools input { width: 100%; }
}

@media (max-width: 430px) {
  .who-text { display: none; }
  /* Narrow phones: QR drops under the pass details instead of squeezing them. */
  .ticket { grid-template-columns: var(--stub) minmax(0, 1fr); }
  .ticket-body { padding-right: 14px; }
  .ticket-qr { grid-column: 2; justify-content: start; padding: 0 14px 14px; }
  .ticket-stub { grid-row: span 2; }
  .ticket-name { font-size: 1.200rem; }
  .stepper { padding: 12px; }
  .qty input { min-width: 80px; font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .toran, .embers, .topbar, .hero, footer, .toast, .dhak-btn, #admin-section, .block-head .btn, .booking-head .btn { display: none !important; }
  main { padding: 0; max-width: none; }
  .block { border: 0; padding: 0; }
  .block-head h2 { color: #3b0a14; }
  .block-head p, .booking-head, .booking-head strong { color: #333; }
  .tickets { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ticket { break-inside: avoid; border: 1px solid #3b0a14; -webkit-mask: none; mask: none; animation: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- notices under the sign-in / booking card ---------- */
.notes { list-style: none; display: grid; gap: 6px; margin: 14px 0 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(22, 3, 6, .45); font-size: .86rem; color: #f6dcc0; }
.notes li { display: flex; align-items: flex-start; gap: 9px; }
.notes svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--marigold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notes strong { color: var(--gold); font-weight: 600; }
.passes-note { font-size: .88rem; }
.booking-head .issued { font-style: normal; color: var(--marigold); }

.ticket { position: relative; }
.ticket.used { filter: saturate(.55); }
.ticket-stamp {
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 2px 10px;
  font: 600 .7rem var(--body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #1f7a3a;
  border: 2px solid #1f7a3a;
  border-radius: 6px;
  background: rgba(255, 248, 230, .9);
  rotate: 8deg;
}

/* ---------- staff pages: admin, gate scan, print ---------- */
.staff .topbar { padding-top: 18px; padding-bottom: 6px; }
a.brand { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.staff main { padding-top: 18px; }
main.narrow { max-width: 640px; }
.page-title { margin: 0; font: 400 clamp(1.8rem, 5vw, 2.4rem)/1.1 var(--display); color: var(--gold); padding: 0; background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; }
.gate { max-width: 460px; margin: 8vh auto 0; text-align: center; }
.gate p { color: var(--muted); margin: 6px 0 18px; }
.fine.left { text-align: left; }
.btn.auto { width: auto; margin-top: 0; padding: 11px 22px; }
.btn.mini { padding: 6px 10px; font-size: .78rem; border-color: var(--line); background: rgba(59, 10, 20, .5); color: var(--gold); }
.btn.mini:hover { background: rgba(110, 18, 38, .8); }
.btn.mini.danger { border-color: rgba(255, 120, 120, .35); color: #ffb3a8; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, rgba(110, 18, 38, .8), rgba(42, 7, 14, .85)); }
.stat b { display: block; font: 400 2.4rem/1.1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-weight: 500; }
.stat small { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.filters input { flex: 1 1 260px; width: auto; }
select {
  padding: 12px 14px;
  font: inherit;
  color: var(--cream);
  background: rgba(22, 3, 6, .55);
  border: 1px solid rgba(241, 207, 122, .3);
  border-radius: 12px;
}
select option { color: #000; background: #fff; }
select:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }
.filters .count { color: var(--muted); font-size: .88rem; }
.staff .table-wrap { max-height: none; }
tbody tr.first { border-top: 2px solid rgba(241, 207, 122, .35); }
td.actions { display: flex; gap: 6px; }
td.none, .recent .none { padding: 26px; text-align: center; color: var(--muted); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); }
.tag.ok { color: #b9f2c6; border-color: rgba(120, 220, 150, .45); background: rgba(31, 122, 58, .28); }
.tag small { display: block; font-weight: 400; color: inherit; opacity: .85; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--marigold); }

.tally { margin: 0; color: var(--muted); }
.tally b { font: 400 1.5rem var(--display); color: var(--gold); }
.scan-form { display: flex; gap: 10px; margin-bottom: 16px; }
.scan-form input { flex: 1; min-width: 0; font: 600 1.15rem ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.scan-form input::placeholder { font: 400 1rem var(--body); letter-spacing: 0; text-transform: none; }
.scan-form .btn { width: auto; margin: 0; }
.result { display: grid; gap: 4px; min-height: 120px; align-content: center; padding: 20px 22px; border-radius: 18px; border: 2px solid var(--line); background: rgba(22, 3, 6, .5); }
.result strong { font: 400 2rem/1.1 var(--display); }
.result span { color: inherit; overflow-wrap: anywhere; }
.result.idle { color: var(--muted); }
.result.idle strong { color: var(--gold); }
.result.ok { color: #eafff0; border-color: #3ecf6e; background: #14652f; }
.result.warn { color: #2a1500; border-color: #ffd15c; background: #ffb81c; }
.result.bad { color: #fff0ee; border-color: #ff8a80; background: #a3101f; }
.result.flash { animation: flash .35s ease-out; }
@keyframes flash { from { transform: scale(1.03); filter: brightness(1.5); } }
.camera { margin: 16px 0 6px; }
.viewfinder { margin-top: 12px; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); background: #000; aspect-ratio: 4 / 3; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub { margin: 26px 0 10px; font: 400 1.4rem var(--display); color: var(--gold); }
.recent { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.recent li { display: grid; gap: 2px; padding: 10px 14px; border-left: 5px solid transparent; }
.recent li + li { border-top: 1px solid rgba(241, 207, 122, .12); }
.recent li span { font-size: .82rem; color: var(--muted); }
.recent li.ok { border-left-color: #3ecf6e; }
.recent li.warn { border-left-color: var(--marigold); }
.recent li.bad { border-left-color: #ff6b5e; }

@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .who { flex-wrap: wrap; justify-content: flex-end; }
  .scan-form { flex-direction: column; }
  .scan-form .btn { width: 100%; }
  td.actions { flex-direction: column; align-items: stretch; }
  .stat b { font-size: 2rem; }
}

@media print {
  .admin-tools, .gate, .dhak-btn { display: none !important; }
  .staff main { padding: 0; }
  .page-title { color: #3b0a14; }
  .ticket-stamp { display: none; }
  .ticket.used { filter: none; }
  .sheet .booking { break-inside: avoid; margin-bottom: 18px; }
}

/* ---------- price of the passes being booked (only while pricing is on) ---------- */
.price { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--marigold); border-radius: 12px; background: rgba(255, 184, 28, .12); font-size: .88rem; color: #f6dcc0; }
.price b { display: block; font-weight: 600; color: var(--gold); }

.booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- venue links on the booking page ---------- */
.meta li a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.meta li a:hover span { text-decoration: underline; }
.meta li a:focus-visible { outline: 2px solid var(--marigold); outline-offset: 6px; border-radius: 999px; }
.meta li.go { border-color: var(--marigold); background: rgba(255, 184, 28, .16); color: var(--gold); }

/* ---------- pass viewer: one large pass at a time ---------- */
.ticket.tap { cursor: pointer; }
.viewer {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  color: var(--cream);
  border: 1px solid rgba(241, 207, 122, .4);
  border-radius: 22px;
  background: linear-gradient(160deg, #6e1226, #2a070e);
}
.viewer::backdrop { background: rgba(10, 1, 3, .88); }
.viewer-box { padding: 16px 18px 18px; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--gold); font-weight: 600; }
.viewer-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 20px 16px 16px;
  border-radius: 16px;
  color: var(--maroon);
  background: linear-gradient(135deg, #fff8e6, #ffe9bf);
  text-align: center;
  touch-action: pan-y;
}
.viewer-card img { display: block; width: min(64vw, 250px); height: auto; aspect-ratio: 1; margin: 10px 0 4px; }
.viewer-card.used img { opacity: .35; }
.viewer-name { font: 400 1.6rem/1.15 var(--display); overflow-wrap: anywhere; }
.viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.viewer-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.viewer-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(241, 207, 122, .3); }
.viewer-dots i.on { background: var(--marigold); }

/* ---------- admin panel ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgba(22, 3, 6, .5); }
.tabs a { padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: .9rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--cream); }
.tabs a:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }
.tabs a[aria-current] { color: var(--maroon); background: linear-gradient(180deg, #ffe6a6, var(--marigold)); }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.panel { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(42, 7, 14, .6); }
.panel h2 { margin: 0 0 4px; font: 400 1.5rem/1.2 var(--display); color: var(--gold); }
.panel > p { margin: 0 0 16px; font-size: .9rem; color: var(--muted); }
.panel > .btn { margin-top: 14px; }
.panel .table-wrap { margin-top: 12px; }

.bar { margin-top: 14px; }
.bar-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; font-size: .9rem; }
.bar-head b { font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(22, 3, 6, .7); border: 1px solid var(--line); }
.bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--saffron), var(--marigold)); }

.rule { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: .9rem; }
.rule + .rule { border-top: 1px solid rgba(241, 207, 122, .12); }
.rule span { color: var(--muted); }
.rule strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 18px; }
.field.wide { grid-column: 1 / -1; }
.field select { width: 100%; }
.field small { display: block; margin-top: 5px; font-size: .78rem; color: rgba(233, 201, 166, .8); }
.field small span { display: inline; margin: 0; font-size: inherit; font-weight: 400; }
.field small a { color: var(--gold); }
.switch { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--marigold); }
.switch strong { display: block; font-weight: 600; }
.switch small { display: block; font-size: .82rem; color: var(--muted); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.inline-form .field { flex: 1 1 200px; margin: 0; }
#event-form > .btn { margin-bottom: 10px; }
.mail-result { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; font-size: .9rem; overflow-wrap: anywhere; }
.mail-result.ok { color: #b9f2c6; border: 1px solid rgba(120, 220, 150, .45); background: rgba(31, 122, 58, .28); }
.mail-result.bad { color: #ffd2cb; border: 1px solid rgba(255, 120, 120, .4); background: rgba(208, 20, 44, .22); }
.danger-zone { margin-top: 26px; border-color: rgba(255, 120, 120, .35); }
.danger-zone h2 { color: #ffb3a8; }

@media (max-width: 560px) {
  .tabs { width: 100%; }
  .tabs a { flex: 1 1 auto; text-align: center; }
  .panel { padding: 18px 16px; }
  .inline-form .btn { width: 100%; }
}

/* ---------- touch screens ---------- */
/* Quick repeated taps (e.g. on + and −) must not be taken as "double-tap to zoom". Pinch zoom still works. */
html, button, a, input, select, label, summary, .btn, .round { touch-action: manipulation; }
@media (pointer: coarse) {
  /* iPhones zoom the page when a field with text smaller than 16px is tapped. */
  .guest-list input { font-size: 16px; }
}

/* ---------- gate scanner ---------- */
.scan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 12px; }
/* The camera view never takes more than about half the screen, so the answer under it stays in sight. */
.scan .viewfinder { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 52vh; max-height: 52dvh; margin: 0 0 12px; border-width: 4px; transition: border-color .15s; }
.scan .viewfinder[data-state='ok'] { border-color: #3ecf6e; }
.scan .viewfinder[data-state='warn'] { border-color: var(--marigold); }
.scan .viewfinder[data-state='bad'] { border-color: #ff6b5e; }
.aim {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, 44vh);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 18px;
  /* Dims everything outside the square; the viewfinder clips it. */
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  pointer-events: none;
}
.torch {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 44px;
  padding: 8px 16px;
  font: 600 .9rem var(--body);
  color: var(--cream);
  background: rgba(22, 3, 6, .7);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  cursor: pointer;
}
.torch[aria-pressed='true'] { color: var(--maroon); background: var(--marigold); border-color: var(--marigold); }
.scan .result { margin-bottom: 12px; }
.scan .cam-btn { width: 100%; min-height: 54px; margin: 0 0 12px; }
.scan .scan-form { margin-bottom: 0; }
.scan .scan-form .btn, .scan .scan-form input { min-height: 52px; }

@media (max-width: 560px) {
  /* Phones: less chrome, bigger answer, and the code box stays on one line with its button. */
  .staff:has(.scan) .topbar { padding-top: 10px; }
  .staff:has(.scan) .brand span { display: none; }
  .staff main.scan { padding: 10px 12px 24px; }
  .scan .page-title { font-size: 1.5rem; }
  .scan .tally { font-size: .9rem; }
  .scan .result { min-height: 104px; padding: 14px 16px; }
  .scan .result strong { font-size: 1.8rem; }
  .scan .scan-form { flex-direction: row; }
  .scan .scan-form .btn { width: auto; }
  .scan .sub { margin-top: 20px; font-size: 1.2rem; }
}

/* ---------- fitting any window size ---------- */
/* The page is a column as tall as the window, so the footer and its lamps sit at the bottom edge
   on a tall window instead of floating under short content. */
body { display: flex; flex-direction: column; min-height: 100dvh; }
.topbar, main, footer { width: 100%; }
main { flex: 1 0 auto; }
/* Names and buttons drop to a second line rather than squeezing or running off the side. */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.who { flex-wrap: wrap; justify-content: flex-end; }
h1 { overflow-wrap: break-word; }
.cols { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.viewer { max-height: calc(100dvh - 24px); }
/* The lamps shrink with the window so all five always fit in one row. */
.diyas { gap: clamp(8px, 4vw, 22px); }
.diyas svg { flex: 0 1 auto; min-width: 0; width: clamp(30px, 11vw, 46px); height: auto; aspect-ratio: 1; }
.shubho { font-size: clamp(1.5rem, 6vw, 2rem); }
@media (max-width: 940px) {
  /* Room for the floating "Play dhak" button, so it never covers the last line of the page. */
  footer { padding-bottom: 80px; }
}
/* Desktop: the whole landing view - garland, hero, card and the lamps - sits inside one window.
   The hero takes whatever height is left between the top bar and the footer; app.js then scales
   it down (or up on large monitors) when its contents need a different amount of room. */
@media (min-width: 941px) {
  body:not(.staff) main { display: flex; flex-direction: column; padding-bottom: 8px; }
  .hero { flex: 1 0 auto; min-height: 0; padding: clamp(8px, 2vh, 28px) 0; }
  footer { padding: 6px 24px 12px; }
  .diyas { margin-bottom: 2px; }
  .diyas svg { width: clamp(26px, 4.6vh, 46px); }
  .shubho { font-size: clamp(1.1rem, 3.2vh, 2rem); line-height: 1.25; }
  footer .fine { margin-top: 2px; }
}
@media (min-width: 941px) and (max-height: 760px) {
  .notes { gap: 4px; margin-top: 10px; padding: 8px 12px; font-size: .8rem; }
  .card .fine { margin-top: 8px; }
}
/* Large monitors: use more of the width instead of leaving wide empty margins. */
@media (min-width: 1500px) {
  body:not(.staff) .topbar, body:not(.staff) main { max-width: min(1500px, 92vw); }
}
@media print {
  body { display: block; min-height: 0; }
}

/* Admin table: let names wrap so the action buttons stay on screen. */
.staff table { font-size: .86rem; }
.staff th, .staff td { padding: 9px 10px; white-space: normal; }
.staff td.mono, .staff td.actions, .staff .tag { white-space: nowrap; }
