.dm-reco {
  --e-bg: var(--screen, #0c0c0e);
  --e-bg-2: var(--screen-2, #17171a);
  --e-line: var(--screen-line, #27272a);
  --e-ink: var(--screen-ink, #e4e4e7);
  --e-muted: var(--screen-muted, #71717a);
  --e-accent: #8b7bff;
  --e-ok: #34d399;
  --e-ref: #f5b83d;
  container-type: inline-size;
  color: var(--e-ink);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  background: var(--e-bg);
  text-align: left;
}

.dm-reco *,
.dm-reco *::before,
.dm-reco *::after {
  box-sizing: border-box;
}

.dm-reco button,
.dm-reco select {
  font: inherit;
  color: inherit;
}

.dm-reco button {
  cursor: pointer;
}

.dm-reco button:disabled {
  cursor: default;
}

.dm-reco :focus-visible {
  outline: 2px solid var(--e-accent);
  outline-offset: 2px;
}

.dm-reco [hidden] {
  display: none !important;
}

.dm-reco svg {
  display: block;
}

.dm-reco section.site-section,
.dm-reco section.dm-reco__root {
  display: block;
  gap: 0;
  min-width: 0;
}

.dm-reco__grid {
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  height: 640px;
}

/* ---------- host column ---------- */

.dm-reco .dm-reco__host {
  display: flex;
  gap: 0;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 12px 12px 14px;
  border-right: 1px solid var(--e-line);
  background: #111114;
}

.dm-reco__hostbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}

.dm-reco__eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--e-muted);
}

.dm-reco__lib {
  margin-left: auto;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--e-muted);
}

.dm-reco__lib b {
  font-weight: 500;
  color: var(--e-ref);
}

.dm-reco__seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--e-line);
  border-radius: 8px;
  background: var(--e-bg-2);
}

.dm-reco__seg button {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--e-muted);
  font-size: 12px;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.dm-reco__seg button:hover {
  color: var(--e-ink);
}

.dm-reco__seg button[aria-pressed='true'] {
  background: #2a2a31;
  color: var(--e-ink);
  box-shadow: inset 0 0 0 1px #3a3a44;
}

.dm-reco__seg small {
  font-size: 10px;
  color: var(--e-muted);
}

.dm-reco__browser {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #2c2c33;
  border-radius: 10px;
  background: #fff;
}

.dm-reco__url {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 7px 10px;
  background: #e9e9ec;
  border-bottom: 1px solid #d6d6db;
  color: #55555e;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.dm-reco__url i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9c9cf;
}

