/* Motion helpers loaded as a separate stylesheet (see HTML) to avoid @import blocking. */

/* Hide protected app pages until auth is verified (see js/auth-gate-head.js). */
html.ms-auth-gating body {
  visibility: hidden !important;
}

/* Moonrise Studio ΓÇö SiteDrop-style app shell */

:root {
  --ms-bg: #f3f5f8;
  --ms-surface: #ffffff;
  --ms-ink: #1e293b;
  --ms-muted: #64748b;
  --ms-line: #e8edf3;
  --ms-accent: #3b82f6;
  --ms-accent-soft: #e8f1ff;
  --ms-brand: #6d5efc;
  --ms-danger: #b91c1c;
  --ms-sidebar-w: 268px;
  --ms-sidebar-min: 220px;
  --ms-sidebar-max: 420px;
  --ms-radius: 14px;
  --ms-font: "DM Sans", system-ui, sans-serif;
  --ms-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ms-channel-w: 1420px;
  --ms-content-scale: 1.2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--ms-font);
  background: var(--ms-bg);
  color: var(--ms-ink);
  min-height: 100vh;
}

body[data-page="login"],
body[data-page="login"] {
  display: grid;
  place-items: center;
  align-content: center;
  color-scheme: light;
  padding: 1rem;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 10% -10%, #bfdbfe 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #ddd6fe 0%, transparent 50%),
    var(--ms-bg);
}

body[data-page="home"] {
  background: var(--ms-bg);
  color: var(--ms-ink);
  overflow-x: clip;
  font-family: var(--ms-font);
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 112.5%;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.42) transparent;
}

body[data-page="home"] .ms-home-hero,
body[data-page="home"] .ms-home-hero-stage,
body[data-page="home"] .ms-home-hero-copy,
body[data-page="home"] .ms-home-title,
body[data-page="home"] .ms-home-sub,
body[data-page="home"] .ms-home-cascade {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html:has(body[data-page="home"]) {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.42) transparent;
}

html:has(body[data-page="home"])::-webkit-scrollbar,
body[data-page="home"]::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

html:has(body[data-page="home"])::-webkit-scrollbar-track,
body[data-page="home"]::-webkit-scrollbar-track {
  background: transparent;
}

html:has(body[data-page="home"])::-webkit-scrollbar-thumb,
body[data-page="home"]::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.55) 0%, rgba(79, 70, 229, 0.48) 100%);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 2.5rem;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.12);
}

html:has(body[data-page="home"])::-webkit-scrollbar-thumb:hover,
body[data-page="home"]::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.78) 0%, rgba(79, 70, 229, 0.7) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
}

html:has(body[data-page="home"])::-webkit-scrollbar-corner,
body[data-page="home"]::-webkit-scrollbar-corner {
  background: transparent;
}

#shell { min-height: 0; }

.ms-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--ms-sidebar-w);
  background: #ffffff;
  border-right: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  padding: 1.05rem 0.85rem 0.9rem;
  z-index: 40;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s ease;
  will-change: transform;
}

.ms-sidebar-resizer {
  position: fixed;
  top: 0;
  left: calc(var(--ms-sidebar-w) - 3px);
  width: 6px;
  height: 100%;
  z-index: 41;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.ms-sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 48px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(148, 163, 184, 0.35);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, height 0.15s ease;
}

.ms-sidebar-resizer:hover::after,
.ms-sidebar-resizer:focus-visible::after,
body.ms-sidebar-resizing .ms-sidebar-resizer::after {
  opacity: 1;
  background: rgba(59, 130, 246, 0.55);
  height: 64px;
}

.ms-sidebar-resizer:focus-visible {
  outline: none;
}

body.ms-sidebar-resizing {
  cursor: col-resize;
  user-select: none;
}

body.ms-sidebar-resizing iframe {
  pointer-events: none;
}

.ms-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.2rem 0.35rem 1rem;
}

.ms-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 10px rgba(15, 23, 42, 0.06);
}

.ms-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ms-brand-name {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ms-ink);
  line-height: 1.2;
}

.ms-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.ms-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ms-nav-section {
  margin: 0;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f96bd;
}

.ms-nav-section-ico {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  color: #a3a9c8;
  flex-shrink: 0;
}

.ms-nav-section-ico svg {
  width: 12px;
  height: 12px;
}

.ms-nav-section-label {
  line-height: 1;
}

.ms-nav {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: #f4f7fa;
  border: none;
  box-shadow: none;
}

.ms-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.8rem;
  border-radius: 14px;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ms-nav-progress {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ms-nav-link.is-generating {
  padding-bottom: 0.88rem;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
  animation: ms-nav-generating-glow 1.55s ease-in-out infinite;
}

.ms-nav-link.is-generating .ms-nav-ico {
  color: #2563eb;
  animation: ms-nav-generating-ico 1.15s ease-in-out infinite;
}

.ms-nav-link.is-generating .ms-nav-label {
  font-weight: 600;
}

.ms-nav-link .ms-nav-label {
  min-width: 0;
}

.ms-nav-cancel {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-nav-link.is-generating .ms-nav-cancel {
  display: inline-flex;
}

.ms-nav-cancel[hidden] {
  display: none !important;
}

.ms-nav-cancel:hover {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.ms-nav-cancel:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.45);
  outline-offset: 1px;
}

.ms-nav-cancel svg {
  width: 12px;
  height: 12px;
  display: block;
}

.ms-nav-link.is-generating .ms-nav-progress {
  opacity: 1;
  background: rgba(37, 99, 235, 0.16);
  right: 2.35rem;
  height: 3px;
}

.ms-nav-link.is-generating .ms-nav-progress::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb 55%, #1d4ed8);
  animation: ms-nav-progress-slide 1.05s ease-in-out infinite;
}

@keyframes ms-nav-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@keyframes ms-nav-generating-glow {
  0%, 100% {
    background: rgba(37, 99, 235, 0.06);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  }
  50% {
    background: rgba(37, 99, 235, 0.14);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
  }
}

@keyframes ms-nav-generating-ico {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.82; }
}

.ms-nav-link:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ms-ink);
}

.ms-nav-link.is-active {
  background: #ffffff;
  color: var(--ms-ink);
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 1px 3px rgba(15, 23, 42, 0.06);
}

.ms-nav-link.is-active .ms-nav-ico {
  color: #2563eb;
}

.ms-nav-link.is-soon {
  color: #94a3b8;
  cursor: default;
  pointer-events: none;
  opacity: 0.72;
  user-select: none;
}

.ms-nav-link.is-soon:hover {
  background: transparent;
  color: #94a3b8;
}

.ms-nav-link.is-soon .ms-nav-ico {
  color: #94a3b8;
}

.ms-nav-link.is-soon .ms-nav-label s {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #94a3b8;
}

.ms-nav-soon {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-nav-external {
  margin-left: auto;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #94a3b8;
  opacity: 0.85;
}

.ms-nav-external svg {
  width: 14px;
  height: 14px;
  display: block;
}

.ms-nav-link.is-external:hover .ms-nav-external {
  color: #64748b;
  opacity: 1;
}

.ms-nav-ico {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #64748b;
  opacity: 1;
}

.ms-nav-ico svg { width: 18px; height: 18px; }

.ms-sidebar-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.55rem 0.65rem 0.2rem;
  font-size: 0.74rem;
  color: #94a3b8;
}

.ms-sidebar-legal-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ms-sidebar-legal-link:hover,
.ms-sidebar-legal-link.is-active {
  color: #475569;
}

.ms-sidebar-legal-sep {
  opacity: 0.55;
  user-select: none;
}

.ms-sidebar-foot {
  margin-top: 0.45rem;
  padding: 0.45rem;
  border-top: none;
  border-radius: 18px;
  background: #f4f7fa;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ms-user-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.35rem;
}

.ms-user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.15rem 0.2rem;
  margin: -0.15rem -0.2rem;
  transition: background 0.15s ease;
}

.ms-user-profile:hover {
  background: rgba(15, 23, 42, 0.05);
}

.ms-user-profile:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.ms-user-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.ms-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px rgba(59, 130, 246, 0.25);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ms-user-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.28s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-user-avatar.is-loading img {
  opacity: 0;
  transform: scale(0.86);
}

.ms-user-avatar-spin {
  display: none;
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: ms-avatar-spin 0.7s linear infinite;
}

.ms-user-avatar.is-loading .ms-user-avatar-spin {
  display: block;
}

.ms-user-avatar.is-avatar-ready img {
  animation: ms-avatar-photo-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ms-user-avatar.is-avatar-ready .ms-user-avatar-spin {
  display: block;
  animation: ms-avatar-loader-out 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ms-user-avatar.has-photo.is-loading .ms-user-avatar-spin {
  border-color: rgba(100, 116, 139, 0.25);
  border-top-color: #64748b;
}

@keyframes ms-avatar-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ms-avatar-loader-out {
  0% {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(210deg) scale(2.8);
  }
}

@keyframes ms-avatar-photo-in {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  70% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.ms-user-avatar.has-photo {
  background: #e2e8f0;
}

.ms-user-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 5;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid #f4f7fa;
  box-sizing: border-box;
  pointer-events: none;
}

.ms-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.ms-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-user-logout {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}

.ms-user-logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

.ms-user-logout svg { width: 18px; height: 18px; }

.ms-menu-toggle {
  display: none;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  border: 1px solid var(--ms-line);
  background: var(--ms-surface);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.ms-hard-refresh {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  /* Above builder fullscreen preview (80) and most chrome; below toasts (100000). */
  z-index: 130;
  display: grid !important;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.ms-hard-refresh svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

.ms-hard-refresh:hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.ms-hard-refresh:active {
  transform: scale(0.96);
}

.ms-hard-refresh:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.ms-hard-refresh:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ms-hard-refresh.is-spinning svg {
  animation: ms-hard-refresh-spin 0.7s linear infinite;
}

@keyframes ms-hard-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Same control on phone/tablet - larger tap target, never hide. */
@media (max-width: 900px) {
  .ms-hard-refresh {
    top: max(0.65rem, env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
  }

  .ms-hard-refresh svg {
    width: 20px;
    height: 20px;
  }
}

@media (pointer: coarse) {
  .ms-hard-refresh {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-hard-refresh.is-spinning svg {
    animation: none;
  }
}

#page-body {
  margin-left: var(--ms-sidebar-w);
  width: calc(100% - var(--ms-sidebar-w));
  max-width: none;
  padding: 2.25rem 2.5rem 5rem;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Shared centered channel column ΓÇö bigger content panel (sidebar unchanged) */
#page-body.ms-channel-page,
#page-body.ms-dash-page,
#page-body.ms-lf-page,
#page-body.ms-content-page,
#page-body.ms-settings-page,
#page-body.ms-pricing-page,
#page-body.ms-clients-page,
#page-body.ms-projects-page,
#page-body.ms-store-page {
  --ms-channel-w: 1420px;
  width: min(var(--ms-channel-w), calc(100% - var(--ms-sidebar-w) - 2rem));
  max-width: var(--ms-channel-w);
  margin-left: calc(
    var(--ms-sidebar-w) + max(0px, (100% - var(--ms-sidebar-w) - min(var(--ms-channel-w), calc(100% - var(--ms-sidebar-w) - 2rem))) / 2)
  );
  margin-right: auto;
  padding-top: 2.75rem;
  padding-bottom: 5.5rem;
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  font-size: 1rem;
  zoom: var(--ms-content-scale);
}

/* Help - narrow contact column */
body[data-page="help"] #page-body.ms-content-page {
  --ms-channel-w: 620px;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

/* Creator Help guide - wider reading column */
body[data-page="guide"] #page-body.ms-help-guide-page {
  --ms-channel-w: 820px;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.ms-help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 0 0 1.35rem;
  padding: 0;
}

.ms-help-toc a {
  color: #475569;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-help-toc a:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.ms-help-guide {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ms-help-guide .ms-settings-card {
  scroll-margin-top: 1.25rem;
}

.ms-help-guide .ms-settings-hint {
  margin-top: 0;
}

.ms-help-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: #334155;
  line-height: 1.55;
}

.ms-help-list li + li {
  margin-top: 0.45rem;
}

.ms-help-list a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.ms-help-list a:hover {
  text-decoration: underline;
}

.ms-help-steps {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  counter-reset: help-step;
}

.ms-help-steps li {
  display: grid;
  grid-template-columns: 1.85rem 1fr;
  gap: 0.35rem 0.75rem;
  align-items: start;
  counter-increment: help-step;
}

.ms-help-steps li::before {
  content: counter(help-step);
  grid-row: 1 / span 2;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.ms-help-steps strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.ms-help-steps span {
  grid-column: 2;
  color: #475569;
  line-height: 1.5;
  font-size: 0.95rem;
}

.ms-help-steps a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.ms-help-steps a:hover {
  text-decoration: underline;
}

.ms-help-legal {
  margin: 1.1rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}

.ms-help-legal a {
  color: #475569;
  font-weight: 600;
  text-decoration: none;
}

.ms-help-legal a:hover {
  color: #1d4ed8;
}

/* Store ΓÇö product catalog */
#page-body.ms-store-page {
  --ms-channel-w: 920px;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

body[data-page="store"] {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(191, 219, 254, 0.42), transparent 58%),
    radial-gradient(900px 480px at 100% 12%, rgba(239, 246, 255, 0.95), transparent 52%),
    var(--ms-bg);
}

#page-body > h1,
.ms-page-head h1,
.ms-fin-hero h1,
.ms-dash-head h1 {
  margin: 0;
  font-family: var(--ms-font);
  font-size: clamp(2.35rem, 3vw, 2.9rem);
  letter-spacing: -0.035em;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.12;
}

.lead {
  color: var(--ms-muted);
  margin: 0.5rem 0 0;
  font-family: var(--ms-font);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
  max-width: 36rem;
}

.ms-page-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 2.15rem;
}

.ms-page-head-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ms-page-head-copy .lead {
  margin-left: auto;
  margin-right: auto;
}

.ms-page-head-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ms-page-eyebrow {
  display: block;
  margin: 0 0 0.35rem;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ms-muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
}

.card, .ms-card {
  background: var(--ms-surface);
  border: 1px solid var(--ms-line);
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
}

.ms-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ms-stat-label { color: var(--ms-muted); font-size: 0.8rem; }
.ms-stat-value { font-size: 1.6rem; font-weight: 600; margin-top: 0.25rem; }

/* Dashboard - settings-style stack with blue studio accents */
body[data-page="dashboard"] {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(191, 219, 254, 0.42), transparent 58%),
    radial-gradient(900px 480px at 100% 12%, rgba(239, 246, 255, 0.95), transparent 52%),
    var(--ms-bg);
}

#page-body.ms-dash-page {
  --ms-channel-w: 980px;
}

.ms-dash-head,
.ms-page-head.ms-dash-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.ms-dash-greeting,
.ms-page-eyebrow {
  display: none;
}

.ms-dash-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ms-dash-btn,
.ms-dash-btn-ghost {
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  box-shadow: none;
}

.ms-dash-btn {
  background: var(--ms-accent);
  border-color: transparent;
}

.ms-dash-btn:hover {
  filter: brightness(1.05);
}

.ms-dash-btn-ghost {
  background: #fff;
  color: var(--ms-ink);
  border: 1px solid var(--ms-line);
}

.ms-dash-btn-ghost:hover {
  background: #f8fafc;
}

.ms-settings-stack.ms-dash-stack {
  gap: 0.9rem;
}

.ms-dash-card.ms-settings-card {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.05);
  border-color: #e2e8f0;
}

.ms-dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 -1.35rem 1rem;
  padding: 0 1.35rem 0.85rem;
  border-bottom: 1px solid var(--ms-line);
}

.ms-dash-section-head .ms-settings-card-title {
  margin: 0;
  padding: 0;
  border-bottom: none;
  flex: 1;
  min-width: 0;
}

.ms-dash-count-badge {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.ms-dash-progress-card {
  display: flex;
  justify-content: center;
}

.ms-dash-progress-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  width: min(100%, 640px);
  margin: 0 auto;
}

.ms-dash-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 0.65rem;
  flex: 1 1 17.5rem;
  width: min(100%, 22.5rem);
  min-width: 0;
}

.ms-dash-overview-grid > .ms-dash-metric,
.ms-dash-overview-grid > .ms-dash-tool {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ms-dash-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.ms-dash-metric {
  display: grid;
  gap: 0.2rem;
  justify-items: stretch;
  text-align: center;
  padding: 0.55rem 0.45rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  min-width: 0;
}

.ms-dash-metric--earned .ms-dash-metric-value,
.ms-dash-metric--sales .ms-dash-metric-value {
  color: #2563eb;
}

.ms-dash-metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-dash-metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.ms-dash-metric--goal {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ms-dash-metric--goal:hover,
.ms-dash-metric--goal:focus-within {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.ms-dash-goal-display {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 auto;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.ms-dash-goal-display:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.ms-dash-goal-input {
  width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0.15rem 0.25rem;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.ms-dash-goal-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.ms-dash-metric--goal.is-editing .ms-dash-goal-display {
  display: none;
}

.ms-dash-ring-wrap {
  flex: 0 0 auto;
  width: min(100%, 240px);
  max-width: 240px;
  display: grid;
  place-items: center;
  padding: 0.15rem 0;
}

.ms-dash-ring {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.ms-dash-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ms-dash-ring-track {
  stroke: #dbeafe;
  stroke-width: 18;
}

.ms-dash-ring-prog {
  stroke: #3b82f6;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.25));
}

.ms-dash-ring-center {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0.75rem;
}

.ms-dash-ring-progress {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ms-dash-ring-value {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ms-dash-stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.ms-dash-card .ms-settings-card-title svg {
  color: #3b82f6;
}

.ms-dash-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.ms-dash-overview-grid .ms-dash-tool {
  width: 100%;
  min-height: 3.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  text-align: left;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
  box-shadow: none;
}

.ms-dash-overview-grid .ms-dash-tool:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.ms-dash-overview-grid .ms-dash-tool svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #3b82f6;
}

.ms-dash-tool {
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.ms-dash-tool svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #3b82f6;
}

.ms-dash-projects-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1rem;
}

.ms-dash-projects-card.is-empty {
  gap: 0;
  padding-bottom: 0;
  align-self: stretch;
}

.ms-dash-projects-card.is-empty .ms-dash-island-panel {
  display: none;
}

.ms-dash-projects-card.is-empty .ms-dash-island-toggle {
  cursor: default;
}

.ms-dash-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  gap: 0.75rem;
  justify-content: start;
}

.ms-dash-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
  max-width: 180px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-dash-preview:hover {
  border-color: #dbeafe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.ms-dash-preview-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.ms-dash-preview-live {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #166534;
  background: rgba(240, 253, 244, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.ms-dash-projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.ms-dash-projects-filter {
  appearance: none;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  color: #64748b;
  background: #fff;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.ms-dash-projects-filter:hover {
  border-color: #cbd5e1;
  color: #334155;
}

.ms-dash-projects-filter.is-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.ms-dash-projects-filter:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.ms-dash-preview-shot--empty {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #dbeafe, #eff6ff 55%, #f8fafc);
}

.ms-dash-preview-placeholder {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.ms-dash-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 500%;
  height: 500%;
  border: 0;
  transform: scale(0.2);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}

.ms-dash-preview-delete {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #dc2626;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.92;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.ms-dash-preview:hover .ms-dash-preview-delete,
.ms-dash-preview:focus-within .ms-dash-preview-delete {
  opacity: 1;
}

.ms-dash-preview-delete:hover {
  background: #fef2f2;
  color: #b91c1c;
  transform: scale(1.05);
}

.ms-dash-preview-delete:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.45);
  outline-offset: 2px;
}

.ms-dash-preview-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.55rem 0.55rem;
  text-decoration: none;
  color: inherit;
}

.ms-dash-preview-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ms-dash-preview-hit {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

@media (max-width: 720px) {
  .ms-dash-previews {
    grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
    gap: 0.55rem;
  }

  .ms-dash-preview {
    max-width: 160px;
  }
}

@media (max-width: 420px) {
  .ms-dash-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ms-dash-preview {
    max-width: none;
  }
}

.ms-dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ms-dash-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ms-dash-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.ms-dash-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.ms-dash-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ms-accent);
  text-decoration: none;
}

.ms-dash-link:hover {
  text-decoration: underline;
}

.ms-dash-list {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ms-dash-list--plain {
  padding: 0 0.15rem 0.35rem;
}

.ms-dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.ms-dash-row:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ms-dash-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ms-dash-row-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-dash-row-date {
  font-size: 0.8rem;
  color: #94a3b8;
}

.ms-dash-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.ms-dash-pill--live {
  background: #ecfdf5;
  color: #047857;
}

.ms-dash-pill--paid {
  background: #eff6ff;
  color: #1d4ed8;
}

.ms-dash-pill--draft {
  background: #f8fafc;
  color: #64748b;
}

.ms-dash-empty {
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 2.25rem 1.25rem;
  text-align: center;
}

.ms-dash-empty p {
  margin: 0;
  color: var(--ms-muted);
  font-size: 0.98rem;
}

.ms-dash-empty--dotted {
  min-height: 7.5rem;
  border: 1.5px dashed #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.55), transparent);
  gap: 0;
  padding: 1.75rem 1.25rem;
}

.ms-dash-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.ms-dash-island.ms-settings-card {
  padding: 0;
  overflow: hidden;
}

.ms-dash-island-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: background 0.15s ease;
}

.ms-dash-island-toggle:hover:not(:disabled) {
  background: #f8fbff;
}

.ms-dash-island-toggle:disabled {
  cursor: default;
  opacity: 1;
}

.ms-dash-island-toggle .ms-settings-card-title,
.ms-dash-island-title {
  margin: 0;
  padding: 0;
  border-bottom: none;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.ms-dash-island-count {
  font-size: 0.86rem;
  font-weight: 600;
  color: #94a3b8;
  flex-shrink: 0;
}

.ms-dash-island-panel {
  border-top: 1px solid var(--ms-line);
  padding: 0.85rem 1.15rem 1.15rem;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 28%);
}

.ms-dash-island-panel .ms-dash-previews,
.ms-dash-island-panel .ms-dash-list {
  margin: 0;
}

.ms-dash-projects-search {
  position: relative;
  margin: 0 0 0.85rem;
}

.ms-dash-projects-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.35rem 0 0.85rem;
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-dash-projects-search-field::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 0.45rem;
  opacity: 0.55;
  background: currentColor;
  color: var(--ms-muted);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.ms-dash-projects-search-field:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ms-dash-projects-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  color: #0f172a;
}

.ms-dash-projects-search-input::placeholder {
  color: #94a3b8;
}

.ms-dash-projects-search-clear {
  width: 30px;
  height: 30px;
  margin-right: 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ms-dash-projects-search-clear:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ms-dash-projects-search-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.ms-dash-projects-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 8;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  max-height: 14rem;
  overflow: auto;
}

.ms-dash-projects-suggest[hidden] {
  display: none !important;
}

.ms-dash-projects-suggest-item {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 9px;
  cursor: pointer;
}

.ms-dash-projects-suggest-item:hover,
.ms-dash-projects-suggest-item.is-active {
  background: #eff6ff;
}

.ms-dash-projects-suggest-kind {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ms-dash-projects-suggest-value {
  min-width: 0;
  font-size: 0.88rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-dash-island.is-open .ms-dash-island-toggle {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border-bottom: 1px solid var(--ms-line);
}

@media (max-width: 700px) {
  .ms-dash-head,
  .ms-page-head {
    align-items: center;
    text-align: center;
  }

  .ms-dash-overview-grid,
  .ms-dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .ms-dash-metric-value {
    font-size: 1rem;
  }

  .ms-dash-overview-grid .ms-dash-tool {
    min-height: 3rem;
    padding: 0.65rem 0.45rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 520px) {
  .ms-dash-progress-layout {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: min(100%, 22.5rem);
  }

  .ms-dash-ring-wrap {
    width: min(100%, 220px);
    max-width: 220px;
  }

  .ms-dash-overview-grid {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  .ms-dash-overview-grid,
  .ms-dash-metrics {
    gap: 0.3rem;
  }

  .ms-dash-metric {
    padding: 0.45rem 0.3rem 0.55rem;
  }

  .ms-dash-metric-label {
    font-size: 0.55rem;
  }
}

.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 48%, #2563eb 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 8px 18px rgba(37, 99, 235, 0.28),
    0 2px 4px rgba(37, 99, 235, 0.18);
  transition:
    transform 0.32s cubic-bezier(0.33, 1, 0.32, 1),
    box-shadow 0.32s cubic-bezier(0.33, 1, 0.32, 1),
    filter 0.28s ease,
    background 0.28s ease;
}

.ms-btn:hover:not(:disabled):not(.ms-btn-secondary):not(.ms-btn-danger) {
  filter: brightness(1.03);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 -1px 0 rgba(15, 23, 42, 0.1) inset,
    0 10px 20px rgba(37, 99, 235, 0.3),
    0 3px 6px rgba(37, 99, 235, 0.18);
  transform: translateY(-0.5px);
}

.ms-btn:active:not(:disabled):not(.ms-btn-secondary):not(.ms-btn-danger),
.ms-btn:focus:not(:disabled):not(.ms-btn-secondary):not(.ms-btn-danger) {
  outline: none;
}

.ms-btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; transform: none; }
.ms-btn-secondary {
  background: transparent;
  color: var(--ms-ink);
  border: 1px solid var(--ms-line);
  box-shadow: none;
  filter: none;
}
.ms-btn-secondary:hover:not(:disabled) {
  filter: none;
  transform: none;
  background: #f8fafc;
  box-shadow: none;
}
.ms-btn-danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 8px 16px rgba(185, 28, 28, 0.25);
}

/* Beat site.css `input:not(...)` (dark --input-bg) with higher specificity */
input.ms-input,
textarea.ms-textarea,
.ms-auth-card input.ms-input {
  width: 100%;
  border: 1px solid #dbe3ee;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  caret-color: #0f172a;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: light;
}

select.ms-select {
  width: 100%;
  border: 1px solid #dbe3ee;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  border-radius: 12px;
  padding: 0.95rem 2.6rem 0.95rem 1.1rem;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: light;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-color: #ffffff !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.95rem center !important;
  background-size: 16px 16px !important;
}

select.ms-select:hover {
  border-color: #cbd5e1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

select.ms-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

select.ms-select option {
  color: #0f172a;
  background: #fff;
}

input.ms-input::placeholder,
textarea.ms-textarea::placeholder,
.ms-auth-card input.ms-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8;
  opacity: 1;
}

input.ms-input:hover,
textarea.ms-textarea:hover {
  border-color: #cbd5e1;
}

input.ms-input:focus,
textarea.ms-textarea:focus,
.ms-auth-card input.ms-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Chrome autofill stays light */
input.ms-input:-webkit-autofill,
input.ms-input:-webkit-autofill:hover,
input.ms-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  caret-color: #0f172a;
  box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 9999s ease-out;
}

.ms-textarea { min-height: 120px; font-family: inherit; font-size: 1rem; }
.ms-label { display: block; font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--ms-muted); font-weight: 500; }
.ms-field { margin-bottom: 1.1rem; }
.ms-error { color: var(--ms-danger); font-size: 0.9rem; margin-top: 0.5rem; }

/* Top error toast banner */
.ms-toast-host {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 1rem 0;
}

.ms-toast {
  pointer-events: auto;
  width: min(640px, calc(100vw - 2rem));
  opacity: 0;
  transform: translateY(-120%);
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.ms-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.ms-toast.is-out {
  opacity: 0;
  transform: translateY(-110%);
  transition:
    opacity 0.28s ease-in,
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 0.85rem 0.9rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #fecaca;
  box-shadow:
    0 18px 40px -16px rgba(185, 28, 28, 0.35),
    0 8px 20px rgba(15, 23, 42, 0.1);
  color: #7f1d1d;
}

.ms-toast--error .ms-toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  color: #dc2626;
}

.ms-toast--error .ms-toast-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.ms-toast--success .ms-toast-inner {
  border-color: #bbf7d0;
  box-shadow:
    0 18px 40px -16px rgba(22, 101, 52, 0.25),
    0 8px 20px rgba(15, 23, 42, 0.1);
  color: #14532d;
}

.ms-toast--success .ms-toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  color: #16a34a;
}

.ms-toast--success .ms-toast-msg {
  color: #14532d;
}

.ms-toast--success .ms-toast-close {
  color: #15803d;
}

.ms-toast--success .ms-toast-close:hover {
  background: #f0fdf4;
  color: #166534;
}

.ms-toast--info .ms-toast-inner {
  border-color: #bfdbfe;
  box-shadow:
    0 18px 40px -16px rgba(29, 78, 216, 0.2),
    0 8px 20px rgba(15, 23, 42, 0.1);
  color: #1e3a8a;
}

.ms-toast--info .ms-toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  color: #2563eb;
}

