/* Daily Posts — the run-the-day checklist.

     Tokens are re-declared here rather than shared, matching every other tab
     in this project (see the note in _graphics_ui.html). The values are the
     same; a change to the system has to be repeated by hand. */
  #cpDailyModule {
    --ink: #141414;
    --muted: #6f6a5f;
    --line: rgba(0, 0, 0, 0.14);
    --line-soft: rgba(0, 0, 0, 0.08);
    --sky: #89CFF0;
    --red: #c41e3a;
    --red-dark: #8f1529;
    --good: #17794a;

    /* HOST-SURFACE tokens. The host page is LIGHT. */
    --on-host: #141414;
    --on-host-muted: #6f6a5f;
    --on-host-accent: #8f1529;
    --on-host-line: rgba(0, 0, 0, 0.14);

    --sans: Arial, Helvetica, sans-serif;

    --fs-micro: 11.5px;
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-base: 14px;
    --fs-md: 15px;
    --fs-lg: 17px;
    --fs-xl: 20px;
    --fs-2xl: 24px;
    --fs-3xl: clamp(26px, 3.4vw, 34px);

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-pill: 999px;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.07), 0 8px 20px -12px rgba(0, 0, 0, 0.18);

    --ease: cubic-bezier(0.4, 0.1, 0.2, 1);
    --dur-1: 0.16s;
    --dur-2: 0.28s;

    font-family: var(--sans);
    color: var(--on-host);
    font-size: var(--fs-base);
    line-height: 1.45;
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--sp-4) var(--sp-3) var(--sp-6);
    box-sizing: border-box;
  }

  #cpDailyModule *, #cpDailyModule *::before, #cpDailyModule *::after { box-sizing: border-box; }

  /* The studio itself is present on the page but never shown: the queue drives
     it through cpGraphicsAuto, and its own controls would only confuse the
     checklist. It must stay in the DOM and stay MEASURABLE — the graphics code
     queries its elements at load, and `display: none` on an ancestor makes a
     canvas measure zero. Hence off-screen rather than hidden. */
  #cpGraphicsModule {
    position: absolute !important;
    left: -20000px !important;
    top: 0 !important;
    width: 1200px !important;
    height: 900px !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* ---------- Header ---------- */

  .cpd-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--sp-3);
    padding-bottom: var(--sp-3);
    border-bottom: 2px solid var(--on-host-line);
    margin-bottom: var(--sp-5);
  }

  .cpd-title {
    font-size: var(--fs-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.05;
    color: var(--on-host);
  }

  .cpd-date {
    font-size: var(--fs-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--on-host-muted);
    margin-top: var(--sp-1);
  }

  .cpd-head-spacer { flex: 1 1 auto; }

  .cpd-progress {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--on-host-muted);
    white-space: nowrap;
  }

  .cpd-progress-track {
    width: 120px;
    height: 6px;
    border-radius: var(--r-pill);
    background: rgba(0, 0, 0, 0.10);
    overflow: hidden;
  }

  .cpd-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--r-pill);
    background: var(--good);
    transition: width var(--dur-2) var(--ease);
  }

  .cpd-nav { display: flex; align-items: center; gap: var(--sp-1); }

  .cpd-nav-step { padding: 8px 11px; font-size: var(--fs-xs); line-height: 1; }

  .cpd-datepicker {
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--ink);
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
  }

  .cpd-datepicker:focus { outline: none; border-color: var(--red-dark); }

  /* A card the day simply did not produce - no promotion, no birthday. Not an
     error, so it must not look like one. */
  .cpd-card.is-absent { opacity: 0.5; }
  .cpd-card.is-absent .cpd-order { background: var(--muted); }

  .cpd-absent-note {
    font-size: var(--fs-sm);
    color: var(--muted);
    font-weight: 700;
    padding: var(--sp-2) 0;
  }

  .cpd-tag {
    font-size: var(--fs-micro);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
    color: #fff;
    background: var(--red-dark);
    border-radius: var(--r-pill);
    padding: 2px 9px;
  }

  /* ---------- Buttons ---------- */

  .cpd-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
                transform var(--dur-1) var(--ease);
    white-space: nowrap;
  }

  .cpd-btn:hover:not(:disabled) { background: #f4f4f4; border-color: rgba(0, 0, 0, 0.26); }
  .cpd-btn:active:not(:disabled) { transform: translateY(1px); }
  .cpd-btn:disabled { opacity: 0.45; cursor: default; }

  .cpd-btn-primary {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: #fff;
  }
  .cpd-btn-primary:hover:not(:disabled) { background: var(--red); border-color: var(--red); }

  .cpd-btn-ghost { background: transparent; }

  /* ---------- Card ---------- */

  .cpd-list { display: flex; flex-direction: column; gap: var(--sp-4); }

  .cpd-card {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: var(--sp-4);
    padding: var(--sp-4);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow-1);
    transition: box-shadow var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
  }

  .cpd-card:hover { box-shadow: var(--shadow-2); }

  /* Posted items stay in place and stay readable — they are a record of what
     went out, not clutter to hide. Only the emphasis drops. */
  .cpd-card.is-done { opacity: 0.55; }
  .cpd-card.is-done:hover { opacity: 0.85; }

  .cpd-shot {
    position: relative;
    width: 100%;
    aspect-ratio: 1080 / 1350;
    border-radius: var(--r-md);
    overflow: hidden;
    background: linear-gradient(180deg, #eef5fa, #dce9f4);
    border: 1px solid var(--line-soft);
    display: grid;
    place-items: center;
  }

  .cpd-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* Skeleton pulse, the same vocabulary as the other tabs. */
  .cpd-shot.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: cpd-pulse 1.25s var(--ease) infinite;
  }

  @keyframes cpd-pulse {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
  }

  .cpd-shot-note {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--muted);
    text-align: center;
    padding: var(--sp-3);
    line-height: 1.4;
  }

  .cpd-body { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }

  .cpd-card-head { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }

  .cpd-order {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--r-pill);
    background: var(--red-dark);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 800;
    flex: 0 0 auto;
  }

  .cpd-card.is-done .cpd-order { background: var(--good); }

  .cpd-name { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.01em; }

  .cpd-slot {
    font-size: var(--fs-micro);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 2px 9px;
  }

  .cpd-subject {
    font-size: var(--fs-sm);
    color: var(--muted);
    margin-top: -2px;
  }

  /* Two panes side by side on a wide card, stacked on a narrow one. X and
     Instagram want different hashtag counts, so they get different text. */
  .cpd-captions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--sp-3);
  }

  .cpd-cap { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }

  .cpd-cap-head { display: flex; align-items: baseline; gap: var(--sp-2); }

  .cpd-cap-label {
    font-size: var(--fs-micro);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted);
  }

  .cpd-cap-count {
    margin-left: auto;
    font-size: var(--fs-micro);
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }

  .cpd-cap-count.is-over { color: var(--red); }

  .cpd-btn-small { padding: 6px 11px; font-size: var(--fs-xs); align-self: flex-start; }

  .cpd-caption {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    font-family: inherit;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--ink);
    padding: var(--sp-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fbfbfa;
  }

  .cpd-caption:focus {
    outline: none;
    border-color: var(--red-dark);
    background: #fff;
  }

  .cpd-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

  .cpd-tick {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    margin-left: auto;
    padding: 6px 4px;
  }

  .cpd-tick input { width: 17px; height: 17px; accent-color: var(--good); cursor: pointer; }
  .cpd-card.is-done .cpd-tick { color: var(--good); }

  .cpd-error {
    font-size: var(--fs-sm);
    color: var(--red-dark);
    font-weight: 700;
    background: rgba(196, 30, 58, 0.07);
    border: 1px solid rgba(196, 30, 58, 0.22);
    border-radius: var(--r-md);
    padding: var(--sp-2) var(--sp-3);
  }

  .cpd-empty {
    text-align: center;
    padding: var(--sp-6) var(--sp-4);
    color: var(--muted);
    font-size: var(--fs-md);
    border: 1px dashed var(--line);
    border-radius: var(--r-lg);
  }

  .cpd-foot {
    margin-top: var(--sp-5);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--on-host-line);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    align-items: center;
    font-size: var(--fs-xs);
    color: var(--on-host-muted);
  }

  /* ---------- Narrow screens ---------- */

  @media (max-width: 720px) {
    #cpDailyModule {
      --fs-micro: 12px;
      --fs-xs: 13px;
      --fs-sm: 14px;
      --fs-base: 15px;
      padding: var(--sp-3) var(--sp-2) var(--sp-6);
    }

    /* One column, and the preview keeps its own aspect rather than being
       given a fixed height — a 2:3 poster in a flex row on a phone is what
       turns a control strip into 260px of blank space elsewhere in this site. */
    .cpd-card { grid-template-columns: minmax(0, 1fr); }
    .cpd-shot { max-width: 260px; margin: 0 auto; }
    .cpd-tick { margin-left: 0; }
    .cpd-nav { width: 100%; }
    .cpd-datepicker { flex: 1 1 auto; min-width: 0; }
    .cpd-actions .cpd-btn { flex: 1 1 auto; }
  }


  #cpGraphicsModule {
    --ink: #141414;
    --muted: #6f6a5f;
    --line: rgba(0, 0, 0, 0.14);
    --line-soft: rgba(0, 0, 0, 0.08);
    --sky: #89CFF0;
    --red: #c41e3a;
    --red-dark: #8f1529;

    /* HOST-SURFACE tokens. The host page is LIGHT (verified against the live
       site); these exist as their own names so every element that renders
       directly on the page can be re-pointed from one place. */
    --on-host: #141414;
    --on-host-muted: #6f6a5f;
    --on-host-accent: #8f1529;
    --on-host-line: rgba(0, 0, 0, 0.14);

    --serif: Georgia, "Times New Roman", serif;
    --sans: Arial, Helvetica, sans-serif;
    /* ---- TYPE SCALE ---------------------------------------------------
       Every font-size in this module resolves from here. Before August 2026
       the modules used THIRTY ad-hoc sizes starting at 7.5px, 342 of them
       under 11px, which is the main reason the site read as dense and
       illegible on a phone. Dense stat tables genuinely want small text --
       Savant and FanGraphs sit around 12px -- so the floor is 11.5px, not a
       comfortable reading size, but nothing below it. The narrow-screen block
       at the end of this stylesheet lifts the bottom of the scale again. */
    --fs-micro: 11.5px;  /* dense table cells, chips, superscripts */
    --fs-xs: 12px;       /* column headers, meta lines, labels */
    --fs-sm: 13px;       /* secondary text */
    --fs-base: 14px;     /* body */
    --fs-md: 15px;       /* emphasis, player names in lists */
    --fs-lg: 17px;       /* sub-headings */
    --fs-xl: 20px;       /* headings */
    --fs-2xl: 24px;      /* section titles */
    --fs-3xl: clamp(26px, 3.4vw, 34px);  /* page titles */

    /* ---- SPACING (4px base) ---- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;

    /* ---- RADIUS + ELEVATION ---- */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-pill: 999px;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.07), 0 8px 20px -12px rgba(0, 0, 0, 0.18);
    --shadow-3: 0 4px 14px rgba(0, 0, 0, 0.10), 0 18px 40px -20px rgba(0, 0, 0, 0.25);

    /* ---- MOTION ---- */
    --ease: cubic-bezier(0.4, 0.1, 0.2, 1);
    --dur-1: 0.16s;
    --dur-2: 0.28s;


    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px 40px;
    font-family: var(--serif);
    color: var(--ink);
  }

  #cpGraphicsModule *,
  #cpGraphicsModule *::before,
  #cpGraphicsModule *::after { box-sizing: border-box; }

  #cpGraphicsModule :focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 6px;
  }

  /* ---------- Intro ---------- */
  #cpGraphicsModule .cp-gx-intro {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 6px 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--on-host-line);
  }

  #cpGraphicsModule .cp-gx-intro h2 {
    margin: 0;
    font-size: var(--fs-2xl);
    font-weight: 900;
    color: var(--on-host);
  }

  #cpGraphicsModule .cp-gx-intro p {
    margin: 4px 0 0;
    font-size: var(--fs-base);
    line-height: 1.45;
    color: var(--on-host-muted);
  }

  #cpGraphicsModule .cp-gx-intro-note {
    margin-left: auto;
    flex: 0 0 auto;
    font-family: var(--sans);
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-host-accent);
    white-space: nowrap;
  }

  /* ---------- Type switcher ---------- */
  #cpGraphicsModule .cp-gx-types {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
  }

  #cpGraphicsModule .cp-gx-type {
    flex: 1 1 auto;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf8 0%, #f1eee7 100%);
    font-family: var(--sans);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  }

  #cpGraphicsModule .cp-gx-type:hover { transform: translateY(-1px); border-color: rgba(196, 30, 58, 0.4); }

  #cpGraphicsModule .cp-gx-type.is-active {
    border-color: var(--red-dark);
    background: linear-gradient(180deg, #fff6f7, #f7e6e9);
    box-shadow: 0 0 0 1px rgba(143, 21, 41, 0.35), 0 8px 18px rgba(143, 21, 41, 0.14);
  }

  /* A 4:5 sliver of the graphic's own palette, so the switcher reads as five
     posters rather than five words. */
  #cpGraphicsModule .cp-gx-swatch {
    position: relative;
    width: 30px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(155deg, #a3122b, #5e0716 62%, #33060f);
    box-shadow: 0 2px 6px rgba(60, 0, 14, 0.28);
  }

  /* The switcher swatches follow the chosen palette, so the studio itself
     previews the colour decision rather than always showing red. */
  #cpGraphicsModule[data-theme="sky"] .cp-gx-swatch { background: linear-gradient(155deg, #eaf7fe, #a9dcf4 60%, #7cc6ea); }
  #cpGraphicsModule[data-theme="steel"] .cp-gx-swatch { background: linear-gradient(155deg, #3a80a8, #1f5878 62%, #0a2130); }
  #cpGraphicsModule[data-theme="midnight"] .cp-gx-swatch { background: linear-gradient(155deg, #1b3a55, #0a1a29 62%, #050e18); }

  #cpGraphicsModule[data-theme="sky"] .cp-gx-swatch::after { background: rgba(11, 43, 64, 0.82); }

  #cpGraphicsModule .cp-gx-swatch::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 12px;
    height: 13px;
    border-radius: 3px;
    background: rgba(247, 241, 232, 0.9);
  }

  #cpGraphicsModule .cp-gx-type-label {
    min-width: 0;
    font-size: var(--fs-sm);
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--ink);
    line-height: 1.2;
  }

  #cpGraphicsModule .cp-gx-type-sub {
    display: block;
    margin-top: 3px;
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* ---------- Studio ---------- */
  #cpGraphicsModule .cp-gx-studio {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(300px, 380px);
    gap: 16px;
    align-items: start;
  }

  #cpGraphicsModule .cp-gx-stage {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf8 0%, #f1eee7 100%);
  }

  #cpGraphicsModule .cp-gx-canvas-wrap {
    position: relative;
    width: min(100%, 460px);
    overflow: hidden;
    border-radius: 14px;
    background: #33060f;
    box-shadow: 0 16px 40px rgba(34, 0, 8, 0.28);
  }

  #cpGraphicsModule .cp-gx-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  #cpGraphicsModule .cp-gx-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(51, 6, 15, 0.78);
    color: #f7f1e8;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: center;
  }

  #cpGraphicsModule .cp-gx-loading[hidden] { display: none; }

  #cpGraphicsModule .cp-gx-stage-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 460px);
  }

  #cpGraphicsModule .cp-gx-status {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 700;
    line-height: 1.35;
    color: #6f6761;
  }

  #cpGraphicsModule .cp-gx-status.is-error { color: var(--red-dark); }

  /* ---------- Controls ---------- */
  #cpGraphicsModule .cp-gx-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #ffffff;
  }

  #cpGraphicsModule .cp-gx-group { display: flex; flex-direction: column; gap: 9px; }

  #cpGraphicsModule .cp-gx-group-title {
    margin: 0;
    font-family: var(--sans);
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 7px;
    border-bottom: 1px solid var(--line-soft);
  }

  #cpGraphicsModule .cp-gx-field { display: grid; gap: 5px; }

  #cpGraphicsModule .cp-gx-field > label {
    font-family: var(--sans);
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  #cpGraphicsModule .cp-gx-field select,
  #cpGraphicsModule .cp-gx-field input[type="text"],
  #cpGraphicsModule .cp-gx-field input[type="date"],
  #cpGraphicsModule .cp-gx-field input[type="number"] {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 9px;
    background: #ffffff;
    color: #252525;
    font-family: var(--sans);
    font-size: var(--fs-sm);
    font-weight: 800;
  }

  #cpGraphicsModule .cp-gx-field select:focus,
  #cpGraphicsModule .cp-gx-field input:focus {
    outline: none;
    border-color: rgba(196, 30, 58, 0.5);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
  }

  #cpGraphicsModule .cp-gx-field textarea {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 9px;
    background: #ffffff;
    color: #252525;
    font-family: var(--sans);
    font-size: var(--fs-sm);
    line-height: 1.45;
    font-weight: 600;
    resize: vertical;
  }

  #cpGraphicsModule .cp-gx-field textarea:focus {
    outline: none;
    border-color: rgba(196, 30, 58, 0.5);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
  }

  #cpGraphicsModule .cp-gx-rangefield input[type="range"] {
    width: 100%;
    accent-color: var(--red);
  }

  #cpGraphicsModule .cp-gx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

  #cpGraphicsModule .cp-gx-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 11px;
    border-radius: 9px;
    border: 1px dashed rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.6);
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5d574d;
    cursor: pointer;
  }

  #cpGraphicsModule .cp-gx-toggle.is-active {
    border-style: solid;
    background: rgba(196, 30, 58, 0.12);
    border-color: rgba(196, 30, 58, 0.45);
    color: var(--red-dark);
  }

  /* ---------- Image upload ----------
     Every graphic takes an image, so the control is one component used five
     times rather than a bolt-on that only the promotion graphic has. */
  #cpGraphicsModule .cp-gx-drop {
    display: grid;
    gap: 8px;
    padding: 11px;
    border-radius: 11px;
    border: 1px dashed rgba(0, 0, 0, 0.22);
    background: #fbf9f6;
    transition: border-color 0.15s ease, background 0.15s ease;
  }

  #cpGraphicsModule .cp-gx-drop.is-over {
    border-color: rgba(196, 30, 58, 0.6);
    border-style: solid;
    background: rgba(196, 30, 58, 0.07);
  }

  #cpGraphicsModule .cp-gx-drop-head {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #cpGraphicsModule .cp-gx-thumb {
    width: 38px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 7px;
    overflow: hidden;
    background: linear-gradient(180deg, #efe7e8, #ded2d4);
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: grid;
    place-items: center;
  }

  #cpGraphicsModule .cp-gx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

  #cpGraphicsModule .cp-gx-drop-copy {
    min-width: 0;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 800;
    line-height: 1.4;
    color: #6f6761;
    overflow-wrap: anywhere;
  }

  #cpGraphicsModule .cp-gx-drop-actions { display: flex; gap: 8px; }
  #cpGraphicsModule .cp-gx-drop input[type="file"] { display: none; }

  #cpGraphicsModule .cp-gx-action {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    color: #444444;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }

  #cpGraphicsModule .cp-gx-action:hover:not(:disabled) {
    border-color: rgba(196, 30, 58, 0.36);
    color: var(--red-dark);
  }

  #cpGraphicsModule .cp-gx-action.is-primary {
    border-color: var(--red-dark);
    background: linear-gradient(180deg, #cc314b, #ad1b34);
    color: #ffffff;
    min-height: 40px;
    font-size: var(--fs-xs);
  }

  #cpGraphicsModule .cp-gx-action:disabled { opacity: 0.48; cursor: not-allowed; }

  /* ---------- Lineup editor ----------
     Mirrors the farm report's board editor: a numbered slot, a select over
     every eligible performer, and two nudge buttons. */
  #cpGraphicsModule .cp-gx-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
  }

  #cpGraphicsModule .cp-gx-slot {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 28px 28px;
    align-items: center;
    gap: 6px;
  }

  /* Bench rows sit below the board's own slots, quieter, so the split
     between "on the graphic" and "one click away" is visible at a glance. */
  #cpGraphicsModule .cp-gx-bench-label {
    margin: 8px 0 2px;
    font-family: var(--sans);
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border-top: 1px dashed var(--line);
    padding-top: 8px;
  }

  #cpGraphicsModule .cp-gx-slot.is-bench select { opacity: 0.72; }
  #cpGraphicsModule .cp-gx-slot.is-bench .cp-gx-slot-no { opacity: 0.5; }

  #cpGraphicsModule .cp-gx-slot-no {
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 900;
    color: var(--muted);
    text-align: right;
  }

  #cpGraphicsModule .cp-gx-slot select {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 8px;
    background: #ffffff;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 800;
    color: #252525;
  }

  #cpGraphicsModule .cp-gx-slot-btn {
    height: 32px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #6f6761;
    font-size: var(--fs-base);
    line-height: 1;
    cursor: pointer;
  }

  #cpGraphicsModule .cp-gx-slot-btn:hover:not(:disabled) { border-color: rgba(196, 30, 58, 0.36); color: var(--red-dark); }
  #cpGraphicsModule .cp-gx-slot-btn:disabled { opacity: 0.35; cursor: not-allowed; }

  /* Framing controls for an uploaded photo. Sliders rather than a drag
     handle on the canvas: the preview is a scaled-down 1080px canvas, so a
     drag there would be imprecise in exactly the axis that matters. */
  #cpGraphicsModule .cp-gx-crop {
    display: grid;
    gap: 7px;
    padding-top: 9px;
    margin-top: 2px;
    border-top: 1px dashed var(--line);
  }

  #cpGraphicsModule .cp-gx-crop label {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: var(--fs-micro);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  #cpGraphicsModule .cp-gx-crop input[type="range"] {
    width: 100%;
    accent-color: var(--red);
  }

  #cpGraphicsModule .cp-gx-hint {
    margin: 0;
    font-family: var(--sans);
    font-size: var(--fs-xs);
    line-height: 1.45;
    color: #8a827b;
  }

  @media (max-width: 900px) {
    #cpGraphicsModule .cp-gx-studio { grid-template-columns: 1fr; }
    #cpGraphicsModule .cp-gx-canvas-wrap,
    #cpGraphicsModule .cp-gx-stage-foot { width: min(100%, 420px); }
  }

  @media (max-width: 640px) {
    #cpGraphicsModule .cp-gx-intro { flex-direction: column; align-items: flex-start; gap: 8px; }
    #cpGraphicsModule .cp-gx-intro-note { margin-left: 0; }
    #cpGraphicsModule .cp-gx-type { min-width: 0; flex-basis: calc(50% - 4px); }
    #cpGraphicsModule .cp-gx-row { grid-template-columns: 1fr; }
  }

  @media (prefers-reduced-motion: reduce) {
    #cpGraphicsModule *,
    #cpGraphicsModule *::before,
    #cpGraphicsModule *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Narrow screens lift the bottom of the type scale: the same chip that can
     sit at 11.5px on a desktop table is being read at arm's length on a phone.
     Only the small end moves -- headings are already large enough. */
  @media (max-width: 640px) {
    #cpGraphicsModule {
      --fs-micro: 12px;
      --fs-xs: 12.5px;
      --fs-sm: 13.5px;
      --fs-base: 14.5px;
      --fs-md: 15.5px;
    }
  }

  /* iOS holds a tap for ~300ms waiting to see whether a double-tap-zoom is
     coming. `manipulation` releases it, which is the single cheapest
     responsiveness win on a phone. Applied to everything interactive rather
     than per-control, so a new button cannot forget it. */
  #cpGraphicsModule button,
  #cpGraphicsModule a,
  #cpGraphicsModule select,
  #cpGraphicsModule input,
  #cpGraphicsModule [role="button"],
  #cpGraphicsModule [role="tab"] { touch-action: manipulation; }

  /* Phones with a home indicator overlay the bottom of the viewport. A spacer
     rather than a padding override: every module sets its own padding under
     `.cp-is-mobile`, which is more specific than this bare id, so an override
     silently lost. This ADDS to whatever padding is already there. */
  @media (max-width: 640px) {
    #cpGraphicsModule::after {
      content: "";
      display: block;
      height: env(safe-area-inset-bottom, 0px);
    }
  }
