/* =========================================================================
   Cardly Design System & Multi-Dimensional Stylesheet (v2.1)
   Inspired by Apple, Linear, Stripe, and Vercel.
   Architecture:
     1. Primitive Tokens (--cd-prim-*)
     2. Semantic Tokens  (--cd-bg, --cd-surface, --cd-text, --cd-border, ...)
     3. Component Tokens (--cd-av-size, --cd-qr-size, --cd-pad, --cd-gap, ...)
     4. 12 Distinct Template Archetypes ([data-archetype="..."])
     5. 7 Adaptive Dimension Compositions (Mobile, Portrait, Square, Landscape,
        85×55mm Physical Business Card, Classic 16:10, Dual-Sided 3D)
   ========================================================================= */

/* ---- 1. Primitive Design Tokens ---- */
:root {
  --cd-prim-slate-950: #090d16;
  --cd-prim-slate-900: #0f172a;
  --cd-prim-slate-800: #1e293b;
  --cd-prim-slate-600: #475569;
  --cd-prim-slate-500: #64748b;
  --cd-prim-slate-200: #e2e8f0;
  --cd-prim-slate-100: #f1f5f9;
  --cd-prim-slate-50:  #f8fafc;
  --cd-prim-ivory:     #faf9f5;
  --cd-prim-obsidian:  #09090d;
  --cd-prim-gold:      #d4af37;

  --cd-prim-radius-xs: 8px;
  --cd-prim-radius-sm: 12px;
  --cd-prim-radius-md: 16px;
  --cd-prim-radius-lg: 22px;
  --cd-prim-radius-xl: 28px;

  --cd-prim-blur-sm: blur(10px);
  --cd-prim-blur-lg: blur(20px) saturate(175%);

  --cd-prim-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cd-prim-shadow-dark:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 64px -16px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  --cd-prim-shadow-light:
    0 20px 52px -16px rgba(15, 23, 42, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

/* ---- Stage Wrapper & Dimension Switcher ---- */
.cd-stage-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
}

.cd-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: var(--cd-prim-blur-lg);
  backdrop-filter: var(--cd-prim-blur-lg);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
}
.cd-switcher::-webkit-scrollbar { display: none; }

