:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5f6f7a;
  --line: #d9e1e5;
  --panel: #ffffff;
  --surface: #f5f7f4;
  --surface-strong: #e8eee8;
  --accent: #116466;
  --accent-strong: #0b4b4d;
  --amber: #b36b19;
  --red: #9a3d35;
  --blue: #335c81;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.12);
}

.site-footer {
  display: grid;
  gap: 8px;
  padding: 18px 24px 24px;
  text-align: center;
  color: #6f7785;
  font-size: 13px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.private-nav-item[hidden],
#panel-workbench:not(.active),
#project-character-form[hidden],
#project-character-workbench[hidden] {
  display: none;
}

.workbench-heading,
.project-candidate-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.professional-workbench-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
}

.professional-workbench-sidebar,
.professional-workbench-main,
.workbench-authority,
.project-candidate-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 20px;
}

.project-workflow-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.project-workflow-nav button {
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.project-workflow-nav button:hover,
.project-workflow-nav button:focus-visible {
  color: var(--accent);
}

.project-workflow-nav button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.first-time-journey {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7fbfa;
  padding: 18px 20px;
}

.first-time-journey-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.first-time-journey-heading h3 { margin: 0; }

.browser-context-notice {
  max-width: 360px;
  margin: 0;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.first-time-journey-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: journey;
}

.first-time-journey-steps li {
  counter-increment: journey;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.first-time-journey-steps li::before {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  content: counter(journey);
  font-size: 12px;
}

.first-time-journey-steps li.is-complete { color: var(--accent-strong); }
.first-time-journey-steps li.is-complete::before { border-color: var(--accent); background: var(--accent); color: #fff; content: "✓"; }
.first-time-journey-steps li.is-current { color: var(--ink); }
.first-time-journey-steps li.is-current::before { border: 2px solid var(--accent); color: var(--accent-strong); }

.first-time-journey-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.first-time-journey-next .workbench-status { margin: 0; }

@media (max-width: 820px) {
  .first-time-journey-heading { display: grid; gap: 10px; }
  .first-time-journey-steps { grid-template-columns: 1fr; gap: 9px; }
  .first-time-journey-next .primary-button { width: 100%; }
}

.workbench-stack-form,
.workbench-list,
.project-candidate-list {
  display: grid;
  gap: 12px;
}

.workbench-list button,
.project-candidate-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
  text-align: left;
}

.workbench-list button.active { border-color: var(--accent); }
.script-intelligence-history { scroll-margin-top: 20px; }
.script-intelligence-character { padding: 16px; background: var(--surface-strong); }
.script-intelligence-character .candidate-actions { margin-top: 16px; }
.script-progressive-workspace {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 20px;
  scroll-margin-top: 20px;
}
.script-progressive-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  font-size: 13px;
  font-weight: 700;
}
.script-progressive-stages .is-complete { color: var(--accent-strong); }
.script-progressive-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.script-progressive-section h4,
.script-progressive-section h5 { margin: 0; }
.script-progressive-section h4 { margin-bottom: 10px; }
.script-progressive-heading { display: flex; justify-content: space-between; gap: 12px; }
.script-progressive-heading .eyebrow,
.script-progressive-characters .eyebrow,
.script-progressive-character-preview .eyebrow { margin: 0 0 6px; }
.script-progressive-note {
  margin: 10px 0 14px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.55;
}
.script-progressive-relationships,
.script-progressive-characters { display: grid; gap: 10px; }
.script-progressive-relationships article,
.script-progressive-characters article,
.script-progressive-character-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 14px;
}
.script-progressive-relationships p,
.script-progressive-characters p,
.script-progressive-character-preview p { margin: 8px 0 0; }
.script-progressive-characters { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.script-progressive-characters .ghost-button { margin-top: 12px; }
.script-progressive-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 13px;
}
.script-progressive-secondary details { max-width: 100%; }
.script-progressive-secondary summary { color: var(--accent-strong); cursor: pointer; font-weight: 700; }
.workbench-list .script-intelligence-character .primary-button {
  width: auto;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  text-align: center;
}
.workbench-status { min-height: 1.5em; color: var(--muted); }
.project-review-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.project-review-card:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-review-card > * { grid-column: 1 / -1; margin-top: 0; }
.project-review-card #project-portrait-authority, .project-review-card #project-direction-authority { grid-column: auto; padding: 16px; }
.project-review-card h4 { margin: 0 0 12px; }
.project-review-card textarea { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; line-height: 1.6; }
.project-review-card .workbench-scope { margin-top: 20px; }
.project-review-actions { margin-top: 20px; }
.project-review-actions button, #project-authorize-casting { min-height: 44px; }
@media (max-width: 1024px) { .project-review-card { padding: 16px; } .project-review-card:not([hidden]) { grid-template-columns: 1fr; } .project-review-card .workbench-heading { display: block; } .project-review-actions button, #project-authorize-casting { width: 100%; white-space: normal; } }
.workbench-status[data-state="error"] { color: var(--danger); }
.casting-continue-status { min-height: 1.5em; margin: 0; color: var(--muted); }
.casting-continue-status[data-state="ready"] { color: var(--accent-strong); font-weight: 700; }
.casting-continue-status[data-state="error"] { color: var(--danger); }
.workbench-empty { color: var(--muted); padding: 40px 12px; text-align: center; }
.workbench-authority, .project-candidate-section { margin-top: 18px; }
.actor-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 820px) {
  .professional-workbench-grid { grid-template-columns: 1fr; }

  .workbench-heading,
  .project-candidate-section > header {
    display: grid;
    gap: 12px;
  }

  .workbench-heading .primary-button {
    width: 100%;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #1677ff;
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.detail-open {
  overflow: hidden;
}

body.auth-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 18px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar-nav button {
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.topbar-nav button:hover,
.topbar-nav .product-nav-item.active,
.topbar-nav .login-entry {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.topbar-nav .candidate-clip {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 4px;
}

.candidate-clip span {
  display: inline-grid;
  min-width: 1.5em;
  place-items: center;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.topbar-nav .login-entry {
  min-height: 38px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 0 14px;
}

.topbar-nav .login-entry:hover,
.topbar-nav .login-entry:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.topbar-nav .product-nav-item[data-nav-panel="recommendations"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.topbar-brand {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}

.topbar-brand:hover h1,
.topbar-brand:focus-visible h1 {
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-word {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.status-strip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.08);
}

.status-strip span {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.panel-stack {
  min-width: 0;
}

.panel {
  display: none;
  min-height: 620px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel.active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 100, 102, 0.12);
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 1px solid var(--accent);
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled {
  border-color: var(--line);
  background: #dfe5e2;
  color: #7a8580;
  cursor: not-allowed;
}

.primary-button:disabled:hover {
  background: #dfe5e2;
}

.ghost-button {
  background: transparent;
  color: var(--accent);
}

.text-button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 800;
}

.text-button:hover {
  color: var(--accent-strong);
}

.home-hero {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.home-hero h2 {
  max-width: 760px;
  font-size: 38px;
  line-height: 1.18;
}

.home-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.home-entry-hero {
  max-width: none;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 12%, rgba(17, 100, 102, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f1f6f2 100%);
}

.home-entry-hero h2 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.035em;
}

.auth-availability {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.auth-availability span {
  color: var(--muted);
  line-height: 1.6;
}

.auth-dismiss {
  width: 100%;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-actions .primary-button,
.home-actions .ghost-button {
  min-height: 48px;
  padding: 0 22px;
}

.discovery-home {
  display: grid;
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
}

.product-home-intro {
  display: grid;
  gap: 12px;
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff 0%, #eef5f1 100%);
}

.product-home-intro > * { margin: 0; }
.product-home-intro h2 { max-width: 760px; font-size: clamp(32px, 5vw, 54px); line-height: 1.15; letter-spacing: -0.035em; }
.product-home-intro > p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.product-home-intro .home-actions { margin-top: 10px; }

.home-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
  margin-top: 14px;
}

.home-start-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}

.home-start-card > div { display: grid; gap: 5px; }
.home-start-card strong { font-size: 20px; }
.home-start-card span { color: var(--muted); line-height: 1.6; }
.home-start-card .primary-button { justify-self: start; }

.quick-casting-form {
  display: grid;
  gap: 12px;
  width: 100%;
}

.quick-casting-form textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
}

.quick-casting-form .primary-button { justify-self: start; }
.assistant-home-composer { position:relative; }
.assistant-home-composer textarea { padding:12px; box-sizing:border-box; }
.assistant-home-send-button { position:absolute; right:2px; bottom:2px; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:999px; background:radial-gradient(circle 14px, #397d78 96%, transparent 100%); color:#fff; font-size:14px; font-weight:800; line-height:1; cursor:pointer; }
.assistant-home-send-button:disabled { background:radial-gradient(circle 14px, #92b9b4 96%, transparent 100%); color:#fff; cursor:not-allowed; }
.assistant-home-send-button:focus-visible { outline:3px solid rgba(91,155,148,.32); outline-offset:2px; }
.assistant-home-hint { color:var(--muted); font-size:13px; line-height:1.45; }
.assistant-send-button { width:46px; height:46px; flex:0 0 46px; display:grid; place-items:center; border:0; border-radius:999px; background:#0f6f70; color:#fff; font-size:24px; font-weight:800; line-height:1; box-shadow:0 5px 14px rgba(10,58,58,.2); }
.assistant-send-button:disabled { opacity:.45; cursor:not-allowed; }

.quick-casting-brief {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.quick-casting-brief > * { margin: 0; }

@media (max-width: 640px) {
  .home-start-grid { grid-template-columns: 1fr; }
  .product-home-intro { padding: 16px; gap: 10px; }
  .product-home-intro h2 { font-size: 28px; }
  .product-home-intro > p:not(.eyebrow) { font-size: 14px; }
  .home-start-grid { gap: 10px; margin-top: 0; }
  .home-start-card { padding: 14px; gap: 10px; }
  .home-start-card strong { font-size: 18px; }
  .assistant-home-composer textarea { min-height: 90px; }
  .assistant-home-form { gap: 8px; }
  .assistant-home-hint { font-size: 12px; }
  .home-start-card .primary-button,
  .home-actor-library-entry .ghost-button { width: 100%; }
  .home-actor-library-entry { align-items: stretch; flex-direction: column; }
  .quick-casting-form .primary-button { width: 100%; }
}

.discovery-intro {
  display: grid;
  gap: 12px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.discovery-intro .eyebrow,
.discovery-intro h2,
.discovery-intro p {
  margin: 0;
}

.discovery-intro h2 {
  max-width: 760px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.discovery-intro > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.discovery-intro .discovery-privacy {
  width: fit-content;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  font-size: 14px;
}

.discovery-form {
  display: grid;
  gap: 16px;
}

.discovery-form fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: clamp(18px, 3vw, 28px);
}

.discovery-form legend {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 0 8px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}

.discovery-form legend span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: var(--accent);
  color: white;
  font-size: 13px;
}

.survey-options {
  display: grid;
  gap: 10px;
}

.survey-options-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.survey-options-inline {
  display: flex;
  flex-wrap: wrap;
}

.survey-options label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  background: white;
  padding: 11px 12px;
  line-height: 1.45;
  cursor: pointer;
}

.survey-options label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(17, 100, 102, 0.07);
}

.survey-options input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.trial-interest {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.discovery-submit-row {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 8px 0;
}

.discovery-submit-row .primary-button {
  min-width: 220px;
  min-height: 50px;
}

.discovery-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.discovery-status[data-state="error"] {
  color: var(--red);
}

.discovery-status[data-state="complete"] {
  color: var(--accent);
  font-weight: 800;
}

.home-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.home-flow article {
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 18px;
}

.home-flow span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-weight: 900;
}

.home-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.character-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.character-main {
  display: grid;
  gap: 22px;
}

.character-hero {
  display: grid;
  gap: 12px;
  padding-bottom: 6px;
}

.character-hero h2 {
  max-width: 720px;
  font-size: 34px;
  line-height: 1.2;
}

.character-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.character-form {
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 18px;
}

.script-upload-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 18px;
}

.script-file-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  border: 1px dashed var(--accent);
  background: #fff;
  padding: 18px;
  cursor: pointer;
}

.script-file-picker:hover,
.script-file-picker:focus-within {
  background: #f2f8f7;
}

.script-file-picker.unavailable {
  border-color: var(--line);
  background: var(--surface);
  cursor: not-allowed;
  opacity: 0.62;
}

.script-file-picker.unavailable:hover,
.script-file-picker.unavailable:focus-within {
  background: var(--surface);
}

.script-maintenance-notice {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  border: 1px solid #e3c48a;
  border-left: 4px solid var(--amber);
  background: #fff8e9;
  padding: 16px 18px;
}

.script-maintenance-notice strong {
  color: #7c4814;
}

.script-maintenance-notice span {
  color: var(--muted);
  line-height: 1.6;
}

.script-file-picker-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.script-file-picker strong,
.script-file-picker small {
  display: block;
}

.script-file-picker small {
  margin-top: 5px;
  color: var(--muted);
}

.script-file-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.script-file-summary span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.script-file-summary small {
  color: var(--muted);
  white-space: nowrap;
}

.script-upload-status {
  min-height: 42px;
  border-left: 3px solid var(--line);
  padding: 11px 13px;
  background: var(--surface);
  color: var(--muted);
}

.script-upload-status[data-state="ready"],
.script-upload-status[data-state="complete"] {
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

.script-upload-status[data-state="loading"] {
  border-left-color: var(--amber);
  color: var(--ink);
}

.script-upload-status[data-state="error"] {
  border-left-color: var(--red);
  color: var(--red);
}

.script-upload-result {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.script-upload-result[hidden] {
  display: none;
}

.script-upload-result div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.script-upload-result div:last-child {
  border-bottom: 0;
}

.script-upload-result dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.script-upload-result dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.character-results {
  display: grid;
  gap: 14px;
}

.character-results[hidden] {
  display: none;
}

.character-results-heading {
  margin: 0;
  font-size: 20px;
}

.character-build-entry {
  width: 100%;
  margin-top: 14px;
}

.character-result-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.character-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.character-result-header h3,
.character-result-reasoning,
.character-result-section,
.character-result-section ul {
  margin: 0;
}

.character-importance {
  border: 1px solid var(--line);
  padding: 4px 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.character-result-reasoning {
  margin-top: 12px;
  color: var(--ink);
  line-height: 1.7;
}

.character-result-section {
  margin-top: 14px;
}

.character-result-section h4 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.character-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.character-aliases span {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 8px;
  font-size: 12px;
}

.character-evidence-list {
  display: grid;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.character-evidence-list li {
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.character-evidence-button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  color: inherit;
  text-align: left;
}

.character-evidence-button:hover,
.character-evidence-button:focus-visible {
  background: #eaf3f1;
}

.character-evidence-line {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.character-evidence-list q {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.character-results-empty {
  border: 1px solid var(--line);
  background: #fff;
  padding: 24px 18px;
  color: var(--muted);
  text-align: center;
}

.evidence-source-viewer {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.evidence-source-viewer[hidden] {
  display: none;
}

.evidence-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.evidence-source-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.evidence-context {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-context-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  border-left: 3px solid transparent;
  padding: 8px 10px;
  color: var(--muted);
}

.evidence-context-line.is-target {
  border-left-color: var(--accent);
  background: #eaf3f1;
  color: var(--ink);
  font-weight: 800;
}

.evidence-context-number {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.evidence-context-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.evidence-source-error {
  border-left: 3px solid var(--red);
  background: var(--surface);
  padding: 12px;
  color: var(--red);
}

.character-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.character-form-actions,
.character-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.completion-meter {
  height: 10px;
  overflow: hidden;
  background: var(--surface-strong);
}

.completion-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.character-understanding {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.character-understanding-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.character-understanding-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 16px;
}

.character-understanding-card h3 {
  margin-bottom: 6px;
}

.character-understanding-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.character-understanding-card textarea {
  min-height: 118px;
  margin: 0;
}

.action-row,
.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-row {
  margin-bottom: 18px;
}

.search-row .primary-button {
  min-width: 72px;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analysis-card,
.question-card,
.result-card,
.actor-card {
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 16px;
}

.actor-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 10px;
}

.actor-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.actor-photo-frame > img { position: absolute; inset: 0; }
.actor-photo-frame > .actor-photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.actor-photo-placeholder {
  display: grid;
  place-items: center;
  min-width: 96px;
  min-height: 128px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, #202824, #0c100e);
  color: #d8ceb0;
  border: 1px solid #38413c;
  letter-spacing: .24em;
}
.actor-photo-placeholder span { transform: translateX(.12em); }
.actor-detail-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.recommendation-photo, .candidate-pool-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.actor-photo-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: inherit;
}

.actor-card-body h3 {
  margin-bottom: 4px;
}

.actor-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e0bf45;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.actor-stars b {
  color: #e8d676;
  font-size: 12px;
}

.actor-card-facts {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  color: #aeb6b1;
  font-size: 12px;
  line-height: 1.35;
}

.actor-card-status {
  margin: 6px 0 0;
  color: #aeb6b1;
  font-size: 12px;
  line-height: 1.35;
}

.actor-card-facts div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.actor-card-facts dt,
.actor-card-facts dd {
  margin: 0;
  min-width: 0;
}

.actor-card-facts dt {
  color: #8d9691;
  font-weight: 900;
}

.actor-card-facts dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e5e0cf;
}

.actor-summary {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.actor-facts {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
}

.actor-facts div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.actor-facts dt,
.actor-facts dd {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
}

.actor-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.actor-facts dd {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-card h3,
.result-card h3,
.actor-card h3 {
  color: var(--ink);
}

.analysis-card p,
.result-card p,
.actor-card p,
.question-card p {
  color: var(--muted);
  line-height: 1.7;
}

.question-list {
  display: grid;
  gap: 16px;
}

.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.option-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 700;
}

.option-button.active {
  border-color: var(--blue);
  background: #e8f1f7;
  color: var(--blue);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.decision-note {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 16px;
}

.decision-note .field {
  margin-bottom: 12px;
}

.saved-state {
  margin-top: 16px;
  color: var(--accent);
  font-weight: 800;
}

.recommendation-page {
  display: grid;
  gap: 20px;
}

.recommendation-heading,
.recommendation-section-heading,
.recommendation-character,
.recommendation-card-actions,
.recommendation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recommendation-heading h2,
.recommendation-section-heading h3,
.recommendation-character h3 {
  margin: 0;
}

.recommendation-heading > div > p:last-child {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.recommendation-character {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 18px;
}

.recommendation-character span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-character p {
  margin: 6px 0 0;
  color: var(--muted);
}

.recommendation-results {
  display: grid;
  gap: 14px;
}

.casting-search-intent-form {
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 24px;
}

.casting-search-intake-heading h3 {
  margin: 4px 0 8px;
}

.casting-search-intake-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.casting-project-shortcut {
  margin: 18px 0 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.casting-search-intent-form > textarea {
  width: 100%;
  min-height: 220px;
  margin-top: 16px;
}

.casting-search-input-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 20px;
}

.casting-search-input-actions span {
  flex: 1 1 180px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.recommendation-round-label {
  border: 1px solid var(--line);
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.recommendation-status[data-state="error"] {
  color: #9c433a;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recommendation-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  background: #fbfcfb;
  min-width: 0;
}

.recommendation-photo-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.recommendation-photo-button img,
.recommendation-photo-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e9eeea;
}

.recommendation-works {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommendation-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.recommendation-card-body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.recommendation-identity h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.recommendation-identity p,
.recommendation-reason {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.recommendation-reason {
  margin: 0;
  color: var(--ink);
}

.recommendation-reason span {
  display: block;
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.recommendation-public-profile {
  border: 1px solid #d5e0dc;
  border-left: 3px solid var(--teal);
  background: #f6f9f7;
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

.recommendation-public-profile p {
  margin: 5px 0 0;
}

.recommendation-public-profile .recommendation-public-profile-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
}

.recommendation-public-profile-title a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
}

.recommendation-public-profile-headline {
  font-weight: 600;
}

.recommendation-public-profile-more {
  margin-top: 8px;
  color: var(--muted);
}

.recommendation-public-profile-more summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 600;
}

.recommendation-grounds {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.recommendation-grounds strong {
  font-size: 13px;
}

.recommendation-grounds ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.recommendation-card-actions {
  align-self: end;
  margin-top: auto;
}

.recommendation-card-actions .ghost-button {
  min-width: 110px;
}

.recommendation-actions {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.recommendation-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.recommendation-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.candidate-pool-page {
  display: grid;
  gap: 20px;
}

.candidate-pool-heading,
.candidate-pool-character,
.candidate-pool-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.candidate-pool-heading h2,
.candidate-pool-character h3,
.candidate-pool-card h3 {
  margin: 0;
}

.candidate-pool-heading p:last-child {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.candidate-pool-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.candidate-pool-character {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 18px;
}

.candidate-pool-character span,
.candidate-pool-character p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.candidate-pool-character p {
  margin: 0;
}

.candidate-pool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.candidate-pool-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: #fbfcfb;
  min-width: 0;
}

.candidate-pool-photo {
  border: 0;
  background: transparent;
  padding: 0;
}

.candidate-pool-photo img,
.candidate-pool-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 184px;
  object-fit: cover;
  background: #e9eeea;
}

.candidate-pool-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.candidate-pool-card-body {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  min-width: 0;
}

.candidate-pool-card-body p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.candidate-pool-card-actions {
  align-items: stretch;
  flex-direction: column;
}

.ghost-button.danger {
  border-color: #bd756d;
  color: #8f3129;
}

.candidate-pool-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  padding: 42px 24px;
  color: var(--muted);
  text-align: center;
}

#panel-actors {
  background: #070908;
  color: #f6f2df;
}

#panel-actors .decision-log {
  border-top-color: rgba(246, 242, 223, 0.16);
}

#panel-actors .decision-log h3 {
  color: #f6f2df;
}

.actor-workbench {
  margin: -4px -4px 18px;
  padding: 14px;
  border: 1px solid #33403c;
  background: #0d100f;
}

.actor-library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.actor-library-heading h2 {
  margin: 3px 0 6px;
  color: #f6f2df;
  font-size: 25px;
}

.actor-library-heading p:last-child {
  margin: 0;
  color: #aeb6b1;
  font-size: 14px;
  line-height: 1.6;
}

.actor-library-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 640px) {
  .actor-library-heading,
  .actor-library-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.home-actor-library-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 920px;
  margin-top: 0;
  padding: 20px 22px;
  border: 1px solid var(--accent);
  background: rgba(17, 100, 102, .06);
}

.home-actor-library-entry strong,
.home-actor-library-entry span {
  display: block;
}

.home-actor-library-entry span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.actor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.actor-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid #343a37;
  background: #1a1d1b;
  color: #9ea6a1;
  padding: 0 12px;
}

.actor-search-box input {
  border: 0;
  background: transparent;
  color: #f6f2df;
  padding: 0;
  box-shadow: none;
}

.actor-search-box input:focus {
  box-shadow: none;
}

.icon-button {
  min-height: 44px;
  border: 1px solid #343a37;
  background: #1a1d1b;
  color: #d8c057;
  font-size: 20px;
  font-weight: 800;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-button {
  min-height: 34px;
  border: 1px solid #343a37;
  background: #1a1d1b;
  color: #a8b0ab;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.filter-button.active {
  border-color: #e0bf45;
  background: #e0bf45;
  color: #161512;
}

.actor-result-count {
  margin: 16px 0 0;
  color: #828a86;
  font-size: 12px;
  text-align: center;
}

.actor-grid {
  column-count: 4;
  column-gap: 12px;
}

.actor-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
  border-color: #1f2522;
  background: #090b0a;
  color: #f6f2df;
}

.actor-card .actor-photo {
  border-color: #cfd5cf;
}

#panel-actors .actor-card h3 {
  color: #f6f2df;
}

#panel-actors .actor-card p {
  color: #aeb6b1;
}

#panel-actors .actor-facts dt {
  color: #8d9691;
}

#panel-actors .actor-facts dd {
  color: #e5e0cf;
}

#panel-actors .actor-meta span {
  border-color: #333a36;
  background: #111412;
  color: #d3cbb3;
}

#panel-actors .ghost-button {
  border-color: #d3b33f;
  color: #f0d25c;
}

#panel-actors .ghost-button.is-added {
  border-color: #2d6f55;
  background: #163c30;
  color: #d6f1df;
}

.actor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.actor-meta span {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 12px;
}

.actor-card .ghost-button {
  width: 100%;
  margin-top: 8px;
}

.actor-load-more {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.actor-load-more .ghost-button {
  min-width: 180px;
}

.actor-load-more .ghost-button[hidden] {
  display: none;
}

.actor-load-more .ghost-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.actor-detail[hidden] {
  display: none;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 14, 18, 0.46);
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(9, 14, 18, 0.28);
  padding: 22px;
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.auth-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.auth-intent {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.closed-beta-admin-card { width: min(620px, 100%); }
.closed-beta-issued-invite {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--accent);
  background: rgba(17, 100, 102, 0.06);
}
.closed-beta-issued-invite p { margin: 0 0 8px; color: var(--muted); line-height: 1.6; }
.closed-beta-issued-invite code { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.closed-beta-invitation-list-section { margin-top: 22px; }
.closed-beta-invitation-list-section h3 { margin: 0 0 10px; font-size: 16px; }
.closed-beta-invitation-list { display: grid; gap: 9px; }
.closed-beta-invitation-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); padding: 12px; }
.closed-beta-invitation-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.closed-beta-invitation-row strong { color: var(--ink); }

.wechat-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 900;
}

.wechat-login:disabled,
.code-row button:disabled,
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.wechat-login span {
  color: var(--muted);
  font-size: 13px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.code-row button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-consent input {
  width: auto;
  margin-top: 4px;
}

.auth-consent a,
.auth-footnote a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.auth-submit {
  width: 100%;
}

.auth-footnote {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.actor-detail {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow-y: auto;
  background: #050605;
  color: #f6f2df;
}

.actor-detail-page {
  position: relative;
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 104px;
  background: #050605;
}

.actor-detail-back {
  margin: 0 18px 14px;
  border: 0;
  background: transparent;
  color: #aeb6b1;
  padding: 6px 0;
  font-size: 16px;
}

.actor-detail-hero {
  position: relative;
  overflow: hidden;
  background: #111412;
}

.actor-detail-hero img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
}

.actor-detail-count,
.actor-detail-heart {
  position: absolute;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.actor-detail-count {
  left: 16px;
}

.actor-detail-heart {
  right: 16px;
  font-size: 34px;
}

.actor-detail-head {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 320px);
  align-items: flex-end;
  justify-content: start;
  gap: 32px;
  padding: 22px 18px 14px;
  border-bottom: 1px solid rgba(246, 242, 223, 0.14);
}

.actor-detail-identity {
  min-width: 0;
  padding-bottom: 2px;
}

.actor-detail-head h2 {
  margin: 0 0 8px;
  color: #f6f2df;
  font-size: 34px;
}

.actor-detail-head p {
  margin: 0;
  color: #aeb6b1;
  font-size: 17px;
  white-space: nowrap;
}

.actor-detail-head .actor-stars {
  font-size: 24px;
  white-space: nowrap;
}

.actor-detail-head .actor-stars b {
  font-size: 18px;
}

.actor-detail-quote {
  margin: 0;
  padding: 22px 18px 4px;
  color: #aeb6b1;
  font-size: 18px;
  font-style: italic;
  line-height: 1.8;
}

.actor-detail-section {
  padding: 28px 18px 0;
}

.actor-detail-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #8f8f89;
  font-size: 15px;
  font-weight: 700;
}

.actor-detail-rows {
  display: grid;
  gap: 18px;
  margin: 0;
}

.actor-detail-row {
  display: block;
}

.actor-detail-row dt {
  margin: 0 0 4px;
  color: #777d79;
  font-size: 15px;
}

.actor-detail-row dd {
  margin: 0;
  color: #f2eee1;
  font-size: 22px;
  line-height: 1.35;
}

.actor-detail-list {
  display: grid;
  gap: 10px;
}

.actor-detail-list p {
  margin: 0;
  border: 1px solid #171d1a;
  background: #111412;
  color: #e8e4d8;
  padding: 16px 18px;
  font-size: 19px;
  line-height: 1.45;
}

.actor-market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.actor-market-grid div {
  border: 1px solid #171d1a;
  background: #111412;
  padding: 16px 18px;
}

.actor-market-grid span {
  display: block;
  margin-bottom: 8px;
  color: #777d79;
  font-size: 14px;
}

.actor-market-grid strong {
  display: block;
  color: #f2eee1;
  font-size: 22px;
  line-height: 1.25;
}

.actor-detail-spacer {
  height: 24px;
}

.actor-detail-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(246, 242, 223, 0.14);
  background: rgba(5, 6, 5, 0.96);
}

.detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border: 1px solid #303631;
  color: #f6f2df;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
}

.detail-action.primary {
  border-color: #d3b33f;
  background: #d3b33f;
  color: #15130f;
}

.detail-action.primary.is-added {
  border-color: #2d6f55;
  background: #163c30;
  color: #d6f1df;
}

.detail-action.secondary {
  background: #111412;
}

.decision-log {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.decision-log ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.tone-warning {
  color: var(--amber);
}

.tone-risk {
  color: var(--red);
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .workspace,
  .comparison,
  .recommendation-grid,
  .candidate-pool-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .topbar-nav button {
    width: 100%;
    min-height: 44px;
  }

  .actor-grid {
    column-count: 3;
    column-gap: 8px;
  }

  .topbar,
  .action-row,
  .search-row,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 20px;
  }

  .home-hero h2 {
    font-size: 30px;
  }

  .home-hero p {
    font-size: 16px;
  }

  .home-actions {
    display: grid;
  }

  .survey-options-compact {
    grid-template-columns: 1fr;
  }

  .home-flow {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .character-workspace,
  .character-form-grid,
  .character-understanding-card {
    grid-template-columns: 1fr;
  }

  .character-hero h2 {
    font-size: 28px;
  }

  .character-form-actions,
  .character-confirm-actions {
    display: grid;
  }

  .recommendation-heading,
  .recommendation-character,
  .recommendation-actions,
  .recommendation-card-actions,
  .candidate-pool-heading,
  .candidate-pool-character {
    align-items: stretch;
    flex-direction: column;
  }

  .recommendation-card-actions .ghost-button,
  .recommendation-actions .ghost-button {
    width: 100%;
  }

  /* The recommendation list is a selection wall, not a resume reader. */
  .recommendation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .recommendation-card {
    grid-template-rows: auto 1fr;
  }

  .recommendation-photo-button img,
  .recommendation-photo-placeholder {
    aspect-ratio: 3 / 4;
  }

  .recommendation-card-body {
    gap: 7px;
    padding: 10px;
  }

  .recommendation-identity h4 {
    font-size: 16px;
    line-height: 1.25;
  }

  .recommendation-identity p,
  .recommendation-works,
  .recommendation-reason {
    font-size: 12px;
    line-height: 1.45;
  }

  .recommendation-reason {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .recommendation-reason span {
    font-size: 11px;
  }

  .recommendation-card-actions {
    display: grid;
    gap: 6px;
  }

  .recommendation-card-actions .text-button,
  .recommendation-card-actions .primary-button {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .project-recommendation-grid {
    grid-template-columns: 1fr;
  }

  .casting-search-input-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-pool-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .actor-card {
    margin-bottom: 8px;
    padding: 6px;
  }

  .actor-card h3 {
    font-size: 13px;
    line-height: 1.25;
  }

  .actor-card p {
    font-size: 10px;
    line-height: 1.35;
  }

  .actor-photo {
    margin-bottom: 6px;
  }

  .actor-card-facts {
    gap: 3px;
    font-size: 9px;
  }

  .actor-card-status {
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.3;
  }

  .actor-card-facts div {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px;
  }

  .actor-stars,
  .actor-stars b {
    font-size: 10px;
  }

  .actor-summary {
    min-height: 0;
    -webkit-line-clamp: 1;
  }

  .actor-facts div {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 4px;
  }

  .actor-facts dt,
  .actor-facts dd {
    font-size: 9px;
    line-height: 1.35;
  }

  .actor-meta {
    gap: 4px;
    margin: 6px 0;
  }

  .actor-meta span {
    padding: 2px 4px;
    font-size: 9px;
    line-height: 1.2;
  }

  .actor-card .ghost-button {
    min-height: 30px;
    padding: 6px;
    font-size: 11px;
  }

  .actor-detail-page {
    padding-top: 14px;
  }

  .actor-detail-hero img {
    max-height: 74vh;
  }

  .actor-detail-head h2 {
    font-size: 30px;
  }

  .actor-detail-head .actor-stars {
    font-size: 20px;
  }

  .actor-detail-row dd {
    font-size: 20px;
  }

  .detail-action {
    min-height: 58px;
    font-size: 18px;
  }

  .actor-market-grid {
    grid-template-columns: 1fr;
  }

  .brand-word {
    margin-bottom: 4px;
  }

  .panel {
    min-height: auto;
    padding: 18px;
  }

  .auth-card {
    padding: 18px;
  }

  .code-row {
    grid-template-columns: 1fr;
  }
}
.auth-form {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}

.auth-form input:focus {
  border-color: #7f56d9;
  box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.12);
  outline: none;
}

.auth-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font: inherit;
}

.onboarding-screen {
  min-height: calc(100vh - 230px);
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.onboarding-screen[hidden] { display: none; }

.onboarding-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(9, 14, 18, 0.12);
  padding: 30px;
}

.onboarding-card h2 { margin: 6px 0 8px; }
.onboarding-card > p:not(.eyebrow) { color: var(--muted); }

.auth-code-row[hidden] {
  display: none;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.recognition-version { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e5e7eb; }
.recognition-version-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recognition-job-state { color: #667085; font-size: 12px; }
.recognition-proposal { margin-top: 8px; padding: 10px; border: 1px solid #d9dee8; border-radius: 10px; background: #fff; }
.recognition-proposal p { margin: 6px 0; line-height: 1.5; }
.warning-copy { color: #8b5c12; }

.assistant-launcher{position:fixed;right:20px;bottom:22px;z-index:20;border:0;border-radius:999px;background:#0f6f70;color:#fff;padding:11px 14px;font-size:13px;font-weight:750;box-shadow:0 10px 28px rgba(10,58,58,.3)}
.assistant-sheet{position:fixed;right:18px;bottom:18px;z-index:30;width:min(460px,calc(100vw - 28px));height:min(680px,calc(100vh - 34px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 65px rgba(9,14,18,.24);padding:18px}
.assistant-sheet[hidden]{display:none}.assistant-sheet header{display:flex;justify-content:space-between;gap:12px}.assistant-header-actions{display:flex;align-items:flex-start;gap:8px}.assistant-sheet h2{margin:3px 0}.assistant-budget{color:#526466;font-size:13px;white-space:nowrap;padding-top:4px}.assistant-budget.is-low{color:#9a6715}.assistant-budget.is-empty{color:#a33b32;font-weight:700}.assistant-budget-info{width:25px;height:25px;border:1px solid #bfd0d0;border-radius:999px;background:#fff;color:#386263;font-weight:700}.assistant-budget-help{margin:0;padding:9px 10px;border-radius:10px;background:#f4f8f8;color:#526466;font-size:12px;line-height:1.5}.assistant-context{color:var(--muted);font-size:14px}.assistant-transcript{flex:1;overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 0;display:grid;align-content:start;gap:10px}.assistant-message{max-width:88%;padding:10px 12px;border-radius:13px;line-height:1.55}.assistant-message.user{justify-self:end;background:#0f6f70;color:#fff}.assistant-message.assistant{background:#f2f6f6;color:#1c2a2a}.assistant-thinking{display:flex;align-items:center;gap:6px;color:#526466}.assistant-thinking span{display:inline-flex;gap:3px}.assistant-thinking i{width:5px;height:5px;border-radius:50%;background:#4d7b7c;animation:assistantThinking 1.1s infinite ease-in-out}.assistant-thinking i:nth-child(2){animation-delay:.15s}.assistant-thinking i:nth-child(3){animation-delay:.3s}@keyframes assistantThinking{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-3px);opacity:1}}.assistant-form{display:grid;gap:8px;padding-top:12px;position:sticky;bottom:0;background:#fff}.assistant-form textarea{width:100%;box-sizing:border-box;resize:vertical;border:1px solid #cbd5d5;border-radius:11px;padding:10px;font:inherit}.assistant-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.assistant-action-card{display:grid;gap:7px;padding:13px;border:1px solid #a4cece;border-radius:13px;background:#f4fbfb}.assistant-action-card p{margin:0;line-height:1.5}.assistant-action-card>div{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:640px){.assistant-launcher{right:14px;bottom:14px}.assistant-sheet{right:0;bottom:0;width:100%;height:100%;border-radius:0;padding:18px;box-sizing:border-box}.assistant-header-actions{gap:6px}.assistant-budget{font-size:12px}.assistant-form{padding-bottom:max(8px,env(safe-area-inset-bottom))}}

/* Intake and preliminary research are full-width forms, not actor cards. */
#recommendation-results > #preliminary-exploration-form,
#recommendation-results > #casting-search-intake-form {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}
#preliminary-exploration-form textarea {
  width: 100%;
  box-sizing: border-box;
}
#preliminary-exploration-form button,
#casting-search-intake-form button {
  max-width: 100%;
  white-space: normal;
}
@media (max-width: 600px) {
  #casting-search-intake-form { padding: 16px; }
}

@media (max-width: 640px) {
  .professional-workbench-grid { grid-template-columns: minmax(0, 1fr); }
  .professional-workbench-main, .professional-workbench-sidebar { min-width: 0; }
  .professional-workbench-sidebar { padding: 12px; }
  [data-preliminary-character-actions] button { max-width: 100%; white-space: normal; }
  #panel-workbench { padding: 12px; }
  .professional-workbench-main { padding: 8px; }
  #project-script-workspace { min-width: 0; padding: 0; border: 0; background: transparent; }
  #project-script-list, .project-script-card { min-width: 0; max-width: 100%; }
  .script-progressive-workspace { min-width: 0; padding: 12px; }
}

/* Stage-one demand review: explicit actions, no overlaid send icon. */
.stage-one-home-actions{display:flex;gap:14px;flex-wrap:wrap}.stage-one-home-actions>div{display:grid;gap:5px}.stage-one-home-actions small{color:#506466}.assistant-home-composer textarea{padding-right:12px}.stage-confirm{max-width:850px}.stage-confirm input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #9caaaa;font:inherit;margin:8px 0}.stage-confirm dl{display:grid;grid-template-columns:100px 1fr;gap:9px}.stage-original{white-space:pre-wrap}.stage-action-bar{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px;padding-bottom:env(safe-area-inset-bottom)}.stage-action-bar button,.stage-one-home-actions button{min-height:44px;min-width:44px}.stage-confirmation-open #assistant-launcher,.stage-assistant-open #assistant-launcher{display:none}button:disabled{cursor:not-allowed;opacity:.55}#stage-confirm-issue{color:#854720}body:has(#casting-search-intake-form) #assistant-launcher{bottom:90px}
@media(max-width:640px){.stage-one-home-actions{display:grid}.stage-one-home-actions button,.stage-action-bar button{width:100%}.stage-action-bar{display:grid}.stage-confirm dl{grid-template-columns:90px minmax(0,1fr)}.stage-original{overflow-wrap:anywhere}.stage-confirm input{min-width:0}}

.stage-confirm{grid-column:1 / -1;max-width:900px;width:100%;min-width:0}.stage-confirm label{display:block}.stage-confirm dl{max-width:750px}.stage-confirm dd{margin:0}.stage-confirm details p{max-width:850px}

/* Mobile casting task entry: prioritize finding actors and avoid duplicate helpers. */
.stage-one-home-actions{gap:8px}.stage-one-action-note{font-size:12px;line-height:1.45;color:var(--muted)}
@media(max-width:640px){
  #assistant-home-form{gap:6px}
  #assistant-home-intent{display:block;box-sizing:border-box;height:176px;min-height:176px;max-height:360px;padding:12px;line-height:1.6;overflow-y:auto;resize:vertical}
  .stage-one-home-actions{gap:6px}
  .stage-one-home-actions button{min-height:44px;padding:10px 12px;margin:0}
  .home-direct-entry .stage-one-action-note{font-size:12px;line-height:1.4}
  body:has(#panel-home.active .home-direct-entry) #assistant-launcher{display:none}
}

.stage-confirm select{display:block;width:100%;font:inherit;padding:10px;margin:8px 0;min-height:44px;border:1px solid #9caaaa;background:#fff}

/* Task status panels occupy a whole result row; they are not actor cards. */
#recommendation-results > .quick-casting-brief { grid-column:1 / -1; min-width:0; overflow-wrap:anywhere; }
.quick-casting-brief > .workbench-authority { min-width:0; }
.quick-casting-terminal-actions { display:flex; flex-wrap:wrap; gap:10px; min-width:0; }
.quick-casting-terminal-actions button { max-width:100%; white-space:normal; min-height:44px; }
.recommendation-results:has(.quick-casting-terminal-actions) + .recommendation-actions #refresh-recommendations { display:none; }
@media(max-width:640px) {
  #recommendation-results > .quick-casting-brief { padding:14px; }
  .quick-casting-terminal-actions button { flex:1 1 100%; width:100%; min-width:0; }
}

/* Reading mode keeps the existing assistant in place while giving professional material room. */
.assistant-sheet.is-reading{width:min(960px,calc(100vw - 36px));height:min(900px,calc(100vh - 36px));box-sizing:border-box}
.assistant-sheet.is-reading .assistant-transcript{padding:18px 12px}
.assistant-sheet.is-reading .assistant-action-card{padding:18px;gap:12px}
.assistant-person-card{padding:16px;background:#fff;border:1px solid var(--line);border-radius:10px;display:grid;gap:8px}
.assistant-person-card h3{margin:0;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.assistant-age-deviation{font-size:13px;font-weight:500;background:#fff0db;color:#805000;padding:3px 8px;border-radius:5px}
.assistant-action-card details{padding:10px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.assistant-action-card summary{cursor:pointer;color:var(--teal,#126569);font-weight:600}
.assistant-action-card details[open]>div,.assistant-action-card details[open]>p{margin-top:12px;line-height:1.7}
#assistant-status{color:#52656a}#assistant-status[data-state="success"]{color:#176a46}#assistant-status[data-state="error"]{color:#b42318}
.assistant-association-summary{color:#176a46;margin:0;padding:8px 12px;background:#eff8f3;border-radius:8px}
@media(max-width:640px){.assistant-sheet.is-reading{width:100%;height:100%;right:0;bottom:0}.assistant-header-actions{flex-wrap:wrap}#assistant-expand{padding:6px}.assistant-sheet.is-reading .assistant-transcript{padding:12px 0}}

.assistant-actor-portrait{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px;background:#fff;border-radius:10px;border:1px solid var(--line)}
.assistant-actor-portrait img{width:150px;height:190px;object-fit:cover;border-radius:8px}
.assistant-actor-portrait>p{width:150px;min-height:150px;display:grid;place-items:center;background:#eef2f2;color:#66787b;border-radius:8px}
.assistant-actor-portrait>p[hidden]{display:none}.assistant-actor-portrait small{color:#66787b}

.pool-toolbar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:20px 0}.pool-toolbar label{display:grid;gap:6px}.pool-toolbar select{min-width:180px;padding:10px;border:1px solid var(--line);background:white}.pool-role-group>h3{border-bottom:1px solid var(--line);padding-bottom:12px}.pool-role-group small{font-weight:400;color:#66787b}.pool-person-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:18px}.project-candidate-card.pool-person{display:flex;align-items:flex-start;gap:18px;background:white;padding:18px;border:1px solid var(--line);border-radius:12px}.pool-portrait{width:115px;height:150px;object-fit:cover;border-radius:8px;flex-shrink:0}.pool-person .actor-photo-frame{width:115px;flex-shrink:0}.pool-person-body{flex:1;min-width:0}.pool-person h4{margin:0 0 8px;font-size:19px}.pool-person p{line-height:1.6;overflow-wrap:anywhere}.pool-state{font-size:12px;padding:4px 8px;background:#eef5f3;border-radius:5px;display:inline-block}.pool-notes{margin-top:14px}.pool-notes summary{cursor:pointer;color:#126569}.pool-notes label{display:grid;gap:8px;margin:12px 0}.pool-notes textarea{width:100%;box-sizing:border-box;padding:10px}.pool-person button[aria-pressed=true]{background:#126569;color:white}.pool-source-note{color:#66787b;font-size:13px}[data-pool-detail-content]{padding:14px;margin-top:14px;border-top:1px solid var(--line)}[data-pool-note-status]{color:#52656a}@media(max-width:600px){.project-candidate-card.pool-person{gap:12px}.pool-portrait,.pool-person .actor-photo-frame{width:80px}.pool-portrait{height:110px}}

.project-candidate-section>header{display:block}.project-candidate-section>header h3{margin:6px 0 10px}.pool-role-group .workbench-empty{min-height:0;height:auto;padding:12px;margin:8px 0;text-align:left;display:block}
/* Frozen actor-card layout: desktop review row, mobile compact portrait header. */
.pool-person-grid{grid-template-columns:minmax(0,1fr);gap:24px}
.project-candidate-card.pool-person{position:relative;display:grid;grid-template-columns:160px minmax(0,1fr) 145px;gap:24px;padding:24px;align-items:start;border-radius:14px;background:#fff}
.pool-photo-column{width:160px;display:grid;gap:8px}.pool-photo-column .actor-photo-frame{width:160px}.pool-portrait{width:160px;height:213.33px;object-fit:contain;background:#eef1f2;border-radius:9px}.pool-photo-column small{font-size:12px;color:#68777b;line-height:1.4}
.pool-person .actor-photo-placeholder{background:#eef1f2;color:#68777b;display:grid;place-items:center;font-size:13px;letter-spacing:0}.pool-person .actor-photo-placeholder::before{content:'';width:38px;height:38px;border-radius:50%;background:#c8d1d3;display:block;margin:30px auto 0}.pool-person .actor-photo-placeholder span{align-self:start;margin-top:14px}
.pool-identity{display:block!important;margin:0 0 14px}.pool-identity h4{font-size:23px;margin:0 0 8px}.pool-identity>.pool-state{display:none}.pool-basics,.pool-works,.pool-skill{font-size:14px;margin:5px 0!important;color:#536569}.pool-skill{color:#243c40}
.pool-assessment{display:grid;gap:12px}.pool-assessment p{margin:0;line-height:1.65;font-size:14px}.pool-assessment strong{display:block;font-size:12px;color:#64777a;font-weight:600;margin-bottom:3px}.pool-why,.pool-reason{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.pool-reason{-webkit-line-clamp:2;border-top:1px solid var(--line);padding-top:10px}.pool-risk{background:#f5f7f6;padding:10px;border-radius:7px}.pool-conflict{background:#fff2dc;color:#77521d;border-radius:6px;padding:8px;font-size:13px}
.pool-actions{display:grid;gap:9px}.pool-actions>.pool-state{text-align:center;margin-bottom:8px;font-size:13px}.pool-state{color:#536367;background:#edf0f1}.pool-person[data-state=retained] .pool-state{background:#126569;color:#fff}.pool-person[data-state=pending] .pool-state{background:#e3f3f0;color:#176760}.pool-person[data-state=excluded] .pool-state{background:#f3f4f4;color:#7b8587}.pool-actions button,.pool-action-menu>summary{box-sizing:border-box;min-height:44px;width:100%;padding:10px 8px;font-size:14px;text-align:center;cursor:pointer}.pool-action-menu{position:relative}.pool-action-menu>summary{list-style:none;color:#126569;border:1px solid var(--line);border-radius:4px}.pool-action-menu>summary::-webkit-details-marker{display:none}.pool-action-menu[open]>div{position:absolute;right:0;top:calc(100% + 6px);min-width:175px;z-index:10;padding:6px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 7px 24px #183c4020;display:grid;gap:4px}.pool-action-menu button{background:#fff;border:0;text-align:left;border-radius:4px;color:#25474b}.pool-action-menu button:hover{background:#eef6f4}.pool-action-menu button[aria-pressed=true]{background:#e3f3f0;color:#126569}.pool-mobile-only{display:none}
.pool-detail-dialog{width:min(850px,calc(100vw - 48px));max-height:calc(100dvh - 48px);box-sizing:border-box;border:1px solid var(--line);border-radius:14px;padding:0;color:var(--ink,#152d32);background:white;overflow:auto}.pool-detail-dialog::backdrop{background:#102c385c}.pool-detail-dialog>header{position:sticky;top:0;z-index:2;background:white;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid var(--line)}.pool-detail-dialog h2{font-size:21px;margin:0}.pool-detail-dialog #pool-dialog-content{padding:24px;line-height:1.8;overflow-wrap:anywhere}.pool-detail-dialog section{margin:0 0 22px;padding:16px;border-radius:8px}.pool-detail-dialog h3{font-size:16px;margin:0 0 8px}.pool-detail-facts{background:#f4f6f6}.pool-detail-analysis{background:#eef7f6}.pool-detail-notes,.pool-original-reason{background:#faf7ef}.pool-detail-reason{border:1px solid var(--line)}.pool-note-label{display:grid;gap:10px;margin:18px 0}.pool-note-label textarea{box-sizing:border-box;width:100%;padding:12px;font:inherit;border:1px solid var(--line);border-radius:7px}.pool-detail-dialog details{padding:16px 0;border-top:1px solid var(--line)}.pool-detail-dialog summary{cursor:pointer;color:#126569}
.assistant-actor-portrait img{width:160px;height:213.33px;object-fit:contain;background:#eef1f2}.assistant-actor-portrait>p{width:160px;min-height:213.33px}
@media(max-width:767px){.project-candidate-card.pool-person{grid-template-columns:110px minmax(0,1fr);gap:16px;padding:16px;padding-top:20px}.pool-person-body{display:contents}.pool-photo-column,.pool-photo-column .actor-photo-frame{width:110px}.pool-portrait{width:110px;height:146.67px}.pool-photo-column{grid-column:1;grid-row:1}.pool-identity{grid-column:2;grid-row:1;padding-right:22px;margin:0}.pool-identity h4{font-size:21px}.pool-identity>.pool-state{display:inline-block;font-size:12px;padding:4px 7px;margin:3px 0}.pool-basics,.pool-works,.pool-skill{font-size:13px}.pool-works{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.pool-assessment,.pool-conflict{grid-column:1/-1}.pool-assessment{gap:10px}.pool-why{-webkit-line-clamp:3}.pool-reason{-webkit-line-clamp:2}.pool-assessment p{font-size:14px}.pool-actions{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:12px;border-top:1px solid var(--line)}.pool-actions>.pool-desktop-state{display:none}.pool-actions>button,.pool-state-menu>summary{font-size:14px;padding:10px 4px}.pool-actions>p{grid-column:1/-1;margin:0}.pool-state-menu [data-project-decision=excluded]{display:none}.pool-more{position:absolute;right:12px;top:12px}.pool-more>summary{border:0;width:38px;height:38px;min-height:38px;padding:8px;font-size:0}.pool-more>summary:after{content:'•••';font-size:15px;letter-spacing:1px}.pool-more .pool-mobile-only{display:block}.pool-detail-dialog{width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.pool-detail-dialog>header{padding:16px;padding-top:max(16px,env(safe-area-inset-top))}.pool-detail-dialog h2{font-size:18px}.pool-detail-dialog #pool-dialog-content{padding:16px;padding-bottom:max(24px,env(safe-area-inset-bottom))}.pool-detail-dialog section{padding:12px}.assistant-actor-portrait img{width:110px;height:146.67px}.assistant-actor-portrait>p{width:110px;min-height:146.67px}}

.pool-actions span.pool-mobile-only{display:none}@media(max-width:767px){.pool-actions span.pool-mobile-only{display:inline}.pool-actions .pool-desktop-only{display:none}.pool-state-menu[open]>div{top:auto;bottom:calc(100% + 6px)}}
.pool-portrait,.assistant-actor-portrait img{object-fit:scale-down}@media(max-width:767px){#panel-workbench:has(#project-candidate-workspace:not([hidden])) .professional-workbench-main{padding:0;border:0;background:transparent}#project-candidate-workspace{padding:12px}.pool-toolbar{gap:10px}.pool-toolbar label{flex:1;min-width:0}.pool-toolbar select{min-width:0;width:100%;max-width:100%}.pool-toolbar>button{min-height:44px}}

html:has(#pool-detail-dialog[open]){overflow:hidden}@media(max-width:767px){.pool-detail-dialog{position:fixed;inset:0;width:100vw;max-width:100vw}}

/* Photo-first project shortlist: three cards on desktop, two on phones. */
.pool-person-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.project-candidate-card.pool-person{display:flex;flex-direction:column;gap:0;padding:0;overflow:visible;min-width:0;border-radius:12px}
.pool-photo-column{width:100%;display:block;position:relative}
.pool-photo-column .actor-photo-frame{width:100%;aspect-ratio:3/4;border-radius:11px 11px 0 0;overflow:hidden;background:#edf1f1}
.pool-photo-column .pool-portrait{width:100%;height:100%;object-fit:contain;border-radius:0}
.pool-photo-column small{position:absolute;bottom:7px;right:8px;background:#ffffffdd;padding:2px 6px;border-radius:4px;font-size:10px}
.pool-person-body{display:block;padding:16px 16px 0;width:100%;box-sizing:border-box}
.pool-identity{padding:0;margin:0 0 10px!important;display:block!important}
.pool-identity h4{font-size:21px;margin:0 0 6px}.pool-identity>.pool-state{display:inline-block;margin:0 0 7px;font-size:11px}
.pool-basics,.pool-works{font-size:13px!important;line-height:1.5!important;margin:4px 0!important}
.pool-works{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.pool-fit-brief{font-size:13px;line-height:1.6!important;margin:10px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.pool-fit-brief small{display:block;color:#63777a;font-size:11px}
.pool-actions{display:grid;grid-template-columns:minmax(0,1fr) 52px;gap:8px;padding:14px 16px 16px;width:100%;box-sizing:border-box;margin-top:auto;border:0}
.pool-actions button,.pool-more>summary{font-size:13px;min-height:40px;padding:8px 4px}
.pool-more{position:relative;top:auto;right:auto}.pool-more>summary{font-size:12px;width:100%;height:auto;border:1px solid var(--line)}.pool-more>summary:after{content:none}
.pool-actions>p{grid-column:1/-1;margin:0}.pool-actions>p:empty{display:none}.pool-more[open]>div{top:auto;bottom:calc(100% + 6px)}
@media(max-width:767px){.pool-person-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.project-candidate-card.pool-person{display:flex;padding:0;gap:0}.pool-photo-column,.pool-photo-column .actor-photo-frame{width:100%}.pool-person-body{display:block;padding:10px 10px 0}.pool-identity h4{font-size:18px}.pool-basics,.pool-works{font-size:12px!important}.pool-fit-brief{font-size:12px;-webkit-line-clamp:3}.pool-actions{grid-template-columns:minmax(0,1fr) 38px;padding:12px 10px 10px;gap:5px}.pool-actions>button,.pool-more>summary{font-size:11px;padding:8px 2px}.pool-more{position:relative;right:auto;top:auto}.pool-more>summary{width:100%;height:auto;font-size:11px}.pool-more>summary:after{content:none}.pool-person .actor-photo-placeholder::before{margin:20px auto 0}.pool-photo-column small{font-size:9px}}
