/* Trocar fundo — page dashboard. Does not restyle the site header. */

body.page-trocar-fundo-imagem-online.is-fullscreen .fs-workspace.tbg-fs {
  min-height: 0;
  border: 0;
  background: #f4f7fc;
  padding: 18px 20px 12px;
}

body.page-trocar-fundo-imagem-online .fs-chrome {
  display: none;
}

.tbg-app {
  --tbg-ink: #172554;
  --tbg-body: #3d4d6a;
  --tbg-muted: #64748b;
  --tbg-card: #fff;
  --tbg-line: #e4ebf5;
  --tbg-soft: #f3f6fb;
  --tbg-blue: #2f6fed;
  --tbg-blue-soft: #e8f0ff;
  --tbg-green: #16a34a;
  box-sizing: border-box;
  width: min(1440px, 100%);
  margin: 0 auto;
  color: var(--tbg-body);
  font-size: 15px;
  line-height: 1.45;
}

.tbg-app *,
.tbg-app *::before,
.tbg-app *::after {
  box-sizing: border-box;
}

.tbg-app p,
.tbg-app h1,
.tbg-app h2,
.tbg-app ul,
.tbg-app ol,
.tbg-app dl,
.tbg-app dd,
.tbg-app dt {
  margin: 0;
  text-align: left;
}

.tbg-app ul,
.tbg-app ol,
.tbg-app li {
  padding: 0;
  list-style: none;
}

.article .tbg-app li::before,
.thecontent .tbg-app li::before {
  content: none;
}

.tbg-app button,
.tbg-app input,
.tbg-app select {
  font: inherit;
}

.tbg-app input,
.tbg-app select {
  color: inherit;
}

.tbg-app svg {
  display: block;
  max-width: none;
  flex: none;
}

.tbg-app svg[width="16"] { width: 16px; height: 16px; }
.tbg-app svg[width="18"] { width: 18px; height: 18px; }
.tbg-app svg[width="20"] { width: 20px; height: 20px; }
.tbg-app svg[width="32"] { width: 32px; height: 32px; }

.tbg-app fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.tbg-app fieldset:disabled {
  opacity: 0.72;
}

.tbg-app .rbg-rail-group,
.tbg-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tbg-app .rbg-bg-chip[data-bg="image"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.tbg-sr,
.tbg-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tbg-file {
  opacity: 0;
  pointer-events: none;
}

.tbg-app [hidden] {
  display: none !important;
}

.tbg-app #rbg-drop[hidden] {
  display: flex !important;
}

/* Hero */
.tbg-hero {
  display: flex;
  align-items: center;
  gap: 18px 28px;
  margin-bottom: 16px;
}

.tbg-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.tbg-hero-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--tbg-blue-soft);
  color: var(--tbg-blue);
}

.article .tbg-app h1.tbg-title,
.tbg-app h1.tbg-title {
  margin: 0;
  color: var(--tbg-ink);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tbg-lede {
  margin-top: 4px;
  max-width: 62ch;
  color: var(--tbg-body);
  font-size: 1.02rem;
}

.tbg-app .tbg-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-left: auto;
}

.tbg-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tbg-perk-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tbg-blue-soft);
  color: var(--tbg-blue);
}

.tbg-perks strong,
.tbg-perks span span {
  display: block;
}

.tbg-perks strong {
  color: var(--tbg-ink);
  font-size: 0.92rem;
}

.tbg-perks span span {
  color: var(--tbg-muted);
  font-size: 0.78rem;
}

/* Grid */
.tbg-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) minmax(240px, 280px);
  gap: 14px;
  align-items: stretch;
}

.tbg-card {
  background: var(--tbg-card);
  border: 1px solid var(--tbg-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(23, 37, 84, 0.04);
}

.tbg-options,
.tbg-stage-card,
.tbg-side {
  min-width: 0;
}

.tbg-options,
.tbg-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article .tbg-app h2.tbg-step,
.tbg-app h2.tbg-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--tbg-ink);
  font-size: 1rem;
  font-weight: 800;
}

.tbg-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tbg-blue);
  color: #fff;
  font-size: 0.82rem;
}

.tbg-label {
  color: var(--tbg-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.tbg-hint {
  color: var(--tbg-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tbg-select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--tbg-line);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px;
  color: var(--tbg-ink);
  appearance: none;
}

.tbg-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 14px;
  border: 1.5px dashed #c5d4ee;
  border-radius: 16px;
  background: #f8fbff;
  text-align: center;
  cursor: pointer;
}

.tbg-drop-ico {
  color: #93a4c3;
}

.tbg-drop-title {
  color: var(--tbg-ink);
  font-weight: 800;
}

.tbg-drop-hint {
  color: var(--tbg-muted);
  font-size: 0.78rem;
}

.tbg-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--tbg-soft);
  color: var(--tbg-ink);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.tbg-btn-block { width: 100%; }
