/* Public header, Option A "Glass Dock": floating dock, mega menus, language list, phone bottom sheet.
   Markup: views/partials/navbar.ejs. Behaviour: js/utils/navbar.js. Prefix: sn- (legacy ids/classes kept as JS hooks). */

:root {
  --sn-dock-bg: rgba(18, 18, 26, 0.72);
  --sn-dock-bg-solid: rgba(18, 18, 26, 0.86);
  --sn-dock-bg-phone: rgba(18, 18, 26, 0.8);
  --sn-dock-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --sn-panel-bg: rgba(14, 14, 22, 0.88);
  --sn-panel-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  --sn-sheet-bg: rgba(14, 14, 22, 0.94);
  --sn-sheet-line: rgba(255, 255, 255, 0.12);
  --sn-sheet-shadow: 0 -30px 80px rgba(0, 0, 0, 0.5);
  --sn-sheet-handle: rgba(255, 255, 255, 0.18);
  --sn-dim: rgba(9, 9, 15, 0.55);
  --sn-hover: rgba(255, 255, 255, 0.06);
  --sn-row-hover: rgba(255, 255, 255, 0.05);
  --sn-active: rgba(255, 255, 255, 0.08);
  --sn-tile-hover: rgba(255, 255, 255, 0.07);
  --sn-tile-hover-line: rgba(255, 255, 255, 0.16);
  --sn-strip-bg: rgba(255, 255, 255, 0.02);
  --sn-pro-pill-bg: rgba(217, 70, 239, 0.16);
  --sn-pro-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.18), rgba(129, 140, 248, 0.18));
  --sn-pro-bg-hover: linear-gradient(135deg, rgba(217, 70, 239, 0.28), rgba(129, 140, 248, 0.28));
  --sn-pro-line: rgba(217, 70, 239, 0.38);
  --sn-pro-line-hover: rgba(240, 171, 252, 0.6);
  --sn-promo-bg: linear-gradient(135deg, #1A1030 0%, #12121A 70%);
  --sn-promo-line: rgba(232, 121, 249, 0.25);
  --sn-plat-other-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.25), rgba(129, 140, 248, 0.25));
}

[data-theme="light"] {
  --sn-dock-bg: rgba(255, 255, 255, 0.76);
  --sn-dock-bg-solid: rgba(255, 255, 255, 0.9);
  --sn-dock-bg-phone: rgba(255, 255, 255, 0.84);
  --sn-dock-shadow: 0 16px 48px rgba(24, 24, 27, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --sn-panel-bg: rgba(255, 255, 255, 0.92);
  --sn-panel-shadow: 0 40px 100px rgba(24, 24, 27, 0.18);
  --sn-sheet-bg: rgba(255, 255, 255, 0.96);
  --sn-sheet-line: rgba(0, 0, 0, 0.10);
  --sn-sheet-shadow: 0 -30px 80px rgba(24, 24, 27, 0.18);
  --sn-sheet-handle: rgba(0, 0, 0, 0.18);
  --sn-dim: rgba(24, 24, 27, 0.32);
  --sn-hover: rgba(0, 0, 0, 0.05);
  --sn-row-hover: rgba(0, 0, 0, 0.04);
  --sn-active: rgba(0, 0, 0, 0.07);
  --sn-tile-hover: rgba(0, 0, 0, 0.05);
  --sn-tile-hover-line: rgba(0, 0, 0, 0.18);
  --sn-strip-bg: rgba(0, 0, 0, 0.02);
  --sn-pro-pill-bg: rgba(217, 70, 239, 0.12);
  --sn-pro-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.12), rgba(129, 140, 248, 0.12));
  --sn-pro-bg-hover: linear-gradient(135deg, rgba(217, 70, 239, 0.2), rgba(129, 140, 248, 0.2));
  --sn-pro-line: rgba(192, 38, 211, 0.34);
  --sn-pro-line-hover: rgba(192, 38, 211, 0.55);
  --sn-promo-bg: linear-gradient(135deg, #F5ECFF 0%, #FFFFFF 70%);
  --sn-promo-line: rgba(192, 38, 211, 0.28);
  --sn-plat-other-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.16), rgba(129, 140, 248, 0.16));
}

