/* ============================================================================
   MetaScan unified chrome — shared stylesheet (header + footer, both auth states).
   SINGLE SOURCE for the chrome look, ported 1:1 from the LIVE marketing site
   (Metascan3Di/src/components/beta/BetaLayout.jsx style jsx) + the sticky-band CSS
   from share_viewer.html. Consumed by web/panel (linked) and inlined into the
   SEO-critical /s product page. See chrome/chrome.manifest.json + docs/wave2/50.

   The mega-menu is CSS-FIRST: panels reveal on :hover / :focus-within with NO
   JavaScript. chrome-enhance.js only adds aria-expanded sync, Esc, click-toggle
   and arrow-key focus — it creates no markup and no links.
   ============================================================================ */

/* Animated brand gradients — copied from BetaLayout global styles. */
.beta-accent {
  background: linear-gradient(100deg,#ff2fb9,#a24bff 25%,#00eaff 50%,#a24bff 75%,#ff2fb9);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: beta-flow 3s linear infinite;
}
.beta-cta {
  color: #05060a;
  background: linear-gradient(100deg,#ff2fb9,#7a5cff 28%,#00eaff 50%,#7a5cff 72%,#ff2fb9);
  background-size: 220% auto; animation: beta-flow 4s linear infinite;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.beta-cta:hover {
  transform: translateY(-1px); filter: brightness(1.08);
  box-shadow: 0 8px 30px rgba(0,234,255,0.22), 0 2px 12px rgba(255,47,185,0.24);
}
@keyframes beta-flow { to { background-position: -220% center; } }
@media (prefers-reduced-motion: reduce) { .beta-accent, .beta-cta { animation: none; } }

/* Chrome links never underline (the panel has no global reset like the share page). */
.chrome-market a, .chrome-app a { text-decoration: none; }

/* ---- Auth-aware visibility: both chromes ship in the DOM; a class flips which shows.
   No markup is added/removed by JS (zero CLS, fully crawlable). ---- */
.chrome-app { display: none !important; }
body.is-authed .chrome-market { display: none !important; }
body.is-authed .chrome-app { display: block !important; }
body.is-authed .chrome-app.app-topbar { display: block !important; }
/* Panel app topbar (its own rich header) carries .chrome-app too. */
body.is-authed header.topbar.chrome-app { display: block !important; }

/* ---- Marketing NAVBAR — transparent over the hero at the top, then a sticky glass band
   once you scroll (chrome-enhance.js toggles .is-scrolled past ~12px), matching the live
   marketing site. ---- */
header.chrome-market {
  position: sticky; top: 0; z-index: 50; width: 100%;
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .28s ease, backdrop-filter .28s ease, border-color .28s ease, box-shadow .28s ease;
}
header.chrome-market.is-scrolled {
  background: rgba(8,8,11,0.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 34px rgba(0,0,0,0.38);
}
.mk-nav {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1280px; margin: 0 auto; height: 64px;
  padding: 0 clamp(20px, 4vw, 32px); gap: 16px;
}
.mk-brand { display: flex; align-items: center; gap: 10px; }
.mk-brand img { width: 28px; height: 28px; object-fit: contain; }
.mk-brand .word { font-weight: 600; letter-spacing: -0.01em; font-size: 17px; color: #fff; }
.mk-links { display: flex; align-items: center; gap: 2px; }
.mk-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13.5px; font-weight: 400; color: rgba(255,255,255,0.65);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.mk-link .caret { display: inline-flex; align-items: center; margin-left: 5px; opacity: .55; transition: transform .2s, opacity .2s; }
.mk-link .caret svg { width: 16px; height: 16px; display: block; }
.mk-link:hover { color: #fff; }
/* The disclosure trigger is a real <button> styled to match the link pills. */
.mk-trigger { background: none; border: none; cursor: pointer; font: inherit; line-height: 1; }
.mk-trigger:focus-visible { outline: 2px solid #00eaff; outline-offset: 2px; }

/* ---- CSS-first mega-menu panels (WAI-ARIA disclosure pattern) ---- */
.mk-group { position: relative; }
.mk-group:hover > .mk-trigger, .mk-group:focus-within > .mk-trigger,
.mk-group.is-open > .mk-trigger { color: #fff; }
.mk-group:hover > .mk-trigger .caret, .mk-group:focus-within > .mk-trigger .caret,
.mk-group.is-open > .mk-trigger .caret { transform: rotate(180deg); opacity: .9; }
.mk-panel {
  position: absolute; top: 100%; left: 0; padding-top: 12px;
  opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease; z-index: 60;
}
.mk-group[data-align="right"] .mk-panel { left: auto; right: 0; }
.mk-group:hover .mk-panel, .mk-group:focus-within .mk-panel, .mk-group.is-open .mk-panel {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) { .mk-panel { transition: none; } }
.mk-panel-inner {
  display: flex; gap: 10px; padding: 10px;
  background: rgba(14,14,21,0.97); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.mk-panel-items { width: 320px; display: flex; flex-direction: column; gap: 2px; }
.mk-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.mk-item:hover { background: rgba(255,255,255,0.05); }
.mk-item-ico {
  flex: 0 0 auto; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.8);
}
.mk-item-ico svg { width: 17px; height: 17px; }
.mk-item-txt { min-width: 0; }
.mk-item-label { display: block; font-size: 13.5px; font-weight: 500; color: #fff; }
.mk-item-desc { display: block; font-size: 12px; line-height: 1.35; color: rgba(255,255,255,0.6); }
.mk-feature {
  position: relative; width: 200px; flex: 0 0 auto; min-height: 190px;
  border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1);
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 16px;
}
.mk-feature-txt { position: relative; display: flex; flex-direction: column; }
.mk-feature-eyebrow { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: #8ff3ff; }
.mk-feature-title { margin-top: 4px; font-size: 15px; font-weight: 600; color: #fff; }
.mk-feature-desc { margin-top: 4px; font-size: 12px; line-height: 1.35; color: rgba(255,255,255,0.65); }

.mk-right { display: flex; align-items: center; gap: 16px; }
.mk-signin { font-size: 13.5px; font-weight: 400; color: rgba(255,255,255,0.7); white-space: nowrap; }
.mk-signin:hover { color: #fff; }
.mk-signup { font-size: 13.5px; font-weight: 500; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }

/* Auth-aware header CTA (mirror of BetaLayout.jsx :620-622). The single .beta-cta ships both
   labels; body.is-authed (the panel's auth class) decides which shows — "Login" for guests,
   "Dashboard" once signed in — with no markup swap (zero CLS). */
.auth-in-text { display: none; }
body.is-authed .auth-out-text { display: none; }
body.is-authed .auth-in-text { display: inline; }

/* ---- Marketing LangSwitch (mirror of LangSwitch.jsx "menu" variant) ---- */
.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; color: rgba(255,255,255,0.75); transition: border-color .2s, color .2s;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch[open] > summary, .lang-switch > summary:hover { border-color: rgba(255,255,255,0.25); color: #fff; }
.lang-switch .globe { display: inline-flex; align-items: center; }
.lang-switch .globe svg { width: 16px; height: 16px; display: block; }
.lang-switch .short { font-weight: 600; letter-spacing: .02em; }
.lang-switch .caret { display: inline-flex; align-items: center; transition: transform .2s; color: rgba(255,255,255,0.5); }
.lang-switch .caret svg { width: 14px; height: 14px; display: block; }
.lang-switch[open] .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 192px; overflow: hidden;
  background: rgba(14,14,21,0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  padding: 6px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px; font-size: 14px; color: rgba(255,255,255,0.65);
  transition: background .15s, color .15s;
}
/* The panel's options are <button> (they call window.__setLang) — reset button chrome so they
   match the server's <a> options 1:1. */
button.lang-opt { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.lang-opt:hover { background: rgba(255,255,255,0.05); color: #fff; }
.lang-opt.active { background: rgba(255,255,255,0.08); color: #fff; }
.lang-opt .lo-left { display: flex; align-items: center; gap: 10px; }
.lang-opt .lo-short { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.4); }
.lang-opt .lo-check { display: inline-flex; align-items: center; color: #00eaff; }
.lang-opt .lo-check svg { width: 16px; height: 16px; display: block; }

/* ---- Marketing FOOTER (mirror of BetaFooter) ---- */
.mk-footer { margin-top: 128px; border-top: 1px solid rgba(255,255,255,0.06); }
.mk-foot-inner { max-width: 1280px; margin: 0 auto; padding: 64px clamp(20px, 4vw, 32px); }
.mk-foot-grid { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 48px 32px; }
.mk-foot-brand { min-width: 0; }
.mk-foot-brand .word { font-weight: 600; letter-spacing: -0.01em; font-size: 18px; color: #fff; }
.mk-foot-lock { display: inline-flex; align-items: center; gap: 10px; }
.mk-foot-lock img { width: 28px; height: 28px; object-fit: contain; }
.mk-foot-tag { color: rgba(255,255,255,0.6); line-height: 1.6; max-width: 320px; margin: 16px 0 0; font-size: 14px; }
.mk-foot-contact { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mk-foot-contact .phone { font-weight: 500; color: rgba(255,255,255,0.85); }
.mk-foot-contact .phone:hover { color: #fff; }
.mk-foot-contact .email { color: rgba(255,255,255,0.55); }
.mk-foot-contact .email:hover { color: #fff; }
.mk-foot-badges { margin-top: 24px; }
.mk-foot-ig {
  margin-top: 24px; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 8px 16px;
  font-size: 14px; color: rgba(255,255,255,0.7); transition: color .2s, border-color .2s;
}
.mk-foot-ig:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.mk-foot-ig svg { width: 18px; height: 18px; }
.mk-foot-ig .handle { font-weight: 500; }
.mk-foot-langwrap { margin-top: 24px; }
.mk-foot-col { min-width: 0; }
.mk-foot-col h3 { font-weight: 600; color: rgba(255,255,255,0.55); margin: 0 0 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.mk-foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mk-foot-col a { color: rgba(255,255,255,0.55); font-size: 14px; transition: color .2s; }
.mk-foot-col a:hover { color: #fff; }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease;
}
.store-badge:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(255,47,185,0.45), 0 10px 40px rgba(0,234,255,0.14);
}
.store-badge .sb-glyph { flex: 0 0 auto; color: #fff; }
.store-badge .sb-txt { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge .sb-sub { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,0.55); }
.store-badge .sb-name { margin-top: -1px; font-size: 15px; font-weight: 600; color: #fff; }
.mk-foot-bottom {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.mk-foot-bottom p { margin: 0; font-size: 12px; color: rgba(255,255,255,0.55); }
.mk-foot-legal { display: flex; gap: 24px; }
.mk-foot-legal a { font-size: 12px; color: rgba(255,255,255,0.55); transition: color .2s; }
.mk-foot-legal a:hover { color: rgba(255,255,255,0.7); }

/* ---- App chrome (share-page app header + slim footer, both auth states).
   The header mirrors the panel's rich topbar (web/panel styles.css .topbar/.tabs/.tab):
   plain wordmark (no pill), a segmented rounded PILL nav group with a gradient
   active-tab pill, and an account avatar button on the right. ---- */
.app-topbar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(16,17,28,0.86), rgba(12,13,22,0.78));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.app-topbar-inner {
  display: flex; align-items: center; gap: 18px;
  max-width: 1600px; margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 40px);
}
/* Wordmark — bare gradient text, NO pill/circle around it. */
.app-brand { display: inline-flex; align-items: baseline; gap: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: #fff; flex: 0 0 auto; }
.app-brand .brand-word { color: #fff; }
.app-brand .brand-accent {
  background: linear-gradient(90deg,#d14af2,#8c59fa,#00e6d9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Segmented pill nav group (capsule holding the tabs). */
.app-tabs { display: flex; gap: 2px; background: #070910; padding: 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.07); }
.app-tab {
  position: relative; font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: rgba(255,255,255,0.62); padding: 8px 14px; border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.app-tab:hover { color: #fff; }
.app-tab[hidden] { display: none; }
.app-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(209,74,242,0.26), rgba(140,89,250,0.24) 55%, rgba(0,230,217,0.18));
  box-shadow: inset 0 0 0 1px rgba(140,89,250,0.5), 0 6px 18px rgba(140,89,250,0.24);
}
.app-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-account {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.07); background: #070910; transition: border-color .15s;
}
.app-account:hover { border-color: rgba(255,255,255,0.22); }
.app-avatar {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #0a0d14; background: linear-gradient(135deg,#d14af2,#8c59fa 55%,#00e6d9);
  background-size: cover; background-position: center; overflow: hidden;
}
/* Real profile photo: the JS drops it in as a cover background and hides the initials. */
.app-avatar.has-photo { color: transparent; }
.app-account .app-acct-label { font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,0.62); padding-right: 2px; }

/* ---- Logged-in PRODUCT-PAGE topbar (share_viewer /s): logo lockup + admin status pills + activity
   bell + account dropdown — a mirror of the web/panel topbar. EVERY rule below is scoped under
   `.app-topbar` so it CANNOT touch the panel's own `header.topbar.chrome-app` (which is styled by
   web/panel/styles.css and also loads this file). Pills/bell/admin-tabs are injected by
   share_viewer.html's enhancer for staff only — they are never in a regular buyer's DOM. ---- */
.app-brand { gap: 9px; }
.app-brand-mark { width: 28px; height: 28px; object-fit: contain; align-self: center; flex: 0 0 auto; }
.app-topbar-inner { gap: 14px; }
/* Status pills */
.app-topbar .status-pills { display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; overflow: hidden; }
.app-topbar .lib-status { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); color: rgba(255,255,255,0.62); font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: .2px; }
.app-topbar .lib-status .lib-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; flex: 0 0 auto; }
.app-topbar .lib-status.online { color: #d6f5e2; border-color: rgba(34,197,94,0.42); }
.app-topbar .lib-status.online .lib-dot { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.75); }
.app-topbar .lib-status.offline { color: rgba(255,255,255,0.4); }
.app-topbar .lib-status.warn { color: #ffe6bf; border-color: rgba(255,176,32,0.42); }
.app-topbar .lib-status.warn .lib-dot { background: #ffb020; box-shadow: 0 0 6px rgba(255,176,32,0.7); }
.app-topbar .lib-status[hidden] { display: none; }
/* Activity bell */
.app-topbar .notif { position: relative; flex: 0 0 auto; }
.app-topbar .notif[hidden] { display: none; }
.app-topbar .notif-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: rgba(255,255,255,0.62); background: none; border: none; transition: color .15s ease, background .15s ease; }
.app-topbar .notif-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.app-topbar .notif-btn.has-unread { color: #fff; }
.app-topbar .notif-ico { width: 21px; height: 21px; }
.app-topbar .notif-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #FF5A6E; color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; line-height: 1; pointer-events: none; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #0a0d14, 0 4px 10px rgba(255,90,110,0.5); }
.app-topbar .notif-badge[hidden] { display: none; }
/* Account: image-only avatar button + dropdown */
.app-topbar .account { position: relative; flex: 0 0 auto; }
.app-topbar .account-btn { background: none; border: none; padding: 2px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform .12s ease; }
.app-topbar .account-btn:hover { transform: translateY(-1px); }
.app-topbar .account-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -0.02em; background: linear-gradient(135deg,#d14af2,#8c59fa 55%,#00e6d9); background-size: cover; background-position: center; box-shadow: 0 6px 18px rgba(140,89,250,0.35); border: 1.5px solid rgba(255,255,255,0.18); overflow: hidden; }
.app-topbar .account-avatar.has-photo { color: transparent; }
.app-topbar .account-avatar.lg { width: 46px; height: 46px; font-size: 18px; box-shadow: none; }
.app-topbar .account-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 240px; padding: 8px; border-radius: 16px; background: rgba(18,18,26,0.97); border: 1px solid rgba(255,255,255,0.10); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 24px 60px rgba(0,0,0,0.55); z-index: 70; transform-origin: top right; animation: app-acct-in .16s ease; }
@keyframes app-acct-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.app-topbar .account-menu[hidden] { display: none; }
.app-topbar .account-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 6px; }
.app-topbar .account-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-topbar .account-name { font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar .account-email { font-size: 12px; color: rgba(255,255,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar .account-item { display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer; color: #fff; font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; transition: background .15s; }
.app-topbar .account-item:hover { background: rgba(255,255,255,0.06); }
.app-topbar .account-item.danger { color: #ff6b6b; }
.app-topbar .account-item.danger:hover { background: rgba(255,107,107,0.12); }
/* Activity notifications dropdown (product-page bell) — OPAQUE panel (not the panel's translucent
   .glass, which bled the page through), list of activity items with tinted icon/thumb + unread dot. */
.app-topbar .notif-menu { position: absolute; top: calc(100% + 10px); right: 0; width: min(384px, calc(100vw - 24px)); padding: 8px; border-radius: 18px; background: rgba(16,16,24,0.985); border: 1px solid rgba(255,255,255,0.10); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: 0 28px 70px rgba(0,0,0,0.62); z-index: 70; transform-origin: top right; animation: app-acct-in .16s ease; }
.app-topbar .notif-menu[hidden] { display: none; }
.app-topbar .notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 11px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 6px; }
.app-topbar .notif-title { font-weight: 800; font-size: 14.5px; letter-spacing: -0.01em; color: #fff; }
.app-topbar .notif-readall { background: none; border: none; cursor: pointer; color: #a06bff; font-size: 12.5px; font-weight: 700; padding: 5px 8px; border-radius: 8px; transition: background .15s, color .15s; }
.app-topbar .notif-readall:hover { background: rgba(140,89,250,0.16); color: #c3a6ff; }
.app-topbar .notif-list { max-height: min(66vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.app-topbar .notif-item { position: relative; width: 100%; text-align: left; background: none; border: none; cursor: pointer; color: #fff; display: flex; align-items: flex-start; gap: 13px; padding: 13px 32px 13px 12px; border-radius: 14px; transition: background .14s ease; }
.app-topbar .notif-item:hover { background: rgba(255,255,255,0.055); }
.app-topbar .notif-item + .notif-item { margin-top: 2px; }
.app-topbar .notif-ico-wrap { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.62); }
.app-topbar .notif-ico-wrap svg { width: 21px; height: 21px; }
.app-topbar .notif-ico-wrap.tint-a { background: rgba(209,74,242,0.16); color: #e79bf7; }
.app-topbar .notif-ico-wrap.tint-b { background: rgba(140,89,250,0.18); color: #b79bff; }
.app-topbar .notif-ico-wrap.tint-c { background: rgba(255,176,32,0.16); color: #ffce7a; }
.app-topbar .notif-ico-wrap.tint-d { background: rgba(0,230,217,0.15); color: #6df3ea; }
.app-topbar .notif-ico-wrap.tint-e { background: rgba(51,230,128,0.16); color: #8ff0bb; }
.app-topbar .notif-thumb { flex: 0 0 auto; position: relative; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.05); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.app-topbar .notif-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-topbar .notif-thumb-fallback { display: none; width: 20px; height: 20px; color: rgba(255,255,255,0.62); }
.app-topbar .notif-thumb.is-broken img { display: none; }
.app-topbar .notif-thumb.is-broken .notif-thumb-fallback { display: block; }
.app-topbar .notif-item-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; padding-top: 1px; }
.app-topbar .notif-item-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: #fff; }
.app-topbar .notif-body { font-size: 12.5px; color: rgba(255,255,255,0.62); line-height: 1.45; }
.app-topbar .notif-when { font-size: 11.5px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.app-topbar .notif-dot { position: absolute; top: 18px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #ff2fb9; box-shadow: 0 0 6px rgba(209,74,242,0.7); opacity: 0; }
.app-topbar .notif-item.is-unread { background: rgba(140,89,250,0.07); }
.app-topbar .notif-item.is-unread:hover { background: rgba(140,89,250,0.12); }
.app-topbar .notif-item.is-unread .notif-item-title { font-weight: 800; }
.app-topbar .notif-item.is-unread .notif-dot { opacity: 1; }
.app-topbar .notif-empty { padding: 34px 20px; text-align: center; color: rgba(255,255,255,0.55); font-size: 13px; }
.app-topbar .notif-empty-glyph { font-size: 34px; margin-bottom: 6px; color: rgba(255,255,255,0.4); }
.app-topbar .notif-spin { width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(255,255,255,0.12); border-top-color: #ff2fb9; animation: spin 0.9s linear infinite; }
@media (max-width: 860px) { .app-topbar .notif-menu { position: fixed; top: 62px; right: 12px; left: auto; width: min(360px, calc(100vw - 24px)); } }
/* Progressive shed (mirrors the panel topbar): the pills keep their SHORT labels for as long as they
   fit; below that the whole pill group drops, then the tab capsule — the logo · bell · avatar cluster
   stays pinned and is NEVER clipped at any width. (Labels are short — "Scans · Off", "Workers · 2",
   "3DF · Off" — so they show on normal laptops, not just ultrawide.) */
.app-topbar .app-right { min-width: 0; flex-shrink: 1; }
@media (max-width: 1240px) { .app-topbar .status-pills { display: none; } }
@media (max-width: 980px)  { .app-topbar .app-tabs { display: none; } }
@media (max-width: 860px)  {
  .app-topbar .app-topbar-inner { gap: 10px; }
  .app-topbar .app-brand { margin-right: auto; }
}
.app-footer { border-top: 1px solid rgba(255,255,255,0.07); }
.app-foot-inner {
  max-width: 1320px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: rgba(255,255,255,0.4);
}
/* "Made with MetaScan" — inline logo + text on the left, NO pill/border/background. */
.app-foot-inner .made {
  display: inline-flex; align-items: center; gap: 8px; padding: 0; border: none; background: none;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.55); transition: color .15s;
}
.app-foot-inner .made:hover { color: #fff; }
.app-foot-inner .made b { color: #fff; font-weight: 800; }
.app-foot-inner .made .spark { width: 18px; height: 18px; object-fit: contain; }
.app-foot-inner a { color: rgba(255,255,255,0.62); } .app-foot-inner a:hover { color: #fff; }
.app-foot-links { display: flex; gap: 18px; }

@media (max-width: 1040px) {
  .mk-panel { min-width: 0; }
  .mk-panel-inner { flex-direction: column; }
  .mk-feature { width: 320px; min-height: 120px; }
}
@media (max-width: 900px) {
  .mk-foot-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .mk-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .mk-links, .mk-signin, .mk-right .lang-switch { display: none; }
  .app-tabs { display: none; }
}
@media (max-width: 520px) {
  .mk-foot-grid { grid-template-columns: 1fr; }
  .app-account .app-acct-label { display: none; }
}
