* {
  box-sizing: border-box;
}

:root {
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --azul: #0b3d91;
  --azul-escuro: #072d6e;
  --azul-abaixo: #041a44;
  --verde: #16a34a;
  --verde-escuro: #15803d;
  --amarelo: #facc15;
  --amarelo-claro: #fde047;
  --laranja: #f97316;

  --bg: #f4f6fb;
  --card: #ffffff;
  --card-borda: #e5ecf8;
  --texto: #0f224f;
  --texto-secundario: #4b5b82;
  --texto-terciario: #7a8aae;
  --sombra: 0 12px 40px -14px rgba(7, 45, 110, 0.35);
  --sombra-leve: 0 4px 14px -6px rgba(7, 45, 110, 0.22);
  --raio-grande: 24px;
  --raio-medio: 16px;
  --raio-pequeno: 10px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--texto);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(250, 204, 21, 0.22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(22, 163, 74, 0.18), transparent 60%),
    linear-gradient(180deg, #eef2fb 0%, #f6f9ff 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset-inline: 0;
  height: 8px;
  z-index: 20;
  pointer-events: none;
}

body::before {
  top: 0;
  background: linear-gradient(
    90deg,
    var(--verde) 0%,
    var(--verde) 40%,
    var(--amarelo) 40%,
    var(--amarelo) 70%,
    var(--azul) 70%,
    var(--azul) 100%
  );
}

body::after {
  bottom: 0;
  background: linear-gradient(
    90deg,
    var(--azul) 0%,
    var(--azul) 30%,
    var(--amarelo) 30%,
    var(--amarelo) 60%,
    var(--verde) 60%,
    var(--verde) 100%
  );
}

.app {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.cabecalho-app {
  position: relative;
  overflow: visible;
  padding: 22px 0 0;
  margin-bottom: 22px;
  min-height: 182px;
}

.cabecalho-faixa {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 80px;
  background:
    radial-gradient(900px 220px at 18% 140%, rgba(22, 163, 74, 0.42), transparent 60%),
    radial-gradient(900px 220px at 75% -30%, rgba(22, 163, 74, 0.28), transparent 60%),
    radial-gradient(700px 180px at 32% -20%, rgba(250, 204, 21, 0.24), transparent 60%),
    linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul) 100%);
  box-shadow: var(--sombra-leve);
  z-index: 0;
  pointer-events: none;
}

.cabecalho-app::before,
.cabecalho-app::after {
  display: none;
}

.cabecalho-app .marca,
.cabecalho-app .cabecalho-chamada,
.cabecalho-app .marca-direita {
  position: relative;
  z-index: 2;
}

.cabecalho-app .logos-linha {
  position: relative;
  z-index: 3;
}

.cabecalho-app .marca {
  grid-area: auto;
  position: absolute;
  left: 4px;
  top: 0;
  z-index: 3;
  transform: translateY(-2px);
}

.logos-linha {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cabecalho-app .cabecalho-chamada {
  grid-area: auto;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 150px 0 240px;
  pointer-events: none;
}

.cabecalho-app .marca-direita {
  grid-area: auto;
  position: absolute;
  right: 4px;
  top: 0;
  justify-self: auto;
  z-index: 3;
  transform: translateY(18px);
}

.cabecalho-app .marca-direita {
  margin-left: 0;
}

.marca-slot {
  position: relative;
  isolation: isolate;
}

.marca-slot > * {
  position: relative;
  z-index: 2;
}

.marca-slot::before {
  content: "";
  position: absolute;
  inset: -4px -2px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(3px);
  box-shadow: 0 10px 28px -16px rgba(7, 45, 110, 0.35);
  z-index: 1;
  pointer-events: none;
}

.marca {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.marca-logo-campanha {
  width: 100%;
  max-width: 220px;
  min-width: 0;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 6px 14px -8px rgba(7, 45, 110, 0.55));
}

.marca-direita {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.marca-logo-partido {
  width: 78px;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 2px #fff,
    0 10px 22px -10px rgba(7, 45, 110, 0.55);
  flex: 0 0 auto;
}

.marca-logo-partido img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cabecalho-chamada {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.cabecalho-chamada::after,
.cabecalho-chamada::before {
  display: none;
}

.cabecalho-chamada h1 {
  position: relative;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(2px);
  font-size: clamp(16px, 2.1vw, 22px);
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  line-height: 1.25;
}

.cabecalho-chamada h1 .hl-amarelo {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.96) 0%, rgba(253, 224, 71, 0.96) 100%);
  color: var(--azul-escuro);
  padding: 2px 10px;
  border-radius: 8px;
  font-weight: 900;
  margin: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.cabecalho-chamada p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  line-height: 1.55;
}

header {
  margin-bottom: 20px;
  padding: 24px 26px;
  background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul) 100%);
  border-radius: var(--raio-grande);
  color: #fff;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
}