.ms-toast--info .ms-toast-msg {
  color: #1e3a8a;
}

.ms-toast--info .ms-toast-close {
  color: #1d4ed8;
}

.ms-toast--info .ms-toast-close:hover {
  background: #eff6ff;
  color: #1e40af;
}

.ms-toast-msg {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #7f1d1d;
}

.ms-toast-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -0.15rem -0.15rem 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b91c1c;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-toast-close:hover {
  background: #fef2f2;
  color: #991b1b;
}

@media (prefers-reduced-motion: reduce) {
  .ms-toast {
    transition: opacity 0.12s linear;
    transform: none;
  }
  .ms-toast.is-out {
    transform: none;
  }
}
.ms-muted { color: var(--ms-muted); }

.ms-input-affix {
  position: relative;
  display: flex;
  align-items: stretch;
}

.ms-input-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.ms-input--prefixed {
  padding-left: 1.7rem !important;
}

.ms-set-photo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.ms-set-photo-frame {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.ms-set-photo-frame.is-busy {
  pointer-events: none;
}

.ms-set-photo-frame.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  z-index: 3;
}

.ms-set-photo-frame.is-busy::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2.5px solid rgba(100, 116, 139, 0.25);
  border-top-color: #3b82f6;
  animation: ms-avatar-spin 0.7s linear infinite;
}

.ms-set-photo-frame.is-avatar-ready::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2.5px solid rgba(59, 130, 246, 0.7);
  border-top-color: #2563eb;
  pointer-events: none;
  animation: ms-avatar-loader-out 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ms-set-photo-frame.is-avatar-ready .ms-set-photo-img {
  animation: ms-avatar-photo-in 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ms-set-photo-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  border: 2px solid #e2e8f0;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.ms-set-photo-preview:hover {
  border-color: #93c5fd;
}

.ms-set-photo-preview:focus-within {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.ms-set-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-set-photo-initials {
  color: #fff;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.ms-set-photo-reset {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ms-set-photo-reset svg {
  width: 13px;
  height: 13px;
}

.ms-set-photo-reset:hover {
  background: #fef2f2;
  color: #b91c1c;
  transform: scale(1.05);
}

.ms-set-photo-reset:focus-visible {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

/* Settings page ΓÇö website-style stack */
#page-body.ms-settings-page {
  --ms-channel-w: 980px;
}

.ms-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}

.ms-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0.9rem;
  align-items: start;
}

.ms-settings-card {
  margin: 0;
  padding: 1.25rem 1.35rem 1.35rem;
  height: 100%;
  box-sizing: border-box;
}

.ms-settings-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 -1.35rem 1rem;
  padding: 0 1.35rem 0.85rem;
  border-bottom: 1px solid var(--ms-line);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-settings-card-title svg {
  width: 18px;
  height: 18px;
  color: #64748b;
  flex-shrink: 0;
}

.ms-settings-hint {
  margin: 0 0 0.95rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ms-settings-install {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ms-settings-install-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--ms-line);
  border-radius: 14px;
  background: #f8fafc;
}

.ms-settings-install-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  flex-shrink: 0;
}

.ms-settings-install-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ms-settings-install-copy strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-settings-install-copy span {
  font-size: 0.85rem;
  line-height: 1.35;
}

.ms-settings-install-steps {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ms-settings-install-steps em {
  font-style: normal;
  font-weight: 650;
  color: #0f172a;
}

.ms-settings-install-steps .ios-install-banner-share {
  display: inline-flex;
  vertical-align: -3px;
  margin: 0 1px;
}

.ms-settings-install-steps .ios-install-banner-share svg {
  width: 14px;
  height: 14px;
  color: #2563eb;
}

.ms-settings-install-done {
  margin-top: 0.15rem;
}

.ms-settings-install-done .ms-settings-status {
  margin: 0;
  text-align: left;
}

.ms-settings-profile-layout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 1.35rem 1.5rem;
  margin-top: 0.15rem;
}

.ms-settings-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.ms-settings-photo-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: center;
  max-width: 7.5rem;
}

.ms-settings-profile-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ms-settings-pref {
  margin: 1.2rem 0 0;
}

.ms-settings-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.15rem 0 0.65rem;
}

.ms-settings-pref-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ms-settings-pref-copy strong {
  font-size: 0.95rem;
  font-weight: 650;
  color: #0f172a;
}

.ms-settings-pref-copy .ms-muted {
  font-size: 0.86rem;
  line-height: 1.35;
}

.ms-settings-notif-hint {
  margin: 0;
}

.ms-settings-actions {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

#set-pw-save {
  min-height: 3.15rem;
  padding: 1rem 1.75rem;
  font-size: 1.12rem;
}

#set-save {
  min-height: 3.15rem;
  padding: 1rem 1.75rem;
  font-size: 1.12rem;
}

.ms-settings-status {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

.ms-settings-status.is-ok {
  color: #047857;
}

.ms-settings-mvp {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ms-settings-card-title .ms-settings-mvp-badge {
  margin-left: auto;
}

.ms-settings-mvp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.ms-settings-mvp-head strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.ms-settings-mvp-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ms-mvp-card .ms-settings-card-title {
  margin-bottom: 0.55rem;
  padding-bottom: 0.7rem;
}

.ms-payout-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ms-payout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fff;
}

.ms-payout-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.ms-payout-item-icon,
.ms-payout-item-fallback {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
}

.ms-payout-item-fallback {
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.9rem;
}

.ms-payout-item-copy {
  min-width: 0;
}

.ms-payout-item-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.ms-payout-item-handle {
  margin-top: 0.12rem;
  font-size: 0.84rem;
  color: #64748b;
  word-break: break-word;
}

.ms-payout-default-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ms-payout-remove {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ms-payout-remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.ms-payout-add-panel {
  margin: 0.35rem 0 0.85rem;
  padding: 0.95rem;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f8fafc;
}

.ms-payout-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.55rem;
  margin: 0.55rem 0 0.85rem;
}

.ms-payout-method-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.45rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ms-payout-method-btn:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.ms-payout-method-btn[aria-pressed="true"] {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ms-payout-method-icon,
.ms-payout-method-fallback {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
}

.ms-payout-method-fallback {
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.82rem;
}

.ms-payout-method-label {
  font-size: 0.72rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
  color: #475569;
}

.ms-payout-input-panel .ms-field {
  margin-bottom: 0.35rem;
}

.ms-payout-add-actions {
  justify-content: flex-start;
  margin-top: 0.85rem;
}

.ms-payout-toolbar {
  align-items: center;
  justify-content: space-between;
}

.ms-payout-toolbar .ms-dash-link {
  font-size: 0.86rem;
}

.ms-settings-card--danger .ms-btn-danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.ms-settings-card--danger .ms-btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  filter: none;
  transform: none;
}

@media (max-width: 860px) {
  #page-body.ms-settings-page {
    --ms-channel-w: 560px;
  }

  .ms-settings-stack {
    max-width: 520px;
  }

  .ms-settings-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ms-settings-profile-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1rem;
  }

  .ms-settings-profile-details {
    width: 100%;
    text-align: left;
  }

  .ms-settings-photo-hint {
    text-align: center;
  }
}

