:root {
  color-scheme: light;
  --night: #f4f1ea;
  --ink: #fffdf9;
  --ink-soft: #eee8de;
  --cream: #273230;
  --muted: #64706c;
  --faint: #8a9490;
  --gold: #9a7531;
  --gold-light: #b48a3d;
  --danger: #a95248;
  --success: #39785a;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--night); color: var(--cream); font-family: var(--sans); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 16% -12%, rgba(197, 161, 91, .18), transparent 38rem), linear-gradient(180deg, #faf8f3, #f1ede5); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.grain { position: fixed; inset: 0; z-index: 20; opacity: .012; pointer-events: none; background-image: repeating-linear-gradient(115deg, #6e5b37 0 1px, transparent 1px 4px); }
.eyebrow { margin: 0; color: var(--gold-light); font-size: .65rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.login-shell { width: min(470px, calc(100% - 32px)); margin: min(15vh, 130px) auto 60px; padding: 44px; border: 1px solid rgba(216,187,119,.28); background: linear-gradient(145deg, rgba(28,23,22,.92), rgba(10,13,20,.95)); box-shadow: 0 34px 90px rgba(0,0,0,.45); }
.login-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 30px; border: 1px solid rgba(216,187,119,.55); border-radius: 50%; color: var(--gold-light); font: 400 1.9rem var(--serif); }
.login-shell h1 { margin: 10px 0 6px; font: 400 clamp(2.6rem, 9vw, 4.2rem)/.94 var(--serif); letter-spacing: -.04em; }
.lead { margin: 0; color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 17px; margin-top: 32px; }
label { display: grid; gap: 7px; }
label > span, legend { color: var(--gold-light); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
input, textarea, select { width: 100%; min-height: 46px; border: 1px solid rgba(216,187,119,.24); border-radius: 2px; padding: 11px 12px; color: var(--cream); background: rgba(4,6,10,.65); }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
select { appearance: auto; }
.gold-button, .quiet-button, .danger-button { min-height: 44px; border-radius: 2px; padding: 10px 15px; font-weight: 800; cursor: pointer; }
.gold-button { border: 1px solid var(--gold-light); color: #171007; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.quiet-button { border: 1px solid rgba(216,187,119,.3); background: rgba(13,16,23,.65); }
.danger-button { border: 1px solid rgba(217,137,125,.45); color: #ffd6cf; background: rgba(89,37,33,.38); }
.form-message { min-height: 22px; margin: 0; color: var(--danger); font-size: .82rem; }

.owner-app { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 80px; }
.owner-header { position: sticky; z-index: 10; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 82px; border-bottom: 1px solid rgba(216,187,119,.17); background: rgba(7,9,13,.86); backdrop-filter: blur(18px); }
.owner-header strong { display: block; margin-top: 4px; font: 400 1.25rem var(--serif); }
.owner-identity { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; }
.owner-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 22px 0 18px; }
.owner-tabs button { min-height: 44px; white-space: nowrap; border: 1px solid transparent; border-radius: 999px; padding: 0 17px; color: var(--muted); background: transparent; cursor: pointer; }
.owner-tabs button.is-active { border-color: rgba(216,187,119,.35); color: var(--cream); background: rgba(184,148,78,.1); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.panel { border: 1px solid rgba(216,187,119,.2); background: linear-gradient(145deg, rgba(21,20,24,.9), rgba(9,12,18,.92)); }
.workspace-grid { display: grid; grid-template-columns: minmax(270px, .33fr) minmax(0, 1fr); min-height: 720px; }
.search-panel { padding: 30px; border: 0; border-right: 1px solid rgba(216,187,119,.16); background: rgba(5,7,11,.48); }
.search-panel h2, .panel-heading h2 { margin: 8px 0 24px; font: 400 2.15rem/1 var(--serif); }
.search-panel form { display: grid; gap: 12px; }
.search-results { display: grid; gap: 8px; margin-top: 24px; }
.result-button { width: 100%; border: 1px solid rgba(216,187,119,.16); padding: 14px; color: var(--cream); background: rgba(15,18,26,.66); text-align: left; cursor: pointer; }
.result-button:hover, .result-button.is-active { border-color: rgba(216,187,119,.52); background: rgba(79,57,31,.25); }
.result-button strong, .result-button span { display: block; }
.result-button span { margin-top: 5px; color: var(--muted); font-size: .73rem; }
.new-customer { margin-top: 28px; border-top: 1px solid rgba(216,187,119,.15); padding-top: 18px; }
.new-customer summary { min-height: 44px; color: var(--gold-light); cursor: pointer; }
.new-customer form { margin-top: 16px; }
.customer-panel { min-width: 0; border: 0; padding: 38px; }
.empty-state { display: grid; place-items: center; align-content: center; min-height: 620px; color: var(--muted); text-align: center; }
.empty-state > span { color: var(--gold); font-size: 3rem; }
.empty-state h2 { margin: 18px 0 0; color: var(--cream); font: 400 2.3rem var(--serif); }
.customer-heading, .section-title, .panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.customer-heading h2 { margin: 9px 0 5px; font: 400 clamp(1.8rem, 4vw, 3.2rem)/1 var(--serif); }
.customer-heading p:last-child { margin: 0; color: var(--muted); }
.entitlement-ribbon { margin: 28px 0; padding: 17px 18px; border: 1px solid rgba(216,187,119,.2); background: rgba(184,148,78,.08); }
.entitlement-ribbon > span { color: var(--gold-light); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
#effective-books { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.book-chip { border: 1px solid rgba(216,187,119,.25); border-radius: 999px; padding: 6px 9px; font-size: .72rem; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.action-card { display: grid; gap: 11px; align-content: start; padding: 20px; border: 1px solid rgba(216,187,119,.15); background: rgba(5,7,11,.34); }
.action-card h3 { margin: 0; font: 400 1.35rem var(--serif); }
.action-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.grant-studio { margin-top: 28px; padding: 26px; border: 1px solid rgba(216,187,119,.32); background: radial-gradient(circle at 100% 0, rgba(184,148,78,.13), transparent 18rem), rgba(9,11,16,.65); }
.grant-studio h3 { margin: 7px 0 22px; font: 400 1.8rem var(--serif); }
.grant-studio form { display: grid; gap: 17px; }
.scope-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin: 0; border: 0; padding: 0; }
.scope-options legend { grid-column: 1 / -1; margin-bottom: 7px; }
.scope-card { grid-template-columns: auto 1fr; align-items: start; gap: 10px; border: 1px solid rgba(216,187,119,.16); padding: 15px; cursor: pointer; }
.scope-card:has(input:checked) { border-color: var(--gold-light); background: rgba(184,148,78,.09); }
.scope-card--permanent { border-color: rgba(217,137,125,.28); }
.scope-card input { width: 18px; min-height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.scope-card strong, .scope-card small { display: block; }
.scope-card strong { font-size: .86rem; }
.scope-card small { margin-top: 6px; color: var(--muted); line-height: 1.4; }
.book-checks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.book-check { grid-template-columns: auto 1fr; align-items: center; gap: 9px; border: 1px solid rgba(216,187,119,.14); padding: 10px; font-size: .76rem; }
.book-check input { width: 17px; min-height: 17px; accent-color: var(--gold); }
.permanent-confirm { border-left: 3px solid var(--danger); padding-left: 14px; }
.data-section { margin-top: 34px; }
.section-title h3 { margin: 6px 0 14px; font: 400 1.6rem var(--serif); }
.data-list { display: grid; gap: 8px; }
.data-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; border-top: 1px solid rgba(216,187,119,.13); padding: 15px 0; }
.data-row:first-child { border-top: 0; }
.data-row strong, .data-row span, .data-row small { display: block; }
.data-row span { margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.data-row small { margin-top: 4px; color: var(--faint); }
.status-ok { color: var(--success) !important; }
.status-bad { color: var(--danger) !important; }
.panel-heading { padding: 34px; border-bottom: 1px solid rgba(216,187,119,.15); }
.panel-heading > p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.65; }
.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 28px; }
.mapping-card { display: grid; gap: 12px; border: 1px solid rgba(216,187,119,.16); padding: 20px; }
.mapping-card h3 { margin: 0; font: 400 1.28rem var(--serif); }
.mapping-card p { margin: 0; color: var(--muted); font-size: .75rem; }
.mapping-card .mapping-warning { padding: 10px 12px; border-left: 2px solid var(--gold); color: #735a2c; background: #fbf4e6; line-height: 1.5; }
.audit-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 22px 34px; }
.audit-list { padding: 0 34px 30px; }
.audit-health { border: 1px solid rgba(216,187,119,.22); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: .75rem; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: 410px; border: 1px solid rgba(216,187,119,.45); padding: 14px 18px; color: var(--cream); background: rgba(15,18,25,.96); box-shadow: 0 18px 48px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.studio-panel { overflow: hidden; border: 1px solid rgba(216,187,119,.2); background: radial-gradient(circle at 76% 3%, rgba(184,148,78,.17), transparent 29rem), linear-gradient(145deg, rgba(21,20,24,.95), rgba(7,9,13,.98)); }
.studio-panel.is-active { display: block; }
.studio-hero { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr); gap: 48px; align-items: end; min-height: 340px; padding: clamp(34px,6vw,78px); border-bottom: 1px solid rgba(216,187,119,.16); }
.studio-hero__copy { max-width: 820px; }
.studio-hero h1 { max-width: 760px; margin: 14px 0 20px; font: 400 clamp(3rem,6.3vw,6.7rem)/.88 var(--serif); letter-spacing: -.055em; }
.studio-hero__copy > p:last-child { max-width: 700px; margin: 0; color: var(--muted); font: 400 clamp(1rem,1.5vw,1.28rem)/1.65 var(--serif); }
.studio-readiness { display: grid; gap: 9px; align-self: end; padding: 22px; border: 1px solid rgba(216,187,119,.23); background: rgba(5,7,11,.48); }
.studio-readiness > span { color: var(--gold-light); font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.studio-readiness > strong { font: 400 3.2rem var(--serif); }
.studio-readiness > div { height: 3px; background: rgba(244,235,216,.12); }
.studio-readiness i { display: block; height: 100%; background: var(--gold-light); }
.studio-readiness small { color: var(--muted); }
.studio-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 0; padding: 0 clamp(22px,4vw,58px); list-style: none; border-bottom: 1px solid rgba(216,187,119,.14); }
.studio-steps li { position: relative; display: grid; gap: 5px; min-height: 112px; align-content: center; padding: 16px 18px; border-left: 1px solid rgba(216,187,119,.1); color: var(--faint); }
.studio-steps li:last-child { border-right: 1px solid rgba(216,187,119,.1); }
.studio-steps li.is-current { color: var(--cream); background: linear-gradient(180deg, rgba(184,148,78,.12), transparent); }
.studio-steps li.is-current::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; content: ""; background: var(--gold-light); }
.studio-steps span { color: var(--gold-light); font-size: .63rem; letter-spacing: .16em; }
.studio-steps strong { font: 400 1.15rem var(--serif); }
.studio-steps small { font-size: .72rem; }
.studio-workspace { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 18px; padding: clamp(22px,4vw,58px); }
.studio-card { border: 1px solid rgba(216,187,119,.16); padding: clamp(24px,3vw,40px); background: rgba(5,7,11,.42); }
.studio-card--primary { box-shadow: 0 28px 70px rgba(0,0,0,.2); }
.studio-section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 30px; }
.studio-card h2 { margin: 8px 0 0; font: 400 clamp(1.75rem,3vw,2.7rem)/1 var(--serif); }
.studio-state { border: 1px solid rgba(216,187,119,.25); border-radius: 999px; padding: 7px 10px; color: var(--gold-light); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.studio-form { display: grid; gap: 18px; }
.studio-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.input-suffix { display: grid; grid-template-columns: minmax(0,1fr) auto; border: 1px solid rgba(216,187,119,.24); background: rgba(4,6,10,.65); }
.input-suffix input { border: 0; background: transparent; }
.input-suffix span { display: grid; place-items: center; padding: 0 13px; color: var(--gold-light); font-size: .7rem; letter-spacing: .1em; }
.studio-next { justify-self: start; display: flex; align-items: center; gap: 36px; min-width: 230px; margin-top: 6px; }
.studio-next span { font-size: 1.2rem; }
.studio-compass { background: radial-gradient(circle at 100% 0, rgba(184,148,78,.12), transparent 17rem), rgba(8,10,15,.62); }
.studio-compass ul { display: grid; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; }
.studio-compass li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(216,187,119,.13); }
.studio-compass li > span { color: var(--gold); font: 400 .82rem var(--serif); }
.studio-compass strong, .studio-compass small { display: block; }
.studio-compass strong { font: 400 1.06rem var(--serif); }
.studio-compass small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.studio-steps li.is-done { color: var(--cream); }
.studio-steps li.is-done span { color: var(--success); }
.studio-project-bar { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 20px clamp(22px,4vw,58px); border-bottom: 1px solid rgba(216,187,119,.14); background: rgba(5,7,11,.34); }
.studio-project-bar > div { min-width: 0; }
.studio-project-list { display: flex; gap: 8px; max-width: min(900px,70vw); margin-top: 8px; overflow-x: auto; }
.studio-project-empty { color: var(--muted); font-size: .78rem; }
.studio-project-chip { display: grid; gap: 3px; min-width: 170px; min-height: 48px; border: 1px solid rgba(216,187,119,.15); padding: 8px 12px; color: var(--cream); background: rgba(13,16,23,.62); text-align: left; cursor: pointer; }
.studio-project-chip.is-active { border-color: rgba(216,187,119,.62); background: rgba(184,148,78,.12); }
.studio-project-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 .9rem var(--serif); }
.studio-project-chip small { color: var(--muted); font-size: .64rem; }
.studio-project-workspace { display: grid; gap: 18px; padding: clamp(22px,4vw,58px); }
.studio-project-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: clamp(8px,2vw,24px) 0 clamp(20px,3vw,42px); }
.studio-project-head h2 { margin: 10px 0 8px; font: 400 clamp(3rem,6vw,6rem)/.88 var(--serif); letter-spacing: -.052em; }
.studio-project-head p:last-child { margin: 0; color: var(--muted); }
.studio-result-gate { display: flex; justify-content: space-between; gap: 28px; align-items: center; margin: 0 0 26px; border: 1px solid rgba(154,117,49,.2); border-radius: 16px; padding: 22px 24px; background: linear-gradient(135deg,#f9f5ec,#fffdf9); box-shadow: 0 12px 34px rgba(62,54,42,.06); }
.studio-result-gate > div:first-child { display: grid; gap: 6px; }
.studio-result-gate .eyebrow { margin: 0; }
.studio-result-gate strong { font: 400 clamp(1.35rem,2.4vw,2rem)/1.05 var(--serif); }
.studio-result-gate small { max-width: 700px; color: var(--muted); line-height: 1.5; }
.studio-result-progress { display: grid; gap: 7px; width: min(680px,70vw); margin-top: 5px; }
.studio-result-progress > span { display: block; overflow: hidden; height: 8px; border-radius: 999px; background: rgba(74,63,46,.1); }
.studio-result-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#a27627,#d1ad63); transition: width .35s ease; }
.studio-result-progress small { font-size: .72rem; }
.studio-result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.studio-result-actions a,.studio-result-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 19px; text-decoration: none; white-space: nowrap; }
.studio-result-actions .is-disabled { pointer-events: none; opacity: .42; filter: grayscale(.35); box-shadow: none; }
.studio-result-gate.is-ready { border-color: rgba(45,119,80,.28); background: linear-gradient(135deg,#eef8f1,#fffdf9); }
.studio-result-gate.is-running { border-color: rgba(154,117,49,.34); background: linear-gradient(135deg,#fff8e8,#fffdf9); }
.studio-result-gate.is-failed { border-color: rgba(170,74,61,.3); background: linear-gradient(135deg,#fff1ee,#fffdf9); }
.studio-production-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(290px,.65fr); gap: 18px; }
.studio-intro { max-width: 760px; margin: -8px 0 25px; color: var(--muted); line-height: 1.65; }
.studio-upload-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.studio-image-placement{display:grid;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:16px;border:1px solid rgba(74,63,46,.12);border-radius:12px;background:#faf7f1}.studio-image-placement label{display:grid;gap:7px}.studio-image-placement span{color:#7b5b21;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.studio-image-placement input{width:100%;min-height:46px;border:1px solid rgba(74,63,46,.18);border-radius:9px;padding:10px 12px;background:#fff;color:#273230}.studio-image-placement small{color:#6e7773;font-size:.7rem;line-height:1.45}
.studio-drop { position: relative; align-content: start; min-height: 145px; border: 1px dashed rgba(216,187,119,.3); padding: 20px; background: rgba(9,11,16,.55); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.studio-drop:hover { border-color: var(--gold-light); background: rgba(184,148,78,.08); }
.studio-drop input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.studio-drop > span { color: var(--gold-light); font-size: .65rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.studio-drop > strong, .studio-drop > small { display: block; }
.studio-drop > strong { margin-top: 15px; font: 400 1.05rem/1.25 var(--serif); }
.studio-drop > small { margin-top: 9px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.studio-drop:has(input:disabled) { opacity: .46; cursor: not-allowed; }
.studio-assets { display: grid; gap: 0; margin-top: 22px; }
.studio-asset-row { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 13px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(216,187,119,.12); }
.studio-asset-row > span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(216,187,119,.28); border-radius: 50%; color: var(--gold-light); font: 400 .74rem var(--serif); }
.studio-asset-row strong, .studio-asset-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-asset-row strong { font-size: .8rem; }
.studio-asset-row small { margin-top: 4px; color: var(--faint); font-size: .64rem; }
.studio-build-card { align-content: start; background: radial-gradient(circle at 100% 0,rgba(184,148,78,.15),transparent 20rem),rgba(7,9,13,.68); }
.studio-build-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.studio-build-card .gold-button { margin-top: 22px; }
.studio-build-card > small { display: block; margin-top: 10px; color: var(--muted); }
.studio-quality { background: linear-gradient(145deg,rgba(21,24,28,.92),rgba(8,10,15,.92)); }
.studio-verdict { border: 1px solid currentColor; border-radius: 999px; padding: 8px 11px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.studio-quality-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border: 1px solid rgba(216,187,119,.15); }
.studio-quality-metrics > div { display: grid; gap: 8px; padding: 22px; border-left: 1px solid rgba(216,187,119,.12); }
.studio-quality-metrics > div:first-child { border-left: 0; }
.studio-quality-metrics span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.studio-quality-metrics strong { font: 400 2rem var(--serif); }
.studio-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.studio-check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; min-height: 54px; border: 1px solid rgba(216,187,119,.13); padding: 12px; }
.studio-check > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid currentColor; border-radius: 50%; }
.studio-check strong { font-size: .78rem; line-height: 1.4; }
.studio-check.is-good { color: var(--success); }
.studio-check.is-bad { color: var(--danger); }
.studio-preview-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.studio-preview-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.studio-publish { border-color: rgba(216,187,119,.4); background: radial-gradient(circle at 80% 0,rgba(184,148,78,.17),transparent 25rem),rgba(14,12,12,.88); }
.studio-publish-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,.62fr); gap: 15px; align-items: end; }
.studio-publish-form button { grid-column: 2; }
.studio-confirm { border-left: 3px solid var(--gold-light); padding-left: 13px; }
.studio-publish-form textarea { min-height: 96px; }

@media (max-width: 920px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .search-panel { border-right: 0; border-bottom: 1px solid rgba(216,187,119,.16); }
  .scope-options, .book-checks { grid-template-columns: 1fr 1fr; }
  .mapping-grid { grid-template-columns: 1fr; }
  .studio-hero, .studio-workspace { grid-template-columns: 1fr; }
  .studio-steps { grid-template-columns: repeat(5, minmax(145px,1fr)); overflow-x: auto; }
  .studio-production-grid { grid-template-columns: 1fr; }
  .studio-quality-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-quality-metrics > div:nth-child(3) { border-left: 0; border-top: 1px solid rgba(216,187,119,.12); }
  .studio-quality-metrics > div:nth-child(4) { border-top: 1px solid rgba(216,187,119,.12); }
  .studio-quality-metrics > div:nth-child(5) { border-left: 0; border-top: 1px solid rgba(216,187,119,.12); }
}
@media (max-width: 620px) {
  .login-shell { padding: 30px 22px; }
  .owner-app { width: min(100% - 20px, 1500px); }
  .owner-header { align-items: start; padding: 15px 0; }
  .owner-identity { align-items: end; flex-direction: column; }
  .customer-panel, .search-panel, .panel-heading, .mapping-grid, .audit-list { padding: 22px 16px; }
  .action-grid, .scope-options, .book-checks { grid-template-columns: 1fr; }
  .customer-heading, .section-title, .panel-heading { flex-direction: column; }
  .data-row { grid-template-columns: 1fr; }
  .grant-studio { padding: 20px 15px; }
  .studio-hero { min-height: auto; padding: 34px 22px; }
  .studio-hero h1 { font-size: clamp(3.2rem,16vw,4.8rem); }
  .studio-workspace { padding: 14px; }
  .studio-form-grid { grid-template-columns: 1fr; }
  .studio-project-bar { align-items: start; flex-direction: column; padding: 18px 14px; }
  .studio-project-list { max-width: calc(100vw - 28px); }
  .studio-project-workspace { padding: 14px; }
  .studio-project-head { align-items: start; flex-direction: column; }
  .studio-result-gate { align-items: stretch; flex-direction: column; }
  .studio-result-progress { width: 100%; }
  .studio-result-actions { justify-content: flex-start; }
  .studio-upload-grid, .studio-check-list, .studio-publish-form { grid-template-columns: 1fr; }
  .studio-publish-form button { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Warmes Arbeitsstudio: helle Flächen, hohe Lesbarkeit, ruhige Orientierung. */
.login-shell,
.panel,
.studio-panel,
.studio-card,
.studio-quality,
.studio-publish {
  border-color: rgba(74, 63, 46, .14);
  color: var(--cream);
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 18px 54px rgba(62, 54, 42, .08);
}

.login-shell { border-radius: 18px; background: rgba(255, 253, 249, .97); }
.login-mark { border-color: rgba(154, 117, 49, .4); background: #f7f0e3; }
.owner-app { width: min(1540px, calc(100% - 32px)); }
.owner-header {
  border-color: rgba(74, 63, 46, .13);
  background: rgba(250, 248, 243, .92);
  box-shadow: 0 8px 28px rgba(62, 54, 42, .06);
}
.owner-tabs {
  position: sticky;
  z-index: 9;
  top: 82px;
  margin: 0 -8px;
  padding: 14px 8px;
  background: rgba(244, 241, 234, .92);
  backdrop-filter: blur(16px);
}
.owner-tabs button { color: #64706c; font-weight: 750; }
.owner-tabs button:hover { color: var(--cream); background: rgba(154, 117, 49, .08); }
.owner-tabs button.is-active {
  border-color: rgba(154, 117, 49, .32);
  color: #2d342f;
  background: #fffaf0;
  box-shadow: 0 4px 18px rgba(86, 65, 31, .06);
}

input,
textarea,
select,
.input-suffix {
  border-color: rgba(74, 63, 46, .2);
  border-radius: 10px;
  color: #273230;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(50, 44, 35, .03);
}
input::placeholder,
textarea::placeholder { color: #939b97; }
.input-suffix input { background: transparent; }
.gold-button,
.quiet-button,
.danger-button { border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.gold-button { border-color: #9a7531; color: #fff; background: linear-gradient(135deg, #b68a3c, #8e6a2b); box-shadow: 0 8px 20px rgba(142, 106, 43, .18); }
.gold-button:hover:not(:disabled),
.quiet-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(62, 54, 42, .12); }
.quiet-button { border-color: rgba(74, 63, 46, .2); color: #37413f; background: #fff; }
.danger-button { color: #8b3f38; background: #fff4f2; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.search-panel,
.action-card,
.grant-studio,
.result-button,
.mapping-card,
.studio-compass,
.studio-build-card,
.studio-readiness,
.studio-project-chip,
.studio-drop {
  border-color: rgba(74, 63, 46, .13);
  color: var(--cream);
  background: #fffdf9;
}
.search-panel { background: #faf7f1; }
.result-button:hover,
.result-button.is-active,
.scope-card:has(input:checked),
.studio-project-chip.is-active {
  border-color: rgba(154, 117, 49, .46);
  background: #fbf4e6;
}
.entitlement-ribbon,
.grant-studio { background: #fbf5e9; }
.scope-card,
.book-check,
.data-row,
.panel-heading,
.studio-steps,
.studio-project-bar,
.studio-asset-row,
.studio-quality-metrics,
.studio-quality-metrics > div,
.studio-check {
  border-color: rgba(74, 63, 46, .12);
}
.toast { border-color: rgba(154, 117, 49, .38); color: #273230; background: #fffdf9; box-shadow: 0 18px 48px rgba(62, 54, 42, .16); }

.emergency-panel { overflow: hidden; border: 1px solid rgba(74,63,46,.14); border-radius: 20px; color: var(--cream); background: radial-gradient(circle at 92% 4%,rgba(198,158,80,.17),transparent 28rem),rgba(255,253,249,.96); box-shadow: 0 18px 54px rgba(62,54,42,.08); }
.emergency-hero { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: clamp(28px,6vw,90px); align-items: end; min-height: 310px; padding: clamp(34px,6vw,70px); border-bottom: 1px solid rgba(74,63,46,.12); }
.emergency-hero h1 { max-width: 850px; margin: 13px 0 20px; font: 400 clamp(3.2rem,6.5vw,6.7rem)/.88 var(--serif); letter-spacing: -.055em; }
.emergency-hero p:last-child { max-width: 780px; margin: 0; color: var(--muted); font: 400 clamp(.96rem,1.4vw,1.16rem)/1.68 var(--serif); }
.emergency-hero aside { display: grid; gap: 9px; border-left: 1px solid rgba(154,117,49,.42); padding: 3px 0 3px 24px; }
.emergency-hero aside span { color: var(--gold-light); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.emergency-hero aside strong { font: 400 1.7rem var(--serif); }
.emergency-hero aside small { max-width: 320px; color: var(--muted); line-height: 1.55; }
.emergency-workspace { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); min-height: 700px; }
.emergency-products, .emergency-recipient { padding: clamp(28px,4vw,54px); }
.emergency-products { border-right: 1px solid rgba(74,63,46,.12); }
.emergency-recipient { background: rgba(250,247,241,.72); }
.emergency-section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 28px; }
.emergency-section-heading h2 { max-width: 660px; margin: 8px 0 0; font: 400 clamp(1.9rem,3.4vw,3.2rem)/.96 var(--serif); }
.emergency-section-heading > span { color: var(--muted); font-size: .72rem; }
.emergency-product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.emergency-product { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 118px; border: 1px solid rgba(74,63,46,.13); border-radius: 12px; padding: 16px; color: var(--cream); background: #fff; text-align: left; cursor: pointer; transition: transform .2s ease,border-color .2s ease,background .2s ease; }
.emergency-product:hover { transform: translateY(-2px); border-color: rgba(154,117,49,.42); background: #fffaf0; }
.emergency-product.is-selected { border-color: #b48a3d; box-shadow: inset 0 -3px 0 #b48a3d,0 10px 26px rgba(86,65,31,.08); background: radial-gradient(circle at 100% 0,rgba(216,187,119,.19),transparent 12rem),#fffaf0; }
.emergency-product-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(154,117,49,.3); border-radius: 50%; color: var(--gold); font: 400 .75rem var(--serif); }
.emergency-product-copy, .emergency-product-copy > * { display: block; min-width: 0; }
.emergency-product-copy small { color: var(--gold); font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.emergency-product-copy strong { margin-top: 7px; font: 400 1.08rem/1.08 var(--serif); }
.emergency-product-copy > span { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: .69rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.emergency-product-arrow { color: var(--gold); font-size: 1.1rem; }
.emergency-selected { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 13px; align-items: center; margin-bottom: 34px; border: 1px solid rgba(74,63,46,.13); border-radius: 12px; padding: 15px; background: #fff; }
.emergency-selected > span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(154,117,49,.35); border-radius: 50%; color: var(--gold); }
.emergency-selected small, .emergency-selected strong { display: block; }
.emergency-selected small { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.emergency-selected strong { margin-top: 4px; font: 400 1rem/1.15 var(--serif); }
.emergency-selected.has-selection { border-color: rgba(154,117,49,.4); background: #fffaf0; }
.emergency-form { display: grid; gap: 16px; }
.emergency-name-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.emergency-form label > small { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.emergency-verified { grid-template-columns: auto 1fr; align-items: start; gap: 11px; border: 1px solid rgba(74,63,46,.13); border-radius: 10px; padding: 14px; background: #fff; cursor: pointer; }
.emergency-verified input { width: 18px; min-height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.emergency-verified span, .emergency-verified strong, .emergency-verified small { display: block; }
.emergency-verified strong { color: var(--cream); font-size: .78rem; letter-spacing: 0; text-transform: none; }
.emergency-verified small { margin-top: 5px; color: var(--muted); font-size: .68rem; line-height: 1.45; letter-spacing: 0; text-transform: none; }
.emergency-result { min-height: 44px; margin: 0; color: var(--success); font-size: .78rem; line-height: 1.55; }

.studio-panel {
  border-radius: 20px;
  background: radial-gradient(circle at 82% 0, rgba(198, 158, 80, .14), transparent 31rem), rgba(255, 253, 249, .96);
}
.studio-hero {
  min-height: 270px;
  padding: clamp(30px, 5vw, 62px);
  border-color: rgba(74, 63, 46, .12);
}
.studio-hero h1 { max-width: 690px; font-size: clamp(2.8rem, 5.3vw, 5.35rem); }
.studio-readiness { border-radius: 14px; background: rgba(255,255,255,.76); }
.studio-readiness > div { height: 6px; border-radius: 99px; background: #e7dfd2; overflow: hidden; }
.studio-readiness i { border-radius: inherit; background: linear-gradient(90deg, #b48a3d, #d2ae69); }
.studio-steps { background: rgba(250, 247, 241, .72); }
.studio-steps li { min-height: 96px; border-color: rgba(74, 63, 46, .1); color: #87908c; }
.studio-steps li.is-current { color: #273230; background: linear-gradient(180deg, #fbf3e4, rgba(255,255,255,.3)); }
.studio-steps li.is-done { color: #40504a; }
.studio-project-bar { background: #faf7f1; }
.studio-project-chip { border-radius: 10px; }
.studio-card { border-radius: 15px; }
.studio-card--primary { box-shadow: 0 16px 42px rgba(62, 54, 42, .07); }
.studio-compass { background: linear-gradient(145deg, #fbf6eb, #fffdf9); }
.studio-production-grid { align-items: start; }
.studio-drop { min-height: 132px; border-radius: 12px; border-style: dashed; }
.studio-drop:hover { border-color: #b48a3d; background: #fcf5e7; }
.studio-drop:focus-within { outline: 2px solid #b48a3d; outline-offset: 2px; }
.studio-build-card { position: sticky; top: 154px; background: linear-gradient(145deg, #fbf5e8, #fffdf9); }
.studio-quality { background: linear-gradient(145deg, #f8fbf8, #fffdf9); }
.studio-publish { background: linear-gradient(145deg, #fff9ee, #fffdf9); }
.studio-quality-metrics { overflow: hidden; border-radius: 12px; background: #fff; }
.studio-check { border-radius: 10px; background: #fff; }
.studio-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.studio-test-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 12px 0 0;
  border: 1px solid rgba(57, 120, 90, .24);
  border-radius: 12px;
  padding: 13px 16px;
  color: #285940;
  background: #eef8f1;
}
.studio-test-banner[hidden] { display: none; }
.studio-test-banner div { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.studio-test-banner strong { font-size: .82rem; }
.studio-test-banner span { font-size: .75rem; line-height: 1.45; }
.studio-test-badge { flex: 0 0 auto; border: 1px solid rgba(57,120,90,.25); border-radius: 999px; padding: 6px 9px; font-weight: 800; background: rgba(255,255,255,.72); }
.studio-test-complete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  border-color: rgba(57, 120, 90, .22);
  background: linear-gradient(145deg, #eef8f1, #fffdf9);
}
.studio-test-complete[hidden] { display: none; }
.studio-test-complete h2 { margin: 4px 0 7px; }
.studio-test-complete p:last-child { max-width: 680px; margin: 0; color: #52645b; line-height: 1.6; }
.studio-test-complete .studio-preview-actions { flex: 0 0 auto; margin: 0; }
.studio-test-complete .gold-button { display: inline-flex; align-items: center; text-decoration: none; }

.studio-ai-state {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  margin: 20px 0 2px;
  border: 1px solid rgba(74, 63, 46, .14);
  border-radius: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, .66);
}
.studio-ai-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #9a7b42; box-shadow: 0 0 0 4px rgba(154, 123, 66, .1); }
.studio-ai-state div { display: grid; gap: 4px; }
.studio-ai-state strong { font-size: .75rem; }
.studio-ai-state small { color: var(--muted); font-size: .69rem; line-height: 1.45; }
.studio-ai-state.is-live { border-color: rgba(45, 119, 80, .24); background: #eef8f1; }
.studio-ai-state.is-live .studio-ai-dot { background: #2d7750; box-shadow: 0 0 0 4px rgba(45, 119, 80, .12); }
.studio-ai-state.is-mock { border-color: rgba(60, 102, 137, .23); background: #eff6fb; }
.studio-ai-state.is-mock .studio-ai-dot { background: #3d6f98; box-shadow: 0 0 0 4px rgba(61, 111, 152, .12); }
.studio-ai-state.is-off { border-color: rgba(154, 94, 68, .24); background: #fff4ef; }
.studio-ai-state.is-off .studio-ai-dot { background: #a65f43; box-shadow: 0 0 0 4px rgba(166, 95, 67, .12); }
.studio-direction {
  margin-top: 18px;
  border: 1px solid rgba(154, 117, 49, .2);
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(145deg, #fbf5e8, #fff);
}
.studio-direction[hidden] { display: none; }
.studio-direction > span { display: block; color: #8e6a2b; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.studio-direction > strong { display: block; margin-top: 7px; font: 400 1.55rem var(--serif); }
.studio-direction > p { max-width: 760px; margin: 8px 0 14px; color: var(--muted); line-height: 1.6; }
.studio-direction > div { display: flex; flex-wrap: wrap; gap: 7px; }
.studio-direction > div span { border: 1px solid rgba(154,117,49,.2); border-radius: 999px; padding: 5px 8px; color: #69542e; background: #fffaf0; font-size: .68rem; font-weight: 750; }
.studio-production-review { display: grid; grid-template-columns: minmax(170px,.34fr) minmax(0,1fr); gap: 20px; margin-top: 18px; border: 1px solid rgba(45,119,80,.2); border-radius: 12px; padding: 20px; background: #f4faf6; }
.studio-production-review[hidden] { display: none; }
.studio-production-review > div:first-child { display: grid; align-content: start; gap: 8px; }
.studio-production-review > div:first-child span { color: #48705d; font-size: .66rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.studio-production-review > div:first-child strong { color: #244f3a; font: 400 1.7rem var(--serif); }
.studio-production-review > div:first-child small { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.studio-production-review ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: production; }
.studio-production-review ol li { counter-increment: production; display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; min-height: 42px; border: 1px solid rgba(45,119,80,.14); border-radius: 9px; padding: 8px 11px; background: #fff; }
.studio-production-review ol li:before { content: counter(production, decimal-leading-zero); color: #73917f; font-size: .65rem; font-weight: 850; }
.studio-production-review ol li strong { font-size: .75rem; }
.studio-production-review ol li span { color: #2d7750; font-size: .68rem; font-weight: 800; }
.studio-applied-corrections,.studio-correction-proof { grid-column: 1 / -1; border-top: 1px solid rgba(45,119,80,.14); padding-top: 14px; }
.studio-applied-corrections[hidden],.studio-correction-proof[hidden] { display: none; }
.studio-applied-corrections > strong,.studio-correction-proof > strong { font-size: .76rem; }
.studio-applied-corrections ul,.studio-correction-proof ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.studio-correction-proof li.is-proven { color: #2d7750; }
.studio-correction-proof li.is-missing { color: #9a493e; }
.studio-owner-review { background: linear-gradient(145deg,#fffaf1,#fffdf9); }
.studio-correction-form textarea { min-height: 150px; resize: vertical; }
.studio-correction-form small { color: var(--muted); }
.studio-correction-form .studio-form-actions span { color: var(--muted); font-size: .72rem; }
.studio-correction-form .studio-revision-help { margin: 12px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.studio-correction-form .studio-revision-help strong { color: var(--ink); }
.studio-production-switch { min-width: min(100%,340px); min-height: 52px; font-weight: 850; box-shadow: 0 12px 28px rgba(142,106,43,.24); }
.studio-production-switch:after { content: "→"; margin-left: 12px; font-size: 1.05rem; }
.studio-visual-approval { display: flex; justify-content: space-between; gap: 22px; align-items: center; margin-top: 22px; border: 1px solid rgba(154,117,49,.22); border-radius: 12px; padding: 17px 19px; background: rgba(255,255,255,.72); }
.studio-visual-approval[hidden] { display: none; }
.studio-visual-approval p { margin: 5px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.studio-visual-approval.is-approved { border-color: rgba(45,119,80,.28); background: #eef8f1; }

@media (max-width: 920px) {
  .studio-build-card { position: static; }
  .studio-test-complete { align-items: flex-start; flex-direction: column; }
  .studio-production-review { grid-template-columns: 1fr; }
  .studio-applied-corrections,.studio-correction-proof { grid-column: auto; }
  .emergency-hero, .emergency-workspace { grid-template-columns: 1fr; }
  .emergency-products { border-right: 0; border-bottom: 1px solid rgba(74,63,46,.12); }
}
@media (max-width: 620px) {
  .owner-tabs { top: 76px; }
  .studio-test-banner { align-items: flex-start; flex-direction: column; }
  .studio-test-badge { align-self: flex-start; }
  .studio-image-placement { grid-template-columns: 1fr; }
  .studio-visual-approval { align-items: stretch; flex-direction: column; }
  .emergency-hero { min-height: auto; padding: 34px 22px; }
  .emergency-products, .emergency-recipient { padding: 24px 16px; }
  .emergency-product-grid, .emergency-name-grid { grid-template-columns: 1fr; }
}
