:root { --cfe-line: #50845b; --cfe-focus: #235b34; }
body { font-size: 15px; }
button, summary { min-height: 44px; }
button:disabled { opacity: .55; cursor: not-allowed; }
button, input, textarea, summary, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--panel); padding: 12px; }
.skip:focus { top: 10px; }
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 18px max(22px, calc((100vw - 1180px)/2)); border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand > span { color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border: 1px solid var(--line); border-radius: 4px; font-family: Georgia, serif; font-size: 24px; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 400; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
main { max-width: 1224px; margin: 0 auto; padding: 28px 22px 60px; }
.intro { font-size: 16px; margin: 0 0 4px; }
.storage-status { font-size: 13px; color: var(--muted); margin: 0 0 24px; min-height: 20px; }
.recipe-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 28px; box-shadow: var(--shadow); }
.recipe-sheet .title { display: block; font-size: clamp(23px, 3vw, 34px); font-weight: 650; letter-spacing: -.035em; line-height: 1.2; margin-bottom: 6px; }
.inline-field { display: block; width: 100%; max-width: 100%; border: 1px solid transparent; border-radius: 3px; background: transparent; padding: 5px 6px; color: var(--ink); font: inherit; line-height: 1.45; resize: none; field-sizing: content; min-height: 44px; overflow-wrap: anywhere; }
.inline-field:hover { border-color: var(--line); background: var(--bg); }
.inline-field:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; background: var(--bg); }
.inline-field[aria-invalid="true"] { border-color: var(--danger); }
.subtitle { color: var(--muted); margin-bottom: 18px; }
.meta-line { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr; gap: 12px; margin: 6px 0 22px; }
.meta-line label { min-width: 0; }
.meta-line label > span, .field-hint { font-size: 11px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.meta-line .inline-field { font-size: 13px; }
.chart-hint { font-size: 12px; color: var(--muted); margin: 8px 0; }
.chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; border: 2px solid var(--cfe-line); border-radius: 2px; }
table.cfe { table-layout: fixed; width: 100%; min-width: 760px; border-spacing: 0; border-collapse: collapse; }
table.cfe td { border-right: 1px solid var(--cfe-line); border-bottom: 1px solid var(--cfe-line); vertical-align: middle; padding: 12px; overflow-wrap: anywhere; }
table.cfe tr:last-child > td { border-bottom: 0; }
table.cfe col.ingredient-col { width: 31%; }
table.cfe td.ingredient { background: var(--panel); }
.ingredient .amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.ingredient-fields { display: grid; grid-template-columns: minmax(80px, .6fr) 1fr; align-items: start; }
.ingredient-fields .prep { grid-column: 2; }
.ingredient .item { font-weight: 550; }
.ingredient .prep, .step .cue { color: var(--muted); font-size: 13px; }
.step .action { color: var(--ink); font-weight: 650; font-size: 15px; }
table.cfe .empty.open-top { border-top-style: hidden; }
.chart-scroll.open-waiting table.cfe { border-collapse: separate; }
.chart-scroll.open-waiting td.empty { border: 0; }
.chart-scroll.open-waiting td.step { border-left: 1px solid var(--cfe-line); border-top: 1px solid var(--cfe-line); }
.next-arrow { position: relative; }
.next-arrow::after { content: '→'; position: absolute; right: -9px; top: var(--arrow-at); background: var(--panel); color: var(--cfe-line); width: 18px; text-align: center; z-index: 1; }
table.cfe tfoot td { border-top: 2px solid var(--cfe-line); padding: 14px; }
.nutrition-note { margin: 6px; color: var(--muted); font-size: 12px; }
.notes-heading { margin: 28px 0 6px; font-size: 17px; letter-spacing: -.02em; }
.note-row { display: flex; gap: 8px; align-items: start; margin-bottom: 6px; }
.note-row .inline-field { flex: 1; min-width: 0; }
.note-row button { font-size: 20px; min-width: 44px; border-color: transparent; color: var(--muted); background: transparent; padding: 4px; }
.note-row button:hover { background: var(--bg); color: var(--danger); }
.add-note { border-style: dashed; margin-top: 4px; font-size: 13px; }
.studio-foot { display: flex; gap: 20px; justify-content: space-between; align-items: start; margin: 20px 0 8px; }
.studio-foot p { color: var(--muted); font-size: 12px; max-width: 670px; margin: 0; }
.studio-foot button { flex-shrink: 0; font-size: 12px; }
.about { color: var(--muted); font-size: 12px; max-width: 820px; }
.about summary { cursor: pointer; padding-top: 12px; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .studio-bar { padding: 16px; gap: 14px; }
  .file-actions { width: 100%; }
  .file-actions button { flex: 1 1 auto; padding: 8px; font-size: 12px; }
  main { padding: 20px 12px 40px; }
  .intro { font-size: 14px; }
  .recipe-sheet { padding: 16px 12px; }
  .meta-line { grid-template-columns: 1fr 1fr; gap: 8px; }
  .studio-foot { flex-direction: column; gap: 8px; }
}
@media (prefers-color-scheme: dark) { :root { --cfe-line: #719979; --cfe-focus: #9bcea7; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
