/**
 * upibridge landing — design tokens, components, hero product demo
 */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
  /* Brand & accents */
  --color-primary: #5875e1;
  --color-primary-hover: #4a66d4;
  --color-primary-soft: rgba(88, 117, 225, 0.12);
  --color-primary-glow: rgba(88, 117, 225, 0.35);
  --color-accent-blue: #4a7dff;
  --color-indigo: #6366f1;
  --color-indigo-dark: #4f46e5;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-bg-subtle: #ffffff;
  --color-bg-muted: #f3f4f6;

  /* Text */
  --color-text: #111827;
  --color-text-secondary: #374151;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;
  --color-inverse: #ffffff;

  /* Borders & dividers */
  --color-border: #e5e7eb;
  --color-border-light: #ededed;
  --color-divider: #e5e7eb;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 40px rgba(17, 24, 39, 0.1);
  --shadow-glow-primary: 0 8px 32px var(--color-primary-glow);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 2.75rem;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing scale (rem) */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 90rem;
  --container-narrow: 42rem;
  --section-py: var(--space-20);
  --section-py-sm: var(--space-12);

  /* Featured pricing card (Pro-style vertical blue gradient) */
  --pricing-featured-gradient: linear-gradient(
    180deg,
    #4f6de8 0%,
    #5a78f0 26%,
    #657ff1 52%,
    #6d86f3 78%,
    #708cf4 100%
  );
  --pricing-featured-border: rgba(255, 255, 255, 0.22);
  --pricing-featured-divider: rgba(255, 255, 255, 0.24);
  --pricing-featured-shadow: 0 14px 40px rgba(79, 109, 232, 0.28), 0 4px 12px rgba(53, 78, 180, 0.12);
  --pricing-featured-cta-text: #3f4dc4;

  /* Motion */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 150ms;
  --duration-normal: 220ms;
}

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ds-landing {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Optional: apply design-system background pattern to landing wrapper */
.ds-bg-grid {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}

.ds-bg-glow-top {
  position: relative;
}
.ds-bg-glow-top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 280px;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-primary-soft), transparent 70%);
  z-index: 0;
}
.ds-bg-glow-top > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------
   3. Typography utilities
   ------------------------------------------------------------------------- */
.ds-heading-hero {
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}

.ds-heading-xl {
  font-size: clamp(1.75rem, 3vw, var(--text-4xl));
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

.ds-heading-lg {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}

.ds-heading-md {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.ds-heading-sm {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.ds-text-body {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
}

.ds-text-body-lg {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 36rem;
}

.ds-text-sm {
  font-size: var(--text-sm);
}

.ds-text-muted {
  color: var(--color-text-muted);
}

.ds-text-light {
  color: var(--color-text-light);
}

.ds-text-inverse {
  color: var(--color-inverse);
}

.ds-text-primary {
  color: var(--color-primary);
}

.ds-text-center {
  text-align: center;
}

.ds-text-left {
  text-align: left;
}

.ds-mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.ds-max-w-prose {
  max-width: 36rem;
}

.ds-max-w-container {
  max-width: var(--container-max);
}

/* -------------------------------------------------------------------------
   4. Layout — container, section, flex, grid
   ------------------------------------------------------------------------- */
.ds-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.ds-section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.ds-section--sm {
  padding-top: var(--section-py-sm);
  padding-bottom: var(--section-py-sm);
}

.ds-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ds-stack--lg {
  gap: var(--space-6);
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.ds-row--between {
  justify-content: space-between;
}

.ds-row--center {
  justify-content: center;
}

.ds-col {
  flex: 1 1 0;
  min-width: 0;
}

.ds-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 900px) {
  .ds-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 5rem);
  }
}

.ds-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .ds-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ds-grid-masonry {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .ds-grid-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ds-justify-center {
  justify-content: center;
}

.ds-items-center {
  align-items: center;
}

.ds-flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* -------------------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------------------- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease-out),
    color var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.ds-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.ds-btn--lg {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
}

.ds-btn--block {
  width: 100%;
}

.ds-btn--primary {
  background-color: var(--color-primary);
  color: var(--color-inverse);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.ds-btn--primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.ds-btn--outline {
  background-color: var(--color-bg-subtle);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}

.ds-btn--outline:hover {
  background-color: var(--color-bg-muted);
  border-color: var(--color-text-light);
}

.ds-btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}

.ds-btn--ghost:hover {
  color: var(--color-text);
  background: var(--color-bg-muted);
}

/* Inverse (on dark / featured card) */
.ds-btn--on-accent {
  background-color: var(--color-inverse);
  color: var(--color-indigo);
  border-color: var(--color-inverse);
}

.ds-btn--on-accent:hover {
  background-color: var(--color-bg-muted);
}

/* -------------------------------------------------------------------------
   6. Badges & pills
   ------------------------------------------------------------------------- */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
}

.ds-badge--popular {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--color-inverse);
  font-size: var(--text-xs);
}

