    :root {
      --primary-color: #0b3d91;
      --secondary-color: #16a34a;
      --third-color: #ffce00;
      --bg-light: #fff;
      --bg-darker: #b4c7f6;
      --text-darker: #333333;

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

      --azul: #0b3d91;
      --azul-escuro: #072d6e;
      --verde: #16a34a;
      --verde-escuro: #15803d;
      --amarelo: #facc15;
      --amarelo-claro: #fde047;
      --sombra-leve: 0 10px 28px -18px rgba(7, 45, 110, 0.45);
    }
    
    * { box-sizing: border-box; }

    body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      font-family: var(--font-sans);
      color: var(--text-darker);
      display: flex;
      flex-direction: column;
      justify-content: center;
      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: 50;
      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-main {
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 24px 24px 72px;
      max-width: 100%;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }

    /* ========== HEADER ========== */
    .page-header {
      position: relative;
      width: 100%;
      display: block;
      margin-bottom: 28px;
      min-height: 0;
      padding: 0;
      overflow: visible;
    }

    .page-header-faixa {
      position: absolute;
      top: 58px;
      left: 0;
      right: 0;
      height: 96px;
      width: 100%;
      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;
      border-radius: 0;
    }

    .page-header-inner {
      position: relative;
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 0 24px;
      box-sizing: border-box;
      display: grid;
      grid-template-columns: 170px 1fr 130px;
      grid-template-rows: 58px 96px;
      grid-template-areas:
        ".        .        ."
        "campanha headline partido";
      column-gap: 16px;
      min-height: 0;
      z-index: 1;
    }

    .page-header-logos {
      display: contents;
    }

    .brand-slot {
      position: relative;
      isolation: isolate;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .brand-slot > * {
      position: relative;
      z-index: 2;
    }
    .brand-slot::before {
      content: "";
      position: absolute;
      inset: -4px -2px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.86);
      backdrop-filter: blur(3px);
      z-index: 1;
    }

    .brand-left {
      grid-column: 1 / 2;
      grid-row: 1 / 3;
      align-self: end;
      justify-self: start;
      z-index: 3;
      transform: translateY(40px);
      width: 100%;
      max-width: 180px;
    }
    .brand-right {
      grid-column: 3 / 4;
      grid-row: 2 / 3;
      align-self: center;
      justify-self: end;
      z-index: 3;
      transform: translateY(0);
      width: 100%;
      max-width: 120px;
    }
    .brand-right::before { display: none; }

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

    .brand-logo-party {
      /* width: 100%; */
      max-width: 120px;
      max-height: 108px;
      height: auto;
      aspect-ratio: auto;
      border-radius: 14px;
      overflow: hidden;
      background: #fff;
      box-shadow:
        0 0 0 1.5px #fff,
        0 10px 22px -10px rgba(7, 45, 110, 0.55);
      object-fit: contain;
      object-position: center;
      display: block;
    }

    .page-header-headline {
      grid-column: 2 / 3;
      grid-row: 2 / 3;
      align-self: center;
      justify-self: center;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      text-align: center;
      pointer-events: none;
      z-index: 2;
      width: 100%;
      padding: 0 8px;
    }
    .page-header-headline h1 {
      position: relative;
      margin: 0;
      padding: 8px 14px;
      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(14px, 1.8vw, 18px);
      font-weight: 700;
      letter-spacing: 0.2px;
      color: #fff;
      line-height: 1.25;
      max-width: 100%;
      white-space: normal;
    }
    .hl-yellow {
      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;
    }

    /* ========== FOOTER (sentinela) ========== */
    .page-footer {
      height: 40px;
      margin-top: 12px;
      width: 100%;
    }

    @media (max-width: 959px) {
      .app-main { padding: 24px 18px 72px; }
      .page-header-inner { padding: 0 18px; }
    }

    @media (max-width: 768px) {
      .page-header {
        grid-template-columns: 130px 1fr 100px;
        grid-template-rows: 46px 88px;
      }
      .page-header-faixa { top: 46px; height: 88px; margin-top: 0; }
      .page-header-inner {
        grid-template-columns: 130px 1fr 100px;
        grid-template-rows: 46px 88px;
        column-gap: 10px;
        padding: 0 14px;
      }
      .brand-left { transform: translateY(12px); max-width: 130px; }
      .brand-right { transform: translateY(0); max-width: 100px; }
      .brand-right::before { display: none; }
      .brand-logo-campaign { max-width: 130px; }
      .brand-logo-party { max-width: 100px; max-height: 96px; }
      .brand-slot::before { inset: -3px -1px; border-radius: 14px; }
      .page-header-headline h1 { font-size: 14px; padding: 6px 10px; }
    }

    @media (max-width: 560px) {
      .app-main { padding: 22px 12px 84px; }
      .page-header { margin-bottom: 24px; }
      .page-header-inner { padding: 0 12px; }
      .page-header-faixa {
        top: 40px;
        height: 82px;
      }
      .page-header-inner {
        grid-template-columns: 108px 1fr 84px;
        grid-template-rows: 40px 82px;
        column-gap: 8px;
      }
      .brand-left { max-width: 108px; transform: translateY(12px); }
      .brand-right { max-width: 84px; transform: translateY(0); }
      .brand-right::before { display: none; }
      .brand-logo-campaign { max-width: 108px; }
      .brand-logo-party { max-width: 84px; max-height: 90px; }
      .page-header-headline { padding: 0 4px; }
      .page-header-headline h1 { font-size: 12px; padding: 5px 8px; }
      .hl-yellow { padding: 2px 6px; border-radius: 8px; }
    }

    @media (max-width: 380px) {
      .page-header-inner {
        grid-template-columns: 94px 1fr 74px;
        grid-template-rows: 36px 78px;
        column-gap: 6px;
      }
      .page-header-faixa { top: 36px; height: 78px; }
      .brand-left { max-width: 94px; transform: translateY(10px); }
      .brand-right { max-width: 74px; transform: translateY(0); }
      .brand-right::before { display: none; }
      .brand-logo-campaign { max-width: 94px; }
      .brand-logo-party { max-width: 74px; max-height: 86px; }
      .page-header-headline h1 { font-size: 11px; padding: 4px 6px; }
    }

    .app-container {
      width: 100%;
      max-width: 440px;
      padding: 15px;
      position: relative;
      align-self: center;
      margin: 0 auto;
    }

    .btn-voltar {
      display: inline-block;
      margin-bottom: 15px;
      color: var(--primary-color);
      text-decoration: none;
      font-size: 13px;
      font-weight: bold;
    }

    .help-block {
      margin-bottom: 22px;
      text-align: center;
    }
    .help-text {
      margin: 0 0 14px;
      padding: 16px;
      background: #ffffff;
      border-radius: 9px;
      font-size: 14px;
      line-height: 1.55;
      font-weight: 500;
      color: #0f224f;
    }
    .help-text strong {
      font-weight: 800;
      color: var(--azul-escuro);
    }
    .help-cta {
      margin: 0;
      font-size: 17px;
      line-height: 1.4;
      font-weight: 700;
      color: var(--text-darker);
    }
    .help-cta .hl-yellow {
      font-size: 18px;
      font-weight: 900;
    }

    @media (max-width: 560px) {
      .help-text { font-size: 13px; margin-bottom: 12px; padding: 14px; }
      .help-cta { font-size: 15px; }
      .help-cta .hl-yellow { font-size: 16px; }
    }

    @media (max-width: 380px) {
      .help-text { font-size: 12px; line-height: 1.5; margin-bottom: 10px; padding: 12px; }
      .help-cta { font-size: 14px; }
      .help-cta .hl-yellow { font-size: 15px; }
    }

    .export-wrapper {
      width: 100%;
      display: flex;
      justify-content: center;
      overflow: hidden;
    }

    .export-area {
      width: 400px;
      min-height: 620px;
      background-color: var(--bg-light);
      position: relative;
      overflow: visible;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      border: 1px solid #ccc;
    }

    @media (max-width: 420px) {
      .export-area {
        transform: scale(0.85);
        transform-origin: top center;
        margin-bottom: -95px;
      }
    }
    @media (max-width: 360px) {
      .export-area {
        transform: scale(0.75);
        margin-bottom: -155px;
      }
    }

    .top-header {
      width: 100%;
      flex-shrink: 0;
    }
    .top-header img { width: 100%; height: auto; display: block; flex-shrink: 0; }

    .legal-vertical {
      position: absolute;
      right: -120px;
      top: 45%;
      transform: rotate(-90deg);
      font-size: 6.5px;
      color: #888;
      width: 290px;
      text-align: center;
      letter-spacing: 0.5px;
    }

    .main-content {
      flex: 1;
      padding: 15px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 16px;
      position: relative;
    }

    .candidate-row {
      display: flex;
      gap: 10px;
      align-items: flex-end;
    }

    .photo-box {
      width: 40px;
      height: 55px;
      background: var(--bg-darker);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }
    .photo-box img { width: 100%; height: 100%; object-fit: cover; }
    .search-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--primary-color); opacity: 0.5; }

    .info-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }

    .role-header {
      font-size: 10px;
      font-weight: 900;
      color: var(--text-darker);
      text-transform: uppercase;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .role-header .c-nome { color: var(--primary-color); font-size: 10px; }
    .role-header .c-partido { font-weight: normal; font-size: 8px; color: #555; }

    .action-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .digit-container { display: flex; gap: 4px; position: relative; }

    .digit-box {
      width: 34px;
      height: 42px;
      background: var(--primary-color);
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      font-weight: 900;
      color: #fff; 
      transition: background-color 0.1s;
    }

    .box-destaque { color: var(--third-color); }

    .digit-box.current {
      background: #08387a;
      border: 2px solid var(--third-color);
    }

    .hidden-input {
      position: absolute;
      top: 0; left: 0; width: 100%; height: 100%;
      opacity: 0; cursor: pointer; z-index: 10;
    }

    .btn-confirma {
      background: linear-gradient(135deg, var(--verde) 0%, var(--verde-escuro) 100%);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
      padding: 4px 10px;
      border-radius: 12px;
      letter-spacing: 0.5px;
      box-shadow: 0 4px 12px -6px rgba(21, 128, 61, 0.7);
    }

    .footer-santinho {
      text-align: center;
      font-size: 9px;
      color: #666;
      padding-bottom: 5px;
      background: var(--bg-light);
    }

    .bottom-bar {
      width: 100%;
      margin-top: auto;
      flex-shrink: 0;
    }
    .bottom-bar img { width: 100%; height: auto; display: block; }

    .badge {
      position: absolute;
      bottom: 70px;
      right: 8px;
      width: 110px; 
      height: 110px;
      z-index: 20;
    }
    .badge img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .btn-acao {
      width: 100%; padding: 15px; border-radius: 12px;
      font-size: 14px; font-weight: 900; cursor: pointer;
      margin-bottom: 10px; text-align: center; border: none;
      text-transform: uppercase; transition: transform 0.12s ease, box-shadow 0.18s ease;
      letter-spacing: 0.3px;
    }
    .btn-acao:hover { transform: translateY(-1px); }
    .btn-acao:active { transform: scale(0.98); }
    .btn-primary {
      background: linear-gradient(135deg, var(--verde) 0%, var(--verde-escuro) 100%);
      color: #fff;
      box-shadow: 0 8px 20px -8px rgba(21, 128, 61, 0.65);
    }
    .btn-secondary {
      background: transparent;
      border: 2px solid var(--primary-color);
      color: var(--primary-color);
    }
    .btn-secondary:hover {
      background: rgba(11, 61, 145, 0.06);
    }