body.is-cardly:not(.cardly-page) .cd-switcher {
  background: var(--glass-bg-strong, var(--surface));
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.cd-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.76);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background 0.16s ease, color 0.16s ease;
  min-height: 36px;
}
body.is-cardly:not(.cardly-page) .cd-switcher__btn { color: var(--text-2); }
.cd-switcher__btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
body.is-cardly:not(.cardly-page) .cd-switcher__btn:hover { color: var(--text); background: var(--surface-2); }
.cd-switcher__btn.is-active {
  background: linear-gradient(135deg, var(--c1, #2563eb), var(--c2, #7c3aed));
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
}
.cd-switcher__ratio {
  font-size: 10.5px;
  opacity: 0.78;
  font-weight: 500;
}

/* ---- Responsive Viewport & Aspect-Ratio Frames (Zero Horizontal Overflow) ---- */
.cd-viewport {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cd-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  container-type: inline-size;
  margin: 0 auto;
  transition: max-width 0.26s var(--cd-prim-ease);
}

.cd-frame--classic_16_10,
.cd-frame--dual_16_10     { max-width: 720px; aspect-ratio: 16 / 10; }
.cd-frame--print_85_55    { max-width: 660px; aspect-ratio: 85 / 55; }
.cd-frame--square_1_1     { max-width: 540px; aspect-ratio: 1 / 1; }
.cd-frame--portrait_4_5   { max-width: 470px; aspect-ratio: 4 / 5; }
.cd-frame--mobile_9_16    { max-width: 430px; aspect-ratio: 9 / 16; }
.cd-frame--landscape_16_9 { max-width: 820px; aspect-ratio: 16 / 9; }

/* Public page fluid frames: hug content naturally with ZERO artificial height void */
.cd-frame.cd-frame--fluid {
  aspect-ratio: auto !important;
  min-height: 0 !important;
}
.cd-frame.cd-frame--fluid > .cd-card {
  height: auto;
}

@media (max-width: 640px) {
  .cd-frame--classic_16_10,
  .cd-frame--print_85_55,
  .cd-frame--landscape_16_9,
  .cd-frame--square_1_1,
  .cd-frame--portrait_4_5,
  .cd-frame--mobile_9_16 {
    aspect-ratio: auto;
    min-height: 0;
  }
  .cd-frame:not(.cd-frame--dual_16_10) > .cd-card {
    height: auto;
  }
  .cd-frame--dual_16_10 {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
}

/* ---- 2 & 3. Semantic + Component Token Base & Self-Contained Reset ---- */
.cd-card,
.cd-card *,
.cd-card *::before,
.cd-card *::after {
  box-sizing: border-box;
}

.cd-card {
  --cd-a1: #2563eb;
  --cd-a2: #7c3aed;
  --cd-a1-ink: #60a5fa;
  --cd-a2-ink: #a78bfa;
  --cd-glow-1: #3b82f6;
  --cd-glow-2: #8b5cf6;
  --cd-btn-1: #2563eb;
  --cd-btn-2: #7c3aed;
  --cd-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --cd-display-font: var(--cd-font);
  --cd-radius: var(--cd-prim-radius-lg);
  --cd-type-scale: 1;
  --cd-name-fit: 1;
  --cd-pad: clamp(18px, 4.8cqw, 34px);
  --cd-gap: clamp(12px, 2.5cqw, 20px);

  /* Default Dark Semantic Tokens */
  --cd-bg: #0c1222;
  --cd-surface: rgba(255, 255, 255, 0.075);
  --cd-surface-hi: rgba(255, 255, 255, 0.13);
  --cd-text: #f8fafc;
  --cd-muted: rgba(248, 250, 252, 0.82);
  --cd-faint: rgba(248, 250, 252, 0.56);
  --cd-border: rgba(255, 255, 255, 0.14);
  --cd-chip-bg: rgba(255, 255, 255, 0.085);

  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: var(--cd-radius);
  font-family: var(--cd-font);
  color: var(--cd-text);
  background: var(--cd-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--cd-prim-shadow-dark);
  isolation: isolate;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.cd-card a {
  color: inherit;
  text-decoration: none;
  user-select: auto;
}
.cd-card button {
  font-family: inherit;
  user-select: auto;
}
.cd-card a:focus-visible,
.cd-card button:focus-visible {
  outline: 2px solid var(--cd-a1-ink);
  outline-offset: 2px;
}

/* Light Surface Semantic Base */
.cd-card[data-surface="light"] {
  --cd-bg: #ffffff;
  --cd-surface: #f8fafc;
  --cd-surface-hi: #f1f5f9;
  --cd-text: #0f172a;
  --cd-muted: #334155;
  --cd-faint: #64748b;
  --cd-border: #e2e8f0;
  --cd-chip-bg: #f1f5f9;
  box-shadow: var(--cd-prim-shadow-light);
}

/* Adaptive Density & Explicit Spacing Tokens */
.cd-card[data-density="rich"]        { --cd-pad: clamp(16px, 4.1cqw, 28px); --cd-gap: clamp(10px, 1.9cqw, 15px); }
.cd-card[data-density="minimal-data"]{ --cd-pad: clamp(20px, 5.2cqw, 36px); --cd-gap: clamp(12px, 2.4cqw, 18px); }
.cd-card[data-spacing="compact"]     { --cd-pad: clamp(14px, 3.8cqw, 24px); --cd-gap: clamp(9px, 1.7cqw, 14px); }
.cd-card[data-spacing="spacious"]    { --cd-pad: clamp(22px, 5.6cqw, 38px); --cd-gap: clamp(14px, 3.1cqw, 24px); }

/* Font Presets */
.cd-card[data-font="jakarta"]  { --cd-font: 'Plus Jakarta Sans', -apple-system, sans-serif; --cd-display-font: 'Plus Jakarta Sans', sans-serif; }
.cd-card[data-font="satoshi"]  { --cd-font: 'Satoshi', -apple-system, sans-serif; --cd-display-font: 'Satoshi', sans-serif; }
.cd-card[data-font="clash"]    { --cd-font: 'Satoshi', -apple-system, sans-serif; --cd-display-font: 'Clash Display', 'Plus Jakarta Sans', sans-serif; }
.cd-card[data-font="playfair"] { --cd-font: 'Plus Jakarta Sans', -apple-system, sans-serif; --cd-display-font: Georgia, 'Playfair Display', serif; }
.cd-card[data-font="mono"]     { --cd-font: 'Plus Jakarta Sans', -apple-system, sans-serif; --cd-display-font: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace; }

/* =========================================================================
   4. Twelve Genuinely Distinct Template Archetypes
   ========================================================================= */

/* 1. GLASS — Translucent Frosted Layers over Subtle Dual-Aurora Light */
.cd-card[data-archetype="glass"] {
  background:
    radial-gradient(88% 76% at 8% 10%, color-mix(in srgb, var(--cd-glow-1) 38%, transparent), transparent 64%),
    radial-gradient(84% 74% at 92% 90%, color-mix(in srgb, var(--cd-glow-2) 32%, transparent), transparent 64%),
    linear-gradient(155deg, color-mix(in srgb, var(--cd-glow-1) 14%, #0d1425) 0%, #090e1b 100%);
}
.cd-card[data-archetype="glass"][data-surface="light"] {
  --cd-surface: rgba(255, 255, 255, 0.76);
  --cd-surface-hi: rgba(255, 255, 255, 0.94);
  --cd-border: color-mix(in srgb, var(--cd-a1) 15%, rgba(15, 23, 42, 0.1));
  background:
    radial-gradient(88% 76% at 8% 10%, color-mix(in srgb, var(--cd-glow-1) 20%, transparent), transparent 64%),
    radial-gradient(84% 74% at 92% 90%, color-mix(in srgb, var(--cd-glow-2) 16%, transparent), transparent 64%),
    #f6f9fe;
}

/* 2. EXECUTIVE — Vertical Left Brand Spine & Structured Executive Cells */
.cd-card[data-archetype="executive"] {
  background: linear-gradient(145deg, color-mix(in srgb, var(--cd-glow-1) 12%, #0e1628) 0%, #0a0f1c 100%);
  padding-left: 6px;
}
.cd-card[data-archetype="executive"][data-surface="light"] {
  background: linear-gradient(145deg, #ffffff 0%, color-mix(in srgb, var(--cd-glow-1) 5%, #f8fafc) 100%);
}
.cd-card[data-archetype="executive"]::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--cd-btn-1), var(--cd-btn-2));
  z-index: 6;
}
.cd-card[data-archetype="executive"] .cd-contacts:not(.cd-contacts--stack) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}
.cd-card[data-archetype="executive"] .cd-contact-pill {
  border-radius: 8px;
  width: 100%;
}

/* 3. MINIMAL — Clean Swiss Typography & Crisp Hairline Dividers */
.cd-card[data-archetype="minimal"] {
  --cd-surface: transparent;
  --cd-surface-hi: color-mix(in srgb, var(--cd-text) 5%, transparent);
  --cd-chip-bg: color-mix(in srgb, var(--cd-text) 5%, transparent);
  background: var(--cd-bg);
}
.cd-card[data-archetype="minimal"][data-surface="dark"] {
  --cd-bg: #0b0e14;
  --cd-border: rgba(255, 255, 255, 0.12);
}
.cd-card[data-archetype="minimal"] .cd-bio {
  border-left: none;
  padding-left: 0;
  padding-top: 10px;
  border-top: 1px solid var(--cd-border);
}
.cd-card[data-archetype="minimal"] .cd-contact-pill {
  border-radius: 8px;
  background: color-mix(in srgb, var(--cd-text) 3.5%, transparent);
}

/* 4. LUXURY — Obsidian, Champagne Gold & Filigree Double Frame */
.cd-card[data-archetype="luxury"] {
  --cd-bg: #09090d;
  --cd-surface: rgba(212, 175, 55, 0.06);
  --cd-surface-hi: rgba(212, 175, 55, 0.12);
  --cd-border: color-mix(in srgb, var(--cd-a1-ink) 36%, rgba(255, 255, 255, 0.14));
  --cd-chip-bg: rgba(212, 175, 55, 0.08);
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--cd-glow-1) 20%, transparent), transparent 65%),
    #09090d;
}
.cd-card[data-archetype="luxury"][data-surface="light"] {
  --cd-bg: #fcfbf7;
  --cd-surface: rgba(180, 140, 36, 0.06);
  --cd-surface-hi: rgba(180, 140, 36, 0.12);
  --cd-border: rgba(180, 140, 36, 0.28);
  background: radial-gradient(80% 60% at 50% 0%, rgba(212, 175, 55, 0.1), transparent 65%), #fcfbf7;
}
.cd-card[data-archetype="luxury"]::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: calc(max(0px, var(--cd-radius) - 7px));
  border: 1px solid color-mix(in srgb, var(--cd-a1-ink) 34%, rgba(255, 255, 255, 0.1));
  pointer-events: none;
  z-index: 4;
}
.cd-luxury-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--cd-a1-ink);
  font-size: 9px;
  opacity: 0.85;
}
.cd-luxury-ornament span {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cd-a1-ink), transparent);
}
.cd-luxury-ornament i { font-style: normal; }