/* Billing toggle track */
.ds-toggle {
  display: inline-flex;
  padding: var(--space-1);
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  gap: 0;
}

.ds-toggle__opt {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast);
}

.ds-toggle__opt--active {
  background: var(--color-bg-subtle);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------------------
   7. Cards — generic, feature, pricing, testimonial
   ------------------------------------------------------------------------- */
.ds-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.ds-card--shadow-md {
  box-shadow: var(--shadow-md);
}

.ds-feature-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.ds-feature-card:hover {
  box-shadow: var(--shadow-md);
}

.ds-feature-card__visual {
  position: relative;
  min-height: 180px;
  background: linear-gradient(180deg, var(--color-bg-muted) 0%, var(--color-bg-subtle) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-feature-card__visual--pattern-bolt {
  background-image:
    repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(17, 24, 39, 0.04) 8px, rgba(17, 24, 39, 0.04) 9px);
}

.ds-feature-card__visual--pattern-grid {
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
}

.ds-feature-card__visual--pattern-diamond {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 12px,
    rgba(17, 24, 39, 0.04) 12px,
    rgba(17, 24, 39, 0.04) 13px
  );
}

.ds-feature-card__icon {
  width: 56px;
  height: 56px;
  color: var(--color-accent-blue);
  filter: drop-shadow(0 8px 24px var(--color-primary-glow));
}

.ds-feature-card__body {
  padding: var(--space-6) var(--space-6) var(--space-8);
  text-align: left;
}

/* Mock device / illustration panel */
.ds-panel-mock {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.ds-panel-mock__inner {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
}

.ds-pill-input {
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  border: none;
  margin-bottom: var(--space-3);
}

/* Pricing */
.ds-pricing-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ds-pricing-card--featured {
  background: var(--pricing-featured-gradient);
  border: 1px solid var(--pricing-featured-border);
  color: var(--color-inverse);
  box-shadow: var(--pricing-featured-shadow);
}

.ds-pricing-card--featured .ds-btn--on-accent {
  color: var(--pricing-featured-cta-text);
  font-weight: 600;
}

.ds-pricing-card--featured .ds-btn--on-accent:hover {
  color: #3545b0;
  background-color: rgba(255, 255, 255, 0.96);
}

.ds-pricing-card--featured .ds-text-muted,
.ds-pricing-card--featured .ds-pricing-card__features {
  color: rgba(255, 255, 255, 0.85);
}

.ds-pricing-card__price {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1;
  margin: var(--space-2) 0 var(--space-6);
}

.ds-pricing-card__price span {
  font-size: var(--text-xl);
  font-weight: 600;
  vertical-align: super;
}

.ds-pricing-card__period {
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0.9;
}

.ds-pricing-card__divider {
  border: none;
  border-top: 1px dashed var(--color-border);
  margin: var(--space-6) 0;
}

.ds-pricing-card--featured .ds-pricing-card__divider {
  border-top: 1px solid var(--pricing-featured-divider);
  border-top-style: solid;
}

.ds-pricing-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.ds-pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ds-pricing-card__check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.ds-pricing-card--featured .ds-pricing-card__check {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-inverse);
}

/* Testimonials */
.ds-testimonial-card {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  break-inside: avoid;
  margin-bottom: var(--space-5);
}

.ds-testimonial-card--pattern {
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  background-color: var(--color-bg-subtle);
}

.ds-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.ds-quote {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-4);
}

/* -------------------------------------------------------------------------
   8. Navigation (landing header)
   ------------------------------------------------------------------------- */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
}

.ds-nav--scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}

.ds-nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.ds-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
}

.ds-nav__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary), var(--color-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-inverse);
  font-size: var(--text-lg);
}

.ds-nav__brand-img {
  max-height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.ds-nav__links {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .ds-nav__links {
    display: flex;
  }
}

/* Nav / hero menu: soft blue “halo” on hover & active (radial glow under text) */
.ds-nav__link,
a.ds-link-glow {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  transition: color var(--duration-normal) var(--ease-out);
}

.ds-nav__link::before,
a.ds-link-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 20%);
  width: calc(100% + var(--space-8));
  min-width: 4.5rem;
  height: 2.25rem;
  background: radial-gradient(
    ellipse 85% 100% at 50% 100%,
    rgba(88, 117, 225, 0.28) 0%,
    rgba(88, 117, 225, 0.12) 42%,
    rgba(88, 117, 225, 0) 72%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: -1;
  pointer-events: none;
}

.ds-nav__link:hover,
.ds-nav__link:focus-visible,
a.ds-link-glow:hover,
a.ds-link-glow:focus-visible {
  color: var(--color-text);
}

.ds-nav__link:hover::before,
.ds-nav__link:focus-visible::before,
a.ds-link-glow:hover::before,
a.ds-link-glow:focus-visible::before {
  opacity: 1;
}

/* Current page / persistent active state */
.ds-nav__link--active,
.ds-nav__link[aria-current="page"],
a.ds-link-glow--active {
  color: var(--color-text);
  font-weight: 600;
}