header::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.22), transparent 65%);
  pointer-events: none;
}

header::before {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -120px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.22), transparent 65%);
  pointer-events: none;
}

header h1 {
  position: relative;
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: 0.2px;
}

header h1 strong {
  color: var(--amarelo);
  font-weight: 900;
}

header p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14.5px;
  max-width: 640px;
  line-height: 1.55;
}

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 380px);
  gap: 22px;
  align-items: start;
  max-width: 100%;
  overflow-x: hidden;
}

.editor > .hint {
  grid-column: 1 / -1;
}

.editor > .canvas-panel { order: 0; }
.editor > .controls-panel { order: 1; }
.editor > .hint { order: 2; }

.canvas-panel {
  display: flex;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.canvas-wrapper {
  width: 100%;
  max-width: 680px;
  max-height: 72vh;
  aspect-ratio: var(--aspect-ratio, 1 / 1);
  height: auto;
  background: #ffffff;
  border-radius: var(--raio-grande);
  overflow: hidden;
  border: 1px solid var(--card-borda);
  box-shadow: var(--sombra);
  position: relative;
}

.canvas-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(11, 61, 145, 0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(11, 61, 145, 0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(11, 61, 145, 0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(11, 61, 145, 0.02) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  z-index: 0;
}

.preview-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: inherit;
  transition: background 0.2s ease;
}

.preview-upload-overlay:hover {
  background: rgba(245, 248, 255, 0.96);
}

.preview-upload-overlay:focus-visible {
  outline: 3px solid #16a34a;
  outline-offset: -6px;
}

.preview-upload-overlay.is-drag-over {
  background: rgba(238, 243, 255, 0.98);
  outline: 3px dashed #0b3d91;
  outline-offset: -14px;
}

.preview-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  max-width: 320px;
}

.preview-upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18) 0%, rgba(22, 163, 74, 0.14) 100%);
  border: 1px dashed rgba(22, 163, 74, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #0b3d91;
  margin-bottom: 8px;
}

.preview-upload-inner strong {
  font-size: 18px;
  color: #072d6e;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.preview-upload-inner > span {
  font-size: 13px;
  color: #4b5b82;
  font-weight: 500;
}

#previewSelectButton {
  margin-top: 4px;
  padding: 11px 22px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #16a34a 0%, #0b3d91 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(11, 61, 145, 0.55);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

#previewSelectButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(11, 61, 145, 0.65);
}

#previewSelectButton:active {
  transform: translateY(0);
}

.preview-upload-inner small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #7a8aae;
  font-weight: 500;
}

.canvas-wrapper.tem-foto .preview-upload-overlay {
  display: none !important;
}

.canvas-wrapper.tem-foto canvas {
  cursor: grab;
}

.side-photo-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--card-borda);
}

.side-photo-section.is-hidden {
  display: none !important;
}

.side-photo-section .file-name {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: rgba(11, 61, 145, 0.05);
  border: 1px solid rgba(11, 61, 145, 0.14);
  border-radius: 14px;
  font-size: 13.5px;
  color: #072d6e;
  font-weight: 500;
}

.side-photo-section .botoes-linha {
  margin-top: 14px;
  gap: 12px;
}