/* 5. CREATOR — Social-First Expressive Stage & Spotlight Links */
.cd-card[data-archetype="creator"] {
  background:
    radial-gradient(95% 65% at 50% 0%, color-mix(in srgb, var(--cd-glow-1) 44%, transparent), transparent 62%),
    radial-gradient(75% 65% at 85% 95%, color-mix(in srgb, var(--cd-glow-2) 32%, transparent), transparent 62%),
    #0c0f1a;
}
.cd-card[data-archetype="creator"][data-surface="light"] {
  background:
    radial-gradient(95% 55% at 50% 0%, color-mix(in srgb, var(--cd-glow-1) 24%, transparent), transparent 62%),
    #ffffff;
}
.cd-card[data-archetype="creator"] .cd-soc {
  background: color-mix(in srgb, var(--cd-glow-1) 18%, var(--cd-surface));
  border-color: color-mix(in srgb, var(--cd-a1-ink) 38%, var(--cd-border));
}

/* 6. DEVELOPER — Terminal Chrome, Dot-Matrix Canvas & Monospace Syntax */
.cd-card[data-archetype="developer"] {
  --cd-bg: #090d16;
  --cd-surface: rgba(15, 23, 42, 0.78);
  --cd-surface-hi: rgba(30, 41, 59, 0.9);
  --cd-border: rgba(148, 163, 184, 0.2);
  --cd-chip-bg: rgba(99, 102, 241, 0.12);
  background-color: #090d16;
  background-image:
    radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    radial-gradient(70% 55% at 90% 10%, color-mix(in srgb, var(--cd-glow-1) 24%, transparent), transparent 65%);
  background-size: 18px 18px, 100% 100%;
}
.cd-card[data-archetype="developer"][data-surface="light"] {
  --cd-bg: #f8fafc;
  --cd-surface: #ffffff;
  --cd-surface-hi: #f1f5f9;
  --cd-border: #cbd5e1;
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(15, 23, 42, 0.1) 1px, transparent 1px);
  background-size: 18px 18px;
}
.cd-chrome-dev {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--cd-border);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--cd-faint);
  flex: 0 0 auto;
}
.cd-chrome-dots { display: inline-flex; gap: 5px; }
.cd-chrome-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.cd-chrome-dots i:nth-child(1) { background: #ef4444; }
.cd-chrome-dots i:nth-child(2) { background: #f59e0b; }
.cd-chrome-dots i:nth-child(3) { background: #22c55e; }
.cd-chrome-path { color: var(--cd-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-chrome-tag { font-size: 9.5px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--cd-border); }
.cd-dev-prompt { color: var(--cd-a1-ink); font-family: ui-monospace, 'SF Mono', monospace; font-weight: 700; }
.cd-card[data-archetype="developer"] .cd-role,
.cd-card[data-archetype="developer"] .cd-skill {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.cd-card[data-archetype="developer"] .cd-skill {
  border-radius: 6px;
}

/* 7. CORPORATE — Enterprise Credential Header Band & Structured Directory */
.cd-card[data-archetype="corporate"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--cd-glow-1) 6%, var(--cd-bg)) 0%, var(--cd-bg) 42%);
}
.cd-card[data-archetype="corporate"]::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--cd-btn-1), var(--cd-btn-2));
  z-index: 6;
}
.cd-chrome-corp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cd-border);
  flex: 0 0 auto;
}
.cd-chrome-corp__logo {
  height: 24px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
}

/* 8. CLASSIC — Engraved Fine-Stationery Calling Card */
.cd-card[data-archetype="classic"] {
  --cd-bg: var(--cd-prim-ivory);
  --cd-surface: rgba(15, 23, 42, 0.035);
  --cd-surface-hi: rgba(15, 23, 42, 0.07);
  --cd-border: rgba(15, 23, 42, 0.14);
  --cd-chip-bg: rgba(15, 23, 42, 0.045);
  background: var(--cd-bg);
}
.cd-card[data-archetype="classic"][data-surface="dark"] {
  --cd-bg: #131418;
  --cd-surface: rgba(255, 255, 255, 0.05);
  --cd-surface-hi: rgba(255, 255, 255, 0.1);
  --cd-border: rgba(255, 255, 255, 0.15);
  --cd-chip-bg: rgba(255, 255, 255, 0.06);
  background: #131418;
}
.cd-classic-rule {
  width: 44px;
  height: 1.5px;
  background: var(--cd-a1-ink);
  margin: 8px auto 0;
  opacity: 0.7;
}
.cd-id:not(.cd-id--center) .cd-classic-rule { margin-left: 0; }

/* 9. BENTO — Modular Grid-Based Information Tiles */
.cd-card[data-archetype="bento"] {
  --cd-bg: #0b0f19;
  --cd-surface: rgba(255, 255, 255, 0.06);
  --cd-border: rgba(255, 255, 255, 0.11);
  background:
    radial-gradient(75% 65% at 95% 5%, color-mix(in srgb, var(--cd-glow-1) 26%, transparent), transparent 60%),
    #0b0f19;
}
.cd-card[data-archetype="bento"][data-surface="light"] {
  --cd-bg: #eef2f6;
  --cd-surface: #ffffff;
  --cd-border: rgba(15, 23, 42, 0.08);
  background: #eef2f6;
}
.cd-bento-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cd-bento-cell {
  padding: clamp(10px, 2.3cqw, 15px);
  border-radius: 14px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
}