/* ---------- Dock ---------- */
/* The wrapper only reserves the strip; clicks beside the dock fall through to the page. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Above the menu overlay (1200) and the phone sheet (1210), below modals */
  z-index: 1250;
  padding: 20px 24px 0;
  pointer-events: none;
}

/* Progressive blur band. z-order: band 100 < menu overlay 150 < phone sheet 155 < dock/menus 160 */
.sn-blur-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(84px + 2.5rem);
  pointer-events: none;
}

/* Fades in once the page has scrolled (initNavbarScroll toggles .scrolled) */
.navbar-blur {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar.scrolled ~ .sn-blur-band .navbar-blur { opacity: 1; }

html.admin-page .sn-blur-band { display: none; }

.sn-dock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1120px;
  height: 64px;
  margin: 0 auto;
  padding: 0 12px 0 16px;
  border-radius: var(--ui-radius-pill);
  pointer-events: auto;
}

/* Glass lives on a pseudo-element so the panels keep their own backdrop blur */
.sn-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid var(--ui-line-mid);
  background: var(--sn-dock-bg);
  box-shadow: var(--sn-dock-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  transition: background 0.3s;
}

.navbar.scrolled .sn-dock::before,
.navbar.menu-open .sn-dock::before { background: var(--sn-dock-bg-solid); }

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .sn-dock::before,
  .sn-panel,
  .sn-popover,
  .sn-sheet { background: var(--ui-surface-solid); }
}

.sn-logo { flex-shrink: 0; }

.sn-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.sn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: var(--ui-radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sn-link:hover {
  color: var(--text-primary);
  background: var(--sn-hover);
}

.sn-link:focus-visible,
.sn-capsule-btn:focus-visible,
.sn-burger:focus-visible,
.sn-pro-pill:focus-visible,
.sn-tile:focus-visible,
.sn-row:focus-visible,
.sn-promo:focus-visible,
.sn-legal-link:focus-visible,
.sn-donate:focus-visible,
.sn-strip-hint:focus-visible,
.sn-strip-link:focus-visible,
.sn-strip-pro:focus-visible,
.lang-option:focus-visible,
.sn-sheet-row:focus-visible,
.sn-sheet-chip:focus-visible,
.sn-sheet-handle:focus-visible,
.sn-plat:focus-visible,
.sn-actions .user-menu-trigger:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 2px;
}

.sn-trigger svg {
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s;
}

.nav-dropdown.active > .sn-trigger {
  color: var(--text-primary);
  background: var(--sn-active);
}

.nav-dropdown.active > .sn-trigger svg { transform: rotate(180deg); }

/* The one highlighted link in the dock: a tinted pill that keeps drawing the eye until the user is Pro */
.sn-link-pro,
.sn-link-pro:hover {
  position: relative;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--sn-pro-line);
  border-radius: var(--ui-radius-pill);
  background: var(--sn-pro-bg);
  color: var(--text-primary);
  font-weight: 600;
  animation: sn-pro-beacon 3.2s ease-out infinite;
}

.sn-link-pro:hover {
  border-color: var(--sn-pro-line-hover);
  background: var(--sn-pro-bg-hover);
}

.sn-pro-star {
  display: inline-flex;
  color: var(--ui-accent-text);
}

.sn-pro-star svg { fill: currentColor; }

.sn-pro-flag {
  padding: 2px 7px;
  border-radius: var(--ui-radius-pill);
  background: linear-gradient(135deg, #D946EF, #818CF8);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
}

@keyframes sn-pro-beacon {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(217, 70, 239, 0); }
  35% { box-shadow: 0 0 0 5px rgba(217, 70, 239, 0.16); }
}

@media (prefers-reduced-motion: reduce) {
  .sn-link-pro,
  .sn-link-pro:hover { animation: none; }
}

/* "How it works" folds into the Services panel when the dock gets tight */
.sn-panel .sn-fold-in { display: none; }

.sn-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language + theme capsule */
.sn-capsule {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 4px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill);
}