.ds-nav__link--active::before,
.ds-nav__link[aria-current="page"]::before,
a.ds-link-glow--active::before {
  opacity: 1;
}

.ds-nav__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a.ds-link-glow:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.ds-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* -------------------------------------------------------------------------
   9. Hero — two-column + product demo carousel
   ------------------------------------------------------------------------- */
.ds-hero {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
  overflow: hidden;
}

/* Let demo popups extend past the store card without clipping */
.ds-hero.ds-hero--split {
  overflow: visible;
}

.ds-hero--split {
  padding-bottom: var(--space-20);
}

.ds-hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 1024px) {
  .ds-hero-split {
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.42fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: center;
  }
}

.ds-hero-split__col--copy {
  text-align: center;
}

@media (min-width: 1024px) {
  .ds-hero-split__col--copy {
    text-align: left;
  }
}

.ds-hero-split__col--copy .ds-heading-hero {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .ds-hero-split__col--copy .ds-heading-hero {
    margin-left: 0;
    margin-right: 0;
  }
}

.ds-hero-split__col--copy .ds-text-body-lg {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .ds-hero-split__col--copy .ds-text-body-lg {
    margin-left: 0;
    margin-right: 0;
    max-width: 28rem;
  }
}

.ds-hero-split__col--copy .ds-row {
  justify-content: center;
}

@media (min-width: 1024px) {
  .ds-hero-split__col--copy .ds-row {
    justify-content: flex-start;
  }
}

.ds-trust-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-8) var(--space-10);
  opacity: 0.75;
  filter: grayscale(1);
}

.ds-trust-logos--left {
  justify-content: center;
}

@media (min-width: 1024px) {
  .ds-trust-logos--left {
    justify-content: flex-start;
  }
}

.ds-trust-logos img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

/* —— Product demo (reference: floating card + carousel) —— */
.ds-hero-demo {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  overflow: visible;
}

@media (min-width: 1024px) {
  .ds-hero-demo {
    margin: 0 0 0 auto;
    max-width: 100%;
  }
}

/* Wrapper only — single visible card is .ds-hero-store */
.ds-hero-demo__frame {
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  min-height: 0;
}

@media (min-width: 640px) {
  .ds-hero-demo__frame {
    padding: 0;
    min-height: 0;
  }
}

/* Hero scene: full shop base + corner popup cards (data-demo-phase on .ds-hero-scene) */
.ds-hero-scene {
  position: relative;
  isolation: isolate;
  min-height: 500px;
}

@media (min-width: 640px) {
  .ds-hero-scene {
    min-height: 560px;
  }
}

.ds-hero-scene__base {
  position: relative;
  z-index: 1;
}

.ds-hero-store.ds-hero-mock {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-bg-subtle);
}

@media (min-width: 640px) {
  .ds-hero-store.ds-hero-mock {
    min-height: 528px;
  }
}

@media (min-width: 1024px) {
  .ds-hero-store.ds-hero-mock {
    min-height: 540px;
  }
}

/* Bookstore mini-layout inside hero demo */
.ds-store__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg-subtle);
}

.ds-store__logo {
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  flex-shrink: 0;
}

.ds-store__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  overflow-x: auto;
  flex: 1;
  justify-content: center;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ds-store__nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  .ds-store__nav {
    gap: var(--space-4);
    font-size: 10px;
  }
}

.ds-store__nav span {
  cursor: default;
  white-space: nowrap;
}

.ds-store__tools {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.ds-store__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: default;
}

.ds-store__icon-btn:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}

.ds-store__svg {
  width: 20px;
  height: 20px;
}

.ds-store__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-5) var(--space-6);
  min-height: 0;
}

.ds-store__crumb {
  font-size: 10px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-store__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
  min-height: 320px;
}

@media (min-width: 520px) {
  .ds-store__grid {
    grid-template-columns: 1fr minmax(152px, 208px);
    gap: var(--space-5);
    align-items: stretch;
    min-height: 400px;
  }
}

@media (min-width: 640px) {
  .ds-store__grid {
    min-height: 440px;
  }
}

.ds-store__detail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ds-store__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
  line-height: var(--leading-snug);
}

@media (min-width: 640px) {
  .ds-store__title {
    font-size: var(--text-lg);
  }
}

.ds-store__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.ds-store__price {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}

.ds-store__rating {
  font-size: 10px;
  color: var(--color-text-light);
}

.ds-store__rating span {
  color: var(--color-text-muted);
}

.ds-store__desc-block {
  margin: 0 0 var(--space-4);
}

.ds-store__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--color-text-muted);
  margin: 0;
}

.ds-store__desc--next {
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
}

.ds-store__desc em {
  font-style: italic;
}

.ds-store__meta-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

.ds-store__meta-dot {
  color: var(--color-text-light);
  user-select: none;
}

.ds-store__format {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ds-store__mid-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.ds-store__mid-chip {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-light);
}