.side-photo-section .botoes-linha .btn {
  flex: 1 1 0;
  justify-content: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  min-height: 46px;
  white-space: nowrap;
}

.mobile-controls {
  display: none;
}

.canvas-panel:not(.tem-foto) .mobile-controls {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

.editor.is-hidden {
  display: none !important;
}

.format-selector.is-hidden {
  display: none !important;
}

.trocar-formato-wrapper {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-borda);
}

.trocar-formato-wrapper .btn {
  width: 100%;
  justify-content: flex-start;
  font-size: 13px;
  padding: 8px 12px;
}

.panel-format-name {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.3px;
  color: var(--azul-escuro);
}

.format-selector {
  background: var(--card);
  border: 1px solid var(--card-borda);
  border-radius: var(--raio-grande);
  padding: 22px;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: var(--sombra);
  margin-bottom: 22px;
}

.format-selector .secao-titulo {
  margin-bottom: 18px;
}

.format-selector .secao-titulo .ico {
  background: linear-gradient(135deg, var(--amarelo) 0%, var(--laranja) 100%);
}

.format-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.format-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 18px 16px;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border: 2px solid #c5d1e8;
  border-radius: var(--raio-medio);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 12px -8px rgba(7, 45, 110, 0.18);
  color: var(--texto);
  width: 100%;
}

.format-card:hover {
  transform: translateY(-2px);
  border-color: var(--verde);
  box-shadow: 0 12px 28px -14px rgba(22, 163, 74, 0.5);
  background: linear-gradient(180deg, #f7fbff 0%, #eff7f1 100%);
}

.format-card:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.35);
  outline-offset: 4px;
  border-color: var(--verde);
}

.format-card.is-selected {
  border-color: var(--azul-escuro);
  background:
    radial-gradient(200% 140% at 0% 0%, rgba(250, 204, 21, 0.12), transparent 60%),
    linear-gradient(180deg, #f5f8ff 0%, #eef3ff 100%);
  box-shadow: 0 12px 28px -12px rgba(7, 45, 110, 0.45);
  position: relative;
}

.format-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--verde) 0%, var(--azul) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--sombra-leve);
}

.format-card-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  background: #eef3ff;
  border: 1px solid #cfe0ff;
  color: #0b3d91;
  letter-spacing: 0.3px;
}

.format-card.is-selected .format-card-icon {
  background: #0b3d91;
  border-color: #072d6e;
  color: #ffffff;
}

.format-card-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 20px;
}

.format-card-content h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--azul-escuro);
  letter-spacing: 0.2px;
}

.format-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.format-card-dim,
.format-card-ratio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-secundario);
  background: #f5f8ff;
  padding: 2px 8px;
  border-radius: 999px;
}

.format-card-ratio {
  background: #fff7d6;
  color: var(--amarelo-escuro, #ca8a04);
}

.format-card-content p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--texto-terciario);
}

@media (min-width: 960px) {
  .canvas-wrapper[data-ratio-wider-or-square="true"] {
    width: 100%;
    max-width: 100%;
  }
}

canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

.controls-panel {
  background: var(--card);
  border: 1px solid var(--card-borda);
  border-radius: var(--raio-grande);
  padding: 18px;
  box-shadow: var(--sombra);
  position: sticky;
  top: 20px;
}

.secao-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--azul-escuro);
}

.secao-titulo .ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--amarelo) 0%, var(--laranja) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--sombra-leve);
}

.secao-titulo h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.drop-zone {
  border: 2px dashed #c5d1e8;
  border-radius: var(--raio-medio);
  min-height: 168px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  background: linear-gradient(180deg, #fbfcff 0%, #f5f8ff 100%);
  color: var(--texto-secundario);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--verde);
  background: linear-gradient(180deg, #effaf1 0%, #e7f7ea 100%);
  transform: translateY(-1px);
  box-shadow: var(--sombra-leve);
}

.drop-zone:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.35);
  outline-offset: 4px;
  border-color: var(--verde);
}

.drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-escuro) 100%);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra-leve);
}