.tbg-btn-primary { background: var(--tbg-blue); color: #fff; }
.tbg-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.tbg-btn-green { background: var(--tbg-green); color: #fff; }
.tbg-btn-green:hover:not(:disabled) { background: #15803d; }

.tbg-btn-line {
  background: #fff;
  border-color: var(--tbg-line);
  color: var(--tbg-ink);
}

.tbg-btn-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.tbg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tbg-app .rbg-btn-label-short { display: none; }

.tbg-app #rbg-btn-run-all { display: none; }
.tbg-app:has(#rbg-batch-list > li + li) #rbg-btn-run-all { display: inline-flex; }

.tbg-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tbg-blue);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.tbg-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tbg-quiet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tbg-app #rbg-status {
  min-height: 1.2em;
  color: var(--tbg-muted);
  font-size: 0.82rem;
}

.tbg-app #rbg-status.is-error { color: #b91c1c; }
.tbg-app #rbg-status.is-ok { color: #15803d; }
.tbg-app #rbg-status.is-loading { color: var(--tbg-blue); }

.tbg-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.tbg-mode {
  appearance: none;
  min-height: 36px;
  padding: 4px 2px;
  border: 1px solid var(--tbg-line);
  border-radius: 10px;
  background: #fff;
  color: var(--tbg-muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.tbg-mode.is-on {
  border-color: transparent;
  background: var(--tbg-blue-soft);
  color: var(--tbg-blue);
}

.tbg-swatches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tbg-app .rbg-bg-chip {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tbg-muted);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}

.tbg-sw {
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(23, 37, 84, 0.12);
}

.tbg-app .rbg-bg-chip.is-active .tbg-sw {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--tbg-blue);
}

.tbg-app .rbg-bg-chip[data-bg="transparent"] .tbg-sw {
  background-color: #f4f6fb;
  background-image:
    linear-gradient(45deg, #e6ebf4 25%, transparent 25%),
    linear-gradient(-45deg, #e6ebf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6ebf4 75%),
    linear-gradient(-45deg, transparent 75%, #e6ebf4 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.tbg-app .rbg-bg-chip[data-bg="white"] .tbg-sw { background: #fff; }
.tbg-app .rbg-bg-chip[data-bg="black"] .tbg-sw { background: #111827; }
.tbg-app .rbg-bg-chip[data-color="#f2f2f2"] .tbg-sw { background: #d1d5db; }
.tbg-app .rbg-bg-chip[data-color="#ef4444"] .tbg-sw { background: #ef4444; }
.tbg-app .rbg-bg-chip[data-color="#16a34a"] .tbg-sw { background: #16a34a; }
.tbg-app .rbg-bg-chip[data-color="#2563eb"] .tbg-sw { background: #2563eb; }
.tbg-app .rbg-bg-chip[data-bg="color"]:not([data-color]) .tbg-sw {
  background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444);
}
.tbg-app .rbg-bg-chip[data-bg="image"] .tbg-sw {
  background: var(--tbg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M5 5h9.2L19 9.8V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zm2 8.2 2.1 2.5L11.6 13 16 17H7z'/%3E%3C/svg%3E") center / 22px no-repeat;
}

.tbg-color-row,
.tbg-image-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tbg-app input[type="color"]#rbg-bg-color {
  width: 100%;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--tbg-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.tbg-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
}

.tbg-app input[type="range"].tbg-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tbg-blue) var(--tbg-pct, 50%), #e5eaf2 var(--tbg-pct, 50%));
  cursor: pointer;
}

.tbg-app input[type="range"].tbg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--tbg-blue);
  box-shadow: 0 0 0 1px #c9d8f5;
}

.tbg-app input[type="range"].tbg-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #e5eaf2;
}

.tbg-app input[type="range"].tbg-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--tbg-blue);
}

.tbg-app input[type="range"].tbg-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--tbg-blue);
  box-shadow: 0 0 0 1px #c9d8f5;
}

/* Run buttons stay in view while the options column scrolls past */
.tbg-action-row {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 -16px;
  padding: 10px 16px;
  background: var(--tbg-card);
}

.tbg-slider-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 1px solid var(--tbg-line);
  border-radius: 10px;
  background: var(--tbg-soft);
  color: var(--tbg-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.tbg-advanced {
  border-top: 1px solid var(--tbg-line);
  padding-top: 8px;
}

.tbg-advanced summary {
  color: var(--tbg-ink);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.tbg-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* Stage */
.tbg-stage-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 520px;
}

.tbg-stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.tbg-stage[hidden] { display: none !important; }

.tbg-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.tbg-tab,
.tbg-app .istudio-view-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tbg-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.tbg-tab.is-static,
.tbg-app .istudio-view-btn.is-active {
  background: var(--tbg-blue-soft);
  color: var(--tbg-blue);
}

.tbg-view-host:has(.istudio-view-toggle:not([hidden])) ~ .tbg-tab.is-static {
  display: none;
}

.tbg-app .istudio-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tbg-app .istudio-view-toggle[hidden] { display: none !important; }
.tbg-app .istudio-view-btn[data-view="split"] { order: 0; }
.tbg-app .istudio-view-btn[data-view="slider"] { order: 1; }
.tbg-app .istudio-view-btn svg { display: none; }

.tbg-empty,
.tbg-panes {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.tbg-app:not(.is-empty) .tbg-empty { display: none; }

.tbg-panes:has(#rbg-result-pane:not([hidden])) .tbg-result-ph { display: none; }

.tbg-app .rbg-compare.clr-compare--dual { display: none !important; }

.tbg-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--tbg-line);
  border-radius: 14px;
  background: #fff;
}

.tbg-pane-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tbg-pane-top strong {
  color: var(--tbg-ink);
  font-size: 0.88rem;
}

.tbg-badge {
  max-width: 58%;
  color: var(--tbg-blue);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.tbg-badge:empty { display: none; }

.tbg-frame,
.tbg-app .clr-ba-frame {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #f4f6fb;
  background-image:
    linear-gradient(45deg, #e6ebf4 25%, transparent 25%),
    linear-gradient(-45deg, #e6ebf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6ebf4 75%),
    linear-gradient(-45deg, transparent 75%, #e6ebf4 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.tbg-app .tbg-frame img,
.tbg-app .rbg-pose-fg {
  margin: 0;
}

.tbg-frame img#rbg-preview,
.tbg-frame img#rbg-result {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
}

.tbg-app .rbg-result-wrap.is-posing > #rbg-result {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tbg-app .rbg-result-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbg-app .rbg-pose-stage {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.tbg-app .rbg-pose-stage[hidden] { display: none !important; }

.tbg-app .rbg-pose-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.tbg-app .rbg-pose-fg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}

.tbg-app .rbg-pose-stage.is-dragging .rbg-pose-fg { cursor: grabbing; }

.tbg-pane-foot {
  display: flex;
  justify-content: center;
}

.tbg-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--tbg-line);
  border-radius: 10px;
  background: #fff;
}

.tbg-zoom button {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--tbg-soft);
  color: var(--tbg-ink);
  font-weight: 800;
  cursor: pointer;
}

.tbg-zoom span {
  min-width: 46px;
  color: var(--tbg-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.tbg-app .clr-ba {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  margin: 0;
  user-select: none;
  touch-action: none;
}

.tbg-app .clr-ba[hidden] { display: none !important; }

.tbg-app .clr-ba-frame {
  display: block;
  width: 100%;
  aspect-ratio: var(--ba-ar, 1 / 1);
  max-height: min(62vh, 560px);
  container-type: inline-size;
}

.tbg-app .clr-ba--fit .clr-ba-frame { max-height: none; }

.tbg-app .clr-ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.tbg-app .clr-ba--fit .clr-ba-img { object-fit: fill; }

.tbg-app .clr-ba-clip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #fff;
}

.tbg-app .clr-ba-clip .clr-ba-img--gray {
  width: 100cqi;
  max-width: none;
  left: 0;
  height: 100%;
}

.tbg-app .clr-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.tbg-app .clr-ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
}

.tbg-app .clr-ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--tbg-line);
  border-radius: 50%;
  background: #fff;
  color: var(--tbg-ink);
  font-size: 14px;
  transform: translate(-50%, -50%);
}

