
    body {
      font-family: Arial, sans-serif;
      background: #f2f2f2;
      padding: clamp(16px, 5vw, 40px);
      margin: 0;
      color: #000;
      overflow-x: hidden;
    }

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

#advancedPanels {
  display: contents;
}

#advancedPanels .inputs {
  grid-column: 1;
}

.initial-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
  background: #f6f8fb;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 32px;
}

.initial-controls__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #111;
}

.initial-controls .input-grid {
  margin-bottom: 0;
}

.initial-controls__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.initial-controls__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.initial-controls__label {
  font-weight: 600;
  color: #1f2937;
}

.initial-controls__item--action {
  justify-content: center;
}

.initial-controls__button {
  margin-top: 0;
}
    label { font-weight: bold; }
    .inputs > label { display: block; margin-top: 20px; }
    input[type="time"],
    .inputs input[type="text"] {
      margin-top: 8px;
      width: 100%;
      max-width: 280px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid #d9d9d9;
      font-size: 16px;
      box-sizing: border-box;
    }
      input[type="checkbox"] { width: 18px; height: 18px; }
    .cards { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
    .card { flex: 1 1 200px; background-color: white; border-left: 6px solid #4a90e2; padding: 20px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .card .icon { font-size: 24px; margin-bottom: 10px; }
    .card .time { font-size: 18px; font-weight: bold; color: #000; margin-bottom: 5px; }
    .card .title { font-size: 14px; font-weight: normal; color: #555; }
    table { width: 100%; border-collapse: collapse; margin-top: 30px; }
    table, th, td { border: 1px solid #000; }
    th, td { padding: 10px; text-align: left; }
    th { background-color: #f2f2f2; }
    #exportCSVBtn, #exportPDFBtn { margin-top: 20px; padding: 10px 20px; background: #000; color: white; border: none; border-radius: 3px; cursor: pointer; margin-right: 5px; }
    #summary {
      margin-top: 20px;
      font-weight: bold;
    }
    .lunch { color: #d9534f; font-weight: bold; background-color: #fdecea; }
    .out { color: #5cb85c; font-weight: bold; background-color: #e8f5e9; }
    .wrap { color: #e67e22; font-weight: bold; background-color: #fdf2e9; }
    .setup-inicial { color: #9b59b6; font-weight: bold; background-color: #f5e8f7; }
    .shoot { color: #333; font-weight: bold; background-color: #f9f9f9; }
    .parallel { background-color: #e8f4ff; }
    .double-crew { background-color: #eae0ff; color:#6a0dad; font-weight:bold; }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 20px;
      width: 100%;
    }

    .schedule-sentinel {
      width: 100%;
      height: 1px;
    }

    @media (max-width: 600px) {
      body {
        padding: 20px 16px;
      }

      .inputs {
        padding: 24px 20px;
        margin: 0;
      }

      .layout {
        gap: 16px;
        padding: 0;
      }
    }

    @media (max-width: 480px) {
      .initial-controls__grid,
      .scenario-results {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (min-width: 600px) {
      .layout {
        grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
        align-items: flex-start;
      }
      .layout.layout--initial-only {
        grid-template-columns: minmax(0, 1fr);
      }
      .inputs {
        margin: 0;
        max-width: none;
      }
      .inputs--initial {
        grid-column: 1 / -1;
      }
      .schedule-wrapper {
        grid-column: 2;
      }
      .cards {
        position: sticky;
        top: 40px;
        align-self: start;
      }
      .cards.cards--released {
        position: static;
        top: auto;
      }
    }

    @media (min-width: 1024px) {
      .initial-controls__grid {
        grid-template-columns: repeat(5, minmax(180px, 1fr));
      }
      .initial-controls__item {
        height: 100%;
      }
    }

    @media (min-width: 1200px) {
      .layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
        align-items: flex-start;
        min-height: calc(100vh - 80px);
      }
      .layout.layout--initial-only {
        grid-template-columns: minmax(0, 1fr);
      }
      .schedule-wrapper {
        grid-column: span 1;
      }
      .schedule-sentinel {
        display: none;
      }
      .cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        position: sticky;
        top: 40px;
        align-self: start;
      }
      .inputs,
      .schedule-wrapper {
        max-height: calc(100vh - 80px);
        min-height: 0;
        overflow-y: auto;
        box-sizing: border-box; /* include padding in the scrollable area */
      }
      .inputs {
        margin: 0;
        padding-bottom: calc(32px + 3rem); /* maintain base padding with extra breathing room */
      }
      .schedule-wrapper {
        margin: 0;
        padding-right: 16px;
      }
    }

.inputs {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.inputs--initial {
  max-width: none;
  width: 100%;
}

.schedule-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.inputs h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 24px;
}

.input-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: #333333;
}

.input-warning {
  display: none;
  color: #d9534f;
  font-size: 12px;
  margin-top: 6px;
}

.input-label {
  font-weight: 600;
}

.numeric-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #f7f7f7;
  padding: 8px 14px;
  border-radius: 999px;
}

.numeric-control input[type="number"] {
  width: 56px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: #111;
  outline: none;
}

.initial-controls__item .numeric-control {
  align-self: center;
}

.numeric-control input[type="number"]::-webkit-outer-spin-button,
.numeric-control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.numeric-control input[type="number"] {
  -moz-appearance: textfield;
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #e6e6e6;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.control-btn:hover {
  background: #d1d1d1;
}

.control-btn:active {
  background: #c5c5c5;
}

.scenario-results {
  margin-top: 32px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.scenario-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.scenario-card__metrics {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  font-size: 14px;
}

.scenario-card__action {
  margin-top: auto;
  width: 100%;
}

.scenario-results__loading,
.scenario-results__empty {
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  color: #475569;
  text-align: center;
}

.section-divider {
  margin: 24px 0 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #888;
}

  .dynamic-inputs {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .dynamic-inputs__title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin: 0;
  }

  .dynamic-inputs__hint {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin: -12px 0 0;
  }

  .scene-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .scene-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 22px 45px rgba(17, 24, 39, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .scene-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #111;
  }

  .scene-card__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .scene-card__label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
  }

  .scene-card__input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #e5e5e5;
    background: #f8f8f8;
    font-size: 15px;
    color: #111;
    box-sizing: border-box;
  }

  .scene-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .scene-card__control-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }

  .scene-card__control {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #f4f4f4;
    border-radius: 999px;
    padding: 8px 12px;
  }

  .scene-card__control-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #111;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .scene-card__control-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  }

  .scene-card__control-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
  }

  .scene-card__control-input {
    width: 56px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    text-align: center;
    outline: none;
  }

  .scene-card__unit {
    font-size: 12px;
    font-weight: 600;
    color: #666;
  }

  .scene-card__location {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .scene-card__location-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid #d7d7d7;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .scene-card__location-select:focus-visible {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
  }

  .location-config {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .location-config__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
  }

  .location-config__hint {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
  }

  .location-config__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .location-config__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: #f7f7f7;
  }

  .location-config__label {
    font-weight: 600;
    color: #333;
  }

  .location-config__input {
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 16px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .location-config__input:focus-visible {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.18);
  }

  @media (max-width: 720px) {
    .scene-card {
      padding: 24px 20px;
      border-radius: 24px;
      gap: 16px;
    }

    .scene-card__row {
      flex-direction: column;
      align-items: stretch;
    }

    .scene-card__control {
      justify-content: center;
    }

    .scene-card__unit {
      align-self: center;
    }

    .scene-card__title {
      font-size: 17px;
    }
  }

  .scene-card__control-input::-webkit-outer-spin-button,
  .scene-card__control-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .scene-card__control-input {
    -moz-appearance: textfield;
  }

  .level-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    justify-content: center;
  }

  .level-button {
    padding: 10px 28px;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .level-button:hover:not(.selected),
  .level-button:focus-visible:not(.selected) {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
  }

  .level-button.selected {
    background-color: #000;
    color: #fff;
    border-color: #000;
  }

  @media (max-width: 480px) {
    .level-buttons {
      justify-content: center;
    }

    .level-button {
      flex: 1 1 100%;
      text-align: center;
    }
  }
.toggle-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid #d7d7d7;
  background-color: #ffffff;
  color: #333333;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-top: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.toggle-button::after {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #c5c5c5;
  background: #f5f5f5;
  color: transparent;
  font-size: 18px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.toggle-button:hover,
.toggle-button:focus-visible {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
}
.toggle-button.active {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
  color: #111111;
}
.toggle-button.active::after {
  content: '✔';
  background: #4a90e2;
  border-color: #4a90e2;
  color: #ffffff;
}

.lunch-toggle.toggle-button::after,
.lunch-toggle.toggle-button.active::after {
  content: none;
  display: none;
}

.lunch-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  padding: 12px 18px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background-color: #ffffff;
  color: #1f2933;
  font-weight: 600;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.lunch-toggle .lunch-toggle__label {
  flex: 1;
  text-align: left;
}

.lunch-toggle .lunch-toggle__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f1f5f9;
  font-size: 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lunch-toggle .lunch-toggle__check::after {
  content: '';
}

.lunch-toggle:hover {
  border-color: #94a3b8;
}

.lunch-toggle.active {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
  background-color: #ffffff;
  color: #0f172a;
}

.lunch-toggle.active .lunch-toggle__check {
  background: #e2ecfb;
  border-color: #4a90e2;
  color: #0f172a;
}

.lunch-toggle.active .lunch-toggle__check::after {
  content: '✔';
}

.lunch-toggle:not(.active) {
  color: #475569;
}
.setup-label {
  margin-bottom: 15px;
  display: inline-block;
}

.draggable-row[draggable="true"] {
  cursor: move;
}
.dragging {
  opacity: 0.5;
}

.schedule-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.schedule-button {
  padding: 8px 16px;
  border: 2px solid #4a90e2;
  background-color: white;
  color: #4a90e2;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.schedule-button.active {
  background-color: #4a90e2;
  color: white;
}

.custom-row {
  background-color: #fffbe6;
}

.cell-editor {
  min-height: 20px;
  outline: none;
}

.add-row-below {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #4a90e2;
  border-radius: 3px;
  background: #fff;
  color: #4a90e2;
  cursor: pointer;
}

.add-row-below:hover {
  background: #4a90e2;
  color: #fff;
}

.delete-row {
  display: inline-block;
  margin-top: 6px;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #d9534f;
  border-radius: 3px;
  background: #fff;
  color: #d9534f;
  cursor: pointer;
}

.delete-row:hover {
  background: #d9534f;
  color: #fff;
}


/* --- Split from original <style> blocks --- */

${styles}