  /* ── RESET & BASE ─────────────────────────────────────── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #1a1a1a;
    --card: #252525;
    --card2: #2a2a2a;
    --card3: #2e2e2e;
    --mod-bg: #333;
    --border: #3a3a3a;
    --border-subtle: #2f2f2f;
    --blue: #3b82f6;
    --blue-glow: rgba(59,130,246,0.15);
    --purple: #7c3aed;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --text-dim: #666;
    --green: #22c55e;
    --red: #ef4444;
    --gold: #f59e0b;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-pill: 999px;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
  }

  /* Force Inter on every text element inside the embed. Without this,
     Webflow's own typography rules (which target h1/h2/p directly with
     higher specificity than our body rule) win and the SEO box at the
     top of each game page renders in Webflow's default font instead of
     Inter. Scoped under #czc-scripter-app so we don't touch the rest
     of the host Webflow page. */
  #czc-scripter-app,
  #czc-scripter-app h1,
  #czc-scripter-app h2,
  #czc-scripter-app h3,
  #czc-scripter-app h4,
  #czc-scripter-app h5,
  #czc-scripter-app h6,
  #czc-scripter-app p,
  #czc-scripter-app span,
  #czc-scripter-app div,
  #czc-scripter-app li,
  #czc-scripter-app td,
  #czc-scripter-app th,
  #czc-scripter-app button,
  #czc-scripter-app input,
  #czc-scripter-app select,
  #czc-scripter-app textarea {
    font-family: 'Inter', sans-serif !important;
    /* Webflow's theme styles headings with text-transform: uppercase
       and letter-spacing: -1.6px, which makes our SEO text render as
       ALLCAPS-WITH-SQUEEZED-LETTERS. Reset both to defaults so the
       text reads as the original sentence-case copy. */
    text-transform: none !important;
    letter-spacing: normal !important;
  }

  .ai-text {

    background: linear-gradient(
      135deg,
      #ff2fb3 0%,
      #8a5cff 50%,
      #3aa0ff 100%
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }

  .czc-wrap {
    max-width: 85%;
    margin: 0 auto;
    padding: 32px 20px 120px;
  }

  /* ── SECTION CARDS ─────────────────────────────────────── */
  .czc-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
  }

  .czc-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
  }

  .czc-sub-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
  }

  /* ── SECTION DIVIDER ──────────────────────────────────── */
  .czc-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 20px 0;
  }

  /* ══════════════════════════════════════════════════
     GAME CARDS
  ══════════════════════════════════════════════════ */
  .game-version-section { scroll-margin-top: 24px; }
  .game-version-section .czc-section-title { margin-bottom: 22px; }
  .edition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 87.5%; max-width: 577.5px; }
  .cod-edition-carousel { position: relative; }
  .cod-edition-grid { display: flex; width: 100%; min-width: 0; max-width: none; overflow-x: auto; gap: 18px; padding: 4px 3px 14px; scrollbar-width: none; }
  .cod-edition-grid::-webkit-scrollbar { display: none; }
  .cod-edition-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--card2); color: var(--text); cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.4); opacity: 1; visibility: visible; transition: opacity 140ms ease, visibility 0s; }
  .cod-edition-arrow--left { left: -12px; }
  .cod-edition-arrow--right { right: -12px; }
  .cod-edition-arrow:hover { background: var(--card3); }
  .cod-edition-arrow:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  .cod-edition-arrow.is-hidden { opacity: 0; visibility: hidden; pointer-events: none !important; transition: opacity 140ms ease, visibility 0s 140ms; }
  .cod-edition-grid > .edition-card { flex: 0 0 279.75px; }
  @media (max-width: 520px) { .cod-edition-grid > .edition-card { flex-basis: calc((87.5% - 10px) / 2); } }
  .edition-card { display: block; min-width: 0; overflow: hidden; border: 2px solid var(--border); border-radius: 10px; color: var(--text); background: var(--card2); text-decoration: none; transition: border-color 0.2s, transform 0.2s ease, box-shadow 0.2s ease; }
  .edition-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
  .edition-card.is-selected { border-color: var(--blue); }
  .edition-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
  .edition-card-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px; font-size: 16px; font-weight: 600; }
  @media (max-width: 520px) {
    .edition-grid { gap: 10px; }
    .edition-card-caption { padding: 9px; font-size: 14px; }
  }

  .game-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
  }

  .game-card-wrapper {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: visible;
    transition: border-color 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    animation: fadeInCard 0.2s ease-out forwards;
  }

  .game-card-wrapper:nth-child(1) { animation-delay: 0s; }
  .game-card-wrapper:nth-child(2) { animation-delay: 0.03s; }
  .game-card-wrapper:nth-child(3) { animation-delay: 0.06s; }
  .game-card-wrapper:nth-child(4) { animation-delay: 0.09s; }
  .game-card-wrapper:nth-child(5) { animation-delay: 0.12s; }
  .game-card-wrapper:nth-child(6) { animation-delay: 0.15s; }
  .game-card-wrapper:nth-child(7) { animation-delay: 0.18s; }
  .game-card-wrapper:nth-child(8) { animation-delay: 0.21s; }
  .game-card-wrapper:nth-child(9) { animation-delay: 0.24s; }
  .game-card-wrapper:nth-child(10) { animation-delay: 0.27s; }

  @keyframes fadeInCard {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  .game-card-wrapper:hover,
  .game-card-wrapper.selected-game:hover,
  .edition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  }

  .game-card-wrapper.selected-game {
    border-color: var(--blue);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .game-card {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--card2);
  }

  .game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .game-card-wrapper[style*="pointer-events:none"] .game-card img {
    background: #333;
  }

  .game-card-wrapper[style*="pointer-events:none"] .game-card {
    background: #333;
  }

  .game-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e2a3a, #111);
    font-size: 28px;
  }

  .cod-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .cod-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  .game-grid .game-card-wrapper > a {
    flex: 1;
    min-width: 0;
  }

  .game-grid .game-card-label {
    flex: 1;
    overflow-wrap: anywhere;
  }

  .game-card-label {
    background: #313538;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    text-align: left;
    border-radius: 0;
  }

  /* ══════════════════════════════════════════════════
     PLATFORM / CONTROLLER / GAME-SELECTOR (optional toggles)
  ══════════════════════════════════════════════════ */
  .toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
  }

  .toggle-btn {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
  }

  .toggle-btn:hover { border-color: var(--blue); }
  .toggle-btn.active { background: var(--blue-glow); border-color: var(--blue); color: var(--blue); }

  /* on/off switch */
  .czc-switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    user-select: none;
  }

  .czc-switch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: var(--border);
    transition: background 0.2s;
    flex-shrink: 0;
  }

  .czc-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
  }

  .czc-switch.on { background: var(--blue); }
  .czc-switch.on::after { transform: translateX(22px); }

  /* ══════════════════════════════════════════════════
     MOD BUTTONS
  ══════════════════════════════════════════════════ */
  .mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
  }

  .mod-option {
    position: relative;
    background: var(--mod-bg);
    border: 1px solid #444;
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    white-space: normal;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.7;
    letter-spacing: -0.28px;
    width: 100%;
    min-width: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: riseUp 0.2s ease-out forwards;
  }

  .mod-option { animation-delay: 0s; }

  @keyframes riseUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .mod-option:hover {
    border-color: var(--blue);
    background: #3a3a3a;
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  }
  .mod-option.selected-mod { border-color: var(--blue); background: var(--blue-glow); color: var(--text); }

  /* recommended badge */
  .rec-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--purple);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.3px;
  }

  .new-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.3px;
    z-index: 10;
  }

  .mod-option.has-badge {
    padding-top: 18px;
    min-height: 60px;
    box-sizing: border-box;
  }

  /* single-select shooting / aim */
  .mod-option.single-mod.selected-mod {
    border-color: var(--blue);
    background: var(--blue-glow);
  }

  /* ══════════════════════════════════════════════════
     PUBG - CYCLE ATTACHMENTS DEPENDENCY
  ══════════════════════════════════════════════════ */
  .pubg-cycle-attachments-dep.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
  }

  .pubg-cycle-attachments-dep.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }

  .pubg-cycle-attachments-dep.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .pubg-cycle-attachments-dep.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ═══════════════════════════════════════════════════════
     RUST - QUICK SWAP DEPENDENCY
  ═══════════════════════════════════════════════════════════ */
  .rust-quick-swap-dep.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
  }

  .rust-quick-swap-dep.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }

  .rust-quick-swap-dep.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .rust-quick-swap-dep.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ══════════════════════════════════════════════════
     MLB — dependency/exclusion mod tiles
     mlb-pitching-dep, mlb-pci-dep, mlb-rumble-dep, mlb-release-vibrator-dep
     all share the same red "disabled" pattern.
  ══════════════════════════════════════════════════ */
  .mlb-pitching-dep.mod-disabled,
  .mlb-pci-dep.mod-disabled,
  .mlb-rumble-dep.mod-disabled,
  .mlb-release-vibrator-dep.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
  }
  .mlb-pitching-dep.mod-disabled:hover,
  .mlb-pci-dep.mod-disabled:hover,
  .mlb-rumble-dep.mod-disabled:hover,
  .mlb-release-vibrator-dep.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }
  .mlb-pitching-dep.mod-disabled::before,
  .mlb-pci-dep.mod-disabled::before,
  .mlb-rumble-dep.mod-disabled::before,
  .mlb-release-vibrator-dep.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  .mlb-pitching-dep.mod-disabled:hover::before,
  .mlb-pci-dep.mod-disabled:hover::before,
  .mlb-rumble-dep.mod-disabled:hover::before,
  .mlb-release-vibrator-dep.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ══════════════════════════════════════════════════
     KEYBIND PICKER — already-bound buttons (.bind-taken)
     Red border + red text + greyed SVG + red tooltip.
     Used by the per-mod activator picker (e.g. Rocket League
     speedflip/wavedash assignments) to mark buttons that are
     already assigned to another action.
  ══════════════════════════════════════════════════ */
  .keybind-svg-btn.bind-taken {
    position: relative;
    color: #ef4444;
    border-color: #ef4444 !important;
    background: transparent !important;
    cursor: not-allowed !important;
  }
  .keybind-svg-btn.bind-taken:hover {
    border-color: #ef4444 !important;
    background: transparent !important;
    box-shadow: none;
  }
  .keybind-svg-btn.bind-taken svg {
    opacity: 0.5;
    filter: grayscale(1) brightness(0.7) sepia(1) hue-rotate(-50deg) saturate(4);
  }
  .keybind-svg-btn.bind-taken::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  #keybind-modal .keybind-select-panel.active #keybind-options-grid {
    padding-top: 56px !important;
    margin-top: -56px !important;
  }
  .keybind-svg-btn.bind-taken:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ══════════════════════════════════════════════════
     GAME MOD PANELS (show/hide per game)
  ══════════════════════════════════════════════════ */

  .apex-provider-restricted.platform-restricted,
  .fc-mutually-exclusive.mod-disabled,
  .apex-mutually-exclusive.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
  }

  .apex-provider-restricted.platform-restricted:hover,
  .fc-mutually-exclusive.mod-disabled:hover,
  .apex-mutually-exclusive.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }

  .apex-provider-restricted.platform-restricted::before,
  .fc-mutually-exclusive.mod-disabled::before,
  .apex-mutually-exclusive.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .apex-provider-restricted.platform-restricted:hover::before,
  .fc-mutually-exclusive.mod-disabled:hover::before,
  .apex-mutually-exclusive.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .game-mods-panel { display: none; }
  .game-mods-panel.active { display: block; }

  /* ══════════════════════════════════════════════════
     AIM ASSIST
  ══════════════════════════════════════════════════ */
  .creator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 5px;
  }

  .creator-section-highlight {
    padding: 16px;
    margin: -16px;
    border-radius: 8px;
    background: rgba(59,130,246,0.1);
    border: 2px solid var(--blue);
    animation: pulse 1s ease-in-out 2, fadeOutHighlight 0.5s ease-out 2.5s forwards;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
  }

  @keyframes fadeOutHighlight {
    0% {
      background: rgba(59,130,246,0.1);
      border-color: var(--blue);
      opacity: 1;
    }
    100% {
      background: transparent;
      border-color: transparent;
      opacity: 1;
    }
  }

  .aim-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card3);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .aim-card:hover { border-color: var(--blue); }
  .aim-card.selected-aim { border-color: var(--blue); background: var(--blue-glow); }

  .aim-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a3a5c, #1a2040);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: var(--blue);
    flex-shrink: 0;
    border: 2px solid var(--border);
  }

  .aim-info { flex: 1; min-width: 0; }
  .aim-name { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aim-stars { display: flex; gap: 3px; margin-top: 3px; }
  .aim-stars svg { width: 13px; height: 13px; }

  /* ══════════════════════════════════════════════════
     KEYBIND BUTTON
  ══════════════════════════════════════════════════ */
  .czc-grey-btn {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
  }

  .czc-grey-btn:hover { border-color: var(--blue); }

  .czc-blue-btn {
    background: var(--blue);
    border: 1px solid var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
  }
  .czc-blue-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  }

  /* ══════════════════════════════════════════════════
     CUSTOMIZATION
  ══════════════════════════════════════════════════ */
  .customization-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }

  .device-card {
    background: var(--card2);
    border-radius: var(--radius);
    padding: 20px;
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-subtle);
  }

  .device-preview {
    width: 170px;
    height: 170px;
    background: linear-gradient(135deg, #1c2a3e, #111827);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }

  .device-preview img { width: 100%; height: 100%; object-fit: contain; }

  .oled-preview {
    width: 100%;
    max-width: 170px;
    image-rendering: pixelated;
    display: none;
  }

  .czc-outline-btn {
    background: transparent;
    border: 2px solid var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
  }

  .czc-outline-btn:hover { background: var(--blue-glow); }

  /* LED picker */
  .led-card {
    background: var(--card2);
    border-radius: var(--radius);
    padding: 20px;
    flex: 1;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .led-preview-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #00008f;
    border: 3px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s;
    flex-shrink: 0;
  }

  .led-preview-circle:hover { transform: scale(1.05); }

  .led-row {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .led-info { font-size: 14px; color: var(--text-muted); }
  .led-rgb-display { font-size: 16px; font-weight: 600; color: var(--text); font-family: 'Inter', sans-serif; }

  /* colour picker popover */
  .led-popover {
    position: fixed;
    z-index: 999;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: none;
  }

  .led-popover.open { display: block; }

  .led-popover input[type="color"] {
    width: 240px; height: 190px;
    border: none; padding: 0;
    cursor: pointer;
    background: none;
    border-radius: 4px;
    display: block;
    margin-bottom: 12px;
  }

  .led-sliders { display: flex; flex-direction: column; gap: 10px; }
  .led-slider-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
  .led-slider-row label { width: 16px; color: var(--text-muted); }

  .led-slider-row input[type="range"] {
    flex: 1; height: 5px;
    accent-color: var(--blue);
    cursor: pointer;
  }

  .led-slider-row span { width: 32px; text-align: right; font-size: 14px; color: var(--text-muted); }

  .led-apply-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
  }

  /* ══════════════════════════════════════════════════
     DROPDOWNS / SELECTS
  ══════════════════════════════════════════════════ */
  .czc-select {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
    min-width: 160px;
  }

  .czc-select:focus { outline: none; border-color: var(--blue); }

  .czc-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--card3);
  }

  .czc-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .czc-form-label { font-size: 15px; color: var(--text); font-weight: 500; white-space: nowrap; min-width: 120px; }

  #panel-NBA .czc-form-row .czc-select { width: 200px; }

  /* ══════════════════════════════════════════════════
     SLIDERS
  ══════════════════════════════════════════════════ */
  .czc-slider-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }

  input[type="range"].czc-range {
    flex: 1;
    height: 4px;
    accent-color: var(--blue);
    cursor: pointer;
  }

  .czc-slider-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    min-width: 32px;
    text-align: right;
    font-family: 'Inter', sans-serif;
  }

  #r6s-deadzone-val {
    color: var(--blue);
    font-size: 16px;
  }

  #rust-deadzone-val {
    color: var(--blue);
    font-size: 16px;
  }

  #overwatch-deadzone-val {
    color: var(--blue);
    font-size: 16px;
  }

  #overwatch-deadzone-section {
    display: none;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
  }

  /* ══════════════════════════════════════════════════
     2K RELEASE SPEED PREVIEW BOX
  ══════════════════════════════════════════════════ */
  .release-preview-box {
    background: linear-gradient(135deg, #0f1a2e, #1a2540);
    border: 1px solid var(--blue);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .release-preview-box .grade {
    font-family: 'Inter', sans-serif;
    font-size: 44px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
    min-width: 60px;
    text-align: center;
  }

  .release-preview-box .timings {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .timing-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
  }

  .timing-label { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; min-width: 80px; }
  .timing-value { color: var(--text); font-weight: 600; font-family: 'Inter', sans-serif; font-size: 16px; }

  /* ══════════════════════════════════════════════════
     DPAD MODS (2K dribble / FIFA skill moves)
  ══════════════════════════════════════════════════ */
  .dpad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
  }

  .dpad-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dpad-icon {
    width: 28px; height: 28px;
    background: var(--card3);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .dpad-row select.none-selected {
    border-color: var(--red);
  }

  /* ══════════════════════════════════════════════════
     GENERATE BUTTON (sticky)
  ══════════════════════════════════════════════════ */
  .czc-sticky-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
    padding: 20px;
    z-index: 100;
    display: flex;
    justify-content: center;
  }

  .generate-btn {
    max-width: 1100px;
    width: 100%;
    background: #1f1f1f;
    border: 2px solid var(--blue);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .generate-btn:hover { background: #1f2c4d; box-shadow: 0 0 24px rgba(59,130,246,0.45); }
  .generate-btn:active { transform: scale(0.99); }

  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
  }

  .generate-btn.shake {
    animation: shake 0.5s;
  }

  .generate-btn.warning {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
  }

  /* ══════════════════════════════════════════════════
     UPGRADE-TO-ULTIMATE button (gold)
     Scoped + !important so it overrides the loader's
     default blue .generate-btn rule on Webflow.
  ══════════════════════════════════════════════════ */
  #czc-scripter-app .generate-btn.upgrade-required,
  .generate-btn.upgrade-required {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 2px solid rgba(212, 175, 55, 0.5) !important;
    background: linear-gradient(
      130deg,
      #2a2520 0%,
      #3a3024 25%,
      #4a3a26 50%,
      #3a3024 75%,
      #2a2520 100%
    ) !important;
    background-size: 220% 220% !important;
    animation: upgradeBreathe 11s ease-in-out infinite;
    color: #f1d27a !important;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
    box-shadow:
      0 0 0 1px rgba(212, 175, 55, 0.15),
      0 0 14px rgba(212, 175, 55, 0.15) !important;
    transition: transform 0.18s ease, box-shadow 0.25s ease, color 0.25s ease;
  }
  #czc-scripter-app .generate-btn.upgrade-required::before,
  .generate-btn.upgrade-required::before {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 215, 0, 0.04) 40%,
      rgba(255, 215, 0, 0.12) 50%,
      rgba(255, 215, 0, 0.04) 60%,
      transparent 100%
    );
    transform: skewX(-22deg);
    animation: upgradeSheen 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
  }
  #czc-scripter-app .generate-btn.upgrade-required .btn-text,
  #czc-scripter-app .generate-btn.upgrade-required .spinner,
  .generate-btn.upgrade-required .btn-text,
  .generate-btn.upgrade-required .spinner { position: relative; z-index: 1; }

  #czc-scripter-app .generate-btn.upgrade-required:hover,
  .generate-btn.upgrade-required:hover {
    transform: translateY(-1px);
    animation-duration: 7s;
    color: #ffe082 !important;
    border-color: rgba(255, 215, 0, 0.75) !important;
    background: linear-gradient(
      130deg,
      #2a2520 0%,
      #3a3024 25%,
      #4a3a26 50%,
      #3a3024 75%,
      #2a2520 100%
    ) !important;
    box-shadow:
      0 0 0 1px rgba(255, 215, 0, 0.3),
      0 0 24px rgba(212, 175, 55, 0.35) !important;
  }
  #czc-scripter-app .generate-btn.upgrade-required:active,
  .generate-btn.upgrade-required:active { transform: translateY(0) scale(0.995); }

  @keyframes upgradeBreathe {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @keyframes upgradeSheen {
    0%   { left: -150%; }
    55%  { left: 150%; }
    100% { left: 150%; }
  }

  /* Fade slide-in animation for sections */
  @keyframes fadeSlideIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .fade-slide-in {
    animation: fadeSlideIn 0.3s ease-out 0.15s forwards;
    opacity: 0;
  }

  .fade-slide-in-delayed-1 {
    animation: fadeSlideIn 0.3s ease-out 0.2s forwards;
    opacity: 0;
  }

  .fade-slide-in-delayed-2 {
    animation: fadeSlideIn 0.3s ease-out 0.25s forwards;
    opacity: 0;
  }

  .fade-slide-in-delayed-3 {
    animation: fadeSlideIn 0.3s ease-out 0.3s forwards;
    opacity: 0;
  }

  .warning-message {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    animation: flashMessage 2.5s ease-out;
    pointer-events: none;
  }

  @keyframes flashMessage {
    0% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    8% { opacity: 1; transform: translateX(-50%) translateY(0); }
    92% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
  }

  .generate-btn .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
  }

  .generate-btn.loading .spinner { display: block; }
  .generate-btn.loading .btn-text { opacity: 0.7; }

  @keyframes spin { to { transform: rotate(360deg); } }

  #czc-scripter-app .generate-btn.success,
  .generate-btn.success {
    background: #1f4d2c !important;
    border: 2px solid #22c55e !important;
    box-shadow: 0 0 24px rgba(34,197,94,0.45) !important;
  }
  #czc-scripter-app .generate-btn.success:hover,
  .generate-btn.success:hover {
    background: #1f4d2c !important;
    border: 2px solid #22c55e !important;
    box-shadow: 0 0 24px rgba(34,197,94,0.45) !important;
  }

  /* Perimeter-chase loading effect.
     A bright dash slides along the rectangular border of the button.
     Only active on buttons with .has-rotating-border (currently MR test only). */
  .generate-btn.has-rotating-border { position: relative; }
  .generate-btn.has-rotating-border .border-chase {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s linear;
    z-index: 1;
    overflow: visible;
  }
  .generate-btn.has-rotating-border .spinner,
  .generate-btn.has-rotating-border .btn-text { position: relative; z-index: 2; }
  .generate-btn.has-rotating-border .border-chase rect {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 4;
    stroke-dasharray: 80 9999;
    stroke-dashoffset: 0;
    animation: chasePerimeter 1.5s linear infinite;
  }
  .generate-btn.has-rotating-border.loading .border-chase { opacity: 1; }
  @keyframes chasePerimeter {
    to { stroke-dashoffset: -2000; }
  }

  /* ══════════════════════════════════════════════════
     MODAL / DIALOG (keybinds + guides)
  ══════════════════════════════════════════════════ */
  .czc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .czc-modal-overlay.open {
    display: flex;
    opacity: 1;
  }

  .czc-modal-overlay.closing {
    opacity: 0;
  }

  .czc-modal {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 1000px;
    width: 94%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .czc-modal-overlay.open .czc-modal {
    opacity: 1;
    transform: translateY(0);
  }

  .czc-modal-overlay.closing .czc-modal {
    opacity: 0;
    transform: translateY(20px);
  }

  /* Keybind modal panel switching animations */
  .czc-modal.slide-out-up {
    animation: slideOutUp 0.2s ease forwards;
  }

  .czc-modal.slide-in-down {
    animation: slideInDown 0.2s ease forwards;
  }

  @keyframes slideOutUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-30px); }
  }

  @keyframes slideInDown {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  .czc-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    text-align: center;
    justify-content: space-between;
    align-items: center;
  }

  .czc-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
    font-family: 'Inter', sans-serif;
  }

  .czc-modal-close:hover { color: #fff; }

  /* Keybind rows inside modal - SVG style */
  .keybind-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 60px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .keybind-row:last-child { border-bottom: none; }

  .keybind-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 8px;
  }

  .action-label {
    font-size: 14px;
    color: var(--text-muted);
    width: 130px;
    flex-shrink: 0;
    text-align: left;
    white-space: nowrap;
  }

  .keybind-svg-btn {
    width: 72px;
    height: 48px;
    min-width: 72px;
    background: transparent;
    border: 2px solid #2596be;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    padding: 6px 9px;
  }

  .keybind-svg-btn:hover {
    background: rgba(37, 150, 190, 0.2);
    border-color: #3bb5e5;
  }

  .keybind-svg-btn svg {
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 30px;
    display: block;
    margin: auto;
  }

  .currbind {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    min-width: 80px;
    text-align: center;
    transition: border-color 0.15s;
  }

  .currbind:hover { border-color: var(--blue); }

  /* keybind select panel */
  .keybind-select-panel {
    display: none;
    width: 100%;
  }
  .keybind-select-panel.active {
    display: block;
  }
  .active-keybinds-panel {
    display: block;
    width: 100%;
  }
  .active-keybinds-panel.hidden {
    display: none;
  }

  .keybind-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
  }

  .keybind-option {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
  }

  .keybind-option:hover { border-color: var(--blue); background: var(--blue-glow); }

  .modal-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
  }

  .modal-back-btn:hover { color: #fff; }

  .modal-save-btn {
    background: var(--blue);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
  }

  /* guides modal */
  .guides-content { font-size: 13px; line-height: 1.7; color: var(--text-muted); }
  .guides-content h3 { color: var(--text); font-family: 'Inter', sans-serif; font-size: 16px; margin: 16px 0 8px; }
  .guides-content p { margin-bottom: 8px; }
  .guides-content ol, .guides-content ul { padding-left: 20px; margin-bottom: 8px; }
  .guides-content li { margin-bottom: 4px; }
  .guides-content strong { color: var(--text); }
  .guides-content hr { border-color: var(--border-subtle); margin: 16px 0; }

  .guide-game-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .guide-tab {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
  }

  .guide-tab.active { border-color: var(--blue); color: var(--blue); background: var(--blue-glow); }

  .guide-section { display: none; }
  .guide-section.active { display: block; }

  /* ══════════════════════════════════════════════════
     UTILITY
  ══════════════════════════════════════════════════ */
  .row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .flex-col { display: flex; flex-direction: column; gap: 6px; }
  .optional-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--card3);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.3px;
  }

  .section-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  /* tooltip */
  #mod-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    max-width: 230px;
    word-wrap: break-word;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid #404040;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    line-height: 1.4;
  }

  /* R6S deadzone */
  .r6s-side-toggle {
    display: flex;
    background: var(--card3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .r6s-side-btn {
    flex: 1;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
  }

  .r6s-side-btn.active { background: var(--blue-glow); color: var(--blue); }

  /* ══════════════════════════════════════════════════
     SCROLLBAR
  ══════════════════════════════════════════════════ */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

  .humanizer-badge {
    font-size: 10px; font-weight: 700; color: var(--green);
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
    border-radius: 4px; padding: 1px 6px; letter-spacing: 0.3px;
  }

  /* ══════════════════════════════════════════════════
     MLB — Diamond Dynasty / Road to the Show UI
     (Player items, type selector, remove buttons, pitch dialog)
  ══════════════════════════════════════════════════ */

  .czc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
  }

  .czc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .czc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card3);
    transition: 0.3s;
    border-radius: 999px;
    border: 2px solid var(--border);
  }

  .czc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
  }

  .czc-toggle input:checked + .czc-toggle-slider {
    background-color: var(--blue);
    border-color: var(--blue);
  }

  .czc-toggle input:checked + .czc-toggle-slider:before {
    transform: translateX(22px);
    background-color: white;
  }

  /* MLB DD/RTTS Player Items */
  .mlb-player-item {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
  }

  .mlb-player-item select, .mlb-player-item input {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
  }

  .mlb-player-item select:focus, .mlb-player-item input:focus {
    outline: none;
    border-color: var(--blue);
  }

  .mlb-remove-btn {
    background: var(--red);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.15s;
  }

  .mlb-remove-btn:hover {
    opacity: 0.8;
  }

  .mlb-player-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
  }

  .mlb-type-btn {
    flex: 1;
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
  }

  .mlb-type-btn:hover {
    border-color: var(--blue);
  }

  .mlb-type-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
  }

  .mlb-pitch-config-btn {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    margin-bottom: 8px;
    transition: all 0.15s;
  }

  .mlb-pitch-config-btn:hover {
    border-color: var(--blue);
  }

  .mlb-pitch-config-btn.warning {
    border-color: var(--red);
    color: var(--red);
  }

  .mlb-pitch-config-btn.warning:hover {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.1);
  }

  /* Pitch Dialog */
  .pitch-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .pitch-dialog-overlay.open {
    opacity: 1;
  }

  .pitch-dialog-overlay.closing {
    opacity: 0;
  }

  .pitch-dialog-overlay.nested {
    z-index: 1100;
  }

  .pitch-dialog {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .pitch-dialog-overlay.open .pitch-dialog {
    opacity: 1;
    transform: translateY(0);
  }

  .pitch-dialog-overlay.closing .pitch-dialog {
    opacity: 0;
    transform: translateY(20px);
  }

  .pitch-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  .pitch-dialog-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
  }

  .pitch-dialog-close {
    background: none;
    border: none;
    color: var(--red);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
  }

  .pitch-dialog-close:hover {
    transform: scale(1.1);
  }

  .pitch-dialog-body {
    margin-bottom: 20px;
  }

  .pitch-dialog-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .pitch-handedness-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
  }

  .pitch-handedness-btn {
    flex: 1;
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
  }

  .pitch-handedness-btn:hover {
    border-color: var(--blue);
  }

  .pitch-handedness-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
  }

  .pitch-slots-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
  }

  .pitch-slot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .pitch-slot-button {
    width: 100%;
    padding: 12px;
    background: var(--card3);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 120px;
  }

  .pitch-slot-button:hover {
    border-color: var(--blue);
    background: var(--card2);
  }

  .pitch-slot-button.filled {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
  }

  .pitch-slot-button.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }

  .pitch-slot-value {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pitch-slot-button.filled .pitch-slot-value {
    color: var(--blue);
  }

  .pitch-slot-image {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    filter: brightness(0.9);
  }

  .pitch-slot-image.mirrored {
    transform: scaleX(-1);
  }

  .pitch-remove-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
  }

  .pitch-remove-x:hover {
    transform: scale(1.1);
  }

  .pitch-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
  }

  .pitch-type-button {
    padding: 12px;
    background: var(--card3);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    text-align: center;
  }

  .pitch-type-button:hover {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
  }

  .pitch-type-button.disabled {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    position: relative;
  }

  .pitch-type-button.disabled:hover {
    background: rgba(239, 68, 68, 0.15);
  }

  .pitch-type-back-btn {
    padding: 8px 16px;
    background: var(--card3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
  }

  .pitch-type-back-btn:hover {
    background: var(--card2);
    border-color: var(--blue);
  }

  @media (max-width: 768px) {
    .pitch-slots-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .pitch-type-grid {
      grid-template-columns: 1fr;
    }
  }

  /* ══════════════════════════════════════════════════
     MLB — Quick Switch dependency
     Red until at least one batting AND one pitching mod selected.
  ══════════════════════════════════════════════════ */
  .mlb-quick-switch-dep.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
  }
  .mlb-quick-switch-dep.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }
  .mlb-quick-switch-dep.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  .mlb-quick-switch-dep.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ══════════════════════════════════════════════════
     R6S — Abilities dependency
     Red unless Anti Recoil is selected.
  ══════════════════════════════════════════════════ */
  .r6s-abilities-dep.mod-disabled {
    color: #ef4444;
    border-color: #ef4444;
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
  }
  .r6s-abilities-dep.mod-disabled:hover {
    background: var(--mod-bg);
    box-shadow: none;
  }
  .r6s-abilities-dep.mod-disabled::before {
    content: attr(data-exclusion-message);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  .r6s-abilities-dep.mod-disabled:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* ══════════════════════════════════════════════════
     MOBILE — TABLET (≤ 768px)
     Reflow game/mod grids, shrink cards, switch to
     inline-tooltip mode for disabled tiles, narrow modals.
  ══════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    html,
    body {
      max-width: 100% !important;
      overflow-x: hidden !important;
    }

    #czc-scripter-app {
      width: 100% !important;
      max-width: 100% !important;
      overflow-x: hidden !important; overflow-x: clip !important;
    }

    #czc-scripter-app .czc-wrap,
    #czc-scripter-app .czc-card,
    #czc-scripter-app .game-mods-panel,
    #czc-scripter-app .section-header-row,
    #czc-scripter-app .creator-grid,
    #czc-scripter-app .mod-grid,
    #czc-scripter-app .cod-games-grid,
    #czc-scripter-app .keybind-options-grid,
    #czc-scripter-app .active-keybinds-panel,
    #czc-scripter-app .keybind-select-panel,
    #czc-scripter-app .guides-content,
    #czc-scripter-app .release-preview-box {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
    }

    /* Game picker: 5 cols → 3 cols */
    .game-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; }
    .game-card-label { padding: 10px 12px !important; font-size: 14px !important; }

    /* Mod grid: tighten minmax + gap */
    .mod-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 10px !important; }
    .mod-option { padding: 12px 14px !important; min-height: 64px !important; font-size: 14px !important; }

    /* Cards: less padding */
    .czc-card { padding: 20px !important; margin-bottom: 16px !important; }
    .czc-section-title { font-size: 22px !important; }

    /* Creator grid: force one column so creator cards never widen mobile pages */
    .creator-grid { grid-template-columns: 1fr !important; }
    .aim-card,
    .aim-info,
    .aim-name,
    .aim-stars {
      min-width: 0 !important;
      max-width: 100% !important;
    }

    /* Keep both customization controls together; recent scripts use their own row. */
    #czc-scripter-app .customization-row {
      flex-direction: row !important;
      align-items: stretch !important;
      gap: 16px !important;
      width: 100% !important;
    }
    #czc-scripter-app .device-card,
    #czc-scripter-app .led-card {
      width: 100% !important;
      max-width: none !important;
      flex: none !important;
    }


    #czc-scripter-app .czc-form-row,
    #czc-scripter-app .toggle-row,
    #czc-scripter-app .led-row,
    #czc-scripter-app .led-slider-row,
    #czc-scripter-app .keybind-row,
    #czc-scripter-app .keybind-item {
      min-width: 0 !important;
      max-width: 100% !important;
    }
    #czc-scripter-app .czc-form-label,
    #czc-scripter-app .timing-label {
      min-width: 0 !important;
      white-space: normal !important;
    }
    #czc-scripter-app .czc-select,
    #czc-scripter-app input,
    #czc-scripter-app select,
    #czc-scripter-app textarea,
    #czc-scripter-app button {
      max-width: 100% !important;
    }

    /* Rust and MLB: game-specific controls that can still widen mobile pages */
    #czc-scripter-app .dpad-grid,
    #panel-MLBTheShow26 > div[style*="grid-template-columns:1fr 1fr"] {
      display: grid !important;
      grid-template-columns: 1fr !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      gap: 12px !important;
    }
    #czc-scripter-app .dpad-row,
    #czc-scripter-app .mlb-player-item,
    #czc-scripter-app .mlb-player-type-selector,
    #czc-scripter-app .pitch-handedness-selector,
    #czc-scripter-app .pitch-dialog-header,
    #czc-scripter-app .pitch-dialog-footer,
    #mlb-diamond-dynasty-section,
    #mlb-rtts-section,
    #mlb-settings-section,
    #mlb-dd-toggle,
    #mlb-rtts-toggle,
    #mlb-dd-content,
    #mlb-rtts-content,
    #mlb-dd-players-list,
    #mlb-rtts-saves-list {
      max-width: 100% !important;
      min-width: 0 !important;
    }
    #czc-scripter-app .dpad-row select,
    #czc-scripter-app .mlb-player-item select,
    #czc-scripter-app .mlb-player-item input,
    #czc-scripter-app .mlb-pitch-config-btn {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
    }
    #czc-scripter-app .section-header-row {
      flex-wrap: wrap !important;
      align-items: flex-start !important;
      gap: 8px !important;
    }
    #czc-scripter-app .section-header-row .czc-sub-title {
      flex: 1 1 100% !important;
    }
    #czc-scripter-app .section-header-row .czc-grey-btn {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      padding-left: 10px !important;
      padding-right: 10px !important;
      white-space: nowrap !important;
    }

    /* Sticky footer */
    #czc-scripter-app .czc-sticky-footer { padding: 0 12px 12px 12px !important; }
    .generate-btn { padding: 16px !important; font-size: 16px !important; }

    /* Modals & dialogs full-width */
    .czc-modal { width: 95vw !important; max-width: 95vw !important; }
    #guides-modal .czc-modal,
    #cod-games-modal .czc-modal {
      width: calc(100vw - 32px) !important;
      max-width: 720px !important;
      max-height: calc(100dvh - 32px) !important;
      padding: 20px !important;
      border-radius: var(--radius) !important;
    }
    #guides-modal .czc-modal-title,
    #cod-games-modal .czc-modal-title {
      position: sticky !important;
      top: -20px !important;
      z-index: 2 !important;
      background: var(--card2) !important;
      margin: -20px -20px 16px -20px !important;
      padding: 14px 14px 12px 20px !important;
      border-bottom: 1px solid var(--border-subtle) !important;
      gap: 12px !important;
    }
    #guides-modal .czc-modal-close,
    #cod-games-modal .czc-modal-close {
      width: 44px !important;
      height: 44px !important;
      min-width: 44px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      color: #ff4444 !important;
      border-radius: 6px !important;
      padding: 0 !important;
    }
    #cod-games-modal .cod-games-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 12px !important;
      margin-top: 0 !important;
    }
    #cod-games-modal .game-card-label {
      padding: 10px 12px !important;
      font-size: 13px !important;
      line-height: 1.25 !important;
    }
    #keybind-modal .czc-modal {
      width: min(95vw, 560px) !important;
      max-width: 95vw !important;
      max-height: calc(100dvh - 24px) !important;
      padding: 20px !important;
    }
    #keybind-modal-container {
      min-height: 0 !important;
    }
    #keybind-rows-container,
    #keybind-options-grid {
      max-height: calc(100dvh - 220px) !important;
    }
    #keybind-modal .keybind-row {
      grid-template-columns: 1fr !important;
      gap: 8px !important;
      min-height: 0 !important;
      padding: 8px 0 !important;
    }
    #keybind-modal .keybind-item {
      padding: 0 !important;
      gap: 8px !important;
    }
    #keybind-modal .action-label {
      width: auto !important;
      min-width: 0 !important;
      flex: 1 1 auto !important;
      white-space: normal !important;
      line-height: 1.25 !important;
    }
    #keybind-modal .keybind-svg-btn {
      width: 64px !important;
      height: 44px !important;
      min-width: 64px !important;
      padding: 6px 8px !important;
    }
    #keybind-modal .modal-back-btn {
      position: static !important;
      margin-bottom: 12px !important;
    }
    #keybind-modal .keybind-options-grid {
      grid-template-columns: repeat(3, minmax(56px, 1fr)) !important;
      justify-content: stretch !important;
      margin-top: 0 !important;
      gap: 8px !important;
    }
    #keybind-modal .keybind-options-grid .keybind-svg-btn {
      width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
    }
    .pitch-dialog { width: 95vw !important; max-width: 95vw !important; padding: 16px !important; }
    .pitch-slots-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .pitch-type-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Disabled dependency explanations stay anchored to their mod tile on mobile. */
    .pubg-cycle-attachments-dep.mod-disabled::before,
    .rust-quick-swap-dep.mod-disabled::before,
    .mlb-pitching-dep.mod-disabled::before,
    .mlb-pci-dep.mod-disabled::before,
    .mlb-rumble-dep.mod-disabled::before,
    .mlb-release-vibrator-dep.mod-disabled::before,
    .mlb-quick-switch-dep.mod-disabled::before,
    .r6s-abilities-dep.mod-disabled::before {
      position: absolute !important;
      bottom: calc(100% + 8px) !important;
      left: 50% !important;
      transform: translateX(-50%) translateY(10px) !important;
      display: block !important;
      opacity: 0 !important;
      visibility: hidden !important;
      background: #ef4444 !important;
      color: #fff !important;
      padding: 8px 12px !important;
      border-radius: 6px !important;
      font-size: 11px !important;
      font-weight: 600 !important;
      white-space: normal !important;
      width: max-content !important;
      max-width: min(240px, calc(100vw - 32px)) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
      line-height: 1.3 !important;
      pointer-events: none !important;
    }
    .pubg-cycle-attachments-dep.mod-disabled:hover::before,
    .rust-quick-swap-dep.mod-disabled:hover::before,
    .mlb-pitching-dep.mod-disabled:hover::before,
    .mlb-pci-dep.mod-disabled:hover::before,
    .mlb-rumble-dep.mod-disabled:hover::before,
    .mlb-release-vibrator-dep.mod-disabled:hover::before,
    .mlb-quick-switch-dep.mod-disabled:hover::before,
    .r6s-abilities-dep.mod-disabled:hover::before,
    .pubg-cycle-attachments-dep.mod-disabled:focus-visible::before,
    .rust-quick-swap-dep.mod-disabled:focus-visible::before,
    .mlb-pitching-dep.mod-disabled:focus-visible::before,
    .mlb-pci-dep.mod-disabled:focus-visible::before,
    .mlb-rumble-dep.mod-disabled:focus-visible::before,
    .mlb-release-vibrator-dep.mod-disabled:focus-visible::before,
    .mlb-quick-switch-dep.mod-disabled:focus-visible::before,
    .r6s-abilities-dep.mod-disabled:focus-visible::before {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateX(-50%) translateY(0) !important;
    }
    body.czc-mobile-tooltip-suppressed .pubg-cycle-attachments-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .rust-quick-swap-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .mlb-pitching-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .mlb-pci-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .mlb-rumble-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .mlb-release-vibrator-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .mlb-quick-switch-dep.mod-disabled::before,
    body.czc-mobile-tooltip-suppressed .r6s-abilities-dep.mod-disabled::before {
      opacity: 0 !important;
      visibility: hidden !important;
    }
  }

  /* ══════════════════════════════════════════════════
     MOBILE — PHONE (≤ 480px)
     Tighter columns, collapse SEO box behind a toggle,
     full-screen modals, even tighter spacing.
  ══════════════════════════════════════════════════ */
  @media (max-width: 480px) {
    /* Game picker: 3 cols → 2 cols */
    .game-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .game-card-label { padding: 8px 10px !important; font-size: 13px !important; }

    /* Mod grid: 2 cols stable */
    .mod-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .mod-option { padding: 10px 12px !important; min-height: 56px !important; font-size: 13px !important; }

    /* Cards: even less padding */
    .czc-card { padding: 14px !important; margin-bottom: 12px !important; border-radius: 6px !important; }
    .czc-section-title { font-size: 19px !important; margin-bottom: 14px !important; }
    .czc-sub-title { font-size: 16px !important; }

    /* Czc-wrap: less side gutter */
    .czc-wrap { max-width: 100% !important; padding: 16px 12px 12px 12px !important; }

    /* SEO box: hide on phones to save vertical space.
       Search engines still crawl it; users can dig in via desktop. */
    .czc-card > h1,
    .czc-card > h2,
    .czc-card > h3,
    .czc-card > p,
    div[style*="background: var(--card2)"][style*="border-radius"] {
      /* Loose targeting of the SEO box pattern — adjust to display:none if needed */
    }

    /* Creator grid: single column */
    .creator-grid { grid-template-columns: 1fr !important; }
    .aim-card { display: flex !important; align-items: center !important; }

    /* Sticky footer + generate button */
    #czc-scripter-app .czc-sticky-footer { padding: 0 8px 12px 8px !important; }
    .generate-btn {
      padding: 14px !important;
      font-size: 15px !important;
      /* Respect iPhone notch */
      padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
    }

    /* Modals & dialogs: full screen */
    .czc-modal, .pitch-dialog {
      width: 100vw !important;
      max-width: 100vw !important;
      height: 100vh !important;
      max-height: 100vh !important;
      border-radius: 0 !important;
      padding: 16px !important;
    }
    #guides-modal .czc-modal,
    #cod-games-modal .czc-modal {
      width: calc(100vw - 20px) !important;
      max-width: calc(100vw - 20px) !important;
      height: auto !important;
      max-height: calc(100dvh - 20px) !important;
      border-radius: 8px !important;
      padding: 14px !important;
    }
    #guides-modal .czc-modal-title,
    #cod-games-modal .czc-modal-title {
      top: -14px !important;
      margin: -14px -14px 12px -14px !important;
      padding: 10px 10px 10px 14px !important;
      font-size: 18px !important;
      align-items: center !important;
    }
    #guides-modal .czc-modal-title span,
    #cod-games-modal .czc-modal-title span {
      min-width: 0 !important;
      line-height: 1.2 !important;
      text-align: left !important;
    }
    #guides-modal .czc-modal-close,
    #cod-games-modal .czc-modal-close {
      width: 46px !important;
      height: 46px !important;
      min-width: 46px !important;
      font-size: 28px !important;
    }
    #cod-games-modal .cod-games-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 8px !important;
      margin-top: 0 !important;
    }
    #cod-games-modal .game-card-label {
      padding: 8px 9px !important;
      font-size: 12px !important;
    }
    .pitch-slots-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .pitch-slot-button { padding: 10px !important; min-height: 100px !important; }
    .pitch-type-grid { grid-template-columns: 1fr !important; }

    /* MLB DD/RTTS player items — tighten */
    .mlb-player-item { padding: 10px !important; }

    /* Toggle row wrap */
    .toggle-row { flex-wrap: wrap !important; gap: 6px !important; }
    .toggle-btn { padding: 8px 14px !important; font-size: 13px !important; }

    /* Tooltips even smaller font */
    .pubg-cycle-attachments-dep.mod-disabled::before,
    .rust-quick-swap-dep.mod-disabled::before,
    .mlb-pitching-dep.mod-disabled::before,
    .mlb-pci-dep.mod-disabled::before,
    .mlb-rumble-dep.mod-disabled::before,
    .mlb-release-vibrator-dep.mod-disabled::before,
    .mlb-quick-switch-dep.mod-disabled::before,
    .r6s-abilities-dep.mod-disabled::before {
      font-size: 10px !important;
    }

    #keybind-modal .czc-modal {
      width: calc(100vw - 20px) !important;
      max-width: calc(100vw - 20px) !important;
      height: auto !important;
      max-height: calc(100dvh - 20px) !important;
      border-radius: 8px !important;
      padding: 14px !important;
    }
    #keybind-modal .czc-modal-title {
      font-size: 20px !important;
      margin-bottom: 10px !important;
      padding-right: 34px !important;
    }
    #keybind-modal-subtitle {
      margin-bottom: 12px !important;
    }
    #keybind-modal .keybind-svg-btn {
      width: 56px !important;
      height: 40px !important;
      min-width: 56px !important;
    }
    #keybind-modal .keybind-options-grid {
      grid-template-columns: repeat(3, minmax(48px, 1fr)) !important;
      gap: 6px !important;
    }
    #keybind-rows-container,
    #keybind-options-grid {
      max-height: calc(100dvh - 190px) !important;
    }
  }

  /* The embed can be much narrower than the viewport on the host site.
     Keep these rules scoped and size the picker from the embed itself. */
  @media (max-width: 767px) {
    /* Webflow hides this section at 480-767px and makes it a flex row
       below 480px. Inline-size containment removes the content's intrinsic
       width, so that flex row's auto-sized child otherwise collapses to 0.
       Only override the host section that contains this generator. */
    .select-game:has(#czc-scripter-app) {
      display: block !important;
    }

    .select-game:has(#czc-scripter-app) > .padding-global {
      width: 100%;
      min-width: 0;
    }
  }

  #czc-scripter-app {
    container: czc-generator / inline-size;
    min-width: 0;
    font-size: 16px;
    line-height: 1.5;
  }

  #czc-scripter-app .czc-wrap {
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
    padding: 24px 16px 24px !important;
  }

  #czc-scripter-app .game-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  #czc-scripter-app .game-grid .game-card-wrapper > a {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--text);
    text-decoration: none;
  }
  #czc-scripter-app .game-grid .game-card { flex-shrink: 0; }
  #czc-scripter-app .game-card-label {
    padding: 16px 20px !important;
    font-size: 17px !important;
    line-height: 1.4;
    font-weight: 600;
    white-space: normal;
  }
  #czc-scripter-app .czc-section-title {
    font-size: 26px !important;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 20px;
  }
  #czc-scripter-app .edition-card { color: var(--text); text-decoration: none; }
  #czc-scripter-app .edition-card-caption { line-height: 1.4; overflow-wrap: anywhere; }

  @container czc-generator (max-width: 1100px) {
    #czc-scripter-app .czc-card { padding: 24px !important; }
    #czc-scripter-app .game-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      gap: 16px !important;
    }
    #czc-scripter-app .game-card-label { padding: 10px 12px !important; font-size: 14px !important; }
    #czc-scripter-app .czc-section-title { font-size: 22px !important; }
    #czc-scripter-app .game-version-section .czc-section-title {
      margin-bottom: 16px;
    }
    #czc-scripter-app .edition-grid { width: 100%; max-width: 454px; gap: 14px; }
    #czc-scripter-app .cod-edition-grid { max-width: none; }
    #czc-scripter-app .cod-edition-grid > .edition-card {
      flex-basis: min(220px, calc((100% - 14px) / 2.25));
    }
    #czc-scripter-app .edition-card-caption { padding: 10px; font-size: 14px; }
    #czc-scripter-app .cod-edition-arrow { width: 36px; height: 36px; }
  }

  @container czc-generator (max-width: 780px) {
    #czc-scripter-app .czc-wrap { padding: 20px 12px 24px !important; }
    #czc-scripter-app .czc-card { padding: 20px !important; }
    #czc-scripter-app .game-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 12px !important;
    }
    #czc-scripter-app .game-version-section .czc-section-title { font-size: 20px !important; }
  }

  @container czc-generator (max-width: 520px) {
    #czc-scripter-app .czc-wrap { padding: 16px 8px 24px !important; }
    #czc-scripter-app .czc-card { padding: 16px !important; }
    #czc-scripter-app .game-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 10px !important;
    }
    #czc-scripter-app .game-card-label { padding: 8px 10px !important; font-size: 13px !important; }
    #czc-scripter-app .game-grid .new-badge { max-width: 100%; padding-inline: 6px; font-size: 9px; }
    #czc-scripter-app .game-version-section .czc-section-title { font-size: 18px !important; }
    #czc-scripter-app .edition-grid { gap: 10px; }
    #czc-scripter-app .cod-edition-grid > .edition-card { flex-basis: calc((87.5% - 10px) / 2); }
    #czc-scripter-app .edition-card-caption { padding: 9px; font-size: 13px; }
  }

  @media (max-width: 1040px) {
    #czc-scripter-app .customization-row {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 220px));
      align-items: start !important;
    }
    #czc-scripter-app .customization-row > .device-card,
    #czc-scripter-app .customization-row > .led-card {
      width: 100% !important;
      min-width: 0 !important;
      max-width: 220px !important;
      padding: clamp(10px, 2vw, 20px);
    }
    #czc-scripter-app .customization-row > .recent-scripts-card {
      grid-column: 1 / -1;
    }
    #czc-scripter-app .device-preview {
      width: 100% !important;
      max-width: 180px;
      height: auto !important;
      aspect-ratio: 1;
    }
    #czc-scripter-app #zen-eyes { width: 128.333%; aspect-ratio: 231 / 186; }
    #czc-scripter-app #zen-eyes svg { width: 100% !important; height: 100% !important; }
    #czc-scripter-app .default-oled-logo,
    #czc-scripter-app #oled-preview-img { width: 33.333% !important; }
    #czc-scripter-app #wheel-wrapper,
    #czc-scripter-app #slider-wrapper { margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; }
    #czc-scripter-app .IroColorPicker { max-width: 100%; }
    #czc-scripter-app .IroColorPicker svg { max-width: 100%; height: auto; }
  }
  @media (max-width: 480px) {
    #czc-scripter-app .customization-row > .device-card .czc-sub-title,
    #czc-scripter-app .customization-row > .led-card .czc-sub-title { font-size: 14px; }
    #czc-scripter-app .change-image-button { font-size: 12px; }
  }

/* Match switch travel and form text to the document direction. */
html[dir="rtl"] .czc-switch::after { left:auto; right:3px; }
html[dir="rtl"] .czc-switch.on::after { transform:translateX(-22px); }
html[dir="rtl"] .czc-toggle-slider::before { left:auto; right:2px; }
html[dir="rtl"] .czc-toggle input:checked + .czc-toggle-slider::before { transform:translateX(-22px); }
html[dir="rtl"] select, html[dir="rtl"] option { direction:rtl; text-align:right!important; }
