/* BizAuto · Blue Glass theme v3 (loaded after app.css) */
:root {
  --ink: #0b1b3f;
  --ink-2: #33456b;
  --muted: #5b6b8c;
  --brand: #2563eb;
  --brand-d: #1d4ed8;
  --brand-ink: #fff;
  --brand-soft: rgba(37, 99, 235, .10);
  --line: rgba(37, 99, 235, .10);
  --surface: rgba(255, 255, 255, .55);
  --surface-2: rgba(255, 255, 255, .5);
  --glass: rgba(255, 255, 255, .55);
  --glass-solid: rgba(255, 255, 255, .92);
  --edge: rgba(255, 255, 255, .85);
  --ok: #15803d; --ok-soft: #dcfce7;
  --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #be123c; --bad-soft: #ffe4e6;
  --info: #1d4ed8; --info-soft: #dbeafe;
  --accent: #f59e0b;
  --radius: 20px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 30px rgba(30, 64, 175, .10);
  --spring: cubic-bezier(.34, 1.45, .5, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ---------- page background + floating orbs ---------- */
html { background: #e6efff; }
body {
  color: var(--ink);
  background: linear-gradient(160deg, #e6efff 0%, #f4f8ff 45%, #eaf2ff 100%) fixed;
  font-size: 15px;
}
.ba-orb { position: fixed; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: -1; animation: ba-float 26s ease-in-out infinite alternate; }
.ba-orb.o1 { width: 560px; height: 560px; top: -180px; left: -120px; background: radial-gradient(circle, rgba(59, 130, 246, .5), transparent 70%); }
.ba-orb.o2 { width: 520px; height: 520px; top: 28%; right: -140px; background: radial-gradient(circle, rgba(99, 102, 241, .36), transparent 70%); animation-duration: 32s; }
.ba-orb.o3 { width: 620px; height: 620px; bottom: -240px; left: 28%; background: radial-gradient(circle, rgba(14, 165, 233, .34), transparent 70%); animation-duration: 36s; }
@keyframes ba-float { 50% { transform: translate(50px, 30px) scale(1.06); } 100% { transform: translate(-30px, 60px) scale(.96); } }
/* no z-index on .shell: a stacking context there would put the mobile menu under its overlay */
.shell { position: relative; }
a { color: var(--brand-d); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); letter-spacing: -.015em; }
h3 { font-weight: 700; }

/* ---------- glass surfaces ---------- */
.card, .stat, .post-card, .preview, .poster, .plan-item, .gallery figure, .search-results, .auth-card {
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow);
}
.card { border-radius: 22px; padding: 22px; position: relative; }
.card-head h3 { font-size: 1.05rem; }
.post-card, .plan-item { border-radius: 18px; background: rgba(255, 255, 255, .6); }
.gallery figure { border-radius: 16px; }
.preview { border-radius: 18px; background: rgba(255, 255, 255, .85); }

.stat { border-radius: 20px; padding: 18px 20px; position: relative; overflow: hidden; color: var(--ink); transition: transform .35s var(--spring), color .35s; }
.stat .label { text-transform: none; letter-spacing: 0; font-size: .84rem; font-weight: 600; color: var(--muted); transition: color .35s; }
.stat .value { font-weight: 800; font-size: 1.9rem; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); transition: color .35s; }
a.stat:hover { text-decoration: none; }
/* KPI bubble: one blue glass bubble slides between stats */
.ba-kpis { position: relative; isolation: isolate; }
.ba-kpis > .stat { position: relative; z-index: 1; }
.ba-kpis > .stat.on { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.ba-kpis > .stat.on .label, .ba-kpis > .stat.on .sub, .ba-kpis > .stat.on .value { color: #fff !important; }
.ba-kpis > .stat.on .stars, .ba-kpis > .stat.on .stars .off { color: #fde68a; }
@media (hover: hover) { .ba-kpis > .stat:not(.on):hover { transform: translateY(-4px); } }

/* ---------- sidebar (floating navy-blue glass) ---------- */
.sidebar {
  width: 252px; margin: 16px 0 16px 16px; height: calc(100vh - 32px); top: 16px; border-radius: 22px; padding: 20px 14px;
  background: linear-gradient(165deg, rgba(25, 52, 190, .92) 0%, rgba(29, 78, 216, .86) 50%, rgba(56, 120, 246, .82) 100%);
  border: 1px solid rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 20px 40px rgba(18, 58, 148, .28);
  color: #fff;
}
.brand { font-size: 1.2rem; font-weight: 800; padding: 2px 6px 18px; gap: 12px; }
.brand .ba-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 46px;
  background: linear-gradient(160deg, #ffffff, #e0ecff); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(56, 189, 248, .45); transition: transform .5s var(--spring); }
.brand .ba-tile img { width: 36px; height: 36px; }
.brand:hover .ba-tile { transform: rotate(-8deg) scale(1.06); }
.brand .brand-logo { background: #fff; }
.brand small { display: block; font-size: .72rem; font-weight: 500; opacity: .75; }
.nav-group { color: rgba(255, 255, 255, .62); font-size: .68rem; letter-spacing: .08em; padding: 14px 12px 4px; }
.sidebar nav { position: relative; gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; margin-right: -6px; padding-right: 6px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 6px; }
.sidebar nav a {
  position: relative; z-index: 1; min-height: 44px; padding: 8px 12px; gap: 12px; border-radius: 14px; color: rgba(255, 255, 255, .88);
  font-weight: 500; font-size: .93rem; overflow: hidden; transition: color .35s, transform .15s; -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .sidebar nav a:not(.active):hover { background: rgba(255, 255, 255, .1); color: #fff; } }
.sidebar nav a:hover { text-decoration: none; }
.sidebar nav a:active { transform: scale(.96); }
.sidebar nav a.active { background: none; color: var(--brand-d); font-weight: 700; }
.sidebar nav a .ic { flex: 0 0 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); transition: transform .3s var(--spring); }
.sidebar nav a.active .ic { transform: scale(1.12); }
.sidebar nav a.active svg { color: inherit; }
.ba-bubble { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 14px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .86));
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(4, 20, 70, .28), 0 0 0 1px rgba(255, 255, 255, .6);
  transition: translate .6s var(--spring), height .3s, width .3s; }
.ba-bubble.still { transition: none; }
.ba-bubble.jelly { animation: ba-jelly .6s cubic-bezier(.3, .7, .4, 1); }
@keyframes ba-jelly { 0% { scale: 1 1; } 25% { scale: .93 1.22; } 55% { scale: 1.04 .93; } 80% { scale: .99 1.03; } 100% { scale: 1 1; } }
.ba-rip { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); pointer-events: none; z-index: -1; animation: ba-rip .6s ease-out forwards; }
@keyframes ba-rip { to { transform: scale(1); opacity: 0; } }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 10px; }
.sidebar-foot .who b { color: #fff; }
.sidebar-foot .logout { color: #fff; font-weight: 600; opacity: .85; }
.sidebar-foot .logout:hover { opacity: 1; }

/* ---------- topbar ---------- */
.topbar { background: transparent; border: 0; padding: 22px 28px 6px; box-shadow: none; position: static; }
.topbar h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; }
.loc-switch select { min-height: 44px; border-radius: 14px; font-weight: 600; background: rgba(255, 255, 255, .7); border: 1px solid var(--edge); box-shadow: 0 2px 8px rgba(30, 64, 175, .06); }
.menu-btn { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .7); border: 1px solid var(--edge); display: none; place-items: center; }
.content { max-width: 1240px; padding: 18px 28px 56px; }
.banner { margin: 12px 28px 0; border-radius: 14px; border: 1px solid rgba(245, 158, 11, .3); background: rgba(254, 243, 199, .85); color: #92400e; }
.banner.bad { background: rgba(255, 228, 230, .9); color: var(--bad); border-color: rgba(190, 18, 60, .2); }
.banner.admin { background: rgba(219, 234, 254, .9); color: var(--info); border-color: rgba(29, 78, 216, .2); }

/* ---------- controls ---------- */
input, select, textarea {
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(37, 99, 235, .16); border-radius: 14px; padding: 10px 13px;
  box-shadow: inset 0 1px 2px rgba(11, 27, 63, .05); transition: border-color .2s, box-shadow .25s var(--ease), background .2s;
}
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
label { color: var(--ink-2); }
fieldset { border-color: var(--line); border-radius: 16px; }

.btn {
  min-height: 42px; padding: 9px 18px; border-radius: 14px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(30, 64, 175, .08); position: relative; overflow: hidden; isolation: isolate;
  transition: transform .15s, background .2s, box-shadow .25s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(255, 255, 255, .9); border-color: #fff; }
.btn:active { transform: scale(.96); }
.btn.primary { border: none; color: #fff; background: linear-gradient(180deg, #3b74f0, var(--brand)); box-shadow: 0 8px 20px rgba(37, 99, 235, .32); }
.btn.primary:hover { background: linear-gradient(180deg, #4a80f4, var(--brand-d)); filter: none; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: ba-sweep 3.8s ease-in-out infinite; }
@keyframes ba-sweep { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.btn.ai { background: linear-gradient(180deg, #fff3c4, #fde68a); color: #7a4a00; border-color: rgba(255, 255, 255, .9); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: rgba(255, 228, 230, .9); }
.btn.small { min-height: 34px; padding: 5px 12px; border-radius: 11px; font-size: .82rem; }
.btn.big { min-height: 50px; padding: 12px 22px; border-radius: 16px; font-size: 1rem; }
.btn.loading { opacity: .8; }
.btn.loading::after { animation: spin .7s linear infinite; position: static; width: 12px; height: 12px; background: none; transform: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.ba-btnrip { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; background: radial-gradient(circle, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .2) 45%, transparent 70%); transform: scale(0); animation: ba-rip2 .65s var(--ease) forwards; }
.btn.primary .ba-btnrip { background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .15) 45%, transparent 70%); }
@keyframes ba-rip2 { to { transform: scale(2.6); opacity: 0; } }

/* ---------- alerts, pills ---------- */
.alert { border-radius: 16px; animation: ba-pop .45s var(--spring) both; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.alert.ok { background: rgba(220, 252, 231, .85); border-color: rgba(21, 128, 61, .2); color: var(--ok); }
.alert.error { background: rgba(255, 228, 230, .88); border-color: rgba(190, 18, 60, .2); color: var(--bad); }
.alert.warn { background: rgba(254, 243, 199, .9); border-color: rgba(180, 83, 9, .2); color: var(--warn); }
.alert.info { background: rgba(219, 234, 254, .88); border-color: rgba(29, 78, 216, .2); color: var(--info); }
@keyframes ba-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.pill { border-radius: 999px; background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .9); }
.pill-published, .pill-replied, .pill-uploaded, .pill-success, .pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-scheduled { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill-draft { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-failed, .pill-new, .pill-revoked { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag { border-radius: 8px; background: var(--brand-soft); color: var(--brand-d); }
.kpi-chip, .chip { background: rgba(255, 255, 255, .7); border: 1px solid var(--edge); }
.stars { color: var(--accent); }
.stars .off { color: #cbd5e1; }

/* ---------- tabs = liquid segmented control ---------- */
.tabs { position: relative; isolation: isolate; display: inline-flex; max-width: 100%; gap: 4px; padding: 5px; border: 1px solid var(--edge); border-radius: 16px;
  background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); margin-bottom: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; z-index: 1; border: 0; margin: 0; padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: color .3s; }
.tabs a.active { color: var(--brand-d); border: 0; background: none; }
.tabs a:hover { color: var(--ink); }
.tabs .count { background: rgba(37, 99, 235, .1); border: 0; }
.ba-lq { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(255, 255, 255, .86));
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(30, 64, 175, .18);
  transition: translate .55s var(--spring), width .55s var(--spring), height .55s var(--spring), opacity .2s; }
.ba-lq.blue { background: linear-gradient(150deg, #1d4ed8, #2563eb 55%, #3b82f6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 26px rgba(37, 99, 235, .3); border-radius: 20px; }
.ba-lq.stretch { transition: translate .17s ease-out, width .17s ease-out, height .17s ease-out; }
.ba-lq.still { transition: none; }
.ba-lq.jelly { animation: ba-lqj .7s cubic-bezier(.3, .7, .4, 1); }
@keyframes ba-lqj { 0% { scale: 1 1; } 22% { scale: 1.02 .88; } 48% { scale: .99 1.07; } 75% { scale: 1 .97; } 100% { scale: 1 1; } }

/* option grid (billing months etc.) uses a blue bubble */
.option-grid { position: relative; isolation: isolate; }
.option-grid label { position: relative; z-index: 1; border-radius: 16px; border: 1px solid var(--edge); background: rgba(255, 255, 255, .55); transition: color .3s, transform .15s; }
.option-grid label:active { transform: scale(.96); }
.option-grid.ba-has-lq label:has(input:checked) { background: transparent; border-color: transparent; box-shadow: none; color: #fff; }
.option-grid.ba-has-lq label:has(input:checked) small { color: rgba(255, 255, 255, .85); }
.option-grid .ba-lq { border-radius: 16px; }

/* ---------- lists, tables ---------- */
table { border-collapse: separate; border-spacing: 0; }
th { background: rgba(255, 255, 255, .55); border-bottom: 1px solid var(--edge); color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .8rem; }
th:first-child { border-radius: 12px 0 0 12px; } th:last-child { border-radius: 0 12px 12px 0; }
td { border-bottom-color: rgba(37, 99, 235, .08); }
tbody tr, table tr { transition: background .2s; }
table tr:hover td { background: rgba(255, 255, 255, .4); }
.list-item, .review, .check, .steps-list li { border-bottom-color: rgba(37, 99, 235, .08); }
.activity li { border-bottom-color: rgba(37, 99, 235, .1); }
.activity .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.kw-list li { border-bottom-color: rgba(37, 99, 235, .08); }
.avatar { background: linear-gradient(135deg, #bfdbfe, #c7d2fe); color: var(--brand-d); }
.owner-reply { background: rgba(255, 255, 255, .6); border-left-color: var(--brand); border-radius: 0 14px 14px 0; }
.steps-list li::before { background: rgba(255, 255, 255, .7); border-color: var(--edge); }
.steps-list li.done::before { background: var(--ok-soft); color: var(--ok); }
.dropzone { border-radius: 20px; border: 2px dashed rgba(37, 99, 235, .3); background: rgba(255, 255, 255, .45); transition: transform .4s var(--spring), background .3s, border-color .3s; }
.dropzone.drag { transform: scale(1.02); background: rgba(219, 234, 254, .7); border-color: var(--brand); }
.code-box { border-radius: 16px; background: rgba(11, 27, 63, .9); color: #bfdbfe; }
.score-ring { box-shadow: 0 10px 30px -12px rgba(37, 99, 235, .45); background: conic-gradient(var(--c, var(--brand)) calc(var(--p) * 1%), rgba(37, 99, 235, .1) 0); }
.score-ring > div { background: rgba(255, 255, 255, .92); }
.empty h3 { font-family: var(--display); }
.post-card img, .gallery img { transition: transform .6s var(--ease); }
.post-card:hover img, .gallery figure:hover img { transform: scale(1.04); }
.price-big { letter-spacing: -.03em; color: var(--ink); }
.toast { background: rgba(11, 27, 63, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 14px; box-shadow: 0 12px 30px rgba(11, 27, 63, .3); }
.toast.error { background: rgba(190, 18, 60, .92); }

/* ---------- 3D flip-in ---------- */
.ba-pre { opacity: 0; }
.ba-flipping { will-change: transform, opacity; }
.ba-flipping, .ba-flipping .card, .ba-flipping .stat { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.ba-flipping.card, .ba-flipping > .stat:not(.on), .ba-flipping.stat:not(.on) { background: var(--glass-solid) !important; }

/* ---------- rank map pins ---------- */
#rankmap { border-radius: 18px; border: 1px solid var(--edge); box-shadow: inset 0 1px 0 #fff; }
.leaflet-container { font-family: var(--font); }
.ba-pin { position: relative; width: 38px; height: 50px; }
.ba-pin svg { display: block; width: 38px; height: 50px; overflow: visible; filter: drop-shadow(0 4px 5px rgba(16, 40, 100, .3)); animation: ba-drop .6s var(--spring) both; animation-delay: var(--d, 0s); }
.ba-pin .ring { position: absolute; left: 50%; bottom: -3px; width: 18px; height: 7px; margin-left: -9px; border-radius: 50%; background: var(--c); opacity: 0; animation: ba-ring 2.4s ease-out infinite; animation-delay: calc(var(--d, 0s) + .6s); }
.ba-pin.me svg { width: 44px; height: 58px; }
@keyframes ba-drop { 0% { transform: translateY(-34px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes ba-ring { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(2.4); opacity: 0; } }
.legend span::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }

/* ---------- auth pages ---------- */
.auth-body { background: transparent; position: relative; z-index: 1; }
.auth-card { border-radius: 28px; padding: 34px; background: rgba(255, 255, 255, .62); position: relative; z-index: 1; }
.auth-card h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; }
.brand-lg { font-size: 1.35rem; }
.brand-lg .lq-logo { width: 60px; height: 60px; filter: drop-shadow(0 8px 16px rgba(37, 99, 235, .35)); animation: ba-bob 5s ease-in-out infinite; }
@keyframes ba-bob { 50% { transform: translateY(-5px) rotate(-2deg); } }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .sidebar { margin: 0; height: 100vh; top: 0; border-radius: 0 22px 22px 0; width: 272px; transition: transform .3s var(--ease);
    background: linear-gradient(165deg, #1934be 0%, #1d4ed8 50%, #3878f6 100%); }
  body.nav-open .nav-overlay { background: rgba(6, 18, 40, .45); }
  body.nav-open { overflow: hidden; }
  .menu-btn { display: grid; }
  .topbar { padding: 14px 16px 4px; }
  .topbar h1 { font-size: 1.3rem; }
  .content { padding: 12px 16px 40px; }
  .banner { margin: 10px 16px 0; }
  .card { border-radius: 20px; padding: 18px; }
  .tabs { display: flex; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ba-pre { opacity: 1; }
}
body.ba-lite .card, body.ba-lite .stat, body.ba-lite .btn, body.ba-lite .sidebar { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.ba-lite .card, body.ba-lite .stat { background: rgba(255, 255, 255, .9); }
body.ba-lite .ba-orb { display: none; }
@media print {
  body { background: #fff; } .ba-orb { display: none; }
  .card, .stat { backdrop-filter: none; box-shadow: none; background: #fff; }
}
a, button, .btn, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- "Powered by LunarDMS" attribution ---------- */
.powered { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 500; text-decoration: none !important; opacity: .82; transition: opacity .2s; }
.powered:hover { opacity: 1; }
.powered img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 8px rgba(167, 139, 250, .5); }
.powered b { font-weight: 700; }
.powered.side { display: flex; margin-top: 12px; color: rgba(255, 255, 255, .85); }
.powered.auth { display: flex; justify-content: center; margin: 22px auto 0; padding-top: 16px; border-top: 1px solid rgba(37, 99, 235, .1); color: var(--muted); }
.auth-card .powered.auth { width: 100%; }

/* ---------- PDF export ---------- */
.ba-pdf-veil { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(230, 239, 255, .92); }
.ba-pdf-veil div { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 18px; background: #fff; font-weight: 700; box-shadow: 0 12px 30px rgba(30, 64, 175, .18); }
.ba-pdf-ready { display: grid !important; gap: 12px; justify-items: center; text-align: center; padding: 22px 24px !important; max-width: 300px; }
.ba-pdf-ready b { font-size: 1.05rem; }
.ba-pdf-ready small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.ba-pdf-ready .btn.primary { width: 100%; justify-content: center; }
.ba-pdf-veil > div:has(.ba-pdf-ready) { padding: 0; background: transparent; box-shadow: none; }
.ba-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #bfdbfe; border-top-color: var(--brand); animation: spin .7s linear infinite; }
body.ba-pdf .content > .card, body.ba-pdf .content > .grid { opacity: 1 !important; transform: none !important; }

/* ---------- phones: same look, lighter effects (smooth scrolling) ---------- */
@media (max-width: 820px), (hover: none) {
  .ba-orb { animation: none; filter: blur(40px); opacity: .8; }
  .card, .stat, .post-card, .preview, .plan-item, .gallery figure, .search-results, .auth-card, .btn, .tabs, .alert {
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .card, .stat, .auth-card { background: rgba(255, 255, 255, .86); }
  .post-card, .plan-item { background: rgba(255, 255, 255, .9); }
  .btn { background: rgba(255, 255, 255, .92); }
  .btn.primary::after { animation: none; }
  .sidebar { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.ba-pdf-box { width: 712px !important; max-width: none !important; padding: 0 !important; margin: 0 !important; background: #f4f8ff; }
.ba-pdf-box > .content { padding: 0 !important; max-width: none !important; width: 712px !important; }
.ba-pdf-box .card:not(.me), .ba-pdf-box .stat:not(.on) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; opacity: 1 !important; transform: none !important; animation: none !important; box-shadow: 0 1px 0 #e5ecf8 !important; }
.ba-pdf-box .stat.on, .ba-pdf-box .card.me { background: linear-gradient(150deg, #1d4ed8, #2563eb 55%, #3b82f6) !important; color: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; opacity: 1 !important; transform: none !important; }
.ba-pdf-box .stat.on * { color: #fff !important; }
.ba-pdf-box #rankmap { display: none; }


/* ---------- phones: app-style locked header + bottom tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px;
    padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; margin: 0;
    background: rgba(238, 244, 255, .88); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
  .topbar.scrolled { border-bottom-color: rgba(37, 99, 235, .1); box-shadow: 0 6px 20px rgba(30, 64, 175, .08); }
  .topbar .menu-btn { display: none; }
  .topbar h1 { font-size: 1.22rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .loc-switch { width: auto; flex: 0 1 48%; min-width: 0; margin: 0; }
  .topbar .loc-switch select { width: 100%; min-height: 38px; padding: 6px 30px 6px 12px; font-size: .84rem; border-radius: 12px; text-overflow: ellipsis; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* docked to the bottom edge like a native app: nothing shows below or beside it */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 25;
    left: 0; right: 0; bottom: 0; padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
    border-radius: 22px 22px 0 0; background: #fff; border-top: 1px solid rgba(37, 99, 235, .1);
    box-shadow: 0 -8px 24px rgba(30, 64, 175, .1); }
  .grid.g2, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .grid > *, .card { min-width: 0; }
  .list-item .body > .row { flex-wrap: wrap; row-gap: 2px; }
  .list-item .body > .row > .muted.small[style*="margin-left"] { margin-left: 0 !important; flex-basis: 100%; }
  .tabbar a, .tabbar button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; padding: 4px 2px; border: 0; background: none; border-radius: 18px; font: 600 .68rem/1.1 var(--font, inherit);
    color: #64748b; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; transition: color .3s, transform .15s; }
  .tabbar a:active, .tabbar button:active { transform: scale(.92); }
  .tabbar .ic { width: 25px; height: 25px; transition: transform .35s var(--spring, ease); }
  .tabbar .active { color: var(--brand); }
  .tabbar .active .ic { transform: translateY(-1px) scale(1.08); }
  .tabbar .ba-lq { border-radius: 18px; background: linear-gradient(160deg, #e0ecff, #cfe0ff); box-shadow: 0 4px 12px rgba(37, 99, 235, .18), 0 1px 0 #fff inset; }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 86px); }
  body.nav-open .tabbar { visibility: hidden; }
  .ba-pdf-veil { z-index: 100; }
}
@media print { .tabbar { display: none !important; } }

/* maps (Leaflet) must never sit above the menu, header or tab bar */
.leaflet-container { position: relative; z-index: 0; isolation: isolate; }