.drop-zone strong {
  font-size: 14px;
  color: var(--texto);
  font-weight: 700;
}

.drop-zone span {
  color: var(--texto-terciario);
  font-size: 12.5px;
}

.drop-zone small {
  color: var(--texto-terciario);
  font-size: 11.5px;
}

.btn,
.drop-zone button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn:hover,
.drop-zone button:hover {
  transform: translateY(-1px);
}

.btn:active,
.drop-zone button:active {
  transform: translateY(0);
}

.btn.btn-principal,
.drop-zone button {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-escuro) 100%);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(21, 128, 61, 0.6);
}

.btn.btn-principal:hover,
.drop-zone button:hover {
  box-shadow: 0 12px 22px -8px rgba(21, 128, 61, 0.75);
}

.btn.btn-amarelo {
  background: linear-gradient(135deg, var(--amarelo) 0%, var(--amarelo-claro) 100%);
  color: var(--azul-escuro);
  box-shadow: 0 8px 18px -8px rgba(250, 204, 21, 0.7);
}

.btn.btn-outline {
  background: transparent;
  border-color: var(--azul-escuro);
  color: var(--azul-escuro);
}

.btn.btn-outline:hover {
  background: rgba(11, 61, 145, 0.06);
}

.btn.btn-outline.claro {
  border-color: #cfd9ef;
  color: var(--texto-secundario);
}

.btn.btn-outline.claro:hover {
  background: #f4f6fb;
  border-color: #b4c3e2;
  color: var(--texto);
}

#fileInput {
  display: none;
}

.file-name {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--raio-pequeno);
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: var(--texto-secundario);
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--card-borda);
}

.file-name::before {
  content: "🖼  ";
  color: var(--verde-escuro);
  font-weight: 700;
}

.ajustes {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--card-borda);
}

.ajustes .secao-titulo .ico {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-escuro) 100%);
}

.ajustes label {
  display: block;
  margin-bottom: 14px;
  color: var(--texto-secundario);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.ajustes label span.valor {
  float: right;
  color: var(--azul-escuro);
  font-weight: 700;
  background: #eef3ff;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}

.ajustes input[type="range"] {
  width: 100%;
  margin-top: 7px;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f5;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ajustes input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--azul-escuro);
  box-shadow: 0 4px 10px -2px rgba(7, 45, 110, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.ajustes input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

.ajustes input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--azul-escuro);
  box-shadow: 0 4px 10px -2px rgba(7, 45, 110, 0.35);
  cursor: pointer;
}

.ajustes input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f5;
}

.botoes-linha {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 4px;
}

.btns-acoes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--card-borda);
}

.btn,
.drop-zone button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.export-button {
  width: 100%;
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 800;
  border-radius: 12px;
  letter-spacing: 0.2px;
}

.clear-button {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 12px;
}

.hint {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(11, 61, 145, 0.12);
  border-radius: 10px;
  color: #072d6e;
  box-shadow: 0 2px 6px -4px rgba(11, 61, 145, 0.18);
}

.hint::before {
  content: "?";
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  background: #072d6e;
  color: #fff !important;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 3px 8px -3px rgba(7, 45, 110, 0.45);
}

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(92vw, 440px);
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 40px 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 30px -12px rgba(7, 45, 110, 0.38),
    0 4px 10px -6px rgba(7, 45, 110, 0.24);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.1px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-14px);
  animation: toast-in 220ms cubic-bezier(.2,.8,.2,1) forwards;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.toast.is-leaving {
  animation: toast-out 240ms ease-in forwards;
}

.toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  margin-top: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.toast-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
}

.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.toast--info {
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(22, 163, 74, 0.45), transparent 60%),
    linear-gradient(135deg, rgba(11, 61, 145, 0.98), rgba(7, 45, 110, 0.98));
}

.toast--info .toast-icon {
  color: #facc15;
}

.toast--aviso {
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(249, 115, 22, 0.42), transparent 60%),
    linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(217, 87, 8, 0.98));
}