.tbg-app .clr-ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
}

.tbg-app .clr-ba-labels {
  display: flex;
  align-self: stretch;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  color: var(--tbg-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tbg-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf2;
}

.tbg-progress-fill {
  height: 100%;
  background: var(--tbg-blue);
}

.tbg-progress-text {
  margin-top: 6px;
  color: var(--tbg-muted);
  font-size: 0.8rem;
}

.tbg-app .tbg-batch:has(.aib-list > :only-child) { display: none !important; }

.tbg-app .aib-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tbg-app .aib-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--tbg-soft);
  cursor: pointer;
}

.tbg-app .aib-item.is-active { outline: 2px solid #b9d0ff; }

.tbg-app .aib-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.tbg-app .aib-name {
  overflow: hidden;
  color: var(--tbg-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbg-app .aib-meta,
.tbg-app .aib-empty {
  color: var(--tbg-muted);
  font-size: 0.75rem;
}

.tbg-app .rbg-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tbg-app .rbg-next-label {
  color: var(--tbg-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.tbg-app .rbg-next-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--tbg-blue-soft);
  color: var(--tbg-blue);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.tbg-dl { display: flex; flex-direction: column; gap: 8px; }

.tbg-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--tbg-ink);
  font-size: 1rem;
  font-weight: 800;
}

.tbg-title-ico {
  display: inline-flex;
  color: var(--tbg-blue);
}

.tbg-info { display: flex; flex-direction: column; gap: 8px; }

.tbg-info div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--tbg-line);
}

