/* Approved infinite space theme: visual layer only. */
body.ip-prism-theme.ip-infinite-theme{--ip-infinite-stars:url("/v1/assets/infinite-starfield-893669e8c9a0b08f.jpg");}
/* Ideapop Infinite — approved boundless space + airy typography.
   Append after Prism core/workflows. The build supplies --ip-infinite-stars.
   No layout-dependent business behavior, content replacement or media tinting. */
body.ip-prism-theme.ip-infinite-theme {
  --ip-bg: #061126;
  --ip-work: #0d1d34;
  --ip-raised: #172c46;
  --ip-surface-raised: #172c46;
  --ip-surface: #0e1d34;
  --ip-ink: #e4edf9;
  --ip-muted: #a4b7d0;
  --ip-faint: #92aac7;
  --ip-blue: #abd7f4;
  --ip-blue-soft: #c6e0f5;
  --ip-violet: #a8aecb;
  --ip-line: rgba(114, 149, 184, .25);
  --ip-line-strong: rgba(117, 155, 192, .38);
  --ip-surface-gradient: linear-gradient(145deg, rgba(21, 41, 66, .95), rgba(11, 28, 49, .97));
  --ip-glass: linear-gradient(145deg, rgba(24, 45, 70, .92), rgba(11, 29, 50, .94));
  --ip-shadow: 0 17px 42px rgba(0, 7, 24, .25), inset 0 1px rgba(220, 237, 255, .035);
  --if-title-weight: 300;
  --if-title-track: .025em;
  --if-control-bg: #10243e;
  --if-control-border: rgba(101, 138, 175, .47);
  --if-control-ink: #c8dbee;
  --if-control-shadow: inset 0 1px rgba(214, 236, 255, .035);
  --if-primary-bg: linear-gradient(115deg, #213d5d, #172e49);
  --if-primary-border: rgba(120, 159, 197, .67);
  --if-primary-ink: #e2edf9;
  --if-focus: #b9e2ff;
  --if-sky-image: linear-gradient(90deg, rgba(6, 17, 38, .27), rgba(6, 17, 38, .07) 48%, rgba(6, 17, 38, .02)), linear-gradient(180deg, rgba(6, 17, 38, .16), transparent 42%, rgba(6, 17, 38, .22)), var(--ip-infinite-stars, none);
  min-width: 0;
  color: var(--ip-ink);
  color-scheme: dark;
  background-color: var(--ip-bg);
  background-image: var(--if-sky-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center, center, 72% center;
  background-attachment: fixed;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
}

/* Keep the cosmos continuous behind the existing application regions. */
body.ip-prism-theme.ip-infinite-theme :is(.app-page, .app-content, .board-layout, .board-main, .login-page) { background: transparent; }
body.ip-prism-theme.ip-infinite-theme :is(.app-content, .board-main, .card, .modal, .toolbar, .button-row, .columns, .form, .se-page, .ew-page) { min-width: 0; }
body.ip-prism-theme.ip-infinite-theme ::selection { background: #355778; color: #edf7ff; }
body.ip-prism-theme.ip-infinite-theme :is(p, li, label) { overflow-wrap: anywhere; }
body.ip-prism-theme.ip-infinite-theme :is(h1, h2, h3, h4) { color: var(--ip-ink); text-shadow: none; overflow-wrap: anywhere; }
body.ip-prism-theme.ip-infinite-theme :is(.page-heading, .page-top, .hero) h1 {
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.28;
  font-weight: var(--if-title-weight);
  letter-spacing: var(--if-title-track);
  margin-top: 11px;
  margin-bottom: 17px;
  text-shadow: 0 2px 14px rgba(4, 16, 40, .5);
}
body.ip-prism-theme.ip-infinite-theme .page-top h1 { margin-bottom: 0; }
body.ip-prism-theme.ip-infinite-theme :is(h2, .card h2) { font-size: 23px; line-height: 1.5; font-weight: 400; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme h3 { font-size: 18px; line-height: 1.55; font-weight: 500; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme h4 { font-size: 16px; line-height: 1.6; font-weight: 500; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme :is(.page-heading, .hero, .card > header) p { color: #afc1d7; font-size: 14px; line-height: 1.8; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme :is(.muted, .requirements, .episode-plan p) { color: var(--ip-muted); }
body.ip-prism-theme.ip-infinite-theme .requirements { color: #c2d2e6; font-size: 14px; line-height: 1.9; }
body.ip-prism-theme.ip-infinite-theme :is(.fine, .project-card p, .history-item time, .usage-table small, .audit-list time, .standalone-prompt small, .loadout-prompt small) { color: var(--ip-faint); font-size: 12px; line-height: 1.75; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme :is(.eyebrow, .project-code) { color: #9cb5d2; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; font-weight: 400; letter-spacing: .10em; }
body.ip-prism-theme.ip-infinite-theme :is(.tag, .se-status, .ew-state) { font-size: 12px; line-height: 1.55; font-weight: 400; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme a { color: #bbd8f0; text-decoration-thickness: 1px; }
body.ip-prism-theme.ip-infinite-theme a:hover { color: #e0effc; }

/* Single control palette. Paint properties alone use !important so legacy
   workspace selectors and inline button paint cannot restore bright fills.
   States change only these local tokens; sizes/layout remain with the app. */
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link, .upload, .se-upload, .ew-upload) {
  --if-control-bg: #10243e;
  --if-control-border: rgba(101, 138, 175, .47);
  --if-control-ink: #c8dbee;
  --if-control-shadow: inset 0 1px rgba(214, 236, 255, .035);
  color: var(--if-control-ink) !important;
  background: var(--if-control-bg) !important;
  border-color: var(--if-control-border) !important;
  box-shadow: var(--if-control-shadow) !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .015em;
  border-radius: 8px;
  max-width: 100%;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 150ms ease;
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link, .upload, .se-upload, .ew-upload):hover:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: #1a3551;
  --if-control-border: rgba(139, 178, 214, .65);
  --if-control-ink: #e4f0ff;
  --if-control-shadow: inset 0 1px rgba(210, 232, 253, .06);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link, .upload, .se-upload, .ew-upload):active:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: #132b45;
  --if-control-border: #597d9e;
  --if-control-ink: #d2e2f2;
  --if-control-shadow: inset 0 2px 5px rgba(2, 11, 28, .24);
  transform: translateY(1px);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.primary, .generate-button, .se-primary, .ew-primary) {
  --if-control-bg: var(--if-primary-bg);
  --if-control-border: var(--if-primary-border);
  --if-control-ink: var(--if-primary-ink);
  --if-control-shadow: 0 3px 12px rgba(2, 11, 28, .25), inset 0 1px rgba(174, 204, 234, .07);
  border-style: solid;
  border-width: 1px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .015em;
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.primary, .generate-button, .se-primary, .ew-primary):hover:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: linear-gradient(115deg, #2a4b6e, #203c5b);
  --if-control-border: rgba(152, 188, 221, .76);
  --if-control-ink: #edf6ff;
  --if-control-shadow: 0 4px 17px rgba(2, 11, 28, .26), inset 0 1px rgba(192, 221, 244, .10);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.primary, .generate-button, .se-primary, .ew-primary):active:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: #172f4a;
  --if-control-border: #7298b9;
  --if-control-ink: #d7e6f4;
  --if-control-shadow: inset 0 2px 5px rgba(2, 11, 28, .32);
}
body.ip-prism-theme.ip-infinite-theme :is(button.ghost, button.back, .danger-text, .se-file button, .standalone-ref-row button) {
  --if-control-bg: transparent;
  --if-control-border: transparent;
  --if-control-shadow: none;
}
body.ip-prism-theme.ip-infinite-theme :is(button.ghost, button.back):hover:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: rgba(26, 53, 81, .66);
  --if-control-border: rgba(112, 150, 188, .32);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.danger, .se-leave-clear, .ew-danger) {
  --if-control-bg: #322436;
  --if-control-border: rgba(162, 108, 130, .58);
  --if-control-ink: #e5b6c2;
  --if-control-shadow: inset 0 1px rgba(218, 182, 195, .025);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.danger, .se-leave-clear, .ew-danger):hover:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: #432b3c;
  --if-control-border: #b77e91;
  --if-control-ink: #f1cdd6;
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.danger, .se-leave-clear, .ew-danger):active:not(:disabled):not([aria-disabled="true"]) {
  --if-control-bg: #2c2030;
  --if-control-border: #91657a;
  --if-control-shadow: inset 0 2px 5px rgba(17, 6, 17, .25);
}
body.ip-prism-theme.ip-infinite-theme :is(.danger-text, .se-file button, .standalone-ref-row button) { --if-control-ink: #d9a6b6; }
body.ip-prism-theme.ip-infinite-theme :is(.danger-text, .se-file button, .standalone-ref-row button):hover:not(:disabled):not([aria-disabled="true"]) { --if-control-bg: rgba(71, 42, 58, .66); --if-control-border: rgba(169, 115, 136, .32); --if-control-ink: #f0cad7; }
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.active, [aria-pressed="true"], [aria-selected="true"]):where(:not(.danger):not(.danger-text):not(:disabled):not([aria-disabled="true"])) {
  --if-control-bg: linear-gradient(105deg, #203b56, #162b43);
  --if-control-border: rgba(127, 172, 209, .58);
  --if-control-ink: #d6ecff;
  --if-control-shadow: inset 0 1px rgba(224, 242, 255, .04);
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link, .upload, .se-upload, .ew-upload):is(:disabled, [aria-disabled="true"]) {
  --if-control-bg: #13263d;
  --if-control-border: rgba(86, 116, 147, .45);
  --if-control-ink: #9eb0c6;
  --if-control-shadow: none;
  opacity: .48;
  transform: none;
  cursor: not-allowed;
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.primary, .generate-button, .se-primary, .ew-primary):is(:disabled, [aria-disabled="true"]),
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.active, [aria-pressed="true"], [aria-selected="true"]):is(:disabled, [aria-disabled="true"]) {
  --if-control-bg: #13263d;
  --if-control-border: rgba(86, 116, 147, .45);
  --if-control-ink: #9eb0c6;
  --if-control-shadow: none;
}
body.ip-prism-theme.ip-infinite-theme :is(button, .button-link):is(.danger, .se-leave-clear, .ew-danger):is(:disabled, [aria-disabled="true"]) { --if-control-bg: #292332; --if-control-border: #655166; --if-control-ink: #b99fac; --if-control-shadow: none; }
body.ip-prism-theme.ip-infinite-theme :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--if-focus); outline-offset: 3px; }
body.ip-prism-theme.ip-infinite-theme :is(.upload, .se-upload, .ew-upload):focus-within { outline: 2px solid var(--if-focus); outline-offset: 3px; }

/* Navigation remains legible over the same star field, without bright slabs. */
body.ip-prism-theme.ip-infinite-theme :is(.app-top, .project-sidebar, .se-top, .ew-top) { background: rgba(8, 23, 43, .94); border-color: rgba(102, 137, 177, .28); box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme .app-top::before { background: linear-gradient(90deg, transparent, rgba(142, 179, 214, .35), transparent); }
body.ip-prism-theme.ip-infinite-theme .brand-mark { color: #dce8f6; font-size: 18px; font-weight: 500; letter-spacing: .10em; }
body.ip-prism-theme.ip-infinite-theme .brand-mark::before { transform: translateY(-50%); background: #10243c; border-color: rgba(112, 154, 195, .66); box-shadow: inset 0 1px rgba(209, 232, 255, .07); }
body.ip-prism-theme.ip-infinite-theme .brand-mark span { font-size: 12px; color: var(--ip-muted); letter-spacing: .035em; }
body.ip-prism-theme.ip-infinite-theme .top-user > span { color: var(--ip-muted); font-size: 12px; }
body.ip-prism-theme.ip-infinite-theme .top-user > button { font-size: 13px; font-weight: 500; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme .project-sidebar h2 { font-size: 22px; font-weight: 400; line-height: 1.55; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme .project-sidebar > p { font-size: 12px; color: var(--ip-faint); }
body.ip-prism-theme.ip-infinite-theme .project-sidebar nav button { --if-control-bg: transparent; --if-control-border: transparent; --if-control-ink: #a9bdd6; --if-control-shadow: none; font-size: 13px; font-weight: 500; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme .project-sidebar nav button:hover:not(:disabled):not([aria-disabled="true"]) { --if-control-bg: #1a304a; --if-control-border: rgba(120, 155, 190, .22); --if-control-ink: #e3effc; }
body.ip-prism-theme.ip-infinite-theme .project-sidebar nav button.active:not(:disabled):not([aria-disabled="true"]) { --if-control-bg: linear-gradient(100deg, #203b56, #162b43); --if-control-border: rgba(125, 168, 203, .40); --if-control-ink: #d6ecff; --if-control-shadow: inset 2px 0 #a4d0f0; }
body.ip-prism-theme.ip-infinite-theme .project-sidebar nav button.active::before { background: #a4d0f0; box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme :is(.sidebar-footer, .page-top) { border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme .page-top > button { font-size: 14px; }

/* Dense editing is opaque. The image is only a backdrop, never a text surface. */
body.ip-prism-theme.ip-infinite-theme :is(.card, .project-card, .quick-actions, .login-card, .modal, .video-loadout, .prompt-editor, .se-leave-dialog) {
  color: var(--ip-ink);
  background: var(--ip-surface-gradient);
  border-color: var(--ip-line-strong);
  box-shadow: var(--ip-shadow);
}
body.ip-prism-theme.ip-infinite-theme .card .card { background: #0c1c32; border-color: var(--ip-line); box-shadow: inset 0 1px rgba(210, 234, 255, .025); }
body.ip-prism-theme.ip-infinite-theme .hero.card { background: linear-gradient(135deg, rgba(20, 39, 63, .91), rgba(10, 27, 48, .95)); border-color: rgba(123, 159, 194, .36); }
body.ip-prism-theme.ip-infinite-theme :is(.hero.card, .login-card)::before { background: linear-gradient(90deg, transparent, rgba(159, 191, 219, .48), transparent); }
body.ip-prism-theme.ip-infinite-theme .project-card:hover { border-color: rgba(149, 184, 216, .58); box-shadow: 0 18px 44px rgba(0, 7, 24, .32), inset 0 1px rgba(214, 235, 255, .05); }
body.ip-prism-theme.ip-infinite-theme .project-card h2 { font-size: 27px; font-weight: 400; letter-spacing: .035em; line-height: 1.5; }
body.ip-prism-theme.ip-infinite-theme .project-actions { border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme :is(.stat-grid, .usage-cards) .card { background: var(--ip-glass); border-color: var(--ip-line-strong); box-shadow: var(--ip-shadow); }
body.ip-prism-theme.ip-infinite-theme :is(.stat-grid, .usage-cards) strong { font-weight: 300; letter-spacing: -.025em; color: #cee2f3; text-shadow: none; }
body.ip-prism-theme.ip-infinite-theme :is(.stat-grid, .usage-cards) .card > span { font-size: 13px; color: #abc0d8; }
body.ip-prism-theme.ip-infinite-theme .quick-actions-heading h2 { font-weight: 400; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme .quick-action-card { --if-control-bg: linear-gradient(140deg, #162c46, #10243d); --if-control-border: rgba(115, 151, 187, .35); --if-control-shadow: inset 0 1px rgba(211, 234, 255, .04); }
body.ip-prism-theme.ip-infinite-theme .quick-action-card:hover:not(:disabled):not([aria-disabled="true"]) { --if-control-bg: linear-gradient(140deg, #1c3652, #142c45); --if-control-border: rgba(147, 182, 214, .58); }
body.ip-prism-theme.ip-infinite-theme .quick-action-card strong { font-size: 18px; font-weight: 500; line-height: 1.55; letter-spacing: .02em; color: #dceafa; }
body.ip-prism-theme.ip-infinite-theme .quick-action-card div span { font-size: 13px; line-height: 1.8; color: #9fb5d0; }
body.ip-prism-theme.ip-infinite-theme .quick-action-icon { color: #a9cce9 !important; background: #112840; border-color: rgba(111, 153, 192, .39); box-shadow: inset 0 1px rgba(210, 235, 255, .035); }
body.ip-prism-theme.ip-infinite-theme .quick-action-arrow { color: #9bb9d8; }
body.ip-prism-theme.ip-infinite-theme :is(.modal, .se-leave-dialog) { background: linear-gradient(145deg, #162c46, #0c1c33 70%); border-color: rgba(132, 173, 210, .53); box-shadow: 0 25px 80px rgba(0, 7, 24, .6), inset 0 1px rgba(217, 237, 255, .06); }
body.ip-prism-theme.ip-infinite-theme :is(.modal-shade, .se-leave-shade) { background: rgba(2, 10, 26, .84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.ip-prism-theme.ip-infinite-theme .modal > header h2,
body.ip-prism-theme.ip-infinite-theme .se-leave-dialog h2 { font-size: 25px; font-weight: 400; line-height: 1.45; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme .modal > header button { font-size: 22px; font-weight: 400; }
body.ip-prism-theme.ip-infinite-theme .login-card { background: linear-gradient(145deg, rgba(21, 42, 68, .95), rgba(9, 26, 47, .97)); }
body.ip-prism-theme.ip-infinite-theme .login-card h1 { font-size: 35px; line-height: 1.35; letter-spacing: .025em; font-weight: 300; }
body.ip-prism-theme.ip-infinite-theme .login-card > p { font-size: 14px; line-height: 1.85; }
body.ip-prism-theme.ip-infinite-theme .login-card > .fine { font-size: 12px; }

/* Form wells share the same blue; preserve Safari's native option selection. */
body.ip-prism-theme.ip-infinite-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.ip-prism-theme.ip-infinite-theme select,
body.ip-prism-theme.ip-infinite-theme textarea,
body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) :is(input, select, textarea) {
  background-color: #091a30;
  color: #cedff1;
  border-color: rgba(96, 139, 179, .61);
  box-shadow: inset 0 2px 6px rgba(0, 9, 28, .16);
  caret-color: #b8dcff;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0;
  max-width: 100%;
}
body.ip-prism-theme.ip-infinite-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):hover:not(:disabled),
body.ip-prism-theme.ip-infinite-theme :is(input, select, textarea):hover:not(:disabled) { border-color: rgba(136, 174, 208, .68); }
body.ip-prism-theme.ip-infinite-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus,
body.ip-prism-theme.ip-infinite-theme :is(input, select, textarea):focus { border-color: #a0c8e9; box-shadow: 0 0 0 3px rgba(119, 173, 226, .09); }
body.ip-prism-theme.ip-infinite-theme :is(input, textarea)::placeholder { color: #8aa1bd; opacity: 1; }
body.ip-prism-theme.ip-infinite-theme :is(input, select, textarea):disabled { opacity: .52; }
body.ip-prism-theme.ip-infinite-theme textarea { font-size: 14px; line-height: 1.85; scrollbar-color: #436487 #0b1c32; }
body.ip-prism-theme.ip-infinite-theme select { -webkit-appearance: none; appearance: none; }
body.ip-prism-theme.ip-infinite-theme select:not([multiple]):not([size]),
body.ip-prism-theme.ip-infinite-theme select:not([multiple])[size="0"],
body.ip-prism-theme.ip-infinite-theme select:not([multiple])[size="1"] {
  background-color: #091a30;
  background-image: linear-gradient(45deg, transparent 50%, #b1cde6 50%), linear-gradient(135deg, #b1cde6 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
body.ip-prism-theme.ip-infinite-theme select[multiple],
body.ip-prism-theme.ip-infinite-theme select[size]:not([size="0"]):not([size="1"]) { background-image: none; }
body.ip-prism-theme.ip-infinite-theme select option { background: #10233b; color: #d6e6f5; }
body.ip-prism-theme.ip-infinite-theme :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: #83a9cc; }
body.ip-prism-theme.ip-infinite-theme :is(.form label, .columns > label, .standalone-settings label, .loadout-settings label, .structured-fields label, .se-field, .ew-label) { font-size: 13px; font-weight: 500; line-height: 1.7; color: #b7cde5; letter-spacing: .01em; }
body.ip-prism-theme.ip-infinite-theme :is(.form fieldset, .reference-library-picker, .approval-grid article) { background: rgba(8, 24, 44, .72); border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme legend { color: #bbd1e9; font-size: 13px; font-weight: 500; }
body.ip-prism-theme.ip-infinite-theme input[type="file"]::file-selector-button { background: #19314d; color: #c8ddee; border-color: rgba(112, 151, 191, .45); font: inherit; font-size: 12px; }

/* Script, breakdown, asset, animation and results have one reading surface. */
body.ip-prism-theme.ip-infinite-theme :is(.episode-section, .episode-editor, .asset-plan, .candidate, .history-item, .standalone-job, .shot-card, .standalone-ref, .se-panel, .se-shot, .ew-section, .ew-shot) { background: linear-gradient(145deg, #122740, #0c1d34); border-color: var(--ip-line); box-shadow: inset 0 1px rgba(219, 237, 255, .025); }
body.ip-prism-theme.ip-infinite-theme :is(.shot-card.owned, .reference-library-item.selected, .reference-tile.selected) { background: #162f48; border-color: rgba(153, 193, 225, .58); box-shadow: inset 0 1px rgba(221, 240, 255, .05); }
body.ip-prism-theme.ip-infinite-theme :is(.episode-section > summary, .shot-card-heading strong, .se-shot summary) { font-size: 15px; line-height: 1.65; font-weight: 500; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme .episode-section[open] > summary { background: linear-gradient(105deg, #1c354f, #142a43); color: #cfE2f3; border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme .episode-section > summary:hover { background: rgba(41, 69, 98, .50); }
body.ip-prism-theme.ip-infinite-theme summary { color: #bfd5ec; font-size: 14px; font-weight: 400; letter-spacing: 0; }
body.ip-prism-theme.ip-infinite-theme summary:hover { color: #e0effb; }
body.ip-prism-theme.ip-infinite-theme summary::marker { color: #a4c6e2; }
body.ip-prism-theme.ip-infinite-theme .draft-breakdown > header h3 { font-size: 23px; font-weight: 400; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme .draft-breakdown table td:first-child { color: #d5e4f3; font-weight: 500; }
body.ip-prism-theme.ip-infinite-theme :is(.table-scroll, .usage-table-wrap) { scrollbar-color: #476487 #0b1c32; }
body.ip-prism-theme.ip-infinite-theme :is(.usage-table th, .draft-breakdown th) { background: #0b1e35; color: #a9c2df; font-size: 12px; font-weight: 500; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme :is(.usage-table td, .draft-breakdown td) { color: #c4d6ea; }
body.ip-prism-theme.ip-infinite-theme .usage-table tbody tr:hover { background: rgba(45, 77, 109, .15); }
body.ip-prism-theme.ip-infinite-theme .camera-coverage-preview { background: rgba(7, 22, 42, .79); border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme .camera-coverage-preview details { background: rgba(17, 37, 62, .66); border-color: var(--ip-line); }
body.ip-prism-theme.ip-infinite-theme :is(.camera-prompt-grid article, .camera-prompt-editor article, .camera-prompt-editor > label, .reference-tile, .reference-upload, .reference-library-item, .se-pool-group, .se-file-wrap, .se-file, .se-ref-choice, .ew-pool-item, .ew-ref, .ew-camera-card) { background: #0b2038; border-color: var(--ip-line); color: #c3d6eb; }
body.ip-prism-theme.ip-infinite-theme :is(.reference-tile, .reference-upload):hover { background: #152f49; border-color: rgba(139, 179, 214, .48); }
body.ip-prism-theme.ip-infinite-theme :is(.reference-tile span, .reference-tile small, .reference-upload small, .reference-library-item span) { color: #a4bdd7; font-size: 12px; line-height: 1.7; }
body.ip-prism-theme.ip-infinite-theme :is(.camera-prompt-grid article > strong, .camera-prompt-editor > label > span, .ew-camera-card strong) { color: #bedaf0; font-weight: 500; font-size: 13px; }
body.ip-prism-theme.ip-infinite-theme :is(.camera-prompt-grid article > p, .episode-editor pre, .script-preview pre) { color: #c3d4e9; font-size: 15px; line-height: 1.9; }
body.ip-prism-theme.ip-infinite-theme .asset pre { background: #091a30; color: #bcd0e7; font-size: 14px; }
body.ip-prism-theme.ip-infinite-theme :is(.standalone-prompt, .loadout-prompt) textarea { background-color: #091a30; font-size: 14px; line-height: 1.85; }
body.ip-prism-theme.ip-infinite-theme :is(.standalone-ref header strong, .se-pool-head strong, .ew-camera-heading) { color: #cbdff1; font-weight: 500; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme :is(.standalone-job header small, .se-top small, .se-heading small, .se-shot header small, .ew-top small, .ew-camera-card small, .se-file-match label) { color: #9cb5d2; font-size: 12px; font-weight: 400; letter-spacing: .015em; line-height: 1.7; }
body.ip-prism-theme.ip-infinite-theme :is(.loadout-tabs button small, .timeline-preview-list small) { color: #9cb5d0; font-size: 12px; }
body.ip-prism-theme.ip-infinite-theme :is(.candidate-wait, .reference-empty, .image-empty, .media-empty, .ew-media-empty, .empty) { background: rgba(8, 24, 44, .90); border-color: rgba(104, 143, 183, .34); color: #a4bbd3; }
body.ip-prism-theme.ip-infinite-theme .candidate-wait.is-generating { background: #122b44; border-color: #527a9f; color: #bfd9ee; }
body.ip-prism-theme.ip-infinite-theme .candidate-spinner { border-color: #29445f; border-top-color: #a5c8e5; }
body.ip-prism-theme.ip-infinite-theme :is(.candidate-image, .video-preview) { background-color: #061226; border-color: rgba(113, 148, 184, .18); }
body.ip-prism-theme.ip-infinite-theme :is(.ref-chip, .se-status, .ew-state, .tag, .ew-import-state) { background: #122b43; border-color: rgba(116, 156, 192, .31); color: #b8d1e8; box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme :is(.se-file-preview, .reference-upload > span) { color: #a2c2df; background-color: #142e49; }
body.ip-prism-theme.ip-infinite-theme :is(.company-asset-card h3, .library-grid h3) { font-size: 18px; font-weight: 500; letter-spacing: .02em; }

/* Real progress stays data-driven, but loses the electric neon treatment. */
body.ip-prism-theme.ip-infinite-theme .conversion-progress { background: linear-gradient(145deg, #172d48, #0e213b 74%); border-color: rgba(127, 164, 200, .43); border-top-color: rgba(148, 182, 216, .49); box-shadow: 0 20px 46px rgba(2, 9, 25, .33), inset 0 1px rgba(217, 236, 255, .035); }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > div[role="status"] > strong { color: #dae7f6; font-size: 18px; font-weight: 500; letter-spacing: .01em; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > div[role="status"] > p { color: #b6d3ed; font-size: 14px; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > p { font-size: 13px; color: #a1b8d3; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress[data-ip-progress]::before { background: conic-gradient(from -90deg, #b2d3ec 0deg, #739bc1 var(--ip-progress), rgba(116, 151, 190, .17) var(--ip-progress), rgba(116, 151, 190, .17) 360deg); box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress[data-ip-progress]::after { color: #d5e5f4; font-weight: 300; letter-spacing: -.04em; text-shadow: none; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > progress::-webkit-progress-bar { background: #243c59; }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > progress::-webkit-progress-value { background: linear-gradient(90deg, #adcee6, #7199bd); }
body.ip-prism-theme.ip-infinite-theme .conversion-progress > progress::-moz-progress-bar { background: linear-gradient(90deg, #adcee6, #7199bd); }

/* State semantics remain distinct, with restrained blue-compatible surfaces. */
body.ip-prism-theme.ip-infinite-theme :is(.notice, .se-message, .ew-import-state) { background: #10283f; border-color: rgba(105, 149, 192, .40); color: #b8d1e9; box-shadow: inset 2px 0 rgba(133, 178, 214, .48); font-size: 13px; }
body.ip-prism-theme.ip-infinite-theme :is(.error, .se-error, .ew-error, .se-message.se-error, .candidate-wait.is-failed) { background: #292335; border-color: rgba(165, 111, 133, .46); color: #e2b4c1; box-shadow: inset 2px 0 rgba(184, 129, 151, .48); }
body.ip-prism-theme.ip-infinite-theme :is(.success, .ew-success, .loadout-ready, .formal) { background: #122f38; border-color: rgba(103, 155, 153, .43); color: #b5d9d3; box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme :is(.tag.good, .formal h3) { color: #b8ddd5; }
body.ip-prism-theme.ip-infinite-theme .tag.good { background: #16333a; border-color: rgba(114, 166, 156, .34); }
body.ip-prism-theme.ip-infinite-theme :is(.formal p, .formal small) { color: #a5c4c7; }
body.ip-prism-theme.ip-infinite-theme :is(.loadout-blockers, .se-match-warning, .ew-warning, .conversion-progress > .error) { background: #1d2939; border-color: rgba(160, 144, 113, .39); color: #d7c3a4; box-shadow: none; }
body.ip-prism-theme.ip-infinite-theme .ew-warning span { background: #2a2c3a; border-color: rgba(157, 142, 114, .35); color: #d7c3a4; }
body.ip-prism-theme.ip-infinite-theme :is(.blockers, .job-row .error-summary) { color: #d8b3c0; }
body.ip-prism-theme.ip-infinite-theme [aria-invalid="true"] { border-color: #ad9275; }

/* Independently mounted episode tools cover the viewport; repeat only the
   decorative background, never tint real image/video/audio elements. */
body.ip-prism-theme.ip-infinite-theme #standalone-episode-overlay,
body.ip-prism-theme.ip-infinite-theme .ew-backdrop {
  color: var(--ip-ink);
  background-color: var(--ip-bg);
  background-image: var(--if-sky-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center, center, 72% center;
  background-attachment: fixed;
  font-family: inherit;
}
body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) { background: transparent; color: var(--ip-ink); font-family: inherit; font-size: 14px; line-height: 1.75; }
body.ip-prism-theme.ip-infinite-theme :is(.se-top, .ew-top) h1 { font-size: 36px; line-height: 1.35; font-weight: 300; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) h2 { font-size: 23px; line-height: 1.5; font-weight: 400; letter-spacing: .025em; }
body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) h3 { font-size: 18px; font-weight: 500; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme :is(.se-footer, .ew-footer) { background: rgba(8, 23, 43, .98); border-color: var(--ip-line); color: var(--ip-muted); box-shadow: 0 -8px 32px rgba(0, 6, 21, .16); }
body.ip-prism-theme.ip-infinite-theme :is(.se-footer, .ew-footer) strong { color: #d5e4f4; font-weight: 500; }
body.ip-prism-theme.ip-infinite-theme :is(.se-footer, .ew-footer) span { color: #a7bdd7; font-size: 13px; }
body.ip-prism-theme.ip-infinite-theme :is(.se-footer-actions, .se-shot-controls, .ew-controls, .ew-row) { min-width: 0; max-width: 100%; }
body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) :is(button, .se-upload, .ew-upload) { font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: .015em; }
body.ip-prism-theme.ip-infinite-theme :is(.se-shot-result, .se-result-item, .ew-videos) { background: rgba(7, 21, 40, .68); border-color: var(--ip-line); }

/* Respect the established layout breakpoints; text can wrap instead of being
   clipped, and every original action remains accessible at 320px. */
@media (max-width: 1024px) {
  body.ip-prism-theme.ip-infinite-theme .project-sidebar { background: rgba(8, 23, 43, .96); }
  body.ip-prism-theme.ip-infinite-theme .project-sidebar nav button.active:not(:disabled):not([aria-disabled="true"]) { --if-control-shadow: inset 0 -2px #a4d0f0; }
}
@media (max-width: 768px) {
  body.ip-prism-theme.ip-infinite-theme { font-size: 14px; }
  body.ip-prism-theme.ip-infinite-theme :is(.page-heading, .page-top, .hero) h1 { font-size: 38px; line-height: 1.35; letter-spacing: .02em; }
  body.ip-prism-theme.ip-infinite-theme :is(.se-top, .ew-top) h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  body.ip-prism-theme.ip-infinite-theme :is(.page-heading, .page-top, .hero) h1 { font-size: 34px; line-height: 1.35; letter-spacing: .015em; }
  body.ip-prism-theme.ip-infinite-theme :is(h2, .card h2) { font-size: 21px; line-height: 1.5; }
  body.ip-prism-theme.ip-infinite-theme .project-card h2 { font-size: 25px; }
  body.ip-prism-theme.ip-infinite-theme .modal > header h2 { font-size: 23px; }
  body.ip-prism-theme.ip-infinite-theme :is(.se-top, .ew-top) h1 { font-size: 29px; }
  body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) h2 { font-size: 21px; }
  body.ip-prism-theme.ip-infinite-theme .login-card h1 { font-size: 31px; }
  body.ip-prism-theme.ip-infinite-theme .brand-mark { font-size: 17px; letter-spacing: .065em; }
  body.ip-prism-theme.ip-infinite-theme :is(.toolbar, .button-row, .shot-card-actions, .se-footer-actions) button { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  body.ip-prism-theme.ip-infinite-theme :is(.se-page, .ew-page) :is(input, select, textarea),
  body.ip-prism-theme.ip-infinite-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
  body.ip-prism-theme.ip-infinite-theme :is(select, textarea, .standalone-prompt textarea, .loadout-prompt textarea) { font-size: 16px; }
  body.ip-prism-theme.ip-infinite-theme :is(.quick-action-card div span, .page-heading p, .card > header p, .history-item > p) { font-size: 13px; }
  body.ip-prism-theme.ip-infinite-theme .draft-breakdown > header h3 { font-size: 21px; }
  body.ip-prism-theme.ip-infinite-theme .conversion-progress > div[role="status"] > strong { font-size: 17px; }
}
@media (max-width: 360px) {
  body.ip-prism-theme.ip-infinite-theme :is(.page-heading, .page-top, .hero) h1 { font-size: 30px; letter-spacing: .01em; }
  body.ip-prism-theme.ip-infinite-theme .login-card h1 { font-size: 28px; }
  body.ip-prism-theme.ip-infinite-theme .project-sidebar h2 { font-size: 20px; }
  body.ip-prism-theme.ip-infinite-theme :is(.se-top, .ew-top) h1 { font-size: 27px; }
  body.ip-prism-theme.ip-infinite-theme .modal > header h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  body.ip-prism-theme.ip-infinite-theme *,
  body.ip-prism-theme.ip-infinite-theme *::before,
  body.ip-prism-theme.ip-infinite-theme *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