.ds-store__detail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ds-store__format-pill {
  font-size: 9px;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
}

.ds-store__format-pill.is-on {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.ds-store__wishlist {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #0d9488;
  cursor: default;
}

.ds-store__wishlist:hover {
  color: #0f766e;
}

.ds-store__wishlist-ico {
  flex-shrink: 0;
}

.ds-store__buyrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.ds-store__buyrow .ds-hero-demo-atc {
  flex: 0 1 auto;
  width: auto;
  max-width: 10.25rem;
  min-width: 0;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.ds-store__fineprint {
  font-size: 9px;
  color: #1e3a5f;
  line-height: var(--leading-normal);
  margin: 0;
  padding-top: var(--space-3);
  text-align: center;
  text-wrap: balance;
}

.ds-store__share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(1.25rem, 6vw, 2.25rem);
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  padding-top: var(--space-1);
}

.ds-store__social {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.ds-store__social-link {
  display: flex;
  color: #1e3a5f;
  opacity: 0.85;
  transition: opacity 0.15s var(--ease-out);
}

.ds-store__social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ds-store__social-link:hover {
  opacity: 1;
}

.ds-store__cover {
  display: flex;
  width: 100%;
  min-height: 200px;
}

.ds-store__cover-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3) var(--space-5);
  text-align: center;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(88, 117, 225, 0.12);
  background:
    radial-gradient(130% 85% at 50% -5%, rgba(88, 117, 225, 0.16) 0%, transparent 52%),
    linear-gradient(168deg, #ffffff 0%, #f4f6ff 38%, #e8ecf8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(17, 24, 39, 0.04);
}

.ds-store__cover-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(88, 117, 225, 0.22);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
}

.ds-store__cover-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4) var(--space-6);
}

