@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/cormorant-garamond-latin.woff2") format("woff2");
}

:root {
  --ivory: #f7f2e8;
  --paper: #fffdf7;
  --paper-soft: #f3eee4;
  --forest: #113326;
  --forest-2: #244c39;
  --moss: #789262;
  --mist: #d9e4dc;
  --line: #d8d5c9;
  --muted: #66716a;
  --coral: #ff6d52;
  --danger: #a53b2b;
  --shadow: 0 24px 70px rgba(22, 46, 35, .11);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: light; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--forest);
  background: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.studio-app :focus-visible { outline-color: var(--coral); }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: 10px; background: var(--forest); color: white; }
.skip-link:focus { top: 12px; }

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 650; letter-spacing: -.015em; }
.brand img { width: auto; height: 52px; object-fit: contain; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.app-header { min-height: 72px; padding: max(10px, env(safe-area-inset-top)) 0 10px; border-bottom: 1px solid rgba(18,51,38,.1); background: rgba(248,244,235,.92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.app-header__inner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--forest); background: transparent; color: var(--forest); font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease, color .18s ease, opacity .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button--primary { background: var(--forest); color: white; box-shadow: 0 8px 22px rgba(18,51,38,.14); }
.button--soft { background: var(--paper-soft); border-color: var(--line); }
.button--text { border-color: transparent; padding-inline: 10px; }
.button--danger { color: var(--danger); border-color: rgba(165,59,43,.25); }

/* Shared confirmation dialog. Destructive and incomplete-work actions use the
   same calm, explicit pattern across the dashboard, Studio, and admin tools. */
.confirm-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(17,51,38,.18);
  border-radius: 24px;
  color: var(--forest);
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(9,25,18,.24);
}
.confirm-dialog::backdrop {
  background: rgba(9,25,18,.68);
  backdrop-filter: blur(5px);
}
.confirm-dialog__form { display: grid; }
.confirm-dialog__body {
  display: grid;
  grid-template-columns: 50px minmax(0,1fr);
  gap: 18px;
  padding: 28px 28px 24px;
}
.confirm-dialog__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--forest-2);
  background: var(--mist);
}
.confirm-dialog__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.confirm-dialog[data-tone="danger"] .confirm-dialog__icon {
  color: var(--danger);
  background: #f5dfd7;
}
.confirm-dialog[data-tone="warning"] .confirm-dialog__icon {
  color: #71521c;
  background: #f3e7c9;
}
.confirm-dialog__copy { min-width: 0; }
.confirm-dialog__eyebrow {
  margin: 1px 0 8px;
  color: var(--forest-2);
  font-size: .69rem;
  font-weight: 760;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}
.confirm-dialog[data-tone="danger"] .confirm-dialog__eyebrow { color: var(--danger); }
.confirm-dialog[data-tone="warning"] .confirm-dialog__eyebrow { color: #71521c; }
.confirm-dialog__copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 2.65rem);
  font-weight: 550;
  letter-spacing: -.035em;
  line-height: .98;
  overflow-wrap: anywhere;
}
.confirm-dialog__copy > p:not(.confirm-dialog__eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.52;
}
.confirm-dialog__detail {
  padding: 12px 14px;
  border-left: 3px solid var(--line);
  border-radius: 0 11px 11px 0;
  background: var(--paper-soft);
  font-size: .88rem;
}
.confirm-dialog[data-tone="danger"] .confirm-dialog__detail { border-left-color: var(--danger); background: #f8e9e2; }
.confirm-dialog[data-tone="warning"] .confirm-dialog__detail { border-left-color: #9b762d; background: #faf1dd; }
.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line);
  background: rgba(243,238,228,.46);
}
.confirm-dialog__actions .button { min-width: 128px; }
.confirm-dialog__confirm {
  border-color: var(--forest);
  color: white;
  background: var(--forest);
  box-shadow: 0 8px 22px rgba(17,51,38,.14);
}
.confirm-dialog[data-tone="danger"] .confirm-dialog__confirm {
  border-color: var(--danger);
  background: var(--danger);
  box-shadow: 0 8px 22px rgba(165,59,43,.18);
}
.confirm-dialog[data-tone="warning"] .confirm-dialog__confirm {
  border-color: #71521c;
  background: #71521c;
  box-shadow: 0 8px 22px rgba(113,82,28,.16);
}

.eyebrow { margin: 0 0 16px; color: var(--forest-2); font-size: .76rem; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
.display { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.045em; line-height: .96; }
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.94); box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; }
.field label, .field legend { color: var(--forest); font-weight: 680; }
.field small, .form-help { color: var(--muted); }
input, textarea, select { width: 100%; min-height: 48px; border: 1px solid #c8c8bb; border-radius: 13px; background: white; color: var(--forest); padding: 12px 14px; }
textarea { min-height: 112px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--forest-2); outline: 3px solid rgba(18,51,38,.22); }
.error { color: var(--danger); font-size: .92rem; font-weight: 600; }
.status { min-height: 24px; color: var(--muted); }

.landing-hero { min-height: calc(100vh - 72px); display: grid; align-items: center; padding: 76px 0 92px; position: relative; overflow: hidden; background-image: linear-gradient(90deg, rgba(248,244,235,.98) 0%, rgba(248,244,235,.94) 42%, rgba(248,244,235,.69) 72%, rgba(248,244,235,.5) 100%), url('/assets/green-journey-landscape.avif'); background-size: cover; background-position: center; }
.landing-hero::before, .landing-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.landing-hero::before { width: 540px; height: 540px; left: -250px; bottom: -290px; background: radial-gradient(circle, rgba(120,146,98,.34), rgba(120,146,98,0) 67%); }
.landing-hero::after { width: 620px; height: 620px; right: -300px; top: -260px; background: radial-gradient(circle, rgba(217,228,220,.75), rgba(217,228,220,0) 69%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(350px,.7fr); align-items: center; gap: 72px; }
.hero-copy h1 { font-size: clamp(3.8rem, 8.5vw, 7.6rem); max-width: 820px; }
.hero-copy .lede { max-width: 660px; margin: 28px 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card { padding: 28px; position: relative; overflow: hidden; }
.hero-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(217,228,220,.65), transparent 56%); pointer-events: none; }
.hero-card > * { position: relative; }
.hero-card h2 { margin: 8px 0 12px; font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.sample-frame { margin: 18px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper-soft); }
.sample-frame img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.sample-frame figcaption { padding: 9px 11px; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.proof-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.proof-list li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; }
.proof-dot { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); font-size: .75rem; }
.variation { border-top: 1px solid var(--line); padding: 28px 0 60px; color: var(--muted); }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-art { padding: 56px clamp(28px, 6vw, 90px); display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(150deg, #e5ebdf, #f8f4eb 58%); }
.login-art h1 { max-width: 640px; font-size: clamp(3rem, 6vw, 6.4rem); }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--paper); }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 8px 0; font-family: var(--serif); font-size: 2.5rem; font-weight: 500; }
.login-form { display: grid; gap: 18px; margin-top: 28px; }
.login-note { margin-top: 22px; color: var(--muted); font-size: .9rem; }