/* 10. GRADIENT — Contemporary Multi-Stop Mesh Surface */
.cd-card[data-archetype="gradient"] {
  --cd-surface: rgba(255, 255, 255, 0.14);
  --cd-surface-hi: rgba(255, 255, 255, 0.22);
  --cd-border: rgba(255, 255, 255, 0.24);
  --cd-chip-bg: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(85% 75% at 15% 15%, color-mix(in srgb, var(--cd-btn-1) 82%, #0f172a), transparent 68%),
    radial-gradient(85% 75% at 88% 85%, color-mix(in srgb, var(--cd-btn-2) 78%, #0f172a), transparent 68%),
    #111827;
}
.cd-card[data-archetype="gradient"][data-surface="light"] {
  --cd-surface: rgba(255, 255, 255, 0.78);
  --cd-surface-hi: rgba(255, 255, 255, 0.95);
  --cd-border: rgba(15, 23, 42, 0.1);
  background:
    radial-gradient(85% 75% at 12% 12%, color-mix(in srgb, var(--cd-glow-1) 34%, #ffffff), transparent 68%),
    radial-gradient(85% 75% at 88% 88%, color-mix(in srgb, var(--cd-glow-2) 30%, #ffffff), transparent 68%),
    #ffffff;
}

/* 11. MONOCHROME — Stark Black-and-White Architectural Design */
.cd-card[data-archetype="monochrome"] {
  --cd-bg: #09090b;
  --cd-surface: #141417;
  --cd-surface-hi: #1f1f23;
  --cd-text: #fafafa;
  --cd-muted: #d4d4d8;
  --cd-faint: #a1a1aa;
  --cd-border: #27272a;
  --cd-chip-bg: #18181b;
  --cd-a1-ink: #fafafa;
  --cd-a2-ink: #d4d4d8;
  background: #09090b;
}
.cd-card[data-archetype="monochrome"][data-surface="light"] {
  --cd-bg: #ffffff;
  --cd-surface: #fafafa;
  --cd-surface-hi: #f4f4f5;
  --cd-text: #09090b;
  --cd-muted: #3f3f46;
  --cd-faint: #71717a;
  --cd-border: #e4e4e7;
  --cd-chip-bg: #f4f4f5;
  --cd-a1-ink: #09090b;
  --cd-a2-ink: #3f3f46;
  background: #ffffff;
}
.cd-chrome-mono {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--cd-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.cd-card[data-archetype="monochrome"] .cd-cta-btn {
  background: var(--cd-text);
  color: var(--cd-bg) !important;
  box-shadow: none;
}

/* 12. EDITORIAL — Magazine Masthead Typography & Fine Rules */
.cd-card[data-archetype="editorial"] {
  background: var(--cd-bg);
}
.cd-card[data-archetype="editorial"][data-surface="dark"] {
  --cd-bg: #100e12;
}
.cd-chrome-editorial {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-top: 2px solid var(--cd-text);
  border-bottom: 1px solid var(--cd-border);
  padding-top: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cd-muted);
  flex: 0 0 auto;
}
.cd-card[data-archetype="editorial"] .cd-name {
  letter-spacing: -0.03em;
}

/* ---- Border Styles ---- */
.cd-card[data-border="none"]   { border: none; }
.cd-card[data-border="subtle"] { border: 1px solid var(--cd-border); }
.cd-card[data-border="crisp"]  { border: 2px solid var(--cd-border); }
.cd-card[data-border="double"] {
  border: 1.5px solid color-mix(in srgb, var(--cd-a1-ink) 50%, var(--cd-border));
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px var(--cd-border), 0 24px 60px -18px rgba(0,0,0,.5);
}
.cd-card[data-border="glow"] {
  border: 1.5px solid color-mix(in srgb, var(--cd-a1-ink) 68%, #fff);
  box-shadow: 0 0 34px -6px color-mix(in srgb, var(--cd-glow-1) 48%, transparent), 0 24px 60px -18px rgba(0,0,0,.5);
}

/* ---- Atmospheric & Custom Background Layers ---- */
.cd-bg-layer,
.cd-bg-scrim,
.cd-bg-cover-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cd-bg-layer { z-index: 0; background-size: cover; background-position: center; }
.cd-bg-scrim { z-index: 1; }
.cd-bg-cover-wash {
  z-index: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(155deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.12) 100%);
  mask-image: linear-gradient(155deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.12) 100%);
}
.cd-mobile-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 170px;
  z-index: 1;
  background-size: cover;
  background-position: center 22%;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.3) 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.3) 62%, transparent 100%);
  pointer-events: none;
}
.cd-portrait-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 115px;
  z-index: 1;
  background-size: cover;
  background-position: center 24%;
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  pointer-events: none;
}

/* ---- Content Canvas & Scroll-Safe Overflow Regions ---- */
.cd-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: var(--cd-pad);
  display: flex;
  flex-direction: column;
  gap: var(--cd-gap);
  min-width: 0;
  min-height: 0;
}

.cd-scroll-zone {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--cd-a1-ink) 40%, transparent) transparent;
}
.cd-scroll-zone::-webkit-scrollbar { width: 4px; }
.cd-scroll-zone::-webkit-scrollbar-track { background: transparent; }
.cd-scroll-zone::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--cd-a1-ink) 40%, transparent);
  border-radius: 999px;
}

/* ---- Pinned Company Logo ---- */
.cd-logo-pin {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  max-width: 24%;
  pointer-events: none;
}
.cd-logo-pin--top-right   { top: var(--cd-pad); right: var(--cd-pad); }
.cd-logo-pin--top-left    { top: var(--cd-pad); left: var(--cd-pad); }
.cd-logo-pin--bottom-left { bottom: var(--cd-pad); left: var(--cd-pad); }
.cd-logo-img {
  height: calc(clamp(20px, 5.2cqw, 44px) * var(--cd-logo-scale, 1));
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* ---- Avatar Component (Strict 1:1 Geometry — Never Stretches or Distorts) ---- */
.cd-avatar {
  width: var(--cd-av-size, clamp(54px, 13.5cqw, 96px));
  height: var(--cd-av-size, clamp(54px, 13.5cqw, 96px));
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--cd-a1-ink) 55%, rgba(255, 255, 255, 0.72));
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, var(--cd-btn-1), var(--cd-btn-2));
  color: #ffffff;
  display: grid;
  place-items: center;
  font-family: var(--cd-display-font);
  font-weight: 800;
  font-size: calc(var(--cd-av-size, 64px) * 0.4);
  line-height: 1;
  overflow: hidden;
}
.cd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cd-card[data-avatar="circle"]   .cd-avatar { border-radius: 50%; }
.cd-card[data-avatar="rounded"]  .cd-avatar { border-radius: 18%; }
.cd-card[data-avatar="squircle"] .cd-avatar { border-radius: 28%; }