.tbg-info dt { color: var(--tbg-muted); font-size: 0.84rem; }
.tbg-info dd { color: var(--tbg-ink); font-size: 0.84rem; font-weight: 800; text-align: right; }

.tbg-tips-card {
  background: #fff8e6;
  border-color: #f3e2b0;
}

.tbg-tips { display: flex; flex-direction: column; gap: 8px; }

.tbg-tips li {
  display: flex;
  gap: 8px;
  color: var(--tbg-body);
  font-size: 0.86rem;
}

.tbg-tips li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: #f5c518 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.4 11.2 3.6 8.4l1.1-1.1 1.7 1.7 4-4 1.1 1.1z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.article .tbg-app .tbg-tips li::before,
.thecontent .tbg-app .tbg-tips li::before {
  content: "";
}

.tbg-app .itool-hist-host { margin-top: 14px; }
.tbg-app .itool-hist-host[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .tbg-grid { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
  .tbg-side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  body.page-trocar-fundo-imagem-online.is-fullscreen .fs-workspace.tbg-fs { padding: 12px; }
  .tbg-hero { flex-direction: column; align-items: flex-start; }
  .tbg-perks { margin-left: 0; }
  .tbg-grid,
  .tbg-side,
  .tbg-empty,
  .tbg-panes { grid-template-columns: 1fr; }
  .tbg-stage-card { height: auto; min-height: 0; }
  .tbg-stage,
  .tbg-empty,
  .tbg-panes,
  .tbg-frame { flex: none; }
  .tbg-frame { min-height: 200px; }
}

html[data-theme="dark"] body.page-trocar-fundo-imagem-online.is-fullscreen .fs-workspace.tbg-fs,
html.dark body.page-trocar-fundo-imagem-online.is-fullscreen .fs-workspace.tbg-fs {
  background: transparent;
}

html[data-theme="dark"] .tbg-app,
html.dark .tbg-app {
  --tbg-ink: var(--dica-ink, #e8eaf0);
  --tbg-body: var(--dica-body, #c5cad6);
  --tbg-muted: var(--dica-muted, #9aa3b5);
  --tbg-card: var(--dica-surface, #171b22);
  --tbg-line: var(--dica-border, #2c3444);
  --tbg-soft: #12161d;
  --tbg-blue-soft: rgba(47, 111, 237, 0.16);
}

html[data-theme="dark"] .tbg-app .tbg-btn-primary,
html.dark .tbg-app .tbg-btn-primary,
html[data-theme="dark"] .tbg-app .tbg-btn-green,
html.dark .tbg-app .tbg-btn-green,
html[data-theme="dark"] .tbg-app .tbg-step-n,
html.dark .tbg-app .tbg-step-n {
  color: #fff;
}

html[data-theme="dark"] .tbg-select,
html.dark .tbg-select,
html[data-theme="dark"] .tbg-btn-line,
html.dark .tbg-btn-line,
html[data-theme="dark"] .tbg-mode,
html.dark .tbg-mode,
html[data-theme="dark"] .tbg-pane,
html.dark .tbg-pane,
html[data-theme="dark"] .tbg-zoom,
html.dark .tbg-zoom {
  background: var(--tbg-card);
  color: var(--tbg-ink);
}

html[data-theme="dark"] .tbg-drop,
html.dark .tbg-drop {
  background: rgba(47, 111, 237, 0.08);
  border-color: #34508a;
}

html[data-theme="dark"] .tbg-tips-card,
html.dark .tbg-tips-card {
  background: rgba(245, 197, 24, 0.1);
  border-color: rgba(245, 197, 24, 0.28);
}

html[data-theme="dark"] .tbg-app input[type="range"].tbg-range::-moz-range-track,
html.dark .tbg-app input[type="range"].tbg-range::-moz-range-track {
  background: #2c3444;
}