.ds-store__cover-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--space-3);
  transform: translateX(-50%);
  width: 78%;
  max-width: 200px;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(17, 24, 39, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.ds-store__book {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 136px;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  filter: drop-shadow(8px 18px 22px rgba(17, 24, 39, 0.14)) drop-shadow(0 2px 5px rgba(88, 117, 225, 0.08));
  transform: perspective(560px) rotateY(-7deg) rotateX(2deg);
  transform-origin: 50% 80%;
}

@media (min-width: 520px) {
  .ds-store__cover {
    min-height: 0;
    margin-top: var(--space-8);
  }

  .ds-store__cover-panel {
    min-height: 100%;
    padding: var(--space-5) var(--space-4) var(--space-6);
    gap: var(--space-3);
  }

  .ds-store__book {
    max-width: 162px;
    transform: perspective(640px) rotateY(-9deg) rotateX(3deg);
  }
}

@media (min-width: 640px) {
  .ds-store__book {
    max-width: 178px;
  }
}

.ds-store__cover-caption {
  margin: 0;
  max-width: 13rem;
  font-size: 10px;
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.ds-store__cover-caption strong {
  color: #15803d;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .ds-store__book {
    transform: none;
    filter: drop-shadow(0 8px 20px rgba(17, 24, 39, 0.12));
  }
}

.ds-hero-pop {
  position: absolute;
  z-index: 4;
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  pointer-events: none;
}

.ds-hero-pop--left {
  top: var(--space-3);
  left: -0.75rem;
  width: min(304px, calc(100% - var(--space-4)));
  min-width: 260px;
}

.ds-hero-pop--right {
  top: -2rem;
  right: var(--space-3);
  width: min(264px, calc(100% - var(--space-3)));
  min-width: 240px;
}

.ds-hero-scene[data-demo-phase="1"] .ds-hero-pop--left,
.ds-hero-scene[data-demo-phase="2"] .ds-hero-pop--left,
.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop--left,
.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop--left,
.ds-hero-scene[data-demo-phase="5"] .ds-hero-pop--left,
.ds-hero-scene[data-demo-phase="6"] .ds-hero-pop--left {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop--right,
.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop--right,
.ds-hero-scene[data-demo-phase="5"] .ds-hero-pop--right,
.ds-hero-scene[data-demo-phase="6"] .ds-hero-pop--right {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ds-hero-pop__card {
  width: 100%;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
}

.ds-hero-pop--left .ds-hero-pop__card,
.ds-hero-pop--right .ds-hero-pop__card {
  padding: var(--space-4);
}

.ds-hero-pop--left .ds-hero-pop__card {
  padding: var(--space-3);
}

.ds-hero-pop--right .ds-hero-pop__card {
  min-height: 407px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.ds-hero-pop--right .ds-hero-flow-qr__svg {
  width: 120px;
  height: 120px;
}

.ds-hero-pop--right .ds-hero-flow-qr__merchant {
  margin-bottom: var(--space-3);
}

.ds-hero-pop--right .ds-hero-flow-qr__merchant strong {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
}

.ds-hero-pop--right .ds-hero-flow-qr__merchant p {
  font-size: 10px;
}

.ds-hero-pop--right .ds-hero-flow-qr__label {
  margin-bottom: var(--space-2);
  font-size: 9px;
}

.ds-hero-pop--right .ds-hero-flow-qr__amount {
  font-size: var(--text-xs);
}

.ds-hero-pop--right .ds-hero-flow-qr__amount strong {
  font-size: var(--text-md);
}

.ds-hero-pop--right .ds-hero-flow-qr__hint {
  font-size: 10px;
  margin-bottom: var(--space-2);
}

.ds-hero-pop--right .ds-hero-flow-qr__wrap {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
}

.ds-hero-pop--right .ds-hero-flow-upi-icons {
  gap: var(--space-1);
  margin-bottom: 0;
}

.ds-hero-pop--right .ds-hero-flow-upi-icons__dot {
  width: 18px;
  height: 18px;
  border-width: 1px;
}

.ds-hero-pop__stack {
  position: relative;
}

.ds-hero-pop__stack--left {
  min-height: 152px;
}

.ds-hero-pop--left .ds-hero-pop__stack--left {
  min-height: 248px;
}

.ds-hero-pop__stack--right {
  min-height: 228px;
}

.ds-hero-pop--right .ds-hero-pop__stack--right {
  flex: 1;
  min-height: 358px;
}

.ds-hero-pop__pane {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease-out),
    visibility 0.35s;
}

.ds-hero-scene[data-demo-phase="1"] .ds-hero-pop__pane--cart {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ds-hero-scene[data-demo-phase="2"] .ds-hero-pop__pane--payment,
.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop__pane--payment {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop__pane--processing {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ds-hero-scene[data-demo-phase="5"] .ds-hero-pop__pane--success,
.ds-hero-scene[data-demo-phase="6"] .ds-hero-pop__pane--success {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop__pane--qr,
.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop__pane--qr {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ds-hero-scene[data-demo-phase="5"] .ds-hero-pop__pane--qr-done,
.ds-hero-scene[data-demo-phase="6"] .ds-hero-pop__pane--qr-done {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ds-hero-pop__pane--qr {
  min-height: 228px;
}

.ds-hero-pop--right .ds-hero-pop__pane--qr {
  min-height: 358px;
}

.ds-hero-pop-qr__stage {
  transition: opacity 0.35s var(--ease-out);
}

.ds-hero-pop-qr__stage--scan,
.ds-hero-pop-qr__stage--paid {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}

.ds-hero-pop-qr__stage--scan {
  opacity: 1;
}

.ds-hero-pop-qr__stage--paid {
  opacity: 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2);
}

.ds-hero-pop--right .ds-hero-pop-qr__stage--paid {
  min-height: 358px;
}

.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop-qr__stage--scan {
  opacity: 1;
}

.ds-hero-scene[data-demo-phase="3"] .ds-hero-pop-qr__stage--paid {
  opacity: 0;
  pointer-events: none;
}

.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop-qr__stage--scan {
  opacity: 0;
  pointer-events: none;
}

.ds-hero-scene[data-demo-phase="4"] .ds-hero-pop-qr__stage--paid {
  opacity: 1;
  pointer-events: auto;
}

.ds-hero-pop-pay__crumb {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-hero-pop-pay__crumb .muted {
  color: var(--color-text-light);
}

.ds-hero-pop-pay__crumb .sep {
  margin: 0 var(--space-1);
  color: var(--color-border);
}

.ds-hero-pop-pay__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-hero-pop-pay__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.ds-hero-pop-pay__opt {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
}

.ds-hero-pop-pay__opt small {
  font-weight: 500;
  color: var(--color-text-muted);
}

.ds-hero-pop-pay__opt--active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.ds-hero-pop-pay__ico {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-hero-pop--left .ds-hero-pop-pay__crumb {
  font-size: 10px;
  margin-bottom: var(--space-2);
}

.ds-hero-pop--left .ds-hero-pop-pay__title {
  font-size: 9px;
  margin-bottom: var(--space-2);
}

.ds-hero-pop--left .ds-hero-pop-pay__grid {
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ds-hero-pop--left .ds-hero-pop-pay__opt {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 8px;
  line-height: 1.35;
}

.ds-hero-pop--left .ds-hero-pop-pay__opt small {
  font-size: 9px;
  display: block;
  margin-top: 1px;
}

.ds-hero-pop--left .ds-hero-pop-pay__ico svg {
  width: 22px;
  height: 22px;
}

.ds-hero-pop--left .ds-hero-pop__pane--payment .ds-hero-flow-checkout {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: 10px;
}

.ds-hero-flow-cart--pop .ds-hero-flow-cart__head {
  margin-bottom: var(--space-3);
}

.ds-hero-flow-cart--pop .ds-hero-flow-cart__row {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
}

.ds-hero-pop--left .ds-hero-flow-cart--pop .ds-hero-flow-cart__head {
  margin-bottom: var(--space-2);
}

.ds-hero-pop--left .ds-hero-flow-cart--pop .ds-hero-flow-cart__row {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
}

.ds-hero-pop--left .ds-hero-flow-cart--pop .ds-hero-flow-cart__foot {
  gap: var(--space-2);
}

.ds-hero-pop--left .ds-hero-flow-cart--pop .ds-hero-flow-checkout {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.ds-hero-flow-checkout--hint {
  width: 100%;
}

.ds-hero-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-4);
}

.ds-hero-ring__svg {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 24px 24px;
}

.ds-hero-scene[data-demo-phase="4"] .ds-hero-ring__svg {
  animation: ds-hero-ring-spin 0.85s linear infinite;
}

@keyframes ds-hero-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.ds-hero-pop-process__txt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 var(--space-1);
}

.ds-hero-pop-process__sub {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

.ds-hero-pop-success__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-3);
}

.ds-hero-pop-success__icon svg {
  width: 100%;
  height: 100%;
}

.ds-hero-pop-success__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 var(--space-2);
}

.ds-hero-pop-success__meta {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

.ds-hero-pop-qr__paid-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.ds-hero-pop-qr__paid-amt {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

.ds-hero-pop-qr__toast {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.ds-hero-pop-done__big {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
}

.ds-hero-pop-done__big svg {
  width: 100%;
  height: 100%;
}

.ds-hero-pop-done__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 var(--space-1);
}

.ds-hero-pop-done__sub {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

.ds-hero-flow-qr--pop .ds-hero-flow-upi-icons {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .ds-hero-pop {
    min-width: 0;
    width: calc(100% - var(--space-4));
  }

  .ds-hero-pop--left {
    min-width: 0;
  }

  .ds-hero-pop--right {
    min-width: 0;
    top: -1rem;
  }

  .ds-hero-pop--right .ds-hero-pop__card {
    min-height: 0;
  }

  .ds-hero-pop--right .ds-hero-pop__stack--right,
  .ds-hero-pop--right .ds-hero-pop__pane--qr,
  .ds-hero-pop--right .ds-hero-pop-qr__stage--paid {
    min-height: 220px;
  }

  .ds-store__cover {
    margin-top: var(--space-4);
  }

  .ds-hero-flow-qr__svg {
    width: 112px;
    height: 112px;
  }
}

.ds-hero-flow-crumb {
  font-size: 10px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-hero-flow-pdp__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 520px) {
  .ds-hero-flow-pdp__grid {
    grid-template-columns: 1fr 120px;
    gap: var(--space-5);
  }
}

.ds-hero-flow-pdp__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
  line-height: var(--leading-snug);
}

.ds-hero-flow-pdp__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.ds-hero-flow-pdp__price {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.ds-hero-flow-pdp__rating {
  font-size: 10px;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

.ds-hero-flow-pdp__rating span {
  color: var(--color-text-muted);
}

.ds-hero-flow-pdp__desc {
  font-size: 11px;
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-hero-flow-swatches {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ds-hero-flow-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--color-border);
}

.ds-hero-flow-swatch--active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.ds-hero-flow-pdp__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ds-hero-flow-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
}

.ds-hero-flow-stepper--sm {
  font-size: var(--text-xs);
}

.ds-hero-flow-stepper__btn {
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  user-select: none;
}

.ds-hero-flow-stepper__val {
  padding: var(--space-2) var(--space-4);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  min-width: 2rem;
  text-align: center;
}

.ds-hero-demo-atc {
  flex: 1;
  min-width: 8rem;
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: default;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}

.ds-hero-scene:not([data-demo-phase="0"]) .ds-hero-demo-atc {
  animation: none;
}

.ds-hero-scene[data-demo-phase="0"] .ds-hero-demo-atc {
  animation: ds-hero-atc-press 1.2s ease-in-out infinite;
}

@keyframes ds-hero-atc-press {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-sm);
  }
  12% {
    transform: scale(0.96);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
  }
  28% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(88, 117, 225, 0.35);
  }
  45% {
    transform: scale(1);
    box-shadow: var(--shadow-sm);
  }
}

.ds-hero-flow-trust {
  font-size: 9px;
  color: var(--color-text-light);
  margin: 0;
  line-height: var(--leading-normal);
}

.ds-hero-flow-pdp__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-hero-flow-chair {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Cart step */
.ds-hero-flow-cart__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.ds-hero-flow-cart__head strong {
  color: var(--color-text);
}

.ds-hero-flow-cart__items {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

.ds-hero-flow-cart__row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--space-3);
  align-items: start;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.ds-hero-flow-cart__thumb svg {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: block;
}

.ds-hero-flow-cart__name {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.ds-hero-flow-cart__variant {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0;
}

.ds-hero-flow-cart__variant strong {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.ds-hero-flow-cart__price {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.ds-hero-flow-cart__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: auto;
}

.ds-hero-flow-cart__qty {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.ds-hero-flow-remove {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #e85d5d;
  cursor: default;
}

.ds-hero-flow-checkout {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: default;
  box-shadow: var(--shadow-sm);
}

/* QR + scan + toast */
.ds-hero-flow-qr {
  text-align: center;
}

.ds-hero-flow-qr__merchant {
  margin-bottom: var(--space-3);
}

.ds-hero-flow-qr__merchant strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.ds-hero-flow-qr__merchant p {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: var(--space-1) 0 0;
}

.ds-hero-flow-qr__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.ds-hero-flow-qr__wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  padding: var(--space-2);
}

.ds-hero-flow-qr__svg {
  display: block;
  width: 132px;
  height: 132px;
}

@media (min-width: 640px) {
  .ds-hero-flow-qr__svg {
    width: 148px;
    height: 148px;
  }
}

.ds-hero-flow-qr__scan {
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  height: 3px;
  top: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(88, 117, 225, 0.15) 20%,
    rgba(88, 117, 225, 0.85) 50%,
    rgba(88, 117, 225, 0.15) 80%,
    transparent
  );
  box-shadow: 0 0 12px rgba(88, 117, 225, 0.5);
  pointer-events: none;
  opacity: 0;
}

.ds-hero-scene:not([data-demo-phase="3"]) .ds-hero-flow-qr__scan {
  animation: none;
  opacity: 0;
}

.ds-hero-scene[data-demo-phase="3"] .ds-hero-flow-qr__scan {
  opacity: 1;
  animation: ds-hero-qr-scan 2s ease-in-out infinite;
}

@keyframes ds-hero-qr-scan {
  0% {
    top: 8px;
  }
  100% {
    top: calc(100% - 14px);
  }
}

.ds-hero-flow-qr__amount {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2);
}

.ds-hero-flow-qr__amount strong {
  color: var(--color-text);
  font-size: var(--text-lg);
}

.ds-hero-flow-qr__hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  line-height: var(--leading-relaxed);
}

.ds-hero-flow-upi-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ds-hero-flow-upi-icons__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--shadow-xs);
}

.ds-hero-flow-toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}

.ds-hero-scene[data-demo-phase="5"] .ds-hero-pop-done__big,
.ds-hero-scene[data-demo-phase="6"] .ds-hero-pop-done__big {
  animation: ds-hero-done-pop 0.55s var(--ease-out) both;
}

@keyframes ds-hero-done-pop {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Inner mock cards */
.ds-hero-mock {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
  height: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.ds-hero-mock__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.ds-hero-mock__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}

.ds-hero-mock__sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

.ds-hero-mock__amount {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}

.ds-hero-mock__row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  flex: 1;
}

.ds-hero-qr-svg {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--color-border);
  display: block;
}

.ds-hero-qr-svg--lg {
  width: 148px;
  height: 148px;
}

.ds-hero-mock__methods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ds-hero-mock__pill {
  font-size: 10px;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
}

.ds-hero-mock__cta {
  margin-top: auto;
  width: 100%;
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: default;
}

/* Dashboard slide */
.ds-hero-dash {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.ds-hero-dash__stat {
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border: 1px solid var(--color-border-light);
}

.ds-hero-dash__stat strong {
  display: block;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.ds-hero-dash__stat span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.ds-hero-table {
  width: 100%;
  font-size: var(--text-xs);
  border-collapse: collapse;
}

.ds-hero-table th,
.ds-hero-table td {
  text-align: left;
  padding: var(--space-2) var(--space-1);
  border-bottom: 1px solid var(--color-border-light);
}

.ds-hero-table th {
  color: var(--color-text-muted);
  font-weight: 600;
}

/* QR hero slide */
.ds-hero-qrhero {
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: var(--space-4);
}

.ds-hero-qrhero .ds-hero-qr-svg {
  margin: 0 auto;
}

/* -------------------------------------------------------------------------
   10. CTA band & footer
   ------------------------------------------------------------------------- */
.ds-cta-band {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--color-bg-muted);
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  border-radius: var(--radius-2xl);
  margin: 0 var(--space-6) var(--space-16);
}

.ds-footer {
  background: var(--color-bg-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.ds-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .ds-footer__grid {
    grid-template-columns: 2fr repeat(4, 1fr);
  }
}

.ds-footer__brand-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 20rem;
}

.ds-footer__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

.ds-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-footer__list li {
  margin-bottom: var(--space-3);
}

.ds-footer__list a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.ds-footer__list a:hover {
  color: var(--color-primary);
}

.ds-footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.ds-footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: var(--text-sm);
  transition: background var(--duration-fast);
}

.ds-footer__social a:hover {
  background: var(--color-primary-hover);
}

.ds-footer__bar {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.ds-footer__bar a {
  color: var(--color-text-muted);
  text-decoration: none;
  margin-left: var(--space-4);
}

.ds-footer__bar a:hover {
  color: var(--color-text);
}

/* -------------------------------------------------------------------------
   11. Spacing utilities (optional quick helpers)
   ------------------------------------------------------------------------- */
.ds-mt-0 { margin-top: 0; }
.ds-mb-0 { margin-bottom: 0; }
.ds-mb-2 { margin-bottom: var(--space-2); }
.ds-mt-4 { margin-top: var(--space-4); }
.ds-mb-4 { margin-bottom: var(--space-4); }
.ds-mt-6 { margin-top: var(--space-6); }
.ds-mb-6 { margin-bottom: var(--space-6); }
.ds-mt-8 { margin-top: var(--space-8); }
.ds-mb-8 { margin-bottom: var(--space-8); }
.ds-py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

/* Visually hidden (a11y) */
.ds-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;
}

/* -------------------------------------------------------------------------
   12. Landing page — pricing stack & PayKun modal compat
   ------------------------------------------------------------------------- */
.ds-pricing-section .ds-pricing-card {
  height: 100%;
}

.ds-pricing-popular-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
}

.ds-pricing-card .ds-btn--block {
  margin-top: auto;
}

/* Bootstrap 3/4 modal fallback (PayKun / legacy scripts) */
.modal {
  display: none;
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  outline: 0;
}

.modal.in,
.modal.show {
  display: block !important;
}

.modal-dialog {
  position: relative;
  width: auto;
  max-width: 32rem;
  margin: var(--space-10) auto;
}

.modal-content {
  position: relative;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

.modal-style .close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  line-height: 1;
}

.modal-style .close:hover {
  color: var(--color-text);
}

.modal-style .page-body .head {
  text-align: center;
  margin-bottom: var(--space-4);
}

.modal-style .page-body .head h2 {
  font-size: var(--text-xl);
  margin: var(--space-2) 0 0;
}

.modal-style .tdt table {
  width: 100%;
  font-size: var(--text-sm);
}

.modal-style .tdt .ftd {
  padding: var(--space-2);
  color: var(--color-text-muted);
}

.modal-style .tdt .std {
  padding: var(--space-2);
  font-weight: 600;
}

.modal-style .transaction-note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Auth — split login / register (uses :root tokens + .ds-btn)
   ------------------------------------------------------------------------- */
body.ds-auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-subtle);
  -webkit-font-smoothing: antialiased;
}