.sn-capsule-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: var(--ui-radius-pill);
  background: transparent;
  color: var(--ui-text-soft);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sn-capsule-btn:hover,
.lang-switcher.active .sn-capsule-btn {
  color: var(--text-primary);
  background: var(--sn-hover);
}

.sn-capsule-btn svg { stroke-linecap: round; stroke-linejoin: round; }

.sn-capsule-icon {
  width: 32px;
  padding: 0;
}

/* theme.js swaps in a 20px icon */
.sn-capsule-icon svg {
  width: 16px;
  height: 16px;
}

.sn-capsule-divider {
  width: 1px;
  height: 18px;
  background: var(--ui-line-mid);
}

.auth-section {
  display: flex;
  align-items: center;
}

.sn-signin {
  padding: 0 1.25rem;
  box-shadow: 0 8px 24px rgba(217, 70, 239, 0.35);
}

.sn-pro-pill,
.sn-burger,
.sn-mobile-only { display: none; }

/* Account trigger inside the dock */
.sn-actions .user-menu-trigger {
  height: 44px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill);
}

.sn-actions .user-menu-trigger:hover {
  background: var(--sn-hover);
  border-color: var(--ui-line-strong);
}

.sn-actions .user-menu-dropdown {
  top: calc(100% + 26px);
  border-color: var(--ui-line-mid);
  border-radius: 20px;
  background: var(--sn-panel-bg);
  box-shadow: var(--sn-panel-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
}

.user-menu-arrow { color: var(--text-secondary); }

.nav-link-desktop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Mega menus ---------- */
/* Panels are positioned against the dock, not their trigger */
.sn-dropdown { position: static; }

.sn-panel,
.sn-popover {
  position: absolute;
  z-index: 10;
  border: 1px solid var(--ui-line-mid);
  background: var(--sn-panel-bg);
  box-shadow: var(--sn-panel-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.25s var(--ui-ease), visibility 0.2s;
}

.sn-panel {
  top: calc(100% + 16px);
  border-radius: var(--ui-radius-card-lg);
  overflow: hidden;
  color: var(--text-primary);
}

.nav-dropdown.active > .sn-panel,
.lang-switcher.active > .sn-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sn-panel-services {
  left: 20px;
  right: 20px;
}

.sn-panel-about {
  right: 40px;
  width: 600px;
  max-width: calc(100% - 40px);
}

.sn-panel-hairline {
  height: 1px;
  background: var(--ui-gradient-hairline);
}

.sn-panel .ui-eyebrow-sm { font-size: 0.6875rem; }

.sn-eyebrow-inset { padding-left: 12px; }

.sn-services {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 28px;
}

.sn-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sn-col-platforms { gap: 14px; }
.sn-col-tools { gap: 10px; }

.sn-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sn-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-fill-soft);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.sn-tile:hover {
  background: var(--sn-tile-hover);
  border-color: var(--sn-tile-hover-line);
}

.sn-tile svg { flex-shrink: 0; }

.sn-tile > span:not(.sn-tile-note) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sn-tile-wide { justify-content: space-between; }

.sn-tile-lead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sn-other-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--gradient-button);
}

.sn-tile-note {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

.sn-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s;
}

.sn-row:hover {
  color: var(--text-primary);
  background: var(--sn-row-hover);
}

.sn-row-text { min-width: 0; }

.sn-row-text small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
}

.sn-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sn-row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ui-fill-2);
  color: var(--text-primary);
}

.sn-row-icon svg { stroke-linecap: round; stroke-linejoin: round; }

.sn-row-icon-brand {
  background: var(--gradient-button);
  color: #fff;
}

/* Editor promo card */
.sn-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--sn-promo-line);
  border-radius: 20px;
  background: var(--sn-promo-bg);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s;
}

.sn-promo:hover {
  color: var(--text-primary);
  border-color: var(--fuchsia);
}

/* The art is a dark editor screen in both themes */
.sn-promo-art {
  position: relative;
  display: block;
  height: 128px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #0B0B12;
}

.sn-promo-frame {
  position: absolute;
  inset: 8px 8px 40px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2B1B4A, #0B1D33);
}