.toast--aviso .toast-icon {
  color: #fff7d0;
}

.toast--erro {
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(250, 204, 21, 0.28), transparent 60%),
    linear-gradient(135deg, rgba(185, 28, 28, 0.98), rgba(153, 27, 27, 0.98));
}

.toast--erro .toast-icon {
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (max-width: 959px) {
  .cabecalho-app {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "logos"
      "chamada";
    gap: 14px;
    margin-bottom: 24px;
    min-height: auto;
    padding: 0;
  }

  .cabecalho-app > .logos-linha {
    grid-area: logos;
    background: #ffffff;
    border-radius: 22px;
    padding: 14px 14px;
    box-shadow: 0 10px 28px -18px rgba(7, 45, 110, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
  }

  .cabecalho-app > .logos-linha > * {
    position: relative;
    z-index: 2;
  }

  .cabecalho-faixa,
  .cabecalho-app::before,
  .cabecalho-app::after {
    display: none !important;
  }

  .cabecalho-app .marca,
  .cabecalho-app .cabecalho-chamada,
  .cabecalho-app .marca-direita,
  .cabecalho-app .logos-linha {
    position: static;
    transform: none;
    inset: auto;
    padding: 0;
  }

  .cabecalho-app .logos-linha {
    grid-area: logos;
  }

  .cabecalho-app .logos-linha .marca {
    grid-area: auto;
    position: static;
    left: auto;
    top: auto;
    transform: none;
    flex: 1 1 auto;
    max-width: 74%;
  }

  .cabecalho-app .logos-linha .marca-direita {
    grid-area: auto;
    position: static;
    right: auto;
    top: auto;
    transform: none;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .cabecalho-app .marca-slot {
    isolation: isolate;
    position: relative;
  }

  .cabecalho-app .marca-slot > * {
    position: relative;
    z-index: 2;
  }

  .cabecalho-app .marca-slot::before {
    display: none;
  }

  .cabecalho-app .cabecalho-chamada {
    grid-area: chamada;
    position: relative;
    display: block;
    padding: 0;
    text-align: center;
  }

  .cabecalho-chamada {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .cabecalho-chamada h1 {
    position: relative;
    margin: 0;
    padding: 14px 18px;
    background:
      radial-gradient(600px 180px at 15% 120%, rgba(22, 163, 74, 0.42), transparent 60%),
      radial-gradient(400px 140px at 85% -10%, rgba(22, 163, 74, 0.28), transparent 60%),
      linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul) 100%);
    border-radius: 0;
    border: 0;
    backdrop-filter: none;
    font-size: clamp(16px, 2.2vw, 20px);
    z-index: 1;
  }

  .format-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .format-selector {
    padding: 18px;
  }

  .editor {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    grid-template-columns: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .editor > .controls-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .editor > .canvas-panel { order: 0; }
  .editor > .hint { order: 1; margin-bottom: 6px; }
  .editor > .controls-panel { order: 2; }

  .controls-panel {
    position: static;
    order: 2;
  }

  .controls-panel.tem-foto #dropZone {
    display: none !important;
  }

  .controls-panel.tem-foto .file-name {
    margin-top: 0;
    margin-bottom: 10px;
    padding: 10px 14px;
    background: #f5f8ff;
    border: 1px dashed rgba(11, 61, 145, 0.18);
    border-radius: 14px;
    color: var(--azul-escuro);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .controls-panel.tem-foto .file-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
  }

  .canvas-wrapper {
    max-width: none;
    max-height: 84vh;
  }

  .canvas-panel {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .canvas-panel .canvas-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    aspect-ratio: var(--aspect-ratio, 1 / 1);
    display: block;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 14px;
    padding: 15px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,248,255,0.97) 100%);
    border: 1px solid rgba(207, 224, 255, 0.72);
    box-shadow: 0 14px 30px -20px rgba(7, 45, 110, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    width: min(100%, 720px);
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    position: relative;
  }

  .mobile-controls-grid {
    display: grid;
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(3, 42px);
    gap: 6px;
    padding: 16px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(245,248,255,0.58) 100%);
    border: 1.75px solid rgba(11, 61, 145, 0.82);
    box-shadow: 0 10px 22px -18px rgba(7, 45, 110, 0.55),
                inset 0 1px 0 rgba(255,255,255,0.96);
    position: relative;
  }

  .mobile-controls-grid::after {
    content: "direções";
    position: absolute;
    top: -11px;
    left: 11px;
    background: #fff;
    border: 1px solid rgba(11, 61, 145, 0.68);
    color: #0b3d91;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2.5px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .dpad-btn {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef3ff 0%, #cfe0ff 100%);
    color: #072d6e;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -1px 0 rgba(11, 61, 145, 0.2),
                0 3px 8px -3px rgba(11, 61, 145, 0.3);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform .08s ease, filter .1s ease;
  }

  .dpad-btn:active {
    transform: scale(0.95);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(11, 61, 145, 0.12);
  }

  .dpad-center {
    background: linear-gradient(180deg, #fff7ed 0%, #fde68a 100%);
    color: #713f12;
    font-size: 20px;
    box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.2),
                0 3px 8px -3px rgba(180, 83, 9, 0.36);
  }

  .dpad-spacer { display: block; width: 100%; height: 100%; }

  .mobile-controls-zoom {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 7px;
    padding: 16px 12px 12px;
    min-width: 88px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,251,235,0.58) 100%);
    border: 1.75px solid rgba(217,119,6,0.82);
    box-shadow: 0 10px 22px -18px rgba(146,64,14,0.52),
                inset 0 1px 0 rgba(255,255,255,0.96);
    position: relative;
  }

  .mobile-controls-zoom::after {
    content: "zoom";
    position: absolute;
    top: -11px;
    left: 11px;
    background: #fff;
    border: 1px solid rgba(251, 191, 36, 0.72);
    color: #92400e;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2.5px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .zoom-btn {
    flex: 1 1 0;
    min-height: 58px;
    min-width: 64px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, #eef3ff 0%, #cfe0ff 100%);
    color: #0b3d91;
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    box-shadow: inset 0 -1px 0 rgba(11, 61, 145, 0.2),
                0 3px 10px -3px rgba(11, 61, 145, 0.4);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform .08s ease, filter .1s ease;
  }

  .zoom-btn span[aria-hidden="true"] {
    display: none;
  }

  .zoom-btn:active {
    transform: scale(0.95);
    filter: brightness(1.05);
  }

  .zoom-btn.zoom-in {
    background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%);
    color: #78350f;
    box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.22),
                0 2px 8px -3px rgba(180, 83, 9, 0.4);
  }

  .preview-upload-overlay {
    padding: 14px 18px;
  }

  .preview-upload-inner {
    gap: 6px;
    max-width: min(86%, 520px);
  }

  .preview-upload-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 14px;
    margin-bottom: 2px;
  }

  .preview-upload-inner strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.18px;
  }

  .preview-upload-inner > span {
    font-size: 11px;
  }

  .preview-upload-inner small {
    font-size: 10px;
  }

  #previewSelectButton {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 12px;
    letter-spacing: 0.2px;
  }

  .hint {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    padding: 10px 12px;
    margin-bottom: 6px;
  }
  .hint::before {
    content: "?";
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin-right: 0 !important;
    border-radius: 50% !important;
    background: #072d6e !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 3px 8px -3px rgba(7, 45, 110, 0.45) !important;
  }
  .hint::after {
    content: "Ajuste a imagem com os movimentos de toque (arraste para mover, pinça para ampliar) ou use os botões de MOVER e ZOOM. Depois clique em Salvar foto de Apoio.";
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.55;
    color: #072d6e;
    flex: 1 1 auto;
    min-width: 0;
  }

  .canvas-wrapper {
    max-width: 720px;
  }

  .panel-format-name { font-size: 17px; }
}