.ds-auth-page a:not(.ds-btn) {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.ds-auth-page a:not(.ds-btn):hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.ds-auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
}

.ds-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

.ds-auth-brand:hover {
  text-decoration: none;
  color: var(--color-text);
}

.ds-auth-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-indigo) 100%);
  flex-shrink: 0;
}

.ds-auth-brand img {
  max-height: 36px;
  width: auto;
  display: block;
}

.ds-auth-help {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg-subtle);
  text-decoration: none;
}

.ds-auth-help:hover {
  border-color: var(--color-text-light);
  color: var(--color-text);
  text-decoration: none;
}

.ds-auth-split {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1120px;
  margin: 0 auto;
  min-height: calc(100vh - 88px);
  align-items: stretch;
}

@media (min-width: 960px) {
  .ds-auth-split {
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 420px);
    gap: 0;
    padding: 0 var(--space-6) var(--space-12);
  }
}

.ds-auth-vline {
  display: none;
  background: var(--color-border-light);
}

@media (min-width: 960px) {
  .ds-auth-vline {
    display: block;
  }
}

.ds-auth-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

@media (min-width: 960px) {
  .ds-auth-visual {
    padding: var(--space-10) var(--space-8) var(--space-12);
    align-items: center;
  }
}

.ds-auth-visual__art {
  width: 100%;
  max-width: 380px;
  margin-bottom: var(--space-8);
}

