/* Кадрикс — Design System
 * Ported from the design bundle (styles/tokens.css + inline styles in *.jsx).
 * Namespace: all class names start with `kd-` to coexist with legacy styles.css.
 */

:root {
  /* Core */
  --kd-bg-light: #F8F6F3;
  --kd-bg-dark: #0F0F10;
  --kd-text-primary: #0F0F10;
  --kd-text-primary-dark: #F8F6F3;
  --kd-text-muted: #6B6B70;
  --kd-text-muted-dark: #8E8E94;
  --kd-border: #E8E4DE;
  --kd-border-dark: #26262A;
  --kd-surface: #FFFFFF;
  --kd-surface-dark: #18181A;

  /* Accent */
  --kd-accent: #7C5CFF;
  --kd-accent-hover: #6B4EFF;
  --kd-accent-soft: #F0EBFF;
  --kd-accent-on: #FFFFFF;

  /* Pastel tags */
  --kd-tag-mint: #EEF5E8;
  --kd-tag-peach: #FFF0E8;
  --kd-tag-lilac: #F0EBFF;
  --kd-tag-sand: #F5EFE4;

  /* Semantic */
  --kd-success: #2D9D5E;
  --kd-error: #E23B3B;
  --kd-warning: #E8A534;

  /* Shadows */
  --kd-shadow-soft: 0 8px 32px rgba(15,15,16,0.06);
  --kd-shadow-lift: 0 16px 48px rgba(15,15,16,0.12);
  --kd-shadow-focus: 0 0 0 4px rgba(124,92,255,0.2);
  --kd-shadow-modal: 0 40px 100px rgba(15,15,16,0.35), 0 0 0 1px rgba(0,0,0,0.05);
  --kd-shadow-menu: 0 12px 40px rgba(15,15,16,0.12);

  /* Radii */
  --kd-r-sm: 8px;
  --kd-r-md: 12px;
  --kd-r-lg: 16px;
  --kd-r-xl: 24px;
  --kd-r-pill: 999px;

  /* Type */
  --kd-font-display: "Unbounded", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --kd-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kd-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ─── Utility ─────────────────────────────────────────────────── */
.kd-mono { font-family: var(--kd-font-mono); font-variant-numeric: tabular-nums; }
.kd-display { font-family: var(--kd-font-display); letter-spacing: -0.02em; }
.kd-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd-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; }

.kd-scroll-hide { scrollbar-width: none; }
.kd-scroll-hide::-webkit-scrollbar { display: none; }