.dm-reco__url span {
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  padding: 2px 10px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco__site {
  flex: 1;
  min-height: 0;
  padding: 0 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.dm-reco__slot {
  margin-top: 14px;
  padding: 18px 12px;
  border: 1px dashed #b9b4d6;
  border-radius: 8px;
  color: #6c66a0;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  text-align: center;
  background: rgba(139, 123, 255, 0.05);
}

/* ---------- shared carousel mechanics (host libs + engine) ---------- */

.dm-reco .site-slider,
.dm-reco .nv-slider-wrap {
  --per: 4;
  --gap: 12px;
  --slide-w: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  position: relative;
}

.dm-reco :is(.slick-list, .swiper-clip, .owl-stage-outer, .nv-viewport) {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.dm-reco :is(.slick-list, .swiper-clip, .owl-stage-outer, .nv-viewport)::-webkit-scrollbar {
  display: none;
}

.dm-reco :is(.slick-track, .swiper-wrapper, .owl-stage, .nv-track) {
  position: relative;
  display: flex;
  gap: var(--gap);
  align-items: stretch;
}

.dm-reco :is(.slick-slide, .swiper-slide, .owl-item, .nv-slide) {
  flex: 0 0 var(--slide-w);
  min-width: 0;
  scroll-snap-align: start;
}

.dm-reco :is(.slick-slide, .swiper-slide, .owl-item, .nv-slide) > * {
  height: 100%;
}

.dm-reco :is(.slick-arrow, .swiper-button-prev, .swiper-button-next, .owl-prev, .owl-next, .nv-arrow) {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  transition: opacity 0.15s, background-color 0.15s;
}

.dm-reco :is(.slick-arrow, .swiper-button-prev, .swiper-button-next, .owl-prev, .owl-next, .nv-arrow) svg {
  width: 14px;
  height: 14px;
}

.dm-reco :is(.slick-next, .swiper-button-next, .owl-next, .nv-next) svg {
  transform: scaleX(-1);
}

.dm-reco :is(.slick-arrow, .swiper-button-prev, .swiper-button-next, .owl-prev, .owl-next, .nv-arrow):disabled {
  opacity: 0.3;
}

.dm-reco .site-section,
.dm-reco .dm-reco__root {
  margin-top: 14px;
}

/* ---------- engine annotations on the host page ---------- */

.dm-reco .dm-reco__root {
  position: relative;
  outline: 1px dashed rgba(124, 92, 255, 0.6);
  outline-offset: 6px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dm-reco .dm-reco__root::before {
  content: attr(data-reco-label) ' [data-reco-root="' attr(data-reco-root) '"]';
  position: absolute;
  top: -15px;
  right: 0;
  padding: 0 5px;
  border-radius: 3px;
  background: #7c5cff;
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  line-height: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.dm-reco .dm-reco__root.is-entering {
  opacity: 0;
  transform: translateY(8px);
}

.dm-reco .dm-reco-flash {
  outline: 2px solid #7c5cff;
  outline-offset: 4px;
  border-radius: 6px;
  animation: dm-reco-pulse 1.1s ease-out;
}

.dm-reco .dm-reco-ref {
  outline: 2px dashed var(--e-ref);
  outline-offset: -2px;
  border-radius: 6px;
}

@keyframes dm-reco-pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(124, 92, 255, 0); }
}

/* ---------- host chrome shared ---------- */

.dm-reco .site-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 -16px;
  padding: 10px 16px;
}

.dm-reco .site-logo {
  font-weight: 700;
  white-space: nowrap;
}

.dm-reco .site-nav {
  display: flex;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
}

.dm-reco .site-search {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.dm-reco .site-crumb {
  margin: 8px 0 0;
  font-size: 11px;
}

.dm-reco [class$='-head'] {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dm-reco [class$='-head'] h3 {
  margin: 0;
  color: inherit;
  font-family: inherit;
  text-wrap: initial;
}

/* ---------- Theme A: rounded / soft, slick-style ---------- */

.dm-reco .dm-reco__site[data-theme='a'] {
  background: #f5f3ee;
  color: #1f2a24;
}

.dm-reco [data-theme='a'] .site-header {
  background: #fff;
  border-bottom: 1px solid #e8e4da;
}

.dm-reco [data-theme='a'] .site-logo {
  color: #2f6b4f;
  font-size: 15px;
}

.dm-reco [data-theme='a'] .site-logo i {
  margin-left: 3px;
  font-style: normal;
  font-weight: 400;
  color: #7b8a80;
}

.dm-reco [data-theme='a'] .site-nav {
  color: #4b5a51;
}

.dm-reco [data-theme='a'] .site-search {
  border-radius: 999px;
  background: #f0ede5;
  color: #8a8f88;
}

.dm-reco [data-theme='a'] .site-crumb {
  color: #7b8a80;
}

.dm-reco .ka-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.dm-reco .ka-more {
  color: #2f6b4f;
  font-size: 12px;
  text-decoration: none;
}

.dm-reco [data-theme='a'] .site-slider {
  --gap: 12px;
}

.dm-reco .ka-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 42, 36, 0.06), 0 6px 16px -8px rgba(31, 42, 36, 0.16);
}

.dm-reco .ka-card__link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.dm-reco .ka-card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--g2, #ddd), var(--g1, #999));
  color: rgba(255, 255, 255, 0.93);
}

.dm-reco .ka-card__media svg {
  width: 52%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.dm-reco .ka-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f6b4f;
  font-size: 10px;
  font-weight: 600;
}

.dm-reco .ka-card__title {
  display: -webkit-box;
  min-height: 2.5em;
  margin-top: 8px;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dm-reco .ka-card__price {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-top: 4px;
}

.dm-reco .ka-now {
  font-size: 13px;
  font-weight: 700;
}

.dm-reco .ka-was {
  color: #9aa39d;
  font-size: 11px;
}

.dm-reco .ka-card__rating {
  margin-left: auto;
  color: #c48a1b;
  font-size: 10.5px;
  white-space: nowrap;
}

.dm-reco .ka-card__score {
  color: #6b766f;
}

.dm-reco .ka-card__btn {
  margin-top: auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  background: #e7f0ea;
  color: #2f6b4f;
  font-size: 11.5px;
  font-weight: 600;
  translate: 0 4px;
}

.dm-reco .ka-card__btn:hover,
.dm-reco .ka-card__btn.is-added {
  background: #2f6b4f;
  color: #fff;
}

.dm-reco .slick-arrow {
  top: 26%;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #2f6b4f;
  box-shadow: 0 2px 8px rgba(31, 42, 36, 0.18);
}

.dm-reco .slick-prev {
  left: -10px;
}

.dm-reco .slick-next {
  right: -10px;
}

.dm-reco .slick-list {
  margin: -6px -4px;
  padding: 6px 4px 10px;
  scroll-padding-inline: 4px;
}

/* ---------- Theme B: sharp / editorial, swiper-style ---------- */

.dm-reco .dm-reco__site[data-theme='b'] {
  background: #fbfaf6;
  color: #111;
}

.dm-reco [data-theme='b'] .site-header {
  border-bottom: 1px solid #111;
}

.dm-reco [data-theme='b'] .site-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dm-reco [data-theme='b'] .site-logo i {
  display: none;
}

.dm-reco [data-theme='b'] .site-nav {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-reco [data-theme='b'] .site-search {
  border-bottom: 1px solid #111;
  padding: 2px 0;
  font-style: italic;
  font-family: Georgia, serif;
}

.dm-reco [data-theme='b'] .site-crumb {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6d6a62;
}

.dm-reco .kb-head {
  padding-right: 72px;
  border-bottom: 1px solid #d8d4ca;
  padding-bottom: 6px;
}

.dm-reco .kb-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
}

.dm-reco .kb-more {
  color: #111;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-reco [data-theme='b'] .site-slider {
  --gap: 14px;
}

.dm-reco .kb-tile {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.dm-reco .kb-tile__img {
  position: relative;
  display: block;
}

.dm-reco .kb-tile__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: #ebe7dd;
  color: var(--g1, #333);
}

.dm-reco .kb-tile__art svg {
  width: 56%;
  height: auto;
}

.dm-reco .kb-tile__label {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 3px 7px;
  background: #111;
  color: #fbfaf6;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dm-reco .kb-tile figcaption {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 8px;
}

.dm-reco .kb-tile__cat {
  color: #8a867c;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dm-reco .kb-tile__name {
  margin-top: 2px;
  overflow: hidden;
  color: #111;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco .kb-tile__price {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}

.dm-reco .kb-tile__price ins {
  text-decoration: none;
}

.dm-reco .kb-tile__price del {
  color: #9a968c;
}

.dm-reco .kb-tile__add {
  align-self: flex-start;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #111;
  background: none;
  color: #111;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-reco .kb-tile__add.is-added {
  color: #8b5e00;
  border-color: #8b5e00;
}

.dm-reco .swiper-button-prev,
.dm-reco .swiper-button-next {
  top: -40px;
  width: 28px;
  height: 28px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fbfaf6;
  color: #111;
}

.dm-reco .swiper-button-prev {
  right: 32px;
}

.dm-reco .swiper-button-next {
  right: 0;
}

.dm-reco .swiper-button-prev:hover:not(:disabled),
.dm-reco .swiper-button-next:hover:not(:disabled) {
  background: #111;
  color: #fbfaf6;
}

/* ---------- Theme C: dense / marketplace, owl-style ---------- */

.dm-reco .dm-reco__site[data-theme='c'] {
  background: #eef0f4;
  color: #1a1d24;
  font-family: Arial, 'Helvetica Neue', sans-serif;
}

.dm-reco [data-theme='c'] .site-header {
  background: #f2641c;
  color: #fff;
}

.dm-reco [data-theme='c'] .site-logo {
  font-size: 15px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dm-reco [data-theme='c'] .site-logo i {
  margin-left: 2px;
  font-weight: 400;
}

.dm-reco [data-theme='c'] .site-nav {
  font-size: 11.5px;
  font-weight: 700;
}

.dm-reco [data-theme='c'] .site-search {
  flex: 0 1 160px;
  border-radius: 3px;
  background: #fff;
  color: #9097a3;
}

.dm-reco [data-theme='c'] .site-crumb {
  color: #6b7280;
}

.dm-reco .kc-head {
  padding: 8px 10px;
  margin-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #fff;
  border-bottom: 2px solid #f2641c;
}

.dm-reco .kc-title {
  font-size: 14px;
  font-weight: 700;
}

.dm-reco .kc-more {
  color: #f2641c;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.dm-reco [data-theme='c'] .site-slider {
  --gap: 6px;
  padding: 8px;
  border-radius: 0 0 4px 4px;
  background: #fff;
}

.dm-reco .kc-prod {
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid #e3e6eb;
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
}

.dm-reco .kc-prod:hover {
  border-color: #f2641c;
}

.dm-reco .kc-prod__thumb {
  position: relative;
  display: block;
}

.dm-reco .kc-prod__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.82;
  background: radial-gradient(circle at 50% 60%, var(--g2, #ddd) 0 38%, #f7f8fa 39%);
  color: var(--g1, #444);
}

.dm-reco .kc-prod__art svg {
  width: 50%;
  height: auto;
}

.dm-reco .kc-prod__off {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 5px;
  background: #e5262b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.dm-reco .kc-prod__title {
  display: -webkit-box;
  min-height: 2.6em;
  margin-top: 5px;
  overflow: hidden;
  color: #1a1d24;
  font-size: 11.5px;
  line-height: 1.3;
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dm-reco .kc-prod__meta {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-top: 2px;
  color: #6b7280;
  font-size: 10px;
}

.dm-reco .kc-prod__stars {
  color: #f5a524;
  letter-spacing: -1px;
}

.dm-reco .kc-prod__price {
  display: flex;
  flex-wrap: wrap;
  gap: 0 5px;
  align-items: baseline;
  margin-top: 2px;
}

.dm-reco .kc-prod__now {
  color: #f2641c;
  font-size: 15px;
}

.dm-reco .kc-prod__was {
  color: #9aa1ab;
  font-size: 10.5px;
}

.dm-reco .kc-prod__ship {
  color: #0f9d58;
  font-size: 10px;
  font-weight: 700;
}

.dm-reco .kc-prod__cart {
  margin-top: auto;
  padding: 4px;
  border: 1px solid #f2641c;
  border-radius: 3px;
  background: #fff;
  color: #f2641c;
  font-size: 11px;
  font-weight: 700;
  translate: 0 4px;
}

.dm-reco .kc-prod__cart:hover,
.dm-reco .kc-prod__cart.is-added {
  background: #f2641c;
  color: #fff;
}

.dm-reco .owl-prev,
.dm-reco .owl-next {
  top: 36%;
  width: 24px;
  height: 40px;
  border: 1px solid #e3e6eb;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1d24;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.dm-reco .owl-prev {
  left: 2px;
}

.dm-reco .owl-next {
  right: 2px;
}

/* ---------- native mode (engine UI) ---------- */

.dm-reco .nv-root {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #18181b;
  font-family: var(--font-body, system-ui, sans-serif);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dm-reco .nv-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.dm-reco .nv-head h3 {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dm-reco .nv-chip {
  padding: 1px 8px;
  border-radius: 999px;
  background: #f1f0f7;
  color: #5b54a8;
  font-size: 10.5px;
}

.dm-reco .nv-chip:empty {
  display: none;
}

.dm-reco .nv-slider {
  --per: 4;
  --gap: 10px;
  --slide-w: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  position: relative;
}

.dm-reco .nv-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint-2) 26%, #fff);
  animation: dm-reco-fade 0.35s ease both;
}

.dm-reco .nv-card__link {
  color: inherit;
  text-decoration: none;
}

.dm-reco .nv-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: var(--tint);
}

.dm-reco .nv-card__media svg {
  width: 52%;
  height: auto;
}

.dm-reco .nv-card__label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1px 6px;
  border-radius: 6px;
  background: #18181b;
  color: #fff;
  font-size: 9.5px;
}

.dm-reco .nv-card__name {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco .nv-card__row {
  display: flex;
  gap: 5px;
  align-items: baseline;
  margin-top: 2px;
  font-size: 12px;
}

.dm-reco .nv-card__price {
  font-weight: 650;
}

.dm-reco .nv-card__row s {
  color: #71717a;
  font-size: 10.5px;
}

.dm-reco .nv-card__add {
  margin-top: 8px;
  padding: 5px;
  border: 0;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 11px;
}

.dm-reco .nv-card__add.is-added {
  background: #16a34a;
}

.dm-reco .nv-arrow {
  top: 28%;
  width: 26px;
  height: 26px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  color: #18181b;
}

.dm-reco .nv-prev {
  left: -6px;
}

.dm-reco .nv-next {
  right: -6px;
}

.dm-reco .nv-skeletons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dm-reco .nv-skel {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: #f4f4f5;
}

.dm-reco .nv-skel span {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 45%, #e4e4e7 90%) 0 0 / 200% 100%;
  animation: dm-reco-shimmer 1.1s linear infinite;
}

.dm-reco .nv-skel span:first-child {
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.dm-reco .nv-skel span:last-child {
  width: 55%;
}

@keyframes dm-reco-shimmer {
  to { background-position: -200% 0; }
}

@keyframes dm-reco-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- engine panel ---------- */

.dm-reco__engine {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.dm-reco__engine > * {
  flex-shrink: 0;
}

.dm-reco__engine > .dm-reco__steps,
.dm-reco__engine > .dm-reco__events {
  flex: 1 1 auto;
  min-height: 120px;
  margin-top: -6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.dm-reco__ehead {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.dm-reco__brand {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
}

.dm-reco__brand b {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
}

.dm-reco__brand span:last-child {
  overflow: hidden;
  color: var(--e-muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco__logo {
  align-self: center;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #8b7bff, #5fd4c4);
}

.dm-reco__codewrap {
  position: relative;
}

.dm-reco__codetag {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--e-muted);
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.dm-reco__code {
  margin: 0;
  padding: 8px 10px;
  overflow-x: auto;
  border: 1px solid var(--e-line);
  border-radius: 8px;
  background: var(--e-bg-2);
  color: var(--e-ink);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre;
  scrollbar-width: thin;
}

.dm-reco .tk-k { color: #93b4ff; }
.dm-reco .tk-s { color: #f5c26b; border-radius: 3px; transition: background-color 0.6s; }
.dm-reco .tk-p { color: #6b6b75; }
.dm-reco .tk-f { color: #5fd4c4; }

.dm-reco .tk-s.is-changed {
  background: rgba(245, 194, 107, 0.16);
  animation: dm-reco-fade 0.5s ease;
}

.dm-reco__scenario {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.dm-reco__field {
  display: flex;
  flex: 1 1 auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.dm-reco__field:last-child {
  flex: 0 0 auto;
}

.dm-reco__field > span {
  color: var(--e-muted);
  font-size: 11px;
  white-space: nowrap;
}

.dm-reco__field select {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--e-line);
  border-radius: 8px;
  background: var(--e-bg-2);
  font-size: 12px;
  color-scheme: dark;
}

.dm-reco__chainwrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.dm-reco__chainlabel {
  color: var(--e-muted);
  font-size: 11px;
}

.dm-reco__chain {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.dm-reco__chip {
  padding: 2px 8px;
  border: 1px solid #34343c;
  border-radius: 999px;
  background: var(--e-bg-2);
  color: var(--e-ink);
  font-size: 11.5px;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.dm-reco__chip.is-used {
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.1);
  color: #86efc0;
}

.dm-reco__chip.is-skipped {
  color: var(--e-muted);
  text-decoration: line-through;
}

.dm-reco__sep {
  color: var(--e-muted);
  font-size: 11px;
}

.dm-reco__actions {
  display: flex;
  gap: 8px;
}

.dm-reco__run,
.dm-reco__destroy {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.dm-reco__run {
  flex: 1;
  border: 1px solid #8b7bff;
  background: #7c5cff;
  color: #fff;
}

.dm-reco__run:hover:not(:disabled) {
  background: #6d4cf5;
}

.dm-reco__destroy {
  border: 1px solid #3a3a42;
  background: transparent;
  color: #ffb4a8;
}

.dm-reco__destroy:hover:not(:disabled) {
  border-color: #ff8a7a;
}

.dm-reco__run:disabled,
.dm-reco__destroy:disabled {
  opacity: 0.45;
}

.dm-reco__status {
  min-height: 1.4em;
  margin: -3px 0 -2px;
  overflow: hidden;
  color: var(--e-muted);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco__tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--e-line);
}

.dm-reco__tabs button {
  margin-bottom: -1px;
  padding: 5px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--e-muted);
  font-size: 12px;
}

.dm-reco__tabs button[aria-selected='true'] {
  border-bottom-color: var(--e-accent);
  color: var(--e-ink);
}

.dm-reco__tabs span {
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background: #26262c;
  font-size: 10px;
}

.dm-reco__steps {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dm-reco__step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 1px 6px;
  border-radius: 6px;
  color: #5d5d66;
  transition: background-color 0.2s, color 0.2s;
}

.dm-reco__num {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid #34343c;
  border-radius: 50%;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
}

.dm-reco__stext {
  min-width: 0;
}

.dm-reco__stext b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
}

.dm-reco__stext small {
  display: block;
  overflow: hidden;
  color: var(--e-muted);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  line-height: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-reco__step.is-active {
  background: rgba(139, 123, 255, 0.12);
  color: var(--e-ink);
}

.dm-reco__step.is-active .dm-reco__num {
  border-color: var(--e-accent);
  color: var(--e-accent);
  animation: dm-reco-blink 0.8s ease-in-out infinite alternate;
}

.dm-reco__step.is-done {
  color: var(--e-ink);
}

.dm-reco__step.is-done .dm-reco__num {
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.14);
  color: var(--e-ok);
}

.dm-reco__step.is-done:nth-child(4) small {
  color: #f5c26b;
}

.dm-reco__step.is-skipped {
  color: #55555d;
}

.dm-reco__step.is-skipped .dm-reco__num {
  border-style: dashed;
}

@keyframes dm-reco-blink {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.dm-reco__events ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dm-reco__event {
  padding: 5px 8px;
  border: 1px solid var(--e-line);
  border-radius: 6px;
  background: var(--e-bg-2);
  animation: dm-reco-fade 0.3s ease;
}

.dm-reco__ename {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #93b4ff;
}

.dm-reco__event.is-conversion .dm-reco__ename {
  color: var(--e-ok);
}

.dm-reco__event code {
  display: block;
  color: #a1a1aa;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dm-reco__empty {
  margin: 4px 0 0;
  color: var(--e-muted);
  font-size: 12px;
}

/* ---------- narrow: stacked ---------- */

@container (max-width: 719px) {
  .dm-reco__grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .dm-reco .dm-reco__host {
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--e-line);
  }

  .dm-reco__lib {
    margin-left: 0;
  }

  .dm-reco__site {
    overflow: visible;
    padding: 0 12px 16px;
  }

  .dm-reco .site-header {
    margin: 0 -12px;
    padding: 9px 12px;
  }

  .dm-reco .site-nav {
    display: none;
  }

  .dm-reco .site-slider,
  .dm-reco .nv-slider {
    --per: 2;
    --gap: 8px;
  }

  .dm-reco .ka-card__media,
  .dm-reco .kb-tile__art,
  .dm-reco .nv-card__media {
    aspect-ratio: 5 / 3;
  }

  .dm-reco .kc-prod__art {
    aspect-ratio: 4 / 3;
  }

  .dm-reco .nv-skeletons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dm-reco .nv-skel:nth-child(n + 3) {
    display: none;
  }

  .dm-reco__engine {
    overflow: visible;
  }

  .dm-reco__engine > .dm-reco__steps,
  .dm-reco__engine > .dm-reco__events {
    overflow: visible;
  }

  .dm-reco__status {
    white-space: normal;
  }

  .dm-reco__seg button {
    padding: 4px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dm-reco .dm-reco__root,
  .dm-reco .dm-reco__root.is-entering {
    transform: none;
  }

  .dm-reco .dm-reco-flash,
  .dm-reco .nv-skel span,
  .dm-reco__step.is-active .dm-reco__num {
    animation: none;
  }
}