/* ---- Identity Typography & Optically Aligned Verification Badge ---- */
.cd-id {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.8cqw, 20px);
  min-width: 0;
}
.cd-id--center {
  flex-direction: column;
  text-align: center;
  gap: clamp(10px, 2cqw, 14px);
}
.cd-id--right {
  flex-direction: row-reverse;
  text-align: right;
}
.cd-id-text {
  min-width: 0;
  flex: 1;
  max-width: 100%;
}
.cd-name {
  font-family: var(--cd-display-font);
  font-weight: 800;
  font-size: clamp(16px, calc(var(--cd-name-base, 4.6cqw) * var(--cd-type-scale, 1) * var(--cd-name-fit, 1)), 42px);
  line-height: 1.12;
  letter-spacing: -0.024em;
  color: var(--cd-text);
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
}
.cd-name-tail {
  display: inline;
  white-space: nowrap;
}
/* Allow super-long single words (>20 chars) to wrap safely on tiny viewports */
@media (max-width: 380px) {
  .cd-name-tail { white-space: normal; }
}
.cd-name-accent {
  background: linear-gradient(125deg, var(--cd-a1-ink), var(--cd-a2-ink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.11em;
  margin-left: 0.24em;
  width: 0.78em;
  height: 0.78em;
  min-width: 15px;
  min-height: 15px;
  max-width: 22px;
  max-height: 22px;
}
.cd-badge svg { width: 100%; height: 100%; display: block; }

.cd-role {
  font-size: clamp(12px, calc(var(--cd-role-base, 2.35cqw) * var(--cd-type-scale, 1)), 18px);
  font-weight: 600;
  color: var(--cd-muted);
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: break-word;
}
.cd-subrole {
  font-size: clamp(11px, calc(2cqw * var(--cd-type-scale, 1)), 14px);
  font-weight: 500;
  color: var(--cd-faint);
  margin-top: 2px;
  line-height: 1.32;
}
.cd-company-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cd-chip-bg);
  border: 1px solid var(--cd-border);
  font-size: clamp(11px, calc(1.9cqw * var(--cd-type-scale, 1)), 13px);
  font-weight: 700;
  color: var(--cd-text);
  max-width: 100%;
}
.cd-company-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-company-row img {
  height: 14px;
  width: auto;
  border-radius: 3px;
  object-fit: contain;
  flex: 0 0 auto;
}

.cd-bio {
  font-size: clamp(12px, calc(2.15cqw * var(--cd-type-scale, 1)), 14.5px);
  line-height: 1.5;
  color: var(--cd-muted);
  margin: 0;
  padding-left: 11px;
  border-left: 2px solid var(--cd-a1-ink);
  overflow-wrap: break-word;
}
.cd-bio--center {
  text-align: center;
  padding-left: 0;
  border-left: none;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Contact Actions, Social Icons (40px+ Touch Targets), Links & Skills ---- */
.cd-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.cd-contacts--center { justify-content: center; }
.cd-contacts--stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.cd-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  color: var(--cd-text);
  font-size: clamp(11.5px, 1.95cqw, 13.5px);
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.14s ease;
}
.cd-contacts--stack .cd-contact-pill {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: clamp(12.5px, 2.9cqw, 14.5px);
}
a.cd-contact-pill:hover {
  background: var(--cd-surface-hi);
  border-color: var(--cd-a1-ink);
  transform: translateY(-1px);
}
.cd-contact-pill svg {
  width: 14.5px;
  height: 14.5px;
  flex: 0 0 auto;
  color: var(--cd-a1-ink);
}
.cd-contact-pill--wa svg { color: #22c55e; }
.cd-card[data-surface="light"] .cd-contact-pill--wa svg { color: #16a34a; }
.cd-contact-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Social Platform Icons (Recognizable Icons, Accessible Touch Targets) */
.cd-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cd-socials--center { justify-content: center; }
.cd-soc {
  width: clamp(36px, 6.2cqw, 42px);
  height: clamp(36px, 6.2cqw, 42px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  color: var(--cd-text);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cd-soc svg { width: 18px; height: 18px; }
.cd-soc:hover {
  transform: translateY(-2px);
  background: var(--cd-surface-hi);
  border-color: var(--cd-a1-ink);
  color: var(--cd-a1-ink);
}

/* Custom Links */
.cd-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.cd-links-grid--center { justify-content: center; }
.cd-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cd-glow-1) 14%, var(--cd-surface));
  border: 1px solid color-mix(in srgb, var(--cd-a1-ink) 30%, var(--cd-border));
  color: var(--cd-text);
  font-size: clamp(11.5px, 1.95cqw, 13.5px);
  font-weight: 600;
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease;
}
.cd-link-chip:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--cd-glow-1) 24%, var(--cd-surface-hi));
  border-color: var(--cd-a1-ink);
}
.cd-link-chip > svg:first-child { width: 14px; height: 14px; flex: 0 0 auto; color: var(--cd-a1-ink); }
.cd-link-chip > svg:last-child  { flex: 0 0 auto; opacity: 0.7; }
.cd-link-chip__lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cd-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-mobile-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  color: var(--cd-text);
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease;
}
.cd-mobile-link:hover {
  transform: translateY(-1px);
  background: var(--cd-surface-hi);
  border-color: var(--cd-a1-ink);
}
.cd-mobile-link__ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cd-btn-1), var(--cd-btn-2));
  color: #ffffff;
  flex: 0 0 auto;
}
.cd-mobile-link__ic svg { width: 16px; height: 16px; }
.cd-mobile-link__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cd-mobile-link__tx b { font-size: clamp(12.5px, 3cqw, 14.5px); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-mobile-link__tx small { font-size: clamp(11px, 2.3cqw, 12px); color: var(--cd-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-mobile-link__go { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--cd-border); display: grid; place-items: center; color: var(--cd-muted); flex: 0 0 auto; }

/* Skills */
.cd-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cd-skills--center { justify-content: center; }
.cd-skill {
  font-size: clamp(10.5px, 1.85cqw, 12px);
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cd-chip-bg);
  border: 1px solid var(--cd-border);
  color: var(--cd-text);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gallery */
.cd-gallery--strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(56px, 11cqw, 80px), 1fr));
  gap: 8px;
}
.cd-gallery--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.cd-gallery__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--cd-border);
  background: var(--cd-surface);
  cursor: pointer;
  aspect-ratio: 16 / 10;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cd-gallery--strip .cd-gallery__item { aspect-ratio: 4 / 3; }