/* ─── Surface / layout ─────────────────────────────────────────── */
.kd-page {
  background: var(--kd-bg-light);
  color: var(--kd-text-primary);
  font-family: var(--kd-font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
.kd-page main {
  flex: 1 0 auto;
}
.kd-page .kd-footer {
  margin-top: auto;
}
.kd-error-page-main {
  display: flex;
}
.kd-container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .kd-container { padding: 0 48px; } }

.kd-stack { display: flex; flex-direction: column; }
.kd-row { display: flex; align-items: center; }
.kd-gap-4 { gap: 4px; } .kd-gap-6 { gap: 6px; } .kd-gap-8 { gap: 8px; }
.kd-gap-10 { gap: 10px; } .kd-gap-12 { gap: 12px; } .kd-gap-16 { gap: 16px; }
.kd-gap-20 { gap: 20px; } .kd-gap-24 { gap: 24px; } .kd-gap-32 { gap: 32px; }

/* ─── Icons ────────────────────────────────────────────────────── */
.kd-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

/* ─── Logo ─────────────────────────────────────────────────────── */
.kd-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}
.kd-logo-mark {
  width: calc(var(--kd-logo-size, 20px) * 1.4);
  height: calc(var(--kd-logo-size, 20px) * 1.4);
  border-radius: calc(var(--kd-logo-size, 20px) * 0.35);
  background: var(--kd-accent);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(124,92,255,0.35);
  flex: 0 0 auto;
}
.kd-logo-mark::before {
  content: ''; width: 55%; height: 55%; border-radius: 4px;
  border: 2px solid #fff;
}
.kd-logo-mark::after {
  content: ''; position: absolute; top: 18%; right: 18%;
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
}
.kd-logo-text {
  font-family: var(--kd-font-display);
  font-weight: 600;
  font-size: var(--kd-logo-size, 20px);
  letter-spacing: -0.03em;
  color: inherit;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kd-logo--dark .kd-logo-text { color: var(--kd-text-primary-dark); }

/* ─── Button ───────────────────────────────────────────────────── */
.kd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 18px; height: 44px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  line-height: 1;
  font-family: var(--kd-font-body);
  border-radius: 12px; border: 1px solid transparent;
  background: var(--kd-accent); color: #fff;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-sizing: border-box;
  transition: transform .12s ease, background .15s, box-shadow .15s, opacity .15s;
}
.kd-btn:active { transform: scale(0.98); }
.kd-btn:disabled, .kd-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.kd-btn--primary { background: var(--kd-accent); color: #fff; }
.kd-btn--primary:hover:not(:disabled) { background: var(--kd-accent-hover); }
.kd-btn--secondary { background: transparent; color: var(--kd-text-primary); border-color: var(--kd-border); }
.kd-btn--secondary:hover:not(:disabled) { background: var(--kd-bg-light); }
.kd-btn--ghost { background: transparent; color: var(--kd-text-primary); }
.kd-btn--ghost:hover:not(:disabled) { background: var(--kd-bg-light); }
.kd-btn--light { background: #fff; color: var(--kd-text-primary); }
.kd-btn--destructive { background: #E04040; color: #fff; }
.kd-btn--destructive:hover:not(:disabled) { background: #C93636; }

.kd-btn--dark.kd-btn--secondary { color: #fff; border-color: rgba(255,255,255,0.18); }
.kd-btn--dark.kd-btn--secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.24);
}
.kd-btn--dark.kd-btn--ghost { color: #fff; }

.kd-btn--s { padding: 8px 14px; height: 36px; font-size: 13px; }
.kd-btn--m { padding: 11px 18px; height: 44px; font-size: 14px; }
.kd-btn--l { padding: 14px 22px; height: 52px; font-size: 15px; }
.kd-btn--xl { padding: 18px 28px; height: 60px; font-size: 17px; }

.kd-btn--pill { border-radius: 999px; }
.kd-btn--full { width: 100%; }
.kd-btn:focus-visible { outline: none; box-shadow: var(--kd-shadow-focus); }

/* ─── Badge ────────────────────────────────────────────────────── */
.kd-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap;
  background: var(--kd-tag-sand); color: #5B4A2E;
  border: 1px solid transparent;
}
.kd-badge--s { padding: 3px 8px; font-size: 11px; }
.kd-badge--l { padding: 7px 14px; font-size: 13px; }
.kd-badge--accent { background: var(--kd-accent-soft); color: #5A3FE0; }
.kd-badge--accent-solid { background: var(--kd-accent); color: #fff; }
.kd-badge--mint { background: var(--kd-tag-mint); color: #2E5E35; }
.kd-badge--peach { background: var(--kd-tag-peach); color: #A14B1E; }
.kd-badge--dark { background: rgba(255,255,255,0.12); color: #fff; }
.kd-badge--outline { background: transparent; color: var(--kd-text-primary); border-color: var(--kd-border); }
.kd-badge--success { background: rgba(45,157,94,0.1); color: var(--kd-success); }
.kd-badge--free { background: var(--kd-bg-dark); color: var(--kd-bg-light); }

/* ─── Avatar ───────────────────────────────────────────────────── */
.kd-avatar {
  width: var(--kd-avatar-size, 28px);
  height: var(--kd-avatar-size, 28px);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  flex-shrink: 0;
}
.kd-avatar--warm   { background: linear-gradient(135deg, #E9DCCB, #B39A7C); }
.kd-avatar--mauve  { background: linear-gradient(135deg, #E3D6DA, #A38997); }
.kd-avatar--sage   { background: linear-gradient(135deg, #D9E0D1, #8FA083); }
.kd-avatar--cool   { background: linear-gradient(135deg, #D5DCE2, #8FA0AE); }
.kd-avatar--dusk   { background: linear-gradient(135deg, #BEB2B8, #4E454C); }

/* ─── Input ────────────────────────────────────────────────────── */
.kd-input-field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 52px; border-radius: 14px;
  background: var(--kd-bg-light); border: 1px solid var(--kd-border);
  transition: border-color .15s, box-shadow .15s;
}
.kd-input-field:focus-within {
  border-color: var(--kd-accent);
  box-shadow: var(--kd-shadow-focus);
}
.kd-input-field input, .kd-input-field textarea {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-weight: 500; font-family: inherit; color: inherit;
}
.kd-input-field input::placeholder { color: var(--kd-text-muted); font-weight: 400; }
.kd-input-field .kd-icon { color: var(--kd-text-muted); }

/* ─── Modal shell + backdrop ──────────────────────────────────── */
.kd-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,15,16,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: kd-fade-up 0.2s ease;
}
.kd-modal-backdrop--bottom { align-items: flex-end; }
.kd-modal-shell {
  position: relative; width: 100%; max-width: 440px;
  background: #fff; color: var(--kd-text-primary);
  border-radius: 24px;
  box-shadow: var(--kd-shadow-modal);
  overflow: hidden;
  animation: kd-fade-up 0.3s ease;
}
.kd-modal-shell--dark { background: #15151A; color: var(--kd-text-primary-dark); }
.kd-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--kd-bg-light); color: var(--kd-text-primary);
  display: grid; place-items: center;
  border: none; cursor: pointer;
}
.kd-modal-shell--dark .kd-modal-close { background: rgba(255,255,255,0.06); color: #fff; }

/* ─── Auth modal (magic-link) ─────────────────────────────────── */
.kd-auth-modal { padding: 36px 32px 32px; }
.kd-auth-modal__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.kd-auth-modal__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.05;
}
.kd-auth-modal__title em { font-style: italic; font-weight: 500; }
.kd-auth-modal__subtitle {
  margin: 10px 0 24px; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.5;
}
.kd-auth-modal__field { margin-bottom: 14px; }
.kd-auth-modal__hint {
  margin-top: 18px; padding: 12px 14px;
  background: var(--kd-bg-light); border-radius: 12px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--kd-text-muted); line-height: 1.5;
}
.kd-auth-modal__hint-icon { color: var(--kd-accent); margin-top: 1px; flex-shrink: 0; }
.kd-auth-modal__hint a { color: var(--kd-accent); font-weight: 600; }

/* ─── Magic link sent ─────────────────────────────────────────── */
.kd-magic-sent { padding: 44px 32px 32px; text-align: center; }
.kd-magic-sent__avatar {
  position: relative; width: 96px; height: 96px; margin: 0 auto 20px;
}
.kd-magic-sent__avatar-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--kd-accent-soft);
  animation: kd-pulse 2.2s ease-in-out infinite;
}
.kd-magic-sent__avatar-core {
  position: absolute; inset: 12px; border-radius: 50%;
  background: var(--kd-accent);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124,92,255,0.35);
}
.kd-magic-sent__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em;
}
.kd-magic-sent__subtitle {
  margin: 8px 0 20px; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.55;
}
.kd-magic-sent__subtitle b { color: var(--kd-text-primary); }
.kd-magic-sent__steps {
  text-align: left; padding: 14px 16px;
  background: var(--kd-bg-light); border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 18px;
}
.kd-magic-sent__step { display: flex; align-items: flex-start; gap: 10px; }
.kd-magic-sent__step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--kd-accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.kd-magic-sent__step-text { font-size: 13px; line-height: 1.4; }
.kd-magic-sent__resend {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 13px; color: var(--kd-text-muted);
}
.kd-magic-sent__resend button {
  color: var(--kd-accent); font-weight: 600;
  padding: 2px 4px; background: none; border: 0; cursor: pointer;
}
.kd-magic-sent__resend-timer { font-family: var(--kd-font-mono); font-size: 12px; }
.kd-magic-sent__footer { margin-top: 10px; font-size: 12px; color: var(--kd-text-muted); }
.kd-magic-sent__footer a { color: var(--kd-accent); font-weight: 600; }

/* ─── Confirm dialog ──────────────────────────────────────────── */
.kd-confirm { padding: 36px 28px 28px; text-align: center; max-width: 400px; }
.kd-confirm__icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.kd-confirm__icon--destructive {
  background: rgba(224,64,64,0.08); color: #E04040;
}
.kd-confirm__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-confirm__body {
  margin: 8px 0 24px; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.5;
}
.kd-confirm__actions { display: flex; gap: 8px; }
.kd-confirm__actions > .kd-btn { flex: 1 1 0; min-width: 0; width: auto; }

/* ─── Share modal ─────────────────────────────────────────────── */
.kd-share { padding: 32px 28px 28px; }
.kd-share__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 24px; font-weight: 600; letter-spacing: -0.025em;
}
.kd-share__subtitle {
  margin: 6px 0 20px; font-size: 14px; color: var(--kd-text-muted);
}
.kd-share__preview {
  display: flex; gap: 6px; margin-bottom: 20px;
}
.kd-share__preview .kd-photo { flex: 1; }
.kd-share__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 18px;
}
.kd-share__button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: 14px;
  background: var(--kd-bg-light); border: 1px solid var(--kd-border);
  font-size: 12px; font-weight: 600; color: var(--kd-text-primary);
  cursor: pointer;
}
.kd-share__button:hover { background: #fff; }
.kd-share__icon-wrap {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
}
.kd-share__icon-wrap--tg { background: #0088CC; }
.kd-share__icon-wrap--wa { background: #25D366; }
.kd-share__icon-wrap--ig { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.kd-share__icon-wrap--vk { background: #0077FF; }
.kd-share__icon-wrap--copy { background: var(--kd-bg-dark); }
.kd-share__icon-wrap--dl { background: var(--kd-accent); }
.kd-share__url-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--kd-bg-light); border: 1px solid var(--kd-border);
}
.kd-share__url {
  flex: 1; font-family: var(--kd-font-mono);
  font-size: 13px; color: var(--kd-text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Toast ────────────────────────────────────────────────────── */
.kd-toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--kd-bg-dark); color: var(--kd-bg-light);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15,15,16,0.28);
  min-width: 280px; max-width: 400px;
}
.kd-toast__icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--kd-bg-dark); flex-shrink: 0;
}
.kd-toast--success .kd-toast__icon { background: #6DE77A; }
.kd-toast--info .kd-toast__icon { background: var(--kd-accent); color: #fff; }
.kd-toast--error .kd-toast__icon { background: #FF6B6B; }
.kd-toast__body { flex: 1; padding-top: 2px; }
.kd-toast__title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.kd-toast__text { font-size: 13px; color: rgba(248,246,243,0.7); line-height: 1.4; }
.kd-toast__action {
  font-size: 13px; font-weight: 600; padding: 2px 4px;
  background: none; border: 0; cursor: pointer;
}
.kd-toast--success .kd-toast__action { color: #6DE77A; }
.kd-toast--info .kd-toast__action { color: var(--kd-accent); }
.kd-toast--error .kd-toast__action { color: #FF6B6B; }
.kd-toast__close {
  color: rgba(248,246,243,0.5); padding: 2px;
  background: none; border: 0; cursor: pointer;
}

.kd-toast-stack {
  position: fixed; top: 20px; right: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.kd-toast-stack > .kd-toast { pointer-events: auto; }

/* ─── Empty state ─────────────────────────────────────────────── */
.kd-empty {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border: 1px dashed var(--kd-border);
  border-radius: 20px;
  max-width: 420px;
  margin: 0 auto;
}
.kd-empty__icon {
  width: 72px; height: 72px; border-radius: 22px;
  background: var(--kd-bg-light); color: var(--kd-text-muted);
  display: grid; place-items: center;
  margin: 0 auto 18px;
}
.kd-empty__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-empty__body {
  margin: 8px 0 20px; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.5;
}

/* ─── Error state ─────────────────────────────────────────────── */
.kd-error-state {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border: 1px solid rgba(224,64,64,0.15);
  border-radius: 20px;
  max-width: 420px;
  margin: 0 auto;
}
.kd-error-state__code {
  display: inline-block;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(224,64,64,0.08); color: #E04040;
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.kd-error-state__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-error-state__body {
  margin: 10px 0 22px; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.5;
}
.kd-error-state__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ─── Full-page error ─────────────────────────────────────────── */
.kd-error-page {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 56px 0 88px;
}
.kd-error-page .kd-container {
  width: 100%;
}
.kd-error-page__shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(124,92,255,0.12), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,246,243,0.98));
  border: 1px solid rgba(124,92,255,0.12);
  border-radius: 32px;
  box-shadow: var(--kd-shadow-soft);
}
.kd-error-page__code {
  margin-top: 18px;
  font-family: var(--kd-font-display);
  font-size: clamp(64px, 13vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--kd-accent);
}
.kd-error-page__title {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.kd-error-page__body {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--kd-text-muted);
}
.kd-error-page__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
@media (max-width: 767px) {
  .kd-error-page {
    padding: 32px 0 56px;
  }
  .kd-error-page__shell {
    padding: 36px 20px;
    border-radius: 24px;
  }
  .kd-error-page__body {
    font-size: 16px;
  }
  .kd-error-page__actions {
    flex-direction: column;
  }
  .kd-error-page__actions .kd-btn {
    width: 100%;
  }
}

/* ─── Payment status ──────────────────────────────────────────── */
.kd-payment {
  padding: 32px 28px; background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px; text-align: center;
  max-width: 400px; margin: 0 auto;
}
.kd-payment__icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.kd-payment--success .kd-payment__icon { background: rgba(45,157,94,0.08); color: var(--kd-success); }
.kd-payment--pending .kd-payment__icon { background: rgba(217,119,6,0.08); color: #D97706; }
.kd-payment--failed  .kd-payment__icon { background: rgba(224,64,64,0.08); color: #E04040; }
.kd-payment__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-payment__body {
  margin: 8px 0 0; font-size: 14px;
  color: var(--kd-text-muted); line-height: 1.5;
}

/* ─── Spinner ─────────────────────────────────────────────────── */
.kd-spinner {
  display: inline-block;
  width: var(--kd-spinner-size, 24px);
  height: var(--kd-spinner-size, 24px);
  border-radius: 50%;
  border: calc(var(--kd-spinner-size, 24px) / 10) solid rgba(124,92,255,0.15);
  border-top-color: var(--kd-accent);
  animation: kd-spin 0.8s linear infinite;
}

/* ─── Skeleton ────────────────────────────────────────────────── */
.kd-skeleton-card {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 20px; padding: 12px; width: 260px;
}
.kd-skeleton-bone {
  background: linear-gradient(90deg, #F2EFEA 0%, #E8E4DE 50%, #F2EFEA 100%);
  background-size: 200% 100%;
  animation: kd-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.kd-skeleton-img { aspect-ratio: 4/5; border-radius: 14px; margin-bottom: 14px; }
.kd-skeleton-line-lg { width: 70%; height: 14px; margin-bottom: 8px; }
.kd-skeleton-line-sm { width: 45%; height: 10px; }

/* ─── Account dropdown ────────────────────────────────────────── */
.kd-account-menu {
  width: 280px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--kd-border);
  box-shadow: var(--kd-shadow-menu);
  overflow: hidden;
}
.kd-account-menu__head { padding: 16px 16px 14px; border-bottom: 1px solid var(--kd-border); }
.kd-account-menu__user { display: flex; align-items: center; gap: 12px; }
.kd-account-menu__name { font-size: 14px; font-weight: 600; }
.kd-account-menu__email { font-size: 12px; color: var(--kd-text-muted); }
.kd-account-menu__user-col { flex: 1; min-width: 0; }
.kd-account-menu__user-col .kd-account-menu__name,
.kd-account-menu__user-col .kd-account-menu__email {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kd-account-menu__credits {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 10px;
  background: var(--kd-accent-soft);
}
.kd-account-menu__credits-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--kd-accent); font-weight: 600;
}
.kd-account-menu__credits-value {
  font-family: var(--kd-font-mono);
  font-size: 14px; font-weight: 700; color: var(--kd-accent);
}
.kd-account-menu__list { padding: 6px; }
.kd-account-menu__item {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--kd-text-primary);
  background: none; border: 0; cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.kd-account-menu__item:hover { background: var(--kd-bg-light); }
.kd-account-menu__item-label { flex: 1; text-align: left; }
.kd-account-menu__item-meta {
  font-family: var(--kd-font-mono);
  font-size: 11px; color: var(--kd-text-muted);
}
.kd-account-menu__item .kd-icon { color: var(--kd-text-muted); }
.kd-account-menu__logout-wrap { padding: 6px; border-top: 1px solid var(--kd-border); }
.kd-account-menu__logout {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: #E04040;
  background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.kd-account-menu__logout:hover { background: rgba(224,64,64,0.06); }

/* ─── Cookie banner ───────────────────────────────────────────── */
.kd-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 130;
  width: fit-content;
  max-width: calc(100vw - 16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 6px 6px 10px;
  background: var(--kd-bg-dark); color: var(--kd-bg-light);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(15,15,16,0.2);
}
.kd-cookie-banner[hidden] { display: none !important; }
.kd-cookie-banner__text {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
  max-width: none;
}
.kd-cookie-banner__text a {
  color: var(--kd-bg-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kd-cookie-banner__text a:hover { color: var(--kd-accent); }
.kd-cookie-banner__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .kd-cookie-banner {
    left: 50%;
    right: auto;
    bottom: calc(6px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: fit-content;
    max-width: calc(100vw - 16px);
    gap: 8px;
    padding: 6px 6px 6px 10px;
    border-radius: 16px;
  }
  .kd-cookie-banner__text { font-size: 10.5px; line-height: 1.2; }
  .kd-cookie-banner__actions .kd-btn {
    min-width: 48px;
    min-height: 34px;
    padding-inline: 11px;
  }
}

/* ─── Upsell banner ───────────────────────────────────────────── */
.kd-upsell-banner {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #7C5CFF 0%, #5E3FE0 100%);
  color: #fff;
  border-radius: 20px;
  max-width: 620px;
  position: relative;
  overflow: hidden;
}
.kd-upsell-banner::before {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.kd-upsell-banner__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,0.15);
  display: grid; place-items: center;
  flex-shrink: 0; position: relative;
}
.kd-upsell-banner__text { flex: 1; position: relative; }
.kd-upsell-banner__title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.kd-upsell-banner__subtitle { font-size: 13px; color: rgba(255,255,255,0.8); }

/* ─── Photo placeholder (striped SVG) ─────────────────────────── */
.kd-photo {
  position: relative; aspect-ratio: 4/5;
  width: 100%;
  border-radius: 16px; overflow: hidden;
  background: #D6C3AC;
}
.kd-photo > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.kd-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kd-photo__label {
  position: absolute; left: 10px; bottom: 10px;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.55);
  color: rgba(15,15,16,0.55);
  font: 500 10px/1 var(--kd-font-mono);
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.kd-photo--dark .kd-photo__label {
  background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.55);
}

/* ─── Header (new Kadrix header) ──────────────────────────────── */
.kd-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248,246,243,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--kd-border);
}
.kd-header__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  max-width: 1440px; margin: 0 auto;
  min-width: 0;
}
@media (min-width: 768px) { .kd-header__row { padding: 20px 48px; } }
.kd-header__nav {
  display: none; gap: 36px;
  font-size: 14px; color: var(--kd-text-primary); font-weight: 500;
}
.kd-header__nav a { color: inherit; text-decoration: none; }
.kd-header__nav a:hover { color: var(--kd-accent); }
@media (min-width: 900px) { .kd-header__nav { display: flex; } }
.kd-header__actions { display: flex; gap: 10px; align-items: center; min-width: 0; }
.kd-header__login { font-size: 14px; color: var(--kd-text-muted); font-weight: 500; text-decoration: none; }
.kd-header__login:hover { color: var(--kd-text-primary); }
.kd-header .kd-logo { min-width: 0; }
.kd-header__actions { margin-left: auto; flex-shrink: 0; }
@media (min-width: 900px) {
  .kd-header__actions {
    margin-left: 28px;
  }
}

.kd-header__avatar-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 14px; border-radius: 999px;
  background: var(--kd-bg-light); border: 0; cursor: pointer;
  font-family: inherit; color: inherit;
}
.kd-header__avatar-trigger:hover { background: #fff; }
.kd-header__avatar-name { font-size: 13px; font-weight: 600; }

.kd-header__mobile-icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--kd-border);
  background: transparent; cursor: pointer; color: inherit;
}
.kd-mobile-menu {
  position: relative;
  display: block;
}
.kd-mobile-menu > summary {
  list-style: none;
}
.kd-mobile-menu > summary::-webkit-details-marker {
  display: none;
}
.kd-mobile-menu__icon--close {
  display: none;
}
.kd-mobile-menu[open] .kd-mobile-menu__icon--menu {
  display: none;
}
.kd-mobile-menu[open] .kd-mobile-menu__icon--close {
  display: inline-block;
}
.kd-mobile-menu__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--kd-border);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--kd-shadow-menu);
  display: none;
  z-index: 35;
}
.kd-mobile-menu[open] .kd-mobile-menu__panel {
  display: grid;
  gap: 12px;
}
.kd-mobile-menu__nav,
.kd-mobile-menu__section {
  display: grid;
  gap: 8px;
}
.kd-mobile-menu__section {
  padding-top: 12px;
  border-top: 1px solid var(--kd-border);
}
.kd-mobile-menu__link,
.kd-mobile-menu__logout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--kd-text-primary);
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.kd-mobile-menu__link:hover,
.kd-mobile-menu__logout:hover {
  background: var(--kd-bg-soft);
}
.kd-mobile-menu__logout-form {
  margin: 0;
}
@media (max-width: 899px) {
  .kd-header__row {
    gap: 10px;
    padding: 14px 16px;
  }

  .kd-header__actions {
    gap: 8px;
  }

  .kd-header__actions > .kd-btn {
    height: 42px;
    padding: 0 14px;
    font-size: 12px;
    flex: 0 1 auto;
    min-width: 0;
  }

  .kd-header__actions > .kd-btn > span {
    min-width: 0;
    white-space: nowrap;
  }

  .kd-header__actions > .kd-btn .kd-icon {
    flex-shrink: 0;
  }
}
@media (max-width: 430px) {
  .kd-header__actions > .kd-btn .kd-icon:last-child {
    display: none;
  }
}
@media (min-width: 900px) { .kd-header__mobile-icon-btn { display: none; } }
@media (min-width: 900px) { .kd-mobile-menu { display: none; } }

/* ─── Account dropdown wrapper (for header) ───────────────────── */
.kd-account-wrap { position: relative; }
.kd-account-wrap > .kd-account-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
.kd-account-wrap[data-open="true"] > .kd-account-menu,
.kd-account-wrap:focus-within > .kd-account-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

/* ─── Flash messages (styled) ─────────────────────────────────── */
.kd-flash-stack {
  position: fixed; top: 20px; right: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.kd-flash-stack > * { pointer-events: auto; }
@media (max-width: 767px) {
  .kd-flash-stack {
    top: 12px;
    left: 12px;
    right: 12px;
  }
}

/* ─── Footer ──────────────────────────────────────────────────── */
.kd-footer {
  margin-top: 80px; padding: 48px 24px;
  border-top: 1px solid var(--kd-border);
  background: #fff;
}
@media (min-width: 768px) { .kd-footer { padding: 48px; } }
.kd-footer__grid {
  max-width: 1440px; margin: 0 auto;
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .kd-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.kd-footer__brand-logo {
  margin-bottom: 12px;
}
.kd-footer__brand-title {
  display: none;
  font-family: var(--kd-font-display);
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.kd-footer__brand-body {
  font-size: 14px; color: var(--kd-text-muted);
  line-height: 1.5; max-width: 400px;
}
.kd-footer__col { display: flex; flex-direction: column; gap: 10px; }
.kd-footer__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--kd-text-muted); text-transform: uppercase;
  margin-bottom: 4px;
}
.kd-footer__col a {
  color: var(--kd-text-primary); text-decoration: none;
  font-size: 14px;
}
.kd-footer__col a:hover { color: var(--kd-accent); }

/* ─── Section wrappers ────────────────────────────────────────── */
.kd-section { padding: 56px 24px; }
@media (min-width: 768px) { .kd-section { padding: 80px 48px; } }
.kd-section--tight { padding: 40px 24px; }
@media (min-width: 768px) { .kd-section--tight { padding: 56px 48px; } }

.kd-section__inner { max-width: 1440px; margin: 0 auto; }

.kd-section__head {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 720px; margin-bottom: 40px;
}
.kd-section__head--row {
  flex-direction: row; align-items: flex-end;
  justify-content: space-between; max-width: none; gap: 24px;
}
.kd-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  font-family: var(--kd-font-mono); font-size: 11px;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  align-self: flex-start;
}
.kd-section__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 40px; font-weight: 600;
  line-height: 1.05; letter-spacing: -0.03em;
}
@media (min-width: 768px) { .kd-section__title { font-size: 56px; } }
.kd-section__title em { font-style: italic; font-weight: 500; }
.kd-section__subtitle {
  font-size: 16px; color: var(--kd-text-muted);
  line-height: 1.5; max-width: 560px;
}
.kd-text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--kd-accent); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.kd-text-link:hover { color: var(--kd-accent-hover); }

/* ─── Hero ─────────────────────────────────────────────────────── */
.kd-hero {
  padding: 32px 24px 56px;
  max-width: 1440px; margin: 0 auto;
}
@media (min-width: 768px) { .kd-hero { padding: 56px 48px 96px; } }

.kd-hero__grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1024px) {
  .kd-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(400px, 580px);
    gap: clamp(40px, 6vw, 88px);
  }
}

.kd-hero__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 56px; font-weight: 600;
  line-height: 0.95; letter-spacing: -0.035em;
}
@media (min-width: 768px) { .kd-hero__title { font-size: 84px; } }
@media (min-width: 1280px) { .kd-hero__title { font-size: 96px; } }
.kd-hero__title em { font-style: italic; font-weight: 500; }