/* Auth */
.ms-auth-file-warning {
  width: min(400px, calc(100vw - 1.5rem));
  margin: 0 auto 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ms-auth-file-warning a {
  color: #b91c1c;
  font-weight: 600;
}

.ms-auth-card {
  width: min(400px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.35rem 1.25rem 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.ms-auth-home-wrap {
  margin: 0.85rem 0 0;
  text-align: center;
}

.ms-auth-home {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.ms-auth-home:hover {
  color: #64748b;
}

.ms-auth-brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.ms-auth-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.ms-auth-brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  background: #f1f5f9;
  padding: 0.2rem;
  border-radius: 10px;
  position: relative;
  isolation: isolate;
}

.ms-auth-tab {
  border: none;
  background: transparent;
  padding: 0.5rem 0.4rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  position: relative;
  z-index: 1;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-auth-tab.is-active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ms-auth-forgot-wrap,
.ms-auth-back-wrap {
  margin: -0.35rem 0 0.85rem;
  text-align: right;
}

.ms-auth-autosave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0.15rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ms-auth-autosave-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ms-auth-autosave-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.ms-auth-autosave-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
}

.ms-auth-back-wrap {
  margin: 0.85rem 0 0;
  text-align: center;
}

.ms-auth-forgot {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3b82f6;
  cursor: pointer;
}

.ms-auth-forgot:hover {
  text-decoration: underline;
}

.ms-auth-tabs.seg-switch.is-ready > .ms-auth-tab.is-active {
  background: transparent;
  box-shadow: none;
}

.ms-auth-card .ms-field {
  margin-bottom: 0.7rem;
}

.ms-auth-pw-shell {
  position: relative;
  display: block;
}

.ms-auth-pw-shell .ms-input {
  width: 100%;
  padding-right: 2.85rem;
}

.ms-auth-pw-reveal {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 2.15rem;
  height: 2.15rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.ms-auth-pw-reveal:hover,
.ms-auth-pw-reveal:focus-visible {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.ms-auth-pw-reveal.is-holding {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}

.ms-auth-pw-reveal-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.ms-auth-pw-reveal-icon[hidden] {
  display: none !important;
}

.ms-auth-card .ms-label {
  margin-bottom: 0.28rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.ms-auth-card .ms-btn {
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
}

/* Password strength meter */
.ms-pw-meter {
  margin-top: 0.55rem;
}

.ms-pw-track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ms-pw-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #ef4444;
  transition:
    width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.35s ease;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.ms-pw-meter[data-level="fair"] .ms-pw-fill {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.ms-pw-meter[data-level="good"] .ms-pw-fill {
  background: #0d9488;
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.28);
}

.ms-pw-meter[data-level="strong"] .ms-pw-fill {
  background: linear-gradient(90deg, #0f766e, #10b981);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  animation: ms-pw-pulse 1.4s ease-in-out infinite;
}

@keyframes ms-pw-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.ms-pw-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  gap: 0.5rem;
}

.ms-pw-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.ms-pw-meter[data-level="weak"] .ms-pw-label { color: #dc2626; }
.ms-pw-meter[data-level="fair"] .ms-pw-label { color: #d97706; }
.ms-pw-meter[data-level="good"] .ms-pw-label { color: #0f766e; }
.ms-pw-meter[data-level="strong"] .ms-pw-label { color: #059669; }

.ms-pw-rules {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.ms-pw-rules li {
  font-size: 0.72rem;
  color: #94a3b8;
  padding-left: 1rem;
  position: relative;
}

.ms-pw-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ms-pw-rules li.is-met {
  color: #0f766e;
}

.ms-pw-rules li.is-met::before {
  background: #10b981;
  transform: scale(1.15);
}

.ms-pw-hint {
  margin: 0.4rem 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .ms-pw-rules {
    display: none;
  }

  .ms-pw-hint {
    font-size: 0.68rem;
  }
}

@media (max-width: 480px) {
  body[data-page="login"],
  body[data-page="login"] {
    padding: 0.65rem;
    align-items: stretch;
    background:
      radial-gradient(700px 360px at 0% 0%, #dbeafe 0%, transparent 55%),
      radial-gradient(600px 320px at 100% 0%, #e0e7ff 0%, transparent 50%),
      #f8fafc;
  }

  .ms-auth-card {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 1rem 0.95rem 0.95rem;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  }

  .ms-auth-brand {
    margin-bottom: 0.75rem;
  }

  .ms-auth-brand img {
    width: 32px;
    height: 32px;
  }

  .ms-auth-brand strong {
    font-size: 1rem;
  }

  .ms-auth-brand .ms-muted {
    font-size: 0.78rem !important;
  }

  .ms-auth-tabs {
    margin-bottom: 0.7rem;
  }

  .ms-auth-tab {
    padding: 0.45rem 0.35rem;
    font-size: 0.88rem;
  }

  .ms-auth-card .ms-field {
    margin-bottom: 0.55rem;
  }

  input.ms-input,
  .ms-auth-card input.ms-input {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* avoids iOS zoom */
  }

  .ms-auth-card .ms-btn {
    padding: 0.7rem 1rem;
  }
}

/* Business Finder (search-first layout) */
.ms-lf-page {
  padding-top: 0.5rem;
}

.ms-lf-dev-notice {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9000;
  max-width: min(320px, calc(100vw - 2rem));
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--ms-line, #e2e8f0);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.ms-lf-dev-notice:focus-visible {
  outline: 2px solid var(--ms-accent, #2563eb);
  outline-offset: 2px;
}

.ms-lf-dev-notice.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .ms-lf-dev-notice {
    right: 1rem;
    bottom: 5rem;
  }
}

.ms-lf-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.ms-lf-crumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.ms-lf-crumb a {
  color: #64748b;
  text-decoration: none;
}

.ms-lf-crumb a:hover { color: var(--ms-accent); }

.ms-lf-top h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.ms-lf-top-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.ms-lf-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--ms-line);
  background: #fff;
  color: #475569;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ms-lf-ghost svg {
  width: 15px;
  height: 15px;
  color: #64748b;
}

.ms-lf-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ms-line);
  background: #fff;
  border-radius: 10px;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ms-lf-icon svg { width: 17px; height: 17px; }

.ms-lf-hero {
  text-align: center;
  margin: 0.5rem auto 1.35rem;
  max-width: 640px;
}

.ms-lf-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.ms-lf-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.ms-lf-hero h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #0f172a;
}

.ms-lf-grad {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 55%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ms-lf-hero p {
  margin: 0;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.5;
}

.ms-lf-search {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.85rem 0.85rem;
  align-items: end;
  background: #fff;
  border: 1px solid var(--ms-line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Keep type/location autocomplete above Popular tags (sibling below the form). */
.ms-lf-search:has(.ms-lf-suggest-wrap[aria-expanded="true"]) {
  z-index: 120;
}

.ms-lf-field:has(.ms-lf-suggest-wrap[aria-expanded="true"]) {
  z-index: 121;
}

.ms-lf-filters-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ms-lf-area-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.ms-lf-area-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ms-lf-area-toggle-track {
  display: block;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-lf-area-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-lf-area-toggle input:checked + .ms-lf-area-toggle-track {
  background: #2563eb;
}

.ms-lf-area-toggle input:checked + .ms-lf-area-toggle-track::after {
  transform: translateX(14px);
}

.ms-lf-area-toggle input:focus-visible + .ms-lf-area-toggle-track {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.ms-lf-area-toggle-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
  letter-spacing: -0.01em;
}

.ms-lf-area-toggle input:checked ~ .ms-lf-area-toggle-label {
  color: #2563eb;
}

.ms-lf-input.is-area-locked {
  background: #f8fafc;
}

.ms-lf-input.is-area-locked input {
  color: #334155;
  cursor: default;
}

.ms-lf-pro-distance {
  font-weight: 600;
  color: #2563eb;
}

.ms-lf-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.ms-lf-field {
  position: relative;
  min-width: 0;
}

.ms-lf-suggest-wrap {
  position: relative;
  z-index: 1;
}

.ms-lf-suggest-wrap[aria-expanded="true"] {
  z-index: 122;
}

.ms-lf-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
}

.ms-lf-input:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}

.ms-lf-input > svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}

.ms-lf-input input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
  min-width: 0;
  color: var(--ms-ink);
}

.ms-lf-clear {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-lf-clear[hidden] {
  display: none !important;
}

.ms-lf-clear:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.ms-lf-clear:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.ms-lf-clear svg {
  width: 14px;
  height: 14px;
  color: inherit;
}

.ms-lf-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 130;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: min(260px, 36vh);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  isolation: isolate;
}

.ms-lf-suggest[hidden] {
  display: none !important;
}

.ms-lf-suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.ms-lf-suggest-item:hover,
.ms-lf-suggest-item.is-active {
  background: #eff6ff;
}

.ms-lf-suggest-label {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.ms-lf-suggest-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.ms-lf-find.is-busy {
  opacity: 0.88;
  cursor: wait;
}

.ms-lf-find {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 1rem 1.4rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 45%, #4f46e5 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 12px 24px rgba(59, 130, 246, 0.32),
    0 3px 6px rgba(79, 70, 229, 0.18);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    filter 0.18s ease;
}

.ms-lf-find svg {
  width: 16px;
  height: 16px;
}

.ms-lf-find:hover {
  filter: brightness(1.05) saturate(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.36) inset,
    0 14px 28px rgba(59, 130, 246, 0.38),
    0 4px 10px rgba(79, 70, 229, 0.22);
}

.ms-lf-filters-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
  margin: 0.15rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}

.ms-lf-filters-row .ms-lf-list-count {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ms-lf-website-filter,
.ms-lf-list-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.85rem;
  margin: 0;
  padding: 0;
  border: none;
}

.ms-lf-website-filter-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  flex-shrink: 0;
}

.ms-lf-website-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ms-lf-website-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lf-website-btn:hover {
  color: #334155;
}

.ms-lf-website-btn.is-active,
.ms-lf-website-btn.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

/* Sliding pill ΓÇö segment-switch.js */
.ms-lf-website-seg.seg-switch {
  overflow: hidden;
}

.seg-switch[data-seg-tone="soft"] > .seg-switch-indicator {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.seg-switch > .ms-lf-website-btn {
  position: relative;
  z-index: 1;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.seg-switch > .ms-lf-website-btn:hover,
.seg-switch > .ms-lf-website-btn:active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.seg-switch.is-ready > .ms-lf-website-btn.is-active,
.seg-switch.is-ready > .ms-lf-website-btn.active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #2563eb;
}

.ms-lead-card-actions {
  display: none;
}

.ms-lf-more-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 0.25rem;
}

.ms-lead-list.is-loading {
  pointer-events: none;
}

.ms-lead-card.ms-lf-skeleton {
  position: relative;
  overflow: hidden;
  border-color: #e8edf3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  animation: ms-lf-skel-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--ms-lf-skel-delay, 0ms);
}

.ms-lead-card.ms-lf-skeleton:hover {
  transform: none;
  border-color: #e8edf3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ms-lf-skel-avatar,
.ms-lf-skel-circle,
.ms-lf-skel-line,
.ms-lf-skel-icon,
.ms-lf-skel-slide {
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 90%);
  background-size: 220% 100%;
  animation: ms-lf-skel-shimmer 1.15s ease-in-out infinite;
}

.ms-lf-skel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  flex-shrink: 0;
}

.ms-lf-skel-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.ms-lf-skel-line {
  display: block;
  height: 0.82rem;
  border-radius: 999px;
}

.ms-lf-skel-line--title {
  width: min(72%, 11rem);
  height: 1rem;
  margin-bottom: 0.45rem;
}

.ms-lf-skel-line--sub {
  width: min(48%, 7rem);
  height: 0.72rem;
}

.ms-lf-skel-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ms-lf-skel-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.ms-lf-skel-row .ms-lf-skel-line {
  flex: 1;
  min-width: 0;
  height: 0.72rem;
}

.ms-lf-skel-slide {
  width: 100%;
  height: 2.65rem;
  border-radius: 12px;
}

.ms-lf-skel-loader {
  display: grid;
  place-items: center;
  margin-top: 0.55rem;
}

.ms-lf-skeleton .ms-lb-dots-loader span {
  background: #93c5fd;
}

@keyframes ms-lf-skel-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes ms-lf-skel-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-lead-card.ms-lf-skeleton {
    animation: none;
  }

  .ms-lf-skel-avatar,
  .ms-lf-skel-circle,
  .ms-lf-skel-line,
  .ms-lf-skel-icon,
  .ms-lf-skel-slide {
    animation: none;
    background: #eef2f7;
  }
}

.ms-lead-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.ms-lf-reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

.ms-lf-reveal.is-revealed {
  opacity: 1;
  transform: none;
  animation: none;
}

.ms-lf-reveal.is-visible:not(.is-revealed) {
  animation: none;
}

#lf-results.ms-panel-anim,
#lf-results.ms-panel-anim.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}

/* —— Pro lead card (ported from website lf-pro, Studio styling) —— */
.ms-lead-card.ms-lf-pro {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border-radius: 16px;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
  contain: layout style;
}

.ms-lead-card.ms-lf-pro.is-saved {
  border-left: 0;
  box-shadow:
    inset 3px 0 0 #e11d48,
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.ms-lf-pro-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.1rem 0.95rem;
  border-bottom: 1px solid #eef2f7;
  position: relative;
  z-index: 1;
}

.ms-lf-pro-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.ms-lf-pro-avatar {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, var(--lf-avatar-a, #0f766e), var(--lf-avatar-b, #14b8a6));
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.ms-lf-pro-titles {
  min-width: 0;
}

.ms-lf-pro-name {
  margin: 0 0 0.2rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.28;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-lf-pro-category {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ms-lf-pro-hot {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.ms-lf-pro-head-actions {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.ms-lf-pro-save {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.ms-lf-pro-save svg {
  width: 18px;
  height: 18px;
}

.ms-lf-pro-save:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ms-lf-pro-save.is-on {
  color: #e11d48;
}

.ms-lf-pro-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.55rem 0.55rem 0.7rem;
  align-items: stretch;
  flex: 1;
}

.ms-lf-pro-details-main,
.ms-lf-pro-details-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ms-lf-pro-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  text-decoration: none;
  color: inherit;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.ms-lf-pro-row--pair {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.7rem;
}

.ms-lf-pro-row-pair-body {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.ms-lf-pro-row--pair .ms-lf-pro-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.ms-lf-pro-row--pair .ms-lf-pro-row-aside {
  flex: 0 0 auto;
  min-width: max-content;
  margin-left: auto;
  text-align: right;
}

.ms-lf-pro-row-main,
.ms-lf-pro-row-aside {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #334155;
  text-decoration: none;
}

.ms-lf-pro-row-main {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-lf-pro-row-aside {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.ms-lf-pro-row-main.is-empty,
.ms-lf-pro-row-aside.is-empty {
  color: #94a3b8;
  font-style: italic;
  font-weight: 450;
}

.ms-lf-pro-row-main.is-empty .ms-lf-pro-no-site,
.ms-lf-pro-row-main .ms-lf-pro-no-site {
  color: #dc2626;
  font-style: normal;
  font-weight: 600;
}

.ms-lf-pro-row-main .ms-lf-pro-site-check {
  color: #64748b;
  font-style: normal;
  font-weight: 600;
}

.ms-lf-pro-row-main.is-link,
.ms-lf-pro-row-aside.is-link {
  color: #2563eb;
  font-weight: 550;
}

.ms-lf-pro-row-main.is-link:hover,
.ms-lf-pro-row-aside.is-link:hover {
  text-decoration: underline;
}

.ms-lf-pro-row-aside.is-open {
  color: #16a34a;
  font-weight: 650;
  font-style: normal;
}

.ms-lf-pro-row-aside.is-closed {
  color: #dc2626;
  font-weight: 650;
  font-style: normal;
}

.ms-lf-pro-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  color: #94a3b8;
}

.ms-lf-pro-ico {
  width: 16px;
  height: 16px;
  display: block;
}

.ms-lf-pro-row-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-lf-pro-row.is-empty .ms-lf-pro-row-text {
  color: #94a3b8;
  font-style: italic;
  font-weight: 450;
}

.ms-lf-pro-row.is-empty .ms-lf-pro-no-site {
  color: #dc2626;
  font-style: normal;
  font-weight: 600;
}

.ms-lf-pro-row.is-link .ms-lf-pro-row-text {
  color: #2563eb;
  font-weight: 550;
}

.ms-lf-pro-row.is-link:hover .ms-lf-pro-row-text {
  text-decoration: underline;
}

.ms-lf-pro-row.is-open .ms-lf-pro-row-text {
  color: #16a34a;
  font-weight: 650;
}

.ms-lf-pro-row.is-closed .ms-lf-pro-row-text {
  color: #dc2626;
  font-weight: 650;
}

.ms-lf-pro-foot {
  padding: 0.95rem 1.1rem 1.1rem;
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
  margin-top: auto;
  border-radius: 0 0 16px 16px;
  position: relative;
  z-index: 1;
}

.ms-lf-slide {
  --ms-lf-slide-x: 0px;
  --ms-lf-slide-fill: calc(var(--ms-lf-slide-pad) + 44px);
  --ms-lf-slide-pad: 4px;
  --ms-lf-slide-radius: 12px;
  width: 100%;
  user-select: none;
  touch-action: none;
  -webkit-user-select: none;
}

.ms-lf-slide-track {
  position: relative;
  display: block;
  min-height: 52px;
  padding: var(--ms-lf-slide-pad);
  border-radius: var(--ms-lf-slide-radius);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 10px 22px rgba(37, 99, 235, 0.28);
  box-sizing: border-box;
  isolation: isolate;
}

.ms-lf-slide-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--ms-lf-slide-fill);
  border-radius: var(--ms-lf-slide-radius) 0 0 var(--ms-lf-slide-radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.ms-lf-slide.is-dragging .ms-lf-slide-fill,
.ms-lf-slide.is-completing .ms-lf-slide-fill,
.ms-lf-slide.is-returning .ms-lf-slide-fill {
  opacity: 1;
}

.ms-lf-slide.is-returning .ms-lf-slide-fill,
.ms-lf-slide.is-completing .ms-lf-slide-fill {
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease;
}

.ms-lf-slide.is-dragging .ms-lf-slide-fill {
  transition: none;
}

.ms-lf-slide-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: calc(var(--ms-lf-slide-pad, 4px) + 44px + 0.65rem);
  padding-right: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  pointer-events: none;
  opacity: 0.96;
  transition: opacity 0.2s ease;
}

.ms-lf-slide.is-dragging .ms-lf-slide-label,
.ms-lf-slide.is-completing .ms-lf-slide-label,
.ms-lf-slide.is-done .ms-lf-slide-label {
  opacity: 0.55;
}

.ms-lf-slide-thumb {
  position: absolute;
  left: var(--ms-lf-slide-pad);
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: #fff;
  color: #2563eb;
  cursor: grab;
  transform: translate3d(var(--ms-lf-slide-x, 0px), -50%, 0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 14px rgba(15, 23, 42, 0.18);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  backface-visibility: hidden;
}

.ms-lf-slide-thumb:hover,
.ms-lf-slide-thumb:focus {
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 14px rgba(15, 23, 42, 0.18);
}

.ms-lf-slide.is-returning .ms-lf-slide-thumb,
.ms-lf-slide.is-completing .ms-lf-slide-thumb {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lf-slide.is-dragging .ms-lf-slide-track,
.ms-lf-slide.is-dragging .ms-lf-slide-thumb {
  cursor: grabbing;
}

.ms-lf-slide.is-dragging .ms-lf-slide-thumb {
  transition: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 20px rgba(15, 23, 42, 0.22);
}

.ms-lf-slide-thumb:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ms-lf-slide-thumb .ms-lf-pro-ico,
.ms-lf-slide-thumb svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.ms-lf-pro-generate {
  width: 100%;
  padding: 0.9rem 1.15rem;
  font-size: 1rem;
  border-radius: 12px;
  gap: 0.5rem;
}

.ms-lf-pro-generate .ms-lf-pro-ico {
  width: 17px;
  height: 17px;
  color: #fff;
}

.ms-lf-popular {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin: 0.95rem 0 1.1rem;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.ms-lf-popular > span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  flex-shrink: 0;
  padding-top: 0;
}

.ms-lf-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.38rem;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0.1rem 0.45rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ms-lf-tags::-webkit-scrollbar {
  height: 6px;
}

.ms-lf-tags::-webkit-scrollbar-track {
  background: transparent;
}

.ms-lf-tags::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.ms-lf-tags button {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ms-lf-tags button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.ms-lf-tags button.is-active {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.ms-lf-list-section {
  margin-top: 0.15rem;
}

.ms-lf-status {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
}

.ms-lf-page .ms-lead-list {
  margin-top: 0.25rem;
}

.ms-lf-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  color: #1e3a5f;
}

.ms-lf-tip-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  color: #3b82f6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ms-lf-tip-ico svg { width: 16px; height: 16px; }

.ms-lf-tip p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.ms-lf-tip-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}

.ms-lf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.ms-lf-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ms-muted);
}

.ms-lf-filter-label .ms-select {
  width: auto;
  min-width: 140px;
}

.ms-lf-results {
  background: #fff;
  border: 1px solid var(--ms-line);
  border-radius: 18px;
  padding: 2.5rem 1.5rem 1.75rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.ms-lf-empty-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(145deg, #60a5fa, #7c3aed);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
}

.ms-lf-results h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.ms-lf-results > p {
  margin: 0 auto 1.35rem;
  max-width: 420px;
  color: var(--ms-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ms-lf-starters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  text-align: left;
}

.ms-lf-starter {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ms-lf-starter:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.ms-lf-starter-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  border: 1px solid #eef2f7;
}

.ms-lf-starter strong {
  display: block;
  font-size: 0.9rem;
}

.ms-lf-starter small {
  display: block;
  color: var(--ms-muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.ms-lf-results-list {
  margin-top: 0.25rem;
}

.ms-lf-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ms-lf-results-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ms-leads-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.ms-leads-toolbar .ms-input { max-width: 360px; }

@media (max-width: 900px) {
  .ms-lf-search {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
  }
  .ms-lf-field,
  .ms-lf-input,
  .ms-lf-find {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .ms-lf-input input {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }
  .ms-lf-starters {
    grid-template-columns: 1fr;
  }
  .ms-lf-find {
    width: 100%;
    white-space: normal;
    padding: 0.9rem 1rem;
    font-size: 0.98rem;
  }
  .ms-lf-filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }
  .ms-lf-filters-meta {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .ms-lf-filters-row .ms-lf-list-count {
    margin-left: 0;
  }
  .ms-lf-website-filter,
  .ms-lf-list-filter {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }
  .ms-lf-website-seg {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    box-sizing: border-box;
  }
  .ms-lf-website-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 0.4rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .ms-lf-popular {
    align-items: center;
    flex-direction: row;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
  }
  .ms-lf-tags {
    width: 100%;
    max-height: none;
  }
  .ms-lf-tags button {
    max-width: none;
  }
}
.ms-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--ms-bg);
  color: var(--ms-muted);
  border: 1px solid var(--ms-line);
}
.ms-badge-ok { background: var(--ms-accent-soft); color: var(--ms-accent); border-color: transparent; }
.ms-badge-warn { background: #fff7ed; color: #c2410c; border-color: transparent; }

/* Projects */
.ms-projects-page .ms-page-head {
  margin-bottom: 1.25rem;
}

.ms-projects-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.35rem;
}

.ms-projects-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ms-projects-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ms-projects-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.ms-projects-list {
  display: grid;
  gap: 0.75rem;
}

.ms-projects-loading {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.92rem;
}

.ms-project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.05rem;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-project-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.ms-project-card-main {
  min-width: 0;
  flex: 1 1 220px;
}

.ms-project-card-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.ms-project-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: #0f172a;
  line-height: 1.25;
}

.ms-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

.ms-project-meta-item--warn {
  color: #c2410c;
}

.ms-project-live {
  color: var(--ms-accent);
  font-weight: 600;
  text-decoration: none;
}

.ms-project-live:hover {
  text-decoration: underline;
}

.ms-project-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ms-project-actions .ms-btn {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

.ms-projects-empty {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}

.ms-projects-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: #0f172a;
}

.ms-projects-empty-desc {
  margin: 0 0 1.1rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.5;
}

.ms-projects-empty-actions {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .ms-project-card {
    align-items: stretch;
  }
  .ms-project-actions {
    width: 100%;
  }
  .ms-project-actions .ms-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Landing Page Builder / Editor - setup channel page + fullscreen workspace */
body[data-page="builder"],
body[data-page="editor"] {
  background: var(--ms-bg, #f8fafc);
  color: #1e293b;
}

body[data-page="builder"].ms-lb-workspace,
body[data-page="editor"].ms-lb-workspace {
  background: #f1f5f9;
  overflow: hidden;
  height: 100dvh;
  width: 100%;
}

@media (max-width: 900px) {
  body[data-page="builder"].ms-lb-workspace,
  body[data-page="editor"].ms-lb-workspace {
    --ms-sidebar-w: 0px;
  }
}

@media (min-width: 901px) {
  body[data-page="builder"].ms-lb-workspace .ms-sidebar {
    display: flex !important;
  }

  body[data-page="builder"].ms-lb-workspace .ms-sidebar-resizer {
    display: block !important;
  }

  body[data-page="builder"].ms-lb-workspace .ms-menu-toggle {
    display: none !important;
  }

  body[data-page="builder"].ms-lb-workspace #builder-workspace,
  body[data-page="builder"].ms-lb-workspace .ms-builder-page {
    margin-left: var(--ms-sidebar-w) !important;
    width: calc(100% - var(--ms-sidebar-w)) !important;
  }
}

/* Editor - full-width workspace; no studio sidebar */
body[data-page="editor"].ms-lb-workspace {
  --ms-sidebar-w: 0px;
}

body[data-page="editor"].ms-lb-workspace #shell,
body[data-page="editor"].ms-lb-workspace .ms-sidebar,
body[data-page="editor"].ms-lb-workspace .ms-sidebar-resizer,
body[data-page="editor"].ms-lb-workspace .ms-menu-toggle,
body[data-page="editor"] .ms-hard-refresh {
  display: none !important;
}

body[data-page="editor"].ms-lb-workspace #builder-workspace,
body[data-page="editor"].ms-lb-workspace .ms-builder-page {
  margin-left: 0 !important;
  width: 100% !important;
}

body[data-page="editor"] .ms-lb-shell-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  body[data-page="builder"].ms-lb-workspace .ms-menu-toggle {
    display: grid !important;
    z-index: 120;
  }
}

body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell,
body[data-page="editor"].ms-lb-workspace {
  --ms-sidebar-w: 0px;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell .ms-sidebar,
body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell .ms-sidebar-resizer,
body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell .ms-menu-toggle {
  display: none !important;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell #builder-workspace,
body[data-page="builder"].ms-lb-workspace.ms-lb-hide-shell .ms-builder-page {
  margin-left: 0 !important;
  width: 100% !important;
}

/* Hard refresh stays available in Builder on every device. */
body[data-page="builder"] .ms-hard-refresh {
  display: grid !important;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-show-shell,
body[data-page="editor"].ms-lb-workspace.ms-lb-show-shell {
  --ms-sidebar-w: 268px;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-show-shell #shell,
body[data-page="editor"].ms-lb-workspace.ms-lb-show-shell #shell {
  display: block !important;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-show-shell .ms-sidebar,
body[data-page="editor"].ms-lb-workspace.ms-lb-show-shell .ms-sidebar {
  display: flex !important;
}

body[data-page="builder"].ms-lb-workspace.ms-lb-show-shell .ms-sidebar-resizer,
body[data-page="editor"].ms-lb-workspace.ms-lb-show-shell .ms-sidebar-resizer {
  display: block !important;
}

.ms-builder-setup-page {
  --ms-channel-w: 960px;
  width: min(var(--ms-channel-w), calc(100% - var(--ms-sidebar-w) - 2rem));
  max-width: var(--ms-channel-w);
  margin-left: calc(
    var(--ms-sidebar-w) + max(0px, (100% - var(--ms-sidebar-w) - min(var(--ms-channel-w), calc(100% - var(--ms-sidebar-w) - 2rem))) / 2)
  );
  margin-right: auto;
  padding: 2rem 1.35rem 4rem;
  box-sizing: border-box;
  font-size: 0.94rem;
  zoom: var(--ms-content-scale);
}

.ms-bs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 252px);
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  align-items: stretch;
}

.ms-bs-hero {
  grid-column: 1 / -1;
}

#builder-setup-card {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ms-bs-status {
  grid-column: 1;
  grid-row: 3;
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.ms-bs-recent {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  position: static;
  top: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.ms-bs-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.72rem 0.75rem 0.58rem;
  border-bottom: 1px solid #eef2f7;
}

.ms-bs-recent-head h2 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-bs-recent-head .ms-muted {
  margin: 0.12rem 0 0;
  font-size: 0.68rem;
}

.ms-bs-recent-count {
  flex-shrink: 0;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.64rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.ms-bs-recent-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

.ms-bs-recent-card {
  flex-shrink: 0;
  max-width: none;
  width: 100%;
  gap: 0.25rem;
  border-radius: 10px;
}

.ms-bs-recent-card .ms-dash-preview-shot {
  aspect-ratio: 16 / 9;
}

.ms-bs-recent-card .ms-dash-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: nowrap;
  row-gap: 0.1rem;
  padding: 0 0.42rem 0.42rem;
}

.ms-bs-recent-card .ms-dash-preview-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-bs-recent-card .ms-dash-preview-live {
  top: 0.32rem;
  left: 0.32rem;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.12rem 0.38rem 0.12rem 0.3rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #166534;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(34, 197, 94, 0.42);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.ms-bs-recent-card .ms-dash-preview-live::before {
  content: "";
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.ms-bs-recent-card .ms-dash-preview-placeholder {
  width: 2rem;
  height: 2rem;
  font-size: 0.82rem;
}

.ms-bs-recent-when {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
}

.ms-bs-recent-filters {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 1rem);
  max-width: 100%;
  margin: 0 0.5rem 0.55rem;
  padding: 0.2rem;
  gap: 0;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e8edf3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ms-bs-recent-filters .ms-dash-projects-filter {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.36rem 0.4rem;
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #64748b;
  background: transparent;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
}

.ms-bs-recent-filters .ms-dash-projects-filter:hover {
  color: #334155;
}

.ms-bs-recent-filters.seg-switch.is-ready > .ms-dash-projects-filter.is-active {
  color: #0f172a;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.ms-bs-recent-filters.seg-switch > .seg-switch-indicator {
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(226, 232, 240, 0.9);
}

.ms-bs-recent-filters.seg-switch.is-ready > .ms-dash-projects-filter.is-active {
  color: #1e40af;
  font-weight: 700;
}

.ms-bs-recent-foot {
  flex-shrink: 0;
  padding: 0.55rem 0.65rem 0.65rem;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 100%);
}

.ms-bs-recent-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.48rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.ms-bs-recent-view-all:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.ms-bs-recent-view-all:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

/* All projects page */
.ms-projects-page {
  max-width: 1120px;
}

.ms-page-crumb {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.ms-page-crumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.ms-page-crumb a:hover {
  text-decoration: underline;
}

.ms-projects-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ms-projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ms-projects-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.ms-projects-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 0.22rem;
  gap: 0;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e8edf3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ms-projects-filters .ms-dash-projects-filter {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #64748b;
  background: transparent;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
}

.ms-projects-filters .ms-dash-projects-filter:hover {
  color: #334155;
}

.ms-projects-filters.seg-switch.is-ready > .ms-dash-projects-filter.is-active {
  color: #1e40af;
  font-weight: 700;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.ms-projects-filters.seg-switch > .seg-switch-indicator {
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(226, 232, 240, 0.9);
}

.ms-projects-page .ms-dash-previews {
  grid-template-columns: repeat(auto-fill, minmax(170px, 200px));
  gap: 0.85rem;
}

.ms-projects-page .ms-dash-preview {
  max-width: 200px;
}

.ms-bs-recent-loading,
.ms-bs-recent-empty {
  margin: 0;
  padding: 0.35rem 0.15rem;
  font-size: 0.82rem;
  text-align: center;
}

.ms-builder-setup-page.is-templates,
.ms-builder-setup-page:has(.ms-bs-card.is-templates) {
  --ms-channel-w: 980px;
}

.ms-bs-hero h1 {
  margin: 0;
}

.ms-bs-hero .ms-muted {
  margin: 0.35rem 0 0;
}

.ms-bs-steps {
  margin-bottom: 1.5rem;
}

.ms-bs-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 0.95rem 1.05rem 0;
  overflow: hidden;
}

#builder-setup-card .ms-lb-onboard-step.is-active,
#builder-setup-card .ms-lb-onboard-step:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
}

.ms-bs-card.is-templates {
  padding-bottom: 0;
}

.ms-bs-paths {
  display: grid;
  gap: 0.55rem;
}

.ms-bs-path {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.68rem 0.72rem 0.72rem;
  background: #fff;
}

.ms-bs-path--google {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #e8f1fc 0%, #f1f6fc 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.ms-bs-path--manual {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #eef1f5 0%, #f4f6f9 100%);
}

.ms-bs-path-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.ms-bs-path-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ms-bs-path-icon svg {
  width: 15px;
  height: 15px;
}

.ms-bs-path-icon--google {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.ms-bs-path-icon--manual {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.ms-bs-path-copy h3 {
  margin: 0 0 0.12rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-bs-path-copy p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #64748b;
}

.ms-bs-path-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #94a3b8;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-bs-path-split::before,
.ms-bs-path-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8edf3;
}

.ms-bs-path-split span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}

.ms-bs-path .ms-lb-onboard-maps,
.ms-bs-path .ms-lb-onboard-fields {
  margin: 0;
}

.ms-bs-path .ms-lb-onboard-input,
.ms-bs-path .ms-lb-onboard-maps-shell {
  background: #fff;
}

.ms-bs-path .ms-lb-onboard-input:hover {
  background: #fff;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-body {
  gap: 0.65rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-label {
  margin-bottom: 0.28rem;
  font-size: 0.64rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-input {
  padding: 0.52rem 0.72rem;
  font-size: 0.84rem;
  border-radius: 9px;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-textarea {
  min-height: 3.6rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-fields,
.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-fields-extra {
  gap: 0.5rem;
}

.ms-builder-setup-page #builder-setup-card .ms-bs-path--manual .ms-lb-onboard-fields-extra {
  margin-top: 0.45rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-maps-shell {
  border-radius: 9px;
  padding: 0.08rem 0.08rem 0.08rem 0.6rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-maps-icon {
  width: 14px;
  height: 14px;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-foot {
  padding: 0.65rem 0 0.75rem;
  gap: 0.55rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-back {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

.ms-builder-setup-page #builder-setup-card .ms-lb-onboard-next {
  padding: 0.58rem 1rem !important;
  font-size: 0.84rem !important;
}

.ms-bs-card .ms-lb-onboard-step {
  display: none;
  flex-direction: column;
  min-height: 0;
}

.ms-bs-card .ms-lb-onboard-step.is-active,
.ms-bs-card .ms-lb-onboard-step:not([hidden]) {
  display: flex;
}

.ms-bs-card .ms-lb-onboard-body {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body[data-page="builder"].ms-lb-workspace #builder-workspace,
body[data-page="builder"].ms-lb-workspace .ms-builder-page,
body[data-page="editor"].ms-lb-workspace #builder-workspace,
body[data-page="editor"].ms-lb-workspace .ms-builder-page {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  padding: 0 !important;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.ms-lb-stage {
  flex: 1;
  position: relative;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(191, 219, 254, 0.45), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 10%, rgba(226, 232, 240, 0.7), transparent 50%),
    #f3f5f8;
}

.ms-lb-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.45rem 0.55rem 0.35rem;
  z-index: 20;
}

.ms-lb-topbar[hidden] {
  display: none !important;
}

.ms-lb-back-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-height: 2.35rem;
  padding: 0.42rem 0.72rem 0.42rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.ms-lb-back-menu svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ms-lb-shell-toggle {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ms-lb-shell-toggle svg {
  width: 17px;
  height: 17px;
}

.ms-lb-shell-toggle:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.ms-lb-shell-toggle:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.ms-lb-back-menu:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.ms-lb-back-menu:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.ms-lb-mode-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ms-lb-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ms-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.ms-lb-back svg {
  width: 16px;
  height: 16px;
  color: #64748b;
}

.ms-lb-mode {
  justify-self: center;
  width: max-content;
  display: inline-flex;
  gap: 0.14rem;
  padding: 0.16rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.ms-lb-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-mode-btn svg {
  width: 14px;
  height: 14px;
}

.ms-lb-mode-btn.is-active {
  background: #fff;
  color: var(--ms-accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ms-lb-mode-btn.is-mvp-locked::after,
.ms-lb-icon-btn.is-mvp-locked::after {
  content: none;
  display: none;
}

.ms-lb-mode-btn.is-mvp-locked {
  color: #94a3b8;
}

.ms-lb-icon-btn.is-mvp-locked {
  color: #94a3b8;
}

.ms-lb-mode.seg-switch.is-ready > .ms-lb-mode-btn.is-active {
  background: transparent;
  box-shadow: none;
}

.ms-lb-viewports {
  justify-self: end;
  display: flex;
  gap: 0.15rem;
  align-items: center;
  justify-content: center;
  padding: 0.22rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  isolation: isolate;
}

.ms-lb-viewports-sep {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.ms-lb-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.ms-lb-icon-btn svg {
  width: 16px;
  height: 16px;
}

.ms-lb-icon-btn:hover,
.ms-lb-icon-btn.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ms-accent);
}

.ms-lb-body {
  --ms-lb-side-w: 340px;
  --ms-lb-tools-max: min(280px, 38vh);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(280px, var(--ms-lb-side-w)) 10px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0 0.5rem 0.5rem;
  align-items: stretch;
}

.ms-lb-body > .ms-lb-chrome-bar {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: grid;
  gap: 0.65rem;
  padding: 0.35rem 0.2rem 0;
  min-width: 0;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-mode-row {
  width: 100%;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-viewports {
  justify-self: stretch;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-evenly;
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-height: 48px;
  padding: 0.35rem 0.3rem;
  gap: 0.15rem;
  border-radius: 14px;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-icon-btn svg {
  width: 18px;
  height: 18px;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-viewports-sep {
  height: 22px;
  margin: 0 0.1rem;
}

.ms-lb-side {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: 0.15rem 0.35rem 0.15rem;
  overflow: hidden;
}

.ms-lb-side-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  padding: 0.55rem 0.2rem 1rem;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

.ms-lb-side-controls > .ms-lb-edit-save,
.ms-lb-side-controls > .ms-lb-widget,
.ms-lb-side-controls > .ms-lb-price,
.ms-lb-side-controls > .ms-lb-publish-actions {
  flex-shrink: 0;
}

.ms-lb-side-controls::-webkit-scrollbar {
  width: 8px;
}

.ms-lb-side-controls::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.ms-lb-side-controls::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.72);
  background-clip: padding-box;
}

.ms-lb-side-controls > .ms-lb-widget,
.ms-lb-side-controls > .ms-lb-price,
.ms-lb-side-controls > .ms-lb-publish-actions {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-mode {
  width: auto;
  min-width: 0;
  justify-content: center;
  padding: 0.22rem;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-back-menu {
  align-self: stretch;
  height: auto;
  min-height: 0;
  padding: 0.4rem 0.6rem 0.4rem 0.48rem;
  border-radius: 13px;
  font-size: 0.78rem;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-mode-btn {
  min-width: 0;
  gap: 0.25rem;
  padding: 0.48rem 0.34rem;
  font-size: 0.79rem;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}

.ms-lb-body > .ms-lb-chrome-bar .ms-lb-mode-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ms-lb-price {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5eaf1;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 26px rgba(15, 23, 42, 0.045);
}

.ms-lb-price-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 0.65rem;
}

.ms-lb-price-title > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 8.5rem;
}

.ms-lb-price-title strong {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ms-lb-price-title > div > span {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
}

.ms-lb-price-rate {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 0.28rem 0.5rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.015em;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

.ms-lb-price-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.ms-lb-price-stat-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.ms-lb-price-eyebrow {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-lb-price-stat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  padding: 0.5rem 0.72rem 0.52rem;
  box-sizing: border-box;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1.5px dashed #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ms-lb-price-stat-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 7px;
  background: #e2e8f0;
  color: #475569;
}

.ms-lb-price-stat-icon svg {
  width: 0.72rem;
  height: 0.72rem;
}

.ms-lb-price-stat--input {
  cursor: text;
}

.ms-lb-price-stat--input:hover {
  border-color: #94a3b8;
  border-style: solid;
  background: #fff;
}

.ms-lb-price-stat--input:focus-within {
  border-style: solid;
  border-color: #3b82f6;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.16),
    inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ms-lb-price-stat--input.is-invalid {
  border-style: solid;
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ms-lb-price-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.08rem;
  min-width: 0;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid #94a3b8;
}

.ms-lb-price-stat--input:hover .ms-lb-price-input-wrap,
.ms-lb-price-stat--input:focus-within .ms-lb-price-input-wrap {
  border-bottom-color: #2563eb;
}

.ms-lb-price-currency {
  color: #64748b;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

.ms-lb-price-input {
  appearance: none;
  width: 5.5ch;
  min-width: 2.5ch;
  max-width: 10ch;
  border: 0;
  outline: none;
  background: transparent;
  color: #0f172a;
  caret-color: #2563eb;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  padding: 0;
  margin: 0;
}

.ms-lb-price-input::placeholder {
  color: #94a3b8;
  font-weight: 700;
}

.ms-lb-price-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
}

.ms-creator-policy-notice {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, #fff7f7 0%, #fff1f2 100%);
  color: #7f1d1d;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ms-creator-policy-notice p {
  margin: 0.45rem 0 0;
}

.ms-creator-policy-notice p:first-child {
  margin-top: 0;
}

.ms-creator-policy-notice strong {
  color: #991b1b;
  font-weight: 750;
}

.ms-creator-policy-notice a {
  color: #b91c1c;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ms-creator-policy-notice--compact {
  font-size: 0.68rem;
  line-height: 1.38;
  padding: 0.62rem 0.68rem;
  border-radius: 10px;
}

.ms-creator-policy-more {
  margin: 0.45rem 0 0;
}

.ms-creator-policy-more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  font-size: inherit;
  font-weight: 650;
  color: #b91c1c;
  text-decoration: underline;
  text-underline-offset: 2px;
  user-select: none;
}

.ms-creator-policy-more summary::-webkit-details-marker {
  display: none;
}

.ms-creator-policy-more summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.ms-creator-policy-more[open] summary::after {
  content: "−";
}

.ms-creator-policy-more[open] summary {
  margin-bottom: 0.35rem;
}

.ms-creator-policy-more p {
  margin: 0;
}

.ms-lb-policy-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.55rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(239, 68, 68, 0.14);
  cursor: pointer;
  font-size: 0.68rem;
  line-height: 1.35;
  font-weight: 600;
  color: #991b1b;
}

.ms-lb-policy-agree input {
  margin: 0.12rem 0 0;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  accent-color: #dc2626;
  cursor: pointer;
}

.ms-creator-policy-card .ms-creator-policy-notice {
  font-size: 0.84rem;
}

.ms-onboard-panel .ms-creator-policy-notice {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 40em;
}

.ms-lb-publish-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ms-lb-publish-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 12px 26px rgba(37, 99, 235, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.ms-lb-publish-btn svg {
  width: 19px;
  height: 19px;
}

.ms-lb-publish-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ms-lb-publish-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.ms-lb-publish-btn.is-live:not(:disabled) {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: ms-lb-publish-live-pulse 2.2s ease-in-out infinite;
}

.ms-lb-publish-btn.is-live:not(:disabled):hover {
  filter: brightness(1.04);
}

.ms-lb-publish-btn.needs-update:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 12px 26px rgba(217, 119, 6, 0.28);
  animation: none;
}

.ms-lb-publish-btn.needs-update:not(:disabled):hover {
  filter: brightness(1.06);
}

.ms-lb-publish-btn.is-loading,
.ms-lb-publish-btn.is-loading:disabled {
  opacity: 1;
  cursor: wait;
  pointer-events: none;
  animation: none;
  transform: none;
  filter: brightness(0.98);
}

.ms-lb-publish-btn.is-loading .ms-lb-publish-icon {
  animation: ms-lb-publish-spin 0.72s linear infinite;
}

@keyframes ms-lb-publish-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ms-lb-publish-live-pulse {
  0%,
  100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.35) inset,
      0 0 0 0 rgba(34, 197, 94, 0.42),
      0 12px 26px rgba(22, 163, 74, 0.28);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.35) inset,
      0 0 0 10px rgba(34, 197, 94, 0),
      0 14px 30px rgba(22, 163, 74, 0.36);
  }
}

.ms-lb-redesign-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.ms-lb-redesign-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}

.ms-lb-redesign-label {
  display: inline-block;
  white-space: nowrap;
}

.ms-lb-redesign-btn:hover:not(:disabled) {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
  transform: translateY(-1px);
}

.ms-lb-redesign-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ms-lb-redesign-btn[hidden] {
  display: none !important;
}

.ms-lb-unpublish-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.92);
  color: #b91c1c;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ms-lb-unpublish-btn svg {
  width: 16px;
  height: 16px;
}

.ms-lb-unpublish-btn:hover:not(:disabled) {
  background: rgba(254, 226, 226, 0.98);
  border-color: rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.ms-lb-unpublish-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ms-lb-delete-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(127, 29, 29, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #991b1b;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.ms-lb-delete-btn svg {
  width: 16px;
  height: 16px;
}

.ms-lb-delete-btn:hover:not(:disabled) {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(185, 28, 28, 0.4);
  color: #7f1d1d;
  transform: translateY(-1px);
}

.ms-lb-delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ms-lb-main {
  grid-column: 3;
  grid-row: 1 / -1;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
}

.ms-lb-live-banner {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(34, 197, 94, 0.14);
  animation: ms-lb-live-banner-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-live-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
}

.ms-lb-live-banner-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #15803d;
  background: rgba(34, 197, 94, 0.16);
}

.ms-lb-live-banner-icon svg {
  width: 18px;
  height: 18px;
}

.ms-lb-live-banner-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ms-lb-live-banner-copy strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #14532d;
}

.ms-lb-live-banner-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #15803d;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-lb-live-banner-link:hover {
  text-decoration: underline;
}

.ms-lb-live-banner-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 128, 61, 0.08);
  color: #166534;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ms-lb-live-banner-close svg {
  width: 15px;
  height: 15px;
}

.ms-lb-live-banner-close:hover {
  background: rgba(21, 128, 61, 0.16);
}

@keyframes ms-lb-live-banner-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ms-lb-offline-banner {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(100, 116, 139, 0.32);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(100, 116, 139, 0.12);
  animation: ms-lb-live-banner-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-offline-banner-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #475569;
  background: rgba(100, 116, 139, 0.14);
}

.ms-lb-offline-banner-icon svg {
  width: 18px;
  height: 18px;
}

.ms-lb-offline-banner .ms-lb-live-banner-copy strong {
  color: #1e293b;
}

.ms-lb-offline-banner-url {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-lb-offline-banner-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.08);
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ms-lb-offline-banner-close svg {
  width: 15px;
  height: 15px;
}

.ms-lb-offline-banner-close:hover {
  background: rgba(71, 85, 105, 0.16);
}

.ms-lb-pane-resizer {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 10px;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  position: relative;
  cursor: col-resize;
  touch-action: none;
  border-radius: 999px;
}

.ms-lb-pane-resizer::before {
  content: "";
  position: absolute;
  inset: 0 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: background 0.16s ease;
}

.ms-lb-pane-resizer:hover::before,
body.ms-lb-pane-resizing .ms-lb-pane-resizer::before {
  background: rgba(59, 130, 246, 0.72);
}

.ms-lb-browser {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(15, 23, 42, 0.07);
  min-height: 0;
  isolation: isolate;
}

.ms-lb-chrome {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ms-lb-chrome-dots {
  display: inline-flex;
  gap: 0.35rem;
  padding-left: 0.15rem;
  pointer-events: none;
}

.ms-lb-chrome-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
}

.ms-lb-chrome-dots i:nth-child(1) { background: #f87171; }
.ms-lb-chrome-dots i:nth-child(2) { background: #fbbf24; }
.ms-lb-chrome-dots i:nth-child(3) { background: #34d399; }

.ms-lb-chrome-url-wrap {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: min(100%, 360px);
  max-width: 100%;
  min-width: 0;
  padding: 0.2rem 0.3rem 0.2rem 0.8rem;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.ms-lb-chrome-url {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.28rem 0;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-lb-chrome-url.is-unpublished {
  font-weight: 500;
  font-style: italic;
  color: #94a3b8;
}

.ms-lb-chrome-copy {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-lb-chrome-copy svg {
  width: 14px;
  height: 14px;
}

.ms-lb-chrome-copy:hover:not(:disabled) {
  background: #eff6ff;
  color: #2563eb;
}

.ms-lb-chrome-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ms-lb-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.55rem;
  color: #64748b;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(420px 280px at 50% 42%, rgba(226, 232, 240, 0.45) 0%, transparent 70%);
}

.ms-lb-empty[hidden] {
  display: none !important;
}

.ms-lb-empty-card {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px rgba(15, 23, 42, 0.06);
}

.ms-lb-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8edf3;
  pointer-events: none;
}

.ms-lb-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  width: min(22rem, calc(100% - 2rem));
}

.ms-lb-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ms-lb-loading-spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes ms-lb-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.ms-lb-loading-copy {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #334155;
  text-align: center;
}

.ms-lb-loading[hidden] {
  display: none !important;
}

.ms-lb-progress {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
}

.ms-lb-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #d5dde8;
  overflow: hidden;
}

.ms-lb-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.28s ease-out;
}

.ms-lb-progress-pct {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  text-align: center;
  letter-spacing: 0.02em;
}

.ms-lb-gen-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8edf3;
  padding: 1.25rem;
}

.ms-lb-gen-error[hidden] {
  display: none !important;
}

.ms-lb-gen-error-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(24rem, 100%);
  text-align: center;
}

.ms-lb-gen-error-copy {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
  .ms-lb-progress-fill {
    transition: none;
  }
}

.ms-lb-empty p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #334155;
}

.ms-lb-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: #2563eb;
  box-shadow: none;
  overflow: hidden;
}

.ms-lb-mark-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.ms-lb-dots-loader {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.ms-lb-dots-loader span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: ms-lb-bounce 1.2s ease-in-out infinite;
}

.ms-lb-dots-loader span:nth-child(2) { animation-delay: 0.15s; }
.ms-lb-dots-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ms-lb-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

body.ms-lb-generating .ms-lb-dots-loader span {
  background: #3b82f6;
}

.ms-preview-frame-wrap {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #e8edf3;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 0;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
  box-sizing: border-box;
}

.ms-preview-frame-wrap.is-vp-resizable {
  padding: 0.65rem 0.5rem;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.ms-preview-frame-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-shrink: 1;
  max-width: 100%;
  margin: 0;
}

.ms-preview-frame-shell.is-resizable {
  flex: 0 0 auto;
  margin: auto;
  transition:
    width 0.54s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.54s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.54s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.42s ease;
}

.ms-preview-frame-shell.is-desktop {
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  max-width: none;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
}

.ms-preview-frame-wrap:not(.is-vp-resizable) .ms-preview-frame-shell {
  width: 100% !important;
  height: 100% !important;
  align-self: stretch;
}

.ms-preview-frame-shell.is-tablet,
.ms-preview-frame-shell.is-phone {
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 18px 40px rgba(15, 23, 42, 0.1);
}

.ms-preview-frame-shell.is-phone {
  border-radius: 20px;
}

.ms-preview-frame-shell .ms-preview-frame {
  width: 100% !important;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  height: 100% !important;
  /* Keep iframe above empty overlays so wheel/touch scroll reach the preview */
  position: relative;
  z-index: 1;
}

/* Resizers only exist in tablet/phone frame mode - hide on desktop fill. */
.ms-preview-vp-resizer {
  display: none;
  position: absolute;
  z-index: 6;
  touch-action: none;
}

.ms-preview-frame-shell.is-resizable .ms-preview-vp-resizer {
  display: block;
}

.ms-preview-vp-resizer.is-left,
.ms-preview-vp-resizer.is-right {
  top: 0;
  bottom: 0;
  width: 14px;
  cursor: ew-resize;
}

.ms-preview-vp-resizer.is-top,
.ms-preview-vp-resizer.is-bottom {
  left: 0;
  right: 0;
  height: 14px;
  cursor: ns-resize;
}

.ms-preview-vp-resizer.is-left {
  left: -7px;
}

.ms-preview-vp-resizer.is-right {
  right: -7px;
}

.ms-preview-vp-resizer.is-top {
  top: -7px;
}

.ms-preview-vp-resizer.is-bottom {
  bottom: -7px;
}

.ms-preview-vp-resizer.is-left::after,
.ms-preview-vp-resizer.is-right::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 44px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(148, 163, 184, 0.45);
  opacity: 0;
  transition:
    opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.24s ease,
    height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-preview-vp-resizer.is-top::after,
.ms-preview-vp-resizer.is-bottom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(148, 163, 184, 0.45);
  opacity: 0;
  transition:
    opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.24s ease,
    height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hint animation only while actively resizable (tablet/phone), never on desktop. */
.ms-preview-frame-shell.is-resizable .ms-preview-vp-resizer.is-left::after,
.ms-preview-frame-shell.is-resizable .ms-preview-vp-resizer.is-right::after {
  animation: ms-vp-resize-hint-y 2.4s ease-in-out infinite;
}

.ms-preview-frame-shell.is-resizable .ms-preview-vp-resizer.is-top::after,
.ms-preview-frame-shell.is-resizable .ms-preview-vp-resizer.is-bottom::after {
  animation: ms-vp-resize-hint-x 2.4s ease-in-out infinite;
}

.ms-preview-frame-shell.is-resizable:hover .ms-preview-vp-resizer::after,
.ms-preview-vp-resizer:hover::after,
.ms-preview-vp-resizer:focus-visible::after,
body.ms-lb-vp-resizing .ms-preview-vp-resizer::after {
  opacity: 1;
  background: rgba(59, 130, 246, 0.85);
}

.ms-preview-vp-resizer.is-left:hover::after,
.ms-preview-vp-resizer.is-right:hover::after,
body.ms-lb-vp-resizing .ms-preview-vp-resizer.is-left::after,
body.ms-lb-vp-resizing .ms-preview-vp-resizer.is-right::after {
  height: 56px;
}

.ms-preview-vp-resizer.is-top:hover::after,
.ms-preview-vp-resizer.is-bottom:hover::after,
body.ms-lb-vp-resizing .ms-preview-vp-resizer.is-top::after,
body.ms-lb-vp-resizing .ms-preview-vp-resizer.is-bottom::after {
  width: 56px;
}

body.ms-lb-vp-resizing .ms-preview-vp-resizer::after {
  animation: none;
}

@keyframes ms-vp-resize-hint-y {
  0%, 100% { transform: translate(-50%, -50%) scaleY(1); opacity: 0.35; }
  50% { transform: translate(-50%, -50%) scaleY(1.14); opacity: 0.75; }
}

@keyframes ms-vp-resize-hint-x {
  0%, 100% { transform: translate(-50%, -50%) scaleX(1); opacity: 0.35; }
  50% { transform: translate(-50%, -50%) scaleX(1.14); opacity: 0.75; }
}

.ms-preview-vp-size {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translate(-50%, -0.35rem) scale(0.96);
  z-index: 7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.ms-preview-vp-size.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.ms-preview-vp-size[hidden] {
  display: none !important;
}

.ms-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
  flex: 1 1 auto;
  flex-shrink: 1;
  touch-action: pan-y;
  overscroll-behavior: contain;
  transition: box-shadow 0.28s ease;
  /* Keep the iframe above empty hosts so wheel/touch reach page content */
  position: relative;
  z-index: 1;
}

body.ms-lb-vp-resizing .ms-preview-frame-shell,
.ms-preview-frame-shell.is-vp-easing.is-dragging {
  transition: none;
}

.ms-preview-frame[hidden] {
  display: none !important;
}

/* Park the preview iframe without display:none - browsers discard
   document.write / srcdoc content when the frame was display:none. */
.ms-preview-frame.is-parked {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Once HTML exists, the frame must fill the shell - parked leftovers or
   flex collapse otherwise leave a blank #e8edf3 panel after Finder generate. */
.ms-preview-frame:not(.is-parked):not(.is-fullscreen) {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Standard design / device viewport widths - shell width is set in JS */
.ms-preview-frame.is-desktop {
  box-shadow: none;
  border-radius: 0;
}

.ms-preview-frame.is-tablet,
.ms-preview-frame.is-phone {
  border-radius: 0;
  box-shadow: none;
}

.ms-preview-frame.is-fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 80;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  height: 100dvh !important;
  min-height: 100% !important;
  min-height: 100dvh !important;
  border-radius: 0;
  box-shadow: none;
  touch-action: pan-y;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.ms-lb-fs-exit {
  position: fixed;
  top: auto;
  right: auto;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  min-width: 0;
  padding: 0.75rem 1.35rem;
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 14px 40px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ms-lb-fs-exit[hidden] {
  display: none !important;
}

.ms-lb-fs-exit:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: #fff;
  border-color: rgba(220, 38, 38, 0.65);
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 16px 44px rgba(220, 38, 38, 0.42);
}

.ms-lb-fs-exit-label {
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.ms-lb-fs-exit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.ms-lb-fullscreen {
  overflow: hidden;
}

body.ms-lb-fullscreen .ms-preview-frame-wrap,
body.ms-lb-fullscreen .ms-preview-frame-shell {
  overflow: visible !important;
}

body.ms-lb-fullscreen .ms-lb-chrome {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .ms-lb-fs-exit {
    top: auto;
    right: auto;
    left: 50%;
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100vw - 1.5rem);
    min-width: 0;
    min-height: 2.45rem;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  }

  .ms-lb-fs-exit:hover {
    transform: translateX(-50%) translateY(-1px);
  }

  .ms-lb-fs-exit-label {
    font-size: 0.88rem;
  }

  .ms-lb-fs-exit svg {
    width: 16px;
    height: 16px;
  }
}

body.ms-lb-fullscreen .ms-lb-side,
body.ms-lb-fullscreen .ms-lb-pane-resizer,
body.ms-lb-fullscreen .ms-lb-body > .ms-lb-chrome-bar {
  visibility: hidden;
  pointer-events: none;
}

/* Hide pricing controls in fullscreen so they don't paint above the preview. */
body.ms-lb-fullscreen .ms-lb-price {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ms-lb-code {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: none;
  resize: none;
  padding: 1.25rem;
  font-family: var(--ms-mono);
  font-size: 0.84rem;
  line-height: 1.45;
  background: #0f172a;
  color: #e2e8f0;
  display: none;
  box-sizing: border-box;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
  caret-color: #93c5fd;
}

.ms-lb-browser.is-code .ms-lb-code {
  display: block !important;
}

.ms-lb-browser.is-code .ms-preview-frame-wrap {
  display: none !important;
}

.ms-lb-edit-save {
  margin: -0.35rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: #94a3b8;
  letter-spacing: 0.02em;
  min-height: 1rem;
}

.ms-lb-edit-save.is-unsaved { color: #b45309; }
.ms-lb-edit-save.is-saving { color: #2563eb; }
.ms-lb-edit-save.is-saved { color: #059669; }
.ms-lb-edit-save.is-error { color: #dc2626; }
.ms-lb-edit-save.is-hint { color: #2563eb; }

.ms-lb-browser.is-edit .ms-preview-frame-wrap {
  cursor: crosshair;
}

.ms-lb-browser.is-edit .ms-preview-frame {
  pointer-events: auto;
}

.ms-lb-edit-toolbar {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(21rem, calc(100% - 1.25rem));
  max-width: min(94%, 22.5rem);
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: #0f172a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 50px -12px rgba(15, 23, 42, 0.28),
    0 8px 20px -8px rgba(15, 23, 42, 0.15);
  pointer-events: auto;
  font-family: "DM Sans", system-ui, sans-serif;
  overflow: hidden;
}

.ms-lb-edit-toolbar[hidden] {
  display: none !important;
}

.ms-lb-edit-toolbar-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fcfdfe, #f8fafc);
}

.ms-lb-edit-tabs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
  padding: 0.2rem;
  border-radius: 10px;
  background: #eef2f7;
  overflow-x: auto;
  scrollbar-width: none;
}

.ms-lb-edit-tabs::-webkit-scrollbar {
  display: none;
}

.ms-lb-edit-tab {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-edit-tab:hover {
  color: #334155;
}

.ms-lb-edit-tab.is-active {
  color: #1d4ed8;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.ms-lb-edit-done {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.75rem !important;
  border-radius: 9px !important;
}

.ms-lb-edit-toolbar-body {
  padding: 0.85rem 0.85rem;
  min-height: 3.25rem;
}

.ms-lb-edit-toolbar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.ms-lb-edit-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.ms-lb-edit-panel-fields {
  display: grid;
  gap: 0.7rem;
  width: 100%;
}

.ms-lb-edit-section {
  display: grid;
  gap: 0.4rem;
}

.ms-lb-edit-section + .ms-lb-edit-section {
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

.ms-lb-edit-section-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ms-lb-edit-section-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ms-lb-edit-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  white-space: nowrap;
}

.ms-lb-edit-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.ms-lb-edit-hint {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.ms-lb-edit-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.6rem 0.22rem 0.28rem;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  cursor: pointer;
}

.ms-lb-edit-swatch:hover {
  background: #f1f5f9;
}

.ms-lb-edit-swatch-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

.ms-lb-edit-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ms-lb-edit-toolbar-fields {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e8edf3;
}

.ms-lb-edit-toolbar-fields[hidden] {
  display: none !important;
}

.ms-lb-edit-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: #f4f6f9;
  border: 1px solid #eef2f7;
}

.ms-lb-edit-group-label {
  display: none;
}

.ms-lb-edit-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.46rem 0.68rem;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-edit-btn:hover:not(:disabled) {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.ms-lb-edit-btn.is-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.ms-lb-edit-btn.is-primary:hover:not(:disabled) {
  background: #1d4ed8;
  color: #fff;
}

.ms-lb-edit-btn.is-danger {
  color: #dc2626;
}

.ms-lb-edit-btn.is-danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.ms-lb-edit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ms-lb-edit-btn.is-icon {
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ms-lb-edit-color {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ms-lb-edit-color::-webkit-color-swatch-wrapper { padding: 2px; }
.ms-lb-edit-color::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.ms-lb-edit-field {
  display: grid;
  gap: 0.28rem;
}

.ms-lb-edit-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.48rem 0.62rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-edit-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ms-lb-edit-input::placeholder {
  color: #94a3b8;
}

.ms-lb-edit-label {
  font-size: 0.7rem;
  font-weight: 650;
  color: #64748b;
  letter-spacing: 0.01em;
  margin: 0;
}

.ms-lb-edit-image-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ms-lb-edit-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e8edf3;
  flex-shrink: 0;
}

.ms-lb-edit-thumb.is-empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 650;
}

.ms-lb-edit-upload {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.ms-lb-edit-upload-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-lb-edit-upload-btn:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #93c5fd;
}

.ms-lb-edit-upload-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ms-lb-edit-upload-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ms-lb-edit-upload-status {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 550;
  color: #64748b;
  min-height: 1em;
}

.ms-lb-edit-upload-status.is-error {
  color: #dc2626;
}

.ms-lb-edit-upload-status.is-ok {
  color: #059669;
}

.ms-lb-edit-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ms-lb-publish-btn:not(:disabled) {
  color: #fff;
}

.ms-lb-onboard {
  display: none;
}

.ms-lb-onboard-card {
  width: min(420px, 100%);
  max-height: min(90vh, 740px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 24px 64px rgba(15, 23, 42, 0.18);
  padding: 1.35rem 1.4rem 0;
  cursor: default;
  transition:
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-onboard-card.is-templates {
  width: min(720px, 100%);
  max-height: min(92vh, 820px);
}

.ms-lb-onboard-step {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ms-lb-onboard-step.is-active,
.ms-lb-onboard-step:not([hidden]) {
  display: flex;
}

.ms-lb-onboard-step.is-entering {
  animation: ms-lb-step-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ms-lb-step-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ms-lb-onboard-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.ms-lb-onboard-progress span {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: #e8edf3;
  transition: background 0.28s ease, transform 0.28s ease;
}

.ms-lb-onboard-progress span.is-on,
.ms-lb-onboard-progress span.is-done {
  background: var(--ms-accent);
}

.ms-lb-onboard-head {
  margin-bottom: 1.15rem;
  flex-shrink: 0;
}

.ms-lb-onboard-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
  text-align: center;
}

.ms-lb-onboard-head .ms-muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.ms-lb-onboard-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0.15rem 0;
}

.ms-lb-onboard-divider::before,
.ms-lb-onboard-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8edf3;
}

.ms-lb-onboard-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.4rem 0.7rem;
  text-transform: uppercase;
}

.ms-bs-card .ms-lb-onboard-body {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.ms-lb-onboard-body {
  display: grid;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  margin-right: -0.15rem;
  scrollbar-gutter: stable;
}

.ms-lb-onboard-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-lb-onboard-input {
  width: 100%;
  appearance: none;
  border: 1px solid transparent;
  background: #f4f6f9;
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-onboard-input::placeholder {
  color: #94a3b8;
}

.ms-lb-onboard-input:hover {
  background: #eef1f6;
}

.ms-lb-onboard-input:focus {
  background: #fff;
  border-color: color-mix(in srgb, var(--ms-accent) 55%, #e2e8f0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-accent) 16%, transparent);
}

.ms-lb-onboard-textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.45;
}

.ms-lb-onboard-optional {
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #94a3b8;
}

.ms-bs-gen-prompt {
  margin-top: 0.15rem;
}

.ms-lb-onboard-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ms-lb-onboard-maps-shell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.15rem 0.15rem 0.15rem 0.85rem;
  background: #f4f6f9;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-onboard-maps-shell:focus-within {
  background: #fff;
  border-color: color-mix(in srgb, var(--ms-accent) 55%, #e2e8f0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-accent) 16%, transparent);
}

.ms-lb-onboard-maps-shell.is-ok {
  background: #ecfdf5;
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.ms-lb-onboard-maps-shell.is-ok .ms-lb-onboard-maps-icon {
  color: #059669;
}

.ms-lb-onboard-maps-shell.is-ok:focus-within {
  background: #ecfdf5;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ms-lb-onboard-maps-shell.is-err {
  background: #fef2f2;
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ms-lb-onboard-maps-shell.is-busy {
  border-color: color-mix(in srgb, var(--ms-accent) 45%, #e2e8f0);
}

.ms-lb-onboard-maps-icon {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}

.ms-lb-onboard-maps-shell .ms-lb-onboard-input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
}

.ms-lb-onboard-maps-shell .ms-lb-onboard-input:hover,
.ms-lb-onboard-maps-shell .ms-lb-onboard-input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ms-lb-onboard-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ms-lb-onboard-fields-extra {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  pointer-events: none;
  transition:
    max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    margin 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-bs-path--manual .ms-lb-onboard-fields-extra {
  max-height: none;
  opacity: 1;
  overflow: visible;
  margin-top: 0.75rem;
  pointer-events: auto;
}

.ms-bs-path--manual.is-manual-expanded .ms-lb-onboard-fields-extra {
  max-height: none;
  opacity: 1;
  margin-top: 0.75rem;
  pointer-events: auto;
}

.ms-lb-onboard-field {
  min-width: 0;
}

.ms-lb-onboard-field--full {
  grid-column: 1 / -1;
}

.ms-lb-onboard-scrape {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  min-height: 0;
}

.ms-lb-onboard-scrape.is-ok {
  color: #047857;
}

.ms-lb-onboard-scrape.is-busy {
  color: var(--ms-accent);
}

.ms-lb-onboard-scrape.is-err {
  color: #b91c1c;
}

.ms-lb-onboard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-top: 0;
  padding: 1rem 0 1.2rem;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 40%);
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.ms-lb-onboard-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.35rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.ms-lb-onboard-back:hover {
  color: #0f172a;
  background: #f4f6f9;
}

.ms-lb-onboard-next {
  min-width: 8.5rem;
  border-radius: 12px !important;
  padding: 0.72rem 1.25rem !important;
  font-weight: 650 !important;
}

.ms-lb-onboard-next.is-busy {
  opacity: 0.88;
  pointer-events: none;
  cursor: wait;
}

.ms-lb-onboard-foot .ms-btn:last-child,
.ms-lb-onboard-foot .ms-lb-onboard-next {
  margin-left: auto;
}

@media (max-width: 900px) {
  .ms-builder-setup-page {
    width: calc(100% - var(--ms-sidebar-w) - 1.25rem);
    padding: 2rem 1rem 4rem;
  }

  .ms-bs-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  #builder-setup-card,
  .ms-bs-recent,
  .ms-bs-status {
    grid-column: 1;
    grid-row: auto;
    height: auto;
    max-height: none;
  }

  .ms-bs-recent {
    position: static;
    max-height: none;
  }

  .ms-bs-recent-list {
    max-height: min(52dvh, 420px);
  }
}

@media (max-width: 480px) {
  .ms-lb-onboard-fields {
    grid-template-columns: 1fr;
  }

  .ms-lb-onboard-fields-extra {
    grid-template-columns: 1fr 1fr;
  }

  .ms-lb-onboard-field--full {
    grid-column: auto;
  }

  .ms-lb-onboard-card,
  .ms-bs-card {
    padding: 1.2rem 1.1rem 0;
    border-radius: 18px;
  }

  .ms-lb-onboard-head h2 {
    font-size: 1.25rem;
  }

  .ms-lb-onboard-foot {
    padding-bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-lb-onboard-card {
    transition: none;
  }

  .ms-lb-onboard-step.is-entering {
    animation: none;
  }
}

.ms-redirect {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.ms-redirect.is-open,
.ms-redirect:not([hidden]) {
  display: grid;
}

.ms-redirect[hidden] {
  display: none !important;
}

.ms-redirect-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  cursor: default;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 24px 64px rgba(15, 23, 42, 0.18);
  padding: 1.35rem 1.4rem 1.2rem;
  text-align: left;
  animation: ms-redirect-in 0.22s ease;
}

@keyframes ms-redirect-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ms-redirect-head {
  margin-bottom: 1.15rem;
  text-align: center;
}

.ms-redirect-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  border: 0;
  overflow: hidden;
}

.ms-redirect-icon--telegram {
  background: transparent;
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.28);
}

.ms-redirect-icon--discord {
  background: transparent;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.32);
}

.ms-redirect-icon svg,
.ms-redirect-icon .ms-telegram-logo,
.ms-redirect-icon .ms-discord-logo {
  width: 68px;
  height: 68px;
  display: block;
}

.ms-redirect-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}

.ms-redirect-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.ms-redirect-copy strong {
  color: #0f172a;
  font-weight: 650;
}

.ms-redirect-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
  padding-top: 1.05rem;
  border-top: 1px solid #f1f5f9;
}

.ms-redirect-cancel {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.35rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.ms-redirect-cancel:hover {
  color: #0f172a;
  background: #f4f6f9;
}

.ms-redirect-go {
  min-width: 8.5rem;
  margin-left: auto;
  border-radius: 12px !important;
  padding: 0.72rem 1.25rem !important;
  font-weight: 650 !important;
}

.ms-redirect-go:hover:not(:disabled) {
  filter: none;
}

body.ms-redirect-open {
  overflow: hidden;
}

.ms-lb-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.1rem 0.1rem 0.45rem;
}

.ms-lb-tpl-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.ms-lb-tpl-nav {
  appearance: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #e5eaf2;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease,
    opacity 0.18s ease;
}

.ms-lb-tpl-nav svg {
  width: 18px;
  height: 18px;
}

.ms-lb-tpl-nav:hover:not(:disabled) {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.ms-lb-tpl-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.ms-lb-tpl-count {
  min-width: 3.2rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.ms-lb-tpl-card {
  appearance: none;
  border: 1px solid #e5eaf2;
  background: #fff;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  contain: layout style;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ms-lb-onboard-step.is-entering .ms-lb-tpl-card {
  animation: ms-lb-tpl-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: opacity, transform;
}

.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(1) {
  animation-delay: 0.02s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(2) {
  animation-delay: 0.045s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(3) {
  animation-delay: 0.07s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(4) {
  animation-delay: 0.095s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(5) {
  animation-delay: 0.12s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(6) {
  animation-delay: 0.145s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(7) {
  animation-delay: 0.17s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(8) {
  animation-delay: 0.19s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(9) {
  animation-delay: 0.21s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(10) {
  animation-delay: 0.23s;
}
.ms-lb-onboard-step.is-entering .ms-lb-tpl-card:nth-child(n + 11) {
  animation-delay: 0.25s;
}

@keyframes ms-lb-tpl-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-lb-onboard-step.is-entering .ms-lb-tpl-card {
    animation: none;
    will-change: auto;
  }
}

.ms-lb-tpl-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.ms-lb-tpl-card.is-selected {
  border-color: var(--ms-accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--ms-accent) 28%, transparent),
    0 12px 26px rgba(37, 99, 235, 0.12);
}

.ms-lb-tpl-frame {
  position: relative;
  aspect-ratio: 16 / 12;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(148, 163, 184, 0.06)),
    #e8edf3;
  pointer-events: none;
  contain: paint;
}

.ms-lb-tpl-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: inset 0 -18px 28px rgba(15, 23, 42, 0.05);
  pointer-events: none;
  z-index: 1;
}

.ms-lb-tpl-frame.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    110deg,
    #e8edf3 0%,
    #f8fafc 45%,
    #e8edf3 90%
  );
  background-size: 200% 100%;
  animation: ms-lb-tpl-shimmer 1.1s ease-in-out infinite;
}

.ms-lb-tpl-frame.is-ready::before {
  display: none;
}

@keyframes ms-lb-tpl-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.ms-lb-tpl-preview {
  position: absolute;
  inset: 0;
  width: 400%;
  height: 1400%;
  border: 0;
  overflow: hidden;
  transform: scale(0.25);
  transform-origin: 0 0;
  background: #fff;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ms-lb-tpl-frame.is-ready .ms-lb-tpl-preview {
  opacity: 1;
}

.ms-lb-tpl-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 600;
}

.ms-lb-tpl-meta {
  display: grid;
  gap: 0;
  padding: 0.4rem 0.55rem 0.48rem;
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  text-align: center;
}

.ms-lb-tpl-meta strong {
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
}

.ms-lb-tpl-meta span {
  display: none;
}

body.ms-tpl-viewer-open {
  overflow: hidden;
}

.ms-tpl-viewer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ms-tpl-viewer.is-open,
.ms-tpl-viewer:not([hidden]) {
  display: grid;
}

.ms-tpl-viewer[hidden] {
  display: none !important;
}

.ms-tpl-viewer-card {
  width: min(1200px, 100%);
  height: min(94dvh, 920px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}

.ms-tpl-viewer-head,
.ms-tpl-viewer-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
}

.ms-tpl-viewer-head {
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.ms-tpl-viewer-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.ms-tpl-viewer-head p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.ms-tpl-viewer-close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}

.ms-tpl-viewer-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ms-tpl-viewer-close svg {
  width: 18px;
  height: 18px;
}

.ms-tpl-viewer-browser {
  min-height: 0;
  overflow: hidden;
  background: #e2e8f0;
}

.ms-tpl-viewer-browser iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  overflow: auto;
}

.ms-tpl-viewer-foot {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
  .ms-tpl-viewer {
    padding: 0;
  }

  .ms-tpl-viewer-card {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .ms-tpl-viewer-foot {
    padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
  }

  .ms-tpl-viewer-foot .ms-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .ms-lb-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 420px) {
  .ms-lb-template-grid {
    grid-template-columns: 1fr;
  }
}


body.ms-lb-onboarding .ms-lb-dock,
body.ms-lb-onboarding .ms-lb-viewports,
body.ms-lb-onboarding .ms-lb-mode {
  pointer-events: none;
  opacity: 0.45;
}

/* Builder site settings modal */
.ms-lb-settings {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.ms-lb-settings.is-open,
.ms-lb-settings:not([hidden]) {
  display: grid;
}

.ms-lb-settings[hidden] {
  display: none !important;
}

.ms-lb-settings-card {
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
  padding: 1.25rem 1.35rem 1.35rem;
  cursor: default;
}

.ms-lb-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ms-lb-settings-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.ms-lb-settings-head .ms-muted {
  margin: 0;
  font-size: 0.92rem;
}

.ms-lb-settings-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ms-lb-settings-close svg {
  width: 16px;
  height: 16px;
}

.ms-lb-settings-close:hover {
  background: #fff;
  color: #0f172a;
}

.ms-lb-settings-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: #f1f5f9;
  margin-bottom: 1.1rem;
  overflow-x: auto;
}

.ms-lb-settings-tab {
  flex: 1 1 0;
  min-width: 4.5rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.55rem 0.4rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ms-lb-settings-tab svg {
  width: 18px;
  height: 18px;
}

.ms-lb-settings-tab.is-active {
  background: #fff;
  color: var(--ms-accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ms-lb-settings-panels {
  display: grid;
  gap: 0.85rem;
}

.ms-lb-settings-panel {
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}

.ms-lb-settings-panel.is-active {
  display: flex;
}

.ms-lb-settings-block {
  display: flex;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #f8fafc;
}

.ms-lb-settings-block-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8f1ff;
  color: var(--ms-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ms-lb-settings-block-ico svg {
  width: 18px;
  height: 18px;
}

.ms-lb-settings-block-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ms-lb-settings-block-body h3 {
  margin: 0;
  font-size: 1rem;
}

.ms-lb-settings-block-body > .ms-muted {
  margin: 0;
  font-size: 0.88rem;
}

.ms-lb-settings-publish-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.ms-lb-settings-publish {
  margin-top: 0;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  border: 0;
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.28);
}

.ms-lb-settings-publish.is-loading,
.ms-lb-settings-publish.is-loading:disabled {
  cursor: wait;
  opacity: 0.88;
  pointer-events: none;
}

.ms-lb-settings-publish.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.45rem;
  vertical-align: -0.12em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ms-lb-publish-spin 0.72s linear infinite;
}

.ms-lb-settings-unpublish {
  margin-top: 0;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.92);
  color: #b91c1c;
}

.ms-lb-settings-unpublish:hover:not(:disabled) {
  background: rgba(254, 226, 226, 0.98);
  border-color: rgba(239, 68, 68, 0.45);
}

.ms-lb-unpublish-dialog-panel,
.ms-lb-delete-dialog-panel {
  text-align: center;
}

.ms-lb-unpublish-dialog-icon,
.ms-lb-delete-dialog-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #dc2626;
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.92));
  border: 1px solid rgba(239, 68, 68, 0.18);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.12);
}

.ms-lb-unpublish-dialog-icon svg,
.ms-lb-delete-dialog-icon svg {
  width: 24px;
  height: 24px;
}

.ms-lb-unpublish-dialog-panel .ms-clients-dialog-head,
.ms-lb-delete-dialog-panel .ms-clients-dialog-head {
  margin-bottom: 0.55rem;
}

.ms-lb-unpublish-dialog-panel .ms-clients-dialog-title,
.ms-lb-delete-dialog-panel .ms-clients-dialog-title {
  font-size: 1.35rem;
}

.ms-lb-unpublish-dialog-panel .ms-clients-dialog-lead,
.ms-lb-delete-dialog-panel .ms-clients-dialog-lead {
  margin: 0;
}

.ms-lb-unpublish-url {
  margin: 0.85rem 0 0.15rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 650;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-lb-delete-project-name {
  margin: 0.85rem 0 0.15rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-lb-unpublish-dialog-panel .ms-clients-dialog-actions,
.ms-lb-delete-dialog-panel .ms-clients-dialog-actions {
  margin-top: 0.35rem;
}

.ms-lb-redesign-dialog-panel {
  text-align: center;
}

.ms-lb-redesign-dialog-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #2563eb;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.92));
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.ms-lb-redesign-dialog-icon svg {
  width: 24px;
  height: 24px;
}

.ms-lb-redesign-dialog-panel .ms-clients-dialog-head {
  margin-bottom: 0.55rem;
}

.ms-lb-redesign-dialog-panel .ms-clients-dialog-title {
  font-size: 1.35rem;
}

.ms-lb-redesign-dialog-panel .ms-clients-dialog-lead {
  margin: 0;
}

.ms-lb-redesign-cost {
  margin: 0.85rem 0 0.15rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1d4ed8;
}

.ms-lb-redesign-dialog-panel .ms-clients-dialog-actions {
  margin-top: 0.35rem;
}

.ms-lb-settings-publish:hover:not(:disabled) {
  filter: brightness(1.05);
}

.ms-lb-settings-note,
.ms-lb-settings-hint {
  margin: 0;
  font-size: 0.84rem;
  color: #94a3b8;
}

.ms-lb-settings-link {
  margin: 0;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--ms-accent);
}

.ms-lb-settings-domain-row,
.ms-lb-settings-share-row,
.ms-lb-settings-color-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.ms-lb-settings-color-row input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.ms-lb-settings-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

/* Expandable settings widgets (Contact Form, etc.) */
.ms-lb-widget {
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.ms-lb-widget.is-expanded {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 22px rgba(15, 23, 42, 0.05);
}

.ms-lb-widget.is-instant .ms-lb-widget-body {
  transition: none;
}

.ms-lb-widget-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.75rem;
}

.ms-lb-widget-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ms-lb-widget-icon svg {
  width: 16px;
  height: 16px;
}

.ms-lb-widget-copy {
  flex: 1;
  min-width: 0;
}

.ms-lb-widget-copy h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.ms-lb-widget-copy .ms-muted {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  line-height: 1.25;
}

.ms-lb-widget-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.ms-lb-widget-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ms-lb-widget-toggle-track {
  display: block;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-lb-widget-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-lb-widget-toggle input:checked + .ms-lb-widget-toggle-track {
  background: #2563eb;
}

.ms-lb-widget-toggle input:checked + .ms-lb-widget-toggle-track::after {
  transform: translateX(16px);
}

.ms-lb-widget-toggle input:focus-visible + .ms-lb-widget-toggle-track {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.ms-lb-widget-body {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 0.75rem;
  border-top: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  transition:
    grid-template-rows 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.32s ease,
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-lb-widget.is-expanded .ms-lb-widget-body {
  grid-template-rows: 1fr;
  padding: 0 0.75rem 0.7rem;
  border-top-color: #eef2f7;
  opacity: 1;
  pointer-events: auto;
}

.ms-lb-widget-body-inner {
  overflow: hidden;
  min-height: 0;
}

.ms-lb-widget.is-expanded .ms-lb-widget-body-inner {
  overflow: visible;
  max-height: none;
  min-height: 0;
}

.ms-lb-widget-body-inner > .ms-lb-widget-field:first-child,
.ms-lb-widget-body-inner > .ms-lb-widget-mode:first-child {
  margin-top: 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .ms-lb-widget-body,
  .ms-lb-widget-toggle-track,
  .ms-lb-widget-toggle-track::after {
    transition: none;
  }
}

.ms-lb-widget-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.22rem;
  margin: 0.55rem 0 0.6rem;
  border-radius: 10px;
  background: #f1f5f9;
}

.ms-lb-widget-mode-btn {
  border: 0;
  border-radius: 8px;
  padding: 0.38rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-widget-mode-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ms-lb-widget-field {
  margin-bottom: 0.55rem;
}

.ms-lb-widget-field .ms-label {
  margin-bottom: 0.28rem;
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-lb-widget-field .ms-input {
  padding: 0.48rem 0.62rem;
  font-size: 0.86rem;
  border-radius: 9px;
}

.ms-lb-widget-hint {
  margin: 0.32rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ms-lb-widget-save {
  width: 100%;
  margin-top: 0.05rem;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.86rem !important;
  border-radius: 10px !important;
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  font-weight: 650 !important;
}

.ms-lb-widget-save:hover:not(:disabled) {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

.ms-lb-settings-divider {
  height: 1px;
  margin: 1.15rem 0 0.85rem;
  background: #eef2f7;
}

.ms-lb-settings-section-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-lb-settings-danger {
  padding: 1rem;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: #fff7f7;
}

.ms-lb-settings-danger h3 {
  margin: 0 0 0.35rem;
  color: #b91c1c;
}

.ms-lb-settings-danger .ms-muted {
  margin: 0 0 0.85rem;
}

#lb-settings-error,
#lb-settings-status {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  text-align: center;
}

#lb-settings-status.is-ok {
  color: #047857;
}

.ms-lb-dock {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: none;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.ms-lb-dock > * {
  pointer-events: auto;
}

.ms-lb-status {
  font-size: 0.78rem;
  margin: 0 0 0.35rem;
  min-height: 0;
  line-height: 1.3;
  text-align: left;
}

.ms-lb-status.is-error {
  color: var(--ms-danger);
  font-weight: 600;
}

.ms-lb-status:empty {
  display: none;
}

.ms-lb-chat-activity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.35rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.ms-lb-chat-activity[hidden] {
  display: none !important;
}

.ms-lb-chat-activity p {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.ms-lb-chat-activity .ms-lb-dots-loader {
  margin-top: 0;
}

body.ms-lb-generating .ms-lb-chat-activity .ms-lb-dots-loader span {
  background: #3b82f6;
}

.ms-lb-busy {
  display: none !important;
}

.ms-lb-send.is-busy {
  opacity: 0.7;
}

.ms-lb-dock .ms-error {
  font-size: 0.82rem;
  margin: 0 0 0.35rem;
  text-align: left;
}

.ms-lb-prompt {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 22px;
  padding: 0.85rem 0.9rem 0.75rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(12px);
}

.ms-lb-prompt-input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  resize: none;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ms-ink);
  background: transparent;
  height: auto;
  min-height: 4.5rem;
  padding: 0;
}

.ms-lb-prompt-input::placeholder {
  color: #94a3b8;
}

.ms-lb-prompt-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ms-lb-prompt-plus {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ms-lb-prompt-plus svg {
  width: 16px;
  height: 16px;
}

.ms-lb-prompt-plus:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ms-lb-prompt-bar .ms-lb-toggle {
  margin-left: 0;
}

.ms-lb-prompt-bar .ms-lb-send {
  margin-left: auto;
}

.ms-lb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  position: relative;
  padding: 0.15rem 0.1rem;
}

.ms-lb-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.ms-lb-switch {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.ms-lb-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-toggle input:checked + .ms-lb-switch {
  background: #3b82f6;
}

.ms-lb-toggle input:checked + .ms-lb-switch::after {
  transform: translateX(12px);
}

.ms-lb-bolt {
  width: 11px;
  height: 11px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-toggle-label {
  white-space: nowrap;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-lb-toggle:has(input:checked) .ms-lb-toggle-label {
  color: #2563eb;
}

.ms-lb-toggle:has(#opt-pro:checked) .ms-lb-bolt {
  color: #f59e0b;
  transform: scale(1.08);
}

.ms-lb-toggle:has(#opt-pro:checked) .ms-lb-toggle-label {
  color: #d97706;
}

.ms-lb-send {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(145deg, #60a5fa, #2563eb);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 16px rgba(37, 99, 235, 0.36),
    0 2px 4px rgba(37, 99, 235, 0.2);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    filter 0.18s ease;
}

.ms-lb-send:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 22px rgba(37, 99, 235, 0.42),
    0 3px 6px rgba(37, 99, 235, 0.24);
}

.ms-lb-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ms-lb-send svg {
  width: 16px;
  height: 16px;
}

.ms-lb-detail-grid {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.2rem;
}

.ms-btn-ghost-danger {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  box-shadow: none;
  font-weight: 500;
}

.ms-btn-ghost-danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  filter: none;
  transform: none;
  box-shadow: none;
}

.ms-template-list { display: grid; gap: 0.5rem; }
.ms-template-item {
  text-align: left;
  border: 1px solid var(--ms-line);
  background: var(--ms-surface);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  font: inherit;
}
.ms-template-item.is-selected {
  border-color: var(--ms-accent);
  background: var(--ms-accent-soft);
}

/* Watermark chip host - bottom strip only so it never blocks iframe scroll */
#watermark-host {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 20;
  height: auto;
  max-height: 40%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 0.75rem max(1rem, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  overflow: visible;
}

.ms-watermark {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: transparent;
  font-family: "DM Sans", system-ui, sans-serif;
}

.ms-watermark-chip {
  pointer-events: auto;
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  max-width: min(calc(100% - 1.5rem), 36rem);
  margin: 0;
  padding: 1.15rem 1.65rem 1.15rem 1.15rem;
  color: #fff;
  border-radius: 18px;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  background: var(--ms-accent);
  box-shadow:
    0 18px 48px rgba(59, 130, 246, 0.4),
    0 6px 18px rgba(15, 23, 42, 0.14);
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  animation: ms-widget-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ms-watermark-chip:hover {
  filter: brightness(1.05);
  transform: translateX(-50%) translateY(-3px);
  box-shadow:
    0 22px 56px rgba(59, 130, 246, 0.46),
    0 8px 22px rgba(15, 23, 42, 0.16);
}

.ms-watermark-chip img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ms-watermark-text {
  display: grid;
  gap: 0.12rem;
  text-align: left;
  line-height: 1.2;
}
.ms-watermark-text strong {
  display: block;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}
.ms-watermark-text span {
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

@keyframes ms-widget-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ms-watermark-chip { animation: none; }
}

.ms-paywall {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ms-paywall.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ms-paywall-card {
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--ms-line);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  cursor: default;
  transform: translateY(10px);
  transition: transform 0.25s ease;
}
.ms-paywall.is-open .ms-paywall-card {
  transform: none;
}

.ms-paywall-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid var(--ms-line);
  flex-shrink: 0;
}
.ms-paywall-brand {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.ms-paywall-head h2 {
  margin: 0;
  font-family: var(--ms-font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.ms-paywall-head .ms-muted {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--ms-muted);
  line-height: 1.4;
}
.ms-paywall-x {
  appearance: none;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  background: #fff;
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.ms-paywall-x:hover {
  background: #f8fafc;
  color: #64748b;
}

.ms-paywall-body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ms-paywall-offer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ms-paywall-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}
.ms-paywall-price strong {
  font-size: clamp(3.5rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: #0f172a;
}
.ms-paywall-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
}

.ms-paywall .ms-timer {
  margin: 0;
  padding: 0;
  background: none;
  font-family: var(--ms-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  letter-spacing: -0.01em;
  text-align: center;
  width: 100%;
}

.ms-paywall-pay {
  width: 100%;
  min-height: 3.75rem;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 48%, #2563eb 100%) !important;
  color: #fff !important;
  font-family: var(--ms-font);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 8px 18px rgba(37, 99, 235, 0.28),
    0 2px 4px rgba(37, 99, 235, 0.18);
}
.ms-paywall-pay:hover:not(:disabled) {
  filter: brightness(1.03);
  transform: translateY(-0.5px);
}

.ms-paywall-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.ms-paywall .ms-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.ms-faq-acc {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--ms-line);
}

.ms-faq-item {
  border-bottom: 1px solid var(--ms-line);
}

.ms-faq-q {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
}

.ms-faq-q::after {
  content: "";
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 8h8M8 4v8'/%3E%3C/svg%3E") center/60% no-repeat;
  transition: background-color 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ms-faq-q[aria-expanded="true"]::after {
  background-color: #e8f1ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
  transform: rotate(0deg);
}

.ms-faq-q:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

.ms-faq-body {
  display: block !important; /* override [hidden] so transitions work; JS sets hidden after close */
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
}

.ms-faq-body[hidden] {
  /* Closed and fully collapsed - JS puts hidden back after transition ends */
  display: none !important;
}

.ms-faq-body.is-open {
  max-height: 16rem;
  opacity: 1;
}

.ms-faq-body p {
  margin: 0;
  padding: 0 0 0.9rem;
  color: var(--ms-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ms-faq-body a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.ms-faq-body a:hover {
  text-decoration: underline;
}

.ms-faq-list { margin: 0.75rem 0 1rem; padding-left: 1.1rem; color: var(--ms-muted); }
.ms-faq-list li { margin-bottom: 0.35rem; }

.ms-timer {
  font-family: var(--ms-mono);
  font-size: 0.9rem;
  color: var(--ms-danger);
  margin-bottom: 0.75rem;
}


.ms-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  border: 1px solid var(--ms-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-btn-ghost:hover {
  background: #f8fafc !important;
}

.ms-card-title {
  margin: 0 0 1.1rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.ms-stack-card {
  margin-bottom: 0.85rem;
}

.ms-stack-card:last-child {
  margin-bottom: 0;
}

.ms-card-copy,
.ms-course-body {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.ms-stack-card .ms-error,
.ms-stack-card .ms-muted#set-ok,
.ms-stack-card .ms-muted#set-pw-ok {
  margin-top: 0.75rem;
}

.ms-check {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  color: var(--ms-ink);
  font-size: 1rem;
  font-weight: 500;
  user-select: none;
}

.ms-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.ms-check-box {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  display: grid;
  place-items: center;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.ms-check-box svg {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0;
  transform: scale(0.7);
  color: #fff;
  transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-check:hover .ms-check-box {
  border-color: #93c5fd;
}

.ms-check input:focus-visible + .ms-check-box {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.ms-check input:checked + .ms-check-box {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  border-color: #3b82f6;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 4px 10px rgba(59, 130, 246, 0.28);
}

.ms-check input:checked + .ms-check-box svg {
  opacity: 1;
  transform: scale(1);
}

.ms-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ms-line);
  border-radius: 14px;
  background: #f8fafc;
}

.ms-pref-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ms-pref-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ms-ink);
}

.ms-pref-hint {
  margin: 0;
  font-size: 0.88rem;
}

.ms-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ms-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.ms-switch-track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) inset;
}

.ms-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-switch input:checked + .ms-switch-track {
  background: #3b82f6;
}

.ms-switch input:checked + .ms-switch-track::after {
  transform: translateX(18px);
}

.ms-switch input:focus-visible + .ms-switch-track {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.ms-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#set-ok {
  margin-top: 0.5rem;
}

#set-save {
  margin-top: 0.25rem;
}

.ms-course-list { display: grid; gap: 0.75rem; }
.ms-course-item h3 { margin: 0 0 0.25rem; }

.ms-course-video {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.ms-course-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ms-help-form {
  max-width: none;
  margin: 1rem 0 0;
  display: grid;
  gap: 1rem;
}

.ms-help-form .ms-btn {
  justify-self: start;
}

.ms-help-contact-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body[data-page="help"] .ms-content-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body[data-page="help"] .ms-page-head {
  width: 100%;
  max-width: 24rem;
  text-align: center;
}

body[data-page="help"] .ms-page-head-copy {
  width: 100%;
}

.ms-help-contact-head {
  gap: 0.35rem;
}

.ms-help-contact-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 24rem;
  margin: -0.75rem auto 2rem;
}

.ms-help-contact-actions .ms-btn {
  min-width: 10.5rem;
}

body.ms-contact-public {
  min-height: 100vh;
  margin: 0;
  background: #f4f7fb;
}

.ms-contact-main {
  position: relative;
  z-index: 1;
  width: min(24rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ms-contact-head {
  width: 100%;
  text-align: center;
  margin-bottom: 0.35rem;
}

.ms-contact-lead {
  margin: 0.45rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ms-help-vcard {
  position: relative;
  width: 100%;
  max-width: 24rem;
  margin: 0.35rem auto 2rem;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 48px rgba(15, 23, 42, 0.08);
}

.ms-help-vcard-hero {
  position: relative;
  height: 7.25rem;
  background:
    radial-gradient(ellipse 90% 100% at 50% 0%, rgba(255, 255, 255, 0.85), transparent 58%),
    linear-gradient(165deg, #f4f7fb 0%, #e8eef6 48%, #dde6f0 100%);
}

.ms-help-vcard-body {
  position: relative;
  padding: 0 1.5rem 1.65rem;
  text-align: center;
}

.ms-help-vcard-top {
  position: absolute;
  top: 1rem;
  left: 1.15rem;
  right: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.ms-help-vcard-brand {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
}

.ms-help-vcard-share {
  appearance: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #1e293b;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ms-help-vcard-share:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
  transform: translateY(-1px);
}

.ms-help-vcard-avatar {
  width: 5.5rem;
  height: 5.5rem;
  margin: -2.75rem auto 1.05rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ms-help-vcard-avatar img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.ms-help-vcard-identity {
  text-align: center;
  margin: 0 0 1.2rem;
}

.ms-help-vcard-name {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  color: #0f172a;
  line-height: 1.1;
}

.ms-help-vcard-role {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: -0.01em;
}

.ms-help-vcard-role a {
  color: inherit;
  text-decoration: none;
}

.ms-help-vcard-role a:hover {
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ms-help-vcard-save {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 0.92rem 1.25rem;
  cursor: pointer;
  margin-bottom: 1.35rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.ms-help-vcard-save:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ms-help-vcard-links {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0;
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.ms-help-vcard-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-help-vcard-link:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.06);
}

.ms-help-vcard-icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.8rem;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.ms-help-vcard-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-help-vcard-icon--guide {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.ms-help-vcard-icon--guide svg {
  width: 1.35rem;
  height: 1.35rem;
}

.ms-help-vcard-link-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.ms-help-vcard-link-text strong {
  font-size: 0.95rem;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.ms-help-vcard-link-text em {
  font-style: normal;
  font-size: 0.82rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-help-vcard-link:hover .ms-help-vcard-link-text strong {
  color: #0f172a;
}

.ms-help-guide-section {
  width: 100%;
  max-width: 24rem;
  margin: 0.85rem auto 2rem;
}

.ms-help-guide-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ms-help-guide-card:hover {
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.ms-help-guide-card-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: #94a3b8;
}

/* Standalone public Privacy / Terms (no app shell) */
body.ms-legal-site {
  --ms-sidebar-w: 0px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background:
    radial-gradient(1000px 480px at 8% -8%, #bfdbfe 0%, transparent 55%),
    radial-gradient(800px 420px at 100% 0%, #e0e7ff 0%, transparent 48%),
    var(--ms-bg);
}

.ms-legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
}

.ms-legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ms-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ms-legal-brand img {
  display: block;
  border-radius: 8px;
}

.ms-legal-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ms-legal-nav a {
  text-decoration: none;
  color: var(--ms-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.ms-legal-nav a:hover {
  color: var(--ms-ink);
  background: rgba(255, 255, 255, 0.7);
}

.ms-legal-nav a.is-active {
  color: var(--ms-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ms-legal-wrap {
  flex: 1;
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto 2rem;
  padding: 0.5rem 0 2rem;
}

.ms-legal-hero {
  margin: 0 0 0.35rem;
}

.ms-legal-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.ms-legal-foot {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.55);
}

.ms-legal-foot a {
  color: var(--ms-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.ms-legal-foot a:hover {
  color: var(--ms-ink);
  text-decoration: underline;
}

.ms-legal-doc {
  display: grid;
  gap: 1rem;
}

.ms-legal-doc .ms-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: #0f172a;
}

.ms-legal-doc .ms-card p,
.ms-legal-doc .ms-card li {
  margin: 0 0 0.65rem;
  line-height: 1.62;
  color: var(--ms-muted);
  font-size: 0.92rem;
}

.ms-legal-doc .ms-card p:last-child,
.ms-legal-doc .ms-card li:last-child {
  margin-bottom: 0;
}

.ms-legal-doc .ms-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.ms-legal-doc .ms-card a {
  color: var(--ms-accent);
  text-decoration: none;
  font-weight: 600;
}

.ms-legal-doc .ms-card a:hover {
  text-decoration: underline;
}

.ms-legal-updated {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--ms-muted);
}

.ms-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ms-muted);
}

@media (max-width: 900px) {
  .ms-sidebar {
    width: min(84vw, 288px);
    transform: translate3d(-105%, 0, 0);
    box-shadow: 16px 0 44px rgba(15, 23, 42, 0);
  }
  body.ms-nav-open #shell {
    position: relative;
    z-index: 46;
  }
  body.ms-nav-open #page-body {
    pointer-events: none;
  }
  body.ms-nav-open .ms-sidebar {
    transform: translate3d(0, 0, 0);
    box-shadow: 16px 0 44px rgba(15, 23, 42, 0.16);
  }
  /* Nav scrim on ::after so ::before ambient drift (studio-motion.css) stays intact */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    z-index: 39;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0.28s;
  }
  body.ms-nav-open::after {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0s;
  }
  .ms-menu-toggle {
    display: grid;
    place-items: center;
    transition:
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease,
      background 0.2s ease;
  }
  body.ms-nav-open .ms-menu-toggle {
    transform: scale(0.92);
    opacity: 0;
    pointer-events: none;
  }
  .ms-sidebar-resizer { display: none; }

  body:not([data-page="builder"]),
  body[data-page="builder"].ms-lb-setup {
    --ms-sidebar-w: 0px;
    --ms-content-scale: 1;
    overflow-x: clip;
  }

  #page-body,
  #page-body.ms-channel-page,
  #page-body.ms-dash-page,
  #page-body.ms-lf-page,
  #page-body.ms-content-page,
  #page-body.ms-settings-page,
  #page-body.ms-clients-page,
  #page-body.ms-projects-page,
  #page-body.ms-store-page,
  body[data-page="builder"].ms-lb-setup .ms-builder-setup-page {
    --ms-sidebar-w: 0px;
    --ms-content-scale: 1;
    zoom: 1;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 4.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 3.5rem;
    box-sizing: border-box;
    overflow-x: clip;
  }
  .ms-page-head h1 {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
  }
  .ms-lf-page,
  .ms-lf-search,
  .ms-lf-popular,
  .ms-lf-list-section,
  .ms-lead-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .ms-lead-card.ms-lf-pro {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 14px;
  }
  .ms-lead-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }
  .ms-lf-pro-head {
    padding: 0.95rem 1rem 0.85rem;
  }
  .ms-lf-pro-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 0.82rem;
  }
  .ms-lf-pro-name {
    font-size: 1.02rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: unset;
  }
  .ms-lf-pro-details {
    gap: 0;
    padding: 0.4rem 0.45rem 0.55rem;
  }
  .ms-lf-pro-row,
  .ms-lf-pro-row--pair {
    min-height: 38px;
  }
  .ms-lf-pro-row-text,
  .ms-lf-pro-row-main,
  .ms-lf-pro-row-aside {
    font-size: 0.88rem;
  }
  .ms-lf-pro-row-pair-body {
    gap: 0.5rem;
  }
  .ms-lf-pro-row-main {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }
  .ms-lf-pro-row-aside {
    white-space: nowrap;
    flex-shrink: 0;
    overflow-wrap: normal;
  }
  .ms-lf-pro-foot {
    padding: 0.85rem 1rem 1rem;
    border-radius: 0 0 14px 14px;
  }
  .ms-lf-pro-generate {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  body[data-page="builder"].ms-lb-workspace,
  body[data-page="editor"].ms-lb-workspace {
    overflow: hidden;
    height: 100dvh;
    --ms-lb-mobile-chrome-h: calc(7.85rem + env(safe-area-inset-top, 0px));
  }
  body[data-page="builder"].ms-lb-workspace #builder-workspace,
  body[data-page="builder"].ms-lb-workspace .ms-builder-page,
  body[data-page="editor"].ms-lb-workspace #builder-workspace,
  body[data-page="editor"].ms-lb-workspace .ms-builder-page {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
  body.ms-lb-fullscreen .ms-lb-body {
    padding-top: max(0.55rem, env(safe-area-inset-top, 0px));
  }
  .ms-lb-nav-btn {
    padding: 0.42rem 0.72rem;
    font-size: 0.8rem;
  }
  .ms-lb-mode { padding: 0.14rem; }
  .ms-lb-mode-btn { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
  .ms-lb-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
  }
  .ms-lb-body {
    --ms-lb-tools-max: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding:
      var(--ms-lb-mobile-chrome-h)
      0.65rem
      max(0.55rem, env(safe-area-inset-bottom, 0px));
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .ms-lb-body.is-tools-expanded {
    --ms-lb-tools-max: none;
  }
  .ms-lb-pane-resizer {
    display: none;
  }
  .ms-lb-body > .ms-lb-chrome-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    order: 0;
    gap: 0.45rem;
    margin: 0;
    padding:
      max(0.35rem, env(safe-area-inset-top, 0px))
      0.65rem
      0.45rem;
    background:
      linear-gradient(
        180deg,
        rgba(243, 245, 248, 0.98) 0%,
        rgba(243, 245, 248, 0.94) 72%,
        rgba(243, 245, 248, 0.88) 100%
      );
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  }
  .ms-lb-body > .ms-lb-chrome-bar .ms-lb-viewports {
    min-height: 52px;
    padding: 0.4rem 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ms-lb-body > .ms-lb-chrome-bar .ms-lb-viewports::-webkit-scrollbar {
    display: none;
  }
  .ms-lb-body > .ms-lb-chrome-bar .ms-lb-icon-btn {
    width: 42px;
    height: 42px;
  }
  .ms-lb-main {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-height: min(42dvh, 340px);
    max-height: min(46dvh, 380px);
  }
  .ms-lb-side {
    order: 2;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: hidden;
    justify-content: flex-start;
    gap: 0;
    padding: 0.15rem 0.15rem max(0.5rem, env(safe-area-inset-bottom, 0px));
    transition: none;
  }

  .ms-lb-body.is-tools-expanded .ms-lb-side {
    max-height: none;
  }

  .ms-lb-side-controls {
    min-height: 0;
    flex: 1 1 auto;
    height: 100%;
    max-height: 100%;
    gap: 0.65rem;
    padding: 0.15rem 0 0.35rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  @media (prefers-reduced-motion: reduce) {
    .ms-lb-side {
      transition: none;
    }
  }
  .ms-lb-side-controls > .ms-lb-widget,
  .ms-lb-side-controls > .ms-lb-price,
  .ms-lb-side-controls > .ms-lb-publish-actions {
    flex-shrink: 0;
  }
  .ms-lb-widget-head {
    padding: 0.52rem 0.62rem;
    gap: 0.48rem;
  }
  .ms-lb-widget-copy h3 {
    font-size: 0.82rem;
  }
  .ms-lb-widget-copy .ms-muted {
    font-size: 0.7rem;
  }
  .ms-lb-price {
    padding: 0.72rem 0.75rem;
    gap: 0.6rem;
    border-radius: 14px;
  }
  .ms-lb-price-title {
    gap: 0.4rem;
  }
  .ms-lb-price-title > div > span {
    font-size: 0.68rem;
  }
  .ms-lb-price-rate {
    font-size: 0.58rem;
    padding: 0.22rem 0.42rem;
  }
  .ms-lb-price-stat {
    padding: 0.45rem 0.62rem 0.48rem;
    gap: 0.45rem;
  }
  .ms-lb-price-currency,
  .ms-lb-price-input {
    font-size: 1.28rem;
  }
  .ms-lb-price-hint {
    font-size: 0.67rem;
    line-height: 1.32;
  }
  .ms-lb-publish-actions {
    gap: 0.38rem;
  }
  .ms-lb-publish-btn {
    min-height: 46px;
    font-size: 0.94rem;
    border-radius: 12px;
  }
  .ms-lb-redesign-btn,
  .ms-lb-unpublish-btn,
  .ms-lb-delete-btn {
    min-height: 40px;
    font-size: 0.86rem;
    padding: 0.48rem 0.72rem;
    border-radius: 11px;
  }
  .ms-lb-redesign-label {
    white-space: normal;
    text-align: center;
  }
  .ms-lb-side-hero {
    display: none;
  }
  .ms-lb-dock {
    width: 100%;
  }
  .ms-lb-prompt {
    gap: 0.4rem;
    padding: 0.7rem 0.75rem 0.65rem;
    border-radius: 18px;
  }
  .ms-lb-prompt-input {
    min-height: 3.2rem;
  }
  .ms-lb-toggle-label {
    display: none;
  }
  .ms-preview-frame-wrap { min-height: 0; }
  .ms-lb-chrome-url-wrap {
    width: min(100%, 220px);
  }
  .ms-lb-chrome-url {
    font-size: 0.72rem;
  }

  .ms-fin-step-label {
    font-size: 0.62rem;
  }
  .ms-fin-steps {
    max-width: 100%;
    padding: 0 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-sidebar,
  .ms-menu-toggle,
  body::after {
    transition-duration: 0.01ms !important;
  }
}

/* Marketing home ΓÇö dashboard-aligned studio chrome */
.ms-home-greet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #fff;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-home-greet.is-done {
  opacity: 0;
}

.ms-home-greet-word {
  margin: 0;
  font-family: var(--ms-font);
  font-weight: 900;
  font-size: clamp(2.25rem, 8vw, 4.5rem);
  letter-spacing: -0.06em;
  color: #000;
  line-height: 1;
  text-transform: lowercase;
  user-select: none;
  will-change: transform, opacity;
  --ms-greet-max: 8;
  transform: scale(0.15);
  opacity: 0;
  transform-origin: center center;
  backface-visibility: hidden;
  white-space: nowrap;
}

.ms-home-greet-word.is-playing {
  animation: ms-home-greet-word 1.6s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

@keyframes ms-home-greet-word {
  0% {
    transform: scale(0.2) rotate(-4deg);
    opacity: 0;
  }
  14% {
    transform: scale(var(--ms-greet-max)) rotate(2deg);
    opacity: 1;
  }
  34% {
    transform: scale(var(--ms-greet-max)) rotate(-1deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.06) rotate(5deg);
    opacity: 0;
  }
}

.ms-home-shell {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.is-home-ready .ms-home-shell {
  opacity: 1;
  transform: none;
  animation: none;
}

body.ms-home-booting {
  overflow: hidden;
}

/* If greet JS stalls (e.g. fonts.ready never resolves), still reveal the homepage. */
@keyframes ms-home-shell-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

body.ms-home-booting .ms-home-shell {
  animation: ms-home-shell-failsafe 0.001s 2.8s forwards;
}

body.ms-home-booting.is-home-ready .ms-home-shell {
  animation: none;
}

.ms-home-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--ms-bg);
}

.ms-home-wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.9;
}

.ms-home-wash-a {
  width: min(70vw, 820px);
  height: min(70vw, 820px);
  right: -18%;
  top: -22%;
  background: radial-gradient(circle at 40% 40%, rgba(191, 219, 254, 0.7), transparent 68%);
  animation: ms-home-drift 18s ease-in-out infinite alternate;
}

.ms-home-wash-b {
  width: min(48vw, 560px);
  height: min(48vw, 560px);
  left: -14%;
  bottom: 4%;
  background: radial-gradient(circle at 55% 45%, rgba(226, 232, 240, 0.9), transparent 70%);
  animation: ms-home-drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes ms-home-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(2%, 3%, 0); }
}

.ms-home-hero,
.ms-home-section,
.ms-home-footer {
  position: relative;
  z-index: 1;
}

.ms-home-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: transparent;
  pointer-events: none;
}

.ms-home-nav .ms-home-brand,
.ms-home-nav .ms-home-orb {
  position: relative;
  z-index: 61;
  pointer-events: auto;
}

.ms-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ms-ink);
  position: relative;
  z-index: 50;
}

.ms-home-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 10px rgba(15, 23, 42, 0.06);
}

.ms-home-brand strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.ms-home-orb {
  appearance: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 50;
  flex-shrink: 0;
}

.ms-home-orb.is-open {
  background: transparent;
}

.ms-home-orb i {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: #0f172a;
  top: 50%;
  border-radius: 2px;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    background 0.3s ease;
}

.ms-home-orb i:nth-child(1) {
  transform: translateY(-7px);
}

.ms-home-orb i:nth-child(2) {
  transform: translateY(0);
}

.ms-home-orb i:nth-child(3) {
  transform: translateY(7px);
}

.ms-home-orb.is-open i {
  background: #fff;
}

.ms-home-orb.is-open i:nth-child(1) {
  transform: rotate(45deg);
}

.ms-home-orb.is-open i:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

.ms-home-orb.is-open i:nth-child(3) {
  transform: rotate(-45deg);
}

.ms-home-bloom {
  position: fixed;
  inset: 0;
  z-index: 55;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(59, 130, 246, 0.28), transparent 55%),
    #0f172a;
  clip-path: circle(0% at calc(100% - 2.6rem) 2.4rem);
  transition: clip-path 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.ms-home-bloom.is-open {
  clip-path: circle(150% at calc(100% - 2.6rem) 2.4rem);
  pointer-events: auto;
}

.ms-home-bloom-nav {
  text-align: center;
  display: grid;
  gap: clamp(1rem, 2.5vh, 1.75rem);
}

.ms-home-bloom-nav a {
  display: inline-block;
  justify-self: center;
  font-family: var(--ms-font);
  font-size: clamp(2rem, 7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  opacity: 0;
  transform: scale(0.94);
  position: relative;
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s ease;
}

.ms-home-bloom-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.06em;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
}

.ms-home-bloom.is-open .ms-home-bloom-nav a {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.18s + var(--nav-i, 0) * 0.08s);
}

.ms-home-bloom-nav a:hover {
  color: #93c5fd;
}

.ms-home-bloom-nav a:hover::after {
  transform: scaleX(1);
}

body.ms-home-menu-open {
  overflow: hidden;
}

body.ms-home-menu-open .ms-home-brand {
  color: #fff;
}

body.ms-home-menu-open .ms-home-brand img {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(15, 23, 42, 0.2);
}

.ms-home-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 2.5rem;
}

.ms-home-hero-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.65rem, 1.5vh, 1.15rem);
  perspective: 1000px;
}

.ms-home-cascade {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
  margin-top: clamp(-2.5rem, -5vh, -1.25rem);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(8, clamp(48px, 5.8vw, 78px));
  gap: 0.85rem;
}

/* Bento mosaic ΓÇö silhouette matches the cascade reference */
.ms-home-tile:nth-child(1) { grid-column: 1 / 6;  grid-row: 1 / 5; } /* A tall left */
.ms-home-tile:nth-child(2) { grid-column: 6 / 8;  grid-row: 1 / 3; } /* B small top */
.ms-home-tile:nth-child(3) { grid-column: 8 / 13; grid-row: 1 / 5; } /* C tall right */
.ms-home-tile:nth-child(4) { grid-column: 6 / 8;  grid-row: 3 / 5; } /* E under B */
.ms-home-tile:nth-child(5) { grid-column: 1 / 6;  grid-row: 5 / 7; } /* D mid left */
.ms-home-tile:nth-child(6) { grid-column: 6 / 13; grid-row: 5 / 7; } /* F wide silver */
.ms-home-tile:nth-child(7) { grid-column: 1 / 7;  grid-row: 7 / 9; } /* G wide bottom */
.ms-home-tile:nth-child(8) { grid-column: 7 / 10; grid-row: 7 / 9; } /* H */
.ms-home-tile:nth-child(9) { grid-column: 10 / 13; grid-row: 7 / 9; } /* I */

.ms-home-tile {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  overflow: visible;
  border-radius: 16px;
  background: transparent;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  min-width: 0;
  min-height: 0;
  perspective: 1100px;
}

body.is-home-ready .ms-home-tile:not(.is-ready) {
  animation: ms-home-tile-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 70ms);
}

.ms-home-tile.is-ready {
  animation: none;
  opacity: 1;
  transform: none;
}

.ms-home-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

@media (hover: hover) and (pointer: fine) {
  .ms-home-tile:hover .ms-home-tile-inner,
  .ms-home-tile:focus-within .ms-home-tile-inner {
    transform: rotateY(180deg);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
  }
}

.ms-home-tile.is-flipped .ms-home-tile-inner {
  transform: rotateY(180deg);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.ms-home-tile-face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ms-home-tile-face--front {
  background: linear-gradient(145deg, var(--a), var(--b));
}

.ms-home-tile-face--front::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.22));
  opacity: 0.7;
  pointer-events: none;
}

.ms-home-tile-face--back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: clamp(0.75rem, 1.4vw, 1.15rem);
  text-align: center;
  background:
    linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #f8fafc;
  transform: rotateY(180deg);
}

.ms-home-tile-face--back span {
  width: fit-content;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(147, 197, 253, 0.16);
  color: #bfdbfe;
  font-size: clamp(0.52rem, 0.85vw, 0.68rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ms-home-tile-face--back strong {
  font-size: clamp(0.78rem, 1.45vw, 1.12rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ms-home-tile-face--back p {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(0.62rem, 1.05vw, 0.84rem);
  line-height: 1.35;
  max-width: 16ch;
}

/* Compact backs for the smaller mosaic cells */
.ms-home-tile:nth-child(2) .ms-home-tile-face--back,
.ms-home-tile:nth-child(4) .ms-home-tile-face--back,
.ms-home-tile:nth-child(8) .ms-home-tile-face--back,
.ms-home-tile:nth-child(9) .ms-home-tile-face--back {
  padding: 0.65rem;
  gap: 0.25rem;
}

.ms-home-tile:nth-child(2) .ms-home-tile-face--back p,
.ms-home-tile:nth-child(4) .ms-home-tile-face--back p,
.ms-home-tile:nth-child(8) .ms-home-tile-face--back p,
.ms-home-tile:nth-child(9) .ms-home-tile-face--back p {
  display: none;
}

.ms-home-preset {
  position: absolute;
  inset: clamp(0.7rem, 1.25vw, 1rem);
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 0.5rem;
  padding: clamp(0.75rem, 1.4vw, 1.1rem);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 24% 20%, rgba(59, 130, 246, 0.16), transparent 42%);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #0f172a;
  overflow: hidden;
}

.ms-home-preset::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0.8rem;
  width: 1.85rem;
  height: 0.42rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, #60a5fa 0 26%, transparent 28%) 0 0 / 0.6rem 100%,
    radial-gradient(circle, #93c5fd 0 26%, transparent 28%) 0.55rem 0 / 0.6rem 100%,
    radial-gradient(circle, #cbd5e1 0 26%, transparent 28%) 1.1rem 0 / 0.6rem 100%;
  background-repeat: no-repeat;
  opacity: 0.95;
}

.ms-home-preset::after {
  content: "";
  position: absolute;
  inset: 2.1rem 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  pointer-events: none;
}

.ms-home-preset-kicker {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: clamp(0.48rem, 0.7vw, 0.64rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-home-preset strong {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  font-size: clamp(0.78rem, 1.5vw, 1.18rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.ms-home-preset i {
  position: relative;
  z-index: 1;
  display: block;
  height: 0.46rem;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.16);
}

.ms-home-preset i:nth-of-type(1) {
  width: 72%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.ms-home-preset i:nth-of-type(2) {
  width: 52%;
}

.ms-home-preset i:nth-of-type(3) {
  width: 84%;
}

.ms-home-preset--agency,
.ms-home-preset--restaurant,
.ms-home-preset--saas {
  grid-template-columns: minmax(0, 1fr) 36%;
  align-content: stretch;
}

.ms-home-preset--agency > *,
.ms-home-preset--restaurant > *,
.ms-home-preset--saas > * {
  grid-column: 1;
  align-self: end;
}

.ms-home-preset--agency::after,
.ms-home-preset--restaurant::after,
.ms-home-preset--saas::after {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(125, 211, 252, 0.74)) right 1rem top 3rem / 32% 42% no-repeat,
    linear-gradient(135deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.02)) right 1rem bottom 1rem / 32% 20% no-repeat;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0 0 12px 12px;
}

.ms-home-preset--restaurant {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.78)),
    radial-gradient(circle at 20% 18%, rgba(96, 165, 250, 0.45), transparent 42%);
  border-color: rgba(148, 163, 184, 0.34);
  color: #f8fafc;
}

.ms-home-preset--restaurant .ms-home-preset-kicker {
  background: rgba(147, 197, 253, 0.14);
  color: #bfdbfe;
}

.ms-home-preset--restaurant i {
  background: rgba(226, 232, 240, 0.18);
}

.ms-home-preset--restaurant i:nth-of-type(1) {
  background: linear-gradient(90deg, #60a5fa, #bfdbfe);
}

.ms-home-preset--creator,
.ms-home-preset--booking,
.ms-home-preset--local,
.ms-home-preset--shop {
  inset: 0.55rem;
  padding: 0.65rem;
  align-content: end;
  gap: 0.38rem;
}

.ms-home-preset--creator strong,
.ms-home-preset--booking strong,
.ms-home-preset--local strong,
.ms-home-preset--shop strong {
  font-size: clamp(0.7rem, 1.25vw, 0.92rem);
}

.ms-home-preset--booking {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(239, 246, 255, 0.58)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), transparent);
}

.ms-home-preset--checkout {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.74)),
    radial-gradient(circle at 26% 24%, rgba(37, 99, 235, 0.16), transparent 44%);
}

.ms-home-preset--portfolio::after,
.ms-home-preset--checkout::after {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.18), transparent) left 1rem top 3.2rem / 58% 1.1rem no-repeat,
    linear-gradient(90deg, rgba(37, 99, 235, 0.85), rgba(56, 189, 248, 0.72)) right 1rem bottom 1rem / 38% 2.6rem no-repeat;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

@keyframes ms-home-tile-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.ms-home-hero-copy {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 40rem);
  min-height: calc(100svh - 5.75rem - clamp(10rem, 22vh, 16rem));
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(16px);
}

body.is-home-ready .ms-home-hero-copy {
  animation: ms-home-copy-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes ms-home-copy-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ms-home-title {
  margin: 0;
  font-size: clamp(2.65rem, 5.5vw, 3.65rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #0f172a;
  white-space: nowrap;
}

.ms-home-title-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 45%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ms-home-sub {
  margin: 0;
  color: var(--ms-muted);
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: min(36rem, 100%);
  font-weight: 400;
  text-wrap: pretty;
}

.ms-home-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.25rem;
}

.ms-home-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 22px rgba(59, 130, 246, 0.28);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease;
}

.ms-home-cta-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ms-home-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--ms-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--ms-line);
  transition: background 0.15s ease;
}

.ms-home-cta-secondary:hover {
  background: #f8fafc;
}

.ms-home-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid var(--ms-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.ms-home-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.55rem 1.4rem;
  min-width: 0;
  text-align: center;
  border-right: 1px solid var(--ms-line);
}

.ms-home-stat:last-child {
  border-right: none;
}

.ms-home-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-home-stat-value {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.3;
}

.ms-home-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 4vw, 3rem) 0.5rem;
  text-align: center;
}

.ms-home-section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.ms-home-section-lead {
  margin: 0 auto;
  color: var(--ms-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

.ms-home-faq {
  text-align: left;
  max-width: 42rem;
}

.ms-home-faq-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.ms-home-faq-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.15rem 1rem;
}

.ms-home-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  padding: 0.85rem 0;
  list-style: none;
}

.ms-home-faq-item summary::-webkit-details-marker {
  display: none;
}

.ms-home-faq-item p {
  margin: 0 0 1rem;
  color: var(--ms-muted);
  line-height: 1.55;
}

.ms-home-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
}

.ms-home-footer-legal a {
  color: #64748b;
  font-size: 0.88rem;
  text-decoration: none;
}

.ms-home-footer-legal a:hover {
  color: #2563eb;
}

.ms-home-method-section {
  max-width: 1080px;
  padding-top: 4.5rem;
  padding-bottom: 1rem;
}

.ms-home-method-head {
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.ms-home-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-home-method-badge svg {
  flex-shrink: 0;
}

.ms-home-method-section h2 {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: 0.75rem;
}

.ms-home-method-section h2 span {
  background: linear-gradient(105deg, #2563eb 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ms-home-method {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  perspective: 1000px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.ms-home-method-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 30%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.ms-home-method-card.is-tiltable {
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: box-shadow 0.2s ease;
}

.ms-home-method-card.is-tiltable.is-settling {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}

.ms-home-method-card.is-tiltable:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 28px 56px rgba(15, 23, 42, 0.12);
}

.ms-home-method-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.55), transparent 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  mix-blend-mode: soft-light;
}

.ms-home-method-card.is-tiltable:hover::after {
  opacity: 1;
}

.ms-home-method-viz {
  padding: 1.1rem 1.1rem 0.85rem;
  background: #f8fafc;
}

.ms-home-method-mock {
  min-height: 148px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: grid;
  place-items: center;
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.ms-home-method-mock--find {
  gap: 0.7rem;
  align-content: center;
}

.ms-home-method-prompt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #fff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.06);
}

.ms-home-method-prompt i {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  flex-shrink: 0;
  position: relative;
}

.ms-home-method-prompt i::before {
  content: "";
  position: absolute;
  inset: 0.42rem;
  border: 1.5px solid #fff;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
}

.ms-home-method-chips {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

.ms-home-method-chips em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

.ms-home-method-mock--form {
  place-items: start center;
  align-content: center;
  gap: 0.75rem;
}

.ms-home-method-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ms-home-method-select {
  position: relative;
  padding: 0.35rem 0.45rem;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.06);
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.ms-home-method-select span {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 1px;
  background: #2563eb;
  vertical-align: text-bottom;
  animation: ms-method-caret 1s steps(1) infinite;
}

@keyframes ms-method-caret {
  50% { opacity: 0; }
}

.ms-home-method-mock--close {
  place-items: stretch;
  align-content: center;
  gap: 0.65rem;
}

.ms-home-method-payhead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #0f172a;
}

.ms-home-method-payhead b {
  font-size: 0.82rem;
  font-weight: 700;
}

.ms-home-method-domain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.ms-home-method-domain em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
}

.ms-home-method-bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8 70%, #e2e8f0 70%);
}

.ms-home-method-body {
  padding: 1.15rem 1.25rem 1.35rem;
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 0.35rem;
}

.ms-home-method-num {
  width: auto;
  height: auto;
  display: block;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  place-items: unset;
}

.ms-home-method-body strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}

.ms-home-method-body p {
  margin: 0;
  color: var(--ms-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ms-home-method-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto 0;
  padding: 0.95rem 1.85rem;
  border-radius: 999px;
  background: linear-gradient(105deg, #1d4ed8, #3b82f6 55%, #38bdf8);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ms-home-method-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
}

.ms-home-footer {
  max-width: 1080px;
  margin: 3.5rem auto 0;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid var(--ms-line);
}

.ms-home-footer-copy {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.ms-home-footer-copy p {
  margin: 0;
  max-width: 28rem;
  color: var(--ms-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.ms-home-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-shrink: 0;
}

.ms-home-footer-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.45rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 22px rgba(59, 130, 246, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ms-home-footer-signup:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff;
}

.ms-home-footer-signin {
  color: var(--ms-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.ms-home-footer-signin:hover {
  color: var(--ms-ink);
}

.ms-home-footer .ms-home-brand {
  color: var(--ms-ink);
  text-decoration: none;
}

@media (max-width: 720px) {
  .ms-home-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .ms-home-footer-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .ms-home-nav {
    padding:
      max(1.35rem, calc(env(safe-area-inset-top, 0px) + 0.85rem))
      max(1.35rem, env(safe-area-inset-right))
      1.15rem
      max(1.35rem, env(safe-area-inset-left));
  }

  .ms-home-hero {
    padding:
      0
      max(1.15rem, env(safe-area-inset-right))
      2.25rem
      max(1.15rem, env(safe-area-inset-left));
  }

  .ms-home-hero-stage {
    gap: 1.1rem;
    width: 100%;
    align-items: stretch;
  }

  .ms-home-hero-copy {
    width: 100%;
    max-width: none;
    min-height: calc(100svh - 5.75rem - clamp(12rem, 38vh, 22rem));
    margin: 0 auto;
    padding: clamp(1.25rem, 4vh, 2rem) 0 0.75rem;
    gap: 0.85rem;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .ms-home-title {
    font-size: clamp(1.45rem, 6.6vw, 2.55rem);
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ms-home-sub {
    font-size: clamp(0.9rem, 3.7vw, 1.02rem);
    max-width: 100%;
    padding-inline: 0;
    line-height: 1.45;
  }

  .ms-home-ctas {
    width: 100%;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 0.35rem;
  }

  .ms-home-cascade {
    max-width: none;
    width: 100%;
    margin-top: 0.65rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(8, clamp(52px, 10.5vw, 76px));
    gap: 0.7rem;
  }

  .ms-home-tile:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 4; }
  .ms-home-tile:nth-child(2) { grid-column: 4 / 7; grid-row: 1 / 3; }
  .ms-home-tile:nth-child(3) { grid-column: 4 / 7; grid-row: 3 / 5; }
  .ms-home-tile:nth-child(4) { grid-column: 1 / 4; grid-row: 4 / 5; }
  .ms-home-tile:nth-child(5) { grid-column: 1 / 3; grid-row: 5 / 7; }
  .ms-home-tile:nth-child(6) { grid-column: 3 / 7; grid-row: 5 / 7; }
  .ms-home-tile:nth-child(7) { grid-column: 1 / 4; grid-row: 7 / 9; }
  .ms-home-tile:nth-child(8) { grid-column: 4 / 6; grid-row: 7 / 9; }
  .ms-home-tile:nth-child(9) { grid-column: 6 / 7; grid-row: 7 / 9; }

  .ms-home-tile,
  .ms-home-tile-inner,
  .ms-home-tile-face {
    border-radius: 16px;
  }

  .ms-home-preset {
    inset: 0.55rem;
    padding: 0.65rem;
    border-radius: 12px;
    gap: 0.4rem;
  }

  .ms-home-preset::before {
    top: 0.5rem;
    left: 0.6rem;
    width: 1.45rem;
    height: 0.32rem;
  }

  .ms-home-preset::after {
    inset: 1.65rem 0 0;
  }

  .ms-home-preset strong {
    font-size: clamp(0.72rem, 2.9vw, 1rem);
  }

  .ms-home-preset-kicker {
    font-size: 0.5rem;
    padding: 0.18rem 0.45rem;
  }

  .ms-home-preset i {
    height: 0.36rem;
  }

  .ms-home-tile-face--back {
    padding: 0.7rem;
    gap: 0.35rem;
  }

  .ms-home-tile-face--back strong {
    font-size: clamp(0.78rem, 3.1vw, 1rem);
  }

  .ms-home-tile-face--back p {
    font-size: clamp(0.64rem, 2.5vw, 0.8rem);
  }

  .ms-home-stats {
    grid-template-columns: 1fr;
  }

  .ms-home-stat {
    border-right: none;
    border-bottom: 1px solid var(--ms-line);
  }

  .ms-home-stat:last-child {
    border-bottom: none;
  }

  .ms-home-section {
    padding: 3rem max(1.35rem, env(safe-area-inset-right)) 0.75rem max(1.35rem, env(safe-area-inset-left));
  }

  .ms-home-method-section {
    padding-top: 3.25rem;
    padding-bottom: 1rem;
  }

  .ms-home-method-head {
    margin-bottom: 1.65rem;
    text-align: left;
  }

  .ms-home-method-section h2 {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
  }

  .ms-home-section-lead {
    font-size: 1.02rem;
    max-width: 34rem;
  }

  .ms-home-method {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ms-home-method-mock {
    min-height: 132px;
  }

  .ms-home-method-cta {
    width: min(100%, 22rem);
    margin-inline: 0;
  }

  .ms-home-footer {
    margin-top: 3rem;
    padding:
      1.85rem
      max(1.35rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1.35rem, env(safe-area-inset-left));
  }

  .ms-home-bloom {
    clip-path: circle(0% at calc(100% - 2.1rem) 2.35rem);
    padding:
      max(5.75rem, env(safe-area-inset-top))
      max(1.5rem, env(safe-area-inset-right))
      max(2.25rem, env(safe-area-inset-bottom))
      max(1.5rem, env(safe-area-inset-left));
  }

  .ms-home-bloom.is-open {
    clip-path: circle(160% at calc(100% - 2.1rem) 2.35rem);
  }

  .ms-home-bloom-nav {
    width: 100%;
    max-width: 22rem;
    gap: 1.25rem;
  }

  .ms-home-bloom-nav a {
    font-size: clamp(1.55rem, 8.5vw, 2.65rem);
    max-width: 100%;
    line-height: 1.2;
  }
}

@media (max-width: 640px) {
  .ms-home-nav {
    padding-top: max(1.25rem, calc(env(safe-area-inset-top, 0px) + 0.75rem));
  }

  .ms-home-hero-copy {
    gap: 0.8rem;
    min-height: calc(100svh - 5.75rem - clamp(11rem, 36vh, 20rem));
  }

  .ms-home-ctas {
    gap: 0.75rem;
    flex-direction: column;
    align-items: center;
  }

  .ms-home-brand {
    min-width: 0;
    gap: 0.55rem;
  }

  .ms-home-brand img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .ms-home-brand strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ms-home-orb {
    width: 42px;
    height: 42px;
  }

  .ms-home-cta-primary,
  .ms-home-cta-secondary {
    width: min(100%, 18rem);
    min-height: 3rem;
    font-size: 0.98rem;
    padding: 0.8rem 1.1rem;
  }
}

@media (max-width: 520px) {
  .ms-home-hero {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: 2rem;
  }

  .ms-home-hero-copy {
    min-height: calc(100svh - 5.75rem - clamp(10rem, 34vh, 18rem));
    padding: clamp(1rem, 3vh, 1.5rem) 0 0.5rem;
    gap: 0.75rem;
  }

  .ms-home-title {
    font-size: clamp(1.35rem, 6.8vw, 1.85rem);
    letter-spacing: -0.055em;
  }

  .ms-home-sub {
    font-size: clamp(0.84rem, 3.5vw, 0.96rem);
    max-width: 100%;
    line-height: 1.42;
  }

  .ms-home-cascade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(6.1rem, 27vw, 7.35rem);
    grid-template-rows: none;
    gap: 0.65rem;
  }

  .ms-home-tile:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }

  .ms-home-tile:first-child,
  .ms-home-tile:nth-child(7) {
    grid-column: 1 / -1;
  }

  .ms-home-preset {
    inset: 0.5rem;
    padding: 0.6rem;
  }

  .ms-home-preset strong {
    max-width: 15ch;
  }

  .ms-home-tile:nth-child(2) .ms-home-preset::before,
  .ms-home-tile:nth-child(4) .ms-home-preset::before,
  .ms-home-tile:nth-child(8) .ms-home-preset::before,
  .ms-home-tile:nth-child(9) .ms-home-preset::before,
  .ms-home-tile:nth-child(2) .ms-home-preset::after,
  .ms-home-tile:nth-child(4) .ms-home-preset::after,
  .ms-home-tile:nth-child(8) .ms-home-preset::after,
  .ms-home-tile:nth-child(9) .ms-home-preset::after {
    display: none;
  }

  .ms-home-tile:nth-child(2) .ms-home-preset i,
  .ms-home-tile:nth-child(4) .ms-home-preset i,
  .ms-home-tile:nth-child(8) .ms-home-preset i,
  .ms-home-tile:nth-child(9) .ms-home-preset i {
    display: none;
  }

  .ms-home-tile-face--back p {
    display: none;
  }

  .ms-home-greet-word {
    font-size: clamp(1.85rem, 11vw, 3rem);
    padding-inline: 1rem;
  }
}

@media (max-width: 380px) {
  .ms-home-brand strong {
    max-width: 9.5rem;
  }

  .ms-home-title {
    font-size: clamp(1.28rem, 7.2vw, 1.55rem);
  }

  .ms-home-sub {
    font-size: 0.82rem;
  }

  .ms-home-cascade {
    grid-auto-rows: clamp(5.5rem, 26vw, 6.5rem);
  }
}

@media (max-height: 740px) and (max-width: 800px) {
  .ms-home-hero-copy {
    min-height: auto;
    padding: 1rem 0 0.5rem;
    gap: 0.6rem;
  }

  .ms-home-hero-stage {
    gap: 0.85rem;
  }

  .ms-home-cascade {
    grid-auto-rows: clamp(5.25rem, 24vw, 6.25rem);
    gap: 0.6rem;
  }
}

@media (max-height: 700px) and (min-width: 801px) {
  .ms-home-hero-copy {
    min-height: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-home-wash-a,
  .ms-home-wash-b,
  .ms-home-tile,
  .ms-home-hero-copy,
  .ms-home-bloom,
  .ms-home-bloom-nav a,
  .ms-home-orb i,
  .ms-home-greet-word,
  .ms-home-shell,
  .ms-home-greet {
    animation: none;
    transition: none;
  }

  .ms-home-tile {
    opacity: 1;
    transform: none;
  }

  .ms-home-hero-copy {
    opacity: 1;
    transform: none;
  }

  .ms-home-tile-inner {
    transition: none;
  }

  .ms-home-tile:hover .ms-home-tile-inner,
  .ms-home-tile:focus-within .ms-home-tile-inner,
  .ms-home-tile.is-flipped .ms-home-tile-inner {
    transform: none;
  }

  .ms-home-tile-face--back {
    display: none;
  }

  .ms-home-method-card.is-tiltable {
    transform: none;
    transition: none;
  }

  .ms-home-method-card.is-tiltable.is-settling {
    transition: none;
  }

  .ms-home-method-select span {
    animation: none;
  }

  .ms-home-hero-copy {
    opacity: 1;
    transform: none;
  }

  .ms-home-bloom.is-open .ms-home-bloom-nav a {
    opacity: 1;
    transform: none;
  }

  .ms-home-shell {
    opacity: 1;
    transform: none;
  }

  .ms-home-greet {
    display: none;
  }
}

@media (max-width: 640px) {
  .ms-fin-step-label {
    max-width: 4.5rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
  .ms-fin-step {
    min-width: 0;
    flex: 1;
  }
  .ms-fin-step-line {
    min-width: 12px;
    max-width: 28px;
    margin-bottom: 1.4rem;
  }
  .ms-fin-hero h1 {
    font-size: clamp(1.7rem, 6vw, 2rem);
  }
  .ms-lb-toggle-label {
    display: none;
  }
}

/* ΓÇöΓÇö Sliding multi-way segment switches ΓÇöΓÇö */
.seg-switch {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Builder chrome islands stay absolute over the stage ΓÇö .seg-switch must not pull them into flow */
.ms-lb-island.seg-switch {
  position: absolute;
}

.seg-switch-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 999px;
  box-sizing: border-box;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transform: translate(0, 0);
  will-change: transform, width, height;
  transition:
    transform var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1)),
    width var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1)),
    height var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1)),
    opacity 0.22s ease;
}

.seg-switch.is-ready > .seg-switch-indicator {
  opacity: 1;
}

.seg-switch[data-seg-tone="surface"] > .seg-switch-indicator {
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.seg-switch[data-seg-tone="primary"] > .seg-switch-indicator {
  background: var(--ms-accent, #3b82f6);
  border: none;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.28);
}

.seg-switch > .ms-auth-tab,
.seg-switch > .ms-lb-mode-btn,
.seg-switch > .ms-lb-icon-btn,
.seg-switch > .lf-toggle-btn,
.seg-switch > .settings-segment-btn,
.seg-switch > .ms-lf-website-btn,
.seg-switch > .ms-dash-projects-filter {
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.seg-switch > .ms-auth-tab:hover,
.seg-switch > .ms-auth-tab:active,
.seg-switch > .ms-lb-mode-btn:hover,
.seg-switch > .ms-lb-mode-btn:active,
.seg-switch > .ms-lb-icon-btn:hover,
.seg-switch > .ms-lb-icon-btn:active,
.seg-switch > .lf-toggle-btn:hover,
.seg-switch > .lf-toggle-btn:active,
.seg-switch > .settings-segment-btn:hover,
.seg-switch > .settings-segment-btn:active,
.seg-switch > .ms-lf-website-btn:hover,
.seg-switch > .ms-lf-website-btn:active,
.seg-switch > .ms-dash-projects-filter:hover,
.seg-switch > .ms-dash-projects-filter:active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.seg-switch.is-ready > .ms-auth-tab.is-active,
.seg-switch.is-ready > .ms-lb-mode-btn.is-active,
.seg-switch.is-ready > .ms-lb-icon-btn.is-active,
.seg-switch.is-ready > .lf-toggle-btn.active,
.seg-switch.is-ready > .settings-segment-btn.active,
.seg-switch.is-ready > .ms-lf-website-btn.is-active,
.seg-switch.is-ready > .ms-lf-website-btn.active,
.seg-switch.is-ready > .ms-dash-projects-filter.is-active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

.ms-auth-tabs.seg-switch,
.lf-website-toggle.seg-switch,
.lf-advanced-pills.seg-switch {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ms-lb-mode.seg-switch,
.ms-lb-viewports.seg-switch {
  overflow: hidden;
  isolation: isolate;
}

.ms-lb-viewports.seg-switch > .seg-switch-indicator {
  border-radius: 10px;
}

.ms-auth-tabs.seg-switch > .seg-switch-indicator {
  border-radius: 8px;
}

/* ΓÇöΓÇö Primary button premium press ΓÇöΓÇö */
.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger),
a.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger),
.ms-home-cta-primary,
.lf-action-builder,
.ms-lb-send,
#btn-checkout,
.ms-fin-next,
.ms-fin-save,
.ms-lf-find {
  transform: translateZ(0) scale(1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger):focus,
a.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger):focus,
.ms-home-cta-primary:focus,
.lf-action-builder:focus,
.ms-lb-send:focus,
#btn-checkout:focus,
.ms-fin-next:focus,
.ms-fin-save:focus,
.ms-lf-find:focus {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 8px 18px rgba(37, 99, 235, 0.28),
    0 2px 4px rgba(37, 99, 235, 0.18);
}

.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger):focus-visible,
a.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger):focus-visible,
.ms-home-cta-primary:focus-visible,
.lf-action-builder:focus-visible,
.ms-lb-send:focus-visible,
#btn-checkout:focus-visible,
.ms-fin-next:focus-visible,
.ms-fin-save:focus-visible,
.ms-lf-find:focus-visible {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 8px 18px rgba(37, 99, 235, 0.28),
    0 2px 4px rgba(37, 99, 235, 0.18);
}

.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger).is-pressed,
a.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger).is-pressed,
.ms-home-cta-primary.is-pressed,
.lf-action-builder.is-pressed,
.ms-lb-send.is-pressed,
#btn-checkout.is-pressed,
.ms-fin-next.is-pressed,
.ms-fin-save.is-pressed,
.ms-lf-find.is-pressed {
  transition: none !important;
  animation: ms-btn-press 0.42s cubic-bezier(0.33, 1, 0.32, 1);
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes ms-btn-press {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(0.5px) scale(0.985);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.22) inset,
      0 -1px 0 rgba(15, 23, 42, 0.1) inset,
      0 4px 10px rgba(37, 99, 235, 0.22),
      0 1px 3px rgba(37, 99, 235, 0.14);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 -1px 0 rgba(15, 23, 42, 0.12) inset,
      0 8px 18px rgba(37, 99, 235, 0.28),
      0 2px 4px rgba(37, 99, 235, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .seg-switch-indicator {
    transition: none;
  }

  .ms-expand,
  .ms-panel-anim,
  .ms-paywall,
  .ms-paywall-card {
    transition: none !important;
  }

  .ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger).is-pressed,
  a.ms-btn:not(.ms-btn-secondary):not(.ms-btn-danger).is-pressed,
  .ms-home-cta-primary.is-pressed,
  .lf-action-builder.is-pressed,
  .ms-lb-send.is-pressed,
  #btn-checkout.is-pressed,
  .ms-fin-next.is-pressed,
  .ms-fin-save.is-pressed,
  .ms-lf-find.is-pressed {
    animation: none;
  }

  .ms-btn:hover:not(:disabled):not(.ms-btn-secondary):not(.ms-btn-danger),
  .ms-lf-find:hover,
  .ms-home-cta-primary:hover,
  .ms-lb-send:hover:not(:disabled) {
    transform: none;
  }
}

/* ΓÇöΓÇö Smooth expand / panel motion ΓÇöΓÇö */
.ms-expand {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1)),
    opacity 0.32s var(--ms-motion-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.ms-expand.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.ms-expand-inner {
  overflow: hidden;
  min-height: 0;
}

.ms-panel-anim {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.992);
  backface-visibility: hidden;
  transition:
    opacity var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1)),
    transform var(--ms-motion-dur-panel, 0.44s) var(--ms-motion-ease-soft, cubic-bezier(0.16, 1, 0.3, 1));
}

.ms-panel-anim.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.ms-fin-method-fields.ms-expand {
  margin-top: 0;
  transition:
    grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin-top 0.28s ease;
}

.ms-fin-method-fields.ms-expand.is-open {
  margin-top: 0.55rem;
}

.ms-fin-panel.ms-panel-anim:not(.is-visible) {
  position: absolute;
  pointer-events: none;
  width: 100%;
}

.ms-fin-card {
  position: relative;
}

/* Payout method picker (onboarding + settings) */
.ms-phone {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
}

.ms-phone-country {
  position: relative;
  flex-shrink: 0;
}

.ms-phone-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  min-height: 2.85rem;
  padding: 0 0.75rem 0 0.7rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ms-phone-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ms-phone-country.is-open .ms-phone-trigger,
.ms-phone-trigger:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--ms-accent) 55%, #e2e8f0);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-accent) 16%, transparent);
}

.ms-phone-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.ms-phone-dial {
  letter-spacing: -0.01em;
}

.ms-phone-chevron {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  transition: transform 0.18s ease;
}

.ms-phone-country.is-open .ms-phone-chevron {
  transform: rotate(180deg);
}

.ms-phone-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 40;
  width: min(280px, 78vw);
  max-height: 260px;
  overflow: auto;
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  animation: ms-phone-menu-in 0.16s ease;
}

@keyframes ms-phone-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ms-phone-option {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.ms-phone-option:hover,
.ms-phone-option:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.ms-phone-option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
}

.ms-phone-option-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.ms-phone-option-name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-phone-option-dial {
  font-size: 0.82rem;
  font-weight: 650;
  color: #64748b;
}

.ms-phone-option.is-selected .ms-phone-option-dial {
  color: #3b82f6;
}

.ms-phone-input {
  flex: 1;
  min-width: 0;
}

@keyframes ms-invalid-pulse {
  0%,
  100% {
    border-color: #fca5a5;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
  40% {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.28);
  }
  70% {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16);
  }
}

.ms-input.is-invalid-pulse {
  animation: ms-invalid-pulse 0.55s ease 3;
  border-color: #ef4444 !important;
}

.ms-phone.is-invalid-pulse .ms-phone-trigger,
.ms-phone.is-invalid-pulse .ms-phone-input {
  animation: ms-invalid-pulse 0.55s ease 3;
  border-color: #ef4444 !important;
}

.ms-fin-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1.15rem;
}

.ms-fin-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 72px;
}

.ms-fin-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  position: relative;
}

.ms-fin-step-check {
  display: none;
}

.ms-fin-step.is-active .ms-fin-step-dot,
.ms-fin-step.is-done .ms-fin-step-dot {
  background: var(--ms-accent);
}

.ms-fin-step.is-done .ms-fin-step-num {
  display: none;
}

.ms-fin-step.is-done .ms-fin-step-check {
  display: block;
}

.ms-fin-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.ms-fin-step.is-active .ms-fin-step-label {
  color: var(--ms-accent);
}

.ms-fin-step.is-done .ms-fin-step-label {
  color: #64748b;
}

.ms-fin-step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 0.35rem 1.1rem;
  min-width: 28px;
  max-width: 64px;
}

.ms-fin-card,
.ms-fin-saved {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  padding: 1.5rem 1.55rem 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ms-fin-card {
  width: 100%;
}

.ms-fin-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.ms-fin-panel-sub {
  margin: 0 0 0.95rem;
  color: var(--ms-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.ms-fin-panel .ms-field {
  margin-bottom: 0.7rem;
}

.ms-req {
  color: #ef4444;
}

.ms-optional {
  color: #94a3b8;
  font-weight: 500;
}

.ms-fin-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 96px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  padding: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ms-fin-upload:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.ms-fin-upload.has-logo {
  border-style: solid;
  border-color: #bfdbfe;
}

.ms-fin-upload-ico {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}

.ms-fin-upload-ico svg {
  width: 100%;
  height: 100%;
}

.ms-fin-upload-text {
  font-size: 0.84rem;
  font-weight: 600;
}

.ms-fin-logo-preview {
  max-height: 56px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 8px;
}

.ms-fin-methods {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}

.ms-fin-method {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.7rem 0.15rem;
}

.ms-fin-method:last-child {
  border-bottom: none;
}

.ms-fin-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ms-fin-method-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.ms-fin-method-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

.ms-fin-method-fallback {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ms-fin-method-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
}

.ms-fin-method-fields {
  margin-top: 0.55rem;
}

.ms-fin-method-hint {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.ms-fin-toggle .ms-lb-switch {
  width: 40px;
  height: 22px;
}

.ms-fin-toggle .ms-lb-switch::after {
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
}

.ms-fin-toggle input:checked + .ms-lb-switch::after {
  transform: translateX(18px);
}

.ms-fin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.ms-fin-actions--end {
  justify-content: flex-end;
}

.ms-fin-actions--center {
  justify-content: center;
}

.ms-fin-skip[hidden] {
  display: none !important;
}

.ms-fin-next,
.ms-fin-save,
.ms-fin-back {
  border-radius: 999px !important;
  padding: 0.65rem 1.15rem !important;
  font-weight: 600;
}

.ms-fin-next,
.ms-fin-save {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 10px 22px rgba(59, 130, 246, 0.3) !important;
}

.ms-fin-save {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #60a5fa 0%, #3b82f6 45%, #6366f1 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.ms-fin-back {
  color: var(--ms-accent) !important;
  border-color: #93c5fd !important;
  background: #fff !important;
}

.ms-fin-review {
  display: grid;
  gap: 0.75rem;
}

.ms-fin-review-block {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.ms-fin-review-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.ms-fin-review-biz {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ms-fin-review-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ms-fin-review-line {
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.45;
}

.ms-fin-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  color: #334155;
}

.ms-fin-review-method {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ms-fin-review-method-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.ms-fin-review-row strong {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.ms-fin-saved-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.ms-fin-saved-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.ms-fin-saved-head .ms-muted {
  margin: 0;
  font-size: 0.84rem;
}

#fin-error,
#fin-ok {
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .ms-fin-hero h1 {
    font-size: clamp(1.7rem, 6vw, 2rem);
  }

  .ms-fin-step-label {
    font-size: 0.65rem;
  }

  .ms-fin-card,
  .ms-fin-saved {
    padding: 1rem;
    border-radius: 14px;
  }

  .ms-fin-saved-head {
    flex-direction: column;
  }
}

/* ===== Install / Add to Home Screen hint (Dashboard only) ===== */
.ios-install-banner {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 99995;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  align-items: center;
  column-gap: 14px;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 14px 12px 14px 14px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow:
    0 10px 28px -10px rgba(15, 23, 42, 0.24),
    0 2px 6px rgba(15, 23, 42, 0.05);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition:
    opacity 0.34s ease-out,
    transform 0.34s ease-out;
}
.ios-install-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.ios-install-banner.is-leaving {
  opacity: 0;
  transform: translate(-50%, 22px);
  pointer-events: none;
}
.ios-install-banner--installable {
  cursor: pointer;
}
.ios-install-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
  overflow: hidden;
  display: block;
}
.ios-install-banner-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 13.5px;
  line-height: 1.4;
}
.ios-install-banner-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-install-banner-text span {
  color: #64748b;
  display: block;
}
.ios-install-banner-text em {
  font-style: normal;
  font-weight: 650;
  color: #0f172a;
}
.ios-install-banner-share {
  display: inline-flex;
  vertical-align: -3px;
  margin: 0 1px;
}
.ios-install-banner-share svg {
  width: 14px;
  height: 14px;
  color: #2563eb;
}
.ios-install-banner-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  margin-top: -2px;
  font-size: 20px;
  line-height: 1;
  color: #f87171;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}
.ios-install-banner-close:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #ef4444;
}

@media (min-width: 900px) {
  .ios-install-banner {
    width: min(520px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    grid-template-columns: 56px minmax(0, 1fr) 36px;
    column-gap: 16px;
    padding: 18px 14px 18px 18px;
    border-radius: 20px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .ios-install-banner-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .ios-install-banner-text {
    font-size: 14.5px;
    gap: 4px;
  }
  .ios-install-banner-text strong {
    font-size: 18px;
  }
  .ios-install-banner-share svg {
    width: 15px;
    height: 15px;
  }
  .ios-install-banner-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .ios-install-banner {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    column-gap: 12px;
    padding: 13px 10px 13px 13px;
    border-radius: 16px;
    grid-template-columns: 44px minmax(0, 1fr) 30px;
  }
  .ios-install-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
  .ios-install-banner-text {
    font-size: 13px;
  }
  .ios-install-banner-text strong {
    font-size: 15px;
  }
  .ios-install-banner-close {
    width: 30px;
    height: 30px;
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ios-install-banner {
    transition: opacity 0.12s linear;
    transform: translate(-50%, 0);
  }
  .ios-install-banner.is-leaving {
    transform: translate(-50%, 0);
  }
}

/* ΓöÇΓöÇ My clients (owner-only) ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ */

.ms-clients-page .ms-page-head {
  margin-bottom: 1.35rem;
}

.ms-clients-card {
  padding: clamp(1.15rem, 3vw, 1.65rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ms-clients-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.ms-clients-section-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  min-width: 0;
}

.ms-clients-section-copy h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#ms-clients-creator-col[hidden] {
  display: none !important;
}

.ms-clients-creator {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.ms-clients-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.ms-payouts-page .ms-page-head {
  margin-bottom: 0.75rem;
}

.ms-payouts-lead {
  margin: 0.35rem 0 0;
  max-width: 42rem;
}

.ms-payouts-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.ms-payouts-stat {
  padding: 0.9rem 1rem;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.ms-payouts-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-payouts-stat-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ms-payouts-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.ms-payouts-tab {
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: #64748b;
  background: transparent;
  cursor: pointer;
}

.ms-payouts-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ms-payouts-table .ms-payouts-owed {
  font-weight: 700;
  color: #15803d;
}

.ms-payouts-subline {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
}

.ms-payouts-when,
.ms-payouts-details,
.ms-payouts-contact {
  font-size: 0.82rem;
}

.ms-payouts-mark-paid {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ms-payouts-summary {
    grid-template-columns: 1fr;
  }
}

.ms-clients-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0;
}

.ms-clients-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  background: #f8fafc;
}

.ms-clients-export-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-muted);
  white-space: nowrap;
}

.ms-clients-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.ms-clients-export-btn {
  min-height: 30px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 10px;
}

.ms-clients-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ms-line);
  border-radius: 14px;
  background: #fff;
}

.ms-clients-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--ms-line);
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
}

.ms-clients-search-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-muted);
  white-space: nowrap;
}

.ms-clients-search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  min-width: 0;
  min-height: 42px;
  padding: 0 0.35rem 0 0.85rem;
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-clients-search-field::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-right: 0.45rem;
  opacity: 0.55;
  background: currentColor;
  color: var(--ms-muted);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.ms-clients-search-field:focus-within {
  border-color: color-mix(in srgb, var(--ms-accent) 48%, var(--ms-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-accent) 14%, transparent);
}

.ms-clients-search {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 2rem 0.55rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  outline: none;
}

.ms-clients-search::placeholder {
  color: var(--ms-muted);
}

.ms-clients-search-clear {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ms-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s ease, color 0.15s ease;
}

.ms-clients-search-clear:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ms-clients-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  color: #334155;
}

.ms-clients-table thead th {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--ms-line);
  background: #f8fafc;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-align: left;
  color: #64748b;
  white-space: nowrap;
}

.ms-clients-table tbody td,
.ms-clients-table tbody th {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.ms-clients-table tbody tr {
  transition: background 0.12s ease;
}

.ms-clients-table tbody tr:hover td,
.ms-clients-table tbody tr:hover th {
  background: #f8fafc;
}

.ms-clients-table tbody tr:last-child td,
.ms-clients-table tbody tr:last-child th {
  border-bottom: 0;
}

.ms-clients-business {
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.ms-clients-price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.ms-clients-link {
  color: var(--ms-accent);
  text-decoration: none;
  font-weight: 600;
}

.ms-clients-link:hover {
  text-decoration: underline;
}

.ms-clients-muted {
  color: #cbd5e1;
}

.ms-clients-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.ms-clients-badge--ok {
  background: color-mix(in srgb, var(--ms-accent) 12%, #fff);
  color: var(--ms-accent);
}

.ms-clients-badge--warn {
  background: #fff7ed;
  color: #c2410c;
}

.ms-clients-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}

.ms-clients-badge--neutral {
  background: #eff6ff;
  color: #1d4ed8;
}

.ms-clients-notes-cell {
  max-width: 220px;
}

.ms-clients-website-cell {
  max-width: 180px;
}

.ms-clients-website-cell .ms-clients-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.ms-clients-notes {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 0.8125rem;
}

.ms-clients-actions-cell {
  width: 1%;
  white-space: nowrap;
}

.ms-clients-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
}

.ms-clients-row-btn {
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--ms-line);
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ms-clients-row-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.ms-clients-row-btn--danger {
  color: var(--ms-danger);
  border-color: color-mix(in srgb, var(--ms-danger) 28%, var(--ms-line));
}

.ms-clients-row-btn--danger:hover {
  background: #fef2f2;
  border-color: color-mix(in srgb, var(--ms-danger) 45%, var(--ms-line));
}

.ms-clients-empty {
  margin: 0;
  padding: 1.75rem 1.15rem;
  border: 1px dashed #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
}

.ms-clients-empty-title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ms-clients-empty-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ms-muted);
  line-height: 1.45;
}

.ms-clients-status {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ms-muted);
}

.ms-clients-status.is-error {
  color: var(--ms-danger);
}

.ms-clients-dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
  max-height: none;
  color: inherit;
}

.ms-clients-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.ms-clients-dialog-panel {
  width: min(520px, calc(100vw - 2rem));
  max-height: min(90vh, 740px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  padding: 1.35rem 1.4rem 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 24px 64px rgba(15, 23, 42, 0.18);
  cursor: default;
}

.ms-clients-dialog-panel--compact {
  width: min(420px, calc(100vw - 2rem));
  max-height: none;
  padding-bottom: 0;
}

.ms-clients-dialog-head {
  margin-bottom: 1.15rem;
  flex-shrink: 0;
}

.ms-clients-dialog-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}

.ms-clients-dialog-lead {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.ms-clients-dialog-warning {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #475569;
  flex: 1;
}

.ms-clients-dialog-error {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ms-danger);
}

.ms-clients-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ms-clients-form-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  margin-right: -0.15rem;
}

.ms-clients-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.75rem;
}

.ms-clients-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.ms-clients-field--wide {
  grid-column: 1 / -1;
}

.ms-clients-field-label {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-clients-input,
.ms-clients-field input,
.ms-clients-field select {
  width: 100%;
  appearance: none;
  border: 1px solid transparent;
  background: #f4f6f9;
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  line-height: 1.35;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-clients-field select.ms-clients-input,
.ms-clients-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.ms-clients-input::placeholder,
.ms-clients-field input::placeholder {
  color: #94a3b8;
}

.ms-clients-input:hover,
.ms-clients-field input:hover,
.ms-clients-field select:hover {
  background: #eef1f6;
}

.ms-clients-input:focus,
.ms-clients-field input:focus,
.ms-clients-field select:focus {
  background: #fff;
  border-color: color-mix(in srgb, var(--ms-accent) 55%, #e2e8f0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-accent) 16%, transparent);
}

.ms-clients-form-actions,
.ms-clients-dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-top: 0;
  padding: 1rem 0 1.2rem;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 40%);
}

.ms-clients-dialog-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.35rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.ms-clients-dialog-back:hover {
  color: #0f172a;
  background: #f4f6f9;
}

.ms-clients-dialog-next {
  min-width: 8.5rem;
  margin-left: auto;
  border-radius: 12px !important;
  padding: 0.72rem 1.25rem !important;
  font-weight: 650 !important;
}

.ms-clients-form-status {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.ms-clients-form-status.is-error {
  color: var(--ms-danger);
}

@media (max-width: 560px) {
  .ms-clients-dialog-panel {
    padding: 1.2rem 1.1rem 0;
    border-radius: 18px;
  }

  .ms-clients-dialog-title {
    font-size: 1.25rem;
  }

  .ms-clients-form-grid {
    grid-template-columns: 1fr;
  }

  .ms-clients-field--wide {
    grid-column: auto;
  }

  .ms-clients-row-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* -- Store -- */
.ms-store-head {
  margin-bottom: 1rem;
}

.ms-store-mvp-note {
  width: 100%;
  max-width: 920px;
  margin: -0.5rem auto 1.25rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ms-store-mvp-note a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.ms-store-mvp-note a:hover {
  text-decoration: underline;
}

.ms-store-content {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.ms-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ms-store-product {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  min-height: 0;
  padding: 1.15rem 1.2rem 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ms-store-product:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.ms-store-product-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.ms-store-product-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.ms-store-product-visual {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
}

.ms-store-product-visual svg {
  width: 1.15rem;
  height: 1.15rem;
}

.ms-store-product h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

.ms-store-desc {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}

.ms-store-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}

.ms-store-price {
  margin: 0;
  min-width: 0;
}

.ms-store-amount {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}

.ms-store-amount.is-link {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #64748b;
  font-variant-numeric: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-store-buy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 2.15rem;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 48%, #2563eb 100%);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ms-store-buy:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.ms-store-buy:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ms-store-buy.is-ghost {
  background: #fff;
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: none;
}

.ms-store-buy.is-ghost:hover:not(:disabled) {
  background: #f8fbff;
  border-color: #93c5fd;
  filter: none;
  box-shadow: none;
}

@media (max-width: 680px) {
  .ms-store-grid {
    grid-template-columns: 1fr;
  }
}


/* -- Public Locate My Order -- */
.ms-orders-page {
  margin: 0;
  min-height: 100vh;
  background: #f4f7fb;
  color: #0f172a;
  font-family: "DM Sans", system-ui, sans-serif;
}

.ms-orders-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 10% -10%, rgba(147, 197, 253, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(226, 232, 240, 0.9), transparent 55%),
    #f4f7fb;
}

.ms-orders-wash {
  position: absolute;
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  right: -12%;
  top: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.55), transparent 68%);
  filter: blur(6px);
}

.ms-orders-nav,
.ms-orders-main {
  position: relative;
  z-index: 1;
}

.ms-orders-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1.35rem, env(safe-area-inset-right))
    0.85rem
    max(1.35rem, env(safe-area-inset-left));
}

.ms-orders-nav .ms-home-brand,
.ms-orders-nav .ms-home-orb {
  position: relative;
  z-index: 61;
}

.ms-orders-page .ms-home-bloom {
  z-index: 60;
}

.ms-orders-nav-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
}

.ms-orders-nav-link:hover {
  color: #0f172a;
}

.ms-orders-main {
  width: min(960px, 100%);
  margin: 0 auto;
  padding:
    0.75rem
    max(1.35rem, env(safe-area-inset-right))
    max(2.5rem, env(safe-area-inset-bottom))
    max(1.35rem, env(safe-area-inset-left));
}

.ms-orders-head {
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

.ms-orders-head h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.ms-orders-head p {
  margin: 0;
  color: #64748b;
  font-size: 1.02rem;
  line-height: 1.55;
}

.ms-orders-search {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.ms-orders-search-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-orders-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.75rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ms-orders-search input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
  border-color: #93c5fd;
}

.ms-orders-status {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.95rem;
}

.ms-orders-grid {
  display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ms-orders-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 10.5rem;
  padding: 1.05rem 1.1rem 1.1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.ms-orders-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.ms-orders-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ms-orders-badge.is-preview {
  background: #eff6ff;
  color: #1d4ed8;
}

.ms-orders-badge.is-live {
  background: #ecfdf5;
  color: #047857;
}

.ms-orders-price {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ms-orders-card h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.ms-orders-meta {
  margin: 0;
  color: #94a3b8;
  font-size: 0.82rem;
}

.ms-orders-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.95rem;
  border-radius: 11px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.ms-orders-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ms-orders-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ms-orders-stats {
  display: grid;
  grid-template-columns: minmax(0, 8.5rem);
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.ms-orders-stats > div {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.82);
}

.ms-orders-stats dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-orders-stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ms-orders-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.ms-orders-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.ms-orders-search-field::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  width: 16px;
  height: 16px;
  opacity: 0.45;
  background: currentColor;
  color: #64748b;
  pointer-events: none;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ms-orders-search-field input {
  padding-left: 2.55rem;
}

.ms-orders-search-hint {
  font-size: 0.8rem;
  color: #94a3b8;
}

.ms-orders-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ms-orders-year-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ms-orders-year-btn:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ms-orders-year-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.ms-orders-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.ms-orders-status {
  display: grid;
  gap: 0.2rem;
}

.ms-orders-status strong {
  color: #0f172a;
  font-weight: 700;
}

.ms-orders-status span {
  color: #64748b;
}

.ms-orders-card:hover {
  border-color: #dbeafe;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.ms-orders-foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.5;
}

.ms-orders-foot a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 650;
}

.ms-orders-foot a:hover {
  text-decoration: underline;
}

.ms-credits-tag {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.4rem;
  margin: 0.15rem auto 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--ms-line);
  background: #f4f7fa;
  text-decoration: none;
  line-height: 1.2;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ms-credits-tag:hover {
  border-color: #bfdbfe;
}

.ms-credits-tag-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
}

.ms-credits-tag-value {
  font-size: 0.78rem;
  font-weight: 750;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ms-credits-tag:hover .ms-credits-tag-value {
  color: #2563eb;
}

/* --- Pricing page --- */
#page-body.ms-pricing-page {
  --ms-channel-w: 960px;
}

.ms-pricing-head {
  padding-bottom: 1.5rem;
}

.ms-pricing-head-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ms-pricing-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.ms-pricing-content {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.ms-pricing-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ms-pricing-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.ms-pricing-plan.is-popular {
  border-color: #60a5fa;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
}

.ms-pricing-popular {
  position: absolute;
  top: 0;
  right: 1rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0 0 8px 8px;
  background: #2563eb;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ms-pricing-plan.is-current {
  border-color: #2563eb;
  background: #f8fbff;
}

.ms-pricing-plan h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.ms-pricing-plan-price {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.ms-pricing-plan-price span {
  margin-left: 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.ms-pricing-credit-count {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: #64748b;
}

.ms-pricing-features {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  margin: 0.65rem 0 0.85rem;
  padding: 0;
  list-style: none;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.35;
}

.ms-pricing-features li {
  display: flex;
  gap: 0.45rem;
}

.ms-pricing-features li::before {
  content: "✓";
  flex-shrink: 0;
  color: #2563eb;
  font-weight: 700;
}

.ms-pricing-plan-btn {
  width: 100%;
  margin-top: auto;
}

.ms-pricing-plan.is-popular .ms-pricing-plan-btn:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.ms-pricing-plan:not(.is-popular) .ms-pricing-plan-btn:not(:disabled) {
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: none;
}

.ms-pricing-plan:not(.is-popular) .ms-pricing-plan-btn:not(:disabled):hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.ms-pricing-topup-custom {
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.ms-pricing-topup-heading {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ms-pricing-topup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.ms-pricing-topup-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: #64748b;
}

.ms-pricing-topup-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 7rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.ms-pricing-topup-input-wrap.is-invalid {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ms-pricing-topup-input-wrap.is-invalid .ms-pricing-topup-currency,
.ms-pricing-topup-input-wrap.is-invalid .ms-pricing-topup-input {
  color: #b91c1c;
}

.ms-pricing-topup-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  z-index: 10;
  width: max-content;
  max-width: 13rem;
  padding: 0.42rem 0.62rem;
  border-radius: 8px;
  background: #991b1b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
  transform: translateX(-50%);
  box-shadow: 0 8px 20px rgba(127, 29, 29, 0.22);
  animation: ms-pricing-tooltip-in 0.18s ease-out;
}

.ms-pricing-topup-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 5px solid transparent;
  border-top-color: #991b1b;
  transform: translateX(-50%);
}

@keyframes ms-pricing-tooltip-in {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.ms-pricing-topup-currency {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 650;
}

.ms-pricing-topup-input {
  width: 5.5rem;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
}

.ms-pricing-topup-input::-webkit-outer-spin-button,
.ms-pricing-topup-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ms-pricing-topup-preview {
  margin: 0;
  flex: 1;
  min-width: 8rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: #0f172a;
}

.ms-pricing-topup-buy {
  flex-shrink: 0;
  min-width: 7rem;
}

.ms-pricing-dev-credits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.ms-pricing-dev-credits-btn {
  flex-shrink: 0;
  min-width: 9.5rem;
}

.ms-pricing-dev-credits-note {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.ms-pricing-manage {
  appearance: none;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  padding: 0.18rem 0.55rem;
  color: #64748b;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ms-pricing-manage:hover {
  color: #334155;
  border-color: #cbd5e1;
  background: #f8fafc;
}

@media (max-width: 820px) {
  .ms-pricing-list {
    grid-template-columns: 1fr;
  }

  .ms-pricing-topup-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ms-pricing-topup-buy {
    width: 100%;
  }
}

/* Donate page styles: css/donate.css */


@media (max-width: 720px) {
  .ms-orders-grid {
    grid-template-columns: 1fr;
  }
}

/* QR business card (builder) */
body.ms-lb-qr-open {
  overflow: hidden;
}

.ms-lb-qr {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ms-lb-qr[hidden] {
  display: none !important;
}

.ms-lb-qr-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(59, 130, 246, 0.22), transparent 60%),
    rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.ms-lb-qr-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  display: grid;
  animation: ms-lb-qr-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ms-lb-qr-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ms-lb-qr-close {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ms-lb-qr-close svg {
  width: 0.95rem;
  height: 0.95rem;
}

.ms-lb-qr-close:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.34);
}

.ms-lb-qr-scene {
  perspective: 900px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 34rem);
}

.ms-lb-qr-card {
  position: relative;
  width: 100%;
  min-height: 11.5rem;
  border-radius: 1.35rem;
  padding: 1.1rem 1.15rem 1.15rem;
  transform-style: preserve-3d;
  transform: none;
  transition: transform 0.16s ease-out;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 42%, rgba(238, 242, 255, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 32px 70px rgba(15, 23, 42, 0.32),
    0 12px 28px rgba(59, 130, 246, 0.22);
  overflow: visible;
}

.ms-lb-qr-card-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-top: 1.35rem;
}

.ms-lb-qr-card-copy {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  align-content: center;
  padding: 0 0.25rem 0 2.1rem;
}

.ms-lb-qr-card-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 62%
  );
  transform: translateX(-30%) rotate(8deg);
  pointer-events: none;
  animation: ms-lb-qr-sheen 4.5s ease-in-out infinite;
}

@keyframes ms-lb-qr-sheen {
  0%,
  55% {
    transform: translateX(-40%) rotate(8deg);
    opacity: 0;
  }
  70% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(45%) rotate(8deg);
    opacity: 0;
  }
}

.ms-lb-qr-name {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.ms-lb-qr-name:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.ms-lb-qr-code-col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ms-lb-qr-code-wrap {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  width: calc(168px + 1.3rem);
  height: calc(168px + 1.3rem);
  padding: 0.65rem;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ms-lb-qr-code-wrap:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.14);
}

.ms-lb-qr-code-wrap canvas {
  display: block;
  width: 168px;
  height: 168px;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.35rem;
}

.ms-lb-qr-hint {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.ms-lb-qr-category {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

.ms-lb-qr-meta {
  margin: 0.1rem 0 0;
  padding: 0;
  list-style: none;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
}

.ms-lb-qr-meta li {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.ms-lb-qr-meta-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ms-lb-qr-meta-value {
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ms-lb-qr-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: stretch;
  width: 100%;
  position: relative;
  z-index: 2;
}

.ms-lb-qr-actions .ms-btn,
.ms-lb-qr-actions .ms-btn-ghost {
  flex: 1;
  min-height: 2rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  border-radius: 0.65rem;
}

@media (max-width: 520px) {
  .ms-lb-qr-stage {
    width: min(100%, 22rem);
  }

  .ms-lb-qr-scene {
    width: min(100%, 20rem);
  }

  .ms-lb-qr-card {
    padding: 0.85rem 0.85rem 0.9rem;
  }

  .ms-lb-qr-card-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-top: 1.65rem;
  }

  .ms-lb-qr-card-copy {
    padding: 0;
    text-align: center;
  }

  .ms-lb-qr-code-wrap {
    width: calc(148px + 1.2rem);
    height: calc(148px + 1.2rem);
  }

  .ms-lb-qr-code-wrap canvas {
    width: 148px;
    height: 148px;
  }

  .ms-lb-qr-actions {
    flex-direction: row;
  }
}


/* -- Creator onboarding wizard -- */
body.ms-onboard-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  padding: 0;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(37, 99, 235, 0.11), transparent 62%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(99, 102, 241, 0.07), transparent 58%),
    #f4f6f8;
  color: #0f172a;
  font-family: "DM Sans", system-ui, sans-serif;
}

.ms-onboard {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-onboard.is-ready {
  opacity: 1;
  transform: none;
}

.ms-onboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: min(42rem, calc(100% - 3rem));
  padding: 1.15rem 0 0.85rem;
  margin: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ms-onboard-top-right {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.ms-onboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #0f172a;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.ms-onboard-brand img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.ms-onboard-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #e8eef5;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.32s ease,
    color 0.32s ease;
}

.ms-onboard-step-pill.is-bump {
  animation: ms-onb-pill-bump 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  background: #dbeafe;
  color: #1d4ed8;
}

.ms-onboard-progress {
  margin: 0;
  width: min(42rem, calc(100% - 3rem));
  padding: 0 0 1.15rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ms-onboard-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ms-onboard-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 55%, #6366f1 100%);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

.ms-onboard-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem 2rem;
  min-height: 0;
  box-sizing: border-box;
}

.ms-onboard-main {
  width: min(42rem, 100%);
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 22px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 44px rgba(15, 23, 42, 0.07);
  padding: 1.85rem 1.75rem 1.55rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 100%;
  box-sizing: border-box;
  position: relative;
  min-height: min(28rem, 68dvh);
  transition: box-shadow 0.45s ease;
}

.ms-onboard-main.is-forward .ms-onboard-panel.ms-panel-anim:not(.is-visible) {
  transform: translateX(22px);
}

.ms-onboard-main.is-back .ms-onboard-panel.ms-panel-anim:not(.is-visible) {
  transform: translateX(-22px);
}

.ms-onboard-main.is-entering .ms-onboard-panel.ms-panel-anim:not(.is-visible) {
  transform: translateY(18px) scale(0.985);
}

.ms-onboard-panel.ms-panel-anim.is-exiting {
  transform: translateX(-16px);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-onboard-main.is-back .ms-onboard-panel.ms-panel-anim.is-exiting {
  transform: translateX(16px);
}

.ms-onboard-panel.is-active.is-visible > h1,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-lead,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-note,
.ms-onboard-panel.is-active.is-visible > .ms-creator-policy-notice,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-legal-links,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-check,
.ms-onboard-panel.is-active.is-visible > .ms-field,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-chip-label,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-chips,
.ms-onboard-panel.is-active.is-visible > .ms-sec-card-panel,
.ms-onboard-panel.is-active.is-visible > .ms-onb-celebrate-mark,
.ms-onboard-panel.is-active.is-visible > .ms-onboard-actions {
  opacity: 0;
  transform: translateY(14px);
  animation: ms-onb-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ms-onboard-panel.is-active.is-visible > h1 { animation-delay: 0.02s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-lead { animation-delay: 0.08s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-note { animation-delay: 0.1s; }
.ms-onboard-panel.is-active.is-visible > .ms-creator-policy-notice { animation-delay: 0.1s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-legal-links { animation-delay: 0.16s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-check { animation-delay: 0.22s; }
.ms-onboard-panel.is-active.is-visible > .ms-field { animation-delay: 0.12s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-chip-label { animation-delay: 0.18s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-chips { animation-delay: 0.24s; }
.ms-onboard-panel.is-active.is-visible > .ms-sec-card-panel { animation-delay: 0.16s; }
.ms-onboard-panel.is-active.is-visible > .ms-onb-celebrate-mark { animation-delay: 0s; }
.ms-onboard-panel.is-active.is-visible > .ms-onboard-actions { animation-delay: 0.28s; }

.ms-onboard-panel.is-active.is-visible .ms-onboard-path li {
  opacity: 0;
  transform: translateY(12px);
  animation: ms-onb-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(1) { animation-delay: 0.06s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(2) { animation-delay: 0.11s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(3) { animation-delay: 0.16s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(4) { animation-delay: 0.21s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(5) { animation-delay: 0.26s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(6) { animation-delay: 0.31s; }

.ms-onboard-panel.is-active.is-visible .ms-onboard-path-num {
  animation: ms-onb-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(1) .ms-onboard-path-num { animation-delay: 0.08s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(2) .ms-onboard-path-num { animation-delay: 0.13s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(3) .ms-onboard-path-num { animation-delay: 0.18s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(4) .ms-onboard-path-num { animation-delay: 0.23s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(5) .ms-onboard-path-num { animation-delay: 0.28s; }
.ms-onboard-panel.is-active.is-visible .ms-onboard-path li:nth-child(6) .ms-onboard-path-num { animation-delay: 0.33s; }

.ms-onb-celebrate-mark {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #2563eb;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.12),
    0 10px 24px rgba(37, 99, 235, 0.16);
}

.ms-onb-celebrate-mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ms-onboard-panel--celebrate.is-active.is-visible > h1 {
  animation-delay: 0.12s;
}

.ms-onboard-panel--celebrate.is-active.is-visible > .ms-onboard-lead {
  animation-delay: 0.18s;
}

.ms-onboard-panel--celebrate.is-active.is-visible > .ms-onboard-actions {
  animation-delay: 0.26s;
}

@keyframes ms-onb-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ms-onb-pop {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ms-onb-pill-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ms-onboard,
  .ms-onboard-progress-fill,
  .ms-onboard-step-pill,
  .ms-onboard-panel.is-active.is-visible > *,
  .ms-onboard-panel.is-active.is-visible .ms-onboard-path li,
  .ms-onboard-panel.is-active.is-visible .ms-onboard-path-num {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .ms-onboard.is-ready {
    opacity: 1;
    transform: none;
  }
}

.ms-onboard-panel h1 {
  margin: 0 0 0.7rem;
  color: #0f172a;
  font-size: clamp(1.75rem, 4.5vw, 2.15rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.ms-onboard-lead {
  margin: 0 0 1.35rem;
  color: #64748b;
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 36em;
}

.ms-onboard-note {
  margin: 0 0 1.65rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.45;
}

.ms-onboard-note strong {
  color: #1d4ed8;
  font-weight: 750;
}

.ms-onboard-path {
  --onb-path-rail: #dbe3ee;
  --onb-path-num: 2rem;
  margin: 0 0 1.45rem;
  padding: 0.15rem 0 0.1rem;
  list-style: none;
  display: grid;
  gap: 0;
}

.ms-onboard-path li {
  position: relative;
  display: grid;
  grid-template-columns: var(--onb-path-num) minmax(0, 1fr);
  column-gap: 0.95rem;
  align-items: start;
  padding: 0 0 1.15rem;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.ms-onboard-path li:last-child {
  padding-bottom: 0.15rem;
}

.ms-onboard-path li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--onb-path-num) / 2);
  top: calc(var(--onb-path-num) + 0.2rem);
  bottom: 0.15rem;
  width: 2px;
  transform: translateX(-50%);
  background: var(--onb-path-rail);
  border-radius: 999px;
}

.ms-onboard-path-num {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--onb-path-num);
  height: var(--onb-path-num);
  border-radius: 999px;
  border: 2px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1;
  box-shadow: 0 0 0 4px #fff;
}

.ms-onboard-path-copy {
  min-width: 0;
  padding-top: 0.12rem;
}

.ms-onboard-path-copy strong {
  display: block;
  margin: 0 0 0.2rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ms-onboard-path-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ms-onboard-panel--path .ms-onboard-lead {
  margin-bottom: 1.15rem;
}

.ms-onboard-main:has(.ms-onboard-panel--path.is-active) {
  width: min(44rem, 100%);
}

.ms-onboard-facts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.ms-onboard-facts li {
  padding: 0.85rem 0.95rem;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  background: #f8fafc;
}

.ms-onboard-facts strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ms-onboard-facts p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ms-onboard-facts p strong {
  display: inline;
  margin: 0;
  font-size: inherit;
  color: #0f172a;
}

.ms-onboard-legal-links {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.ms-onboard-legal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ms-onboard-legal-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.ms-onboard-legal-card strong {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.ms-onboard-legal-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ms-onboard-legal-copy span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
}

.ms-onboard-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 1rem;
  line-height: 1.45;
  cursor: pointer;
}

.ms-onboard-check input {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.ms-onboard-chip-label {
  margin: 0.2rem 0 0.55rem;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 650;
}

.ms-onboard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.45rem;
}

.ms-onboard-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.ms-onboard-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.ms-onboard-methods {
  margin: 0.45rem 0 1.35rem;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.ms-onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
}

.ms-onboard-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.ms-onboard-actions .ms-btn {
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.98rem;
  box-shadow: none;
}

.ms-onboard-actions .ms-btn.ms-onboard-next,
.ms-onboard-actions a.ms-btn.ms-onboard-next {
  box-shadow: none;
}

.ms-onboard-actions a.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ms-onboard-page .ms-field .ms-label,
.ms-onboard-page .ms-label {
  font-size: 0.92rem;
}

.ms-onboard-page .ms-input,
.ms-onboard-page .ms-phone-input {
  min-height: 2.85rem;
  font-size: 1.02rem;
}

@media (max-width: 520px) {
  .ms-onboard-top,
  .ms-onboard-progress {
    width: min(42rem, calc(100% - 2rem));
  }

  .ms-onboard-top {
    padding: 0.95rem 0 0.7rem;
  }

  .ms-onboard-progress {
    padding: 0 0 0.95rem;
  }

  .ms-onboard-stage {
    align-items: flex-start;
    padding: 0.35rem 1rem 1.5rem;
  }

  .ms-onboard-main {
    padding: 1.35rem 1.1rem 1.2rem;
    border-radius: 18px;
    min-height: min(24rem, 72dvh);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .ms-onboard-panel h1 {
    font-size: 1.55rem;
  }

  .ms-onboard-lead {
    font-size: 1rem;
  }

  .ms-onboard-actions:not(.ms-onboard-actions--stack) {
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: center;
  }
}

/* -- Creator security card -- */
.ms-sec-card-panel {
  margin: 0.35rem 0 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.ms-sec-card-element-wrap {
  display: grid;
  gap: 0.65rem;
}

.ms-sec-card-element {
  padding: 0.85rem 0.95rem;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-sec-card-element:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ms-sec-card-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ms-sec-card-actions {
  margin-top: 0.65rem;
}

#onb-security-card-verified {
  margin: 0;
}

#onb-security-card-verified-wrap[hidden],
#onb-retry-card[hidden],
#onb-security-card-mount[hidden] {
  display: none !important;
}

.ms-sec-card-panel.is-verified #onb-retry-card {
  display: none !important;
}

.ms-sec-card-verified-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0;
}

.ms-sec-card-verified-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  background: #ecfdf5;
  color: #059669;
}

.ms-sec-card-verified-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.ms-sec-card-verified-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.ms-sec-card-verified-kicker {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #059669;
}

.ms-sec-card-verified-text {
  font-size: 0.95rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.3;
}

.ms-sec-card-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  align-self: flex-start;
  min-height: 2.25rem;
  margin-top: 0.65rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.ms-sec-card-retry svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ms-sec-card-retry:hover {
  color: #2563eb;
  border-color: #93c5fd;
  background: #f8fbff;
}

.ms-onboard-panel .ms-sec-card-panel {
  margin-top: 0.15rem;
}

.ms-sec-card-panel.is-load-error #onb-security-card-mount {
  min-height: 0;
}

#onb-security-card-mount.is-loading {
  min-height: 3.25rem;
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: ms-onb-shimmer 1.1s ease-in-out infinite;
}

.ms-sec-card-panel:has(#onb-security-card-verified-wrap:not([hidden])) {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ms-sec-card-panel:has(#onb-security-card-verified-wrap:not([hidden])) .ms-sec-card-retry {
  display: none;
}

.ms-sec-card-retry:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