.sn-promo-sticker {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #F0ABFC;
  color: #1A0A20;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1.5;
}

.sn-promo-tracks {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sn-promo-track {
  height: 10px;
  border-radius: 3px;
}

.sn-promo-track-a {
  width: 72%;
  background: linear-gradient(90deg, #D946EF, #818CF8);
}

.sn-promo-track-b {
  width: 40%;
  margin-left: 22%;
  background: #34D399;
}

.sn-promo-eyebrow { color: var(--success); }
[data-theme="light"] .sn-promo-eyebrow { color: #059669; }

.sn-promo-title {
  font-family: var(--ui-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.sn-promo-link,
.sn-strip-link,
.sn-strip-pro {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ui-accent-text);
  font-weight: 600;
  text-decoration: none;
}

.sn-promo-link { font-size: 0.875rem; }

.sn-promo-link svg,
.sn-strip-link svg {
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.sn-promo:hover .sn-promo-link svg,
.sn-strip-link:hover svg { transform: translateX(3px); }

/* Bottom strip */
.sn-panel-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-top: 1px solid var(--ui-line-soft);
  background: var(--sn-strip-bg);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.sn-strip-start {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.sn-strip-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.sn-strip-hint:hover { color: var(--text-primary); }

.sn-keys {
  display: inline-flex;
  gap: 8px;
}

.sn-strip-pro { gap: 8px; white-space: nowrap; }

.sn-strip-pro:hover,
.sn-strip-link:hover { color: var(--text-primary); }

.sn-strip-pro svg { fill: currentColor; }

/* About Us */
.sn-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 20px;
  padding: 24px;
}

.sn-col-company,
.sn-col-legal { gap: 6px; }

.sn-col-legal {
  padding-left: 20px;
  border-left: 1px solid var(--ui-line-soft);
}

.sn-legal-link {
  display: flex;
  align-items: center;
  height: 36px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.sn-legal-link:hover { color: var(--text-primary); }

/* The strip is a light gradient in both themes, so its ink stays dark */
.sn-donate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px 24px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F0ABFC, #E879F9 30%, #B78BF5 62%, #818CF8);
  color: #14101C;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sn-donate:hover {
  color: #14101C;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(217, 70, 239, 0.3);
}

.sn-donate-lead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sn-donate-heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #14101C;
  color: #F0ABFC;
}

.sn-donate-action { white-space: nowrap; }

/* ---------- Language list ---------- */
.lang-switcher { position: relative; }

.lang-dropdown {
  top: calc(100% + 32px);
  left: -8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 184px;
  padding: 6px;
  border-radius: 18px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-option-flag {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.lang-option-name { flex: 1; }

.lang-option-check {
  display: flex;
  flex-shrink: 0;
  opacity: 0;
  color: var(--ui-accent-text);
}

.lang-option:hover {
  background: var(--sn-row-hover);
  color: var(--text-primary);
}

.lang-option.active {
  background: var(--sn-active);
  color: var(--text-primary);
  font-weight: 600;
}

.lang-option.active .lang-option-check { opacity: 1; }

/* ---------- Overlay (desktop menus + phone sheet) ---------- */
.sn-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--sn-dim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

/* A phone sheet dims the header too; a desktop mega menu stays above its dim */
.sn-overlay.is-sheet { z-index: 1260; }

.sn-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* The floating clip button would sit on top of the dimmed page and the sheet */
.sn-overlay.active ~ .clip-fab {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Phone bottom sheet ---------- */
.sn-sheet { display: none; }

/* ---------- Tight desktop: fold "How it works" into the Services panel ---------- */
@media (max-width: 1279px) {
  .sn-fold-out { display: none; }
  .sn-panel .sn-fold-in { display: flex; }
  .sn-services { grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 20px; padding: 24px; }
}

/* ---------- Hamburger mode ---------- */
@media (max-width: 1099px) {
  .sn-links,
  .sn-capsule,
  .sn-desktop-only,
  .nav-link-desktop { display: none !important; }

  .sn-mobile-only { display: inline-flex; }
  .sn-actions { gap: 6px; }

  .sn-pro-pill {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--ui-radius-pill);
    background: var(--sn-pro-pill-bg);
    color: var(--ui-accent-text);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
  }

  .sn-pro-pill:hover { color: var(--ui-accent-text); }

  /* 44px touch target around the 36px pill */
  .sn-pro-pill::after {
    content: "";
    position: absolute;
    inset: -4px 0;
  }

  .sn-actions .user-menu-trigger {
    padding: 0 5px;
    border-color: transparent;
  }

  .sn-actions .user-menu-arrow { display: none; }

  .sn-burger {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--sn-hover);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .sn-burger .hamburger-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    margin: -1px 0 0 -9px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ui-ease), opacity 0.2s;
  }

  .sn-burger .hamburger-line:nth-child(1) { transform: translateY(-6px); }
  .sn-burger .hamburger-line:nth-child(3) { transform: translateY(6px); }

  .sn-burger.active {
    background: var(--ui-inverse-bg);
    color: var(--ui-inverse-text);
  }

  .sn-burger.active .hamburger-line { height: 2.5px; }
  .sn-burger.active .hamburger-line:nth-child(1) { transform: rotate(45deg); }
  .sn-burger.active .hamburger-line:nth-child(2) { opacity: 0; }
  .sn-burger.active .hamburger-line:nth-child(3) { transform: rotate(-45deg); }

  .sn-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1280;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
    padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--sn-sheet-line);
    border-radius: 28px 28px 0 0;
    background: var(--sn-sheet-bg);
    box-shadow: var(--sn-sheet-shadow);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    color: var(--text-primary);
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.35s var(--ui-ease), visibility 0.35s;
  }

  .sn-sheet:focus { outline: none; }

  .sn-sheet.active {
    visibility: visible;
    transform: translateY(0);
  }

  /* Sticky top strip: grab handle in the middle, close button on the right.
     The sheet content scrolls under a progressive blur, as it does under the header. */
  .sn-sheet-top {
    margin: 0 -16px -4px;
    padding: 10px 12px 6px;
  }

  /* The grab area comes from the kit (.ui-sheet-grab) */


  /* While a drag is in progress the sheet follows the finger */
  .sn-sheet.is-dragging {
    transition: none;
    will-change: transform;
  }

  .sn-sheet-handle > span { background: var(--sn-sheet-handle); }

  .sn-sheet-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
  }

  .sn-sheet-user .user-avatar {
    width: 36px;
    height: 36px;
  }

  .sn-sheet-user .mobile-user-details { min-width: 0; line-height: 1.35; }

  .sn-sheet-user .mobile-user-name,
  .sn-sheet-user .mobile-user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sn-sheet-cta {
    flex-shrink: 0;
    box-shadow: 0 10px 28px rgba(217, 70, 239, 0.35);
  }

  .sn-sheet-cta svg { stroke-linecap: round; stroke-linejoin: round; }

  .sn-sheet-group {
    display: flex;
    flex-direction: column;
  }

  .sn-sheet-group-gap { gap: 10px; }

  .sn-sheet .ui-eyebrow-sm { font-size: 0.6875rem; }
  .sn-sheet-eyebrow { padding: 0 8px 4px; }
  .sn-sheet-group-gap .sn-sheet-eyebrow { padding-bottom: 0; }

  .sn-sheet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 8px;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
  }

  .sn-sheet-row:hover,
  .sn-sheet-row:active {
    color: var(--text-primary);
    background: var(--sn-row-hover);
  }

  .sn-sheet-row .sn-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .sn-plats {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
  }

  .sn-plat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
  }

  .sn-plat-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--sn-row-hover);
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
  }

  .sn-plat:hover .sn-plat-mark,
  .sn-plat:active .sn-plat-mark {
    background: var(--sn-tile-hover);
    border-color: var(--sn-tile-hover-line);
  }

  .sn-plat-mark-other {
    background: var(--sn-plat-other-bg);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .sn-sheet-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sn-sheet-chip {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--ui-fill);
    color: var(--ui-text-soft);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sn-sheet-chip:hover,
  .sn-sheet-chip:active {
    color: var(--text-primary);
    background: var(--sn-active);
  }

  .sn-sheet-foot { margin-top: auto; }

  .sn-sheet-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Folded language list: rows 0fr -> 1fr follows its real height */
  .sn-sheet-langs {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s;
  }

  .sn-sheet-langs.is-open {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s;
  }

  .sn-sheet-langs-inner {
    min-height: 0;
    overflow: hidden;
  }

  .sn-sheet-lang {
    width: 100%;
    height: 44px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .sn-sheet-langs.is-open .sn-sheet-lang {
    opacity: 1;
    transform: none;
    transition: opacity 0.24s ease 0.06s, transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .sn-sheet-lang-toggle {
    display: inline-flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 44px;
    padding: 0 12px 0 14px;
    border: 1px solid var(--ui-line-mid);
    border-radius: var(--ui-radius-pill);
    background: var(--sn-row-hover);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
  }

  .sn-sheet-lang-toggle[aria-expanded="true"] { border-color: var(--ui-line-strong); }

  .sn-sheet-lang-toggle:focus-visible {
    outline: 2px solid var(--ui-focus-border);
    outline-offset: 2px;
  }

  .sn-sheet-lang-current {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* A long sign-out label leaves little room: fall back to the language code */
  .sn-sheet-lang-toggle { container-type: inline-size; }
  .sn-sheet-lang-code { display: none; }

  @container (max-width: 118px) {
    .sn-sheet-lang-name {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .sn-sheet-lang-code { display: inline; }
  }

  .sn-sheet-lang-chevron {
    display: inline-flex;
    color: var(--text-secondary);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .sn-sheet-lang-toggle[aria-expanded="true"] .sn-sheet-lang-chevron { transform: rotate(180deg); }

  /* Kit theme switch (cue: next, same as the dock button) on the sheet's own tint */
  .sn-sheet-theme { --ui-theme-btn-bg: var(--sn-row-hover); }

  .sn-sheet-auth {
    flex-shrink: 0;
    padding: 0 1rem;
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-sheet-langs,
  .sn-sheet-langs.is-open,
  .sn-sheet-lang,
  .sn-sheet-langs.is-open .sn-sheet-lang,
  .sn-sheet-lang-chevron { transition: none; }
}

/* Phones: the sheet starts 150px from the top, like the artboard */
@media (max-width: 599px) {
  .sn-sheet {
    min-height: calc(100vh - 150px);
    min-height: calc(100dvh - 150px);
  }
}

/* Tablets: the sheet floats as a centred card instead of spanning the screen */
@media (min-width: 600px) and (max-width: 1099px) {
  .sn-sheet {
    left: 50%;
    right: auto;
    width: 440px;
    margin-left: -220px;
  }
}

/* ---------- Phone dock ---------- */
@media (max-width: 768px) {
  .navbar { padding: 12px 12px 0; }

  .sn-blur-band { height: calc(72px + 2.5rem); }

  /* Phones: the pill overlaps content from the first pixel, so the blur is always on, with a heavier tint */
  .navbar-blur {
    --progressive-blur-tint-strong: rgba(9, 9, 15, 0.95);
    --progressive-blur-tint-mid: rgba(9, 9, 15, 0.6);

    opacity: 1;
  }

  [data-theme="light"] .navbar-blur {
    --progressive-blur-tint-strong: rgba(255, 255, 255, 0.95);
    --progressive-blur-tint-mid: rgba(255, 255, 255, 0.6);
  }

  .sn-dock {
    height: 60px;
    padding: 0 8px 0 14px;
  }

  .sn-dock::before {
    background: var(--sn-dock-bg-phone);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: none;
  }

  .sn-actions .user-menu-dropdown { top: calc(100% + 20px); }
}

@media (max-width: 359px) {
  .sn-logo .ui-logo-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-panel,
  .sn-popover,
  .sn-overlay,
  .sn-sheet,
  .sn-burger .hamburger-line,
  .sn-trigger svg,
  .sn-donate,
  .sn-promo-link svg,
  .sn-strip-link svg,
  .navbar-blur {
    transition: none;
  }

  .sn-donate:hover { transform: none; }
}