.ds-auth-visual__tagline {
  margin: 0;
  max-width: 28rem;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.ds-auth-panel {
  padding: var(--space-6) var(--space-6) var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 960px) {
  .ds-auth-panel {
    padding: var(--space-10) var(--space-4) var(--space-12) var(--space-10);
  }
}

.ds-auth-panel__title {
  margin: 0 0 var(--space-6);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.ds-auth-field {
  margin-bottom: var(--space-5);
}

.ds-auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.ds-auth-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.ds-auth-label-row .ds-auth-label {
  margin: 0;
}

.ds-auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.ds-auth-input::placeholder {
  color: var(--color-text-light);
}

.ds-auth-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
  background: var(--color-bg-subtle);
}

.ds-auth-input-wrap {
  position: relative;
}

.ds-auth-input-wrap .ds-auth-input {
  padding-right: 2.75rem;
}

.ds-auth-pw-toggle {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-auth-pw-toggle:hover {
  color: var(--color-text);
  background: var(--color-bg-subtle);
}

.ds-auth-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.ds-auth-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.ds-auth-form .ds-btn--block {
  margin-top: var(--space-1);
}

.ds-auth-muted + .ds-btn--block {
  margin-top: var(--space-2);
}

.ds-auth-muted {
  text-align: center;
  margin: var(--space-5) 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.ds-auth-grid2 {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 520px) {
  .ds-auth-grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

.ds-auth-foot {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