.kd-hero__lead {
  margin: 24px 0 32px;
  max-width: 520px;
  font-size: 17px; line-height: 1.5;
  color: var(--kd-text-muted);
}
@media (min-width: 768px) { .kd-hero__lead { font-size: 19px; margin: 28px 0 40px; } }

.kd-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.kd-hero__rail {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--kd-border);
}
.kd-hero__rail-item { display: flex; flex-direction: column; gap: 4px; }
.kd-hero__rail-value {
  font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-hero__rail-label { font-size: 12px; color: var(--kd-text-muted); }

/* Hero mosaic */
.kd-hero__mosaic {
  position: relative;
  width: min(100%, 560px);
  justify-self: end;
  align-self: start;
  overflow: hidden;
  isolation: isolate;
  border-radius: 32px;
  min-height: 540px;
  height: clamp(540px, 60vw, 720px);
  padding: 20px 18px;
}
@media (min-width: 1024px) {
  .kd-hero__mosaic {
    margin-top: 16px;
    transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
    transform-style: preserve-3d;
  }
}
.kd-hero__mosaic-fade {
  display: none;
}
.kd-hero__mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  height: 100%;
}
@media (min-width: 1024px) {
  .kd-hero__mosaic-grid { transform: skewY(-4deg); }
}
.kd-hero__mosaic-col {
  --kd-col-offset: 0px;
  --kd-marquee-duration: 36s;
  --kd-marquee-gap: 16px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100%;
  padding-top: var(--kd-col-offset);
  border-radius: 28px;
  background: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 5%,
    rgba(0, 0, 0, 0.32) 10%,
    #000 18%,
    #000 80%,
    rgba(0, 0, 0, 0.32) 88%,
    rgba(0, 0, 0, 0.08) 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 5%,
    rgba(0, 0, 0, 0.32) 10%,
    #000 18%,
    #000 80%,
    rgba(0, 0, 0, 0.32) 88%,
    rgba(0, 0, 0, 0.08) 94%,
    transparent 100%
  );
}
.kd-hero__mosaic-track {
  display: flex;
  flex-direction: column;
  gap: var(--kd-marquee-gap);
  animation: kd-marquee-down var(--kd-marquee-duration) linear infinite;
  will-change: transform;
}
.kd-hero__mosaic-stack {
  display: flex;
  flex-direction: column;
  gap: var(--kd-marquee-gap);
}
.kd-hero__mosaic-tile { flex-shrink: 0; }
.kd-hero__mosaic-tile .kd-photo {
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
}
.kd-hero__mosaic-tile .kd-photo__img {
  object-position: center 24%;
}
.kd-hero__mosaic-tile:nth-child(3n + 1) .kd-photo__img {
  object-position: center 28%;
}
.kd-hero__mosaic-tile:nth-child(3n + 2) .kd-photo__img {
  object-position: center 18%;
}
@media (max-width: 1023px) {
  .kd-hero__mosaic {
    justify-self: center;
    width: min(100%, 540px);
    min-height: 500px;
    height: 500px;
    padding: 16px 14px;
  }
  .kd-hero__mosaic-grid {
    max-width: 440px;
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kd-hero__mosaic-col {
    --kd-marquee-gap: 14px;
  }
  .kd-hero__mosaic-col:nth-child(2) {
    --kd-col-offset: 44px !important;
  }
  .kd-hero__mosaic-col:nth-child(3) {
    display: none;
  }
}
@media (max-width: 767px) {
  .kd-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .kd-hero__actions .kd-btn {
    width: 100%;
    justify-content: center;
  }
  .kd-hero__mosaic {
    min-height: 420px;
    height: 420px;
    padding: 14px 12px;
  }
  .kd-hero__mosaic-col {
    --kd-marquee-gap: 12px;
  }
  .kd-hero__mosaic-col:nth-child(2) {
    --kd-col-offset: 36px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kd-hero__mosaic-track {
    animation: none;
    transform: translateY(0);
  }
}

/* ─── Categories rail ─────────────────────────────────────────── */
.kd-categories {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px)  { .kd-categories { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .kd-categories { grid-template-columns: repeat(4, 1fr); } }

.kd-category-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px;
  padding: 14px;
  text-decoration: none; color: var(--kd-text-primary);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  overflow: hidden;
}
.kd-category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--kd-shadow-lift);
  border-color: transparent;
}
.kd-category-card__photo { width: 100%; }
.kd-category-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 2px;
}
.kd-category-card__name {
  font-family: var(--kd-font-display);
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-category-card__count {
  font-family: var(--kd-font-mono);
  font-size: 12px; color: var(--kd-text-muted);
}

/* ─── Style card (featured) ───────────────────────────────────── */
.kd-styles-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.kd-style-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px;
  padding: 12px;
  text-decoration: none; color: var(--kd-text-primary);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kd-style-card__link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}
.kd-style-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kd-shadow-lift);
  border-color: transparent;
}
.kd-style-card__photo { width: 100%; margin-bottom: 14px; }
.kd-style-card__body { padding: 0 4px 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kd-style-card__category {
  font-family: var(--kd-font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--kd-text-muted);
}
.kd-style-card__name {
  font-family: var(--kd-font-display);
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: anywhere;
}
.kd-style-card__tagline {
  font-size: 14px; color: var(--kd-text-muted); line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}
.kd-style-card__prices {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--kd-border);
  font-size: 13px;
  min-width: 0;
}
.kd-style-card__prices--catalog {
  justify-content: flex-start;
  gap: 8px 16px;
  align-items: center;
}
.kd-style-card__price-from {
  color: var(--kd-text-muted);
}
.kd-style-card__price-set {
  color: var(--kd-text-muted);
}
.kd-style-card__price-highlight {
  font-weight: 600; color: var(--kd-text-primary);
}

