/* Melhorar resolução. Page dashboard. Does not restyle the site header. */

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

body.page-melhorar-resolucao-imagem-online .fs-chrome {
  display: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.ups-select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--ups-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(--ups-ink);
  appearance: none;
}

.ups-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;
}

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

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

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

.ups-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(--ups-soft);
  color: var(--ups-ink);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.ups-app .rbg-bg-chip[data-bg="transparent"] .ups-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;
}

.ups-app .rbg-bg-chip[data-bg="white"] .ups-sw { background: #fff; }
.ups-app .rbg-bg-chip[data-bg="black"] .ups-sw { background: #111827; }
.ups-app .rbg-bg-chip[data-color="#f2f2f2"] .ups-sw { background: #d1d5db; }
.ups-app .rbg-bg-chip[data-color="#ef4444"] .ups-sw { background: #ef4444; }
.ups-app .rbg-bg-chip[data-color="#16a34a"] .ups-sw { background: #16a34a; }
.ups-app .rbg-bg-chip[data-color="#2563eb"] .ups-sw { background: #2563eb; }
.ups-app .rbg-bg-chip[data-bg="color"]:not([data-color]) .ups-sw {
  background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444);
}
.ups-app .rbg-bg-chip[data-bg="image"] .ups-sw {
  background: var(--ups-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;
}

.ups-app .rbg-bg-chip[data-bg="color"]:not([data-color]),
.ups-app .rbg-bg-chip[data-bg="image"] {
  grid-column: span 2;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--ups-line);
  border-radius: 12px;
  font-size: 0.78rem;
  text-align: left;
}

.ups-app .rbg-bg-chip[data-bg="color"]:not([data-color]) .ups-sw,
.ups-app .rbg-bg-chip[data-bg="image"] .ups-sw {
  width: 34px;
  height: 34px;
  aspect-ratio: 1;
  flex: none;
}

.ups-app .rbg-bg-chip.is-active[data-bg="color"]:not([data-color]),
.ups-app .rbg-bg-chip.is-active[data-bg="image"] {
  border-color: var(--ups-blue);
  background: var(--ups-blue-soft);
  color: var(--ups-blue);
}

.ups-app #rbg-bg-color-field {
  display: none !important;
}

.ups-app:has(.rbg-bg-chip[data-bg="color"]:not([data-color]).is-active) #rbg-bg-color-field {
  display: flex !important;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.ups-tab,
.ups-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(--ups-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.ups-frame,
.ups-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;
}

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

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

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

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

.ups-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;
}

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

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

.ups-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;
}

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

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

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

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

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

.ups-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;
}

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

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

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

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

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

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

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

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

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

.ups-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(--ups-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ups-ink);
  font-size: 14px;
  transform: translate(-50%, -50%);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.ups-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 .ups-app .ups-tips li::before,
.thecontent .ups-app .ups-tips li::before {
  content: "";
}

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

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

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

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

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

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

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

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

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

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

.ups-modes-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.article .ups-app img,
.ups-app img { margin: 0; }

.ups-app .ups-drop p { text-align: center; }

.ups-app .ups-drop.is-dragover {
  border-color: var(--ups-blue);
  background: var(--ups-blue-soft);
}

.ups-frame,
.ups-app .clr-ba-frame {
  background-image: none;
  background-color: #f3f6fb;
}

.ups-btn-green > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.ups-grid { align-items: start; }

.article .ups-app h2.ups-card-title,
.ups-app h2.ups-card-title {
  font-size: 1rem;
  line-height: 1.25;
}

.ups-stage-card { height: auto; min-height: 0; }
.ups-stage,
.ups-empty,
.ups-panes { flex: none; }
.ups-pane { height: auto; }
.ups-frame,
.ups-app .clr-ba-frame {
  flex: none;
  height: 380px;
  min-height: 280px;
}

.ups-pane-top { align-items: center; }
.ups-badge {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 800px) {
  .ups-frame,
  .ups-app .clr-ba-frame { height: 220px; min-height: 200px; }
}

/* Mockup pass: icon chips, pill badges, pane footers, download menu, info icons */
.ups-app h1.ups-title { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.ups-lede { max-width: none; font-size: 1.05rem; }
.ups-hero-ico { width: 72px; height: 72px; border-radius: 20px; }

.ups-mode {
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.ups-mode-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ups-modes:not(.ups-modes-2) { grid-template-columns: 1.9fr 1fr 1.2fr; }

.ups-mode.is-on {
  border-color: #b9d0ff;
  background: var(--ups-blue-soft);
}

.ups-btn-primary#up-btn-run {
  min-height: 50px;
  font-size: 1.02rem;
  border-radius: 12px;
}

.ups-pane-top strong { font-size: 0.95rem; }
.ups-pane-top strong span { font-weight: 700; }

.ups-badge {
  max-width: 62%;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--ups-soft);
  color: var(--ups-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.ups-pane-foot {
  justify-content: flex-start;
  gap: 8px;
}

.ups-zoom {
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ups-zoom button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ups-line);
  background: #fff;
  font-size: 1rem;
}

.ups-zoom span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  border: 1px solid var(--ups-line);
  border-radius: 8px;
  background: #fff;
}

.ups-full {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--ups-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ups-ink);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.ups-full:hover,
.ups-zoom button:hover { background: var(--ups-blue-soft); }

.ups-frame,
.ups-app .clr-ba-frame { height: 440px; }

.ups-frame:fullscreen { height: 100%; background: #0b1020; }

.ups-btn-outline {
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  border: 1.5px solid #9bbcf5;
  background: #fff;
  color: var(--ups-blue);
}

.ups-btn-outline:hover:not(:disabled) { background: var(--ups-blue-soft); }
.ups-btn-outline > span { flex: 1; text-align: left; }
.ups-btn-outline .ups-chev { margin-left: auto; }

.ups-dl .ups-btn-green {
  justify-content: flex-start;
  min-height: 62px;
  padding: 0 18px;
  gap: 14px;
}

.ups-dl .ups-btn-green svg { width: 22px; height: 22px; }

.ups-menu { position: relative; }

.ups-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--ups-line);
  border-radius: 12px;
  background: var(--ups-card);
  box-shadow: 0 12px 28px rgba(23, 37, 84, 0.16);
}

