:root {
  --bg: #12051a;
  --bg2: #2a0a1f;
  --card: rgba(46, 16, 38, .82);
  --card2: #250b20;
  --line: rgba(251, 191, 36, .18);
  --text: #fff8ee;
  --muted: #e0bfa6;
  --gold: #fbbf24;
  --gold2: #f59e0b;
  --saffron: #f97316;
  --red: #e11d48;
  --green: #22c55e;
  --wa: #25d366;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 55%, #3a0d12 100%) fixed;
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.err { color: #fda4af; min-height: 1.2em; margin: 8px 0; font-size: 14px; }
.warn { color: #fde68a; font-size: 14px; margin: 8px 0 0; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; color: var(--gold); }
.gold {
  background: linear-gradient(90deg, #fde68a, var(--gold), var(--saffron), var(--gold), #fde68a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* night sky with twinkling stars (pure CSS, very light) */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 35%, #fde68a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 25%, #fbbf24 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 30%, #fde68a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 55%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 60%, #fde68a 50%, transparent 51%),
    radial-gradient(circle at 80% -10%, rgba(249, 115, 22, .25), transparent 40%),
    radial-gradient(circle at 0% 30%, rgba(225, 29, 72, .18), transparent 40%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: rgba(18, 5, 26, .9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* marigold toran under header */
.torans {
  position: sticky; top: 56px; z-index: 9; height: 10px;
  background:
    radial-gradient(circle at 10px 0, var(--saffron) 5px, transparent 6px) 0 0 / 20px 10px repeat-x,
    radial-gradient(circle at 10px 0, var(--gold) 3px, transparent 4px) 10px 0 / 20px 10px repeat-x;
  opacity: .9;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 18px; font-weight: 800; }
.brand small { color: var(--muted); font-size: 12px; }
.logo { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 16px rgba(251, 191, 36, .45); }
.userchip { background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 14px; cursor: pointer; }

.wrap { max-width: 680px; margin: 0 auto; padding: 14px 16px 120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
h1, h2, h3 { margin: 0 0 6px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }

/* hero with diya */
.hero { text-align: center; padding: 18px 8px 8px; }
.hero h1 { font-size: 34px; font-weight: 900; letter-spacing: .5px; }
.hero p { color: var(--muted); margin: 6px auto 14px; max-width: 420px; }
.diya { position: relative; width: 84px; height: 54px; margin: 18px auto 10px; }
.diya::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  background: linear-gradient(180deg, #f59e0b, #b45309); border-radius: 0 0 48px 48px / 0 0 34px 34px;
  box-shadow: inset 0 4px 0 #fcd34d;
}
.flame {
  position: absolute; left: 50%; bottom: 26px; width: 18px; height: 30px; margin-left: -9px;
  background: radial-gradient(ellipse at 50% 80%, #fff7c2 0 25%, #fbbf24 45%, #f97316 70%, transparent 72%);
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, .9));
  animation: flick 1.4s ease-in-out infinite alternate; transform-origin: 50% 100%;
}
@keyframes flick { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.12, .95) rotate(3deg); } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; font-size: 13px; color: var(--muted); }
.steps b { display: flex; width: 28px; height: 28px; margin: 0 auto 4px; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold); color: #2a0a1f; }

label { display: block; font-size: 14px; color: var(--muted); margin-top: 14px; }
input, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px;
  font: inherit; color: var(--text); background: rgba(18, 5, 26, .7);
  border: 1px solid var(--line); border-radius: 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }

.btn { border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; padding: 10px 14px; color: var(--text); background: rgba(255, 255, 255, .08); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--saffron) 60%, var(--gold2)); box-shadow: 0 6px 20px rgba(249, 115, 22, .35); }
.btn.big { width: 100%; padding: 15px; margin-top: 10px; font-size: 17px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { color: #fda4af; border-color: rgba(253, 164, 175, .4); margin-top: 10px; }
.btn.wa { background: var(--wa); color: #052e16; }
.btn.upi { background: #4f46e5; }
.btn.add { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); padding: 8px 16px; }
.btn.qb { width: 38px; height: 38px; padding: 0; font-size: 20px; background: linear-gradient(135deg, var(--red), var(--saffron)); }
.btn.del { width: 38px; height: 38px; padding: 0; margin-left: 6px; background: transparent; border: 1px solid var(--line); color: #fda4af; }

.closed { background: rgba(225, 29, 72, .18); border: 1px solid rgba(225, 29, 72, .5); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.closed b { display: block; }
.closed span { font-size: 14px; color: #fecdd3; }

.hello { margin: 2px 0 10px; font-weight: 600; }
.searchbar input { margin: 0; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 6px; scrollbar-width: none; position: sticky; top: 66px; z-index: 8; background: linear-gradient(180deg, rgba(18, 5, 26, .95), rgba(18, 5, 26, .75)); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.cats::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card2); color: var(--text); border-radius: 99px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chip:active { background: var(--gold); color: #2a0a1f; }

.catsec { margin-top: 18px; scroll-margin-top: 120px; }
.cathead {
  display: flex; align-items: center; gap: 10px; font-size: 19px; padding-bottom: 8px; margin-bottom: 8px;
  background: radial-gradient(circle, var(--gold) 2px, transparent 2.5px) 0 100% / 14px 6px repeat-x;
}
.caticon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 12px; background: rgba(251, 191, 36, .12); border: 1px solid var(--line); }
.catcount { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; contain: content; }
.item.soldout { opacity: .55; }
.info { min-width: 0; }
.iname { font-weight: 600; }
.iprice { color: var(--gold); font-size: 15px; margin-top: 2px; font-weight: 700; }
.stk { margin-left: 8px; font-size: 12px; font-weight: 600; color: #fdba74; background: rgba(249, 115, 22, .15); padding: 1px 8px; border-radius: 99px; }
.stk.zero { color: #fda4af; background: rgba(225, 29, 72, .15); }
.ctl { display: flex; align-items: center; flex: 0 0 auto; }
.qty { min-width: 34px; text-align: center; font-weight: 800; font-size: 17px; }
.out { color: #fda4af; font-size: 13px; font-weight: 600; }

.rowhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rowhead h2 { margin: 0; }
.sum { margin-top: 12px; }
.sumrow { display: flex; justify-content: space-between; padding: 4px 0; }
.sumrow.total { font-size: 21px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sumrow.total b { color: var(--gold); }

.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.slot { border: 1.5px solid var(--line); background: rgba(18, 5, 26, .6); color: var(--text); border-radius: 12px; padding: 10px; font: inherit; cursor: pointer; text-align: left; }
.slot b { display: block; font-size: 15px; }
.slot small { color: var(--muted); font-size: 12px; }
.slot.on { border-color: var(--gold); background: rgba(251, 191, 36, .14); box-shadow: 0 0 0 2px rgba(251, 191, 36, .25); }
.slot.full { opacity: .45; }

.done { text-align: center; position: relative; overflow: hidden; }
.burst { position: absolute; inset: -40px; pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, .35) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 15%, rgba(249, 115, 22, .35) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 70%, rgba(225, 29, 72, .3) 0 3px, transparent 4px),
    radial-gradient(circle at 25% 75%, rgba(253, 230, 138, .35) 0 3px, transparent 4px);
  animation: pop 1.2s ease-out; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); } }
.tick { width: 66px; height: 66px; margin: 4px auto 10px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 0 30px rgba(34, 197, 94, .5); }
.doneitems { text-align: left; background: rgba(18, 5, 26, .6); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.slotpill:empty { display: none; }
.slotpill { display: inline-block; background: rgba(251, 191, 36, .15); color: var(--gold); padding: 4px 12px; border-radius: 99px; font-weight: 600; }

.mine .minehead { display: flex; justify-content: space-between; margin-bottom: 4px; }
.badge { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin: 2px 0 6px; }
.badge.st-ready { background: rgba(59, 130, 246, .25); }
.badge.st-delivered { background: rgba(34, 197, 94, .2); }
.badge.st-cancelled { background: rgba(107, 114, 128, .3); }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #3a0f2c, #2a0a1f); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .4);
}
.barinfo b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.barinfo span { font-size: 23px; font-weight: 800; color: var(--gold); }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: #fff8ee; color: #2a0a1f; padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; transition: .2s; z-index: 30; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- owner panel ---- */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: var(--card2); color: var(--text); border-radius: 12px; padding: 10px 4px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.tab.on { background: var(--gold); color: #2a0a1f; border-color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; color: var(--gold); }
.stat span { font-size: 12px; color: var(--muted); }
.order { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; padding: 14px; }
.order.s-ready { border-left-color: #3b82f6; }
.order.s-delivered { border-left-color: var(--green); opacity: .8; }
.order.s-cancelled { border-left-color: #6b7280; opacity: .6; }
.ohead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ototal { font-size: 20px; font-weight: 800; color: var(--gold); }
.oitems { margin: 8px 0; padding: 8px 10px; background: rgba(18, 5, 26, .6); border-radius: 10px; font-size: 14px; }
.oacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.oacts .btn, .oacts a { font-size: 14px; padding: 8px 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch .btn { min-width: 120px; }
.openbtn.isopen { background: var(--green); color: #052e16; }
.openbtn.isclosed { background: var(--red); }
.prow { display: grid; grid-template-columns: 1fr 86px 86px; gap: 6px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.prow.off { opacity: .55; }
.prow input { padding: 9px 10px; margin-top: 2px; font-size: 15px; }
.prow label { margin-top: 0; font-size: 11px; }
.prow .full { grid-column: 1 / -1; }
.prow .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.prow .acts .btn { font-size: 13px; padding: 7px 10px; }
.dirty { border-color: var(--gold) !important; }
@media (prefers-reduced-motion: reduce) { .sky, .flame, .burst { animation: none; } }
@media (max-width: 380px) { .stat b { font-size: 18px; } .hero h1 { font-size: 28px; } }
.chip.on { background: var(--gold); color: #2a0a1f; border-color: var(--gold); font-weight: 700; }

/* shop info */
.shopinfo p { margin: 6px 0; }
.rules { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; font-size: 14px; }
.rules li { background: rgba(18, 5, 26, .55); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.areanote { font-size: 13px; color: #fde68a; background: rgba(251, 191, 36, .1); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.pickupbox { display: grid; gap: 4px; text-align: left; background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .45); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.pickupbox b { color: var(--gold); }
.foot { max-width: 680px; margin: 0 auto; padding: 18px 16px 120px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--line); }
.foot span { color: #fde68a; }

html { background: #1d0716; }