/* ─── Steps (how it works) ────────────────────────────────────── */
.kd-home-styles-cta {
  margin-top: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(123, 92, 255, 0.06), rgba(123, 92, 255, 0.02));
  border: 1px solid var(--kd-border);
  border-radius: 24px;
}
.kd-home-styles-cta__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 700px;
}
.kd-home-styles-cta__title {
  margin: 0;
  font-family: var(--kd-font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.kd-home-styles-cta__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kd-text-muted);
}
.kd-home-styles-cta__actions {
  width: 100%;
  display: flex;
}
.kd-home-styles-cta__actions .kd-btn {
  width: 100%;
}
.kd-home-styles-cta--button-only {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.kd-home-styles-cta--button-only .kd-home-styles-cta__actions {
  width: 100%;
  justify-content: center;
}
@media (min-width: 768px) {
  .kd-home-styles-cta {
    margin-top: 32px;
    padding: 28px 32px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .kd-home-styles-cta__title {
    font-size: 30px;
  }
  .kd-home-styles-cta__actions {
    width: auto;
    flex-shrink: 0;
  }
  .kd-home-styles-cta__actions .kd-btn {
    width: auto;
  }
  .kd-home-styles-cta--button-only {
    flex-direction: column;
  }
  .kd-home-styles-cta--button-only .kd-home-styles-cta__actions {
    width: auto;
  }
}

.kd-steps {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .kd-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.kd-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 24px;
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.kd-step__num {
  font-family: var(--kd-font-mono);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--kd-accent);
}
.kd-step__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-step__body {
  margin: 0; font-size: 14px; line-height: 1.5; color: var(--kd-text-muted);
}
.kd-step__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  display: grid; place-items: center;
}

/* ─── Final CTA banner ────────────────────────────────────────── */
.kd-final-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #7C5CFF 0%, #5E3FE0 100%);
  color: #fff;
  border-radius: 32px;
  padding: 48px 32px;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 768px) {
  .kd-final-cta {
    grid-template-columns: 1.2fr 1fr;
    padding: 72px 56px;
  }
}
.kd-final-cta::before,
.kd-final-cta::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.kd-final-cta::before { top: -80px; right: -60px; width: 280px; height: 280px; }
.kd-final-cta::after  { bottom: -100px; left: -80px; width: 240px; height: 240px; background: rgba(255,255,255,0.06); }

.kd-final-cta__title {
  position: relative;
  margin: 0; font-family: var(--kd-font-display);
  font-size: 32px; font-weight: 600;
  line-height: 1.1; letter-spacing: -0.025em;
}
@media (min-width: 768px) { .kd-final-cta__title { font-size: 44px; } }
.kd-final-cta__title em { font-style: italic; font-weight: 500; }
.kd-final-cta__side {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.kd-final-cta__note { font-size: 14px; color: rgba(255,255,255,0.8); }

/* ─── Page class override (new design) ───────────────────────── */
body.kd-page { background: var(--kd-bg-light); color: var(--kd-text-primary); font-family: var(--kd-font-body); }
body.kd-page::before { content: none !important; }

/* ─── Catalog page ────────────────────────────────────────────── */
.kd-catalog-hero { padding: 48px 24px 24px; max-width: 1440px; margin: 0 auto; }
@media (min-width: 768px) { .kd-catalog-hero { padding: 72px 48px 32px; } }
.kd-catalog-hero__eyebrow {
  font-family: var(--kd-font-mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--kd-text-muted); margin-bottom: 14px;
}
.kd-catalog-hero__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 56px; font-weight: 600; letter-spacing: -0.035em; line-height: 0.95;
}
@media (min-width: 768px) { .kd-catalog-hero__title { font-size: 88px; } }
.kd-catalog-hero__title em { font-style: italic; font-weight: 500; }
.kd-catalog-hero__lead {
  margin: 18px 0 28px;
  font-size: 16px; color: var(--kd-text-muted); max-width: 560px;
}
@media (min-width: 768px) { .kd-catalog-hero__lead { font-size: 18px; } }

.kd-search-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 999px; max-width: 520px;
  transition: border-color .15s, box-shadow .15s;
}
.kd-search-pill:focus-within {
  border-color: var(--kd-accent);
  box-shadow: var(--kd-shadow-focus);
}
.kd-search-pill input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; color: inherit;
}
.kd-search-pill .kd-icon { color: var(--kd-text-muted); }
.kd-search-pill__clear {
  background: none; border: 0; cursor: pointer;
  color: var(--kd-text-muted); padding: 2px;
}

.kd-catalog-layout {
  padding: 0 24px 80px;
  max-width: 1440px; margin: 0 auto;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .kd-catalog-layout {
    padding: 0 48px 96px;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
  }
}

/* Desktop sidebar */
.kd-filter-sidebar {
  display: none;
}
@media (min-width: 960px) {
  .kd-filter-sidebar {
    display: block;
    position: sticky; top: 88px; align-self: start;
  }
}
.kd-filter-group { margin-bottom: 28px; }
.kd-filter-group__label {
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted); margin-bottom: 12px;
}
.kd-filter-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; text-decoration: none;
  color: var(--kd-text-primary);
  transition: background .15s;
}
.kd-filter-row:hover { background: var(--kd-bg-light); }
.kd-filter-row--active { background: var(--kd-accent-soft); }
.kd-filter-row--active .kd-filter-row__label { color: var(--kd-accent); font-weight: 600; }
.kd-filter-row__check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--kd-border); background: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kd-filter-row--active .kd-filter-row__check {
  border-color: var(--kd-accent); background: var(--kd-accent); color: #fff;
}
.kd-filter-row__label { flex: 1; font-size: 14px; font-weight: 500; }
.kd-filter-row__count {
  font-family: var(--kd-font-mono); font-size: 11px; color: var(--kd-text-muted);
}

/* Mobile chips rail */
.kd-chip-rail {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 24px 20px;
  scrollbar-width: none;
}
.kd-chip-rail::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .kd-chip-rail { display: none; } }
.kd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--kd-border);
  color: var(--kd-text-primary);
  font-size: 13px; font-weight: 500;
  flex-shrink: 0; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.kd-chip--active {
  background: var(--kd-accent-soft);
  border-color: var(--kd-accent);
  color: var(--kd-accent); font-weight: 600;
}
.kd-chip--dark {
  background: var(--kd-bg-dark); color: #fff; border-color: transparent;
}

/* Toolbar / sort bar */
.kd-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  padding: 0 0 20px;
}
.kd-toolbar__count {
  font-family: var(--kd-font-mono); font-size: 12px; color: var(--kd-text-muted);
}
.kd-toolbar__count strong { color: var(--kd-text-primary); font-weight: 600; }

.kd-sort {
  display: flex; gap: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 999px;
}
.kd-sort__opt {
  padding: 6px 14px; border-radius: 999px;
  background: transparent; color: var(--kd-text-muted);
  font-size: 12px; font-weight: 600;
  border: 0; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.kd-sort__opt--active { background: var(--kd-bg-dark); color: #fff; }

@media (max-width: 959px) {
  .kd-chip-rail {
    flex-wrap: wrap;
    overflow: visible;
    padding: 8px 20px 16px;
    row-gap: 8px;
  }

  .kd-chip {
    max-width: 100%;
  }

  .kd-toolbar {
    align-items: stretch;
  }

  .kd-toolbar__count {
    width: 100%;
  }

  .kd-sort {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .kd-sort::-webkit-scrollbar {
    display: none;
  }

  .kd-sort__opt {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.kd-active-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.kd-active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 12px; border-radius: 999px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  font-size: 12px; font-weight: 600;
  text-decoration: none;
}

/* Catalog grid (override kd-styles-grid for 3 col) */
.kd-catalog-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kd-catalog-grid > * { min-width: 0; }
@media (min-width: 768px) { .kd-catalog-grid { gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Style card with thumbs + hover crossfade */
.kd-style-card__crossfade {
  position: relative; aspect-ratio: 4/5;
  border-radius: 14px; overflow: hidden;
  margin-bottom: 12px;
}
.kd-style-card__crossfade > .kd-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 0;
  opacity: 0; transition: opacity .45s ease;
}
.kd-style-card__crossfade > .kd-photo:first-child { opacity: 1; }
.kd-style-card:hover .kd-style-card__crossfade > .kd-photo:first-child { opacity: 0; }
.kd-style-card:hover .kd-style-card__crossfade > .kd-photo:nth-child(2) { opacity: 1; }
.kd-style-card__tag {
  position: absolute; top: 10px; left: 10px;
}
.kd-style-card__fav-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  margin: 0;
}
.kd-style-card__fav {
  width: 34px; height: 34px; border-radius: 17px;
  background: rgba(255,255,255,0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  color: var(--kd-text-primary);
  border: 0; cursor: pointer;
  transition: color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.kd-style-card__fav:hover { color: #E04040; }
.kd-style-card__fav--active {
  color: #E04040;
  box-shadow: 0 8px 18px rgba(224,64,64,0.18);
}
.kd-style-card__fav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,92,255,0.18);
}
.kd-style-card__thumbs {
  display: none;
  grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-bottom: 12px;
}
@media (min-width: 768px) { .kd-style-card__thumbs { display: grid; } }
.kd-style-card__thumbs .kd-photo { border-radius: 6px; }

.kd-load-more {
  margin-top: 40px; display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.kd-load-more__bar {
  position: relative; width: 100%; max-width: 260px; height: 4px;
  background: var(--kd-border); border-radius: 2px; overflow: hidden;
}
.kd-load-more__bar-fill {
  height: 100%; background: var(--kd-accent); border-radius: 2px;
}
.kd-load-more__count {
  font-family: var(--kd-font-mono); font-size: 11px; color: var(--kd-text-muted);
}

/* Mobile sticky bottom CTA */
.kd-mobile-cta {
  position: sticky; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(248,246,243,0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--kd-border);
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 960px) { .kd-mobile-cta { display: none; } }

/* ─── Style detail page ──────────────────────────────────────── */
.kd-style-detail { padding: 24px 24px 80px; max-width: 1400px; margin: 0 auto; }
@media (min-width: 768px) { .kd-style-detail { padding: 32px 48px 96px; } }

.kd-breadcrumb {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
  font-family: var(--kd-font-mono); font-size: 12px;
  color: var(--kd-text-muted);
}
.kd-breadcrumb__back {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--kd-border);
  background: #fff; color: var(--kd-text-primary);
  text-decoration: none; cursor: pointer;
}
.kd-breadcrumb__back .kd-icon { transform: rotate(180deg); }
.kd-breadcrumb__path { display: flex; align-items: center; gap: 6px; }
.kd-breadcrumb__path a { color: inherit; text-decoration: none; }
.kd-breadcrumb__current { color: var(--kd-text-primary); }

.kd-style-detail__grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .kd-style-detail__grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
  }
}

.kd-gallery__main {
  position: relative;
  border-radius: 20px; overflow: hidden;
  aspect-ratio: 4/5;
}
.kd-gallery__main-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.kd-gallery__main-slide--active {
  opacity: 1;
  pointer-events: auto;
}
.kd-gallery__open {
  appearance: none;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  cursor: pointer;
}
.kd-gallery__open:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(124,92,255,0.28);
}
.kd-gallery__main .kd-photo { border-radius: 0; height: 100%; }
.kd-gallery__thumbs {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 8px; margin-top: 12px;
}
.kd-gallery__thumb {
  appearance: none;
  cursor: pointer; border-radius: 10px;
  border: 2px solid transparent; padding: 2px;
  display: block;
  background: transparent;
}
.kd-gallery__thumb--active { border-color: var(--kd-accent); }
.kd-gallery__thumb:focus-visible {
  outline: none;
  border-color: var(--kd-accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.16);
}
.kd-gallery__thumb .kd-photo {
  border-radius: 8px;
}
html.kd-scroll-lock,
body.kd-scroll-lock {
  overflow: hidden;
}
.kd-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
}
.kd-gallery-lightbox[hidden] {
  display: none;
}
.kd-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,15,16,0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.kd-gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 20px 8px 16px;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  display: grid;
  gap: 16px;
}
.kd-gallery-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: rgba(20,20,24,0.34);
  border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.kd-gallery-lightbox__close:hover {
  background: rgba(20,20,24,0.48);
}
.kd-gallery-lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 56px 0 12px;
}
.kd-gallery-lightbox__title {
  font-family: var(--kd-font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.kd-gallery-lightbox__counter {
  font-family: var(--kd-font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}
.kd-gallery-lightbox__stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}
.kd-gallery-lightbox__slides {
  position: relative;
  min-height: min(72vh, 760px);
  border-radius: 24px;
  overflow: visible;
  background: transparent;
}
.kd-gallery-lightbox__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.kd-gallery-lightbox__slide--active {
  opacity: 1;
  pointer-events: auto;
}
.kd-gallery-lightbox__slide .kd-photo {
  width: auto;
  max-width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 24px;
  background: transparent;
}
.kd-gallery-lightbox__slide .kd-photo__img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}
.kd-gallery-lightbox__nav {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: rgba(20,20,24,0.34);
  border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.kd-gallery-lightbox__nav:hover {
  background: rgba(20,20,24,0.48);
}
.kd-gallery-lightbox__nav--prev .kd-icon {
  transform: rotate(180deg);
}
.kd-gallery-lightbox__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px;
}
.kd-gallery-lightbox__thumb {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 2px;
  background: transparent;
  cursor: pointer;
  opacity: 0.72;
}
.kd-gallery-lightbox__thumb--active {
  border-color: var(--kd-accent);
  opacity: 1;
}
.kd-gallery-lightbox__thumb .kd-photo {
  border-radius: 9px;
}
@media (max-width: 767px) {
  .kd-gallery-lightbox__dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
    padding: 12px 0 12px;
  }
  .kd-gallery-lightbox__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 0 52px 0 12px;
  }
  .kd-gallery-lightbox__title {
    font-size: 18px;
  }
  .kd-gallery-lightbox__stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .kd-gallery-lightbox__nav {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  .kd-gallery-lightbox__slides {
    min-height: min(58vh, 520px);
  }
  .kd-gallery-lightbox__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.kd-meta-panel__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.kd-meta-panel__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kd-style-save-form {
  margin: 0;
}
.kd-style-save {
  appearance: none;
  border: 1px solid var(--kd-border);
  background: #fff;
  color: var(--kd-text-primary);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.kd-style-save:hover {
  color: #E04040;
}
.kd-style-save--active {
  color: #E04040;
  border-color: rgba(224,64,64,0.28);
  background: rgba(224,64,64,0.06);
}
.kd-style-save:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,92,255,0.14);
}
@media (max-width: 767px) {
  .kd-meta-panel__topline {
    align-items: flex-start;
    flex-direction: column;
  }
}