.cd-gallery__item:hover { transform: scale(1.02); border-color: var(--cd-a1-ink); }
.cd-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox */
.cd-lightbox {
  position: relative;
  max-width: min(92vw, 880px);
  max-height: 88vh;
  border-radius: 20px;
  overflow: hidden;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.75);
}
.cd-lightbox img { display: block; max-width: 100%; max-height: 86vh; object-fit: contain; }
.cd-lightbox__close {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(9, 13, 22, 0.78) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

/* Primary CTA Button */
.cd-cta-wrap--center { text-align: center; }
.cd-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cd-btn-1), var(--cd-btn-2));
  color: #ffffff !important;
  font-weight: 700;
  font-size: clamp(12px, 2.2cqw, 14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px -5px color-mix(in srgb, var(--cd-glow-1) 48%, transparent);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.cd-cta-btn--sm { min-height: 34px; padding: 6px 12px; font-size: clamp(11px, 1.8cqw, 12.5px); }
.cd-cta-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.cd-cta-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* QR Code Module (ISO Quiet Zone + High Contrast) */
.cd-qr-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: clamp(6px, 1.3cqw, 10px);
  border-radius: 14px;
  background: #ffffff;
  color: #090d16;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.28);
  flex: 0 0 auto;
}
.cd-qr-mount {
  width: var(--cd-qr-size, clamp(68px, 14cqw, 118px));
  height: var(--cd-qr-size, clamp(68px, 14cqw, 118px));
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.cd-qr-mount canvas,
.cd-qr-mount svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  image-rendering: pixelated;
}
.cd-qr-cap {
  font-size: clamp(8.5px, 1.3cqw, 10px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  white-space: nowrap;
}

/* URL Stamps & Subtle Cardly Branding */
.cd-brand-stamp {
  font-size: clamp(9px, 1.4cqw, 11px);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cd-faint);
}
.cd-url-pill {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(10px, 1.6cqw, 11.5px);
  font-weight: 600;
  color: var(--cd-muted);
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
}
.cd-powered {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--cd-faint);
  letter-spacing: 0.01em;
  opacity: 0.82;
}
.cd-powered b { font-weight: 700; color: var(--cd-muted); }
.cd-powered svg { color: var(--cd-a1-ink); flex: 0 0 auto; }
.cd-aside-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}
.cd-foot-inline {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

/* =========================================================================
   5. Adaptive Dimension Compositions (Zero Clipping, Balanced Proportions)
   ========================================================================= */

/* 1. Classic Horizontal (16:10) & Physical Business Card (85×55 mm) */
.cd-card--classic_16_10,
.cd-card--print_85_55 {
  --cd-av-size: clamp(54px, 12.2cqw, 88px);
  --cd-name-base: 4.4cqw;
  --cd-role-base: 2.15cqw;
  --cd-qr-size: clamp(68px, 13.5cqw, 108px);
}
.cd-layout-classic {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(136px, 0.78fr);
  gap: clamp(14px, 2.8cqw, 24px);
  align-items: stretch;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.cd-layout-classic--center {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.cd-classic-main {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(9px, 1.8cqw, 15px);
  min-width: 0;
}
.cd-classic-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: clamp(12px, 2.2cqw, 18px);
  border-radius: calc(max(12px, var(--cd-radius) - 6px));
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  text-align: center;
  min-width: 0;
}
.cd-layout-classic--center .cd-classic-aside {
  width: 100%;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 560px) {
  .cd-layout-classic { grid-template-columns: 1fr; }
  .cd-classic-aside { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .cd-aside-meta { align-items: flex-start; }
}

/* 2. Square (1:1) */
.cd-card--square_1_1 {
  --cd-av-size: clamp(58px, 14.5cqw, 86px);
  --cd-name-base: 5.1cqw;
  --cd-role-base: 2.45cqw;
  --cd-qr-size: clamp(68px, 13.5cqw, 96px);
}
.cd-layout-square {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: clamp(12px, 2.2cqw, 18px);
  min-width: 0;
  min-height: 0;
}
.cd-square-top {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(9px, 1.85cqw, 15px);
  min-width: 0;
  flex: 1;
}
.cd-square-bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: clamp(11px, 2.2cqw, 16px);
  border-radius: calc(max(12px, var(--cd-radius) - 6px));
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  flex: 0 0 auto;
  min-width: 0;
}
.cd-square-bento-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}
.cd-bento-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* 3. Portrait (4:5) — Balanced Vertical Distribution (No Giant Empty Gap, No QR Clipping) */
.cd-card--portrait_4_5 {
  --cd-av-size: clamp(64px, 16.5cqw, 92px);
  --cd-name-base: 5.6cqw;
  --cd-role-base: 2.7cqw;
  --cd-qr-size: clamp(66px, 13.5cqw, 88px);
}
.cd-layout-portrait {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: clamp(12px, 2.4cqw, 20px);
  min-width: 0;
  min-height: 0;
}
.cd-portrait-body {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(10px, 2cqw, 15px);
  min-width: 0;
  flex: 1;
}
.cd-portrait-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(11px, 2.3cqw, 16px);
  border-radius: calc(max(12px, var(--cd-radius) - 6px));
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
.cd-portrait-dock-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cd-portrait-dock-info b {
  font-size: clamp(12.5px, 2.7cqw, 15px);
  font-weight: 700;
  color: var(--cd-text);
}
.cd-portrait-dock-info span {
  font-size: clamp(11px, 2.1cqw, 12.5px);
  color: var(--cd-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 4. Mobile Profile (9:16) — Natural Content Rhythm */
.cd-card--mobile_9_16 {
  --cd-av-size: clamp(68px, 18.5cqw, 96px);
  --cd-name-base: 6.4cqw;
  --cd-role-base: 3.1cqw;
  --cd-qr-size: clamp(70px, 16cqw, 92px);
  --cd-pad: clamp(18px, 5.2cqw, 28px);
}
.cd-card--mobile_9_16.cd-card--has-banner .cd-mobile-stack {
  padding-top: 24px;
}
.cd-layout-mobile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: clamp(14px, 3.2cqw, 22px);
  min-width: 0;
}
.cd-mobile-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.8cqw, 18px);
  min-width: 0;
}
.cd-mobile-qr-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: clamp(12px, 2.8cqw, 16px);
  border-radius: 16px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  flex: 0 0 auto;
  min-width: 0;
}