.ups-menu-list[hidden] { display: none !important; }

.ups-menu-list button {
  appearance: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ups-ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.ups-menu-list button:hover { background: var(--ups-blue-soft); }
.ups-menu-list small { color: var(--ups-muted); font-size: 0.72rem; font-weight: 600; }

.ups-title-ico-fill,
.ups-title-ico-fill svg { color: var(--ups-blue); }
.ups-title-ico-amber { color: #f5b800; }

.ups-info dt {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ups-info dt svg { color: #6b7a99; }

.ups-info div:last-child { border-bottom: 0; padding-bottom: 0; }

.ups-tips li { font-size: 0.84rem; }

.ups-advanced summary { padding: 4px 0; }

@media (max-width: 800px) {
  .ups-frame,
  .ups-app .clr-ba-frame { height: 260px; }
  .ups-modes:not(.ups-modes-2) { grid-template-columns: 1fr 1fr 1fr; }
}

html[data-theme="dark"] .ups-badge,
html.dark .ups-badge,
html[data-theme="dark"] .ups-zoom button,
html.dark .ups-zoom button,
html[data-theme="dark"] .ups-zoom span,
html.dark .ups-zoom span,
html[data-theme="dark"] .ups-full,
html.dark .ups-full,
html[data-theme="dark"] .ups-btn-outline,
html.dark .ups-btn-outline {
  background: var(--ups-card);
  color: var(--ups-ink);
}

html[data-theme="dark"] .ups-badge,
html.dark .ups-badge { background: var(--ups-soft); color: var(--ups-muted); }
html[data-theme="dark"] .ups-btn-outline,
html.dark .ups-btn-outline { color: #8fb4ff; }

.ups-app h2.ups-card-title { font-size: 1.12rem; }
.ups-hero-main { flex: 1 1 auto; }
.ups-app .ups-perks { flex: none; flex-wrap: nowrap; gap: 16px 24px; }

@media (max-width: 1100px) {
  .ups-app .ups-perks { flex-wrap: wrap; }
}