.kd-meta-panel {
  display: flex; flex-direction: column; gap: 20px;
}
@media (min-width: 960px) {
  .kd-meta-panel { position: sticky; top: 90px; align-self: start; }
}
.kd-meta-panel__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 36px; font-weight: 600; letter-spacing: -0.03em; line-height: 1;
}
@media (min-width: 768px) { .kd-meta-panel__title { font-size: 48px; } }
.kd-meta-panel__title em { font-style: italic; font-weight: 500; }
.kd-meta-panel__lead {
  margin: 0;
  color: var(--kd-text-muted);
  font-size: 16px; line-height: 1.55;
}
.kd-meta-panel__lead--details {
  margin-top: 0;
  margin-bottom: 0;
}
.kd-meta-panel__details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kd-meta-panel__details > summary {
  list-style: none;
}
.kd-meta-panel__details > summary::-webkit-details-marker {
  display: none;
}
.kd-meta-panel__details-body {
  order: 1;
  position: relative;
  overflow: hidden;
  max-height: 7.2em;
}
.kd-meta-panel__details:not([open]) .kd-meta-panel__details-body::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(180deg, rgba(248,246,243,0), var(--kd-bg-light) 78%);
  pointer-events: none;
}
.kd-meta-panel__details[open] .kd-meta-panel__details-body {
  max-height: none;
}
.kd-meta-panel__details-toggle {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--kd-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.kd-meta-panel__details-toggle-text--open {
  display: none;
}
.kd-meta-panel__details[open] .kd-meta-panel__details-toggle-text--closed {
  display: none;
}
.kd-meta-panel__details[open] .kd-meta-panel__details-toggle-text--open {
  display: inline;
}
.kd-meta-panel__badges { display: flex; gap: 8px; flex-wrap: wrap; }

.kd-features-card {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 16px; padding: 20px;
}
.kd-features-card__label {
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted); margin-bottom: 14px;
}
.kd-features-list {
  display: flex; flex-direction: column; gap: 12px;
  list-style: none; padding: 0; margin: 0;
}
.kd-features-list li {
  display: flex; align-items: center; gap: 12px;
}
.kd-features-list__icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kd-features-list__t { font-size: 14px; font-weight: 600; }
.kd-features-list__s { font-size: 13px; color: var(--kd-text-muted); }

.kd-price-card {
  background: var(--kd-bg-dark); color: var(--kd-bg-light);
  border-radius: 16px; padding: 20px;
}
.kd-price-card--guest {
  padding-top: 24px;
}
.kd-price-card__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.kd-price-card__label {
  font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 4px;
}
.kd-price-card__row { display: flex; align-items: baseline; gap: 10px; }
.kd-price-card__old {
  font-family: var(--kd-font-mono); font-size: 14px;
  text-decoration: line-through; color: rgba(255,255,255,0.5);
}
.kd-price-card__big {
  font-family: var(--kd-font-display);
  font-size: 36px; font-weight: 600; letter-spacing: -0.03em;
}
.kd-price-card__note {
  text-align: center; margin-top: 10px;
  font-size: 12px; color: rgba(255,255,255,0.55);
}
.kd-price-card__note a {
  color: inherit;
}

.kd-order-form { display: flex; flex-direction: column; gap: 14px; }
.kd-order-form__pkg-grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .kd-order-form__pkg-grid { grid-template-columns: repeat(3, 1fr); } }
.kd-pkg-card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--kd-border);
  border-radius: 14px;
  background: #fff;
  color: var(--kd-text-primary);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.kd-pkg-card:hover { border-color: var(--kd-accent); }
.kd-pkg-card input[type="radio"] {
  position: absolute; opacity: 0; inset: 0; cursor: pointer;
}
.kd-pkg-card:has(input:checked) {
  border-color: var(--kd-accent);
  background: var(--kd-accent-soft);
  box-shadow: var(--kd-shadow-focus);
}
.kd-pkg-card:has(input:checked) .kd-pkg-card__name,
.kd-pkg-card:has(input:checked) .kd-pkg-card__price {
  color: var(--kd-accent);
}
.kd-pkg-card:has(input:checked) .kd-pkg-card__note {
  color: var(--kd-text-primary);
}
.kd-pkg-card__name { font-size: 13px; font-weight: 600; }
.kd-pkg-card__price {
  font-family: var(--kd-font-mono); font-size: 18px; font-weight: 700; color: var(--kd-text-primary);
}
.kd-pkg-card__note { font-size: 11px; color: var(--kd-text-muted); }

.kd-upload-zone {
    border: 2px dashed var(--kd-border);
    border-radius: 16px;
    padding: 24px; text-align: center;
    background: #fff;
  color: var(--kd-text-primary);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
  }
.kd-upload-zone:hover { border-color: var(--kd-accent); background: var(--kd-accent-soft); }
.kd-upload-zone:focus-within {
  border-color: var(--kd-accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.12);
}
.kd-upload-zone--ready {
  border-color: rgba(124,92,255,0.38);
  background: linear-gradient(180deg, rgba(124,92,255,0.08), rgba(124,92,255,0.03));
}
.kd-upload-zone--ready:hover {
  border-color: var(--kd-accent);
  background: linear-gradient(180deg, rgba(124,92,255,0.12), rgba(124,92,255,0.05));
}
.kd-upload-zone--dragging,
.kd-upload-zone--dragging:hover {
  border-color: #8A63FF;
  background:
    radial-gradient(circle at 50% 18%, rgba(124,92,255,0.22), transparent 34%),
    linear-gradient(180deg, rgba(124,92,255,0.16), rgba(124,92,255,0.07));
  box-shadow: inset 0 0 0 1px rgba(124,92,255,0.25), 0 0 0 4px rgba(124,92,255,0.14);
}
.kd-upload-zone input[type="file"] { display: none; }
.kd-upload-zone .kd-upload-zone__clear {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(124,92,255,0.35);
  border-radius: 999px;
  background: rgba(15,15,16,0.62);
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  transition: transform .15s, background .15s, border-color .15s, color .15s;
}
.kd-upload-zone .kd-upload-zone__clear:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(255,255,255,0.22);
  background: rgba(201,54,54,0.92);
}
.kd-upload-zone .kd-upload-zone__clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,92,255,0.22), 0 12px 28px rgba(0,0,0,0.28);
}
.kd-upload-zone .kd-upload-zone__clear .kd-icon {
  width: 16px;
  height: 16px;
}
.kd-upload-zone .kd-upload-zone__clear[hidden] { display: none !important; }
.kd-upload-zone__preview {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 auto 14px;
  display: block;
  border: 1px solid rgba(124,92,255,0.16);
  box-shadow: 0 12px 24px rgba(15,15,16,0.08);
}
.kd-upload-zone__preview[hidden] { display: none !important; }
.kd-upload-zone__preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
  margin: 0 auto 14px;
  max-width: 320px;
}
.kd-upload-zone__preview-grid[hidden] { display: none !important; }
.kd-upload-zone__preview-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(124,92,255,0.16);
  box-shadow: 0 10px 20px rgba(15,15,16,0.08);
  background: rgba(124,92,255,0.06);
}
.kd-upload-zone__preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kd-upload-zone__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 12px;
}
.kd-upload-zone__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--kd-accent-soft); color: var(--kd-accent);
  display: grid; place-items: center;
  margin: 0;
}
.kd-upload-zone__add {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(124,92,255,0.28);
  background: rgba(124,92,255,0.1);
  color: var(--kd-accent);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, opacity .15s;
}
.kd-upload-zone__add:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(124,92,255,0.16);
  border-color: rgba(124,92,255,0.42);
}
.kd-upload-zone__add:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,92,255,0.18);
}
.kd-upload-zone__add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.kd-upload-zone__add .kd-icon {
  width: 18px;
  height: 18px;
}
.kd-upload-zone--ready .kd-upload-zone__icon {
  background: rgba(124,92,255,0.12);
}
.kd-upload-zone__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--kd-text-primary);
}
.kd-upload-zone__title:empty {
  display: none;
}
.kd-upload-zone__title:empty + .kd-upload-zone__hint {
  margin-top: 0;
}
.kd-upload-zone__hint {
  font-size: 12px;
  color: #5f626b;
  margin-top: 4px;
  line-height: 1.45;
}
.kd-upload-zone__meta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--kd-accent);
  line-height: 1.45;
}
.kd-upload-zone--ready .kd-upload-zone__title {
  color: #111217;
}
.kd-upload-zone--ready .kd-upload-zone__hint {
  color: #50535c;
}
.kd-upload-zone--ready .kd-upload-zone__meta {
  color: #7c5cff;
}

@media (max-width: 767px) {
  .kd-price-card__head {
    align-items: flex-start;
    gap: 12px;
  }
}