/* 5. Landscape Widescreen (16:9) — Balanced Two-Column Composition */
.cd-card--landscape_16_9 {
  --cd-av-size: clamp(58px, 10.5cqw, 88px);
  --cd-name-base: 3.9cqw;
  --cd-role-base: 1.9cqw;
  --cd-qr-size: clamp(76px, 12.5cqw, 124px);
  --cd-pad: clamp(18px, 3.8cqw, 34px);
}
.cd-layout-landscape {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(160px, 0.72fr);
  gap: clamp(16px, 2.8cqw, 28px);
  align-items: stretch;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.cd-landscape-main {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(10px, 1.7cqw, 16px);
  min-width: 0;
}
.cd-landscape-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(14px, 2.2cqw, 22px);
  border-radius: calc(max(12px, var(--cd-radius) - 6px));
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  text-align: center;
  min-width: 0;
}
@media (max-width: 640px) {
  .cd-layout-landscape { grid-template-columns: 1fr; }
  .cd-landscape-aside { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}

/* 6. Dual-Sided 3D Business Card (16:10 Front & Back) */
.cd-card--dual_16_10 {
  --cd-av-size: clamp(56px, 12.8cqw, 88px);
  --cd-name-base: 4.6cqw;
  --cd-role-base: 2.2cqw;
  --cd-qr-size: clamp(68px, 13.5cqw, 104px);
}
.cd-3d-scene {
  --cd-flip-deg: 0deg;
  --cd-drag-deg: 0deg;
  --cd-tilt-x: 0deg;
  --cd-tilt-y: 0deg;
  perspective: 1500px;
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.cd-3d-scene.is-flipped { --cd-flip-deg: 180deg; }
.cd-3d-scene.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.cd-3d-scene:focus-visible { outline: 3px solid var(--cd-a1, #7c5cff); outline-offset: 4px; border-radius: 22px; }
.cd-3d-rig {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--cd-tilt-x)) rotateY(calc(var(--cd-flip-deg) + var(--cd-drag-deg) + var(--cd-tilt-y)));
  /* settles like a real card: quick start, soft landing with a hint of overshoot */
  transition: transform 0.7s cubic-bezier(0.22, 1.15, 0.36, 1);
  will-change: transform;
}
.cd-3d-scene.is-tilting:not(.is-turning) .cd-3d-rig { transition: transform 0.14s linear; }
.cd-3d-scene.is-dragging .cd-3d-rig { transition: none; }
.cd-3d-scene.is-peek:not(.is-flipped) .cd-3d-rig { animation: cd-peek 1.6s cubic-bezier(0.36, 0, 0.2, 1) both; }
@keyframes cd-peek {
  0%   { transform: rotateY(0deg); }
  38%  { transform: rotateY(-32deg); }
  62%  { transform: rotateY(6deg); }
  100% { transform: rotateY(0deg); }
}
.cd-3d-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.cd-3d-face--back { transform: rotateY(180deg); }

/* Light sheen that follows the pointer while tilting or dragging */
.cd-3d-sheen {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--cd-sheen-x, 50%) var(--cd-sheen-y, 0%), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cd-3d-scene.is-tilting .cd-3d-sheen,
.cd-3d-scene.is-dragging .cd-3d-sheen,
.cd-3d-scene.is-peek .cd-3d-sheen { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cd-3d-rig { transform: none !important; transform-style: flat; transition: none !important; animation: none !important; }
  .cd-3d-face--back { transform: none; }
  .cd-3d-sheen { display: none; }
  .cd-3d-scene:not(.is-flipped) .cd-3d-face--back { opacity: 0; visibility: hidden; pointer-events: none; }
  .cd-3d-scene.is-flipped .cd-3d-face--front { opacity: 0; visibility: hidden; pointer-events: none; }
}

.cd-dual-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.cd-dual-front-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}
.cd-dual-front-body {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: 10px;
  flex: 1;
}
.cd-dual-front-body--center { align-items: center; text-align: center; }
.cd-dual-front-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--cd-border);
  flex: 0 0 auto;
}
.cd-dual-flip-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cd-glow-1) 16%, var(--cd-surface));
  border: 1px solid color-mix(in srgb, var(--cd-a1-ink) 34%, var(--cd-border));
  color: var(--cd-text);
  font-size: clamp(10px, 1.6cqw, 12px);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.14s ease;
}
.cd-dual-flip-hint:hover { background: color-mix(in srgb, var(--cd-glow-1) 26%, var(--cd-surface-hi)); transform: translateX(2px); }

.cd-dual-back {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  gap: clamp(12px, 2.8cqw, 22px);
  align-items: stretch;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.cd-dual-back-left {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: 10px;
  min-width: 0;
}
.cd-dual-back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cd-dual-back-name {
  font-family: var(--cd-display-font);
  font-weight: 800;
  font-size: clamp(15px, 3.1cqw, 21px);
  color: var(--cd-text);
  margin-top: 2px;
}
.cd-dual-back-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(10px, 2cqw, 16px);
  border-radius: calc(max(12px, var(--cd-radius) - 6px));
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
}

