:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fcfaf5;
  --surface-2: #eee8dd;
  --line: #d6cec1;
  --line-strong: #b7aa97;
  --text: #1c1915;
  --muted: #6f675d;
  --accent: #765836;
  --accent-weak: #efe3d1;
  --warn: #9b5a00;
  --warn-bg: #fff4df;
  --bad: #a23b2a;
  --bad-bg: #fff0ed;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.shell {
  min-height: 100vh;
  padding: 10px 12px 12px;
}

.topbar {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
}

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

h1 {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 750;
}

h2 {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

h3 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

#status {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.top-search {
  width: min(280px, 34vw);
  height: 30px;
}

button,
.button-link {
  appearance: none;
  -webkit-appearance: none;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

button:hover:enabled,
.button-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

button:disabled {
  cursor: not-allowed;
  color: #a4a89f;
  background: #eceee8;
}

.grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(240px, 0.7fr) minmax(460px, 1.35fr) minmax(240px, 0.7fr);
  gap: 8px;
  height: calc(100vh - 60px);
  padding-top: 8px;
}

.pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.pane-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pane-head {
  height: 32px;
  padding: 0 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.pane-head span,
summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

textarea,
input,
select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  box-shadow: none;
}

textarea {
  flex: 1;
  min-height: 240px;
  resize: none;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

input,
select {
  height: 32px;
  padding: 0 8px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-weak);
  border-color: var(--accent);
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

details {
  border-top: 1px solid var(--line);
  padding: 8px 10px;
  background: #fbfbf9;
}

pre {
  margin: 8px 0 0;
  max-height: 180px;
  overflow: auto;
  color: #33362f;
  white-space: pre-wrap;
  font-size: 12px;
}

.warnings {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.warning {
  width: 100%;
  height: auto;
  min-height: 28px;
  border: 1px solid #dfbd79;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 3px;
  padding: 5px 7px;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}

.draft-list {
  overflow: auto;
}

.draft-item {
  width: 100%;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  padding: 7px 10px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.draft-item.active {
  background: var(--accent-weak);
  color: var(--text);
}

.draft-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.draft-stats {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.empty {
  padding: 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .shell {
    padding: 8px;
  }

  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 8px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
  }

  .top-search {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    height: 36px;
    font-size: 16px;
  }

  .button-link,
  button {
    min-height: 36px;
  }

}

@media (max-width: 1080px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 8px;
  }

  .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .pane {
    min-height: 320px;
  }

}

.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;
}

.app-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

.app-header {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.header-copy {
  display: grid;
  gap: 4px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nav-link {
  width: 100%;
}

.nav-link.is-active {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
}

.section-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.section-toolbar-search {
  min-width: 0;
}

.section-toolbar-search .top-search {
  width: 100%;
}

.section-utility-row {
  display: flex;
  justify-content: flex-end;
}

.search-field {
  display: block;
}

.quiet-link {
  background: transparent;
}

.primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.primary-action:hover:enabled {
  color: #ffffff;
}

.mobile-stack {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.section-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(118, 88, 54, 0.04);
  overflow: hidden;
}

.section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f2e9;
}

.count-pill {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.section-scroll {
  max-height: 28vh;
  overflow: auto;
}

.picker-list {
  display: grid;
}

.picker-row,
.builder-result {
  width: 100%;
  height: auto;
  min-height: 56px;
  display: grid;
  gap: 4px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.picker-row:last-child,
.builder-result:last-child {
  border-bottom: 0;
}

.picker-row [slot="label"],
.row-title {
  display: block;
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
}

.picker-row [slot="description"],
.row-support {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.picker-row.is-selected {
  background: var(--accent-weak);
  box-shadow: inset 2px 0 0 var(--accent);
}

.picker-row.is-focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.section-label {
  display: block;
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.selection-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.selection-summary strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.selection-summary span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.compact-action {
  min-width: 72px;
}

.empty-panel {
  padding: 14px 12px;
  color: var(--muted);
}

.detail-empty {
  display: grid;
  gap: 6px;
}

.detail-empty strong {
  color: var(--text);
}

.detail-stack {
  display: grid;
  gap: 18px;
  padding: 14px 12px 16px;
}

.detail-hero {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent-weak);
}

.detail-hero h2 {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  text-transform: none;
}

.detail-hero p,
.muted-copy {
  color: var(--muted);
  font-size: 14px;
}

.detail-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 160px) auto;
  align-items: end;
  gap: 8px;
}

.detail-toolbar-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.detail-toolbar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfbf8;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.detail-toolbar .button-link {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .detail-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-toolbar .button-link {
    justify-self: start;
  }
}

.detail-component-link {
  text-decoration: none;
}

.detail-block {
  display: grid;
  gap: 6px;
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.plain-list li {
  color: var(--text);
  line-height: 1.45;
}

.detail-list-shell {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fcfcfa;
}

.detail-item-row,
.detail-step-row,
.detail-component-row {
  width: 100%;
  height: auto;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  justify-items: stretch;
  place-items: center stretch;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.detail-step-row {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}

.detail-item-row:first-child,
.detail-step-row:first-child,
.detail-component-row:first-child {
  border-top: 0;
}

.detail-row-main {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.detail-row-side {
  color: var(--muted);
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}

.detail-step-no {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.inline-back {
  justify-self: start;
  margin-bottom: -6px;
}

.detail-secondary-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 2px;
}

.form-stack,
.builder-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.menu-cycle-field {
  display: grid;
  gap: 8px;
}

.menu-cycle-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.menu-cycle-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.source-textarea {
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.action-row {
  display: grid;
  gap: 8px;
}

.json-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf8;
  padding: 10px 12px;
}

.json-details summary {
  cursor: pointer;
  font-weight: 750;
}

.callout-stack {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.helper-callout {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.helper-callout.good {
  background: var(--accent-weak);
  color: var(--accent);
}

.helper-callout.muted {
  background: #f3f4f0;
  color: var(--muted);
}

.split-entry-stack {
  display: grid;
  gap: 8px;
}

.batch-cycle-textarea {
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.45;
}

.static-row {
  cursor: default;
}

.draft-decision-callout {
  display: grid;
  gap: 8px;
}

.draft-decision-copy {
  display: grid;
  gap: 3px;
}

.draft-decision-copy strong {
  color: var(--text);
  font-size: 13px;
}

.draft-decision-copy span {
  color: var(--muted);
}

.draft-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-decision-actions .button-link.is-active {
  background: var(--accent-weak);
  border-color: var(--accent);
  color: var(--accent);
}

.draft-card-list,
.entry-stack {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.draft-card {
  width: 100%;
  height: auto;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-align: left;
}

.draft-card.active {
  background: var(--accent-weak);
  border-color: var(--accent);
}

.draft-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.draft-card-top strong {
  font-size: 15px;
}

.editor-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.editor-grid,
.component-edit-grid {
  display: grid;
  gap: 8px;
}

.editor-block {
  display: grid;
  gap: 8px;
}

.editor-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.review-major-head {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.review-major-title {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.15;
}

.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.method-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.method-primary-actions .button-link,
.method-empty-row .button-link,
.method-fallback-row .button-link {
  min-height: 36px;
}

.entry-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf8;
}

.entry-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.entry-card-head strong {
  font-size: 14px;
}

.intake-ingredient-list-shell {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fcfcfa;
}

.intake-ingredient-list-head {
  display: none;
}

.intake-ingredient-list {
  display: grid;
}

.intake-ingredient-row {
  display: grid;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.intake-ingredient-row:first-child {
  border-top: 0;
}

.intake-ingredient-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 30px;
  gap: 10px;
  align-items: center;
}

.intake-ingredient-row.is-editing .intake-ingredient-row-grid {
  grid-template-columns: minmax(0, 1fr) 92px 84px 30px 30px;
  gap: 8px;
}

.intake-ingredient-summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  text-align: left;
}

.intake-ingredient-summary:hover:enabled,
.intake-ingredient-summary:focus-visible {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.intake-ingredient-summary-name,
.intake-ingredient-summary-measure {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.intake-ingredient-summary-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intake-ingredient-summary-measure {
  color: var(--muted);
  white-space: nowrap;
}

.intake-ingredient-cell,
.intake-ingredient-note-input {
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 500;
}

.intake-ingredient-cell:focus,
.intake-ingredient-note-input:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.intake-ingredient-name-input[readonly] {
  color: var(--muted);
  cursor: default;
}

.intake-ingredient-mini-action,
.intake-ingredient-remove {
  min-height: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 12px;
}

.intake-ingredient-mini-action {
  color: var(--muted);
  border: 0;
  background: transparent;
  opacity: 0.7;
}

.intake-ingredient-mini-action.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
  opacity: 1;
}

.intake-ingredient-remove {
  border: 0;
  background: transparent;
  color: var(--bad);
  font-size: 16px;
  line-height: 1;
  opacity: 0.7;
}

.intake-ingredient-mini-action:hover:enabled,
.intake-ingredient-remove:hover:enabled {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 1;
}

.intake-ingredient-ref-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 2px 2px;
}

.intake-ingredient-ref-chip {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfbf8;
}

.intake-ingredient-ref-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.intake-ingredient-ref-chip strong {
  font-size: 13px;
}

.intake-ingredient-ref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-ingredient-link-panel {
  display: grid;
  gap: 8px;
  padding: 2px 2px 2px;
}

.intake-ingredient-link-head {
  display: grid;
  gap: 2px;
}

.intake-ingredient-link-head strong {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.intake-ingredient-link-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.intake-ingredient-link-search input {
  height: 32px;
}

.intake-ingredient-link-results {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fcfcfa;
}

.intake-ingredient-link-result {
  border-radius: 0;
}

.method-helper-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf8;
}

.method-helper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.method-helper-head strong {
  font-size: 13px;
}

.method-helper-textarea {
  min-height: 120px;
}

.dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: rgba(24, 25, 22, 0.26);
  padding: 12px;
}

.method-dialog {
  display: grid;
  gap: 12px;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(24, 25, 22, 0.12);
}

.method-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.method-dialog-title {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.15;
}

.method-dialog-actions {
  display: grid;
  gap: 8px;
}

.helper-inline,
.inline-helper-summary {
  padding: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.method-intro-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.method-summary {
  padding-bottom: 0;
  max-width: 42ch;
  font-size: 12px;
}

.method-list-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.method-list-headline strong {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.compact-step-stack {
  padding-top: 0;
}

.method-step-list-shell {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fcfcfa;
}

.method-step-list-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  gap: 8px;
  padding: 8px 12px 6px;
  background: #fbfbf8;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.method-step-list {
  display: grid;
}

.method-empty-row {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.method-empty-row .button-link,
.method-fallback-row .button-link {
  justify-self: start;
  padding: 0 12px;
}

.method-step-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.method-step-row:first-child {
  border-top: 0;
}

.method-step-no {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.method-step-input {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 500;
}

.method-step-input:focus {
  background: #ffffff;
  border-color: var(--accent);
}

.method-step-remove {
  min-height: 30px;
  min-width: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--bad);
  font-size: 16px;
  line-height: 1;
  opacity: 0.7;
}

.method-step-remove:hover:enabled {
  border-color: var(--line);
  background: #ffffff;
  opacity: 1;
}

.method-fallback-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.review-save-bar {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
}

.review-save-copy {
  display: grid;
  gap: 3px;
}

.review-save-copy strong {
  font-size: 14px;
}

.review-save-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.review-save-button {
  width: 100%;
}

.step-card input {
  width: 100%;
}

.inspector-stack {
  border-top: 1px solid var(--line);
}

.builder-textarea {
  min-height: 180px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.45;
  font-family: inherit;
}

.result-stack {
  display: grid;
  border-top: 1px solid var(--line);
}

.compact-danger {
  color: var(--bad);
}

.component-list-shell {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fcfcfa;
}

.compose-component-row {
  display: grid;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.compose-component-row:first-child {
  border-top: 0;
}

.compose-component-row.is-editing {
  background: #fbfbf8;
}

.compose-component-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
}

.compose-component-summary-button {
  width: 100%;
  height: auto;
  min-height: 34px;
  display: grid;
  gap: 3px;
  padding: 3px 8px;
  border: 0;
  background: transparent;
  text-align: left;
  justify-items: start;
  align-content: center;
}

.compose-component-summary-button:hover:enabled,
.compose-component-summary-button:focus-visible {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.compose-component-summary-index {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
}

.compose-component-summary-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.compose-component-summary-meta {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.compose-component-edit-stack {
  display: grid;
  gap: 8px;
  padding: 2px 8px 6px;
}

.compose-component-field {
  display: grid;
  gap: 4px;
}

.compose-component-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.compose-component-qty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.recipe-list-stack {
  border-top: 0;
}

.recipe-row {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.recipe-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.recipe-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f2f3ee;
}

.recipe-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.photo-slot {
  display: grid;
  gap: 10px;
}

.compact-photo-row {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.compact-photo-row-bottom {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.compact-photo-copy {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.compact-photo-copy span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.compact-photo-copy small {
  font-size: 12px;
}

.compact-photo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-photo-chip {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f2f3ee;
}

.compact-photo-empty {
  color: var(--muted);
  font-size: 12px;
}

.recipe-photo-preview {
  width: 100%;
  min-height: 184px;
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f3ee;
  object-fit: cover;
}

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

.section-summary {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf8;
}

.component-picker {
  display: grid;
  gap: 10px;
}

.compose-step-stack {
  padding-top: 0;
}

.detail-photo {
  width: 100%;
  max-height: 240px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 760px) {
  .intake-ingredient-list-head {
    display: none;
  }

  .intake-ingredient-row-grid {
    grid-template-columns: minmax(0, 1fr) 30px 30px;
    gap: 6px;
  }

  .intake-ingredient-row {
    padding: 8px 10px;
  }

  .intake-ingredient-row.is-editing .intake-ingredient-row-grid {
    grid-template-columns: minmax(0, 1fr) 72px 72px 30px 30px;
    gap: 6px;
  }

  .intake-ingredient-row.is-editing .intake-ingredient-name-input {
    grid-column: 1 / -1;
  }

  .compose-component-qty-row {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .method-step-list-head {
    display: none;
  }

  .method-step-row {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 6px;
    padding: 6px 8px;
  }

  .method-primary-actions,
  .method-list-headline {
    align-items: stretch;
  }
}

@media (min-width: 780px) {
  .primary-nav {
    grid-template-columns: repeat(4, minmax(0, 140px));
    justify-content: end;
  }

  .action-row {
    grid-template-columns: repeat(3, auto);
  }

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

  .review-save-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .review-save-button {
    width: auto;
    min-width: 180px;
  }

  .method-dialog-actions {
    grid-template-columns: repeat(2, auto);
    justify-content: end;
  }

  .method-intro-row {
    grid-template-columns: minmax(0, 1fr) 252px;
  }

  .compact-photo-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}