.kd-tips-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .kd-tips-grid { grid-template-columns: 1fr 1fr; } }
.kd-tip-card {
  background: #fff; border-radius: 16px; padding: 20px;
  border: 1px solid var(--kd-border);
}
.kd-tip-card--good { border-color: rgba(45,157,94,0.25); }
.kd-tip-card--bad  { border-color: rgba(226,59,59,0.2); }
.kd-tip-card__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-weight: 600; font-size: 17px;
}
.kd-tip-card__icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
}
.kd-tip-card--good .kd-tip-card__icon { background: rgba(45,157,94,0.1); color: var(--kd-success); }
.kd-tip-card--bad .kd-tip-card__icon  { background: rgba(226,59,59,0.1); color: var(--kd-error); }
.kd-tip-card__photos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.kd-tip-card__photos .kd-photo { border-radius: 8px; }
.kd-tip-photo .kd-photo__img {
  transition: transform .2s ease, filter .2s ease, object-position .2s ease;
}
.kd-tip-photo--profile .kd-photo__img {
  object-position: 24% center;
  transform: scale(1.55);
  filter: saturate(0.78);
}
.kd-tip-photo--dark .kd-photo__img {
  filter: brightness(0.42) contrast(1.08) saturate(0.82);
}
.kd-tip-photo--blur .kd-photo__img {
  transform: scale(1.08);
  filter: blur(4px) brightness(0.96);
}
.kd-tip-card__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px;
}

.kd-similar-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) { .kd-similar-grid { grid-template-columns: repeat(4, 1fr); } }

/* Empty state variant for catalog */
.kd-catalog-empty {
  text-align: center; padding: 80px 20px;
}
.kd-catalog-empty__title {
  font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.kd-catalog-empty__body { font-size: 14px; color: var(--kd-text-muted); }

/* ─── Dashboard ──────────────────────────────────────────────── */
.kd-dashboard {
  padding: 40px 24px 80px;
  max-width: 1440px; margin: 0 auto;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .kd-dashboard {
    padding: 48px 48px 80px;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
  }
}

.kd-dash-side {
  display: flex; flex-direction: column; gap: 4px;
}
@media (min-width: 900px) {
  .kd-dash-side {
    position: sticky; top: 88px; align-self: start;
    padding-right: 12px;
    border-right: 1px solid var(--kd-border);
  }
}
.kd-dash-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--kd-text-primary);
  text-decoration: none;
  transition: background .15s;
}
.kd-dash-nav-item:hover { background: var(--kd-bg-light); }
.kd-dash-nav-item--active {
  background: var(--kd-accent-soft); color: var(--kd-accent); font-weight: 600;
}
.kd-dash-nav-item .kd-icon { color: var(--kd-text-muted); }
.kd-dash-nav-item--active .kd-icon { color: var(--kd-accent); }
.kd-dash-nav-item__count {
  margin-left: auto;
  font-family: var(--kd-font-mono);
  font-size: 11px; color: var(--kd-text-muted);
}

.kd-dash-content { min-width: 0; }

.kd-dash-hero {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.kd-dash-hero__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 36px; font-weight: 600; letter-spacing: -0.025em; line-height: 1;
}
@media (min-width: 768px) { .kd-dash-hero__title { font-size: 48px; } }
.kd-dash-hero__title em { font-style: italic; font-weight: 500; }
.kd-dash-hero__sub { margin: 6px 0 0; font-size: 14px; color: var(--kd-text-muted); }

.kd-stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 32px;
}
.kd-stat-card {
  padding: 18px 20px;
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 16px;
}
.kd-stat-card__label {
  font-family: var(--kd-font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted); margin-bottom: 6px;
}
.kd-stat-card__value {
  font-family: var(--kd-font-display);
  font-size: 32px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1;
}
.kd-stat-card--accent { background: var(--kd-accent-soft); border-color: transparent; }
.kd-stat-card--accent .kd-stat-card__value { color: var(--kd-accent); }

/* ─── Status pill ────────────────────────────────────────────── */
.kd-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.kd-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.kd-status--draft          { background: var(--kd-bg-light); color: var(--kd-text-muted); }
.kd-status--pending_payment{ background: rgba(232,165,52,0.12); color: #A06B10; }
.kd-status--paid           { background: var(--kd-accent-soft); color: var(--kd-accent); }
.kd-status--queued         { background: var(--kd-accent-soft); color: var(--kd-accent); }
.kd-status--processing     {
  background: var(--kd-accent-soft); color: var(--kd-accent);
}
.kd-status--processing::before { animation: kd-pulse-dot 1.2s infinite; }
.kd-status--partial_ready  { background: rgba(232,165,52,0.12); color: #A06B10; }
.kd-status--completed      { background: rgba(45,157,94,0.12); color: var(--kd-success); }
.kd-status--failed         { background: rgba(224,64,64,0.10); color: #C93636; }
.kd-status--refunded,
.kd-status--canceled       { background: var(--kd-bg-light); color: var(--kd-text-muted); }

/* ─── Order card (list) ──────────────────────────────────────── */
.kd-order-card {
  display: grid; gap: 16px;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  padding: 14px;
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 16px;
  text-decoration: none; color: var(--kd-text-primary);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kd-order-card:hover {
  border-color: var(--kd-accent);
  box-shadow: var(--kd-shadow-soft);
  transform: translateY(-1px);
}
.kd-order-card__photo { width: 72px; }
.kd-order-card__photo .kd-photo { border-radius: 10px; }
.kd-order-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kd-order-card__name {
  font-family: var(--kd-font-display);
  font-size: 17px; font-weight: 600; letter-spacing: -0.015em;
  margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kd-order-card__meta {
  font-size: 13px; color: var(--kd-text-muted);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.kd-order-card__meta-item::after { content: '·'; margin-left: 8px; }
.kd-order-card__meta-item:last-child::after { content: ''; }
.kd-order-card__meta .kd-status { font-size: 10px; padding: 3px 8px; }
.kd-order-card__right {
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end;
}
.kd-order-card__price {
  font-family: var(--kd-font-mono);
  font-size: 14px; font-weight: 600;
}

.kd-order-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* ─── Waiting screen ─────────────────────────────────────────── */
.kd-waiting {
  padding: 40px 24px 80px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.kd-waiting__badge-row { margin-bottom: 28px; }
.kd-waiting__progress {
  position: relative; width: 220px; height: 220px; margin-bottom: 24px;
}
.kd-waiting__silhouette {
  position: absolute; inset: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--kd-accent-soft), #E4DCFB);
  overflow: hidden;
}
.kd-waiting__shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(124,92,255,0.15) 0%,
    rgba(124,92,255,0.4) 50%,
    rgba(124,92,255,0.15) 100%);
  background-size: 400px 100%;
  animation: kd-shimmer 1.8s linear infinite;
}
.kd-waiting__icon {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--kd-accent);
}
.kd-waiting__ring {
  position: absolute; inset: 0; transform: rotate(-90deg);
}
.kd-waiting__ring-bg { fill: none; stroke: var(--kd-border); stroke-width: 4; }
.kd-waiting__ring-fill {
  fill: none; stroke: var(--kd-accent); stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 320;
  animation: kd-ring-progress 8s ease-in-out infinite;
}
@keyframes kd-ring-progress {
  0%   { stroke-dashoffset: 500; }
  50%  { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 500; }
}
.kd-waiting__percent {
  position: absolute; bottom: -12px; right: -6px;
  background: var(--kd-bg-dark); color: #fff;
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--kd-font-mono);
  font-size: 14px; font-weight: 600;
}
.kd-waiting__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 26px; font-weight: 500; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .kd-waiting__title { font-size: 36px; } }
.kd-waiting__eta {
  margin-top: 12px; font-family: var(--kd-font-mono);
  font-size: 13px; color: var(--kd-text-muted);
}
.kd-waiting__steps {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center;
}
.kd-waiting__step {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--kd-text-muted);
}
.kd-waiting__step--done   { color: var(--kd-text-muted); }
.kd-waiting__step--done   .kd-waiting__step-dot { color: var(--kd-success); }
.kd-waiting__step--active { color: var(--kd-text-primary); font-weight: 600; }
.kd-waiting__step--active .kd-waiting__step-dot {
  width: 10px; height: 10px; border-radius: 5px;
  background: var(--kd-accent); animation: kd-pulse-dot 1.2s infinite;
}
.kd-waiting__step-dot {
  width: 10px; height: 10px; border-radius: 5px;
  border: 1.5px solid var(--kd-border);
  display: inline-block;
}

/* ─── Result FREE (dark hero + blurred grid + offer) ─────────── */
.kd-result-dark {
  background: var(--kd-bg-dark); color: #fff;
  padding: 40px 24px 56px;
  margin: -40px -24px 40px;
}
@media (min-width: 768px) { .kd-result-dark { padding: 48px 48px 72px; margin: -48px -48px 48px; } }
.kd-result-dark__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; max-width: 1180px; margin-left: auto; margin-right: auto;
}
.kd-result-dark__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 44px; font-weight: 600;
  line-height: 0.95; letter-spacing: -0.035em;
}
@media (min-width: 768px) { .kd-result-dark__title { font-size: 72px; } }
.kd-result-dark__title em { font-style: italic; font-weight: 500; color: var(--kd-accent); }
.kd-result-dark__lead {
  margin: 16px 0 32px;
  color: rgba(255,255,255,0.65);
  font-size: 16px; max-width: 520px;
}
.kd-result-dark__inner { max-width: 1180px; margin: 0 auto; }
.kd-result-dark__grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .kd-result-dark__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.kd-result-dark__photo {
  position: relative; border-radius: 16px; overflow: hidden;
}
.kd-result-dark__photo .kd-photo { border-radius: 0; }
.kd-result-dark__photo-num {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.95); color: var(--kd-bg-dark);
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--kd-font-mono);
  font-size: 11px; font-weight: 700;
}
.kd-result-dark__photo-actions {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  display: flex; gap: 8px;
}
.kd-result-dark__photo-dl {
  flex: 1; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.95); color: var(--kd-bg-dark);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.kd-result-dark__photo-like {
  width: 40px; border-radius: 10px;
  background: rgba(0,0,0,0.5); color: #fff;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.kd-result-dark__photo-like.is-copied {
  background: var(--kd-accent);
  color: #fff;
}

/* Blurred "what you miss" grid */
.kd-blur-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 32px;
}
@media (min-width: 768px) { .kd-blur-grid { grid-template-columns: repeat(6, 1fr); } }
.kd-blur-item { position: relative; }
.kd-blur-item .kd-photo {
  filter: blur(10px) brightness(0.95);
  border-radius: 10px;
  pointer-events: none;
}
.kd-blur-item__lock {
  position: absolute; inset: 0; border-radius: 10px;
  background: rgba(15,15,16,0.25);
  display: grid; place-items: center;
}
.kd-blur-item__lock-inner {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--kd-bg-dark);
  display: grid; place-items: center;
}

/* Offer card */
.kd-offer-card {
  background: #fff;
  color: var(--kd-text-primary);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--kd-shadow-lift);
  border: 1px solid var(--kd-border);
  position: relative; overflow: hidden;
}
@media (min-width: 768px) { .kd-offer-card { padding: 40px; } }
.kd-offer-card::before {
  content: ''; position: absolute;
  top: -80px; right: -80px; width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.18), transparent 70%);
  pointer-events: none;
}
.kd-offer-card__grid {
  position: relative;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 768px) { .kd-offer-card__grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.kd-offer-card__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.05;
  color: var(--kd-text-primary);
}
@media (min-width: 768px) { .kd-offer-card__title { font-size: 40px; } }
.kd-offer-card__lead {
  margin: 12px 0 20px;
  color: var(--kd-text-muted); font-size: 15px; line-height: 1.5;
}
.kd-countdown-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--kd-bg-dark); color: #fff;
  margin-bottom: 20px;
}
.kd-countdown-chip__label { font-size: 12px; color: rgba(255,255,255,0.6); }
.kd-countdown-chip__value { font-family: var(--kd-font-mono); font-size: 14px; font-weight: 600; }