.app-main { padding: 46px 0 90px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.page-heading h1 { font-size: clamp(3rem, 7vw, 5.7rem); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.project-card { min-height: 210px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s ease, border-color .2s ease; }
.project-card:hover { transform: translateY(-3px); border-color: var(--moss); }
.project-card h2 { margin: 8px 0; font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.project-card__link { flex: 1; display: flex; flex-direction: column; justify-content: space-between; color: inherit; text-decoration: none; }
.project-delete { align-self: flex-start; margin: 10px 0 -8px -10px; }
.project-meta { color: var(--muted); font-size: .86rem; }
.empty-state { grid-column: 1/-1; padding: 56px; text-align: center; }

.admin-main { min-height: calc(100vh - 72px); padding: 58px 0 96px; }
.admin-shell { width: min(780px, calc(100% - 40px)); margin: 0 auto; display: grid; gap: 22px; }
.admin-heading { margin-bottom: 8px; }
.admin-heading h1 { font-size: clamp(3.4rem, 8vw, 6.6rem); }
.admin-heading .lede { max-width: 680px; margin-bottom: 0; }
.admin-card { padding: 26px; display: grid; gap: 22px; }
.admin-card h2 { margin: 0 0 5px; font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.admin-card p { margin: 0; color: var(--muted); }
.admin-invite-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; }
.admin-invite-form .button { min-width: 118px; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-invite-list { display: grid; gap: 10px; }
.admin-invite-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.admin-invite-row strong, .admin-invite-row small { display: block; overflow-wrap: anywhere; }
.admin-invite-row small { margin-top: 3px; color: var(--muted); }
.admin-empty { padding: 30px 16px; border: 1px dashed var(--line); border-radius: 15px; text-align: center; }

.admin-shell--prompt { width: min(980px,calc(100% - 40px)); gap: 26px; }
.prompt-editor { display: grid; gap: 22px; padding: 28px; box-shadow: none; }
.prompt-editor__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.prompt-editor h2, .prompt-protected h2, .prompt-history h2 { margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 550; }
.prompt-editor__head p, .prompt-protected p, .prompt-history p { margin: 5px 0 0; color: var(--muted); }
.prompt-version { flex: 0 0 auto; display: inline-flex; min-height: 32px; align-items: center; padding: 0 11px; border: 1px solid rgba(17,51,38,.16); border-radius: 999px; color: var(--forest-2); background: var(--paper-soft); font-size: .76rem; font-weight: 720; }
.prompt-editor__form { display: grid; gap: 15px; }
.prompt-editor textarea { min-height: 300px; padding: 17px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .9rem; line-height: 1.65; }
.prompt-editor__actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.prompt-editor__actions > span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.prompt-editor__actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.prompt-protected { display: grid; grid-template-columns: minmax(220px,.68fr) minmax(0,1fr); gap: 28px; padding: 26px 28px; box-shadow: none; }
.prompt-protected .eyebrow { margin-bottom: 7px; }
.prompt-protected ul { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; padding: 0; margin: 0; list-style: none; }
.prompt-protected li { position: relative; padding-left: 23px; color: var(--forest-2); font-size: .88rem; }
.prompt-protected li::before { position: absolute; top: .18em; left: 0; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: var(--paper); background: var(--forest); font-size: .58rem; content: "✓"; }
.prompt-history { display: grid; gap: 18px; padding: 26px 28px; box-shadow: none; }
.prompt-history__list { display: grid; gap: 10px; }
.prompt-history__list[aria-busy="true"] { opacity: .58; }
.prompt-history__row { display: grid; grid-template-columns: minmax(135px,.28fr) minmax(0,1fr) minmax(135px,.3fr); gap: 18px; align-items: start; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.prompt-history__row strong, .prompt-history__row small { display: block; }
.prompt-history__row small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.prompt-history__row p { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .76rem; line-height: 1.5; }
.prompt-history__row > span { color: var(--muted); font-size: .76rem; }
.prompt-confirm-note { margin-top: 18px; }
.prompt-confirm-note textarea { min-height: 82px; }
.prompt-confirm-note label span { color: var(--muted); font-weight: 450; }
.confirm-dialog__copy .error:empty { display: none; }

.admin-shell--prompt-studio { width: min(1320px,calc(100% - 40px)); gap: 22px; }
.prompt-studio-heading { margin-bottom: 2px; }
.prompt-release-bar { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 18px; box-shadow: none; }
.prompt-release-bar__identity { min-width: 0; display: flex; align-items: center; gap: 13px; }
.prompt-release-bar__identity strong, .prompt-release-bar__identity small { display: block; }
.prompt-release-bar__identity small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.prompt-release-bar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.prompt-release-bar__actions .button { min-height: 42px; padding-inline: 14px; font-size: .82rem; }
.prompt-studio-status { min-height: 22px; margin: -8px 2px 0; }
.prompt-studio-layout { display: grid; grid-template-columns: 236px minmax(0,1fr); align-items: start; gap: 16px; }
.prompt-studio-nav { position: sticky; top: 94px; display: grid; gap: 4px; padding: 9px; box-shadow: none; }
.prompt-studio-nav button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); background: transparent; font: inherit; font-size: .82rem; font-weight: 680; text-align: left; cursor: pointer; }
.prompt-studio-nav button:hover { color: var(--forest); background: var(--paper-soft); }
.prompt-studio-nav button[aria-selected="true"] { color: var(--forest); border-color: rgba(17,51,38,.15); background: var(--mist); }
.prompt-studio-nav button span { flex: 0 0 auto; color: var(--muted); font-size: .63rem; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.prompt-studio-workspace { min-width: 0; padding: 27px; box-shadow: none; }
.prompt-studio-workspace > section { display: grid; gap: 26px; }
.prompt-studio-workspace > section[hidden] { display: none; }
.prompt-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.prompt-panel-heading .eyebrow { margin-bottom: 7px; }
.prompt-panel-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem,4vw,2.8rem); font-weight: 550; letter-spacing: -.03em; }
.prompt-panel-heading p:not(.eyebrow) { max-width: 680px; margin: 5px 0 0; color: var(--muted); }
.prompt-panel-badge, .prompt-lock-mark { flex: 0 0 auto; min-height: 29px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid rgba(17,51,38,.15); border-radius: 999px; color: var(--forest-2); background: var(--paper-soft); font-size: .65rem; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.prompt-panel-badge--locked, .prompt-lock-mark { color: #71521c; border-color: rgba(113,82,28,.22); background: #faf1dd; }
.prompt-field-stack { display: grid; gap: 18px; }
.prompt-field-stack--compact { gap: 13px; }
.prompt-studio-workspace .field textarea { min-height: 116px; padding: 14px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .82rem; line-height: 1.55; }
.prompt-field-stack--compact .field textarea, .prompt-field-grid .field textarea { min-height: 94px; }
.prompt-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.prompt-subsection { display: grid; gap: 13px; }
.prompt-subsection + .prompt-subsection { padding-top: 23px; border-top: 1px solid var(--line); }
.prompt-subsection h3, .prompt-compiled-layout h3, .prompt-protected-grid h3 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 570; }
.prompt-scene-layout { display: grid; grid-template-columns: minmax(220px,.36fr) minmax(0,1fr); gap: 18px; }
.prompt-scene-list { display: grid; align-content: start; gap: 8px; }
.prompt-scene-tab { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--forest); background: white; text-align: left; cursor: pointer; }
.prompt-scene-tab:hover { border-color: rgba(17,51,38,.32); }
.prompt-scene-tab[aria-selected="true"] { border-color: rgba(17,51,38,.42); box-shadow: 0 0 0 3px rgba(17,51,38,.05); background: var(--paper-soft); }
.prompt-scene-tab strong { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; }
.prompt-scene-tab small { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.prompt-scene-tab span, .prompt-contract-card span { min-height: 21px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: .58rem; font-weight: 760; text-transform: uppercase; }
.is-available { color: var(--forest-2); background: var(--mist); }
.is-coming { color: #71521c; background: #f3e7c9; }
.prompt-scene-editor { min-width: 0; display: grid; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.54); }
.prompt-scene-editor__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.prompt-scene-editor__heading .eyebrow { margin-bottom: 5px; }
.prompt-scene-editor__heading h3 { margin: 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 560; }
.prompt-scene-editor__heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.prompt-contract-box { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(17,51,38,.13); border-radius: 13px; background: var(--mist); }
.prompt-contract-box > strong { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.prompt-contract-box dl { display: grid; gap: 7px; margin: 0; }
.prompt-contract-box dl > div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 12px; }
.prompt-contract-box dt { color: var(--muted); font-size: .7rem; }
.prompt-contract-box dd { margin: 0; font-size: .76rem; font-weight: 650; text-transform: capitalize; }
.prompt-contract-box ul, .prompt-protected-grid ul, .prompt-contract-card ul, .prompt-validation-summary ul, .prompt-publish-diff ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.prompt-contract-box li, .prompt-protected-grid li, .prompt-contract-card li, .prompt-validation-summary li, .prompt-publish-diff li { color: var(--forest-2); font-size: .76rem; line-height: 1.45; }
.prompt-test-controls { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)) auto; align-items: end; gap: 10px; }
.prompt-test-controls .button { min-height: 49px; }
.prompt-validation-summary:empty { display: none; }
.prompt-validation-summary { display: grid; gap: 10px; }
.prompt-validation-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid rgba(17,51,38,.16); border-radius: 12px; background: var(--mist); }
.prompt-validation-summary > div.is-invalid { color: var(--danger); border-color: rgba(165,59,43,.25); background: #f8e9e2; }
.prompt-validation-summary span { font-size: .74rem; }
.prompt-compiled-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 18px; }
.prompt-compiled-layout > div { min-width: 0; display: grid; align-content: start; gap: 12px; }
.prompt-block-list { display: grid; gap: 8px; max-height: 620px; overflow: auto; }
.prompt-block-card { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.prompt-block-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prompt-block-card strong { overflow-wrap: anywhere; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .67rem; }
.prompt-block-card span { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; font-size: .55rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.prompt-block-card .is-prompt_release { color: var(--forest-2); background: var(--mist); }
.prompt-block-card .is-scene_contract { color: #71521c; background: #f3e7c9; }
.prompt-block-card .is-protected_rule { color: var(--danger); background: #f5dfd7; }
.prompt-block-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.48; }
.prompt-raw-preview { min-height: 420px; max-height: 620px; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; color: var(--forest); background: #fff; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .7rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-protected-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 22px; }
.prompt-protected-grid > div { display: grid; align-content: start; gap: 13px; }
.prompt-contract-list { display: grid; gap: 9px; }
.prompt-contract-card { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.prompt-contract-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prompt-contract-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.prompt-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.prompt-metric-card { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-soft); }
.prompt-metric-card > span { color: var(--muted); font-size: .64rem; font-weight: 760; text-transform: uppercase; }
.prompt-metric-card strong { font-family: var(--serif); font-size: 1.65rem; font-weight: 570; }
.prompt-metric-card small { color: var(--muted); font-size: .68rem; line-height: 1.4; }
.prompt-history__row--studio { grid-template-columns: minmax(140px,.25fr) minmax(200px,.7fr) minmax(150px,.36fr) auto; }
.prompt-history__actions { display: flex; justify-content: flex-end; }
.prompt-history__actions .button { min-height: 38px; padding: 7px 10px; font-size: .7rem; white-space: nowrap; }
.prompt-active-mark { display: inline-flex; min-height: 29px; align-items: center; padding: 0 9px; border-radius: 999px; color: var(--forest-2) !important; background: var(--mist); font-size: .62rem !important; font-weight: 740; }
.prompt-publish-diff { display: grid; gap: 9px; margin-top: 16px; }
.prompt-publish-diff .confirm-dialog__detail { margin: 0; }
.prompt-publish-diff ul { max-height: 150px; overflow: auto; }
.prompt-publish-dialog { width: min(620px,calc(100% - 28px)); }

.admin-nav { display: flex; align-items: center; gap: 4px; }
.admin-nav a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: .84rem; font-weight: 650; text-decoration: none; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { color: var(--forest); background: rgba(17,51,38,.07); }
.admin-shell--wide { width: min(1240px, calc(100% - 40px)); gap: 28px; }
.admin-heading--split { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.admin-heading--split h1 { max-width: 850px; font-size: clamp(3.2rem,7vw,6.2rem); }
.generation-admin .surface { box-shadow: none; }
.ops-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.ops-stat { min-height: 138px; display: grid; align-content: space-between; padding: 18px; border: 1px solid rgba(17,51,38,.14); border-radius: 17px; background: rgba(255,253,248,.72); }
.ops-stat > span { color: var(--muted); font-size: .72rem; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.ops-stat strong { margin: 10px 0 3px; font-family: var(--serif); font-size: clamp(2rem,4vw,3rem); font-weight: 550; letter-spacing: -.04em; line-height: 1; }
.ops-stat small { color: var(--muted); font-size: .77rem; }
.ops-stat--attention { border-color: rgba(165,59,43,.24); background: rgba(255,245,239,.72); }
.ops-panel { overflow: hidden; }
.ops-panel__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px 24px 18px; }
.ops-panel__head h2 { margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 550; }
.ops-panel__head p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.ops-search { width: min(360px,45%); }
.ops-search input { min-height: 44px; border-radius: 11px; font-size: .88rem; }
.ops-filters { display: flex; gap: 5px; padding: 0 24px 16px; overflow-x: auto; }
.ops-filters button { min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 680; white-space: nowrap; cursor: pointer; }
.ops-filters button[aria-pressed="true"] { color: var(--forest); border-color: rgba(17,51,38,.16); background: var(--paper-soft); }
.ops-table-wrap { min-height: 250px; overflow-x: auto; border-top: 1px solid var(--line); }
.ops-table-wrap[aria-busy="true"] { opacity: .58; }
.ops-table { width: 100%; min-width: 910px; border-collapse: collapse; }
.ops-table th { padding: 11px 16px; color: var(--muted); background: rgba(243,238,228,.58); font-size: .67rem; font-weight: 740; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.ops-table th:first-child, .ops-table td:first-child { padding-left: 24px; }
.ops-table th:last-child, .ops-table td:last-child { padding-right: 24px; }
.ops-table td { padding: 16px; border-top: 1px solid rgba(216,213,201,.74); vertical-align: middle; }
.ops-table tbody tr:first-child td { border-top: 0; }
.ops-table tbody tr:hover { background: rgba(217,228,220,.18); }
.ops-request-title, .ops-request-meta, .ops-request-model, .ops-status-detail, .ops-cost-kind, .ops-cost-warning, .ops-time-detail { display: block; }
.ops-request-title { max-width: 300px; overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.ops-request-meta { margin-top: 3px; color: var(--forest-2); font-size: .75rem; }
.ops-request-model, .ops-time-detail { margin-top: 2px; color: var(--muted); font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .65rem; }
.ops-status { display: inline-flex; align-items: center; gap: 7px; min-height: 25px; padding: 0 9px; border-radius: 999px; color: var(--forest); background: var(--mist); font-size: .7rem; font-weight: 740; }
.ops-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.ops-status--reserved, .ops-status--submitting { background: #efe6cf; }
.ops-status--processing, .ops-status--ingesting { color: #1d4c37; background: #dce9df; }
.ops-status--failed, .ops-status--failed_unknown { color: var(--danger); background: #f5dfd7; }
.ops-status--cancelled { color: #5f625f; background: #ecebe6; }
.ops-status-detail { max-width: 220px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.ops-cost, .ops-time { display: block; font-size: .86rem; font-variant-numeric: tabular-nums; }
.ops-cost-kind, .ops-time-detail { color: var(--muted); font-size: .66rem; }
.ops-cost-warning { margin-top: 3px; color: var(--danger); font-size: .65rem; font-weight: 680; }
.ops-row-action { width: 92px; text-align: right; }
.button--compact { min-height: 36px; padding: 6px 13px; font-size: .76rem; }
.button--stop { border-color: #9a3025; background: #9a3025; color: white; }
.button--stop:hover { background: #7f251c; }
.ops-no-action { color: var(--line); }
.ops-empty { min-height: 250px; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 36px; color: var(--muted); text-align: center; }
.ops-empty strong { color: var(--forest); }
.ops-cost-note { margin: 0; padding: 13px 24px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
.ops-dialog { width: min(520px,calc(100% - 28px)); padding: 0; border: 1px solid rgba(17,51,38,.18); border-radius: 22px; color: var(--forest); background: var(--paper); box-shadow: var(--shadow); }
.ops-dialog form { display: grid; gap: 18px; padding: 24px; }
.ops-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.ops-dialog__mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--danger); background: #f5dfd7; font-size: .7rem; }
.ops-dialog__close { width: 44px; height: 44px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 1.7rem; cursor: pointer; }
.ops-dialog .eyebrow { margin: -8px 0 -14px; color: var(--danger); }
.ops-dialog h2 { margin: 0; font-family: var(--serif); font-size: 2.4rem; font-weight: 550; letter-spacing: -.03em; }
.ops-dialog__summary { margin: -10px 0 0; color: var(--muted); }
.ops-dialog__impact { padding: 14px 16px; border-left: 3px solid var(--danger); border-radius: 0 12px 12px 0; background: #f8e9e2; font-size: .88rem; }
.ops-dialog label span { color: var(--muted); font-weight: 450; }
.ops-dialog textarea { min-height: 88px; }
.ops-dialog .error:empty { display: none; }
.ops-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }

.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; }
.studio-header { position: sticky; top: 0; z-index: 80; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; padding: 0 clamp(20px,3vw,48px); border-bottom: 1px solid rgba(18,51,38,.16); background: rgba(255,253,248,.96); backdrop-filter: blur(18px); }
.studio-brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; min-height: 44px; color: var(--forest); text-decoration: none; }
.studio-brand img { width: auto; height: 56px; object-fit: contain; }
.studio-brand > span { display: grid; line-height: 1.12; }
.studio-brand strong { font-size: 14px; font-weight: 720; letter-spacing: -.02em; }
.studio-brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.studio-header__center { display: flex; justify-content: center; }
.studio-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.studio-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255,109,82,.11); }
.studio-header__actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.language-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(18,51,38,.16); border-radius: 12px; background: var(--paper-soft); }
.language-switch span, .language-switch button { display: grid; min-height: 44px; place-items: center; padding: 0 12px; border: 0; border-radius: 9px; font: inherit; font-size: 12px; }
.language-switch span { color: var(--forest); background: var(--paper); box-shadow: 0 1px 4px rgba(18,51,38,.09); font-weight: 680; }
.language-switch button { color: var(--muted); background: transparent; cursor: not-allowed; }
.studio-leave { display: inline-flex; min-height: 44px; align-items: center; padding: 0 6px; color: var(--muted); font-size: 12px; text-decoration: none; }
.mobile-leave { display: none; }
.studio-progress-wrap { display: grid; grid-template-columns: 190px minmax(0,720px); justify-content: center; align-items: center; gap: 34px; min-height: 92px; padding: 15px 24px; border-bottom: 1px solid rgba(18,51,38,.16); background: var(--paper); }
.studio-progress-copy { display: grid; gap: 2px; }
.studio-progress-copy span { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.studio-progress-copy strong { color: var(--forest); font-size: 14px; }
.studio-progress { display: grid; grid-template-columns: repeat(5,1fr); padding: 0; margin: 0; list-style: none; }
.studio-progress li { position: relative; }
.studio-progress li::before { position: absolute; top: 16px; right: 50%; left: -50%; height: 1px; background: var(--line); content: ""; }
.studio-progress li:first-child::before { display: none; }
.studio-progress li.is-complete::before, .studio-progress li.is-current::before { background: rgba(18,51,38,.55); }
.studio-progress button { position: relative; z-index: 1; display: grid; justify-items: center; width: 100%; min-height: 48px; padding: 0 5px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.studio-progress button:disabled { cursor: default; }
.studio-progress .step-number { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 10px; }
.studio-progress button > span:last-child { margin-top: 6px; font-size: 12px; white-space: nowrap; }
.studio-progress li.is-current button { color: var(--forest); font-weight: 700; }
.studio-progress li.is-current .step-number { color: var(--paper); border-color: var(--forest); background: var(--forest); box-shadow: 0 0 0 5px rgba(18,51,38,.08); }
.studio-progress li.is-complete .step-number { color: var(--forest); border-color: rgba(18,51,38,.35); }
.mobile-preview-bar { display: none; }
.studio-shell { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(400px,.95fr); gap: clamp(28px,4vw,68px); width: min(1440px,100%); min-height: calc(100svh - 168px); padding: clamp(34px,5vw,76px) clamp(24px,5vw,82px) 84px; margin: 0 auto; }
.studio-conversation { min-width: 0; }
.studio-summary { margin-bottom: 28px; padding: 14px 16px; border: 1px solid rgba(18,51,38,.16); border-radius: 16px; background: rgba(255,253,248,.65); }
.studio-summary__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.studio-summary__heading > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.studio-summary__heading button { min-width: 44px; min-height: 44px; padding: 0 7px; border: 0; color: var(--forest); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.studio-summary__items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.studio-summary__items > span { display: grid; min-width: 110px; gap: 1px; padding: 9px 11px; border: 1px solid rgba(18,51,38,.1); border-radius: 11px; color: var(--forest); background: var(--paper); font-size: 12px; }
.studio-summary__items small { color: var(--muted); font-size: 11px; }
#conversation { width: min(100%,720px); margin: 0 auto; }
.assistant-turn { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; align-items: start; margin-bottom: 0; }
.assistant-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(18,51,38,.16); border-radius: 14px; background: var(--paper); box-shadow: 0 7px 18px rgba(18,51,38,.06); }
.assistant-mark img { width: 26px; }
.assistant-copy { padding-top: 4px; }
.assistant-copy:focus-within { outline: none; }
.assistant-copy > span { display: block; margin-bottom: 9px; color: #a64232; font-size: 12px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.assistant-copy h2 { max-width: 590px; margin: 0; color: var(--forest); font-family: var(--sans); font-size: clamp(28px,3.4vw,44px); font-weight: 560; letter-spacing: -.045em; line-height: 1.06; }
.assistant-copy h2:focus { outline: none; }
.assistant-copy p { max-width: 590px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.answer-card { display: grid; gap: 18px; margin: 27px 0 0 56px; padding: 0; }
.studio-conversation .answer-card.surface { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.studio-conversation .field { gap: 8px; }
.studio-conversation .field label, .studio-conversation .field legend { font-size: 12px; font-weight: 700; }
.studio-conversation input, .studio-conversation textarea, .studio-conversation select { border-color: rgba(18,51,38,.16); border-radius: 13px; box-shadow: 0 8px 24px rgba(18,51,38,.035); }
.studio-conversation input:focus, .studio-conversation textarea:focus, .studio-conversation select:focus { border-color: rgba(18,51,38,.48); outline: 4px solid rgba(255,109,82,.09); }
.studio-conversation .button { border-radius: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.form-actions .button:only-child { margin-left: auto; }
.studio-preview { min-width: 0; }
.preview-card { position: sticky; top: 202px; overflow: hidden; padding: 0; border-radius: 22px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 67px; padding: 0 19px; border-bottom: 1px solid rgba(18,51,38,.1); }
.preview-head > span { display: grid; gap: 2px; }
.preview-head small { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.preview-head strong { color: var(--forest); font-size: 13px; }
.preview-head > i { display: grid; min-width: 42px; min-height: 27px; place-items: center; border: 1px solid rgba(18,51,38,.16); border-radius: 8px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; }
.preview-close { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid rgba(18,51,38,.16); border-radius: 11px; color: var(--forest); background: var(--paper); font-size: 20px; cursor: pointer; }
.preview-close span { font-size: 11px; font-weight: 700; }
.banner-stage { position: relative; aspect-ratio: 2 / 1; overflow: hidden; margin: 18px; border: 1px solid rgba(18,51,38,.1); border-radius: 14px; background-image: url('/assets/memorial-studio-preview-template.jpg'); background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(18,51,38,.05); isolation: isolate; }
.banner-stage::before { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg,rgba(7,20,15,.55),rgba(7,20,15,.06) 48%,rgba(255,253,247,.08)); content: ""; }
.banner-stage.has-artwork { background-color: var(--mist); background-position: center; background-repeat: no-repeat; background-size: cover; }
.banner-stage.has-artwork::before { background: linear-gradient(180deg,rgba(255,253,247,.1),transparent 45%,rgba(7,20,15,.04)); }
.banner-stage.has-artwork .banner-placeholder, .banner-stage.has-artwork .banner-direction-layer, .banner-stage.has-artwork .banner-layout-badge { display: none; }
.banner-stage canvas { display: none; position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; }
.banner-stage.canvas-ready canvas { display: block; }
.banner-stage.canvas-ready::before, .banner-stage.canvas-ready .banner-type, .banner-stage.canvas-ready .banner-placeholder, .banner-stage.canvas-ready .banner-safe-line, .banner-stage.canvas-ready .banner-direction-layer, .banner-stage.canvas-ready .banner-layout-badge { display: none; }
.banner-direction-layer { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.banner-direction-path { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: translateY(2%); transition: opacity .22s ease, transform .22s ease; }
.banner-direction-path path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.banner-direction-path__edge { stroke: rgba(64,75,48,.28); stroke-width: 54px; }
.banner-direction-path__light { stroke: rgba(242,218,158,.62); stroke-width: 38px; filter: drop-shadow(0 0 6px rgba(255,253,247,.28)); }
.banner-stage[data-direction="path"] .banner-direction-path, .banner-stage[data-direction="traditional"] .banner-direction-path { opacity: .72; transform: translateY(0); }
.banner-family-field { position: absolute; top: 12%; right: 5%; width: 31%; height: 43%; opacity: 0; border: 1px dashed rgba(255,253,247,.66); border-radius: 50%; background: radial-gradient(circle at 50% 52%,rgba(255,253,247,.24),rgba(255,253,247,.04) 55%,transparent 72%); box-shadow: 0 0 38px rgba(255,253,247,.1); transform: scale(.94); transition: opacity .22s ease, transform .22s ease; }
.banner-stage[data-direction="family"] .banner-family-field { opacity: .78; transform: scale(1); }
.banner-family-field i { position: absolute; display: block; width: 6px; height: 6px; border: 1px solid rgba(255,253,247,.82); border-radius: 50%; background: rgba(17,51,38,.46); box-shadow: 0 0 0 4px rgba(255,253,247,.12); }
.banner-family-field i:nth-child(1) { top: 19%; left: 28%; }
.banner-family-field i:nth-child(2) { top: 58%; left: 68%; }
.banner-family-field i:nth-child(3) { top: 72%; left: 38%; }
.banner-layout-badge { position: absolute; top: 6%; right: 4%; z-index: 4; display: grid; max-width: 43%; gap: 1px; padding: 5px 7px; border: 1px solid rgba(255,253,247,.34); border-radius: 8px; color: var(--paper); background: rgba(17,51,38,.64); box-shadow: 0 5px 16px rgba(7,20,15,.14); backdrop-filter: blur(6px); }
.banner-layout-badge span { font-size: 5px; font-weight: 760; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }
.banner-layout-badge strong { overflow: hidden; font-size: 6px; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.banner-placeholder { position: absolute; top: 13%; left: 7%; z-index: 2; display: grid; width: 21%; height: 62%; place-items: center; align-content: center; gap: 8px; padding: 8px; border: 1px dashed rgba(255,253,247,.65); border-radius: 46% 46% 13px 13px; color: rgba(255,253,247,.85); text-align: center; background: rgba(7,20,15,.18); backdrop-filter: blur(4px); }
.banner-placeholder > span { font-size: 24px; font-weight: 250; }
.banner-placeholder small { max-width: 80px; color: inherit; font-size: 7px; line-height: 1.35; }
.banner-placeholder.has-photo { overflow: hidden; padding: 0; border-style: solid; background: rgba(7,20,15,.1); box-shadow: 0 10px 25px rgba(7,20,15,.22); backdrop-filter: none; }
.banner-placeholder.has-photo::after { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg,transparent 62%,rgba(7,20,15,.28)); box-shadow: inset 0 0 0 1px rgba(255,253,247,.22); content: ""; pointer-events: none; }
.banner-placeholder.has-photo > span, .banner-placeholder.has-photo > small { display: none; }
.banner-placeholder.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.banner-type { position: absolute; right: 6%; bottom: 15%; left: 35%; z-index: 3; display: grid; color: var(--paper); text-shadow: 0 2px 14px rgba(7,20,15,.42); }
.banner-type em { color: rgba(255,253,247,.76); font-size: 7px; font-style: normal; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.banner-type strong { margin-top: 3px; overflow: hidden; font-family: var(--serif); font-size: clamp(20px,3vw,38px); font-weight: 500; letter-spacing: -.035em; line-height: .94; text-overflow: ellipsis; white-space: nowrap; }
.banner-type span { margin-top: 5px; font-size: 8px; }
.banner-type small { margin-top: 5px; overflow: hidden; font-family: var(--sans); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.banner-safe-line { position: absolute; inset: 6%; z-index: 4; border: 1px solid rgba(255,253,247,.16); border-radius: 9px; pointer-events: none; }
.preview-caption { display: grid; gap: 8px; padding: 0 19px 17px; }
.preview-caption > span { display: flex; align-items: center; gap: 7px; color: var(--forest); font-size: 10px; font-weight: 700; }
.preview-caption > span b { font: inherit; }
.preview-caption > span i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: var(--paper); background: var(--forest); font-size: 8px; font-style: normal; }
.preview-caption > small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.preview-facts { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; border-top: 1px solid rgba(18,51,38,.1); }
.preview-facts > div { min-width: 0; min-height: 62px; padding: 13px 15px; }
.preview-facts > div + div { border-left: 1px solid rgba(18,51,38,.1); }
.preview-facts dt { color: var(--muted); font-size: 8px; }
.preview-facts dd { margin: 3px 0 0; overflow: hidden; color: var(--forest); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.preview-dialog { width: min(94vw,900px); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 22px; color: var(--forest); background: var(--ivory); box-shadow: var(--shadow); }
.preview-dialog .banner-stage { width: auto; }
.preview-zoom { display: flex; justify-content: center; margin: -6px 18px 14px; }
.preview-zoom .button { min-height: 44px; border-radius: 12px; }
.preview-exact { padding: 22px 19px; }
.preview-exact h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.preview-exact dl { overflow: hidden; margin: 0; border: 1px solid rgba(18,51,38,.16); border-radius: 14px; background: var(--paper); }
.preview-exact dl > div { display: grid; grid-template-columns: minmax(150px,.45fr) minmax(0,1fr); gap: 14px; padding: 13px 14px; border-bottom: 1px solid rgba(18,51,38,.09); }
.preview-exact dl > div:last-child { border-bottom: 0; }
.preview-exact dt { color: var(--muted); font-size: 11px; }
.preview-exact dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 680; }
.preview-return { display: flex; padding: 12px 14px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid rgba(18,51,38,.16); background: rgba(247,242,232,.97); }
.preview-return .button { width: min(100%,520px); min-height: 52px; margin: 0 auto; border-radius: 13px; }
.choice-list { display: grid; gap: 12px; }
.choice-card { position: relative; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; gap: 12px; min-height: 68px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; cursor: pointer; }
.choice-card:hover { border-color: rgba(17,51,38,.38); }
.choice-card:has(input:checked) { border-color: rgba(17,51,38,.48); box-shadow: 0 0 0 3px rgba(17,51,38,.06); background: white; }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 3px; }
.choice-card input { appearance: none; width: 19px; min-height: 19px; margin: 2px 0 0; border: 1px solid rgba(17,51,38,.35); border-radius: 50%; background: white; }
.choice-card input:checked { border-color: rgba(17,51,38,.48); background: var(--coral); box-shadow: inset 0 0 0 4px white; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 3px; color: var(--muted); }
.choice-card--disabled, .choice-card--disabled:hover { border-color: var(--line); background: rgba(255,255,255,.46); cursor: not-allowed; opacity: .68; }
.choice-card--disabled input { cursor: not-allowed; }
.choice-card__badge { display: inline-flex; align-items: center; min-height: 20px; margin-left: 6px; padding: 2px 7px; border: 1px solid rgba(17,51,38,.16); border-radius: 999px; color: var(--muted); background: var(--paper); font-family: var(--sans); font-size: .62rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.upload-zone { display: grid; place-items: center; min-height: 148px; padding: 24px; border: 1.5px dashed #aeb8aa; border-radius: 18px; background: rgba(255,255,255,.62); text-align: center; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone label { cursor: pointer; }
.upload-zone:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 3px; }
.photo-list { display: grid; gap: 12px; }
.photo-card { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; min-height: 76px; padding: 8px; border: 1px solid rgba(18,51,38,.16); border-radius: 14px; background: white; }
.photo-card img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; background: var(--paper-soft); }
.photo-card__body { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.photo-card__heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.photo-card__body strong { overflow-wrap: anywhere; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-actions .button { min-height: 42px; padding: 8px 13px; font-size: .88rem; }
.primary-badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; margin-left: auto; color: var(--forest-2); font-weight: 700; font-size: .82rem; text-align: right; white-space: nowrap; }
.brief-list { margin: 0; display: grid; gap: 12px; }
.brief-list div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brief-list dt { color: var(--muted); font-size: .86rem; }
.brief-list dd { margin: 3px 0 0; font-weight: 650; white-space: pre-wrap; }
.notice { padding: 15px 17px; border-radius: 14px; background: var(--paper-soft); color: var(--forest-2); }
.notice--care { background: #e8eee4; }
.loading-card { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 18px; align-items: center; min-height: 138px; padding: 20px; border: 1px solid rgba(17,51,38,.16); border-radius: 18px; background: var(--paper); }
.loading-card > strong { font-size: 14px; }
.loading-art { position: relative; display: block; width: 92px; height: 72px; }
.loading-art i { position: absolute; inset: 0; border: 1px solid rgba(17,51,38,.16); border-radius: 10px; background: linear-gradient(145deg,#efe8da,var(--paper)); animation: hm-version-breathe 1.8s ease-in-out infinite; }
.loading-art i:nth-child(2) { transform: translate(5px,-5px); opacity: .7; animation-delay: 180ms; }
.loading-art i:nth-child(3) { transform: translate(10px,-10px); opacity: .45; animation-delay: 360ms; }
@keyframes hm-version-breathe { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.generation-status { display: grid; gap: 12px; }
.generation-status__row { display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.generation-status__dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--moss); }
.generation-status__row[data-state="failed"] .generation-status__dot { background: var(--danger); }
.exact-type { white-space: pre-wrap; overflow-wrap: anywhere; }
.version-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.version-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.version-card[aria-current="true"] { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(120,146,98,.22); }
.version-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--paper-soft); }
.version-card__body { display: grid; gap: 8px; padding: 12px; }
.version-card__body .button { width: 100%; min-height: 44px; padding-inline: 10px; }
.review-form { display: grid; gap: 18px; }
.review-checks { min-width: 0; border: 0; padding: 0; margin: 0; }
.review-checks legend { width: 100%; padding: 0; margin: 0 0 14px; }
.review-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.review-check { position: relative; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 12px; align-items: start; min-height: 76px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; line-height: 1.45; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.review-check:hover { border-color: rgba(17,51,38,.34); }
.review-check:has(input:checked) { border-color: rgba(17,51,38,.34); background: #fbfdf9; box-shadow: 0 8px 22px rgba(17,51,38,.045); }
.review-check:has(input:focus-visible) { outline: 3px solid rgba(255,109,82,.52); outline-offset: 2px; }
.review-check span { min-width: 0; }
.review-check input { appearance: none; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 2px 0 0; border: 1.5px solid rgba(17,51,38,.48); border-radius: 5px; background: white center / 14px 14px no-repeat; box-shadow: none; cursor: pointer; }
.review-check input:checked { border-color: var(--forest); background-color: var(--forest); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2 6.4 11.5 13 4.8' fill='none' stroke='%23fffdf7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.review-check input:focus-visible { outline: 0; }
.review-check input:disabled { cursor: default; }
.review-check:has(input:disabled) { cursor: default; }
.review-check-grid > .review-check:last-child { grid-column: 1 / -1; min-height: 64px; }
.review-actions { display: flex; justify-content: flex-end; }
.review-actions .button { min-width: 220px; }
.export-options { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.export-options .field { min-width: 190px; flex: 1; }
.status-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcf7; }
.status-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.status-card p { margin: 0; color: var(--muted); }
.revision-card { display: grid; gap: 16px; padding: 22px; border-radius: 18px; background: rgba(255,253,248,.9); box-shadow: 0 16px 38px rgba(17,51,38,.055); }
.revision-card__heading { display: grid; gap: 4px; }
.revision-card__heading h3 { margin: 0; font-size: 1.55rem; line-height: 1.1; }
.revision-card .field { margin-top: 2px; }
.revision-confirm { min-height: 64px; background: var(--paper); }
.revision-card__actions { display: flex; justify-content: flex-end; }
.revision-card__actions .button { min-width: 210px; }
.review-navigation { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
.review-navigation .button { min-width: 180px; }
.dialog-wide { width: min(96vw, 1000px); max-height: calc(100vh - 28px); overflow: auto; padding: 18px; border: 1px solid var(--line); }
dialog::backdrop { background: rgba(9,25,18,.68); backdrop-filter: blur(4px); }
.banner-inspector { max-width: 100%; overflow: auto; border-radius: 14px; }
.banner-inspector[data-zoomed="true"] { max-height: 68vh; }
.banner-inspector[data-zoomed="true"] .banner-stage { width: 760px !important; max-width: none; }
.banner-inspector:focus-visible { outline: 3px solid var(--coral); outline-offset: -3px; }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 620px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .studio-header { grid-template-columns: 1fr auto; }
  .studio-header__center { display: none; }
  .studio-progress-wrap { grid-template-columns: 150px minmax(0,680px); }
  .studio-shell { grid-template-columns: minmax(0,1fr) minmax(350px,.86fr); gap: 28px; padding-inline: 28px; }
  .prompt-studio-layout { grid-template-columns: 205px minmax(0,1fr); }
  .prompt-test-controls { grid-template-columns: 1fr 1fr; }
  .prompt-test-controls .button { grid-column: 1 / -1; }
  .prompt-history__row--studio { grid-template-columns: minmax(130px,.28fr) minmax(0,1fr); }
  .prompt-history__row--studio .prompt-history__actions { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .prompt-studio-layout { grid-template-columns: 1fr; }
  .prompt-studio-nav { position: static; display: flex; gap: 6px; overflow-x: auto; scroll-padding-inline: 9px; }
  .prompt-studio-nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .prompt-scene-layout { grid-template-columns: 1fr; }
  .prompt-scene-list { display: flex; overflow-x: auto; }
  .prompt-scene-tab { flex: 0 0 min(280px,82vw); }
  .prompt-compiled-layout, .prompt-protected-grid { grid-template-columns: 1fr; }
  .studio-header { min-height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; }
  .studio-leave { display: none; }
  .studio-header__actions { gap: 8px; }
  .language-switch { padding: 2px; }
  .language-switch span, .language-switch button { min-height: 44px; padding: 0 10px; font-size: 11px; }
  .mobile-leave { display: inline-flex; min-width: 60px; padding-inline: 10px; }
  .studio-progress-wrap { display: block; min-height: 74px; padding: 10px 16px 8px; }
  .studio-progress-copy { display: flex; justify-content: space-between; align-items: center; }
  .studio-progress-copy span { font-size: 10px; }
  .studio-progress-copy strong { font-size: 13px; }
  .studio-progress { margin-top: 6px; }
  .studio-progress button { min-height: 44px; }
  .studio-progress .step-number { width: 8px; height: 8px; border: 0; font-size: 0; }
  .studio-progress button > span:last-child { display: none; }
  .studio-progress li::before { top: 4px; }
  .studio-progress li.is-current .step-number { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,109,82,.12); }
  .studio-progress li.is-complete .step-number { background: var(--forest); }
  .studio-preview { display: none; }
  .mobile-preview-bar { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 9px 16px; border-bottom: 1px solid rgba(17,51,38,.16); background: rgba(255,253,247,.97); box-shadow: 0 6px 18px rgba(17,51,38,.04); backdrop-filter: blur(15px); }
  .mobile-preview-bar > span { display: grid; min-width: 0; }
  .mobile-preview-bar small, .mobile-preview-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-preview-bar small { color: var(--muted); font-size: 10px; font-weight: 650; }
  .mobile-preview-bar strong { color: var(--forest); font-size: 12px; font-weight: 740; }
  .mobile-preview-bar .button { min-width: 108px; min-height: 44px; padding: 0 12px; border-radius: 11px; font-size: 12px; }
  .studio-shell { display: block; min-height: 0; padding: 24px 16px calc(108px + env(safe-area-inset-bottom)); }
  .studio-conversation { width: min(100%,640px); margin: 0 auto; }
  #conversation { max-width: none; }
  .assistant-copy h2 { font-size: clamp(27px,7.6vw,38px); }
  .preview-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; padding: env(safe-area-inset-top) 0 0; margin: 0; border: 0; border-radius: 0; background: var(--ivory); overscroll-behavior: contain; }
  .preview-dialog .preview-head { position: sticky; top: 0; z-index: 8; padding: 8px 14px; background: rgba(255,253,248,.97); backdrop-filter: blur(16px); }
  .banner-inspector { width: 100%; padding: 18px 14px 0; overflow-x: auto; scroll-padding-inline: 14px; }
  .banner-inspector .banner-stage { width: min(100%,720px); max-width: none; margin: 0 auto; transition: width .22s ease; }
  .banner-inspector[data-zoomed="true"] { max-height: none; }
  .banner-inspector[data-zoomed="true"] .banner-stage { width: 680px !important; margin-inline: 0; }
  .preview-zoom { width: min(100% - 28px,720px); margin: 10px auto 14px; }
  .preview-caption { width: min(100% - 28px,720px); padding: 0 2px 18px; margin: 0 auto; }
  .preview-caption > span { font-size: 12px; }
  .preview-caption > small { font-size: 11px; line-height: 1.55; }
  .preview-dialog .preview-facts { width: min(100%,748px); margin: 0 auto; background: var(--paper); }
  .preview-dialog .preview-facts > div { min-height: 70px; padding: 15px 14px; }
  .preview-dialog .preview-facts dt { font-size: 10px; }
  .preview-dialog .preview-facts dd { overflow: visible; font-size: 11px; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .preview-exact { width: min(100% - 28px,720px); padding: 22px 0; margin: 0 auto; }
  .preview-return { position: sticky; bottom: 0; z-index: 8; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-actions .button--text { display: none; }
  .header-actions #sign-out { display: inline-flex; }
  .app-header .brand span { display: none; }
  .app-header .brand { min-width: 44px; }
  .landing-hero { padding: 52px 0 70px; background-image: linear-gradient(to bottom, rgba(248,244,235,.98) 0%, rgba(248,244,235,.93) 54%, rgba(248,244,235,.7) 100%), url('/assets/green-journey-landscape.avif'); background-position: 58% center; }
  .hero-copy h1 { font-size: clamp(3.25rem, 17vw, 5.2rem); }
  .login-layout { grid-template-columns: 1fr; }
  .login-art { min-height: 34vh; padding: max(24px, env(safe-area-inset-top)) 22px 40px; }
  .login-art h1 { font-size: clamp(2.8rem, 15vw, 4.5rem); }
  .login-panel { padding: 38px 22px max(38px, env(safe-area-inset-bottom)); }
  .page-heading { align-items: start; flex-direction: column; }
  .project-grid { grid-template-columns: 1fr; }
  .empty-state { padding: 38px 22px; }
  .admin-main { padding: 38px 0 max(56px, env(safe-area-inset-bottom)); }
  .admin-shell { width: min(100% - 28px, 780px); }
  .admin-card { padding: 20px; }
  .admin-invite-form { grid-template-columns: 1fr; }
  .admin-invite-form .button { width: 100%; }
  .admin-section-head { align-items: flex-start; }
  .admin-invite-row { align-items: flex-start; }
  .admin-nav a { padding-inline: 9px; font-size: .76rem; }
  .admin-heading--split { align-items: flex-start; flex-direction: column; }
  .admin-shell--prompt-studio { width: min(100% - 28px,1320px); }
  .prompt-release-bar { align-items: stretch; flex-direction: column; }
  .prompt-release-bar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .prompt-release-bar__actions .button { width: 100%; }
  .prompt-panel-heading, .prompt-scene-editor__heading { flex-direction: column; }
  .prompt-field-grid { grid-template-columns: 1fr; }
  .prompt-metrics { grid-template-columns: 1fr 1fr; }
  .prompt-history__row--studio { grid-template-columns: 1fr; gap: 9px; }
  .ops-summary { grid-template-columns: 1fr 1fr; }
  .ops-panel__head { align-items: stretch; flex-direction: column; }
  .ops-search { width: 100%; }
  .ops-table { min-width: 0; display: block; }
  .ops-table thead { display: none; }
  .ops-table tbody { display: grid; }
  .ops-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 17px 16px; border-top: 1px solid var(--line); }
  .ops-table tbody tr:first-child { border-top: 0; }
  .ops-table td, .ops-table td:first-child, .ops-table td:last-child { width: auto; padding: 0; border: 0; text-align: left; }
  .ops-table td:first-child { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid rgba(216,213,201,.74); }
  .ops-table td::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: .61rem; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; content: attr(data-label); }
  .ops-request-title { max-width: none; }
  .ops-status-detail { max-width: none; white-space: normal; }
  .ops-row-action .button { width: 100%; }
}

@media (max-width: 560px) {
  .confirm-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
    border-radius: 21px;
  }
  .confirm-dialog__body { grid-template-columns: 42px minmax(0,1fr); gap: 13px; padding: 22px 18px 20px; }
  .confirm-dialog__icon { width: 42px; height: 42px; border-radius: 13px; }
  .confirm-dialog__icon svg { width: 21px; height: 21px; }
  .confirm-dialog__copy h2 { font-size: clamp(1.85rem,9vw,2.3rem); }
  .confirm-dialog__copy > p:not(.confirm-dialog__eyebrow) { margin-top: 13px; font-size: .92rem; }
  .confirm-dialog__actions { flex-direction: column-reverse; padding: 14px 18px max(18px, env(safe-area-inset-bottom)); }
  .confirm-dialog__actions .button { width: 100%; min-height: 52px; }
  .admin-nav__invites { display: none !important; }
  .admin-shell--prompt { width: min(100% - 20px,980px); }
  .admin-shell--prompt-studio { width: min(100% - 20px,1320px); }
  .prompt-studio-workspace { padding: 19px; }
  .prompt-release-bar__identity { align-items: flex-start; }
  .prompt-release-bar__actions { grid-template-columns: 1fr; }
  .prompt-test-controls { grid-template-columns: 1fr; }
  .prompt-test-controls .button { grid-column: auto; }
  .prompt-metrics { grid-template-columns: 1fr; }
  .prompt-contract-box dl > div { grid-template-columns: 1fr; gap: 2px; }
  .prompt-raw-preview { min-height: 320px; }
  .prompt-editor, .prompt-protected, .prompt-history { padding: 20px; }
  .prompt-editor__head, .prompt-editor__actions { align-items: stretch; flex-direction: column; }
  .prompt-editor__actions > div { display: grid; grid-template-columns: 1fr; }
  .prompt-editor__actions .button { width: 100%; }
  .prompt-protected { grid-template-columns: 1fr; gap: 18px; }
  .prompt-protected ul { grid-template-columns: 1fr; }
  .prompt-history__row { grid-template-columns: 1fr; gap: 9px; }
  .admin-shell--wide { width: min(100% - 20px,1240px); }
  .ops-summary { gap: 8px; }
  .ops-stat { min-height: 118px; padding: 14px; }
  .ops-panel__head { padding: 20px 16px 14px; }
  .ops-filters { padding-inline: 16px; }
  .ops-cost-note { padding-inline: 16px; }
  .ops-dialog form { padding: 20px; }
  .ops-dialog__actions { flex-direction: column-reverse; }
  .ops-dialog__actions .button { width: 100%; }
  .studio-header { grid-template-columns: 1fr auto; padding-inline: 10px; }
  .studio-brand { gap: 5px; }
  .studio-brand img { width: auto; height: 44px; }
  .language-switch span, .language-switch button { padding-inline: 7px; font-size: 10.5px; }
  .studio-progress-wrap, .mobile-preview-bar { padding-inline: 14px; }
  .mobile-preview-bar .button { min-width: 102px; }
  .studio-shell { padding-inline: 14px; }
  .studio-summary { margin-bottom: 22px; padding: 12px; border-radius: 14px; }
  .studio-summary__items { display: grid; grid-template-columns: 1fr 1fr; }
  .studio-summary__items > span { min-width: 0; }
  .studio-summary__items > span:first-child { grid-column: 1 / -1; }
  .assistant-turn { grid-template-columns: 35px minmax(0,1fr); gap: 10px; }
  .assistant-mark { width: 35px; height: 35px; border-radius: 11px; }
  .assistant-mark img { width: 23px; }
  .assistant-copy h2 { font-size: clamp(27px,8vw,32px); }
  .assistant-copy p { font-size: 13px; }
  .loading-card { grid-template-columns: 72px minmax(0,1fr); padding: 16px; }
  .loading-art { width: 68px; height: 54px; }
  .answer-card { margin: 23px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .studio-conversation input, .studio-conversation textarea, .studio-conversation select { min-height: 56px; font-size: 16px; }
  .form-actions { position: sticky; bottom: 0; z-index: 20; align-items: stretch; margin: 24px -14px 0; padding: 12px 14px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid rgba(18,51,38,.16); background: rgba(247,242,232,.97); box-shadow: 0 -8px 24px rgba(18,51,38,.05); backdrop-filter: blur(14px); }
  .form-actions .button { min-height: 54px; flex: 1; padding: 7px 12px; line-height: 1.25; text-align: center; }
  .photo-card { grid-template-columns: 58px minmax(0,1fr); }
  .photo-card img { width: 58px; height: 58px; }
  .version-grid { display: flex; gap: 10px; margin-inline: -14px; padding: 2px 14px 13px; overflow-x: auto; scroll-padding-inline: 14px; scroll-snap-type: x mandatory; }
  .version-card { flex: 0 0 min(88vw,390px); scroll-snap-align: center; }
  .review-check-grid { grid-template-columns: 1fr; }
  .review-check-grid > .review-check:last-child { grid-column: auto; }
  .review-actions .button, .revision-card__actions .button { width: 100%; }
  .revision-card { padding: 18px; }
  .review-navigation { position: static; z-index: auto; flex-direction: column; margin: 0; padding: 0; border-top: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  .review-navigation .button { width: 100%; }
  .export-options { align-items: stretch; flex-direction: column; }
  .export-options .field, .export-options .button { width: 100%; }
  .preview-exact dl > div { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}