:root {
  --ink: #12101a;
  --muted: #6b6578;
  --brand: #5b3cc4;
  --accent: #c9a962;
  --line: #e2dfe8;
  --surface: #fff;
  --brand-soft: #ece7fa;
  --nav: #0d0a14;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--embed-bg, #fff);
  padding: 0.5rem;
}

/* Skins do fundo do widget */
.embed--skin-light {
  --embed-bg: #fff;
  --ink: #12101a;
  --muted: #6b6578;
  --surface: #fff;
  --line: #e2dfe8;
  --brand: #5b3cc4;
  --brand-soft: #ece7fa;
  --accent: #c9a962;
}
.embed--skin-dark {
  --embed-bg: #030708;
  --ink: #f5f7f8;
  --muted: #9ca7aa;
  --surface: #0d1719;
  --line: color-mix(in srgb, #39e96b 22%, #1a2a2e);
  --brand: #39e96b;
  --brand-soft: rgba(57, 233, 107, 0.12);
  --accent: #c9a962;
}
.embed--skin-dark .embed-head strong { color: #f5f7f8; }
.embed--skin-dark .embed-head span { color: #9ca7aa; }
.embed--skin-dark .embed-item {
  background: color-mix(in srgb, #0d1719 92%, #39e96b 4%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.embed--skin-dark .embed-slider__btn {
  background: color-mix(in srgb, #0a1216 88%, transparent);
  color: #f5f7f8;
  border-color: color-mix(in srgb, #39e96b 35%, transparent);
}
.embed--skin-transparent {
  --embed-bg: transparent;
  --ink: #f5f7f8;
  --muted: #9ca7aa;
  --surface: color-mix(in srgb, #0d1719 88%, transparent);
  --line: color-mix(in srgb, #39e96b 28%, transparent);
  --brand: #39e96b;
  --brand-soft: rgba(57, 233, 107, 0.12);
  --accent: #c9a962;
}
.embed--skin-transparent .embed-head strong { color: #f5f7f8; }
.embed--skin-transparent .embed-head span { color: #9ca7aa; }
.embed--skin-transparent .embed-item {
  background: color-mix(in srgb, #0d1719 82%, #061014);
  border: 1px solid color-mix(in srgb, #39e96b 28%, transparent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}
.embed--skin-custom {
  --embed-bg: var(--embed-bg, #030708);
  --ink: #f5f7f8;
  --muted: #b0b8bc;
  --surface: color-mix(in srgb, var(--embed-bg) 70%, #111);
  --line: rgba(255, 255, 255, 0.14);
  --brand: #39e96b;
  --brand-soft: rgba(57, 233, 107, 0.12);
  --accent: #c9a962;
}
.embed--skin-custom .embed-head strong { color: #f5f7f8; }
.embed--skin-custom .embed-item {
  background: color-mix(in srgb, #ffffff 8%, var(--embed-bg));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.embed-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}
.embed-head strong {
  color: #1a1824;
  font-size: 1.05rem;
  font-weight: 750;
}
.embed-head span {
  color: #5c5668;
  font-size: 0.9rem;
  font-weight: 600;
}
.embed-empty { color: var(--muted); }
.embed-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(var(--embed-cols, 1), minmax(0, 1fr));
  align-items: stretch;
}
.embed-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.embed-item .stars { color: var(--accent); margin-bottom: 0.35rem; }
.embed-item p { margin: 0 0 0.55rem; flex: 1 1 auto; }
.embed-item img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.55rem;
}
.embed-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.embed-photos img {
  margin-bottom: 0;
  max-height: 120px;
  aspect-ratio: 1;
}
.embed-item footer { color: var(--muted); font-size: 0.9rem; }
.embed-date { opacity: 0.85; font-variant-numeric: tabular-nums; }
.embed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 0.9rem;
}
.embed-public-link {
  color: var(--accent, #0d9488);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.embed-public-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.embed-brand {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.embed-brand:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--ink) 45%, transparent);
}
.embed-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.embed-author__avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.embed--list .embed-item { border-left: 3px solid var(--brand); }
.embed-item.is-featured { border-color: var(--brand); box-shadow: 0 8px 24px rgba(91, 60, 196, .12); }
.embed-reply {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.45rem;
}
.embed--featured .embed-item:first-child {
  padding: 1.3rem;
  background: linear-gradient(160deg, #0d0a14, #3f2894 55%, #5b3cc4);
  color: #fff;
  border: 0;
}
.embed--featured .embed-item:first-child .stars,
.embed--featured .embed-item:first-child footer,
.embed--featured .embed-item:first-child p { color: #fff; }
.embed--featured .embed-item:not(:first-child) { display: none; }
.embed--compact .embed-item {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
}
.embed--compact .embed-item p {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.embed--compact .embed-item img,
.embed--compact .embed-reply { display: none; }

/* Colunas — reduz em viewports estreitas */
.embed--cols-1 { --embed-cols: 1; }
.embed--cols-2 { --embed-cols: 2; }
.embed--cols-3 { --embed-cols: 3; }
.embed--cols-4 { --embed-cols: 4; }
@media (max-width: 640px) {
  .embed--cols-2,
  .embed--cols-3,
  .embed--cols-4 {
    --embed-cols: 1;
  }
}
@media (min-width: 641px) and (max-width: 900px) {
  .embed--cols-3,
  .embed--cols-4 {
    --embed-cols: 2;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .embed--cols-4 {
    --embed-cols: 3;
  }
}

/* Nav com setas (cards/lista) */
.embed-nav {
  position: relative;
  padding: 0;
}
.embed--has-arrows .embed-nav {
  padding: 0 2.1rem;
}
.embed--has-arrows .embed-nav > .embed-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
.embed--has-arrows .embed-nav > .embed-slider__btn--prev { left: 0; }
.embed--has-arrows .embed-nav > .embed-slider__btn--next { right: 0; }

/* Carrossel / slide / fade */
.embed-slider {
  position: relative;
  padding: 0 2.1rem;
}
.embed-slider__viewport {
  overflow: hidden;
  border-radius: 14px;
  width: 100%;
}
.embed--effect-slide .embed-slider__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  transition: transform 0.45s ease;
  will-change: transform;
}
.embed--effect-slide .embed-slider__slide {
  box-sizing: border-box;
  /* largura em px definida no JS (viewport / colunas) */
  min-width: 0;
  flex-shrink: 0;
  height: auto;
}
.embed--effect-fade .embed-slider__track {
  display: grid;
  position: relative;
}
.embed--effect-fade .embed-slider__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.embed--effect-fade .embed-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.embed-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.embed-slider__btn:hover { background: var(--brand-soft); }
.embed-slider__btn--prev { left: 0; }
.embed-slider__btn--next { right: 0; }
.embed-slider__btn[hidden] { display: none; }
.embed-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.embed-slider__dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #c9d5ce;
  cursor: pointer;
}
.embed-slider__dot.is-active { background: var(--brand); }
.embed-slider:not(:has(.embed-slider__btn:not([hidden]))) {
  padding-left: 0;
  padding-right: 0;
}

/* Barra de rolagem */
.embed--no-scrollbar,
.embed--no-scrollbar .embed-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.embed--no-scrollbar::-webkit-scrollbar,
.embed--no-scrollbar .embed-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Lista rolável / marquee */
.embed-scroll {
  max-height: none;
}
.embed--marquee.is-marquee-running {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.embed--marquee.is-marquee-running .embed-head,
.embed--marquee.is-marquee-running .embed-foot {
  flex-shrink: 0;
}
.embed--marquee.is-marquee-running .embed-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.embed-marquee__track {
  will-change: transform;
  display: flex;
}
.embed--marquee .embed-item {
  margin: 0;
}

/* Vertical ↑ */
.embed--marquee-y .embed-marquee__track {
  flex-direction: column;
}
.embed--marquee-y .embed-list {
  gap: 1.15rem;
  row-gap: 1.15rem;
  column-gap: 0.9rem;
}
.embed--marquee-y .embed-marquee__group {
  padding-bottom: 1.15rem;
}
.embed--marquee-y.is-marquee-running .embed-scroll {
  mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.embed--marquee-y.is-marquee-running .embed-marquee__track {
  /* movimento via JS */
  animation: none;
}

/* Horizontal ← */
.embed--marquee-x .embed-scroll {
  container-type: inline-size;
}
.embed--marquee-x .embed-marquee__track {
  flex-direction: row;
  width: max-content;
}
.embed--marquee-x .embed-marquee__group.embed-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  padding-bottom: 0;
  padding-right: 1rem;
  grid-template-columns: none;
}
.embed--marquee-x .embed-item {
  /* Largura = viewport / colunas (1–4); JS ajusta no mobile para 1 card */
  flex: 0 0 calc((100cqw - (var(--embed-cols, 2) - 1) * 1rem) / var(--embed-cols, 2));
  width: calc((100cqw - (var(--embed-cols, 2) - 1) * 1rem) / var(--embed-cols, 2));
  max-width: none;
  height: auto;
  min-width: 0;
}
@media (max-width: 640px) {
  .embed--marquee-x .embed-item {
    flex-basis: 100cqw;
    width: 100cqw;
  }
  .embed--has-arrows .embed-nav {
    padding: 0 1.65rem;
  }
}
.embed--marquee-x.is-marquee-running .embed-scroll {
  mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.embed--marquee-x.is-marquee-running .embed-marquee__track {
  animation: none;
}

.embed--marquee.is-marquee-running.is-hover-paused .embed-marquee__track,
.embed--marquee.is-reading .embed-marquee__track {
  animation-play-state: paused !important;
}
@keyframes embed-marquee-y {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes embed-marquee-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .embed--marquee.is-marquee-running .embed-marquee__track {
    animation: none !important;
  }
  .embed--marquee-y.is-marquee-running .embed-scroll {
    overflow-y: auto;
    mask-image: none;
  }
  .embed--marquee-x.is-marquee-running .embed-scroll {
    overflow-x: auto;
    mask-image: none;
  }
}

.embed-comment {
  margin: 0 0 0.55rem;
  flex: 1 1 auto;
}
.embed-comment p {
  margin: 0;
}
.embed-comment.is-clamped .embed-comment__full,
.embed-comment:not(.is-expanded) .embed-comment__full[hidden],
.embed-comment__full[hidden],
.embed-comment__short[hidden] {
  display: none !important;
}
.embed-comment.is-expanded .embed-comment__short {
  display: none !important;
}
.embed-comment.is-expanded .embed-comment__full {
  display: block !important;
}
.embed-more {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.embed-more:hover {
  color: var(--accent);
}

/* Modo leitura: só pausa a animação — mantém os N cards no lugar */
html:has(body.embed.is-reading) {
  height: auto;
  overflow: hidden;
}
.embed--marquee.is-reading {
  height: auto;
  max-height: none;
  overflow: hidden;
}
.embed--marquee.is-reading:not(.embed--no-scrollbar) {
  overflow-y: auto;
}
.embed--marquee.embed--no-scrollbar.is-reading,
.embed--marquee.embed--no-scrollbar.is-reading .embed-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.embed--marquee.embed--no-scrollbar.is-reading::-webkit-scrollbar,
.embed--marquee.embed--no-scrollbar.is-reading .embed-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.embed--marquee.is-reading .embed-scroll {
  overflow: hidden !important;
  mask-image: none !important;
}
.embed--marquee.is-reading .embed-item {
  max-height: none;
  height: auto;
}

/* Horizontal: continua em linha com os mesmos cards visíveis */
.embed--marquee-x.is-reading .embed-marquee__track {
  flex-direction: row;
  flex-wrap: nowrap;
}
.embed--marquee-x.is-reading .embed-marquee__group.embed-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap !important;
  align-items: stretch;
}

/* Vertical: clone pode sumir; lista empilhada */
.embed--marquee-y.is-reading .embed-marquee__group[aria-hidden="true"] {
  display: none !important;
}
.embed--marquee-y.is-reading .embed-marquee__track {
  flex-direction: column;
  width: 100%;
}