@media (min-width: 960px) {
  .cabecalho-chamada h1 {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
    font-size: clamp(16px, 2.1vw, 22px);
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    line-height: 1.25;
  }

  .hint {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    padding: 10px 14px;
    margin-top: 12px;
  }
  .hint::before {
    content: "?";
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin-right: 0 !important;
    border-radius: 50% !important;
    background: #072d6e !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 3px 8px -3px rgba(7, 45, 110, 0.45) !important;
  }
  .hint::after {
    content: "Use o painel de ajustes ou arraste a imagem e use a rolagem do mouse para dar zoom. Depois clique em Salvar foto de Apoio.";
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.55;
    color: #072d6e;
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .format-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .format-selector {
    padding: 16px 14px;
    border-radius: 20px;
  }
  .format-card {
    padding: 14px 14px;
  }
  .format-card-content {
    padding-right: 24px;
  }

  .editor {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    grid-template-columns: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .editor > .controls-panel,
  .editor > .canvas-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .editor > .canvas-panel { order: 0; }
  .editor > .hint { order: 1; }
  .editor > .controls-panel { order: 2; }

  .editor > .hint { margin-bottom: 10px; }

  .app {
    padding: 22px 12px 84px;
  }

  .cabecalho-app {
    gap: 14px;
    margin-bottom: 24px;
  }

  .cabecalho-app > .logos-linha {
    border-radius: 22px;
    padding: 14px 12px 16px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .cabecalho-app > .logos-linha .marca,
  .cabecalho-app > .logos-linha .marca-direita {
    max-width: 100%;
    justify-content: center;
    flex: 1 1 100%;
    width: 100%;
    text-align: center;
  }

  .cabecalho-app > .logos-linha .marca {
    max-width: 92%;
  }

  .cabecalho-app > .logos-linha .marca-direita {
    max-width: 82%;
  }

  .cabecalho-chamada h1 {
    position: relative;
    margin: 0;
    padding: 14px 18px;
    background:
      radial-gradient(600px 180px at 15% 120%, rgba(22, 163, 74, 0.42), transparent 60%),
      radial-gradient(400px 140px at 85% -10%, rgba(250, 204, 21, 0.32), transparent 60%),
      linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul) 100%);
    border-radius: 0;
    border: 0;
    backdrop-filter: none;
    font-size: 16px;
    z-index: 1;
  }

  .cabecalho-chamada p {
    display: block;
    margin: 10px 4px 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.55;
  }

  .controls-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .controls-panel .ajustes {
    display: none !important;
  }

  .controls-panel .botoes-linha + .ajustes,
  section.ajustes {
    display: none !important;
  }

  .canvas-wrapper {
    border-radius: 20px;
    max-height: 88vh;
  }

  .canvas-panel {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }

  .canvas-panel .canvas-wrapper {
    max-width: 100%;
    width: auto;
    min-width: 0;
    max-height: 88vh;
    aspect-ratio: var(--aspect-ratio, 1 / 1);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    border-radius: 20px;
    display: block;
  }

  @supports not (aspect-ratio: 1 / 1) {
    .canvas-panel .canvas-wrapper { width: 100%; }
  }

  .canvas-panel .canvas-wrapper[data-ratio-wider-or-square="true"] {
    width: 100%;
    max-width: 100%;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    padding: 15px 12px 15px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,248,255,0.97) 100%);
    border: 1px solid rgba(207,224,255,0.72);
    box-shadow: 0 14px 30px -20px rgba(7, 45, 110, 0.55),
                inset 0 1px 0 rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    position: relative;
  }

  .mobile-controls-grid {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 6px;
    padding: 16px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(245,248,255,0.58) 100%);
    border: 1.75px solid rgba(11, 61, 145, 0.82);
    box-shadow: 0 10px 22px -18px rgba(7, 45, 110, 0.55),
                inset 0 1px 0 rgba(255,255,255,0.96);
    position: relative;
  }

  .mobile-controls-grid::after {
    content: "mover";
    position: absolute;
    top: -11px;
    left: 11px;
    background: #fff;
    border: 1px solid rgba(11, 61, 145, 0.68);
    color: #0b3d91;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2.5px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .dpad-btn {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef3ff 0%, #cfe0ff 100%);
    color: #072d6e;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -1px 0 rgba(11, 61, 145, 0.2),
                0 3px 8px -3px rgba(11, 61, 145, 0.28);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform .08s ease, filter .1s ease;
  }

  .dpad-btn:active {
    transform: scale(0.95);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(11, 61, 145, 0.12);
  }

  .dpad-center {
    background: linear-gradient(180deg, #fff7ed 0%, #fde68a 100%);
    color: #713f12;
    font-size: 21px;
    box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.22),
                0 3px 8px -3px rgba(180, 83, 9, 0.36);
  }

  .dpad-spacer {
    display: block;
    width: 100%;
    height: 100%;
  }

  .mobile-controls-zoom {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 7px;
    padding: 16px 12px 12px;
    min-width: 88px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,251,235,0.58) 100%);
    border: 1.75px solid rgba(217,119,6,0.82);
    box-shadow: 0 10px 22px -18px rgba(146,64,14,0.52),
                inset 0 1px 0 rgba(255,255,255,0.96);
    position: relative;
  }

  .mobile-controls-zoom::after {
    content: "zoom";
    position: absolute;
    top: -11px;
    left: 11px;
    background: #fff;
    border: 1px solid rgba(251, 191, 36, 0.72);
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2.5px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .zoom-btn {
    flex: 1 1 0;
    min-height: 60px;
    min-width: 64px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, #eef3ff 0%, #cfe0ff 100%);
    color: #0b3d91;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    box-shadow: inset 0 -1px 0 rgba(11, 61, 145, 0.22),
                0 3px 10px -3px rgba(11, 61, 145, 0.4);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform .08s ease, filter .1s ease;
  }

  .zoom-btn span[aria-hidden="true"] {
    display: none;
  }

  .zoom-btn:active {
    transform: scale(0.95);
    filter: brightness(1.05);
  }

  .zoom-btn.zoom-in {
    background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%);
    color: #78350f;
    box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.25),
                0 2px 8px -3px rgba(180, 83, 9, 0.4);
  }

  .botoes-linha {
    flex-direction: column;
  }

  .botoes-linha .btn {
    width: 100%;
  }

  .ajustes label span.valor {
    float: none;
    margin-left: 6px;
  }

  .marca-logo-campanha {
    max-width: 100%;
  }

  .marca-direita {
    justify-content: center;
    flex: 0 0 auto;
  }

  .marca-logo-partido {
    width: 64px;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .preview-upload-overlay {
    padding: 8px 10px;
  }

  .preview-upload-inner {
    gap: 4px;
    max-width: 94%;
  }

  .preview-upload-icon {
    display: flex;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 0;
  }

  .preview-upload-inner strong {
    font-size: 0;
    letter-spacing: 0;
    color: transparent;
    margin: 0;
    line-height: 1.1;
  }

  .preview-upload-inner strong::before {
    content: "Selecione sua imagem";
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    color: #0b3d91;
    letter-spacing: 0.15px;
  }

  .preview-upload-inner > span {
    display: none !important;
  }

  .preview-upload-inner small {
    display: none !important;
  }

  #previewSelectButton {
    padding: 9px 16px;
    font-size: 13px;
    border-radius: 12px;
    letter-spacing: 0.2px;
    margin-top: 2px;
  }

  .hint {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    padding: 9px 11px;
    margin-bottom: 10px;
  }
  .hint::before {
    content: "?";
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    margin-right: 0 !important;
    border-radius: 50% !important;
    background: #072d6e !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 3px 8px -3px rgba(7, 45, 110, 0.45) !important;
  }
  .hint::after {
    content: "Ajuste a imagem com os movimentos de toque (arraste para mover, pinça para ampliar) ou use os controles de MOVER e ZOOM. Depois clique em Salvar foto de Apoio.";
    font-size: 12px;
    line-height: 1.55;
    color: #072d6e;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 500;
  }

  .panel-format-name { font-size: 16px; margin-bottom: 8px; }
}
