:root {
  --brand: #4F46E5;
  --brand-hover: #4338CA;
  --brand-2: #6366F1;
  --brand-soft: #EEF2FF;
  --accent: #ff8a00;
  --accent-soft: #fff1df;
  --success: #0f9d58;
  --success-soft: #e3f6ec;
  --danger: #e5484d;
  --star: #0f9d58;

  --font: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif;
  --bg: #F8FAFF;
  --bg-grad: linear-gradient(180deg, #F8FAFF 0%, #EEF4FF 45%, #F5F3FF 100%);
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --line: #E2E8F0;
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.14);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #6366F1;
  --brand-hover: #4F46E5;
  --brand-2: #818CF8;
  --brand-soft: #252245;
  --accent-soft: #3a2a14;
  --success-soft: #133325;
  --bg: #0e0d14;
  --bg-grad: #0e0d14;
  --surface: #18171f;
  --surface-2: #211f2a;
  --text: #f2f1f7;
  --text-2: #b3b0c2;
  --text-3: #8a869c;
  --line: #2a2834;
  --shadow: 0 4px 14px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; color: var(--text); }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; background: transparent; }
@media (min-width: 560px) {
  body { background: var(--bg-grad); background-attachment: fixed; }
  :root[data-theme="dark"] body { background: var(--bg); }
  .shell { box-shadow: 0 0 0 1px var(--line), 0 24px 64px rgba(15, 23, 42, .08); }
}
.app { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); }
.app.no-tabbar { padding-bottom: calc(84px + var(--safe-b)); }
.view { animation: viewIn .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: linear-gradient(160deg, #6366f1, #4338ca); color: #fff; transition: opacity .4s, visibility .4s; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash-logo { text-align: center; animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
.splash-logo img { margin: 0 auto 14px; border-radius: 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.splash-name { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.splash-tag { opacity: .85; font-weight: 500; }
.splash-loader { width: 28px; height: 28px; margin: 20px auto 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .28); border-top-color: #fff; animation: spin .75s linear infinite; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Icons ---------- */
[data-icon] { display: inline-flex; width: 22px; height: 22px; }
[data-icon] svg { width: 100%; height: 100%; }
.ic-sm[data-icon], .ic-sm { width: 16px; height: 16px; }

/* ---------- Top bars ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); padding: 10px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; position: relative; color: var(--text); transition: background .15s; flex: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.icon-btn .count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.home-head { position: sticky; top: -64px; z-index: 20; overflow: hidden; isolation: isolate; color: var(--text); padding: 12px 16px 12px; border-radius: 0 0 22px 22px; background: #FFFFFF; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.home-head::after { display: none; }
.home-head > :not(.hh-fx) { position: relative; z-index: 1; }
.home-head .row { display: flex; align-items: center; gap: 10px; }
.home-head .hh-top { align-items: center; justify-content: space-between; }
.home-head .hello { flex: 1; min-width: 0; }
.home-head .hello small { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.home-head .hello b { display: block; margin-top: 2px; font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.hh-btn { position: relative; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 10px; background: #F8FAFC; border: 1px solid var(--line); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.hh-btn svg { width: 16px; height: 16px; stroke-width: 2.1; }
.hh-btn:active { transform: scale(.93); background: var(--brand-soft); color: var(--brand); }
.hh-lang { padding: 0 10px; background: var(--brand-soft); border-color: rgba(79, 70, 229, .22); color: var(--brand); font-family: var(--font); letter-spacing: .01em; }
.hh-cnt { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 1.5px solid #fff; line-height: 1; }
:root[data-theme="dark"] .home-head { background: radial-gradient(85% 95% at 100% 0%, rgba(99, 102, 241, .16) 0%, transparent 65%), linear-gradient(180deg, #1b1a25 0%, #171620 100%); color: var(--text); border-bottom-color: rgba(255, 255, 255, .08); box-shadow: 0 1px 0 var(--line), 0 10px 24px -12px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .home-head .hello small { color: var(--text-2); }
:root[data-theme="dark"] .home-head .hello b { color: var(--text); }
:root[data-theme="dark"] .hh-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #cbd5e1; }
:root[data-theme="dark"] .hh-lang { background: rgba(99, 102, 241, .2); border-color: rgba(129, 140, 248, .3); color: #a5b4fc; }
:root[data-theme="dark"] .hh-cnt { border-color: #1b1a25; }
:root[data-theme="dark"] .searchbar { background: #232231; border-color: rgba(255, 255, 255, .11); color: var(--text-2); box-shadow: none; }
:root[data-theme="dark"] .searchbar .sb-ic { color: #818cf8; }
:root[data-theme="dark"] .searchbar span.ph { color: var(--text-2); }
:root[data-theme="dark"] .searchbar span.ph b { color: var(--text); }
:root[data-theme="dark"] .searchbar .sb-go { background: rgba(255, 255, 255, .06); color: #94a3b8; }
.loc { flex: 1; min-width: 0; text-align: left; color: #fff; }
.loc small { display: block; font-size: 11px; opacity: .8; font-weight: 500; }
.loc b { display: flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* header background: ultra-subtle drifting letters & books */
.hh-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hh-fx::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(79, 70, 229, .045) 1px, transparent 1.4px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 60%); mask-image: linear-gradient(160deg, #000 0%, transparent 60%); }
.hh-orb { display: none; }
.hh-fx i { position: absolute; top: 100%; display: block; line-height: 1; font-style: normal; font-weight: 700; font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif; color: #4f46e5; opacity: 0; animation: hhRise var(--d, 20s) cubic-bezier(.4, .1, .6, .9) var(--dl, 0s) infinite; will-change: transform, opacity; }
.hh-fx i svg { width: 1em; height: 1em; display: block; }
.hh-fx i.L1 { filter: blur(1px); }
.hh-fx i.L2 { filter: blur(.5px); }
.hh-fx i.L3 { filter: none; }
@keyframes hhRise { 0% { transform: translate3d(0, 0, 0) rotate(var(--r)) scale(.8); opacity: 0; } 14% { opacity: .045; } 50% { transform: translate3d(calc(var(--sw) * 1px), -120px, 0) rotate(calc(var(--r) * -1)) scale(1); opacity: .045; } 82% { opacity: .045; } 100% { transform: translate3d(calc(var(--sw) * -.6px), -250px, 0) rotate(var(--r)) scale(.92); opacity: 0; } }
@keyframes sbShine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) {
  .hh-fx i { animation: none; top: 35%; opacity: .045; transform: rotate(var(--r)); }
}

/* search bar: slim, elevated and tactile */
.searchbar { position: relative; margin-top: 10px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 11px; border-radius: 11px; background: #ffffff; border: 1.5px solid #e2e8f0; color: #64748b; width: 100%; text-align: left; box-shadow: 0 2px 6px rgba(15, 23, 42, .04); transition: border-color .15s, background .15s, transform .12s; }
.searchbar:active { background: #f8fafc; border-color: rgba(79, 70, 229, .4); transform: scale(.992); }
.sb-ic { flex: none; display: grid; place-items: center; color: var(--brand); }
.sb-ic svg { width: 15px; height: 15px; stroke-width: 2.3; }
.searchbar span.ph { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #64748b; }
.searchbar span.ph b { color: #0f172a; font-weight: 700; }
.searchbar .sb-go { flex: none; width: 24px; height: 24px; border-radius: 7px; background: #eef2ff; color: var(--brand); display: grid; place-items: center; }
.searchbar .sb-go svg { width: 13px; height: 13px; stroke-width: 2.4; }
.searchbar .mic { color: var(--brand); }

/* header quick options strip */
.hh-opts { display: flex; align-items: center; gap: 7px; overflow-x: auto; margin: 9px -16px 0; padding: 1px 16px 2px; -webkit-overflow-scrolling: touch; }
.hh-opt { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 29px; padding: 0 10px; border-radius: 9px; background: #ffffff; border: 1px solid #e2e8f0; color: #334155; font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .03); transition: transform .12s, background .15s, border-color .15s; }
.hh-opt:active { transform: scale(.95); }
.hh-opt.opt-hot { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.hh-opt.opt-free { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.hh-opt.opt-combo { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.hh-opt.opt-offer { background: #fdf2f8; border-color: #fbcfe8; color: #be185d; }
:root[data-theme="dark"] .hh-opt { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); color: #cbd5e1; box-shadow: none; }
:root[data-theme="dark"] .hh-opt.opt-hot { background: rgba(249, 115, 22, .14); border-color: rgba(251, 146, 60, .26); color: #fdba74; }
:root[data-theme="dark"] .hh-opt.opt-free { background: rgba(16, 185, 129, .14); border-color: rgba(52, 211, 153, .26); color: #6ee7b7; }
:root[data-theme="dark"] .hh-opt.opt-combo { background: rgba(99, 102, 241, .16); border-color: rgba(129, 140, 248, .28); color: #a5b4fc; }
:root[data-theme="dark"] .hh-opt.opt-offer { background: rgba(236, 72, 153, .14); border-color: rgba(244, 114, 182, .26); color: #f9a8d4; }

/* ---------- Sections ---------- */
.section { padding: 18px 16px 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.section-head h2 { font-size: 18px; font-weight: 800; }
.section-head a, .link { color: var(--brand); font-weight: 700; font-size: 13px; }
.muted { color: var(--text-2); }
.tiny { font-size: 12px; color: var(--text-3); }

.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }

/* Banners */
.banners { margin: 0; padding: 0 0 4px; scroll-padding: 0; border-radius: 16px; }
.banner { flex: 0 0 100%; scroll-snap-align: start; border-radius: 16px; color: #fff; padding: 14px 18px; min-height: 104px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.banner h3 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.banner p { opacity: .92; font-size: 12px; max-width: 72%; line-height: 1.35; }
.banner .cta { margin-top: 8px; align-self: flex-start; background: #fff; color: #14121f; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 5px 11px; }
.banner .art { position: absolute; right: -4px; bottom: -10px; font-size: 52px; transform: rotate(-12deg); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .2)); }
.banner::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -40px; top: -60px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: all .25s; }
.dots i.on { width: 18px; background: var(--brand); }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-2); }
.cat .bubble { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; transition: transform .15s; }
.cat:active .bubble { transform: scale(.94); }
:root[data-theme="dark"] .cat .bubble, :root[data-theme="dark"] .cat-hero { background: var(--surface-2) !important; }
:root[data-theme="dark"] .cat-hero b { color: var(--text); }
:root[data-theme="dark"] .cat-hero span { color: var(--text-2); }

/* Offer strip */
.offer-strip { display: flex; gap: 10px; }
.offer { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-snap-align: start; }
.offer .em { font-size: 24px; }
.offer b { display: block; font-size: 13px; color: var(--text); }
.offer span { font-size: 12px; color: var(--text-2); }

/* Deal timer */
.deal-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 16px; }
:root[data-theme="dark"] .deal-card { background: var(--surface); border-color: var(--line); }
.deal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.deal-head h2 { font-size: 18px; font-weight: 700; }
.timer { display: flex; gap: 4px; align-items: center; font-weight: 700; font-size: 13px; }
.timer b { background: var(--text); color: var(--surface); border-radius: 6px; padding: 3px 6px; min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

/* Price chips */
.price-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.price-chip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 6px; text-align: center; box-shadow: var(--shadow); }
.price-chip small { display: block; font-size: 11px; color: var(--text-2); font-weight: 600; }
.price-chip b { font-size: 16px; color: var(--brand); }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; transition: transform .15s, box-shadow .18s; }
.card:active { transform: scale(.98); }
.hscroll .card { flex: 0 0 156px; scroll-snap-align: start; }
.thumb { aspect-ratio: 3 / 4; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 6px; background: rgba(248, 250, 252, .8); }
.thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.thumb .ph-emoji { font-size: 56px; }
.thumb .tag { position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--surface); color: var(--text); padding: 3px 7px; border-radius: 6px; }
.thumb .tag.deal { background: var(--accent); color: #fff; }
.thumb .tag.new { background: var(--brand); color: #fff; }
.thumb .rate { position: absolute; left: 8px; bottom: 8px; background: rgba(255, 255, 255, .95); color: #0F172A; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; display: flex; align-items: center; gap: 3px; }
.thumb .rate i { color: var(--star); font-style: normal; }
.thumb .rate em { font-style: normal; color: #64748B; font-weight: 600; border-left: 1px solid #E2E8F0; padding-left: 4px; }
.wish { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; color: #475569; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.wish [data-icon] { width: 18px; height: 18px; }
.wish.on { color: var(--danger); }
.wish.on svg path { fill: currentColor; }
.wish.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.3); } }
.card-body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.card-brand { font-size: 12px; font-weight: 700; color: var(--text); }
.card-name { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.price { font-weight: 700; font-size: 15px; color: var(--text); }
.mrp { color: var(--text-3); text-decoration: line-through; font-size: 12px; }
.off { color: var(--success); font-weight: 700; font-size: 12px; }
.free { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.card:has(.quick-add) .card-body { padding-right: 46px; }
.quick-add { position: absolute; right: 10px; bottom: 12px; width: 34px; height: 34px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(79, 70, 229, .28); transition: transform .15s, background .2s; }
.quick-add:hover { background: var(--brand-hover); }
.quick-add svg { width: 18px; height: 18px; stroke-width: 2.6; }
.quick-add:active { transform: scale(.9); }
.quick-add.added { background: var(--success); box-shadow: 0 6px 14px rgba(15, 157, 88, .32); animation: bump .35s; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .1s, filter .15s, background .15s, border-color .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .24); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 138, 0, .28); }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.btn-outline { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.input, select.input, textarea.input { height: 50px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.err { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: 12px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; box-shadow: var(--shadow); }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: flex; z-index: 30; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); position: relative; transition: color .15s; }
.tab .ti { width: 24px; height: 24px; transition: transform .2s; }
.tab.on { color: var(--brand); font-weight: 700; }
.tab.on .ti { transform: translateY(-1px); }
.tab.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.badge.pulse { animation: bump .4s; }

/* ---------- Sticky bottom action bar ---------- */
.actionbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + var(--safe-b)); display: flex; gap: 10px; align-items: center; z-index: 30; box-shadow: 0 -8px 24px rgba(20, 18, 31, .06); }
.actionbar .btn { flex: 1; }
.actionbar .total { flex: 1; }
.actionbar .total b { font-size: 19px; display: block; }
.actionbar .total a { font-size: 12px; color: var(--brand); font-weight: 700; }

/* ---------- Product page ---------- */
.pdp-gallery { position: relative; background: var(--surface); }
.pdp-gallery .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pdp-gallery .slides::-webkit-scrollbar { display: none; }
.pdp-gallery .slide { flex: 0 0 100%; aspect-ratio: 3 / 4; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; padding: 6px; background: rgba(248, 250, 252, .8); position: relative; overflow: hidden; }
.pdp-gallery .slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.pdp-gallery .slide .ph-emoji { font-size: 120px; }
.pdp-gallery .over { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.pdp-gallery .over .icon-btn { background: rgba(255, 255, 255, .92); color: #14121f; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); border-radius: 50%; }
.pdp-gallery .over .right { display: flex; gap: 8px; }
.pdp-gallery .dots { position: absolute; bottom: 12px; left: 0; right: 0; margin: 0; }
.pdp-gallery .dots i { background: rgba(0, 0, 0, .2); }
.pdp-gallery .dots i.on { background: var(--brand); }
.icon-btn.on { color: var(--danger) !important; }
.icon-btn.on svg path { fill: currentColor; }

.panel { background: var(--surface); padding: 16px; margin-top: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.pdp-brand { color: var(--brand); font-weight: 700; font-size: 13px; }
.pdp-title { font-size: 18px; font-weight: 600; margin: 2px 0 8px; line-height: 1.35; }
.rating-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--success); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 8px; }
.pdp-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.pdp-price .off { font-size: 18px; }
.pdp-price .price { font-size: 26px; }
.pdp-price .mrp { font-size: 14px; }
.sizes { display: flex; gap: 10px; flex-wrap: wrap; }
.size { min-width: 48px; height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; display: grid; place-items: center; background: var(--surface); }
.size.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.size-err { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.offer-list { display: flex; flex-direction: column; gap: 10px; }
.offer-item { display: flex; gap: 10px; font-size: 13px; }
.offer-item .tagi { color: var(--success); flex: none; }
.assure { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.assure div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.assure .ab { width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.deliv-result { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.deliv-result .ok { color: var(--success); }
.highlights { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; display: grid; gap: 6px; }

/* ---------- Cart ---------- */
.cart-item { background: var(--surface); padding: 14px 16px; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.cart-item .thumb { width: 88px; flex: none; border-radius: 12px; aspect-ratio: 1 / 1.1; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .ttl { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cart-item .acts { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; height: 34px; }
.stepper button { width: 34px; height: 100%; display: grid; place-items: center; color: var(--brand); }
.stepper button svg { width: 16px; height: 16px; }
.wish svg { width: 18px; height: 18px; }
.icon-btn > svg { width: 22px; height: 22px; }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.text-btn { font-size: 13px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.coupon-box { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.coupon-box .cb-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.coupon-box div { flex: 1; }
.coupon-box b { display: block; font-size: 14px; }
.coupon-box span { font-size: 12px; color: var(--text-2); }
.bill { display: grid; gap: 10px; font-size: 14px; }
.bill .r { display: flex; justify-content: space-between; }
.bill .r.total { border-top: 1px dashed var(--line); padding-top: 12px; font-weight: 800; font-size: 16px; }
.green { color: var(--success); }
.save-banner { background: var(--success-soft); color: var(--success); font-weight: 700; font-size: 13px; text-align: center; padding: 10px; border-radius: 12px; margin-top: 12px; }
.progress-free { background: var(--surface); padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--line); }
.progress-free .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.progress-free .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 3px; transition: width .4s; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 70px 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .art { font-size: 72px; width: 130px; height: 130px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 8px; }
.empty h2 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--text-2); max-width: 280px; }
.empty .btn { margin-top: 12px; }

/* ---------- Checkout ---------- */
.steps { display: flex; align-items: center; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--text-3); }
.step i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--surface); }
.step.on { color: var(--brand); }
.step.on i { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.done i { border-color: var(--success); background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--line); margin: 0 6px 16px; }
.step-line.done { background: var(--success); }

.addr-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.addr-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 50%, var(--surface)); }
.addr-card .typ { font-size: 10px; font-weight: 800; text-transform: uppercase; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; margin-left: 6px; color: var(--text-2); }
.addr-card p { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 1px; display: grid; place-items: center; }
.on > .radio, .radio.on { border-color: var(--brand); }
.on > .radio::after, .radio.on::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }

.pay-group { background: var(--surface); margin-top: 8px; }
.pay-group h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 14px 16px 6px; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.pay-opt:last-child { border-bottom: 0; }
.pay-opt .pl { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; color: #fff; }
.pay-opt .pt { flex: 1; }
.pay-opt .pt b { display: block; font-size: 14px; }
.pay-opt .pt span { font-size: 12px; color: var(--text-3); }
.pay-opt .pill { font-size: 10.5px; font-weight: 800; color: var(--success); background: var(--success-soft); padding: 3px 8px; border-radius: 6px; }
.pay-extra { padding: 0 16px 14px 68px; }

/* ---------- Success ---------- */
.success { text-align: center; padding: 50px 24px 30px; }
.success .tick { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; background: var(--success); display: grid; place-items: center; color: #fff; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 0 0 14px var(--success-soft); }
.success .tick svg { width: 56px; height: 56px; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h1 { font-size: 24px; font-weight: 800; }
.success p { color: var(--text-2); margin-top: 6px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Orders ---------- */
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.order-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.status { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.status.placed { background: var(--brand-soft); color: var(--brand); }
.status.shipped { background: var(--accent-soft); color: var(--accent); }
.status.delivered { background: var(--success-soft); color: var(--success); }
.order-thumbs { display: flex; gap: 8px; }
.order-thumbs .thumb { width: 56px; border-radius: 10px; flex: none; }
.timeline { margin-top: 14px; display: grid; gap: 0; }
.tl { display: flex; gap: 12px; }
.tl .dotc { display: flex; flex-direction: column; align-items: center; }
.tl .dotc i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); }
.tl .dotc s { width: 2px; flex: 1; background: var(--line); min-height: 22px; }
.tl.done .dotc i { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.tl.done .dotc s { background: var(--success); }
.tl .tx { padding-bottom: 12px; font-size: 13px; }
.tl .tx b { display: block; font-size: 13.5px; }

/* ---------- Account ---------- */
.profile-head { background: linear-gradient(165deg, var(--brand-2), var(--brand)); color: #fff; padding: 24px 16px 60px; }
.profile-head .who { display: flex; gap: 14px; align-items: center; }
.avatar { width: 60px; height: 60px; border-radius: 20px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.profile-head h2 { font-size: 20px; color: #fff; }
.profile-head small { opacity: .9; }
.quick { margin: -40px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 6px; position: relative; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.quick .qi { width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin: 16px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-weight: 600; font-size: 14px; }
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi { color: var(--text-2); }
.menu-item .grow { flex: 1; }
.menu-item .chev { color: var(--text-3); }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

/* ---------- Search ---------- */
.search-top { display: flex; align-items: center; gap: 6px; }
.search-top .input { height: 44px; border-radius: 12px; }
.term-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Category page ---------- */
.cat-layout { display: grid; grid-template-columns: 92px 1fr; min-height: calc(100vh - 61px - var(--tabbar-h)); }
.cat-side { background: var(--surface-2); border-right: 1px solid var(--line); }
.cat-side button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 14px 6px; font-size: 11.5px; font-weight: 600; color: var(--text-2); text-align: center; position: relative; }
.cat-side button span { font-size: 26px; }
.cat-side button.on { background: var(--surface); color: var(--brand); }
.cat-side button.on::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.cat-main { padding: 14px 12px; }
.cat-hero { border-radius: var(--r); padding: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.cat-hero b { font-size: 17px; display: block; color: #0F172A; }
.cat-hero span { font-size: 12px; color: #475569; }
.cat-hero em { font-size: 44px; font-style: normal; }
.cat-main .grid { gap: 10px; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 8, 20, .45); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; z-index: 41; padding: 8px 16px calc(16px + var(--safe-b)); animation: up .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translate(-50%, 100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.coupon { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.coupon code { font-weight: 800; font-size: 14px; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 8px; letter-spacing: .04em; }
.coupon div { flex: 1; font-size: 13px; }
.coupon.dis { opacity: .5; }

/* ---------- Toast & install ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); transform: translateX(-50%); background: #0F172A; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 13.5px; z-index: 70; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); animation: toastIn .3s cubic-bezier(.2, 1.2, .4, 1); }
.toast a { color: #b9a6ff; font-weight: 800; margin-left: 6px; }
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.install-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); width: calc(100% - 24px); max-width: 456px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 10px 8px 10px 12px; display: flex; gap: 10px; align-items: center; z-index: 35; border: 1px solid var(--line); }
.install-bar img { border-radius: 10px; }
.install-text { flex: 1; font-size: 12px; color: var(--text-2); }
.install-text b { display: block; color: var(--text); font-size: 14px; }

/* skeleton shimmer for images */
.thumb.loading::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* =====================================================================
   eBOOK STORE COMPONENTS
   ===================================================================== */
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; margin-top: 12px; }
.icon-btn.light { color: #fff; background: rgba(255, 255, 255, .16); }

/* ---------- Auto-designed book cover (scales with its own width via container units) ---------- */
.bk { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; overflow: hidden; color: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 6px 14px rgba(20,18,40,.18), 0 18px 32px -12px rgba(20,18,40,.35); isolation: isolate; font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif; }
.bk::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 7cqw; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.05) 70%, rgba(255,255,255,.18)); z-index: 2; }
.bk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 35%), radial-gradient(120% 70% at 100% 0%, rgba(255,255,255,.18), transparent 60%); pointer-events: none; z-index: 1; }
.bk-in { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; padding: 9cqw 9cqw 7cqw 13cqw; }
.bk-in > * { position: relative; }
.bk-band { display: flex; align-items: center; justify-content: space-between; gap: 4cqw; font: 800 6cqw/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .95; }
.bk-band span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-band b { background: rgba(255,255,255,.95); color: #1b1630; border-radius: 2cqw; padding: 1.5cqw 3cqw; font-size: 6.5cqw; letter-spacing: 0; }
.bk-title { margin-top: 9cqw; font-weight: 700; font-size: 11.5cqw; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.bk-sub { margin-top: 3.5cqw; font: 600 6.2cqw/1.3 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif; opacity: .88; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bk-art { position: absolute !important; right: 4cqw; bottom: 13cqw; font-size: 30cqw; line-height: 1; transform: rotate(-10deg); filter: drop-shadow(0 2cqw 3cqw rgba(0,0,0,.25)); z-index: 2 !important; }
.bk-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 3cqw; font: 600 5.4cqw/1.2 'Plus Jakarta Sans', sans-serif; opacity: .92; border-top: 1px solid rgba(255,255,255,.35); padding-top: 3cqw; }
.bk-foot span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-foot span:last-child { white-space: nowrap; }
.bk.has-img { display: flex; align-items: center; justify-content: center; padding: 6px; background: rgba(248, 250, 252, .8); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
.bk.has-img::before, .bk.has-img::after { display: none; }
.bk.has-img img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; display: block; border-radius: 4px; }
:root[data-theme="dark"] .bk.has-img { background: var(--surface-2); border-color: var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .28); }
.bk.is-bundle { box-shadow: 5px -5px 0 -1px rgba(255,255,255,.9), 5px -5px 0 0 rgba(0,0,0,.12), 10px -10px 0 -2px rgba(255,255,255,.75), 10px -10px 0 -1px rgba(0,0,0,.1), 0 14px 28px -10px rgba(20,18,40,.4); }
.bk.xxs { width: 34px; flex: none; border-radius: 2px 5px 5px 2px; }
.bk.xs { width: 52px; flex: none; border-radius: 3px 6px 6px 3px; }
.bk.has-img.xxs { padding: 2px; border-radius: 5px; }
.bk.has-img.xs { padding: 3px; border-radius: 7px; }
.bk.has-img.xxs img, .bk.has-img.xs img { border-radius: 3px; }
.bk.sm { width: 84px; flex: none; }
.bk.md { width: 150px; flex: none; }
.bk.lg { width: min(240px, 60vw); flex: none; }
.bk.xxs .bk-sub, .bk.xxs .bk-foot, .bk.xxs .bk-band, .bk.xs .bk-foot, .bk.xs .bk-sub { display: none; }
.tone-indigo { background: linear-gradient(155deg, #6d5dfc, #3a1fb8 70%, #2a1585); }
.tone-teal { background: linear-gradient(155deg, #19b8a6, #0a7c7a 70%, #075e63); }
.tone-saffron { background: linear-gradient(155deg, #ffa53a, #f0631c 65%, #c43d12); }
.tone-rose { background: linear-gradient(155deg, #ff6f91, #d6336c 65%, #a51d55); }
.tone-emerald { background: linear-gradient(155deg, #33c27a, #138a52 65%, #0b6a3e); }
.tone-violet { background: linear-gradient(155deg, #b26bff, #7b2ff0 60%, #5419b8); }
.tone-sky { background: linear-gradient(155deg, #4cc3ff, #1a7fe0 65%, #1059ad); }
.tone-amber { background: linear-gradient(155deg, #ffd04d, #f59f0b 60%, #c87800); }
.tone-slate { background: linear-gradient(155deg, #64748b, #334155 65%, #1e293b); }
.tone-crimson { background: linear-gradient(155deg, #f05252, #c0262d 65%, #8f1820); }
.tone-amber .bk-title, .tone-amber .bk-band, .tone-amber .bk-sub, .tone-amber .bk-foot { color: #2b1a00; text-shadow: none; }
.tone-amber .bk-foot { border-color: rgba(43,26,0,.25); }

/* ---------- Book card ---------- */
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.bcard:active { transform: scale(.985); }
.bc-cover { position: relative; padding: 12px 12px 10px; background: linear-gradient(160deg, #F8FAFF 0%, #EEF2FF 100%); }
:root[data-theme="dark"] .bc-cover { background: var(--surface-2); }
.bc-cover .bk { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.bc-tag { position: absolute; left: 8px; top: 8px; z-index: 5; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(15, 23, 42, .08); }
.t-bestseller { background: linear-gradient(90deg, #ffd166, #f9a03f) !important; color: #3d2600 !important; }
.t-trending { background: linear-gradient(90deg, #ff6a88, #ff8e53) !important; color: #fff !important; }
.t-new { background: var(--brand) !important; color: #fff !important; }
.t-combo { background: linear-gradient(90deg, #4F46E5, #7C3AED) !important; color: #fff !important; }
.t-free { background: var(--success) !important; color: #fff !important; }
.bcard .wish { z-index: 5; }
.bc-owned { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 5; background: var(--success); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; box-shadow: 0 4px 10px rgba(15,157,88,.35); }
.bc-owned [data-icon] { width: 12px; height: 12px; }
.bc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bc-meta { display: flex; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.bc-meta .lang { color: var(--brand); background: var(--brand-soft); padding: 2px 7px; border-radius: 999px; letter-spacing: .02em; }
.bc-title { font-family: var(--font); font-weight: 700; font-size: 14.5px; line-height: 1.4; letter-spacing: -.01em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.bc-sub { font-size: 12px; color: var(--text-2); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-rate { font-size: 11.5px; font-weight: 700; display: flex; gap: 3px; align-items: center; color: var(--text); }
.bc-rate i { color: #f5a623; font-style: normal; }
.bc-rate em { font-style: normal; color: var(--text-3); font-weight: 600; }
.bcard .price-row { margin-top: auto; padding-top: 4px; }
.free-tag { color: var(--success) !important; letter-spacing: .04em; }
.free-tag.big { font-size: 28px; }
.bcard:has(.quick-add) .bc-body { padding-right: 46px; }
.shelf .bcard { flex: 0 0 152px; scroll-snap-align: start; }
.shelf .bcard .bc-cover { padding: 10px 10px 8px; }

/* ---------- Home ---------- */
.hello { flex: 1; min-width: 0; }
.hello small { display: block; font-size: 12px; opacity: .85; font-weight: 600; }
.hello b { font-size: 17px; }
.continue { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.continue small { display: block; font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.continue b { display: block; font-family: var(--font); font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue .play { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px rgba(79,70,229,.28); transition: background .15s; }
.continue .play:hover { background: var(--brand-hover); }
.continue .play svg { width: 20px; height: 20px; }
.continue.big { margin: 0 0 4px; }
.pbar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 7px 0 4px; }
.pbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); min-width: 3px; }
.pbar.sm { height: 4px; margin: 8px 0 6px; }
.goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.goal { position: relative; display: grid; grid-template-columns: 46px 1fr; column-gap: 12px; align-items: center; min-height: 84px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .2s, border-color .18s; }
.goal:active { transform: scale(.97); }
@media (hover: hover) {
  .goal:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); }
}
.goal .g-emoji { grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; line-height: 1; background: var(--tint); border: 1px solid rgba(15, 23, 42, .05); }
.goal b { font-size: 13.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--text); min-width: 0; }
.goal .g-bn { margin-top: 2px; font-family: var(--font); font-size: 12px; line-height: 1.4; color: var(--text-2); }
:root[data-theme="dark"] .goal { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .goal .g-emoji { background: var(--surface-2); border-color: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .goal b { color: var(--text); }
:root[data-theme="dark"] .goal .g-bn { color: var(--text-2); }

/* Recommended for you */
.rec-head { align-items: flex-start; margin-bottom: 10px; }
.rec-head-main { min-width: 0; }
.rec-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; line-height: 1.45; }
.rec-actions { display: flex; align-items: center; gap: 10px; flex: none; padding-top: 3px; }
.rec-clear { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 2px 6px; border-radius: 6px; transition: color .15s, background .15s; white-space: nowrap; }
.rec-clear:hover { color: var(--text); background: var(--surface-2); }
.rec-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 4px; -webkit-overflow-scrolling: touch; }
.rec-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); transition: background .15s, border-color .15s, color .15s, transform .12s; }
.rec-tab:active { transform: scale(.97); }
.rec-tab .rt-ic { font-size: 14px; line-height: 1; }
.rec-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .45); }
.rec-tab.on:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
@media (hover: hover) {
  .rec-tab:not(.on):hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--brand); background: var(--brand-soft); }
}
@media (min-width: 768px) {
  .rec-tabs { margin: 0 0 14px; padding: 2px 0 4px; flex-wrap: wrap; }
}
:root[data-theme="dark"] .rec-tab:not(.on) { background: var(--surface); border-color: var(--line); color: var(--text-2); }
:root[data-theme="dark"] .rec-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trust > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.trust [data-icon] { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.trust b { font-size: 13px; color: var(--text); }
.trust span:not([data-icon]) { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.combo { flex: 0 0 290px; scroll-snap-align: start; background: linear-gradient(135deg, #1d1440, #3b1d7a); color: #fff; border-radius: var(--r-lg); padding: 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.combo-stack { position: relative; width: 92px; height: 104px; flex: none; }
.cs-item { position: absolute; left: calc(var(--i) * 18px); top: calc(var(--i) * 6px); transform: rotate(calc(-8deg + var(--i) * 8deg)); transform-origin: bottom left; }
.combo-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.combo-body b { font-family: var(--font); font-size: 15px; line-height: 1.3; }
.combo-body .tiny { color: rgba(255,255,255,.78); }
.combo .price { color: #fff; }
.combo .mrp { color: rgba(255,255,255,.6); }
.combo .off { color: #7cf0b5; }
.pill-save { align-self: flex-start; background: #ffd166; color: #3b2600; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.exam-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-hub { display: grid; grid-template-columns: 1fr; gap: 9px; }
.exam-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s cubic-bezier(.2, .8, .2, 1), border-color .18s, box-shadow .18s; min-width: 0; }
.exam-item:active { transform: scale(.985); }
.exam-item .ex-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--tint); border: 1px solid rgba(15, 23, 42, .05); display: grid; place-items: center; font-size: 21px; line-height: 1; }
.exam-item .ex-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exam-item .ex-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-item .ex-meta { font-size: 12px; color: var(--text-2); font-family: var(--font); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-item .ex-right { flex: none; display: flex; align-items: center; gap: 7px; }
.exam-item .ex-cnt { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.exam-item .ex-go { width: 26px; height: 26px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; transition: transform .18s, background .18s, color .18s; }
.exam-item .ex-go svg { width: 14px; height: 14px; stroke-width: 2.4; }
@media (hover: hover) {
  .exam-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); box-shadow: 0 8px 20px rgba(15, 23, 42, .06); }
  .exam-item:hover .ex-go { background: var(--brand-hover); color: #fff; transform: translateX(2px); }
}
@media (min-width: 640px) {
  .exam-hub { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (min-width: 1024px) {
  .exam-hub { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
:root[data-theme="dark"] .exam-item { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
:root[data-theme="dark"] .exam-item .ex-ic { background: var(--surface-2); border-color: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .exam-item .ex-meta { color: var(--text-2); }
:root[data-theme="dark"] .exam-item .ex-go { background: var(--brand-soft); }

/* ---------- Explore ---------- */
.shelves { display: grid; gap: 10px; }
.shelf-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); transition: transform .15s, border-color .18s; }
.shelf-card:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.shelf-card .sc-emoji { width: 46px; height: 46px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; font-size: 24px; flex: none; }
.shelf-card div { flex: 1; min-width: 0; }
.shelf-card b { display: block; font-size: 15px; color: var(--text); }
.shelf-card div span { font-family: var(--font); font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.shelf-card em { font-style: normal; font-weight: 700; font-size: 12px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; }
.sticky-chips { position: sticky; top: 61px; z-index: 15; }

/* ---------- Product page ---------- */
.pd-topbar .topbar { border-bottom: 0; }
.crumbs { display: none; }
.pd-stage { padding: 28px 16px 34px; display: grid; place-items: center; position: relative; overflow: hidden; }
.pd-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 40%, rgba(255,255,255,.55), transparent 70%); }
.tone-bg-indigo { background: linear-gradient(160deg, #ebe8ff, #d9d2ff); }
.tone-bg-teal { background: linear-gradient(160deg, #dcf7f3, #bfeee6); }
.tone-bg-saffron { background: linear-gradient(160deg, #fff0de, #ffd9b5); }
.tone-bg-rose { background: linear-gradient(160deg, #ffe6ee, #ffcadb); }
.tone-bg-emerald { background: linear-gradient(160deg, #e1f8ea, #c2efd4); }
.tone-bg-violet { background: linear-gradient(160deg, #f1e6ff, #e0c9ff); }
.tone-bg-sky { background: linear-gradient(160deg, #e2f3ff, #c3e5ff); }
.tone-bg-amber { background: linear-gradient(160deg, #fff6d6, #ffe7a3); }
.tone-bg-slate { background: linear-gradient(160deg, #eef1f5, #d9dfe8); }
.tone-bg-crimson { background: linear-gradient(160deg, #ffe5e5, #ffc9c9); }
:root[data-theme="dark"] [class*="tone-bg-"] { background: linear-gradient(160deg, #1f1c2c, #2a2540); }
.book3d { perspective: 1200px; position: relative; }
.book3d > .bk { transform: rotateY(-16deg) rotateX(2deg); transform-origin: left center; transition: transform .6s cubic-bezier(.2,.8,.2,1); box-shadow: 14px 18px 34px -8px rgba(20,18,40,.45), 2px 2px 0 rgba(0,0,0,.05); }
.book3d:hover > .bk { transform: rotateY(-4deg); }
.book3d > .bk.has-img { transform: none; box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06); }
.book3d:hover > .bk.has-img { transform: translateY(-2px); }
.bundle-fan { position: relative; width: 240px; height: 230px; }
.bf { position: absolute; left: 50%; top: 10px; transform: translateX(calc(-50% + (var(--i) - (var(--n) - 1) / 2) * 34px)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 7deg)); transform-origin: bottom center; }
.preview-btn { margin-top: 12px; height: 48px; }
.pd-media { padding: 0 0 4px; }
.pd-media .preview-btn { width: calc(100% - 32px); margin: -22px 16px 0; position: relative; z-index: 2; background: var(--surface); box-shadow: var(--shadow); color: var(--brand); }
.pd-info { padding: 18px 16px 4px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tagchip { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.pd-title { font-family: var(--font); font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--text); }
.pd-sub { color: var(--text-2); margin-top: 4px; font-size: 14.5px; line-height: 1.5; }
.pd-by { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pd-price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.pd-price .price { font-size: 30px; }
.pd-price .mrp { font-size: 15px; }
.pd-price .off { font-size: 15px; }
.owned-banner { margin-top: 12px; display: flex; align-items: center; gap: 8px; background: var(--success-soft); color: var(--success); font-weight: 700; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.pd-actions { display: none; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pd-actions .btn { flex: 1 1 180px; }
.pd-actions #addCart { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .24); }
.pd-actions #addCart:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; box-shadow: var(--shadow); }
.facts span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.facts b { font-size: 13px; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 6px; }
.perks div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.perks [data-icon] { color: var(--success); width: 18px; height: 18px; }
.bundle-list { display: grid; gap: 8px; }
.bl-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.bl-item b { display: block; font-family: var(--font); font-size: 14px; color: var(--text); }
.peek { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.peek::-webkit-scrollbar { display: none; }
.peek-pg { flex: 0 0 116px; aspect-ratio: 595 / 842; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .12); position: relative; border: 1px solid var(--line); }
.peek-pg canvas { width: 100%; height: 100%; display: block; }
.peek-pg .pg { position: absolute; right: 6px; bottom: 6px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.skeleton { position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.toc { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.toc li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-family: var(--font); font-size: 14.5px; counter-increment: c; }
.toc li::before { content: counter(c, decimal-leading-zero); font: 800 11px 'Plus Jakarta Sans'; color: var(--brand); margin-right: 10px; padding-top: 3px; }
.toc li span { flex: 1; }
.toc li em { font-style: normal; font-size: 12px; color: var(--text-3); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.toc li.locked { color: var(--text-3); }
.toc li [data-icon] { width: 12px; height: 12px; }
.about { color: var(--text-2); font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.hl { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hl li { display: flex; gap: 8px; font-size: 14px; }
.hl [data-icon] { color: var(--success); margin-top: 3px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.how div { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.how i { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.how b { font-size: 13px; }
.how span { font-size: 11.5px; color: var(--text-2); }
.stars { font-size: 14px; letter-spacing: 1px; background: linear-gradient(90deg, #f5a623 var(--r), var(--line) var(--r)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rv-summary { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.rv-big { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rv-big b { font-size: 38px; line-height: 1; }
.rv-bars { flex: 1; display: grid; gap: 5px; }
.rv-bars div { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.rv-bars i { flex: 1; height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rv-bars i b { display: block; height: 100%; background: #f5a623; border-radius: 4px; }
.rv-list { display: grid; gap: 12px; }
.rv { border-top: 1px solid var(--line); padding-top: 12px; }
.rv-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-h b { font-size: 13.5px; }
.rv p { margin-top: 6px; font-size: 14px; color: var(--text-2); font-family: var(--font); line-height: 1.55; }
.avatar-s { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq p { margin-top: 8px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.combo-upsell .cu { display: flex; align-items: center; gap: 12px; color: var(--text); }
.combo-upsell [data-icon]:first-child { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fff3d6; color: #b46b00; }
.rate-pick { display: flex; gap: 6px; justify-content: center; margin: 4px 0 16px; }
.rate-pick button { font-size: 36px; color: var(--line); transition: transform .1s, color .1s; }
.rate-pick button.on { color: #f5a623; }
.rate-pick button:active { transform: scale(.85); }
.pd-bar .btn { flex: 1; }
.pd-bar .btn[aria-label] { flex: 0 0 52px; padding: 0; }

/* ---------- Reader ---------- */
.reader { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #F8FAFC; color: #0F172A; user-select: none; -webkit-user-select: none; animation: fade .2s; }
.reader.rt-light { background: #F8FAFC; color: #0F172A; }
.reader.rt-sepia { background: #e9dfc9; color: #1e1810; }
.reader.rt-dark { background: #0F172A; color: #F1F5F9; }
.r-top { display: flex; align-items: center; gap: 4px; padding: 8px 8px calc(8px); padding-top: calc(8px + env(safe-area-inset-top, 0px)); background: rgba(15, 23, 42, .94); color: #fff; backdrop-filter: blur(10px); }
.r-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.r-btn:hover { background: rgba(255,255,255,.1); }
.r-btn svg { width: 21px; height: 21px; }
.r-title { flex: 1; min-width: 0; padding: 0 6px; }
.r-title b { display: block; font-family: var(--font); font-size: 14.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-title span { font-size: 11.5px; opacity: .75; }
.r-zoom { font-size: 12px; font-weight: 700; min-width: 42px; text-align: center; opacity: .85; }
.r-body { flex: 1; overflow: auto; padding: 14px 12px 40px; outline: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.r-page { position: relative; margin: 0 auto 14px; background: #fff; box-shadow: 0 2px 12px rgba(15, 23, 42, .12); border-radius: 2px; overflow: hidden; }
.r-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.r-page .r-wm { position: absolute; inset: 0; background-image: var(--wm); pointer-events: none; z-index: 2; }
.r-page canvas ~ .r-pno { display: none; }
.r-pno { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 28px; font-weight: 800; color: #cbd5e1; }
.rt-sepia .r-page canvas { filter: sepia(.35) brightness(.97); }
.rt-dark .r-page { background: #1e293b; }
.rt-dark .r-page canvas { filter: invert(.9) hue-rotate(180deg) brightness(.95); }
.r-bottom { display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(15, 23, 42, .94); color: #fff; }
.r-bottom input[type=range] { flex: 1; accent-color: var(--brand-2); }
.r-bottom #rPage { font-size: 12.5px; font-weight: 700; min-width: 64px; }
.r-loading { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; }
.r-end { max-width: 560px; margin: 10px auto 30px; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: var(--r-lg); padding: 18px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow-lg); }
.r-end h3 { font-size: 17px; }
.r-end p { font-size: 13px; margin: 6px 0 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1 1 140px; height: 44px; }
.r-endnote { text-align: center; padding: 10px; color: var(--text-3); }
.spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 0 auto 10px; }
.busy { text-align: center; padding: 26px 0 16px; }
.busy b { display: block; }
@media (max-width: 420px) { .hide-xs { display: none !important; } }

/* ---------- Library ---------- */
.tabs-pill { display: flex; gap: 6px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-pill a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--surface); color: var(--text-2); border: 1px solid var(--line); box-shadow: var(--shadow); white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.tabs-pill a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs-pill a.on:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 14px 16px; }
.lib-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.lc-cover { position: relative; width: 100%; display: block; padding: 4px; }
.lc-off { position: absolute; right: 2px; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; z-index: 6; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.lc-off svg { width: 14px; height: 14px; }
.lc-title { font-family: var(--font); font-size: 13.5px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-acts { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.lc-acts .btn { flex: 1; }
.lib-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lib-row:last-child { border-bottom: 0; }
.lib-row b { display: block; font-family: var(--font); font-size: 14px; color: var(--text); }
.sheet-book { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sheet-book b { display: block; font-family: var(--font); color: var(--text); }
.opt { gap: 12px; justify-content: flex-start; }
.opt .grow { flex: 1; }
.opt [data-icon] { color: var(--brand); }

/* ---------- Cart & checkout ---------- */
.note-strip { display: flex; gap: 8px; align-items: center; background: var(--success-soft); color: var(--success); font-size: 13px; padding: 11px 16px; font-weight: 600; }
.note-strip b { font-weight: 800; }
.cart-row { display: flex; gap: 14px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.cr-cover { flex: none; display: block; }
.cr-title { font-family: var(--font); font-weight: 700; font-size: 15px; line-height: 1.4; color: var(--text); display: block; }
.cr-acts { display: flex; gap: 16px; margin-top: 8px; }
.mini-item .bk { flex: none; }
.coupon-line { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1.5px dashed var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--brand); text-align: left; }
.ck-step { display: flex; gap: 14px; align-items: flex-start; }
.ck-step h3 { margin-bottom: 4px; }
.ck-step.dim { opacity: .55; }
.ck-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; }
.ck-num.done { background: var(--success); color: #fff; }
.ck-num svg { width: 16px; height: 16px; }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pay-logos span { font-size: 11.5px; font-weight: 800; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.pay-logos .pl-upi { background: linear-gradient(135deg, #ff8a00, #0f9d58); color: #fff; border: 0; }
.demo-note { margin-top: 10px; background: #fff6dd; color: #7a5410; font-size: 12.5px; padding: 9px 12px; border-radius: 10px; font-weight: 600; }
:root[data-theme="dark"] .demo-note { background: #3a2a14; color: #ffd38a; }

/* ---------- Demo payment gateway ---------- */
.gw-sheet { padding-top: 0 !important; }
.gw-head { margin: 0 -16px 14px; padding: 18px 16px; background: linear-gradient(120deg, #0b1a3a, #1f3a8a); color: #fff; display: flex; align-items: center; gap: 12px; border-radius: 24px 24px 0 0; }
.gw-head b { display: block; }
.gw-head span { font-size: 12px; opacity: .75; }
.gw-logo { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.gw-amt { font-size: 22px; font-weight: 800; }
.gw-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.gw-m { text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.gw-m b { display: block; font-size: 14px; }
.gw-m span { font-size: 11px; color: var(--text-3); }
.gw-m.on { border-color: #1f3a8a; background: #eef3ff; }
:root[data-theme="dark"] .gw-m.on { background: #1b2440; }
.gw-body { margin-bottom: 14px; }
.upi-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-fail { margin-top: 8px; height: 40px; font-size: 13px; color: var(--text-3); }

/* ---------- Orders / receipt ---------- */
.order-card { display: block; }
.order-covers { display: flex; align-items: center; gap: 6px; }
.receipt .rc-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.receipt .rc-head b { display: block; font-size: 18px; }
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rc-meta span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.rc-meta b { font-size: 13px; }
.rc-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rc-item b { font-family: var(--font); color: var(--text); }

/* ---------- Login / account ---------- */
.login-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.login-hero h3 { margin: 0 0 2px; }
.login-hero p { font-size: 13px; }
.lh-art { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); display: grid; place-items: center; font-size: 26px; flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.stats div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 11.5px; opacity: .85; }
.info p, .steps-list { line-height: 1.75; font-size: 14.5px; }
.steps-list { padding-left: 20px; margin: 0; display: grid; gap: 10px; }

/* ---------- Tablet & desktop for eBook components ---------- */
@media (min-width: 768px) {
  .logo-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; margin-left: -2px; }
  .goals { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .goal { min-height: 104px; padding: 14px; }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .shelf .bcard { flex-basis: 178px; }
  .bcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
  .bcard:hover .bk { transform: translateY(-3px) rotate(-1deg); }
  .shelves { grid-template-columns: repeat(2, 1fr); }
  .sticky-chips { position: static; }
  .lib-grid { grid-template-columns: repeat(3, 1fr); padding: 14px 0; }
  .tabs-pill { padding: 14px 0 4px; }
  .note-strip { border-radius: var(--r); margin-top: 12px; }
  .cart-row { border-radius: var(--r); margin-top: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
  .crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); padding: 18px 0 0; }
  .crumbs a:hover { color: var(--brand); }
  .crumbs b { color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; font-family: var(--font); }
  .pd-topbar { display: none; }
  .pd-actions { display: flex; }
  .pd-bar { display: none !important; }
  .gw-head { border-radius: 24px 24px 0 0; margin: -24px -24px 14px; padding: 20px 24px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .pd { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 16px; }
  .pd-media { position: sticky; top: calc(var(--dhead-h) + 16px); }
  .pd-stage { border-radius: var(--r-lg); padding: 48px 24px 56px; box-shadow: var(--shadow); }
  .bk.lg { width: 250px; }
  .pd-info { padding: 0; }
  .pd-title { font-size: 32px; }
  .pd .facts { grid-template-columns: repeat(3, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .lib-grid { grid-template-columns: repeat(4, 1fr); }
  .continue.big { padding: 18px 22px; }
}
@media (min-width: 1024px) {
  .goals { grid-template-columns: repeat(4, 1fr); }
  .goal { min-height: 112px; }
  .lib-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1280px) {
  .grid:has(.bcard) { grid-template-columns: repeat(6, 1fr); }
  .lib-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid:has(.bcard) { grid-template-columns: repeat(4, 1fr); }
}
@media print {
  .dhead, .tabbar, .dfoot, .topbar, .actionbar, .section, .toast, .install-bar { display: none !important; }
  .app { padding: 0 !important; }
  .receipt { box-shadow: none !important; border: 1px solid #ddd; }
}

/* ---------- Login & account bits ---------- */
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.input.prefix { flex: 0 0 64px; display: grid; place-items: center; color: var(--text-2); }
.input.otp { letter-spacing: .5em; text-align: center; font-size: 20px; font-weight: 800; }
.pay-opt[disabled] { opacity: .5; cursor: not-allowed; }
.status.cancelled { background: #fde8e8; color: var(--danger); }
.oos { text-align: center; font-weight: 700; color: var(--danger); flex: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Checkout mini summary ---------- */
.mini-items { display: grid; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.mini-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.mini-item > span { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .thumb .ph-emoji { font-size: 20px; }
.similar { background: var(--surface); margin-top: 8px; padding-bottom: 16px; }

/* =====================================================================
   RESPONSIVE — phone first (default above), then tablet (≥768) and desktop (≥1024)
   ===================================================================== */
.dhead, .dfoot { display: none; }

@media (min-width: 768px) {
  :root { --dhead-h: 117px; }
  body { background: var(--bg-grad); background-attachment: fixed; }
  :root[data-theme="dark"] body { background: var(--bg); }
  .shell { max-width: none; box-shadow: none !important; }
  .tabbar { display: none !important; }

  /* Header */
  .dhead { display: block; position: sticky; top: 0; z-index: 35; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .dhead-in { max-width: 1240px; margin: 0 auto; height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 24px; }
  .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--brand); flex: none; }
  .logo img { border-radius: 10px; }
  .dloc { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 10px; border-radius: 12px; flex: none; color: var(--text); }
  .dloc:hover { background: var(--surface-2); }
  .dloc [data-icon] { color: var(--brand); }
  .dloc small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
  .dloc b { display: block; font-size: 13px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .dsearch { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); padding: 0 14px; color: var(--text-3); transition: border-color .15s, background .15s; }
  .dsearch:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
  .dsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; color: var(--text); }
  .dnav { display: flex; gap: 2px; flex: none; }
  .dnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--text-2); padding: 6px 10px; border-radius: 12px; position: relative; min-width: 56px; transition: color .15s, background .15s; }
  .dnav a:hover { background: var(--brand-soft); color: var(--brand); }
  .dnav a.on { color: var(--brand); font-weight: 700; }
  .dnav .badge { top: 0; left: auto; right: 6px; }
  .dcats { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 48px; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .dcats::-webkit-scrollbar { display: none; }
  .dcats a { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 7px 12px; border-radius: 10px; white-space: nowrap; transition: color .15s, background .15s; }
  .dcats a:hover, .dcats a.on { background: var(--brand-soft); color: var(--brand); }

  /* Page container */
  .app, .app.no-tabbar { max-width: 1240px; margin: 0 auto; padding: 0 24px 48px; min-height: calc(100vh - var(--dhead-h)); }
  .view.narrow { max-width: 760px; margin: 0 auto; }
  .home-head { display: none; }
  .topbar { position: static; background: transparent; border: 0; padding: 22px 0 10px; }
  .topbar h1 { font-size: 24px; font-weight: 700; }
  .topbar .icon-btn[href="/cart"], .topbar .icon-btn[href="/search"] { display: none; }
  .chips { position: static !important; background: transparent; border: 0; padding: 0 0 6px; flex-wrap: wrap; }
  .section { padding: 26px 0 4px; }
  .section-head h2 { font-size: 22px; }
  .hscroll { margin: 0; padding: 4px 2px 8px; }
  .banners { padding: 4px 0 8px; }
  .panel { border-radius: var(--r); margin-top: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }

  /* Home */
  .banners .banner { flex-basis: calc(50% - 6px); min-height: 200px; padding: 28px; }
  .banner h3 { font-size: 30px; }
  .cats { grid-template-columns: repeat(8, 1fr); }
  .offer-strip .offer { flex: 1 0 auto; }
  .price-chip { padding: 18px 6px; }
  .price-chip b { font-size: 20px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hscroll .card { flex-basis: 190px; }
  .card { transition: transform .2s, box-shadow .2s; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
  .card:hover .thumb img { transform: scale(1.04); }
  .thumb img { transition: transform .4s; }

  /* Lists */
  .cart-item { border-radius: var(--r); margin-top: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; }
  .cart-item .thumb { width: 110px; }
  .progress-free { border-radius: var(--r); margin-top: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
  .steps { border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 560px; margin: 0 auto 4px; }
  .pay-group { border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 12px; overflow: hidden; }

  /* Category page */
  .cat-layout { grid-template-columns: 220px 1fr; min-height: 0; padding-top: 4px; }
  .cat-side { border-radius: var(--r); border: 1px solid var(--line); align-self: start; position: sticky; top: calc(var(--dhead-h) + 16px); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
  .cat-side button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 16px; font-size: 14px; text-align: left; }
  .cat-side button span { font-size: 22px; }
  .cat-side button.on { background: var(--brand-soft); }
  .cat-main { padding: 0 0 0 20px; }
  .cat-main .grid { grid-template-columns: repeat(2, 1fr); }

  /* Account */
  .profile-head { border-radius: var(--r-lg); margin-top: 22px; }
  .quick, .menu { margin-left: 0; margin-right: 0; }
  .quick { margin-top: -40px; margin-left: 16px; margin-right: 16px; }

  /* Sheets become centred dialogs */
  .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); max-width: 520px; max-height: 84vh; border-radius: 24px; padding: 24px; animation: modalIn .22s cubic-bezier(.2, .8, .2, 1); }
  .sheet .grab { display: none; }
  @keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }

  .toast { bottom: 100px; }
  .install-bar { left: auto; right: 24px; transform: none; width: 400px; bottom: 24px; }

  /* Footer */
  .dfoot { display: block; background: var(--surface); border-top: 1px solid var(--line); margin-top: 24px; }
  .dfoot-in { max-width: 1240px; margin: 0 auto; padding: 40px 24px 28px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
  .dfoot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 12px; }
  .dfoot a:not(.logo) { display: block; font-size: 14px; color: var(--text-2); padding: 4px 0; }
  .dfoot a:not(.logo):hover { color: var(--brand); }
  .dfoot-brand p { font-size: 13.5px; color: var(--text-2); margin: 12px 0 14px; max-width: 360px; line-height: 1.6; }
  .pay-badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .pay-badges span { font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line); color: var(--text-2); }
  .dfoot-bottom { max-width: 1240px; margin: 0 auto; padding: 16px 24px 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); }
}

/* Tablet only: compact header (icons only, no location button) */
@media (min-width: 768px) and (max-width: 1023px) {
  .dloc, .dnav .hide-tab { display: none; }
  .dnav .lbl { display: none; }
  .dnav a { min-width: 44px; padding: 10px; }
  .dfoot-in { grid-template-columns: 1fr 1fr 1fr; }
  .dfoot-brand { grid-column: 1 / -1; }
}

/* Two-column product, cart & checkout pages from small laptops / landscape tablets */
@media (min-width: 900px) {
  .pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 24px; }
  .pdp-media { position: sticky; top: calc(var(--dhead-h) + 24px); }
  .pdp-gallery { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
  .pdp-gallery .over [data-back], .pdp-gallery .over a[href="/cart"] { display: none; }
  .pdp-gallery .over { justify-content: flex-end; }
  .pdp-info { display: flex; flex-direction: column; }
  .pdp-info > * { order: 4; }
  .pdp-info > .pdp-head { order: 1; margin-top: 0; }
  .pdp-info > .pdp-sizes { order: 2; }
  .pdp-info > .actionbar { order: 3; }
  .pdp-title { font-size: 24px; }
  .similar { background: transparent; margin-top: 16px; }

  .split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
  .split-side { position: sticky; top: calc(var(--dhead-h) + 16px); }
  .split-side > .panel:first-child { margin-top: 12px; }

  /* Action bars stop floating and sit inside the page */
  .actionbar { position: static; transform: none; width: auto; max-width: none; left: auto; bottom: auto; border: 0; border-radius: var(--r); margin-top: 12px; box-shadow: var(--shadow); padding: 14px; }
  .pdp-info > .actionbar .btn { height: 54px; font-size: 16px; }
  .success + .actionbar, .view.narrow > .actionbar { max-width: 520px; margin: 0 auto; }
  .app.no-tabbar { padding-bottom: 48px; }
  .toast { bottom: 28px; }
}

@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .banners .banner { flex-basis: calc(33.333% - 8px); }
  .cat-main .grid { grid-template-columns: repeat(3, 1fr); }
  .hscroll .card { flex-basis: 210px; }
}

@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
  .cat-main .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Payment sheet (brand-styled demo gateway) ---------- */
.gw-methods { grid-template-columns: 1fr 1fr; gap: 8px; }
.gw-m { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 92px; padding: 11px 12px; transition: border-color .15s, background .15s, transform .1s; }
.gw-m:active { transform: scale(.98); }
.gw-m b { font-size: 14px; }
.gw-m span { font-size: 11px; line-height: 1.35; }
.gw-m em { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; font-style: normal; padding-top: 6px; }
.gw-m em i { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; padding: 2px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.gw-m.on { border-color: #1f3a8a; background: #eef3ff; box-shadow: 0 0 0 2px #1f3a8a inset; }
.gw-m.on::after { content: '✓'; position: absolute; right: 9px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: #1f3a8a; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.pm-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 2px 0 10px; }
.pm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-app { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .1s; }
.pm-app b { font-size: 13px; line-height: 1.2; min-width: 0; }
.pm-app:active { transform: scale(.97); }
.pm-app.on { border-color: var(--bg); box-shadow: 0 0 0 2px var(--bg) inset; background: color-mix(in srgb, var(--bg) 8%, var(--surface)); }
.pm-mark { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--bg); color: var(--fg); display: grid; place-items: center; font-weight: 900; font-size: 13px; letter-spacing: -.02em; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.pm-mark.ring { border: 1.5px solid #dadce0; background: #fff; color: #1a73e8; font-size: 20px; font-family: 'Plus Jakarta Sans', sans-serif; }
.pm-tick { position: absolute; right: 8px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); color: var(--fg); font-style: normal; font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.pm-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--text-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pm-or::before, .pm-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pm-cardbox { background: linear-gradient(135deg, #1f2a5c, #3b2a7a); border-radius: 14px; padding: 14px; color: #fff; box-shadow: 0 10px 24px -10px rgba(31,42,92,.6); }
.pm-cardbox .input { background: rgba(255,255,255,.96); color: #14121f; border: 0; }
.pm-cardtop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pm-chip { width: 34px; height: 25px; border-radius: 6px; background: linear-gradient(135deg, #f5d37a, #c9962b); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.pm-net { position: relative; width: 44px; height: 26px; }
.pm-net i { position: absolute; top: 0; width: 26px; height: 26px; border-radius: 50%; }
.pm-net .mc-a { left: 0; background: #eb001b; opacity: .95; }
.pm-net .mc-b { right: 0; background: #f79e1b; opacity: .95; mix-blend-mode: screen; }
.pm-cardbox .input + .row2 .input { background: rgba(255,255,255,.96); }
.gw-pay { margin-top: 4px; height: 54px; font-size: 16px; }
.gw-fail { height: 40px; }

/* checkout pay chips in brand colours */
.pay-logos .b-upi { background: linear-gradient(135deg, #ff8a00, #0f9d58); color: #fff; border: 0; }
.pay-logos .b-gpay { background: #fff; color: #1a73e8; border-color: #dadce0; }
.pay-logos .b-phonepe { background: #5f259f; color: #fff; border: 0; }
.pay-logos .b-paytm { background: #00baf2; color: #fff; border: 0; }
.pay-logos .b-rupay { background: #fff; color: #0a6b4e; border-color: #cfe9e1; }
.pay-logos .b-visa { background: #fff; color: #1a1f71; border-color: #d6d9ea; font-style: italic; font-weight: 900; }
.pay-logos .b-mc { background: #fff; color: #eb001b; border-color: #f2c9cf; }
.pay-logos .b-nb { background: #0b1a3a; color: #fff; border: 0; }

/* ---------- Payment success: how to read & keep ---------- */
.read-guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-top: 14px; }
.read-guide h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.rg-list { display: grid; gap: 12px; }
.rg-item { display: flex; gap: 12px; align-items: flex-start; }
.rg-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.rg-ic [data-icon] { width: 18px; height: 18px; }
.rg-item b { display: block; font-size: 13.5px; color: var(--text); }
.rg-item p { margin-top: 2px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* ---------- Support (WhatsApp & Call), FAQs & Admin Settings ---------- */
.book-faq { margin-top: 14px; padding: 14px 14px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.book-faq h3 { font-size: 13.5px; font-weight: 700; color: var(--text); margin: 0 0 6px; font-family: var(--font); }
.faq-card { margin: 12px 16px 0; padding: 16px 16px 6px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fc-head { margin-bottom: 6px; }
.fc-head h3 { font-size: 15.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.fc-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.acc-list { display: flex; flex-direction: column; }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:first-child { border-top: 0; }
.acc-q { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 44px; font-family: var(--font); font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--text); user-select: none; -webkit-tap-highlight-color: transparent; }
.acc-q::-webkit-details-marker { display: none; }
.acc-q span:first-child { flex: 1; min-width: 0; }
.acc-ch { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; transition: transform .18s cubic-bezier(.16, 1, .3, 1), background .15s, color .15s; }
.acc-ch svg { width: 14px; height: 14px; stroke-width: 2.4; }
.acc-item[open] .acc-ch { transform: rotate(90deg); background: var(--brand-soft); color: var(--brand); }
.acc-a { padding: 0 0 12px; }
.acc-a p { font-family: var(--font); font-size: 13px; line-height: 1.6; color: var(--text-2); margin: 0; }

.support-card { margin: 12px 16px 0; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sup-head h3 { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.sup-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 5px; line-height: 1.45; }
.support-btns { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.sup-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; transition: transform .12s, filter .15s, background .15s, border-color .15s; }
.sup-btn:active { transform: scale(.97); }
.sup-btn svg { width: 17px; height: 17px; flex: none; stroke-width: 2.1; }
.sup-wa { background: #25D366; color: #052e16; box-shadow: 0 6px 16px -6px rgba(37, 211, 102, .55); }
.sup-wa:hover { filter: brightness(.96); }
.sup-wa-sec { background: rgba(37, 211, 102, .11); color: #065f46; border: 1.5px solid #25D366; }
.sup-wa-sec:hover { background: rgba(37, 211, 102, .18); }
.sup-call { background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); }
.sup-call:hover { background: var(--brand-soft); border-color: var(--brand-hover); color: var(--brand-hover); }

.wa-doubt { margin-top: 12px; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(37, 211, 102, .32); background: rgba(37, 211, 102, .08); color: #0f5132; font-size: 13px; font-weight: 700; transition: background .15s, border-color .15s, transform .12s; }
.wa-doubt:active { transform: scale(.985); }
.wa-doubt:hover { background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .5); }
.wa-doubt .wd-ic { width: 28px; height: 28px; border-radius: 8px; background: #25D366; color: #052e16; display: grid; place-items: center; flex: none; }
.wa-doubt .wd-ic svg { width: 16px; height: 16px; stroke-width: 2.1; }
.wa-doubt > span:nth-child(2) { flex: 1; min-width: 0; }
.wa-doubt .wd-go { flex: none; color: #15803d; display: grid; place-items: center; }
.wa-doubt .wd-go svg { width: 15px; height: 15px; stroke-width: 2.3; }

.wa-helper { margin: 14px 16px 4px; text-align: center; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.wa-helper a { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-weight: 700; vertical-align: bottom; }
.wa-helper a:hover { text-decoration: underline; }
.wa-helper a svg { width: 14px; height: 14px; stroke-width: 2.2; flex: none; }
.wa-helper.in-reader { margin-top: 16px; color: rgba(255, 255, 255, .75); }
.wa-helper.in-reader a { color: #4ade80; }
.rt-light .wa-helper.in-reader, .rt-sepia .wa-helper.in-reader { color: var(--text-2); }
.rt-light .wa-helper.in-reader a, .rt-sepia .wa-helper.in-reader a { color: #15803d; }

.admin-panel { margin-top: 10px; border-radius: var(--r); }
.admin-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 16px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.admin-preview span { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }
.admin-preview b { display: block; margin-top: 2px; font-size: 13px; color: var(--text); word-break: break-all; font-variant-numeric: tabular-nums; }
.admin-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-acts .btn { flex: 1 1 150px; height: 46px; }
.af-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.af-seg { margin-bottom: 12px; }
.af-list { display: flex; flex-direction: column; }
.af-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.af-row:first-child { border-top: 0; }
.af-body { flex: 1; min-width: 0; font-family: var(--font); }
.af-body b { display: block; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.af-body p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.af-acts { display: flex; gap: 4px; flex: none; }
.af-acts .icon-btn { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); }
.af-acts .icon-btn svg { width: 15px; height: 15px; }
.af-acts .af-del { color: var(--danger); }
.af-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

@media (min-width: 480px) {
  .support-btns { grid-template-columns: 1fr auto; }
}
@media (min-width: 768px) {
  .faq-card, .support-card { margin-left: 0; margin-right: 0; }
}
:root[data-theme="dark"] .sup-wa { background: #25D366; color: #052e16; }
:root[data-theme="dark"] .sup-wa-sec { background: rgba(37, 211, 102, .13); border-color: #25D366; color: #4ade80; }
:root[data-theme="dark"] .sup-call { background: rgba(99, 102, 241, .12); border-color: #818cf8; color: #a5b4fc; }
:root[data-theme="dark"] .wa-doubt { background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .3); color: #86efac; }
:root[data-theme="dark"] .wa-doubt .wd-go { color: #4ade80; }
:root[data-theme="dark"] .wa-helper a { color: #4ade80; }

/* banner carousel: swipe-friendly, tappable dots */
.banners { touch-action: pan-x; }
.dots i { cursor: pointer; }
.dots { padding: 4px 0; }

/* soft EdTech vertical pastel canvas across all main screens (dark theme keeps its own colour) */
body { background: var(--bg-grad); background-attachment: fixed; }
:root[data-theme="dark"] body { background: var(--bg); }
.shell { background: transparent; }

/* hide all vertical & horizontal scrollbars on mobile viewports while preserving smooth touch scrolling */
@media (max-width: 768px) {
  html, body, *, .no-scrollbar, .hscroll, .banners, .chips, .tabs-pill, .peek, .dcats {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar, .no-scrollbar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}