/* Front / Back switch under the dual card */
.cd-flip-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; }
.cd-side-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: var(--cd-prim-blur-sm);
  backdrop-filter: var(--cd-prim-blur-sm);
}
.cd-side-switch__thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #ff7ab6);
  box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.7);
  transition: transform 0.32s cubic-bezier(0.22, 1.15, 0.36, 1);
}
.cd-side-switch.is-back .cd-side-switch__thumb { transform: translateX(100%); }
.cd-side-switch__btn {
  position: relative;
  z-index: 1;
  min-width: 88px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.12s ease;
}
.cd-side-switch__btn[aria-pressed="true"] { color: #ffffff; }
.cd-side-switch__btn:active { transform: scale(0.95); }
.cd-side-switch__btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.cd-flip-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
body.is-cardly:not(.cardly-page) .cd-side-switch { background: var(--surface-2); border-color: var(--border); }
body.is-cardly:not(.cardly-page) .cd-side-switch__btn { color: var(--text-2); }
body.is-cardly:not(.cardly-page) .cd-side-switch__btn[aria-pressed="true"] { color: #ffffff; }
body.is-cardly:not(.cardly-page) .cd-flip-tip { color: var(--text-2); }
.cd-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.cd-dual-flip-hint:active { transform: scale(0.96); }

/* Dual card on narrow screens: a portrait card so both sides breathe */
@container (max-width: 600px) {
  .cd-card--dual_16_10 {
    --cd-name-base: 8cqw;
    --cd-role-base: 3.8cqw;
    --cd-av-size: clamp(64px, 21cqw, 96px);
    --cd-qr-size: clamp(88px, 27cqw, 124px);
  }
  .cd-dual-back {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .cd-dual-back-name { font-size: clamp(18px, 6cqw, 24px); }
  .cd-dual-back-right {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    column-gap: 14px;
    row-gap: 8px;
  }
  .cd-dual-back-right > .cd-qr-box { grid-row: span 2; }
  .cd-dual-back-right > .cd-url-pill { max-width: 100%; }
}

/* ---- Editor Interactive Block Positioning ---- */
.cd-card--editable [data-cd-block] {
  position: relative;
  border-radius: 8px;
  transition: box-shadow 0.15s ease;
}
.cd-card--editable [data-cd-block]:hover,
.cd-card--editable [data-cd-block].is-dragging {
  box-shadow: 0 0 0 1.5px dashed color-mix(in srgb, var(--cd-a1-ink) 75%, #fff);
  cursor: grab;
}
.cd-card--editable [data-cd-block].is-dragging { cursor: grabbing; z-index: 10; }

/* =========================================================================
   Unified Modal / Sheet System (Export + Live Preview, Smart Save, Exchange)
   ========================================================================= */
.c2-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 8, 16, 0.74);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: c2FadeIn 0.18s ease;
}
@keyframes c2FadeIn { from { opacity: 0; } to { opacity: 1; } }

.c2-modal {
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 24px;
  padding: 24px;
  background: #111827;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.65);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  box-sizing: border-box;
}

[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-modal {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 28px 70px -18px rgba(15, 23, 42, 0.25);
}

.c2-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.c2-modal__head h3 { font-size: 20px; font-weight: 800; margin: 0; color: inherit; }
.c2-modal__sub { font-size: 13px; opacity: 0.72; margin: 4px 0 0; }
.c2-modal__close {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(148, 163, 184, 0.14); color: inherit;
  border: none; cursor: pointer; display: grid; place-items: center;
  font-size: 15px; flex: 0 0 auto;
}
.c2-modal__close:hover { background: rgba(148, 163, 184, 0.26); }

.c2-modal__sec { margin-bottom: 15px; }
.c2-label {
  display: block; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.72; margin-bottom: 8px;
}

/* Live Export Preview Box inside Export Modal */
.c2-export-preview-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(9, 13, 22, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 15px;
  min-height: 170px;
}
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-export-preview-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.c2-export-preview-box canvas {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}
.c2-export-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 11.5px;
  opacity: 0.8;
  gap: 8px;
  flex-wrap: wrap;
}
.c2-qr-ok-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  font-weight: 700;
  font-size: 11px;
}
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-qr-ok-pill { color: #047857; }

.c2-custom-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.c2-custom-dims label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.c2-custom-dims input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.4);
  color: inherit;
  font-size: 13.5px;
  font-weight: 600;
}
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-custom-dims input {
  background: #ffffff;
  border-color: #cbd5e1;
}

.c2-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 460px) { .c2-dim-grid { grid-template-columns: repeat(2, 1fr); } }

.c2-dim-opt,
.c2-fmt-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.09);
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.c2-dim-opt b, .c2-fmt-opt b { font-size: 13px; font-weight: 700; }
.c2-dim-opt span, .c2-fmt-opt small { font-size: 10.5px; opacity: 0.72; }
.c2-dim-opt.is-active,
.c2-fmt-opt.is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-dim-opt.is-active,
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-fmt-opt.is-active {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.09);
}

.c2-fmt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 460px) { .c2-fmt-grid { grid-template-columns: repeat(2, 1fr); } }

.c2-seg {
  display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(148, 163, 184, 0.12);
}
.c2-seg button {
  flex: 1; padding: 8px 10px; border-radius: 9px; border: none;
  background: transparent; color: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.c2-seg button.is-active { background: #2563eb; color: #ffffff; }

.c2-modal__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.c2-btn-primary {
  width: 100%; min-height: 46px; padding: 12px 18px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #ffffff;
  font-weight: 700; font-size: 14.5px; cursor: pointer; transition: filter 0.15s ease;
}
.c2-btn-primary:hover { filter: brightness(1.08); }
.c2-btn-primary:disabled { opacity: 0.65; cursor: wait; }

.c2-btn-ghost {
  width: 100%; min-height: 44px; padding: 10px 16px; border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28); background: rgba(148, 163, 184, 0.08);
  color: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.c2-btn-ghost:hover { background: rgba(148, 163, 184, 0.16); }

.c2-share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.c2-share-chip {
  padding: 8px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.22);
  color: inherit; text-decoration: none; cursor: pointer; min-height: 36px;
  display: inline-flex; align-items: center;
}
.c2-share-chip:hover { background: rgba(148, 163, 184, 0.22); }

/* Smart Save Contact Option Cards */
.c2-save-list { display: flex; flex-direction: column; gap: 10px; }
.c2-save-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  border-radius: 16px; background: rgba(148, 163, 184, 0.09);
  border: 1.5px solid rgba(148, 163, 184, 0.2); color: inherit;
  text-align: left; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.c2-save-opt:hover { transform: translateY(-1px); border-color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.c2-save-opt--primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(124, 58, 237, 0.2));
  border-color: rgba(56, 189, 248, 0.45);
}
.c2-save-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.16); color: #38bdf8; flex: 0 0 auto;
}
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-save-ic { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.c2-save-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.c2-save-tx b { font-size: 15px; font-weight: 700; }
.c2-save-tx small { font-size: 12px; opacity: 0.74; line-height: 1.35; }
.c2-status-banner { padding: 12px 14px; border-radius: 13px; font-size: 13.5px; line-height: 1.45; margin-bottom: 14px; }
.c2-status-banner--ok { background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; }
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-status-banner--ok { color: #047857; }
.c2-status-banner--warn { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #fbbf24; }
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-status-banner--warn { color: #b45309; }
.c2-status-banner--err { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }
[data-theme="light"] body.is-cardly:not(.cardly-page) .c2-status-banner--err { color: #b91c1c; }

.c2-inline-act {
  display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid currentColor; color: inherit;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.c2-inline-act:hover { opacity: 0.88; }

@media (prefers-reduced-motion: reduce) {
  .c2-modal-backdrop, .c2-save-opt, .cd-switcher__btn, .cd-side-switch__btn, .cd-side-switch__thumb, .cd-dual-flip-hint {
    animation: none !important; transition: none !important;
  }
}