.kd-offer-card__price-row {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.kd-offer-card__old {
  font-family: var(--kd-font-mono);
  font-size: 18px; text-decoration: line-through; color: var(--kd-text-muted);
}
.kd-offer-card__big {
  font-family: var(--kd-font-display);
  font-size: 56px; font-weight: 600; letter-spacing: -0.03em; line-height: 1;
  color: var(--kd-text-primary);
}
@media (max-width: 480px) { .kd-offer-card__big { font-size: 44px; } }
.kd-offer-card__big-unit { font-size: 0.5em; color: var(--kd-text-muted); font-weight: 500; margin-left: 4px; }
.kd-offer-card__trust {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  color: var(--kd-text-muted); font-size: 12px;
}
.kd-offer-card__trust-item {
  display: flex; align-items: center; gap: 4px;
}
.kd-offer-card__preview {
  position: relative; height: 280px;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 768px) { .kd-offer-card__preview { height: 380px; } }
.kd-offer-card__stack {
  position: absolute; top: 50%; left: 50%;
  width: 180px;
  transform: translate(-50%, -50%);
  border-radius: 16px; overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 20px 60px rgba(15,15,16,0.15);
}
@media (min-width: 768px) { .kd-offer-card__stack { width: 240px; } }
.kd-offer-card__stack--a { transform: translate(-50%, -50%) translate(-40px, 0) rotate(-8deg); z-index: 0; }
.kd-offer-card__stack--b { transform: translate(-50%, -50%) translate(0, 20px) rotate(4deg);  z-index: 1; }
.kd-offer-card__stack--c { transform: translate(-50%, -50%) translate(40px, -10px) rotate(-2deg); z-index: 2; }
.kd-offer-card__stack .kd-photo { border-radius: 12px; }
.kd-offer-card__badge {
  position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%);
  background: #fff; border: 1px solid var(--kd-border);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* Secondary actions under offer */
.kd-offer-card__secondary {
  margin-top: 24px;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  color: var(--kd-text-muted); font-size: 14px;
}
.kd-offer-card__secondary a {
  color: inherit; font-weight: 500; text-decoration: none;
}
.kd-offer-card__secondary a:hover { color: var(--kd-text-primary); }
.kd-result-dark .kd-offer-card,
.kd-result-paid--single-result .kd-offer-card {
  color: var(--kd-text-primary);
}
.kd-result-dark .kd-offer-card__title,
.kd-result-paid--single-result .kd-offer-card__title,
.kd-result-dark .kd-offer-card__big,
.kd-result-paid--single-result .kd-offer-card__big {
  color: var(--kd-text-primary);
}
.kd-result-dark .kd-offer-card__lead,
.kd-result-paid--single-result .kd-offer-card__lead,
.kd-result-dark .kd-offer-card__old,
.kd-result-paid--single-result .kd-offer-card__old,
.kd-result-dark .kd-offer-card__trust,
.kd-result-paid--single-result .kd-offer-card__trust,
.kd-result-dark .kd-offer-card__secondary,
.kd-result-paid--single-result .kd-offer-card__secondary {
  color: var(--kd-text-muted);
}
.kd-inline-share {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
}
.kd-inline-share:hover { color: var(--kd-text-primary); }
.kd-inline-share.is-copied { color: var(--kd-accent); }

/* ─── Result PAID (dark viewer) ──────────────────────────────── */
.kd-result-paid {
  background: var(--kd-bg-dark); color: #fff;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 32px;
}
@media (min-width: 768px) { .kd-result-paid { padding: 40px; } }
.kd-result-paid__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.kd-result-paid__head-actions { display: flex; gap: 8px; }
.kd-result-paid__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 36px; font-weight: 600; line-height: 0.95; letter-spacing: -0.035em;
  text-align: center;
}
@media (min-width: 768px) { .kd-result-paid__title { font-size: 60px; } }
.kd-result-paid__title em { font-style: italic; color: var(--kd-accent); font-weight: 500; }
.kd-result-paid__lead {
  margin: 14px auto 0;
  max-width: 580px;
  color: rgba(255,255,255,0.68);
  font-size: 16px;
  line-height: 1.55;
}
.kd-result-paid__lead--center {
  text-align: center;
}

.kd-paid-viewer {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  margin-top: 32px;
}
@media (min-width: 768px) { .kd-paid-viewer { grid-template-columns: 1.1fr 1fr; gap: 32px; } }
.kd-paid-viewer__main {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 4/5;
}
.kd-paid-viewer__main .kd-photo { height: 100%; border-radius: 0; }
.kd-paid-viewer__num {
  position: absolute; top: 16px; left: 16px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--kd-font-mono);
  font-size: 12px; font-weight: 600;
}
.kd-paid-viewer__actions {
  position: absolute; bottom: 16px; right: 16px;
  display: flex; gap: 8px;
}
.kd-paid-viewer__btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(0,0,0,0.5); color: #fff;
  display: grid; place-items: center;
  border: 0; cursor: pointer; text-decoration: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.kd-paid-viewer__btn:hover { background: rgba(0,0,0,0.7); }
.kd-paid-viewer__btn.is-copied {
  background: var(--kd-accent);
  color: #fff;
}

.kd-paid-viewer__side-label {
  font-family: var(--kd-font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55); margin-bottom: 12px;
}
.kd-paid-viewer__thumbs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.kd-paid-viewer__thumb {
  padding: 2px; border-radius: 10px;
  border: 2px solid transparent;
  opacity: 0.65; transition: opacity .15s, border-color .15s;
  cursor: pointer;
  background: none;
}
.kd-paid-viewer__thumb:hover { opacity: 1; }
.kd-paid-viewer__thumb--active {
  border-color: var(--kd-accent); opacity: 1;
}
.kd-paid-viewer__thumb .kd-photo { border-radius: 6px; }
.kd-paid-viewer__empty {
    padding: 2px; border-radius: 10px; aspect-ratio: 1/1;
    background: rgba(255,255,255,0.05);
    display: grid; place-items: center;
    color: rgba(255,255,255,0.4);
    font-family: var(--kd-font-mono); font-size: 11px;
  }
.kd-paid-viewer--single {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.kd-result-paid--single-result .kd-offer-card--single-upgrade {
  margin-top: 32px;
}

.kd-single-upsell {
  margin: 28px auto 0;
  max-width: 860px;
  background: linear-gradient(135deg, rgba(124,92,255,0.24), rgba(124,92,255,0.08));
  border: 1px solid rgba(124,92,255,0.28);
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 18px;
}
@media (min-width: 768px) {
  .kd-single-upsell {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 28px 32px;
    gap: 24px;
  }
}
.kd-single-upsell__title {
  margin: 12px 0 10px;
  font-family: var(--kd-font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.kd-single-upsell__lead {
  margin: 0;
  color: rgba(255,255,255,0.74);
  font-size: 15px;
  line-height: 1.55;
  max-width: 560px;
}
.kd-single-upsell__meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--kd-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.56);
}
.kd-single-upsell__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 240px;
}
.kd-single-upsell__link {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.kd-single-upsell__link:hover {
  color: #fff;
}
  
  .kd-share-bonus {
    background: linear-gradient(135deg, rgba(124,92,255,0.2), rgba(124,92,255,0.05));
    border: 1px solid rgba(124,92,255,0.3);
  border-radius: 20px; padding: 24px;
  display: grid; gap: 16px;
  grid-template-columns: 1fr; align-items: center;
  margin-top: 32px;
}
@media (min-width: 768px) { .kd-share-bonus { grid-template-columns: 1fr auto; padding: 32px; gap: 24px; } }
.kd-share-bonus__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .kd-share-bonus__title { font-size: 28px; } }
.kd-share-bonus__lead {
  margin: 8px 0 0; color: rgba(255,255,255,0.65);
  font-size: 14px; max-width: 460px;
}

/* ─── Payment (inline on order detail if PENDING_PAYMENT) ───── */
.kd-payment-screen {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .kd-payment-screen { grid-template-columns: 1.1fr 1fr; gap: 40px; } }

.kd-payment-screen__title {
  margin: 0 0 20px; font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.025em;
}
@media (min-width: 768px) { .kd-payment-screen__title { font-size: 36px; } }

