:root {
      --bg: #f5f5f5;
      --fg: #454839;
      --font: #222;
      --accent: #888;
      --table-header: #e0e0e0;
      --table-row: #fff;
      --border: #bbb;
      --button-bg: #809b41;
      --button-fg: #fff;
      --button-hover: #53652a;
    }
    body {
      font-family: 'Segoe UI', sans-serif;
      margin: 0;
      padding: 0;
      background: var(--bg);
      color: var(--font);
      transition: background 0.2s, color 0.2s;
    }
    header {
      background: var(--fg);
      color: var(--bg);
      padding: 1rem;
      text-align: center;
      letter-spacing: 2px;
    }
    main {
      max-width: 75vw;
      margin: 2rem auto;
      padding: 1rem;
      background: var(--table-row);
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    }
    h1, h2 {
      text-align: center;
      font-weight: 400;
      letter-spacing: 1px;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5rem 0 1rem 0;
      background: var(--table-row);
    }
    th, td {
      border: 1px solid var(--border);
      padding: 0.7rem 0.5rem;
      text-align: center;
      font-size: 1rem;
      transition: background 0.2s, color 0.2s;
    }
    th {
      background: var(--table-header);
      font-weight: 500;
      letter-spacing: 1px;
    }
    .nome-colorido {
      padding: 0.2em 0.7em;
      border-radius: 5px;
      color: #fff;
      font-weight: bold;
      display: inline-block;
      margin: 0.1em 0.2em;
      line-height: 2.2;
      transition: background 0.2s, color 0.2s;
    }
    .error {
      color: #c00;
      font-weight: bold;
      text-align: center;
      margin-top: 1rem;
    }
    .info {
      color: var(--accent);
      font-weight: bold;
      text-align: center;
      margin-top: 1rem;
    }
    input, select {
      padding: 4px;
      font-size: 14px;
      border-radius: 4px;
      border: 1px solid var(--border);
      background: var(--table-row);
      color: var(--font);
      margin: 0 2px;
    }
    input[type="number"] {
      width: 60px;
    }
    .config-box {
      display: flex;
      flex-wrap: wrap;
      gap: 1.2rem;
      margin-bottom: 1.2rem;
      align-items: center;
      justify-content: center;
    }
    .config-box label {
      margin-right: 0.5rem;
      font-size: 1rem;
    }
    button {
      background: var(--button-bg);
      color: var(--button-fg);
      border: none;
      border-radius: 4px;
      padding: 0.6em 1.2em;
      font-size: 1rem;
      margin: 0.2em 0.5em;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
      letter-spacing: 1px;
    }
    button:hover {
      background: var(--button-hover);
    }
    .actions {
      display: flex;
      gap: 1rem;
      justify-content: center;
      margin-bottom: 1.2rem;
      flex-wrap: wrap;
    }
    .download-actions {
      display: flex;
      gap: 1rem;
      justify-content: center;
      margin-bottom: 1.2rem;
      flex-wrap: wrap;
    }
    @media (max-width: 700px) {
      main { padding: 0.5rem; }
      .config-box { flex-direction: column; gap: 0.5rem; }
      .actions, .download-actions { flex-direction: column; gap: 0.5rem; }
      th, td { font-size: 0.95rem; padding: 0.5rem 0.2rem; }
    }
    @media print {
      body * {
        visibility: hidden !important;
      }
      #escala-table, #escala-table * {
        visibility: visible !important;
      }
      #escala-table {
        position: absolute !important;
        left: 0; top: 0;
        width: 100% !important;
        margin: 0 !important;
      }
      /* Opcional: título */
      h2, h2 * {
        visibility: visible !important;
        position: absolute !important;
        top: 0; left: 0;
        width: 100%;
        text-align: center;
        margin-top: 0;
      }
    }
    /* Estilo para o header do CHUCHU */
.chuchu-header {
  text-align: left;
  margin-bottom: 1.5em;
}

.chuchu-header-main {
  display: flex;
  align-items: center;
}

.chuchu-logo {
  height: 6em;
  margin-right: 0.5em;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
}

.chuchu-title {
  font-size: 6em;
  font-weight: bold;
  line-height: 1;
  vertical-align: middle;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.chuchu-subtitle {
  font-size: 1.5em;
  vertical-align: middle;
  display: inline-block;
  margin-left: 4.5em;
  margin-top: 0.2em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.10);
}