:root {
  --ink: #191614;
  --ink-soft: #665f59;
  --paper: #f6f3ee;
  --surface: #fffdfa;
  --line: #ded8d0;
  --line-strong: #c5bdb3;
  --accent: #c54b2e;
  --accent-dark: #9d321c;
  --accent-soft: #f7e4dc;
  --good: #236342;
  --good-soft: #e2f1e8;
  --warn: #855a0b;
  --warn-soft: #fff2ce;
  --danger: #9a2d2d;
  --danger-soft: #fae2e0;
  --shadow: 0 12px 34px rgba(49, 37, 27, .08);
  --radius: 18px;
  --radius-sm: 11px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--paper); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 85% -10%, #efe0d7 0, transparent 32rem), var(--paper); font-family: var(--font); font-size: 16px; line-height: 1.5; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 6vw, 2.55rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: .55rem; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }

.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; transform: translateY(-150%); background: var(--ink); color: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-header { min-height: 72px; padding: 12px max(18px, env(safe-area-inset-left)); border-bottom: 1px solid rgba(120,105,94,.16); background: rgba(255,253,250,.88); backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.brand { text-decoration: none; display: flex; align-items: center; gap: .65rem; }
.brand-mark, .login-brand { display: grid; place-items: center; background: var(--ink); color: white; border-radius: 10px; font-weight: 900; letter-spacing: -.06em; }
.brand-mark { width: 42px; height: 42px; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { color: var(--ink-soft); font-size: .72rem; margin-top: .2rem; }
.mode-badge { padding: .18rem .48rem; border-radius: 999px; font-size: .68rem; font-weight: 850; letter-spacing: .03em; white-space: nowrap; }
.mode-mock { color: var(--warn); background: var(--warn-soft); }
.mode-live { color: var(--good); background: var(--good-soft); }
.app-header nav { display: flex; align-items: center; gap: .35rem; }
.app-header nav > a, .link-button { border: 0; background: none; text-decoration: none; padding: .7rem; color: var(--ink-soft); cursor: pointer; border-radius: 8px; }
.app-header nav > a:hover, .link-button:hover { background: var(--paper); color: var(--ink); }
.app-header nav form { margin: 0; }

.page-shell { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding: clamp(1.4rem, 5vw, 3.2rem) 0 7rem; }
.auth-shell { width: min(430px, calc(100% - 28px)); display: grid; place-items: center; min-height: 100vh; padding: 2rem 0; }
.login-card { width: 100%; background: var(--surface); border: 1px solid var(--line); padding: clamp(1.5rem, 7vw, 2.6rem); border-radius: 24px; box-shadow: var(--shadow); }
.login-brand { width: 58px; height: 58px; margin-bottom: 1.6rem; font-size: 1.2rem; }
.eyebrow, .step-kicker { color: var(--accent); text-transform: uppercase; font-size: .75rem; letter-spacing: .11em; font-weight: 800; margin-bottom: .45rem; }
.lede, .page-heading p, .step-intro p { color: var(--ink-soft); }

.button { min-height: 46px; border-radius: var(--radius-sm); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1rem; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { background: var(--accent); color: white; box-shadow: 0 7px 18px rgba(197,75,46,.2); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.button-block { width: 100%; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 50%; font-size: 1.45rem; }

label { display: grid; gap: .42rem; font-weight: 700; color: #302b27; }
input, textarea, select { width: 100%; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: 10px; padding: .76rem .85rem; min-height: 46px; outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(197,75,46,.25); outline-offset: 2px; border-color: var(--accent); }
.stack-form, .editor-form, .proposal-form { display: grid; gap: 1rem; }
.field-error { color: var(--danger); font-size: .85rem; }
.help-text { color: var(--ink-soft); font-size: .8rem; font-weight: 500; }
code { background: #eee8e1; padding: .1rem .3rem; border-radius: 4px; }

.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; }
.alert-error { background: var(--danger-soft); border-color: #e9b9b3; color: var(--danger); }
.alert-success { background: var(--good-soft); border-color: #b8dbc6; color: var(--good); }
.alert-warning { background: var(--warn-soft); border-color: #ead28e; color: var(--warn); }

.page-heading { margin-bottom: 1.5rem; }
.page-heading h1 { margin-bottom: .35rem; }
.page-heading p { margin-bottom: 0; }
.heading-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.back-link { color: var(--ink-soft); display: inline-block; margin-bottom: .7rem; font-weight: 650; text-underline-offset: 3px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 4vw, 1.7rem); box-shadow: 0 5px 20px rgba(49,37,27,.035); margin-bottom: 1rem; }
.callout { border-left: 4px solid var(--accent); }
.runtime-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid; border-radius: var(--radius-sm); }
.runtime-banner div { display: grid; gap: .15rem; }
.runtime-banner span { color: var(--ink-soft); font-size: .88rem; }
.runtime-mock { background: var(--warn-soft); border-color: #ead28e; }
.runtime-live { background: var(--good-soft); border-color: #b8dbc6; }
.settings-source { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.settings-source > div { display: grid; gap: .15rem; }
.state-card { text-align: center; max-width: 560px; margin: 3rem auto; padding: 2.5rem 1.4rem; }
.state-card p { color: var(--ink-soft); }
.state-icon { margin: 0 auto 1rem; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-size: 1.6rem; font-weight: 900; }

.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--line); gap: 1rem; }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: .2rem .62rem; font-weight: 750; font-size: .78rem; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: .4rem; }
.status-publish, .status-ok { background: var(--good-soft); color: var(--good); }
.status-draft, .status-muted, .status-private, .status-pending { background: #ece8e3; color: #6e665e; }

.product-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.draft-resume { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.78); }
.draft-resume h2 { margin: .1rem 0 .75rem; font-size: 1.15rem; }
.draft-resume-list { display: grid; gap: .55rem; }
.draft-resume-card { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink); text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.draft-resume-card:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-soft); }
.draft-resume-card span:first-child { min-width: 0; display: grid; gap: .15rem; }
.draft-resume-card strong, .draft-resume-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-resume-card small { color: var(--ink-soft); }
.search-field { position: relative; display: flex; align-items: center; }
.search-field > span[aria-hidden] { position: absolute; left: .85rem; color: var(--ink-soft); font-size: 1.3rem; }
.search-field input { padding-left: 2.6rem; }
.segmented { display: flex; background: #eae5df; padding: 4px; border-radius: 12px; }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { min-height: 38px; padding: .48rem .72rem; border-radius: 9px; display: grid; place-items: center; color: var(--ink-soft); font-size: .86rem; cursor: pointer; }
.segmented input:checked + span { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.08); font-weight: 750; }
.segmented input:focus-visible + span { outline: 3px solid rgba(197,75,46,.25); }
.product-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-row { min-height: 84px; display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px 44px; align-items: center; gap: .8rem; padding: .72rem .9rem; border-bottom: 1px solid var(--line); }
.product-row:last-child { border-bottom: 0; }
.product-row:hover { background: #fffaf5; }
.product-main { min-width: 0; display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.product-thumb { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #e9e2da; color: #92867b; font-weight: 900; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-copy { min-width: 0; }
.product-copy strong, .product-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-meta { color: var(--ink-soft); font-size: .82rem; margin-top: .25rem; }
.product-price { font-weight: 800; text-align: right; }
.product-mobile-meta { display: none; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.2rem; }

.form-section { display: grid; gap: 1.15rem; }
.section-heading { display: flex; gap: .85rem; align-items: flex-start; }
.section-heading h2, .section-heading p { margin-bottom: .15rem; }
.section-heading p { color: var(--ink-soft); }
.step-number { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--ink); color: white; display: grid; place-items: center; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 800; margin-bottom: .55rem; }
.seo-fields { display: grid; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbf8f3; }
.seo-fields legend { padding: 0 .35rem; margin: 0; }
.seo-fields .help-text { margin: 0; }
.check-grid { display: flex; gap: .5rem; flex-wrap: wrap; }
.check-card { display: block; }
.check-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-card span { display: block; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .85rem; font-size: .88rem; cursor: pointer; }
.check-card input:checked + span { background: var(--ink); color: white; border-color: var(--ink); }
.check-card input:focus-visible + span { outline: 3px solid rgba(197,75,46,.25); }
.sticky-actions { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line-strong); padding: .7rem; padding-left: 1rem; border-radius: 14px; background: rgba(255,253,250,.93); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.sticky-actions > span { color: var(--ink-soft); font-size: .85rem; }
.secondary-action-form { margin-top: 1.5rem; }
.existing-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.existing-image-card { border: 1px solid var(--line); padding: .65rem; border-radius: 12px; display: grid; gap: .55rem; }
.existing-image-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.inline-check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .5rem; font-size: .88rem; }
.inline-check input { width: 20px; min-height: 20px; }
.danger-check { color: var(--danger); }
.compact-fields { align-items: end; }

.wizard { max-width: 780px; margin: 0 auto; }
.wizard-header { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.wizard-header .back-link { grid-column: 1 / -1; margin-bottom: 0; }
.save-state { color: var(--good); font-size: .82rem; margin: 0 0 .5rem; }
.save-state.is-saving { color: var(--ink-soft); }
.save-state.is-error { color: var(--danger); }
.wizard-progress { display: grid; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; margin: 1.6rem 0 2rem; position: relative; }
.wizard-progress::before { content: ""; position: absolute; top: 17px; left: 25%; right: 25%; height: 2px; background: var(--line-strong); }
.wizard-progress li { position: relative; display: grid; justify-items: center; gap: .3rem; color: var(--ink-soft); font-size: .76rem; }
.wizard-progress li span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper); font-weight: 850; z-index: 1; }
.wizard-progress li.is-active, .wizard-progress li.is-done { color: var(--accent-dark); }
.wizard-progress li.is-active span, .wizard-progress li.is-done span { background: var(--accent); color: white; border-color: var(--accent); }
.wizard-step { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.1rem, 5vw, 2rem); box-shadow: var(--shadow); }
.wizard-step[hidden] { display: none; }
.step-intro { margin-bottom: 1.4rem; }
.step-intro h2 { margin-bottom: .45rem; }
.upload-dropzone { min-height: 180px; display: grid; place-items: center; align-content: center; gap: .3rem; text-align: center; border: 2px dashed var(--line-strong); background: #fbf8f4; border-radius: 16px; cursor: pointer; padding: 1.4rem; }
.upload-dropzone:hover { border-color: var(--accent); background: #fff8f5; }
.upload-dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-dropzone:focus-within { outline: 3px solid rgba(197,75,46,.25); }
.upload-dropzone small { color: var(--ink-soft); font-weight: 500; }
.upload-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.5rem; }
.upload-status { color: var(--ink-soft); min-height: 1.5rem; margin: .6rem 0; font-size: .86rem; }
.action-cluster { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.advanced-section { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: clip; }
.advanced-section > summary { cursor: pointer; min-height: 52px; padding: 1rem 1.1rem; font-weight: 750; display: flex; align-items: center; }
.advanced-section > summary::marker { color: var(--accent); }
.advanced-section[open] > summary { border-bottom: 1px solid var(--line); }
.advanced-section > fieldset { border: 0; margin: 0; padding: 1rem; }
.read-only-field { display: grid; align-content: start; gap: .3rem; padding: .2rem 0; }
.read-only-field > span { font-weight: 700; }
.read-only-field > strong { min-height: 46px; display: flex; align-items: center; padding: .72rem .85rem; border-radius: 11px; background: var(--surface, #f5f3ef); }
.read-only-field > small { color: var(--ink-soft); }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .65rem; list-style: none; padding: 0; margin: 0; }
.image-card { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.image-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.image-card footer { padding: .45rem; display: flex; justify-content: space-between; gap: .2rem; }
.image-card > input { margin: .4rem; width: calc(100% - .8rem); min-height: 40px; font-size: .78rem; }
.image-card button { min-width: 38px; min-height: 38px; border: 0; border-radius: 8px; background: var(--paper); cursor: pointer; }
.primary-badge { position: absolute; top: .4rem; left: .4rem; background: var(--ink); color: white; border-radius: 999px; padding: .25rem .5rem; font-size: .7rem; font-weight: 800; }
.step-actions { display: flex; justify-content: space-between; gap: .7rem; align-items: center; margin-top: 1.6rem; }
.voice-card, .analysis-card, .safe-draft-note { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: 1rem 0; background: #fbf8f4; }
.voice-card p, .analysis-card p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.transcript-disclosure { margin: .8rem 0; border: 1px solid var(--line); border-radius: 14px; background: white; }
.transcript-disclosure summary { min-height: 48px; display: flex; align-items: center; padding: .7rem .85rem; cursor: pointer; font-weight: 750; }
.transcript-disclosure label { margin: 0; padding: 0 .85rem .85rem; }
.voice-card button.is-recording { background: var(--danger); color: white; }
.voice-card-compact { margin: .4rem 0 0; background: white; }
.voice-actions { display: grid; justify-items: end; gap: .35rem; min-width: 190px; }
.voice-status { min-height: 1.2rem; text-align: right; }
.recording-indicator { display: flex; align-items: center; gap: .45rem; color: var(--danger); font-size: .85rem; font-weight: 750; }
.recording-indicator[hidden] { display: none; }
.recording-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(154,45,45,.45); animation: recording-pulse 1.25s ease-out infinite; }
.analysis-orbit { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-weight: 900; }
.analysis-card.is-loading .analysis-orbit { animation: pulse 1.2s ease-in-out infinite; }
.analysis-card > div:last-child { flex: 1; }
.question-list { display: grid; gap: .7rem; margin: 1rem 0; }
.question-card { padding: .9rem; background: var(--warn-soft); border: 1px solid #ead28e; border-radius: 12px; }
.question-card label { color: var(--warn); }
.question-voice-answer { background: #fffdfa; }
.answer-suggestions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.suggestion-chip { min-height: 40px; border: 1px solid #d9bd70; border-radius: 999px; padding: .45rem .75rem; background: white; color: var(--warn); font-weight: 750; cursor: pointer; }
.suggestion-chip:hover, .suggestion-chip:focus-visible { border-color: var(--warn); background: #fff8e5; }
.question-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; flex-wrap: wrap; padding-top: .2rem; }
.question-actions .help-text { flex: 1 1 260px; margin: 0; }
.review-alerts { display: grid; gap: .6rem; margin-bottom: 1rem; }
.proposal-form { padding-top: .4rem; }
.ai-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; background: var(--accent-soft); color: var(--accent-dark); padding: .2rem .4rem; border-radius: 5px; margin-left: .3rem; }
.ai-inline-suggestions { display: grid; gap: .55rem; }
.ai-inline-card {
  display: grid;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid rgba(210, 59, 42, .24);
  border-radius: 13px;
  background: var(--accent-soft);
}
.ai-inline-card strong { display: block; line-height: 1.45; }
.ai-inline-card .ai-label { margin-left: 0; margin-right: .3rem; }
.ai-inline-card p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .84rem; }
.ai-inline-card .button { justify-self: start; }
.ai-product-details { border-color: rgba(210, 59, 42, .24); }
.ai-inline-field { display: grid; gap: .45rem; padding: .75rem; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.check-card.is-ai-suggested > span { display: grid; align-content: center; gap: .2rem; }
.check-card.is-ai-suggested > span::after {
  content: "KI-Vorschlag";
  width: fit-content;
  padding: .1rem .35rem;
  border-radius: 5px;
  color: currentColor;
  background: rgba(210, 59, 42, .12);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.check-card.is-ai-suggested input:checked + span::after { background: rgba(255,255,255,.18); }
.safe-draft-note { justify-content: flex-start; background: var(--good-soft); color: var(--good); }
.safe-draft-note strong { white-space: nowrap; }
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: .5rem; width: min(360px, calc(100% - 32px)); }
.toast { background: var(--ink); color: white; padding: .85rem 1rem; border-radius: 11px; box-shadow: var(--shadow); }

.app-loading { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: .65rem; min-width: 190px; justify-content: center; padding: .75rem 1rem; border-radius: 999px; background: var(--ink); color: white; box-shadow: var(--shadow); font-weight: 750; }
.app-loading[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
.is-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: .45rem; vertical-align: -.15rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.proposal-group { display: grid; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.proposal-group > div:first-child h3, .proposal-group > div:first-child p { margin: 0; }
.proposal-primary { border-color: var(--accent); background: #fffaf6; }
.taxonomy-picker { max-height: 220px; overflow: auto; padding: .25rem; }
.new-tag-row, .image-upload-inline { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .7rem; margin-top: .8rem; }
.new-tag-row .button, .image-upload-inline .button { margin-bottom: 0; }
.new-tag-chip { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-dark); min-height: 40px; padding: .45rem .75rem; border-radius: 999px; font-weight: 750; cursor: pointer; }
.ai-field-card span { display: grid; gap: .15rem; }
.ai-field-card small { font-weight: 500; opacity: .8; }
.variation-list { display: grid; gap: .7rem; }
.variation-row { border: 1px solid var(--line-strong); border-radius: 12px; padding: .9rem; }
.variation-row legend { padding: 0 .35rem; }
.variation-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; align-items: end; }
.image-order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.image-order-actions .button { min-height: 38px; padding: .35rem .45rem; font-size: .78rem; }
.empty-inline { color: var(--ink-soft); padding: 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; text-align: center; }
.field-catalog { display: grid; gap: .7rem; margin-top: 1rem; }
.field-catalog article { display: grid; gap: .25rem; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #fbf8f3; }
.field-catalog article div { display: flex; justify-content: space-between; gap: .7rem; align-items: center; }
.field-catalog article p, .field-catalog article small { margin: 0; color: var(--ink-soft); }

@keyframes spin { to { transform: rotate(360deg); } }

.prompt-settings { scroll-margin-top: 90px; }
.prompt-heading { justify-content: space-between; margin-bottom: 1.2rem; }
.prompt-heading > div { flex: 1; }
.prompt-heading h2 { margin-bottom: .35rem; }
.prompt-heading p:last-child { color: var(--ink-soft); margin-bottom: 0; }
.prompt-actions { display: flex; gap: .65rem; justify-content: flex-end; flex-wrap: wrap; }
.prompt-preview { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.prompt-preview summary { cursor: pointer; font-weight: 750; }
.prompt-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #211d1a; color: #f7f1e9; border-radius: 12px; padding: 1rem; max-height: 32rem; overflow: auto; font: .8rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }

@keyframes pulse { 50% { transform: scale(.88); opacity: .55; } }
@keyframes recording-pulse { 70% { box-shadow: 0 0 0 9px rgba(154,45,45,0); } 100% { box-shadow: 0 0 0 0 rgba(154,45,45,0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 760px) {
  .app-header { min-height: 64px; }
  .brand small, .app-header nav > a:nth-child(2) { display: none; }
  .app-header nav { gap: 0; }
  .app-header nav > a, .link-button { font-size: .82rem; padding: .55rem; }
  .page-shell { width: min(100% - 22px, 1100px); padding-top: 1.2rem; }
  .heading-actions { align-items: flex-start; }
  .heading-actions .button { flex: 0 0 auto; }
  .product-toolbar { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .filter-submit { display: none; }
  .product-row { grid-template-columns: minmax(0,1fr) auto; }
  .product-price { grid-column: 2; grid-row: 1; align-self: start; padding-top: .4rem; }
  .desktop-status, .product-row > .icon-button { display: none; }
  .product-mobile-meta { display: block; margin-top: .35rem; }
  .field-grid { grid-template-columns: 1fr; }
  .sticky-actions > span { display: none; }
  .sticky-actions .button { width: 100%; }
  .voice-card, .safe-draft-note { align-items: stretch; flex-direction: column; }
  .runtime-banner, .settings-source { align-items: stretch; flex-direction: column; }
  .voice-card .button { width: 100%; }
  .voice-actions { min-width: 0; width: 100%; justify-items: stretch; }
  .voice-status { text-align: left; }
  .recording-indicator { justify-content: center; min-height: 32px; }
  .question-actions { align-items: stretch; flex-direction: column; }
  .question-actions .button { width: 100%; }
  .step-actions { align-items: stretch; flex-wrap: wrap; }
  .action-cluster { width: 100%; }
  .action-cluster .button { flex: 1 1 170px; }
  .prompt-actions { align-items: stretch; flex-direction: column; }
  .prompt-actions .button { width: 100%; }
  .new-tag-row, .image-upload-inline, .variation-fields { grid-template-columns: 1fr; }
  .app-loading { bottom: 10px; max-width: calc(100% - 20px); }
}

@media (max-width: 460px) {
  h1 { font-size: 1.72rem; }
  .brand strong { font-size: .86rem; }
  .brand-mark { width: 38px; height: 38px; }
  .heading-actions { display: grid; }
  .heading-actions > .button { width: 100%; }
  .product-row { padding: .65rem; }
  .product-thumb { width: 52px; height: 52px; flex-basis: 52px; }
  .wizard-progress small { font-size: .65rem; }
  .wizard-step { border-radius: 17px; }
  .step-actions .button { flex: 1; }
  .analysis-card { align-items: flex-start; }
}

/* Mobile-first Apple-inspired interaction layer */
:root {
  --paper: #f2f2f7;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --ink-soft: #6e6e73;
  --line: rgba(60, 60, 67, .14);
  --line-strong: rgba(60, 60, 67, .24);
  --accent: #b8432a;
  --accent-dark: #96351f;
  --accent-soft: #f8e8e2;
  --shadow: 0 10px 32px rgba(0, 0, 0, .08);
  --radius: 18px;
  --space-field: 12px;
  --space-group: 20px;
  --space-panel: 16px;
  --radius-sm: 14px;
  --tab-height: 66px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, "Segoe UI", sans-serif;
}

html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { background: var(--paper); letter-spacing: -.006em; }
h1 { font-weight: 700; letter-spacing: -.035em; }
h2 { font-weight: 650; letter-spacing: -.025em; }
h3 { font-weight: 600; letter-spacing: -.015em; }

.app-header {
  min-height: 58px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  background: rgba(249, 249, 251, .96);
  border-bottom-color: var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand { min-width: 0; gap: .55rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: .84rem; }
.brand > span:nth-child(2) { min-width: 0; }
.brand strong { font-size: .94rem; white-space: nowrap; }
.brand small { display: none; }
.mode-badge { font-size: .62rem; padding: .2rem .42rem; }

.app-header nav {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  padding: 5px 8px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: #f9f9fb;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.app-header nav form { min-width: 0; }
.app-header nav > a:nth-child(2) { display: flex; }
.app-header nav > .nav-item,
.app-header nav .nav-item {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.1;
  border-radius: 12px;
}
.app-header nav .nav-item.is-current { color: var(--accent); }
.nav-icon { width: 25px; height: 25px; display: grid; place-items: center; }
.nav-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout-control { margin-left: auto; }
.logout-control .link-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--ink-soft); border-radius: 50%; }
.logout-control .logout-label { display: none; }

.page-shell {
  width: min(100% - 24px, 1100px);
  padding: 1.25rem 0 calc(var(--tab-height) + env(safe-area-inset-bottom) + 4.5rem);
}
.auth-shell { width: min(100% - 28px, 430px); min-height: 100dvh; padding: 1.5rem 0; }
.login-card { border: 0; border-radius: 26px; box-shadow: 0 14px 45px rgba(0, 0, 0, .09); }
.page-heading { margin-bottom: 1.25rem; }
.heading-actions { display: grid; align-items: start; gap: 1rem; }
.heading-actions > form, .heading-actions > .button { width: 100%; }
.heading-actions > form .button { width: 100%; }
.eyebrow, .step-kicker { margin-bottom: .35rem; font-size: .7rem; letter-spacing: .09em; }

.button {
  min-height: 50px;
  border-radius: 14px;
  padding: .78rem 1rem;
  font-weight: 700;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  touch-action: manipulation;
}
.button:hover { transform: none; }
.button:active { transform: scale(.985); opacity: .88; }
.button-primary { box-shadow: none; }
.button-secondary { background: rgba(255, 255, 255, .82); }
.icon-button { min-width: 46px; width: 46px; height: 46px; border: 0; background: #f2f2f7; }

label { gap: .38rem; font-size: .91rem; font-weight: 650; color: var(--ink); }
input, textarea, select {
  min-height: 48px;
  padding: .7rem .875rem;
  border-color: transparent;
  border-radius: 13px;
  background: #f2f2f7;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .08);
}
textarea { line-height: 1.45; }
input:focus, textarea:focus, select:focus { background: white; box-shadow: 0 0 0 3px rgba(184, 67, 42, .14); }
.help-text { font-size: .875rem; line-height: 1.45; }

.panel, .wizard-step {
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 28px rgba(0, 0, 0, .045);
}
.panel { padding: var(--space-panel); margin-bottom: var(--space-field); }
.form-section { gap: var(--space-group); }
.section-heading { gap: .7rem; }
.section-heading p { font-size: .84rem; line-height: 1.35; }
.step-number { width: 30px; height: 30px; flex-basis: 30px; font-size: .78rem; }
.field-grid, .variation-fields { grid-template-columns: 1fr; gap: .8rem; }

.runtime-banner { align-items: stretch; flex-direction: column; padding: .85rem; border: 0; border-radius: 16px; }
.runtime-banner span { font-size: .8rem; line-height: 1.35; }
.runtime-banner .button { width: 100%; }
.alert { border: 0; border-radius: 16px; }
.status { min-height: 26px; }

.product-toolbar { grid-template-columns: 1fr; gap: .75rem; }
.search-field input { min-height: 50px; }
.segmented { width: 100%; padding: 3px; border-radius: 11px; background: rgba(118, 118, 128, .12); }
.segmented label { flex: 1; }
.segmented span { min-height: 44px; border-radius: 9px; font-size: .875rem; }
.filter-submit { display: none; }
.product-list { display: grid; gap: .65rem; overflow: visible; border: 0; background: transparent; }
.product-row {
  min-height: 78px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  padding: .72rem;
  border: 0;
  border-radius: 17px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035);
}
.product-thumb { width: 54px; height: 54px; flex-basis: 54px; border-radius: 11px; }
.product-main { gap: .7rem; }
.product-copy strong { font-size: 1rem; font-weight: 600; }
.product-meta { font-size: .8125rem; }
.product-price { grid-column: 2; grid-row: 1; align-self: start; padding-top: .25rem; font-size: .88rem; }
.product-mobile-meta { display: block; margin-top: .28rem; }
.desktop-status, .product-row > .icon-button { display: none; }

.wizard { max-width: 780px; }
.wizard-header { align-items: center; }
.wizard-header h1 { font-size: 1.7rem; }
.wizard-progress { margin: 1.15rem 0 1.35rem; }
.wizard-progress::before { top: 14px; }
.wizard-progress li { gap: .22rem; font-size: .66rem; }
.wizard-progress li span { width: 30px; height: 30px; font-size: .72rem; }
.wizard-step { padding: var(--space-panel); }
.step-intro { margin-bottom: 1.1rem; }
.upload-dropzone { min-height: 132px; border-width: 1.5px; border-radius: 16px; background: #f7f7fa; }
.image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-card button, .suggestion-chip, .new-tag-chip { min-height: 44px; }
.voice-card, .analysis-card, .safe-draft-note { align-items: stretch; flex-direction: column; border: 0; border-radius: 17px; background: #f2f2f7; }
.voice-actions { width: 100%; min-width: 0; justify-items: stretch; }
.voice-card .button { width: 100%; }
.voice-status { text-align: left; }
.recording-indicator { justify-content: center; min-height: 34px; }
.step-actions { align-items: stretch; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.step-actions > .button { flex: 1 1 130px; }
.step-actions > .button-primary { flex-basis: 100%; order: -1; }
.action-cluster { width: 100%; display: grid; grid-template-columns: 1fr; }
.action-cluster .button-primary { order: -1; }
.proposal-group { padding: var(--space-panel); border: 0; border-radius: 16px; background: #f7f7fa; }
.proposal-primary { background: var(--accent-soft); }
.advanced-section { border: 0; border-radius: 17px; background: #f7f7fa; }
.advanced-section > summary { min-height: 52px; padding: .75rem 1rem; }
.advanced-section[open] > summary { border-bottom-color: var(--line); }
.advanced-section > fieldset { padding: .9rem; }
.taxonomy-picker { max-height: 260px; }
.check-card span { min-height: 44px; display: flex; align-items: center; }
.variation-row { border: 0; border-radius: 16px; padding: .85rem; background: white; box-shadow: inset 0 0 0 1px var(--line); }
.new-tag-row, .image-upload-inline { grid-template-columns: 1fr; }
.new-tag-row .button, .image-upload-inline .button { width: 100%; }

.sticky-actions, .sticky-wizard-actions {
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 8px);
  border: 0;
  border-radius: 18px;
  padding: .55rem;
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
}
.sticky-actions > span { display: none; }
.sticky-actions .button { width: 100%; }
.sticky-wizard-actions { position: sticky; z-index: 12; }
.sticky-wizard-actions { flex-wrap: nowrap; }
.sticky-wizard-actions > .button { flex: 0 0 auto; }
.sticky-wizard-actions > .button-primary { order: initial; flex: 1 1 auto; }
.sticky-wizard-actions > .button-secondary { flex-basis: 88px; }
.toast-region { left: 12px; right: 12px; bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 10px); width: auto; }
.toast { border-radius: 16px; text-align: center; }
.app-loading { bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 12px); max-width: calc(100% - 24px); }
.existing-image-grid { grid-template-columns: 1fr; }
.pagination { gap: .5rem; }
.pagination .button { flex: 1; }
.state-card { margin: 1.5rem auto; }

.disclosure-panel { padding: 0; overflow: clip; }
.disclosure-panel > summary { min-height: 60px; list-style: none; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; cursor: pointer; }
.disclosure-panel > summary::-webkit-details-marker { display: none; }
.disclosure-panel > summary::after { content: "›"; margin-left: auto; color: var(--ink-soft); font-size: 1.5rem; transform: rotate(90deg); transition: transform .18s ease; }
.disclosure-panel[open] > summary::after { transform: rotate(-90deg); }
.disclosure-panel .disclosure-copy { min-width: 0; flex: 1; }
.disclosure-panel .disclosure-copy strong, .disclosure-panel .disclosure-copy span { display: block; }
.disclosure-panel .disclosure-copy span { color: var(--ink-soft); font-size: .79rem; margin-top: .16rem; }
.disclosure-panel .disclosure-body { display: grid; gap: 1rem; padding: 0 1rem 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.disclosure-count { color: var(--ink-soft); font-size: .8rem; font-weight: 650; white-space: nowrap; }
.product-type-choice legend { margin-bottom: .55rem; font-size: .91rem; font-weight: 650; }
.choice-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.choice-card { display: block; }
.choice-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card span { min-height: 60px; display: grid; align-content: center; gap: .2rem; padding: .75rem .875rem; border-radius: 14px; background: white; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.choice-card small { color: var(--ink-soft); font-weight: 500; }
.choice-card input:checked + span { color: var(--accent-dark); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.choice-card input:focus-visible + span { outline: 3px solid rgba(184, 67, 42, .2); outline-offset: 2px; }

@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-1px); }
  .product-row:hover { background: #fffaf7; }
}

@media (min-width: 761px) {
  .app-header { min-height: 72px; padding: 10px max(20px, env(safe-area-inset-left)); }
  .app-header { background: rgba(249, 249, 251, .88); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); }
  .brand-mark { width: 42px; height: 42px; }
  .brand strong { font-size: 1rem; }
  .brand small { display: block; }
  .app-header nav { position: static; min-height: 0; display: flex; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
  .app-header nav form { width: auto; }
  .app-header nav > .nav-item, .app-header nav .nav-item { width: auto; min-height: 44px; flex-direction: row; gap: .42rem; padding: .55rem .7rem; font-size: .86rem; }
  .nav-icon { width: 20px; height: 20px; }
  .nav-icon svg { width: 19px; height: 19px; }
  .logout-control { margin-left: 0; }
  .logout-control .link-button { width: auto; height: auto; min-height: 44px; display: flex; gap: .42rem; padding: .55rem .7rem; }
  .logout-control .logout-label { display: inline; }
  .page-shell { padding-top: 2.6rem; padding-bottom: 7rem; }
  .heading-actions { display: flex; align-items: flex-end; }
  .heading-actions > form, .heading-actions > .button { width: auto; }
  .heading-actions > form .button { width: auto; }
  .panel { padding: 1.5rem; }
  .runtime-banner, .settings-source { align-items: center; flex-direction: row; }
  .runtime-banner .button { width: auto; }
  .product-toolbar { grid-template-columns: minmax(220px, 1fr) auto auto; }
  .filter-submit { display: inline-flex; }
  .product-list { display: block; overflow: hidden; border: 1px solid var(--line); background: white; }
  .product-row { min-height: 84px; grid-template-columns: minmax(0, 1fr) 110px 120px 46px; border-radius: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
  .product-row:last-child { border-bottom: 0; }
  .product-price { grid-column: auto; grid-row: auto; align-self: center; padding: 0; font-size: 1rem; }
  .product-mobile-meta { display: none; }
  .desktop-status, .product-row > .icon-button { display: inline-flex; }
  .field-grid, .variation-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-header h1 { font-size: clamp(1.75rem, 6vw, 2.55rem); }
  .wizard-step { padding: 2rem; }
  .wizard-progress { margin: 1.6rem 0 2rem; }
  .wizard-progress::before { top: 17px; }
  .wizard-progress li { font-size: .76rem; }
  .wizard-progress li span { width: 36px; height: 36px; font-size: .82rem; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .voice-card, .analysis-card, .safe-draft-note { align-items: center; flex-direction: row; }
  .voice-actions { width: auto; min-width: 190px; justify-items: end; }
  .voice-card .button { width: auto; }
  .voice-status { text-align: right; }
  .step-actions { flex-wrap: nowrap; }
  .step-actions > .button { flex: 0 0 auto; }
  .step-actions > .button-primary { order: initial; }
  .action-cluster { width: auto; display: flex; }
  .action-cluster .button-primary { order: initial; }
  .new-tag-row, .image-upload-inline { grid-template-columns: minmax(0, 1fr) auto; }
  .new-tag-row .button, .image-upload-inline .button { width: auto; }
  .sticky-actions, .sticky-wizard-actions { bottom: 12px; }
  .sticky-actions > span { display: inline; }
  .sticky-actions .button { width: auto; }
  .toast-region { left: auto; right: 16px; bottom: 16px; width: min(360px, calc(100% - 32px)); }
  .app-loading { bottom: 20px; }
  .existing-image-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Kuttenmanufaktur brand layer: shop attitude, calm work surface */
:root {
  --brand-black: #090909;
  --brand-white: #ffffff;
  --accent: #d23b2a;
  --accent-dark: #a72b1e;
  --accent-soft: #fff0ed;
  --radius: 18px;
  --radius-sm: 12px;
}

.app-header {
  color: var(--brand-white);
  background: var(--brand-black);
  border-bottom: 0;
}

.brand { color: var(--brand-white); }
.brand-stamp {
  width: 82px;
  min-width: 82px;
  min-height: 40px;
  display: grid;
  place-content: center;
  gap: 0;
  padding: 5px 7px 4px;
  color: var(--brand-black);
  background: var(--brand-white);
  border: 2px solid var(--brand-white);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, .18);
  font-family: "Arial Black", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: .68rem;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.055em;
  text-align: center;
  transform: rotate(-1deg);
}
.brand-stamp span { display: block; }
.brand-stamp span:last-child { font-size: .61rem; letter-spacing: -.065em; }
.brand > span:nth-child(2) { display: none; }
.brand-logo-shell {
  width: 82px;
  min-width: 82px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 4px;
  background: white;
}
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.mode-badge { border: 1px solid currentColor; background: transparent; }
.mode-mock { color: #ffd166; }
.mode-live { color: #7ee2a8; }
.logout-control .link-button { color: rgba(255, 255, 255, .86); }
.logout-control .link-button:hover { color: white; background: rgba(255, 255, 255, .12); }

.page-heading h1,
.wizard-header h1,
.login-card h1 {
  font-family: "Arial Black", "Arial Narrow Bold", var(--font);
  font-weight: 900;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.eyebrow, .step-kicker { color: var(--accent-dark); font-weight: 900; }
.button-primary { background: var(--brand-black); color: white; }
.button-primary:hover { background: #282828; }
.button-primary:focus-visible { outline-color: rgba(210, 59, 42, .38); }
.step-number { background: var(--brand-black); }
.wizard-progress li.is-active, .wizard-progress li.is-done { color: var(--brand-black); }
.wizard-progress li.is-active span, .wizard-progress li.is-done span { background: var(--brand-black); border-color: var(--brand-black); }
.proposal-primary { background: #f1f1f3; box-shadow: inset 4px 0 0 var(--brand-black); }
.upload-dropzone { border-color: rgba(9, 9, 9, .34); }
.upload-dropzone:hover { border-color: var(--brand-black); background: #f1f1f3; }
.upload-icon { color: white; background: var(--brand-black); }
.product-thumb:not(:has(img)) {
  color: white;
  background: var(--brand-black);
  box-shadow: inset 0 0 0 2px var(--brand-black), inset 0 0 0 3px rgba(255, 255, 255, .55);
}
.primary-badge, .check-card input:checked + span { background: var(--brand-black); border-color: var(--brand-black); }

.login-card { overflow: hidden; position: relative; }
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--brand-black);
}
.login-stamp {
  width: 112px;
  min-width: 112px;
  min-height: 54px;
  margin: .35rem 0 1.6rem;
  font-size: .92rem;
  color: white;
  background: var(--brand-black);
  border-color: var(--brand-black);
  box-shadow: 4px 4px 0 rgba(210, 59, 42, .2);
}
.login-stamp span:last-child { font-size: .81rem; }
.login-logo {
  width: 150px;
  height: auto;
  display: block;
  margin: .15rem 0 1.35rem;
}

@media (min-width: 761px) {
  .app-header { background: rgba(9, 9, 9, .97); }
  .brand > span:nth-child(2) { display: block; }
  .brand strong { color: white; }
  .brand small { color: rgba(255, 255, 255, .62); }
  .app-header nav > .nav-item, .app-header nav .nav-item { color: rgba(255, 255, 255, .7); }
  .app-header nav .nav-item.is-current { color: white; background: rgba(255, 255, 255, .12); }
  .brand-stamp { width: 94px; min-width: 94px; min-height: 44px; font-size: .76rem; }
  .brand-stamp span:last-child { font-size: .67rem; }
  .brand-logo-shell { width: 94px; min-width: 94px; height: 54px; }
}

/* Simple status and attribute controls */
.product-status-control {
  width: 100%;
  display: grid;
  gap: .55rem;
  padding: .8rem;
  border-radius: 16px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.product-status-control select { min-height: 46px; background: var(--paper); }
.publish-confirm {
  min-height: 48px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  color: var(--danger);
  border-radius: 12px;
  background: var(--danger-soft);
}
.publish-confirm input { width: 22px; min-width: 22px; min-height: 22px; box-shadow: none; }

.attribute-editor-card {
  display: grid;
  gap: .8rem;
  padding: .9rem;
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}
.attribute-toggles { display: grid; grid-template-columns: 1fr; gap: .55rem; }
.toggle-card { display: block; }
.toggle-card > input { position: absolute; opacity: 0; width: 1px; min-height: 1px; }
.toggle-card > span {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: .08rem;
  padding: .7rem .8rem .7rem 2.65rem;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  position: relative;
}
.toggle-card > span::before {
  content: "";
  position: absolute;
  left: .8rem;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  transform: translateY(-50%);
  background: white;
}
.toggle-card > input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.toggle-card > input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px white; }
.toggle-card > input:focus-visible + span { outline: 3px solid rgba(210, 59, 42, .24); outline-offset: 2px; }
.toggle-card small { color: var(--ink-soft); font-weight: 500; line-height: 1.25; }
.publish-confirm-card { text-align: left; }
.variation-option-picker { display: grid; gap: .55rem; }
.variation-option-picker legend { margin-bottom: 0; }
.variation-option-picker > .help-text { margin: 0; }
.variation-option-editor {
  display: grid;
  gap: .7rem;
  padding: .85rem;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.variation-option-editor > div > .help-text { margin: .2rem 0 0; }
.variation-option-rows { display: grid; gap: .55rem; }
.variation-option-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: .5rem; align-items: end; }
.variation-option-row label { min-width: 0; }
.variation-option-row input[readonly] { color: var(--ink-soft); background: #e9e9ee; }
.variation-option-remove {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: white;
  color: var(--danger, #b42318);
  font-size: 1.4rem;
  cursor: pointer;
}
.variation-option-add { justify-self: start; }
.question-example { margin: .35rem 0 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.4; }
.variation-attribute-grid .check-card > span { display: grid; align-content: center; align-items: initial; gap: .18rem; }
.variation-attribute-grid .check-card strong, .variation-attribute-grid .check-card small { display: block; }
.variation-attribute-grid .check-card small { color: inherit; opacity: .72; font-size: .76rem; line-height: 1.25; }
.required-badge {
  display: inline-flex;
  margin-left: .4rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: .72rem;
  font-weight: 800;
  vertical-align: middle;
}
.taxonomy-section { border-color: rgba(210, 59, 42, .24); }
.shipping-panel { border-color: rgba(210, 59, 42, .24); }
.shipping-rule-note {
  margin: 0;
  padding: .75rem .85rem;
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .9rem;
  line-height: 1.4;
}
.product-open-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.product-open-links .button { min-height: 44px; padding: .55rem .65rem; font-size: .82rem; }
.rich-text-field { display: grid; gap: .42rem; }
.rich-text-label { font-size: .91rem; font-weight: 650; color: var(--ink); }
.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .4rem;
  border-radius: 13px 13px 0 0;
  background: #e9e9ee;
}
.rich-text-toolbar button {
  min-width: 44px;
  min-height: 44px;
  padding: .45rem .65rem;
  border: 0;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}
.rich-text-editor {
  min-height: 126px;
  margin-top: -.42rem;
  padding: .82rem .9rem;
  overflow-wrap: anywhere;
  border-radius: 0 0 13px 13px;
  background: #f2f2f7;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .08);
  outline: none;
}
.rich-text-editor:focus { background: white; box-shadow: 0 0 0 3px rgba(184, 67, 42, .14); }
.rich-text-editor p, .rich-text-editor ul, .rich-text-editor ol { margin: 0 0 .65rem; }
.rich-text-editor > :last-child { margin-bottom: 0; }
.variation-image-control {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}
.variation-image-preview {
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 13px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.variation-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.variation-image-fields, .variation-image-upload { display: grid; gap: .5rem; }
.variation-image-upload input[type="file"] { padding: .55rem; }
.variation-image-upload input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: .55rem;
  padding: .45rem .65rem;
  border: 0;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-weight: 700;
}
.variation-manager { overflow: clip; }
.variation-value-editor {
  display: grid;
  gap: .75rem;
  padding: .9rem;
  border-radius: 16px;
  background: #f7f7fa;
  box-shadow: inset 0 0 0 1px var(--line);
}
.variation-value-editor p { margin: .18rem 0 0; }
.variation-value-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.variation-value-add .button { min-height: 48px; }
.variation-manager .variation-list { display: grid; gap: .75rem; }
.variation-row { transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.variant-kind-list, .filter-attribute-list { display: grid; gap: .75rem; }
.variant-kind, .filter-attribute { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem; background: rgba(255,255,255,.78); }
.variant-kind-values { display: grid; gap: var(--space-field); margin-top: var(--space-field); padding-top: var(--space-field); border-top: 1px solid var(--line); }
.combination-summary { margin: .85rem 0; padding: .7rem .85rem; border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--ink-soft); font-weight: 700; }
.optional-label { color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.filter-attribute [data-filter-attribute-values] { margin-top: .7rem; }
.variation-row.is-new { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
.variation-row.is-deactivated { opacity: .62; background: #f1f1f4; }
.variation-row.is-deactivated .variation-fields,
.variation-row.is-deactivated .variation-image-control { display: none; }
.state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: .35rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}
.state-new { color: var(--accent); background: var(--accent-soft); }
.variation-deactivate { margin-top: .75rem; }
.sticky-actions .button { transition: transform 160ms ease, background 160ms ease, opacity 160ms ease; }
.sticky-actions .button:active { transform: scale(.985); }
.sticky-actions .button.is-complete { opacity: .72; }
.sticky-actions .button.is-loading::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: .5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}

@media (max-width: 480px) {
  .variation-value-add { grid-template-columns: 1fr; }
  .variation-value-add .button { width: 100%; }
  .variation-image-control { grid-template-columns: 64px minmax(0, 1fr); }
  .variation-image-preview { width: 64px; }
  .variation-image-upload .button { width: 100%; }
}

@media (min-width: 761px) {
  .product-status-control { width: min(300px, 34vw); }
  .attribute-toggles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-inline-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

/* Bulk product actions */
.bulk-form { display: grid; gap: .8rem; }
.bulk-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(230px, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 16px rgba(49, 37, 27, .06);
}
.bulk-select-all, .product-select, .bulk-confirm {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
}
.bulk-select-all { min-height: 44px; font-weight: 750; }
.bulk-select-all input, .product-select input, .bulk-confirm input {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  accent-color: var(--brand-black);
}
.bulk-count { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.bulk-action-field select { min-height: 46px; width: 100%; background: var(--paper); }
.bulk-confirm {
  grid-column: 1 / -1;
  min-height: 48px;
  padding: .65rem .75rem;
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 750;
}
.bulk-help { grid-column: 1 / -1; margin: -.15rem 0 0; color: var(--ink-soft); font-size: .84rem; }
.bulk-form:not(.has-selection) .bulk-action-field,
.bulk-form:not(.has-selection) .bulk-submit,
.bulk-form:not(.has-selection) .bulk-help { display: none; }
.bulk-form.has-selection .bulk-toolbar { animation: toolbar-reveal 180ms ease-out; }
@keyframes toolbar-reveal { from { opacity: .72; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.product-select { min-width: 44px; min-height: 44px; justify-content: center; }
.bulk-product-row { grid-template-columns: 44px minmax(0, 1fr) 110px 120px 46px; }
.bulk-product-row.is-selected { background: #fff4ee; box-shadow: inset 4px 0 0 var(--accent); }

@media (max-width: 760px) {
  .bulk-form { gap: .65rem; }
  .bulk-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
    padding: .65rem;
  }
  .bulk-action-field { grid-column: 1 / -1; }
  .bulk-submit { grid-column: 1 / -1; width: 100%; min-height: 48px; }
  .bulk-product-row { grid-template-columns: 44px minmax(0, 1fr); gap: .45rem; }
  .bulk-product-row .product-main { grid-column: 2; }
  .bulk-product-row > .product-price { display: none; }
  .bulk-product-row .product-copy strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
  .bulk-product-row .product-mobile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; }
  .product-mobile-price { font-size: .875rem; font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
  .bulk-product-row { transition: none; }
}

/* High-contrast keyboard focus, independent of selection and brand fills. */
.list-loading { min-height: 280px; }
.field-with-help { position: relative; min-width: 0; display: grid; gap: .35rem; }
.disclosure-thumbnail { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: 0 0 44px; }
.field-caption { min-height: 44px; padding-right: 50px; display: flex; align-items: center; flex-wrap: wrap; }
.context-help > summary { width: 44px; min-height: 44px; display: grid; place-items: center; cursor: pointer; list-style: none; border-radius: 50%; color: var(--ink-soft); font-size: 1.25rem; }
.context-help > summary::-webkit-details-marker { display: none; }
.field-with-help > .context-help > summary { position: absolute; top: 0; right: 0; }
.context-help[open] > summary { color: var(--accent-dark); background: var(--accent-soft); }
.context-help:not([open]) > .context-help-body { display: none; }
.context-help-body { margin: 0; padding: .75rem; border-radius: 10px; background: var(--surface-soft, #f4f4f7); color: var(--ink-soft); font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.header-more > summary { min-height: 44px; cursor: pointer; display: flex; align-items: center; color: var(--ink-soft); font-size: .875rem; }
.list-refresh-notice { color: var(--ink-soft); font-size: .875rem; margin-bottom: .75rem; }
.no-js .filter-submit { display: inline-flex; }
.list-loading p { color: var(--ink-soft); }
.list-skeleton { height: 100px; margin: .65rem 0; border-radius: 17px; background: var(--line); animation: list-pulse 1.2s ease-in-out infinite alternate; }
@keyframes list-pulse { from { opacity: .35; } to { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .list-skeleton { animation: none; } }
input:focus-visible, textarea:focus-visible, select:focus-visible,
button:focus-visible, a:focus-visible, summary:focus-visible,
.check-card input:focus-visible + span, .choice-card input:focus-visible + span,
.toggle-card > input:focus-visible + span, .segmented input:focus-visible + span {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}