.kd-order-summary {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 16px; padding: 20px;
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 20px;
}
.kd-order-summary__photo { width: 80px; flex-shrink: 0; }
.kd-order-summary__body { flex: 1; min-width: 0; }
.kd-order-summary__label { font-size: 12px; color: var(--kd-text-muted); }
.kd-order-summary__title {
  font-weight: 600; font-size: 17px; margin: 2px 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kd-order-summary__meta { font-size: 13px; color: var(--kd-text-muted); }

.kd-price-breakdown {
  padding: 20px; background: #fff;
  border: 1px solid var(--kd-border); border-radius: 16px;
}
.kd-price-breakdown__row {
  display: flex; justify-content: space-between;
  font-size: 14px; margin-bottom: 10px;
}
.kd-price-breakdown__row--discount { color: var(--kd-success); }
.kd-price-breakdown__row-value {
  font-family: var(--kd-font-mono); font-weight: 600;
}
.kd-price-breakdown__total {
  border-top: 1px solid var(--kd-border);
  margin-top: 4px; padding-top: 14px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.kd-price-breakdown__total-label { font-size: 15px; font-weight: 600; }
.kd-price-breakdown__total-value {
  font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
}

.kd-payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.kd-payment-method {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: #fff;
  border: 2px solid var(--kd-border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s;
  position: relative;
}
.kd-payment-method input[type="radio"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.kd-payment-method__dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--kd-border);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kd-payment-method__dot::after {
  content: ''; width: 10px; height: 10px;
  border-radius: 50%; background: var(--kd-accent);
  opacity: 0; transition: opacity .15s;
}
.kd-payment-method:has(input:checked) {
  border-color: var(--kd-accent);
}
.kd-payment-method:has(input:checked) .kd-payment-method__dot {
  border-color: var(--kd-accent);
}
.kd-payment-method:has(input:checked) .kd-payment-method__dot::after {
  opacity: 1;
}
.kd-payment-method__body { flex: 1; }
.kd-payment-method__name {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; margin-bottom: 2px;
}
.kd-payment-method__hint { font-size: 13px; color: var(--kd-text-muted); }

.kd-payment-notice {
  margin-top: 16px;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px;
  background: var(--kd-tag-sand);
  border-radius: 12px;
  font-size: 12px; color: var(--kd-text-muted); line-height: 1.5;
}
.kd-payment-notice .kd-icon { flex-shrink: 0; margin-top: 2px; color: var(--kd-text-muted); }

/* ─── Results gallery ────────────────────────────────────────── */
.kd-results-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
.kd-results-entry {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px;
  padding: 20px;
}
.kd-results-entry__head {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 16px;
  gap: 16px; flex-wrap: wrap;
}
.kd-results-entry__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-results-entry__meta { font-size: 13px; color: var(--kd-text-muted); }
.kd-results-entry__grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .kd-results-entry__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .kd-results-entry__grid { grid-template-columns: repeat(6, 1fr); } }
.kd-results-entry__photo {
  border-radius: 10px; overflow: hidden; aspect-ratio: 4/5;
  background: var(--kd-bg-light);
}
.kd-results-entry__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Pricing ────────────────────────────────────────────────── */
.kd-pricing-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .kd-pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.kd-pricing-card {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 24px; padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.kd-pricing-card--accent {
  background: var(--kd-accent-soft); border-color: transparent;
}
.kd-pricing-card--featured {
  background: var(--kd-bg-dark); color: #fff; border-color: transparent;
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(15,15,16,0.25);
}
@media (max-width: 900px) { .kd-pricing-card--featured { transform: none; } }
.kd-pricing-card__ribbon {
  position: absolute; top: 16px; right: 16px;
}
.kd-pricing-card__label {
  font-family: var(--kd-font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted);
}
.kd-pricing-card--featured .kd-pricing-card__label { color: rgba(255,255,255,0.55); }
.kd-pricing-card__name {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.025em;
}
.kd-pricing-card__price-row {
  display: flex; align-items: baseline; gap: 10px;
}
.kd-pricing-card__price {
  font-family: var(--kd-font-display);
  font-size: 52px; font-weight: 600; letter-spacing: -0.03em; line-height: 1;
}
.kd-pricing-card__price-unit {
  font-size: 0.45em; color: var(--kd-text-muted); font-weight: 500;
}
.kd-pricing-card--featured .kd-pricing-card__price-unit { color: rgba(255,255,255,0.55); }
.kd-pricing-card__copy {
  font-size: 14px; line-height: 1.55; color: var(--kd-text-muted);
  margin: 0;
}
.kd-pricing-card--featured .kd-pricing-card__copy { color: rgba(255,255,255,0.7); }
.kd-pricing-card__features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.kd-pricing-card__feature {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; line-height: 1.45;
}
.kd-pricing-card__feature-check {
  flex-shrink: 0; margin-top: 2px;
  color: var(--kd-accent);
}
.kd-pricing-card--featured .kd-pricing-card__feature-check { color: #B8A6FF; }
.kd-pricing-card__cta-row { margin-top: auto; padding-top: 8px; }

.kd-pricing-matrix {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px;
  overflow: hidden;
}
.kd-pricing-matrix__row {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
  padding: 16px 20px;
  border-bottom: 1px solid var(--kd-border);
}
@media (min-width: 768px) {
  .kd-pricing-matrix__row { grid-template-columns: 1.3fr 1fr 1fr 1fr; align-items: center; }
}
.kd-pricing-matrix__row:last-child { border-bottom: none; }
.kd-pricing-matrix__row--head {
  background: var(--kd-bg-light);
  font-family: var(--kd-font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--kd-text-muted);
}
.kd-pricing-matrix__label { font-size: 14px; font-weight: 500; color: var(--kd-text-muted); }
.kd-pricing-matrix__value { font-size: 14px; font-weight: 500; }
.kd-pricing-matrix__value--accent { color: var(--kd-accent); font-weight: 600; }

/* ─── FAQ accordion (uses <details>) ─────────────────────────── */
.kd-faq-list {
  display: flex; flex-direction: column; gap: 10px;
}
.kd-faq-item {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 16px;
  padding: 18px 22px;
  transition: border-color .15s, box-shadow .15s;
}
.kd-faq-item[open] {
  border-color: var(--kd-accent);
  box-shadow: var(--kd-shadow-soft);
}
.kd-faq-item > summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-size: 17px; font-weight: 600; color: var(--kd-text-primary);
}
.kd-faq-item > summary::-webkit-details-marker { display: none; }
.kd-faq-item > summary::marker { content: none; }
.kd-faq-item[open] > summary { color: var(--kd-accent); }
.kd-faq-item__arrow {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--kd-bg-light); color: var(--kd-text-muted);
  display: grid; place-items: center;
  transition: transform .15s, background .15s, color .15s;
}
.kd-faq-item[open] .kd-faq-item__arrow {
  transform: rotate(90deg);
  background: var(--kd-accent-soft);
  color: var(--kd-accent);
}
.kd-faq-item__body {
  margin: 14px 0 0;
  color: var(--kd-text-muted);
  font-size: 15px; line-height: 1.6;
}

/* ─── Form grid (admin edit forms) ───────────────────────────── */
.kd-form-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .kd-form-grid { grid-template-columns: 1fr 1fr; } }
.kd-form-field {
  display: flex; flex-direction: column; gap: 6px;
}
.kd-form-field--wide { grid-column: 1 / -1; }
.kd-form-field__label {
  font-family: var(--kd-font-mono); font-size: 11px;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted);
}
.kd-form-input, .kd-form-textarea, .kd-form-select {
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--kd-border);
  background: #fff; font-size: 14px;
  font-family: inherit; color: inherit;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.kd-form-input:focus, .kd-form-textarea:focus, .kd-form-select:focus {
  outline: none;
  border-color: var(--kd-accent);
  box-shadow: var(--kd-shadow-focus);
}
.kd-form-textarea {
  resize: vertical; min-height: 80px; line-height: 1.5;
}
.kd-form-color-row {
  display: flex; align-items: center; gap: 8px;
}
.kd-form-color-swatch {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--kd-border);
  flex-shrink: 0;
}

/* ─── Admin-specific tweaks ──────────────────────────────────── */
.kd-admin-back-icon { transform: rotate(180deg); }

.kd-filter-chip-rail {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}

.kd-admin-table {
  display: flex; flex-direction: column; gap: 8px;
}
.kd-admin-row {
  display: grid; gap: 16px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 14px 18px;
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 14px;
  text-decoration: none; color: var(--kd-text-primary);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kd-admin-row:hover {
  border-color: var(--kd-accent);
  transform: translateY(-1px);
  box-shadow: var(--kd-shadow-soft);
}
.kd-admin-row__title {
  font-weight: 600; font-size: 15px;
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.kd-admin-row__meta {
  margin: 2px 0 0; font-size: 13px; color: var(--kd-text-muted);
}
.kd-admin-row__mono {
  font-family: var(--kd-font-mono);
  font-size: 11px; color: var(--kd-text-muted);
}

.kd-admin-id {
  font-family: var(--kd-font-mono);
  font-size: 12px; color: var(--kd-text-muted);
  padding: 2px 8px; border-radius: 6px;
  background: var(--kd-bg-light);
}

/* ─── Auth page ──────────────────────────────────────────────── */
.kd-auth-page {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 20px 80px;
  min-height: calc(100vh - 200px);
}
.kd-auth-page__modal {
  width: 100%; max-width: 440px;
}
.kd-auth-page__toggle {
  margin-top: 24px; color: var(--kd-text-muted); font-size: 14px;
  text-align: center;
}
.kd-auth-page__toggle a {
  color: var(--kd-accent); font-weight: 600; text-decoration: none;
}
.kd-auth-page__toggle a:hover { color: var(--kd-accent-hover); }

/* ─── Profile card ───────────────────────────────────────────── */
.kd-profile-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .kd-profile-grid { grid-template-columns: repeat(2, 1fr); } }
.kd-profile-card {
  background: #fff; border: 1px solid var(--kd-border);
  border-radius: 20px; padding: 24px;
}
.kd-profile-card__label {
  font-family: var(--kd-font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--kd-text-muted); margin-bottom: 12px;
}
.kd-profile-card__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-profile-card__list {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-direction: column; gap: 10px;
}
.kd-profile-card__list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--kd-border);
  font-size: 14px;
}
.kd-profile-card__list li:last-child { border-bottom: none; }
.kd-profile-card__list-value { font-weight: 600; }

.kd-finance-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 1200px) {
  .kd-finance-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}
.kd-finance-section {
  margin-bottom: 32px;
}
.kd-finance-table-wrap {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 18px;
  overflow: auto;
}
.kd-finance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.kd-finance-table th,
.kd-finance-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--kd-border);
  font-size: 14px;
  vertical-align: top;
}
.kd-finance-table th {
  background: rgba(124, 92, 255, 0.04);
  color: var(--kd-text-muted);
  font-family: var(--kd-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kd-finance-table tbody tr:last-child td {
  border-bottom: none;
}
.kd-finance-table__primary {
  font-weight: 600;
  color: var(--kd-text-primary);
}
.kd-finance-table__secondary {
  margin-top: 4px;
  color: var(--kd-text-muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.kd-finance-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.kd-form-field--full {
  grid-column: 1 / -1;
}
@media (max-width: 767px) {
  .kd-finance-form {
    grid-template-columns: 1fr;
  }
}

/* ─── Showcase page layout ────────────────────────────────────── */
.kd-showcase { padding: 48px 24px 96px; background: #f0eee9; min-height: 100vh; }
.kd-showcase__heading {
  max-width: 1200px; margin: 0 auto 40px;
}
.kd-showcase__title {
  margin: 0; font-family: var(--kd-font-display);
  font-size: 40px; font-weight: 600; letter-spacing: -0.03em;
}
.kd-showcase__subtitle {
  margin-top: 8px; font-size: 16px; color: var(--kd-text-muted);
}
.kd-showcase__section {
  max-width: 1200px; margin: 0 auto 56px;
}
.kd-showcase__section-title {
  margin: 0 0 6px; font-family: var(--kd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.kd-showcase__section-subtitle {
  margin: 0 0 20px; font-size: 14px; color: var(--kd-text-muted);
}
.kd-showcase__grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}
.kd-showcase__artboard {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--kd-shadow-soft);
  display: flex; flex-direction: column;
}
.kd-showcase__artboard-head {
  padding: 12px 16px; border-bottom: 1px solid var(--kd-border);
  font-family: var(--kd-font-mono); font-size: 11px;
  color: var(--kd-text-muted); letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
.kd-showcase__artboard-body {
  padding: 24px; display: flex; align-items: center; justify-content: center;
  min-height: 240px; position: relative;
  background:
    linear-gradient(var(--kd-bg-light) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--kd-bg-light) 1px, transparent 1px) 0 0 / 20px 20px;
}
.kd-showcase__artboard-body--dark {
  background:
    radial-gradient(600px 300px at 50% 40%, #1a1a20 0%, #0F0F10 100%);
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes kd-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kd-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes kd-marquee-down {
  from { transform: translateY(calc(-50% - var(--kd-marquee-gap, 0px) / 2)); }
  to { transform: translateY(0); }
}
@keyframes kd-marquee-up {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-50% - var(--kd-marquee-gap, 0px) / 2)); }
}
@keyframes kd-pulse-dot {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
@keyframes kd-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.15); opacity: 0; }
}
@keyframes kd-spin { to { transform: rotate(360deg); } }

.kd-legal-pdf {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.kd-legal-pdf__hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.kd-legal-pdf__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}
.kd-legal-pdf__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.kd-legal-pdf__viewer {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 28px;
  box-shadow: var(--kd-shadow-soft);
  overflow: hidden;
}
.kd-legal-pdf__frame {
  width: 100%;
  min-height: 78vh;
  border: 0;
  display: block;
  background: #fff;
}
.kd-legal-pdf__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--kd-text-muted);
}
.kd-legal-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.kd-legal-text__hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kd-legal-text__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}
.kd-legal-text__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.kd-legal-text__stamp {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  color: var(--kd-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kd-legal-text__body {
  background: #fff;
  border: 1px solid var(--kd-border);
  border-radius: 28px;
  box-shadow: var(--kd-shadow-soft);
  padding: 28px 24px;
}
.kd-legal-text__body h2,
.kd-legal-text__body h3 {
  margin: 32px 0 12px;
  color: var(--kd-text);
}
.kd-legal-text__body h2:first-child,
.kd-legal-text__body h3:first-child {
  margin-top: 0;
}
.kd-legal-text__body h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
}
.kd-legal-text__body h3 {
  font-size: 20px;
  line-height: 1.25;
}
.kd-legal-text__body p,
.kd-legal-text__body li {
  margin: 0;
  color: var(--kd-text-muted);
  font-size: 16px;
  line-height: 1.72;
}
.kd-legal-text__body p + p,
.kd-legal-text__body p + ul,
.kd-legal-text__body ul + p,
.kd-legal-text__body ul + ul {
  margin-top: 14px;
}
.kd-legal-text__list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.kd-legal-text__body a {
  color: var(--kd-accent);
  text-decoration: none;
}
.kd-legal-text__body a:hover {
  text-decoration: underline;
}
@media (min-width: 1024px) {
  .kd-legal-pdf__hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
  }
  .kd-legal-pdf__actions {
    flex-shrink: 0;
    justify-content: flex-end;
  }
  .kd-legal-text__hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
  }
  .kd-legal-text__meta {
    flex-shrink: 0;
    justify-content: flex-end;
  }
}
@media (max-width: 767px) {
  .kd-legal-pdf__actions {
    width: 100%;
  }
  .kd-legal-pdf__actions .kd-btn {
    width: 100%;
  }
  .kd-legal-pdf__frame {
    min-height: 68vh;
  }
  .kd-legal-text__body {
    padding: 24px 20px;
    border-radius: 24px;
  }
  .kd-legal-text__stamp {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
