:root {
  color-scheme: light;
  --background: #f8f8fb;
  --foreground: #25243a;
  --card: #ffffff;
  --primary: #6757d6;
  --primary-dark: #4f41b2;
  --primary-soft: #f0edff;
  --muted: #74748a;
  --border: #e9e8f0;
  --input: #dedde7;
  --danger: #d44747;
  --success: #23865c;
  --radius: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--foreground); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; background: radial-gradient(55rem 55rem at 108% -8%, rgba(103,87,214,.1), transparent), radial-gradient(44rem 44rem at -8% 0, rgba(71,174,198,.06), transparent); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; }
h1 { margin-bottom: 7px; font-size: 24px; line-height: 1.25; }
h2 { margin-bottom: 6px; font-size: 20px; }
h3 { margin: 0 0 4px; font-size: 16px; }
.muted, small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.brand-lockup strong { font-size: 14px; letter-spacing: -.01em; }
.brand-lockup small { margin-top: 2px; font-size: 11px; }
.brand-mark { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; background: var(--foreground); color: white; font-family: Georgia, serif; font-weight: 700; letter-spacing: -.04em; box-shadow: 0 5px 14px rgba(37,36,58,.16); }
.eyebrow, .nav-label { margin-bottom: 8px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(430px, 1fr) minmax(420px, 1fr); }
.login-brand-panel { position: relative; display: flex; overflow: hidden; padding: 48px; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, var(--primary) 0%, #5445ba 56%, #372c88 100%); color: white; }
.login-brand-panel::after { position: absolute; right: -120px; bottom: -150px; width: 430px; height: 430px; border-radius: 50%; background: rgba(255,255,255,.09); content: ""; filter: blur(20px); }
.login-brand-panel .brand-mark { background: rgba(255,255,255,.16); box-shadow: none; backdrop-filter: blur(8px); }
.login-brand-panel small, .login-brand-panel .eyebrow { color: rgba(255,255,255,.68); }
.login-brand-copy { position: relative; z-index: 1; max-width: 540px; }
.login-brand-copy h1 { margin-bottom: 20px; font-size: clamp(36px, 4.3vw, 62px); line-height: 1.02; }
.login-brand-copy > p:last-child { max-width: 480px; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.7; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: min(100%, 380px); }
.login-card h2 { margin-bottom: 8px; font-size: 27px; }
.login-card > .muted { margin-bottom: 28px; font-size: 14px; }
.login-form { padding: 0; gap: 18px; }
.login-mobile-brand { display: none; }

.app-layout { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; width: 256px; height: 100vh; flex: 0 0 256px; flex-direction: column; border-right: 1px solid var(--border); background: var(--card); }
.sidebar-brand { padding: 24px; }
.sidebar-nav { display: flex; overflow-y: auto; padding: 12px; flex: 1; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 12px; color: #9997aa; }
.sidebar-item, .sidebar-group > p { display: flex; min-height: 42px; margin: 0; padding: 10px 12px; align-items: center; gap: 11px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; }
.sidebar-item.active { background: var(--primary); color: white; box-shadow: 0 5px 14px rgba(103,87,214,.22); }
.nav-icon { display: inline-grid; width: 20px; height: 20px; place-items: center; font-size: 11px; font-weight: 800; }
.sidebar-group { margin-top: 4px; }
.sidebar-group > p { color: #555469; }
.sidebar-group > a { display: block; margin-left: 21px; padding: 8px 13px 8px 20px; border-left: 1px solid var(--border); color: var(--muted); font-size: 13px; text-decoration: none; }
.sidebar-group > a:hover { color: var(--primary); }
.sidebar-promo { margin: 12px; padding: 16px; border-radius: var(--radius); background: linear-gradient(145deg, var(--primary), var(--primary-dark)); color: white; }
.sidebar-promo strong { font-size: 13px; }
.sidebar-promo p { margin: 7px 0 0; color: rgba(255,255,255,.76); font-size: 11px; line-height: 1.5; }
.sidebar-legal { display: flex; flex-wrap: wrap; padding: 0 16px; gap: 4px 14px; }
.sidebar-legal[hidden] { display: none; }
.sidebar-legal a { color: var(--muted); font-size: 11px; text-decoration: underline; }
.sidebar-legal a:hover { color: var(--text); }
.sidebar-version { padding: 12px 16px 16px; border-top: 1px solid var(--border); font-size: 10px; }

.app-column { min-width: 0; flex: 1; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; min-height: 65px; padding: 10px 32px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(233,232,240,.8); background: rgba(248,248,251,.84); backdrop-filter: blur(18px); }
.page-title { display: flex; align-items: center; gap: 10px; }
.page-title > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.page-title strong { font-size: 18px; letter-spacing: -.02em; }
.page-title small { margin-top: 2px; font-size: 11px; }
.mobile-mark { display: none; width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 13px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.badge, .header-button, .local-role select { width: auto; min-height: 34px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; }
.badge::before { width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--success); content: ""; }
.badge-subtle::before { background: var(--primary); }
.header-button { cursor: pointer; color: var(--foreground); font-weight: 600; }

main { width: min(1240px, 100%); margin: 0 auto; padding: 32px; }
.page-intro > div:first-child > p { max-width: 720px; margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.panel { border: 1px solid rgba(233,232,240,.9); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 3px rgba(37,36,58,.035); }
.metric-card { display: flex; min-height: 104px; padding: 20px; justify-content: center; flex-direction: column; }
.metric-card span { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.metric-card strong { overflow: hidden; font-size: 18px; text-overflow: ellipsis; }
.notice { margin-top: 18px; padding: 16px 18px; border-color: rgba(103,87,214,.18); background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; }
.workspace-section, .results-section { padding-top: 56px; scroll-margin-top: 70px; }
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.stack { display: flex; padding: 24px; flex-direction: column; gap: 18px; }
.section-heading { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 5px; }
.section-heading p { margin-bottom: 0; font-size: 13px; }
.section-heading-copy { display: block; }
.card-heading { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.step { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 800; }
.twin-create-card { grid-column: 1 / -1; }
.model-create-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(270px,.7fr); gap: 24px; }
.model-browser { min-width: 0; }
.picker-heading { display: flex; margin-bottom: 12px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.picker-heading h4 { margin: 0 0 4px; font-size: 14px; }
.picker-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.picker-heading-actions { display: flex; align-items: center; gap: 8px; }
.count-badge { padding: 5px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 700; white-space: nowrap; }
.search-field { margin-bottom: 12px; }
.search-field input { padding-left: 15px; border-radius: 12px; background: #fafafe; }
.picker-status { margin: 28px 0; color: var(--muted); font-size: 12px; text-align: center; }
.model-picker-grid { display: grid; max-height: 570px; padding: 2px; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 10px; overflow-y: auto; }
button.model-option { position: relative; display: block; overflow: hidden; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--foreground); text-align: left; box-shadow: 0 1px 3px rgba(37,36,58,.04); }
button.model-option:hover { border-color: rgba(103,87,214,.45); background: var(--card); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,36,58,.1); }
button.model-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(103,87,214,.13); }
button.model-option:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.model-option img { display: block; width: 100%; aspect-ratio: 4/5; background: #eeeef4; object-fit: cover; }
.model-option-copy { display: block; padding: 10px; }
.model-option-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.model-option-copy small { display: block; margin-top: 4px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.model-consent-badge { position: absolute; top: 8px; left: 8px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: rgba(27,106,72,.88); color: white; font-size: 8px; font-weight: 750; backdrop-filter: blur(8px); }
.model-attached-badge { position: absolute; top: 8px; right: 8px; padding: 5px 7px; border-radius: 999px; background: rgba(37,36,58,.84); color: white; font-size: 8px; font-weight: 700; }
.portrait-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.portrait-picker { display: grid; grid-template-columns: repeat(6,minmax(70px,1fr)); gap: 8px; }
button.portrait-option { min-height: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: #eeeef4; }
button.portrait-option:hover { border-color: rgba(103,87,214,.45); background: #eeeef4; }
button.portrait-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(103,87,214,.13); }
.portrait-option img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.consent-sidebar { display: flex; padding: 18px; flex-direction: column; gap: 17px; align-self: start; border: 1px solid var(--border); border-radius: 14px; background: #fafafe; }
.verified-consent { display: flex; padding: 13px; align-items: flex-start; gap: 10px; border: 1px solid rgba(35,134,92,.18); border-radius: 12px; background: rgba(35,134,92,.07); }
.verified-consent > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: var(--success); color: white; font-size: 12px; font-weight: 800; }
.verified-consent strong { display: block; color: #1b6a48; font-size: 11px; }
.verified-consent p { margin: 4px 0 0; color: #527363; font-size: 9px; line-height: 1.45; }
.generation-card { align-self: start; }
.style-field { position: relative; display: grid; gap: 12px; }
.style-field-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; color: #444357; font-size: 12px; font-weight: 650; }
.style-field-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 450; }
.style-select-native { position: absolute; width: 1px; min-height: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.style-picker-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
button.style-choice { display: grid; overflow: hidden; min-height: 150px; padding: 0; grid-template-columns: 118px minmax(0,1fr); align-items: stretch; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--foreground); text-align: left; box-shadow: 0 1px 3px rgba(37,36,58,.04); }
button.style-choice:hover { border-color: rgba(103,87,214,.42); background: var(--card); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,36,58,.09); }
button.style-choice.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(103,87,214,.12); }
button.style-choice:disabled { cursor: not-allowed; transform: none; }
.style-choice-visual { position: relative; display: flex; min-height: 148px; padding: 10px; overflow: hidden; justify-content: space-between; flex-direction: column; background: linear-gradient(150deg,#d7b98c,#5c493a); color: white; }
.style-choice-visual::after { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg,rgba(17,16,25,.52) 0%,transparent 42%,rgba(17,16,25,.48) 100%); content: ""; }
.style-choice-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.style-choice[data-category="editorial"] .style-choice-visual { background: radial-gradient(circle at 70% 20%,rgba(255,236,185,.7),transparent 25%),linear-gradient(145deg,#c9a574,#4d3b32 78%); }
.style-choice[data-category="commercial"] .style-choice-visual { background: radial-gradient(circle at 30% 25%,white,transparent 30%),linear-gradient(145deg,#e8eeec,#8a9e99); color: #354441; }
.style-choice[data-category="premium"] .style-choice-visual { background: radial-gradient(circle at 68% 28%,#c7badb,transparent 28%),linear-gradient(150deg,#5b526c,#191821); }
.style-choice[data-category="motion"] .style-choice-visual { background: radial-gradient(circle at 30% 30%,#7b6fe9,transparent 22%),linear-gradient(145deg,#343443,#111116); }
.style-choice-format { position: relative; z-index: 2; width: fit-content; padding: 4px 6px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(25,24,34,.45); color: white; font-size: 8px; font-weight: 800; letter-spacing: .14em; backdrop-filter: blur(8px); }
.style-choice-mark { position: relative; z-index: 2; display: grid; width: 31px; height: 31px; align-self: flex-end; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(25,24,34,.45); color: white; font-size: 15px; backdrop-filter: blur(8px); }
.style-choice-copy { display: flex; min-width: 0; padding: 13px; justify-content: center; flex-direction: column; }
.style-choice-copy strong { display: block; margin-bottom: 5px; font-size: 12px; }
.style-choice-copy small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 450; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.style-choice-use { display: block; margin-top: 9px; overflow: hidden; color: var(--primary); font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.style-preview-notice { display: flex; margin: -2px 0 0; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.style-preview-notice > span:first-child { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 7px; font-weight: 800; }
.preset-section { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #fafafe; }
.preset-heading { display: flex; margin-bottom: 11px; align-items: baseline; justify-content: space-between; gap: 12px; }
.preset-heading strong { font-size: 11px; }
.preset-heading small { color: var(--muted); font-size: 9px; }
.preset-picker { display: flex; flex-wrap: wrap; gap: 7px; }
button.preset-choice { min-height: 32px; padding: 7px 10px; border: 1px solid var(--input); border-radius: 999px; background: white; color: var(--muted); font-size: 9px; font-weight: 650; }
button.preset-choice:hover { border-color: rgba(103,87,214,.4); background: var(--primary-soft); color: var(--primary-dark); transform: none; }
button.preset-choice.selected { border-color: var(--primary); background: var(--primary); color: white; }
/* Who is in the picture: one chip per person of the shoot, click to add or
   remove. A selected chip carries its position, because the order of the
   selection is the order the people stand in the frame. */
.twin-field { display: flex; flex-direction: column; gap: 8px; }
.twin-field-heading { display: flex; flex-direction: column; gap: 3px; color: #444357; font-size: 12px; font-weight: 650; }
.twin-field-heading small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.twin-picker { display: flex; flex-wrap: wrap; gap: 8px; }
button.twin-choice { position: relative; display: flex; min-height: 46px; padding: 6px 12px 6px 6px; align-items: center; gap: 9px; border: 1px solid var(--input); border-radius: 999px; background: white; color: var(--foreground); font-size: 11px; font-weight: 650; text-align: left; }
button.twin-choice:hover { border-color: rgba(103,87,214,.4); background: var(--primary-soft); transform: none; }
button.twin-choice.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(103,87,214,.12); }
button.twin-choice:disabled { opacity: .55; }
.twin-choice-face { display: grid; overflow: hidden; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 800; }
.twin-choice-face img { width: 100%; height: 100%; object-fit: cover; }
.twin-choice-copy { display: flex; min-width: 0; flex-direction: column; }
.twin-choice-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.twin-choice-copy small { color: var(--muted); font-size: 9px; font-weight: 600; }
.twin-choice-order:not(:empty) { position: absolute; top: -6px; left: -4px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 999px; background: var(--primary); color: white; font-size: 9px; font-weight: 800; }
.preset-section > p { min-height: 15px; margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
label { display: flex; flex-direction: column; gap: 7px; color: #444357; font-size: 12px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--input); border-radius: 10px; outline: none; background: var(--card); color: var(--foreground); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 126px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(103,87,214,.12); }
input[type=file] { padding: 8px; color: var(--muted); font-size: 12px; }
fieldset { display: grid; margin: 0; padding: 14px; gap: 10px; border: 1px solid var(--border); border-radius: 12px; }
legend { padding: 0 6px; color: var(--muted); font-size: 11px; }
.legal-notice { margin: 0 0 3px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.legal-links { display: flex; flex-wrap: wrap; gap: 12px; }
.legal-links a { color: var(--primary); font-size: 11px; text-underline-offset: 3px; }
.check { align-items: center; flex-direction: row; font-weight: 450; }
.check input { width: 16px; min-height: 16px; height: 16px; accent-color: var(--primary); }
button, .button-link { display: inline-flex; min-height: 40px; padding: 10px 16px; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: var(--primary); color: white; cursor: pointer; font-weight: 650; text-align: center; text-decoration: none; transition: background .15s, transform .15s; }
button:hover, .button-link:hover { background: var(--primary-dark); }
button:focus-visible, .button-link:focus-visible { outline: 3px solid rgba(103,87,214,.28); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .55; }
.button-secondary { border: 1px solid var(--input); background: var(--card); color: var(--foreground); }
.button-secondary:hover { background: var(--primary-soft); color: var(--primary-dark); }
.button-link-muted { min-height: auto; padding: 3px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; }
.button-link-muted:hover { background: transparent; color: var(--primary); }
.message { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.message.error { color: var(--danger); }
.workspace-message:empty { display: none; }
.workspace-message.error { margin-bottom: 16px; padding: 12px 16px; border: 1px solid #f2c7c7; border-radius: 12px; background: #fff5f5; }
.style-info, .revision-notice { padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: #fafafe; color: var(--muted); font-size: 12px; line-height: 1.5; }
.style-info.style-data-notice { margin: 8px 0 0; border-color: var(--text, #121212); color: var(--text, #121212); }
.style-info.style-access { display: flex; margin: 8px 0 0; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text, #121212); }
.style-info.style-access p { flex: 1 1 220px; margin: 0; }
.data-processing { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.data-processing > summary { cursor: pointer; color: var(--text, #121212); font-weight: 600; }
.data-processing-body p { margin: 8px 0 0; }
.data-processing-body a { color: inherit; text-decoration: underline; }
.revision-notice { border-color: rgba(103,87,214,.22); background: var(--primary-soft); color: var(--primary-dark); }
.empty { padding: 34px; color: var(--muted); font-size: 13px; text-align: center; }
.job-grid, .twin-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.twin-card { padding: 18px; }
.twin-card h3 { margin: 0 0 8px; }
.twin-card p { margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.consent-editor { display: grid; margin-bottom: 14px; gap: 12px; }
.consent-editor input[type=date] { padding: 8px 10px; }
.consent-styles { padding: 11px; gap: 8px; }
.consent-styles .check { font-size: 11px; }
.twin-actions { display: flex; gap: 8px; }
.twin-actions button { min-height: 36px; flex: 1; padding: 8px; font-size: 11px; }
.danger { border-color: rgba(212,71,71,.28); color: var(--danger); }
.danger:hover { background: #fff2f2; color: var(--danger); }
.job-card { overflow: hidden; }
.job-preview { display: grid; aspect-ratio: 3/4; place-items: center; border-bottom: 1px solid var(--border); background: #f0f0f5; color: var(--muted); font-size: 12px; }
.job-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A film is judged, not cropped: the player keeps its whole frame while the
   still tiles stay in the 3:4 grid rhythm. */
.job-preview.is-video { aspect-ratio: auto; background: #24222b; }
.job-preview video { display: block; width: 100%; max-height: 60vh; background: #24222b; object-fit: contain; }
.job-preview img { cursor: zoom-in; }
.job-download { display: grid; width: 100%; gap: 6px; }
.job-download-name { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.job-download-name input { width: 100%; }
/* Generation runs 20–40 seconds. Without a moving surface the card reads as a
   dead tile and customers press "Create image" again, spending a second
   included image on the shot they already ordered. */
@keyframes job-preview-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.job-preview.pending { background: linear-gradient(100deg,#f0f0f5 32%,#e3e0f2 50%,#f0f0f5 68%); background-size: 220% 100%; animation: job-preview-shimmer 1.8s linear infinite; }
.job-preview-status { display: grid; padding: 12px; justify-items: center; gap: 4px; text-align: center; }
.job-preview-status strong { color: var(--text); font-size: 12px; }
.job-preview-status small { color: var(--muted); font-size: 10px; }
@media (prefers-reduced-motion: reduce) {
  .job-preview.pending { animation: none; }
}
.job-failure { margin: 0 0 13px; padding: 10px 12px; border-left: 3px solid var(--danger); border-radius: 0 10px 10px 0; background: #fff5f5; color: #7d3535; font-size: 11px; line-height: 1.5; }
.job-body { padding: 17px; }
.job-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.job-top h3 { margin: 0; font-size: 15px; }
.status { padding: 5px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.job-prompt { min-height: 54px; margin: 13px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.job-meta { display: flex; margin-bottom: 14px; flex-wrap: wrap; gap: 6px; }
.job-meta span { padding: 5px 8px; border-radius: 999px; background: #f2f2f6; color: #666579; font-size: 9px; }
.job-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.job-actions button, .job-actions a { min-height: 35px; padding: 8px; font-size: 11px; }
/* The regeneration warning sits with the buttons and spans both columns, so it
   is read before the click that throws the picture away, not after. */
.job-action-hint { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.45; }

@media (max-width: 1000px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .model-create-layout { grid-template-columns: 1fr; }
  .portrait-picker { grid-template-columns: repeat(4,minmax(70px,1fr)); }
  .job-grid, .twin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .style-picker-grid { grid-template-columns: 1fr; }
  button.style-choice { grid-template-columns: 78px minmax(0,1fr); }
}
@media (max-width: 760px) {
  .login-layout { display: block; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 28px 20px; flex-direction: column; }
  .login-mobile-brand { display: flex; width: min(100%,380px); margin-bottom: 58px; }
  .sidebar { display: none; }
  .mobile-mark { display: grid; }
  .site-header { padding: 9px 16px; }
  .page-title small, .badge-subtle { display: none; }
  .header-actions { gap: 5px; }
  .badge, .header-button, .local-role select { padding: 6px 8px; }
  main { padding: 24px 16px 64px; }
  .metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { min-height: 82px; }
  .workspace-section, .results-section { padding-top: 42px; }
  .job-grid, .twin-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > button { width: 100%; }
  .stack { padding: 19px; }
  .model-picker-grid { max-height: none; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portrait-picker { grid-template-columns: repeat(3,minmax(70px,1fr)); }
}
@media (pointer: coarse) { input, select, textarea { font-size: 16px; } }

/* Models available on request (agency confirms AI use per assignment) */
.requestable-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.requestable-filters { display: grid; margin-bottom: 14px; grid-template-columns: repeat(3,minmax(140px,1fr)) auto; align-items: end; gap: 10px; }
.requestable-filters label { gap: 5px; font-size: 10px; }
.requestable-filters select, .requestable-filters button { min-height: 38px; }
.model-request-badge { position: absolute; top: 8px; left: 8px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: rgba(122,90,32,.88); color: white; font-size: 8px; font-weight: 750; backdrop-filter: blur(8px); }
button.requestable-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(103,87,214,.13); }
.requestable-actions { display: flex; margin-top: 12px; align-items: center; gap: 12px; flex-wrap: wrap; }
.requestable-message { margin: 0; }
.consent-request-list { margin-top: 14px; }
.consent-request-list h4 { margin: 0 0 8px; font-size: 13px; }
.consent-request-list ul { display: flex; margin: 0; padding: 0; list-style: none; gap: 8px; flex-wrap: wrap; }
.consent-request-item { display: inline-flex; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); align-items: center; gap: 7px; font-size: 12px; }
.consent-status-badge { padding: 3px 7px; border-radius: 999px; background: #ececf3; font-size: 10px; font-weight: 700; }
.consent-status-badge.status-contacted { background: #e7ecfb; color: #2c4a9a; }
.consent-status-badge.status-approved { background: #e2f2eb; color: #27614d; }
.consent-status-badge.status-declined { background: #f9e5e5; color: #8f2f2f; }
@media (max-width: 760px) {
  .requestable-filters { grid-template-columns: 1fr 1fr; }
  .requestable-filters button { width: 100%; }
}

.job-formats { display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: 6px; }
.job-formats-label { width: 100%; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.job-format-link { min-height: 30px; padding: 5px 10px; border: 1px solid var(--border); background: white; color: var(--foreground); font-size: 10px; }
.job-format-link:hover { border-color: var(--primary); background: white; color: var(--primary); }
.job-format-flag { margin-left: 5px; opacity: .7; font-size: 9px; }
.job-formats-hint { width: 100%; color: var(--muted); font-size: 10px; line-height: 1.45; }

/* The "trust this device" line of the sign-in code step: box and text side by
   side, unlike the stacked label/input pairs above it. */
.login-form .checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--pc-ink-70, var(--foreground));
}
.login-form .checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--pc-ink, var(--primary));
}
