:root {
  --ui-bg:#e8e6e0; --ui-panel:#f7f6f2; --ui-card:#fffefa; --ui-ink:#252724; --ui-muted:#747771;
  --ui-line:#d7d5ce; --ui-line-strong:#bcbab2; --ui-accent:#496b68; --ui-accent-soft:#dfe8e4; --ui-danger:#9a514c;
  --sans:"OC Noto Sans SC","Noto Sans SC","Microsoft YaHei",sans-serif; --serif:"OC Noto Serif SC","Noto Serif SC","Songti SC",serif; --mono:"Courier New","OC Noto Sans SC","Microsoft YaHei UI",monospace;
}
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; }
body { height:100dvh; overflow:hidden; background:var(--ui-bg); color:var(--ui-ink); font-family:var(--sans); font-size:14px; }
button,input,textarea,select { font:inherit; }
button { color:inherit; }
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
button:disabled { opacity:.4; cursor:not-allowed; }

.topbar { height:58px; display:flex; align-items:center; gap:14px; padding:8px 14px; background:#f7f6f2; border-bottom:1px solid var(--ui-line); position:relative; z-index:30; }
.brand { color:var(--ui-ink); text-decoration:none; display:flex; align-items:center; gap:9px; font-size:15px; font-weight:850; white-space:nowrap; }
.brand-mark { width:30px; height:30px; display:grid; place-items:center; border:1px solid #313631; background:#313631; color:#fff; font:800 11px/1 var(--sans); letter-spacing:.08em; }
.project-name { min-width:140px; max-width:260px; flex:1; display:flex; align-items:center; gap:8px; margin-left:8px; }
.project-name span { color:var(--ui-muted); font-size:11px; font-weight:800; letter-spacing:.08em; }
.project-name input { width:100%; height:34px; border:1px solid transparent; background:transparent; padding:0 8px; font-weight:700; }
.project-name input:hover,.project-name input:focus { background:#fff; border-color:var(--ui-line); }
.top-actions { display:flex; align-items:center; gap:6px; }
.top-button,.primary-button,.secondary-button,.icon-button { min-height:34px; border:1px solid var(--ui-line-strong); background:#fffefa; padding:0 12px; cursor:pointer; font-weight:750; }
.top-button:hover,.secondary-button:hover,.icon-button:hover { border-color:#888b85; background:#fff; }
.primary-button { background:#354d4b; border-color:#354d4b; color:white; }
.primary-button:hover { background:#263d3b; }
.icon-button { width:34px; padding:0; font-size:19px; }

.workspace { height:calc(100dvh - 58px); min-height:0; display:grid; grid-template-columns:340px minmax(430px,1fr) 360px; }
.editor-panel { min-width:0; min-height:0; background:var(--ui-panel); display:flex; flex-direction:column; }
.content-panel { border-right:1px solid var(--ui-line); }
.style-panel { border-left:1px solid var(--ui-line); }
.panel-heading { min-height:68px; padding:13px 16px; border-bottom:1px solid var(--ui-line); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.panel-heading h1,.panel-heading h2 { margin:2px 0 0; font-size:18px; line-height:1.15; }
.eyebrow { display:block; color:var(--ui-muted); font-size:9px; font-weight:900; letter-spacing:.17em; text-transform:uppercase; }
.save-state { color:var(--ui-muted); font-size:10px; white-space:nowrap; }
.editor-scroll { min-height:0; overflow:auto; padding:12px; scrollbar-width:thin; }
.editor-card { margin-bottom:10px; padding:13px; background:var(--ui-card); border:1px solid var(--ui-line); }
.card-title { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; }
.card-title > span { font-weight:850; }
.card-title small,.subsection-head small { display:block; color:var(--ui-muted); font-size:10px; line-height:1.45; }
.segmented { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--ui-line-strong); }
.segmented.three { grid-template-columns:repeat(3,1fr); }
.segmented button { min-height:36px; border:0; border-right:1px solid var(--ui-line); background:#f7f6f2; cursor:pointer; font-weight:750; }
.segmented button:last-child { border-right:0; }
.segmented button.active { background:#354d4b; color:white; }
.field { display:block; margin:0 0 10px; min-width:0; }
.field > span { display:block; margin-bottom:5px; color:#585b55; font-size:11px; font-weight:750; }
.field > span .field-scope { float:right; padding:1px 4px; border:1px solid var(--ui-line); border-radius:3px; color:var(--ui-accent); font-size:10px!important; font-weight:800; }
.field input,.field textarea,.field select,.field > select { width:100%; min-height:36px; border:1px solid var(--ui-line-strong); border-radius:0; background:#fff; color:var(--ui-ink); padding:7px 9px; resize:vertical; }
.field textarea { min-height:68px; line-height:1.55; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.three-fields { grid-template-columns:repeat(3,1fr); }
.subsection-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin:16px 0 8px; padding-top:12px; border-top:1px solid var(--ui-line); }
.text-button { border:0; background:transparent; padding:2px 0; color:var(--ui-accent); cursor:pointer; font-size:11px; font-weight:800; }
.danger { color:var(--ui-danger)!important; }
.array-card { border:1px solid var(--ui-line); background:#f4f3ee; padding:10px; margin:0 0 10px; }
.nested-list { display:grid; gap:8px; }
.nested-card { border:1px solid #dedcd4; background:#fff; padding:9px; margin-bottom:8px; }
.nested-card.compact,.row-editor { border-left:3px solid #aab8b4; }
.array-head { display:flex; justify-content:space-between; align-items:center; min-height:22px; margin-bottom:7px; color:var(--ui-muted); font-size:10px; font-weight:850; text-transform:uppercase; letter-spacing:.05em; }
.mini-button { width:25px; height:25px; border:1px solid var(--ui-line); background:#fff; cursor:pointer; margin-right:3px; }
.secondary-button { min-height:34px; background:#f9f8f4; font-size:11px; }
.secondary-button.full,.full { width:100%; }
.danger-button { color:var(--ui-danger); border-color:#d7b9b5; }
.upload-field { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px; margin-bottom:12px; border:1px dashed var(--ui-line-strong); background:#f7f6f2; }
.upload-field strong { display:block; font-size:12px; }
.upload-field small { display:block; margin-top:2px; color:var(--ui-muted); font-size:9px; }
.upload-field > div:last-child { display:flex; align-items:center; gap:8px; }
.upload-field.has-preview { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.upload-crop-preview { position:relative; grid-column:1/-1; width:100%; aspect-ratio:var(--crop-ratio); margin:0 0 2px; overflow:hidden; border:1px solid var(--ui-line); background:var(--ui-line); }
.upload-crop-preview img { width:100%; height:100%; display:block; object-fit:cover; object-position:center; }
.upload-crop-preview.needs-crop { border-color:#a47744; }
.upload-crop-preview.needs-crop::after { content:"待按当前模板裁切"; position:absolute; inset:auto 8px 8px; padding:5px 8px; border-radius:6px; background:rgba(43,37,31,.78); color:#fff; font-size:11px; text-align:center; }
.editor-field-group { margin:0 0 12px; padding:12px; border:1px solid var(--ui-line); border-radius:5px; background:#f0f1ec; }
.editor-field-group-head { margin:0 0 11px; padding:0 0 8px; border-bottom:1px dashed var(--ui-line); }
.editor-field-group-head strong { display:block; font-size:13px; }
.editor-field-group-head small { display:block; margin-top:3px; color:var(--ui-muted); font-size:12px; line-height:1.45; }
.editor-field-group .field:last-child,.editor-field-group .field-row:last-child .field { margin-bottom:0; }
.prompt-pair { grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr); align-items:start; }
.toggle-field { display:flex; align-items:center; gap:8px; margin:5px 0 12px; font-size:12px; font-weight:700; }
.toggle-field input { accent-color:var(--ui-accent); }
.range-row { display:grid; grid-template-columns:1fr 58px; align-items:center; gap:8px; }
.range-row input[type="range"] { padding:0; accent-color:var(--ui-accent); border:0; }
.range-row output { text-align:right; color:var(--ui-muted); font-size:10px; font-variant-numeric:tabular-nums; }
.color-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
.color-grid label { min-height:43px; border:1px solid var(--ui-line); padding:6px 7px; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:10px; font-weight:750; }
.color-grid input { width:28px; height:28px; padding:0; border:0; background:transparent; }
.color-grid input:disabled { filter:grayscale(1); opacity:.45; }
.button-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.sticker-editor { min-width:0; }
.empty-state { margin:0; color:var(--ui-muted); font-size:12px; line-height:1.55; text-align:center; padding:18px 8px; border:1px dashed var(--ui-line); }
.sticker-add-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.sticker-list { display:grid; gap:6px; }
.sticker-list-item { min-width:0; min-height:56px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; padding:7px; border:1px solid var(--ui-line); background:#fff; }
.sticker-list-item.active { border-color:var(--ui-accent); background:var(--ui-accent-soft); box-shadow:inset 3px 0 var(--ui-accent); }
.sticker-select-main { min-width:0; min-height:40px; display:grid; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:8px; padding:0; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.sticker-type-mark { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--ui-line); border-radius:3px; background:#eef0eb; color:var(--ui-accent); font:850 11px/1 var(--sans); }
.sticker-list-copy { min-width:0; }
.sticker-list-copy b,.sticker-list-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sticker-list-copy b { font-size:12px; }
.sticker-list-copy small { margin-top:3px; color:var(--ui-muted); font-size:12px; }
.sticker-row-actions { display:flex; gap:3px; }
.sticker-row-actions button { width:29px; height:29px; padding:0; border:1px solid var(--ui-line-strong); border-radius:3px; background:#faf9f4; cursor:pointer; font-weight:850; }
.sticker-row-actions button:hover { border-color:var(--ui-accent); background:#fff; }
.sticker-settings-group { margin:0 0 12px; padding:0 0 12px; border-bottom:1px dashed var(--ui-line-strong); }
.sticker-settings-head { margin-bottom:11px; }
.sticker-settings-head strong,.sticker-settings-head small { display:block; }
.sticker-settings-head strong { font-size:13px; }
.sticker-settings-head small { margin-top:3px; color:var(--ui-muted); font-size:12px; line-height:1.45; }
.sticker-controls-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 9px; }
.sticker-align-switch { display:grid; grid-template-columns:repeat(3,1fr); margin:0 0 12px; border:1px solid var(--ui-line-strong); border-radius:4px; overflow:hidden; }
.sticker-align-switch button { min-height:36px; border:0; border-right:1px solid var(--ui-line); background:#eef0eb; cursor:pointer; font-size:12px; font-weight:750; }
.sticker-align-switch button:last-child { border-right:0; }
.sticker-align-switch button.active { background:var(--ui-accent); color:#fff; }
.sticker-background-toggle { margin:1px 0 12px; }
.sticker-color-field.is-disabled { opacity:.48; }
.sticker-color-controls .field { margin-bottom:0; }
.sticker-image-note { margin:0 0 12px; padding:10px; border:1px dashed var(--ui-line); background:#f0f2ed; color:var(--ui-muted); font-size:12px; line-height:1.55; }
.sticker-layer-buttons { display:grid; grid-template-columns:1fr 1fr; gap:7px; }

.preview-panel { min-width:0; min-height:0; display:flex; flex-direction:column; background:#dfddd7; }
.preview-head { min-height:57px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #cbc9c2; background:#eeece7; }
.preview-head strong { display:block; margin-top:2px; font-size:13px; }
.preview-meta { display:flex; gap:10px; color:var(--ui-muted); font-size:10px; }
.template-strip { flex:0 0 auto; display:grid; grid-template-columns:repeat(6,minmax(110px,1fr)); gap:7px; overflow-x:auto; padding:9px 11px; border-bottom:1px solid #cbc9c2; background:#e7e5df; }
.template-chip { min-width:112px; height:56px; display:flex; align-items:center; gap:7px; border:1px solid #cac7bf; background:#f8f7f3; padding:6px; cursor:pointer; text-align:left; }
.template-chip.active { border-color:#354d4b; box-shadow:inset 0 -3px #354d4b; }
.template-chip strong,.template-chip small { display:block; line-height:1.25; }
.template-chip strong { font-size:10px; }
.template-chip small { margin-top:3px; color:var(--ui-muted); font-size:8px; }
.template-swatch { width:34px; height:39px; flex:0 0 auto; padding:5px; display:flex; align-items:flex-end; gap:2px; background:var(--s1); border:1px solid color-mix(in srgb,var(--s2) 35%,transparent); }
.template-swatch i { display:block; width:5px; background:var(--s2); height:18px; }
.template-swatch i:nth-child(2) { background:var(--s3); height:27px; }
.template-swatch i:nth-child(3) { height:12px; }
.preview-viewport { min-height:0; flex:1; overflow:auto; padding:34px 28px 70px; overscroll-behavior:contain; }
.preview-stage { position:relative; margin:0 auto; transition:width .15s ease; }
.preview-stage > .culinary-canvas { position:absolute; top:0; left:0; }
.culinary-canvas { position:relative; overflow:hidden; transform-origin:top left; background:var(--paper); color:var(--ink); min-height:460px; box-shadow:0 15px 45px rgba(38,38,33,.16); transition:width .15s ease,transform .15s ease; }
.culinary-canvas.is-exporting { box-shadow:none!important; }
.culinary-canvas h1,.culinary-canvas h2,.culinary-canvas h3,.culinary-canvas p { margin-top:0; }
.template-kicker { color:var(--accent); font-size:10px; font-weight:900; letter-spacing:.2em; text-transform:uppercase; }
.cover-media { height:280px; margin:0; overflow:hidden; background:var(--line); }
.cover-media img { width:100%; height:100%; display:block; object-fit:cover; }
.cover-media.is-uncropped,.ref-cover.is-uncropped { display:grid; place-items:center; border:1px dashed var(--accent); background:color-mix(in srgb,var(--paper) 90%,var(--accent)); color:var(--accent); font:700 13px/1.4 var(--sans); }
.cover-media img,.ref-cover img { object-position:center; }
.sticker-layer { position:absolute; inset:0; z-index:20; pointer-events:none; }
.canvas-sticker { position:absolute; min-width:28px; min-height:24px; transform-origin:center; cursor:grab; pointer-events:auto; user-select:none; touch-action:none; }
.canvas-sticker .sticker-content { width:100%; opacity:var(--sticker-opacity); }
.canvas-sticker.text-sticker .sticker-content { color:var(--sticker-color); font-family:var(--sticker-font); font-size:var(--sticker-font-size); font-weight:var(--sticker-weight); line-height:1.18; text-align:var(--sticker-align); }
.canvas-sticker.text-sticker span { display:block; width:100%; padding:.28em .55em; border:0; background:var(--sticker-background); white-space:pre-wrap; overflow-wrap:anywhere; }
.canvas-sticker.image-sticker img { display:block; width:100%; height:auto; pointer-events:none; }
.canvas-sticker.selected::after { content:""; position:absolute; inset:-6px; border:1.5px dashed var(--ui-accent); pointer-events:none; }
.canvas-sticker.transforming-drag { cursor:grabbing; }
.sticker-handle { position:absolute; z-index:3; display:none; width:16px; height:16px; padding:0; border:2px solid #fff; border-radius:50%; background:var(--ui-accent); box-shadow:0 1px 5px rgba(28,35,31,.32); touch-action:none; }
.canvas-sticker.selected .sticker-handle { display:block; }
.sticker-resize { right:-15px; bottom:-15px; cursor:nwse-resize; }
.sticker-rotate { left:50%; top:-36px; transform:translateX(-50%); cursor:grab; }
.sticker-rotate::after { content:""; position:absolute; left:50%; top:14px; width:1px; height:17px; transform:translateX(-50%); background:var(--ui-accent); pointer-events:none; }
.culinary-canvas.is-exporting .canvas-sticker.selected::after,.culinary-canvas.is-exporting .sticker-handle { display:none!important; }
.culinary-canvas.is-exporting .canvas-sticker { cursor:default; }

/* 菜单共通结构 */
.menu-layout { padding:62px 58px 45px; font-family:var(--serif); background:var(--paper); min-height:760px; }
.menu-header { position:relative; text-align:center; padding:25px 20px 35px; border:1px solid var(--line); }
.menu-header h1 { margin:15px 0 5px; font-size:42px; line-height:1.08; font-weight:700; letter-spacing:.02em; }
.menu-header p { color:var(--muted); font:600 10px/1.5 var(--sans); letter-spacing:.14em; text-transform:uppercase; }
.menu-year { position:absolute; top:17px; right:18px; color:var(--muted); font:700 9px/1 var(--sans); }
.menu-emblem { position:absolute; left:20px; bottom:-18px; width:40px; height:40px; display:grid; place-items:center; border:1px solid var(--accent); background:var(--paper); color:var(--accent); font:700 10px/1 var(--serif); }
.menu-section-label { margin:44px 0 22px; text-align:center; color:var(--accent); font:850 10px/1 var(--sans); letter-spacing:.25em; }
.menu-columns { columns:2; column-gap:45px; }
.menu-category { break-inside:avoid; display:inline-block; width:100%; margin-bottom:30px; }
.menu-category > header { padding-bottom:8px; margin-bottom:13px; border-bottom:2px solid var(--accent); display:flex; justify-content:space-between; align-items:flex-end; gap:12px; }
.menu-category h2 { margin:0; font-size:21px; }
.menu-category header span { color:var(--muted); font:700 8px/1 var(--sans); letter-spacing:.1em; text-transform:uppercase; }
.menu-item { margin-bottom:17px; break-inside:avoid; }
.menu-item-line { display:flex; align-items:baseline; gap:6px; }
.menu-item-line h3 { margin:0; font-size:13px; line-height:1.35; }
.menu-item-line > span { flex:1; border-bottom:1px dotted var(--line); }
.menu-item-line strong { color:var(--accent); font:800 12px/1 var(--sans); }
.menu-item-en { color:var(--muted); margin-top:2px; font:650 8px/1.35 var(--sans); letter-spacing:.05em; }
.menu-item p { margin:5px 0 0; color:var(--muted); font:400 9px/1.65 var(--sans); }
.menu-footer { margin-top:24px; padding-top:16px; border-top:1px solid var(--line); text-align:center; color:var(--muted); font:500 9px/1.6 var(--sans); }
.menu-footer p { margin-bottom:3px; }

.template-menu-parisian-noir .menu-layout { border:8px double var(--accent); margin:18px; min-height:724px; padding:45px 40px 35px; }
.template-menu-parisian-noir .menu-header { border-color:var(--accent); }
.template-menu-parisian-noir .menu-header h1 { font-style:italic; }
.template-menu-japanese-wabi .menu-layout { padding:72px 70px 50px; }
.template-menu-japanese-wabi .menu-header { text-align:left; border:0; border-left:2px solid var(--accent); padding:0 0 18px 24px; }
.template-menu-japanese-wabi .menu-header h1 { font-size:38px; letter-spacing:.12em; }
.template-menu-japanese-wabi .menu-emblem { left:auto; right:15px; bottom:12px; background:var(--accent); color:var(--paper); border:0; }
.template-menu-japanese-wabi .menu-columns { columns:1; }
.template-menu-japanese-wabi .menu-category > header { border-bottom:1px solid var(--line); }
.template-menu-japanese-wabi .menu-item { padding-left:18px; }
.template-menu-italian-trattoria .menu-layout { border:1px solid var(--line); margin:22px; padding:50px 42px 32px; min-height:716px; }
.template-menu-italian-trattoria .menu-header { border:0; border-bottom:3px double var(--accent); }
.template-menu-italian-trattoria .menu-header h1 { font-size:46px; font-style:italic; }
.template-menu-italian-trattoria .menu-emblem { border-radius:50%; }
.template-menu-italian-trattoria .menu-category > header { border-bottom:2px dotted var(--accent); }
.template-menu-nordic-modern .menu-layout { font-family:var(--sans); padding:50px; }
.template-menu-nordic-modern .menu-header { text-align:left; padding:15px 0 28px; border:0; border-top:8px solid var(--ink); }
.template-menu-nordic-modern .menu-header h1 { max-width:75%; font-size:54px; letter-spacing:-.05em; }
.template-menu-nordic-modern .menu-emblem { left:auto; right:0; bottom:28px; border:0; background:var(--accent); color:var(--paper); }
.template-menu-nordic-modern .menu-section-label { text-align:left; }
.template-menu-nordic-modern .menu-category h2 { font-size:17px; text-transform:uppercase; }
.template-menu-classic-oriental .menu-layout { margin:20px; padding:52px 45px 35px; border:3px double var(--accent); }
.template-menu-classic-oriental .menu-header { border:0; }
.template-menu-classic-oriental .menu-header::before,.template-menu-classic-oriental .menu-header::after { content:"◆"; color:var(--accent); position:absolute; top:50%; }
.template-menu-classic-oriental .menu-header::before { left:8px; }.template-menu-classic-oriental .menu-header::after { right:8px; }
.template-menu-classic-oriental .menu-header h1 { letter-spacing:.14em; }
.template-menu-classic-oriental .menu-emblem { background:var(--accent); color:var(--paper); }
.template-menu-cyberpunk-neon .menu-layout { font-family:var(--sans); padding:48px; }
.template-menu-cyberpunk-neon .menu-header { text-align:left; border:1px solid var(--line); border-left:8px solid var(--accent); }
.template-menu-cyberpunk-neon .menu-header h1 { font-size:45px; text-transform:uppercase; letter-spacing:-.04em; }
.template-menu-cyberpunk-neon .menu-section-label { text-align:left; border-bottom:1px solid var(--accent); padding-bottom:8px; }
.template-menu-cyberpunk-neon .menu-category > header { border-bottom:1px solid var(--accent); }

/* 菜谱共通结构 */
.recipe-layout { min-height:850px; padding:0 54px 42px; background:var(--paper); }
.recipe-header { margin:0 -54px; position:relative; }
.recipe-title-block { padding:46px 54px 36px; }
.recipe-title-block h1 { max-width:720px; margin:12px 0 9px; font:700 44px/1.18 var(--serif); letter-spacing:-.02em; }
.recipe-subtitle { color:var(--accent); font:750 11px/1.5 var(--sans); letter-spacing:.08em; }
.recipe-deck { max-width:680px; color:var(--muted); font:400 12px/1.85 var(--serif); }
.recipe-stats { display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.recipe-stats span { padding:12px 10px; border-right:1px solid var(--line); color:var(--ink); font-size:10px; }
.recipe-stats span:last-child { border-right:0; }
.recipe-stats b { display:block; margin-bottom:4px; color:var(--muted); font-size:8px; letter-spacing:.12em; }
.recipe-body { display:grid; grid-template-columns:.84fr 1.4fr; gap:42px; padding:36px 0; }
.section-heading { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.section-heading > span { width:29px; height:29px; display:grid; place-items:center; background:var(--accent); color:var(--paper); font:800 9px/1 var(--sans); }
.section-heading h2 { margin:0; font:750 16px/1.2 var(--serif); }
.ingredient { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:10px; }
.ingredient strong,.ingredient small { display:block; }
.ingredient small { margin-top:3px; color:var(--muted); font-size:8px; }
.ingredient > span { color:var(--accent); white-space:nowrap; font-weight:800; }
.recipe-step { display:grid; grid-template-columns:33px 1fr; gap:12px; padding:0 0 18px; }
.recipe-step > b { color:var(--accent); font:850 14px/1 var(--sans); }
.recipe-step h3 { margin:0 0 5px; font:750 13px/1.35 var(--serif); }
.recipe-step p { margin:0 0 5px; color:var(--muted); font-size:10px; line-height:1.72; }
.recipe-step small { color:var(--accent); font-size:8px; font-weight:750; }
.chef-note { padding:17px 20px; border-left:4px solid var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--paper)); }
.chef-note strong { color:var(--accent); font-size:9px; letter-spacing:.15em; }
.chef-note p { margin:5px 0 0; font:500 10px/1.7 var(--serif); }
.recipe-footer { margin-top:25px; text-align:right; color:var(--muted); font-size:8px; font-weight:850; letter-spacing:.15em; }

.template-recipe-editorial-mag .recipe-header .cover-media { height:360px; }
.template-recipe-editorial-mag .recipe-title-block { background:var(--paper); width:82%; margin:-80px 0 0; position:relative; }
.template-recipe-editorial-mag .recipe-title-block h1 { font-size:48px; }
.template-recipe-illustrated-journal .recipe-layout { margin:18px; min-height:814px; border:1px solid var(--line); padding:30px 42px 38px; }
.template-recipe-illustrated-journal .recipe-header { margin:0; }
.template-recipe-illustrated-journal .cover-media { height:260px; transform:rotate(-1deg); border:8px solid color-mix(in srgb,var(--paper) 70%,white); }
.template-recipe-illustrated-journal .recipe-title-block { padding:35px 0 28px; }
.template-recipe-illustrated-journal .recipe-title-block h1 { font-style:italic; }
.template-recipe-illustrated-journal .chef-note { transform:rotate(.5deg); border:1px dashed var(--accent); }
.template-recipe-pro-spec .recipe-layout { font-family:var(--sans); }
.template-recipe-pro-spec .recipe-title-block { border-bottom:1px solid var(--accent); }
.template-recipe-pro-spec .recipe-title-block h1 { font-family:var(--sans); text-transform:uppercase; font-size:40px; }
.template-recipe-pro-spec .recipe-body { grid-template-columns:1fr 1fr; }
.template-recipe-pro-spec .recipe-step { border-bottom:1px solid var(--line); padding:13px 0; }
.template-recipe-midnight-izakaya .recipe-title-block { padding-top:60px; }
.template-recipe-midnight-izakaya .recipe-title-block h1 { font-size:39px; font-weight:500; letter-spacing:.08em; }
.template-recipe-midnight-izakaya .recipe-body { grid-template-columns:1fr; }
.template-recipe-midnight-izakaya .ingredient-list { columns:2; column-gap:36px; }
.template-recipe-midnight-izakaya .ingredient { break-inside:avoid; }
.template-recipe-vintage-bakery .recipe-layout { border:10px solid color-mix(in srgb,var(--accent) 20%,var(--paper)); padding-bottom:35px; }
.template-recipe-vintage-bakery .recipe-title-block { text-align:center; }
.template-recipe-vintage-bakery .recipe-title-block h1 { font-style:italic; margin-left:auto; margin-right:auto; }
.template-recipe-vintage-bakery .section-heading > span { border-radius:50%; }
.template-recipe-minimalist-geek .recipe-layout { font-family:var(--sans); }
.template-recipe-minimalist-geek .recipe-title-block h1 { font-family:var(--sans); font-size:43px; font-weight:500; }
.template-recipe-minimalist-geek .recipe-stats { border-color:var(--accent); }
.template-recipe-minimalist-geek .recipe-body { grid-template-columns:1fr; }
.template-recipe-minimalist-geek .ingredient-list { display:grid; grid-template-columns:1fr 1fr; gap:0 35px; }
.template-recipe-minimalist-geek .recipe-step { grid-template-columns:60px 1fr; border-left:1px solid var(--line); padding-left:15px; }

/* 成分表：六种不同信息架构 */
.nutrition-layout { min-height:580px; padding:34px; background:var(--paper); font-family:var(--sans); }
.nutrition-layout .cover-media { height:190px; margin:-34px -34px 28px; }
.nutrition-layout footer { margin-top:20px; color:var(--muted); font-size:8px; line-height:1.55; }
.nutrition-row { display:grid; grid-template-columns:minmax(0,1fr) 116px 95px; gap:10px; align-items:baseline; min-height:36px; padding:8px 0; border-top:1px solid var(--line); }
.nutrition-row > span { font-size:11px; font-weight:700; }
.nutrition-row strong { text-align:right; font-size:13px; font-variant-numeric:tabular-nums; }
.nutrition-row strong i { font-size:9px; font-style:normal; font-weight:600; }
.nutrition-row em { color:var(--muted); text-align:right; font-size:9px; font-style:normal; }
.nf-ingredients { margin:18px 0 0; color:var(--muted); font-size:9px; line-height:1.65; }

.fda-sheet { border:3px solid var(--ink); margin:16px; min-height:548px; padding:16px; }
.fda-sheet .cover-media { height:150px; margin:-16px -16px 15px; filter:grayscale(1); }
.fda-sheet h1 { margin:0; padding-bottom:5px; border-bottom:8px solid var(--ink); font-size:46px; line-height:1; font-weight:950; letter-spacing:-.06em; }
.nf-product { padding:8px 0; border-bottom:1px solid var(--ink); }
.nf-product strong,.nf-product span { display:block; }.nf-product strong { font-size:13px; }.nf-product span { margin-top:3px; font-size:8px; }
.nf-serving { display:flex; justify-content:space-between; padding:6px 0; border-bottom:4px solid var(--ink); font-size:10px; }
.nf-energy { padding:5px 0 8px; border-bottom:8px solid var(--ink); }
.nf-energy > span { font-size:8px; font-weight:800; }
.nf-energy > div { display:flex; align-items:flex-end; justify-content:space-between; }
.nf-energy b { font-size:24px; }.nf-energy strong { font-size:42px; line-height:1; }
.nf-reference { padding:5px 0; border-bottom:1px solid var(--ink); text-align:right; font-size:8px; font-weight:900; }
.fda-sheet .nutrition-row { border-color:var(--ink); grid-template-columns:minmax(0,1fr) 100px 100px; }
.fda-sheet .nutrition-row.first { border-top:4px solid var(--ink); }
.nf-footnote { margin:0; padding:8px 0; border-top:5px solid var(--ink); font-size:8px; line-height:1.5; }

.gb-sheet { border:2px solid var(--accent); padding:25px; }
.gb-sheet header { padding-bottom:14px; border-bottom:5px solid var(--accent); }
.gb-sheet header h1 { margin:0 0 7px; font-size:25px; letter-spacing:.14em; }
.gb-sheet header p { margin:0; font-weight:850; }.gb-sheet header span { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.gb-serving { padding:10px 0; font-size:10px; }
.gb-head,.gb-sheet .nutrition-row { display:grid; grid-template-columns:minmax(0,1fr) 125px 105px; gap:0; }
.gb-head { background:var(--accent); color:var(--paper); }
.gb-head b { padding:8px; border-right:1px solid color-mix(in srgb,var(--paper) 30%,transparent); font-size:9px; }
.gb-head b:nth-child(n+2) { text-align:right; }
.gb-sheet .nutrition-row { min-height:39px; padding:0; border:1px solid var(--line); border-top:0; }
.gb-sheet .nutrition-row > * { padding:9px 8px; border-right:1px solid var(--line); }.gb-sheet .nutrition-row > *:last-child { border-right:0; }

.traffic-sheet { padding:38px; }
.traffic-sheet header { display:flex; justify-content:space-between; align-items:flex-start; gap:22px; margin:15px 0 25px; }
.traffic-sheet header h1 { margin:0 0 6px; font:700 29px/1.2 var(--serif); }.traffic-sheet header p { color:var(--muted); font-size:9px; }
.traffic-score { width:58px; height:58px; display:grid; place-items:center; border-radius:50%; background:var(--accent); color:var(--paper); font-size:28px; }
.traffic-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.traffic-card { min-height:115px; padding:12px 8px; color:var(--paper); background:var(--accent); display:flex; flex-direction:column; text-align:center; }
.traffic-card.t1 { background:color-mix(in srgb,var(--accent) 70%,var(--muted)); }.traffic-card.t2 { background:color-mix(in srgb,var(--accent) 55%,#a18b68); }.traffic-card.t3 { background:color-mix(in srgb,var(--accent) 45%,#9a6d62); }
.traffic-card small { min-height:28px; font-size:8px; }.traffic-card strong { margin-top:auto; font-size:24px; }.traffic-card span,.traffic-card em { font-size:8px; font-style:normal; }
.traffic-sheet h2 { margin:26px 0 9px; font-size:12px; letter-spacing:.1em; }
.traffic-note { display:grid; grid-template-columns:70px 1fr; margin-top:18px; padding:12px; background:color-mix(in srgb,var(--accent) 10%,var(--paper)); font-size:9px; line-height:1.6; }

.fitness-sheet { padding:40px; }
.fitness-sheet header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:14px 0 25px; }
.fitness-sheet header h1 { margin:0 0 6px; max-width:380px; font-size:27px; }.fitness-sheet header p { color:var(--muted); font-size:9px; }
.energy-orb { width:96px; height:96px; flex:0 0 auto; display:grid; place-content:center; border:7px solid var(--accent); border-radius:50%; text-align:center; }
.energy-orb strong { font-size:28px; }.energy-orb span { color:var(--muted); font-size:8px; }
.macro-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.macro-card { padding:15px; border:1px solid var(--line); }
.macro-card small,.macro-card span { display:block; color:var(--muted); font-size:8px; }.macro-card strong { display:block; margin:9px 0 4px; font-size:27px; }.macro-card strong i { font-size:9px; font-style:normal; }
.fitness-sheet h2 { margin:25px 0 7px; color:var(--accent); font-size:11px; letter-spacing:.14em; }
.fitness-sheet .nutrition-row { grid-template-columns:minmax(0,1fr) 95px 100px; }

.organic-sheet { border:1px solid var(--line); margin:18px; min-height:544px; padding:38px; }
.organic-badge { display:inline-block; padding:6px 10px; border:1px solid var(--accent); border-radius:20px; color:var(--accent); font-size:8px; font-weight:900; letter-spacing:.14em; }
.organic-sheet header { margin:22px 0; }.organic-sheet header h1 { margin:0 0 7px; font:650 31px/1.25 var(--serif); }.organic-sheet header p { color:var(--muted); font-size:9px; }
.organic-serving { display:grid; grid-template-columns:80px 1fr auto; align-items:center; padding:13px 15px; background:color-mix(in srgb,var(--accent) 12%,var(--paper)); font-size:10px; }
.organic-serving strong { color:var(--accent); font-size:17px; }
.organic-sheet h2 { margin:25px 0 8px; font:700 15px/1.2 var(--serif); }
.organic-sheet .nutrition-row { grid-template-columns:minmax(0,1fr) 100px 100px; }
.organic-sheet section { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }.organic-sheet section b { color:var(--accent); font-size:9px; }.organic-sheet section p { margin:6px 0 0; color:var(--muted); font-size:9px; line-height:1.65; }

.obsidian-sheet { padding:42px; }
.obsidian-sheet header { margin:16px 0 22px; padding-bottom:18px; border-bottom:1px solid var(--accent); }.obsidian-sheet header h1 { margin:0 0 7px; font-size:28px; font-weight:500; }.obsidian-sheet header p,.obsidian-sheet header span { display:block; color:var(--muted); font-size:9px; line-height:1.5; }
.obsidian-hero { display:grid; grid-template-columns:1.2fr 50px 1fr 1fr; align-items:end; gap:12px; padding:23px 0; border-bottom:1px solid var(--line); }
.obsidian-hero > strong { color:var(--accent); font-size:58px; line-height:.85; }.obsidian-hero > span { color:var(--muted); font-size:10px; }.obsidian-hero > div { border-left:1px solid var(--line); padding-left:12px; }.obsidian-hero b,.obsidian-hero small { display:block; }.obsidian-hero b { font-size:18px; }.obsidian-hero small { margin-top:5px; color:var(--muted); font-size:7px; }
.obsidian-sheet h2 { margin:27px 0 9px; color:var(--accent); font-size:10px; letter-spacing:.18em; }
.obsidian-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.obsidian-grid > div { min-height:75px; padding:12px; border:1px solid var(--line); }.obsidian-grid span,.obsidian-grid strong,.obsidian-grid em { display:block; }.obsidian-grid span { color:var(--muted); font-size:8px; }.obsidian-grid strong { margin:8px 0 3px; font-size:15px; }.obsidian-grid em { color:var(--accent); font-size:8px; font-style:normal; }
.obsidian-sheet footer { display:flex; justify-content:space-between; border-top:1px solid var(--accent); padding-top:12px; letter-spacing:.12em; }

.mobile-resizer,.mobile-main-tabs { display:none; }
.toast { position:fixed; z-index:100; left:50%; bottom:24px; transform:translate(-50%,16px); opacity:0; pointer-events:none; background:#252b29; color:#fff; padding:10px 15px; font-size:11px; transition:.18s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }
dialog { width:min(460px,calc(100vw - 30px)); border:1px solid var(--ui-line-strong); padding:0; box-shadow:0 20px 65px rgba(0,0,0,.2); }
dialog::backdrop { background:rgba(34,36,33,.4); }
dialog form { position:relative; padding:28px; }
dialog h2 { margin:6px 0 16px; }
dialog ol { padding-left:20px; color:#5f625d; font-size:12px; line-height:1.8; }
.dialog-close { position:absolute; top:10px; right:10px; width:31px; height:31px; border:1px solid var(--ui-line); background:white; cursor:pointer; font-size:19px; }
.cover-crop-dialog { width:min(760px,calc(100vw - 28px)); max-height:calc(100dvh - 28px); background:var(--ui-card); }
.crop-dialog-body { padding:22px; }
.crop-dialog-head { position:relative; display:flex; justify-content:space-between; gap:18px; margin-bottom:15px; padding-right:40px; }
.crop-dialog-head h2 { margin:0; font-size:20px; }
.crop-dialog-head p { margin:5px 0 0; color:var(--ui-muted); font-size:12px; }
.crop-dialog-head .crop-close { top:0; right:0; }
.cover-crop-stage { position:relative; width:100%; overflow:hidden; border:1px solid var(--ui-line-strong); background:#1e2421; cursor:grab; touch-action:none; user-select:none; }
.cover-crop-stage::after { content:""; position:absolute; inset:9px; border:1px solid rgba(255,255,255,.76); box-shadow:0 0 0 9px rgba(15,18,16,.28); pointer-events:none; }
.cover-crop-stage.dragging { cursor:grabbing; }
.cover-crop-stage img { position:absolute; left:50%; top:50%; max-width:none; display:block; pointer-events:none; will-change:transform; }
.crop-zoom-field { margin:15px 0 0; }
.crop-help { margin:9px 0 15px; color:var(--ui-muted); font-size:12px; }
.crop-dialog-actions { display:flex; justify-content:flex-end; gap:8px; }
.crop-dialog-actions button { min-width:112px; }
.fitness-energy strong i,.obsidian-energy strong i { font-style:normal; font-weight:700; }

@media (max-width:1250px) {
  .workspace { grid-template-columns:310px minmax(390px,1fr) 325px; }
  .top-button { padding:0 8px; font-size:11px; }
  .project-name { max-width:190px; }
}
@media (max-width:1040px) {
  .brand > span:last-child { display:none; }
  .top-actions .top-button:nth-of-type(1),.top-actions .top-button:nth-of-type(2) { display:none; }
  .workspace { grid-template-columns:290px minmax(370px,1fr) 300px; }
}
@media (max-width:900px) {
  body { height:100dvh; }
  .topbar { height:54px; padding:7px 9px; gap:7px; }
  .project-name { display:none; }
  .top-actions { margin-left:auto; }
  .top-actions .top-button { display:none; }
  .top-actions #tutorial,.top-actions #save-project,.top-actions #export-image-top { display:block; }
  .workspace { --mobile-preview-height:42%; height:calc(100dvh - 54px); grid-template-columns:1fr; grid-template-rows:var(--mobile-preview-height) 18px 45px minmax(0,1fr); grid-template-areas:"preview" "resizer" "tabs" "panel"; }
  .preview-panel { grid-area:preview; }
  .preview-head { min-height:45px; padding:6px 10px; }
  .template-strip { grid-template-columns:repeat(6,118px); padding:6px; }
  .template-chip { height:48px; }
  .template-swatch { height:33px; }
  .preview-viewport { overflow-x:hidden; overflow-y:auto; padding:16px 15px 22px; }
  .preview-actions #fit-canvas { display:none; }
  .editor-panel { grid-area:panel; border:0; min-height:0; }
  body[data-mobile-panel="content"] .style-panel,body[data-mobile-panel="style"] .content-panel { display:none; }
  .content-panel > .panel-heading,.style-panel > .panel-heading { display:none; }
  .mobile-resizer { grid-area:resizer; display:block; position:relative; cursor:ns-resize; background:#d5d2cb; border-top:1px solid #c2bfb7; border-bottom:1px solid #c2bfb7; touch-action:none; }
  .mobile-resizer::after { content:""; position:absolute; width:42px; height:3px; border-radius:3px; background:#85857f; left:50%; top:50%; transform:translate(-50%,-50%); }
  .mobile-main-tabs { grid-area:tabs; display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid var(--ui-line); background:#f7f6f3; z-index:14; }
  .mobile-main-tabs button { border:0; border-right:1px solid var(--ui-line); background:transparent; font-size:12px; font-weight:850; }
  .mobile-main-tabs button:last-child { border-right:0; }
  .mobile-main-tabs button.active { background:var(--ui-accent-soft); box-shadow:inset 0 -3px var(--ui-accent); }
  .sticker-handle { width:20px; height:20px; }
  .sticker-resize { right:-18px; bottom:-18px; }
  .sticker-rotate { top:-42px; }
  .sticker-rotate::after { top:18px; height:18px; }
  .sticker-row-actions button { width:32px; height:32px; }
}
.ref-recipe-mark { margin-top:16px; color:var(--muted); text-align:right; font-size:8px; font-weight:800; letter-spacing:.14em; }
.midnight-recipe footer b,.bakery-recipe footer b { display:block; margin-top:6px; color:var(--muted); font-size:8px; letter-spacing:.12em; }

/* Recipe reference fidelity pass: preserve the six source layouts instead of a shared card skeleton. */
.ref-recipe { max-width:768px; margin:0 auto; padding:56px; border:1px solid var(--line); box-shadow:0 20px 55px color-mix(in srgb,var(--ink) 16%,transparent); }
.ref-recipe .ref-cover { height:270px; margin:0 0 32px; border:1px solid var(--line); border-radius:2px; }
.ref-ingredient-group { margin-bottom:22px; }
.ref-ingredient-group:last-child { margin-bottom:0; }
.ref-ingredient-group > h3 { margin:0 0 8px; color:var(--accent); font:800 9px/1.3 var(--sans); letter-spacing:.08em; text-transform:uppercase; }
.ref-step aside { margin-top:8px; padding:8px 9px; border-left:2px solid var(--accent); border-radius:3px; background:color-mix(in srgb,var(--accent) 8%,var(--paper)); color:var(--muted); font:500 8px/1.55 var(--sans); }
.ref-step aside strong { color:var(--accent); }

.editorial-recipe { border-radius:2px; background:var(--paper); }
.editorial-recipe .editorial-top { margin-bottom:32px; padding-bottom:12px; border-bottom:2px solid var(--ink); font-size:8px; }
.editorial-recipe > header { max-width:650px; margin:0 auto 40px; }
.editorial-recipe > header > h1 { font-size:42px; font-weight:900; line-height:1.15; }
.editorial-recipe .ref-subtitle { margin-top:8px!important; font-size:15px; }
.editorial-recipe .ref-description { margin-top:16px!important; font-size:11px; line-height:1.75; }
.editorial-recipe .ref-recipe-meta { display:flex; flex-wrap:wrap; justify-content:center; gap:20px; margin-top:22px; padding:13px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.editorial-recipe .ref-recipe-meta span { padding:0; border:0; font-size:9px; }
.editorial-recipe .ref-recipe-meta b { display:inline; margin-right:4px; color:var(--muted); }
.editorial-recipe > main { grid-template-columns:4fr 8fr; gap:32px; margin-top:0; margin-bottom:38px; }
.editorial-recipe .ref-recipe-side { padding:23px; border:1px solid var(--line); border-radius:8px; background:color-mix(in srgb,var(--line) 14%,var(--paper)); }
.editorial-recipe main h2 { margin-bottom:16px; padding-bottom:8px; font-size:13px; text-transform:uppercase; }
.editorial-recipe .ref-recipe-main > h2 { border-color:var(--ink); }
.editorial-recipe .ref-ingredient { padding:6px 0; font-size:9px; }
.editorial-recipe .ref-step { grid-template-columns:32px 1fr; gap:15px; margin-bottom:20px; padding:0; border:0; }
.editorial-recipe .ref-step > b { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:var(--paper); font:800 10px/1 var(--sans); }
.editorial-recipe .ref-step h3 { font:800 12px/1.35 var(--serif); }
.editorial-recipe .ref-step p { margin-top:7px; font-size:10px; }
.editorial-recipe .ref-step header small { padding:3px 6px; border-radius:3px; background:color-mix(in srgb,var(--line) 30%,var(--paper)); }
.editorial-recipe .ref-chef-note { margin:0; padding:22px; border:0; border-top:2px solid var(--ink); border-radius:7px; background:color-mix(in srgb,var(--line) 14%,var(--paper)); }
.editorial-recipe .ref-chef-note p { margin:0; color:var(--ink); font:500 10px/1.65 var(--sans); }
.editorial-recipe .ref-chef-note p b { color:var(--accent); }
.ref-pairings { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:11px; color:var(--muted); font:500 8px/1.4 var(--sans); }
.ref-pairings strong { color:var(--ink); }.ref-pairings span { padding:4px 7px; border:1px solid var(--line); border-radius:4px; background:var(--paper); }

.journal-recipe { max-width:768px; padding:48px; border:4px solid var(--line); border-radius:16px; font-family:"Comic Sans MS","Segoe Print",cursive; }
.journal-recipe .ref-cover { height:250px; margin:0 0 28px; border-radius:10px; }
.journal-recipe > header { margin-bottom:30px; padding-top:2px; }
.journal-recipe > header > small { font-family:var(--sans); }
.journal-recipe > header > h1 { margin-top:8px; font-size:40px; }
.journal-recipe .ref-description { max-width:590px; margin:12px auto 0!important; padding:11px; font-family:var(--sans); }
.journal-recipe .ref-recipe-meta { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:14px; border:0; }
.journal-recipe .ref-recipe-meta span { padding:5px 10px; border:0; border-radius:14px; background:color-mix(in srgb,var(--accent) 12%,var(--paper)); color:var(--accent); font:700 8px/1.2 var(--sans); }
.journal-recipe .ref-recipe-meta b { display:inline; margin-right:3px; color:var(--accent); }
.journal-recipe > main { grid-template-columns:5fr 7fr; gap:24px; margin-top:0; margin-bottom:30px; }
.journal-recipe .ref-recipe-side { padding:20px; border:2px dashed var(--accent); border-radius:12px; background:color-mix(in srgb,var(--paper) 76%,white); }
.journal-recipe main h2 { margin-bottom:14px; font-family:var(--serif); font-size:15px; }
.journal-recipe .ref-ingredient-group > h3 { color:var(--accent); }
.journal-recipe .ref-ingredient { padding:5px 0; border:0; font-family:var(--sans); font-size:9px; }
.journal-recipe .ref-step { display:block; margin-bottom:11px; padding:13px; border:1px solid var(--line); border-radius:8px; background:color-mix(in srgb,var(--paper) 72%,white); font-family:var(--sans); }
.journal-recipe .ref-step > b { display:inline-block; margin-bottom:6px; color:var(--accent); font-size:9px; }
.journal-recipe .ref-step header { display:flex; align-items:center; }
.journal-recipe .ref-step h3 { font-size:10px; }.journal-recipe .ref-step p { font-size:9px; }
.journal-note { margin-top:0; padding-top:15px; font-family:"Comic Sans MS","Segoe Print",cursive; font-size:16px; }

.pro-recipe { max-width:768px; padding:48px; border:2px solid var(--accent); border-radius:2px; }
.pro-recipe .pro-top { margin-bottom:24px; padding-bottom:12px; }
.pro-recipe > header { margin-bottom:24px; padding:20px; grid-template-columns:minmax(0,1fr) auto; }
.pro-recipe > header > strong { min-width:118px; padding:9px 10px; display:flex; flex-direction:column; justify-content:center; }
.pro-recipe > header > strong small { color:var(--muted); font-size:7px; }.pro-recipe > header > strong b { margin-top:4px; font-size:11px; }
.pro-recipe .ref-recipe-meta { grid-template-columns:repeat(4,1fr); margin-top:14px; padding-top:14px; border-bottom:0; }
.pro-recipe > main { grid-template-columns:5fr 7fr; gap:24px; margin-top:0; }
.pro-recipe main h2 { font-size:9px; }.pro-recipe .ref-ingredient-group > h3 { color:color-mix(in srgb,var(--accent) 65%,var(--muted)); }
.pro-recipe .ref-ingredient { margin-bottom:4px; padding:5px 7px; border:1px solid var(--line); border-radius:3px; }
.pro-recipe .ref-step { display:block; margin-bottom:9px; padding:11px; border:1px solid var(--line); border-radius:6px; }
.pro-recipe .ref-step > b { display:inline-block; margin-bottom:5px; color:var(--accent); }.pro-recipe .ref-step h3 { display:inline; color:var(--accent); font-size:9px; }
.pro-recipe footer { align-items:flex-start; }

.midnight-recipe { max-width:768px; padding:48px; border-radius:12px; }
.midnight-recipe > header { margin-bottom:30px; padding-bottom:24px; }
.midnight-recipe > header > h1 { font-size:40px; }
.midnight-recipe .ref-description { max-width:590px; margin:15px auto 0!important; padding:13px; }
.midnight-recipe .ref-recipe-meta { display:flex; justify-content:center; gap:22px; margin-top:14px; border:0; }
.midnight-recipe .ref-recipe-meta span { padding:0; border:0; color:var(--accent); }.midnight-recipe .ref-recipe-meta b { display:inline; margin-right:4px; color:var(--accent); }
.midnight-recipe > main { grid-template-columns:5fr 7fr; gap:32px; margin-top:0; }
.midnight-recipe .ref-recipe-side { padding:20px; }.midnight-recipe .ref-ingredient-group > h3 { color:var(--accent); }
.midnight-recipe .ref-step { display:block; margin-bottom:10px; padding:12px; border-radius:6px; }.midnight-recipe .ref-step > b { display:inline-block; margin-bottom:5px; color:var(--accent); }
.midnight-recipe footer { font-family:var(--sans); }

.bakery-recipe { max-width:768px; padding:48px; border:4px solid var(--accent); border-radius:16px; }
.bakery-recipe > header { margin-bottom:30px; padding-bottom:24px; }
.bakery-recipe > header > h1 { font-size:40px; }
.bakery-recipe .ref-recipe-meta { margin-top:14px; }
.bakery-recipe > main { grid-template-columns:5fr 7fr; gap:32px; margin-top:0; }
.bakery-recipe .ref-recipe-side { padding:20px; }.bakery-recipe .ref-ingredient-group > h3 { color:var(--accent); }
.bakery-recipe .ref-step { display:block; margin-bottom:10px; padding:12px; border-radius:7px; }.bakery-recipe .ref-step > b { display:inline-block; margin-bottom:5px; color:var(--accent); }.bakery-recipe .ref-step h3 { display:inline; color:var(--ink); }

.geek-recipe { max-width:768px; padding:48px; border-radius:12px; }
.geek-recipe > header { margin-bottom:24px; padding:20px; grid-template-columns:minmax(0,1fr) auto; }
.geek-metrics { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:4px; padding-top:13px; border-top:1px solid var(--line); color:var(--muted); font-size:8px; }
.geek-metrics b { color:var(--accent); }
.geek-recipe > main { grid-template-columns:5fr 7fr; gap:24px; margin-top:0; }
.geek-recipe .ref-ingredient-group > h3 { color:var(--muted); }.geek-recipe .ref-ingredient { margin-bottom:4px; padding:5px 7px; border:1px solid var(--line); border-radius:3px; }
.geek-recipe .ref-step { display:block; margin-bottom:9px; padding:11px; border-radius:4px; }.geek-recipe .ref-step > b { display:inline-block; margin-bottom:5px; color:var(--accent); }.geek-recipe .ref-step h3 { display:inline; color:var(--accent); font-size:9px; }

@media (max-width:560px) {
  .top-actions #save-project { display:none; }
  .preview-meta span:first-child { display:none; }
  .field-row,.three-fields { grid-template-columns:1fr; gap:0; }
  .editor-scroll { padding:9px; }
  .editor-card { padding:11px; }
}
@media print {
  body { overflow:visible; background:white; }
  .topbar,.editor-panel,.preview-head,.template-strip,.mobile-main-tabs,.mobile-resizer { display:none!important; }
  .workspace,.preview-panel,.preview-viewport,.preview-stage { display:block; height:auto; padding:0; margin:0; background:white; overflow:visible; }
  .culinary-canvas { position:relative!important; transform:none!important; box-shadow:none; margin:0; }
}

/* OC 工具台结构校准：模板固定在右栏，中央只负责预览 */
:root { --ui-accent:#6b596f; --ui-accent-soft:#e8e1e9; --ui-bg:#eeebf0; --ui-panel:#f8f5f7; --ui-line:#d8d0da; }
body { background:var(--ui-bg); }
.topbar { height:78px; padding:0 16px; gap:16px; background:rgba(255,253,249,.96); box-shadow:0 3px 14px rgba(52,43,56,.04); }
.brand { min-width:250px; gap:10px; }
.brand-mark { width:46px; height:50px; border-radius:7px 7px 3px 3px; background:var(--ui-accent); box-shadow:6px 6px 0 #d8cedd; font:800 13px/1 Georgia,serif; }
.project-name { max-width:none; margin-left:0; }
.project-name input { width:min(31vw,370px); height:44px; padding:0 12px; border:1px solid var(--ui-line); border-radius:6px; background:#fff; }
.top-button,.primary-button,.secondary-button,.icon-button { border-radius:5px; }
.top-button,.primary-button { min-height:39px; font-size:10px; }
.workspace { height:calc(100dvh - 78px); grid-template-columns:335px minmax(420px,1fr) 310px; overflow:hidden; }
.panel-heading { min-height:80px; padding:15px 17px; justify-content:flex-start; align-items:flex-start; gap:13px; background:rgba(255,255,255,.72); }
.panel-heading > span { margin-top:4px; color:var(--ui-accent); font:800 10px/1 monospace; }
.panel-heading h1,.panel-heading h2 { margin:0; font:700 19px/1.2 Georgia,"Noto Serif SC",serif; }
.panel-heading p { margin:6px 0 0; color:var(--ui-muted); font-size:10px; }
.editor-card { border-radius:7px; box-shadow:0 4px 14px rgba(56,42,58,.035); }
.card-title h3 { margin:0; font:700 16px/1.25 Georgia,"Noto Serif SC",serif; }
.card-title p { margin:5px 0 0; color:var(--ui-muted); font-size:9px; line-height:1.45; }
.preview-toolbar { min-height:44px; padding:5px 9px; display:flex; align-items:center; justify-content:space-between; gap:8px; border-bottom:1px solid #ccc4cf; background:rgba(255,255,255,.9); }
.preview-toolbar > div { display:flex; align-items:center; gap:7px; min-width:0; }
.preview-toolbar strong { font-size:10px; }
.preview-toolbar #active-template-name { color:var(--ui-muted); font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.preview-actions { flex:0 0 auto; }
.preview-actions > span { color:var(--ui-muted); font-size:9px; }
.preview-actions button { min-height:30px; padding-inline:8px; border:1px solid var(--ui-line); border-radius:4px; background:#fff; font-size:9px; font-weight:750; cursor:pointer; }
.preview-viewport { padding:28px; }
.theme-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.theme-button { min-width:0; min-height:72px; padding:8px; display:grid; grid-template-columns:29px minmax(0,1fr); gap:7px; align-items:center; border:1px solid var(--ui-line); border-radius:5px; background:#fff; text-align:left; cursor:pointer; }
.theme-button:hover { border-color:#a79baa; }
.theme-button.active { border-color:var(--ui-accent); box-shadow:inset 0 0 0 1px var(--ui-accent); }
.theme-button strong,.theme-button small { display:block; overflow:hidden; text-overflow:ellipsis; }
.theme-button strong { font-size:9px; line-height:1.35; }
.theme-button small { margin-top:4px; color:var(--ui-muted); font-size:8px; white-space:nowrap; }
.theme-swatch { width:29px; height:47px; padding:5px 4px; display:flex; flex-direction:column; gap:3px; border:1px solid rgba(0,0,0,.13); border-radius:2px; background:var(--swatch-a); }
.theme-swatch i { display:block; height:2px; background:var(--swatch-b); }
.theme-swatch i:nth-child(1) { width:70%; height:7px; }
.theme-swatch i:nth-child(2) { width:100%; background:var(--swatch-c); }
.theme-swatch i:nth-child(3) { width:82%; }
body.preview-focus .workspace { grid-template-columns:1fr; }
body.preview-focus .content-panel,body.preview-focus .style-panel,body.preview-focus .mobile-resizer,body.preview-focus .mobile-main-tabs { display:none!important; }

/* Reference-faithful menu templates */
.ref-menu { position:relative; width:100%; min-height:760px; padding:48px; overflow:hidden; background:var(--paper); color:var(--ink); font-family:var(--sans); }
.ref-menu h1,.ref-menu h2,.ref-menu p { margin:0; }
.ref-menu header { position:relative; z-index:2; }
.ref-menu main { position:relative; z-index:2; }
.ref-menu-item { margin-bottom:16px; }
.ref-menu-item-main { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:baseline; gap:8px; }
.ref-menu-item-main.has-leader { grid-template-columns:minmax(0,max-content) minmax(24px,1fr) max-content; }
.ref-menu-item-main > i { width:100%; min-width:24px; border-bottom:1px dotted var(--line); }
.ref-menu-name { min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.ref-menu-name strong { min-width:0; font-size:15px; line-height:1.35; word-break:keep-all; overflow-wrap:anywhere; }
.ref-menu-name mark { flex:0 0 auto; padding:2px 5px; border:1px solid var(--accent); border-radius:3px; background:color-mix(in srgb,var(--accent) 13%,var(--paper)); color:var(--accent); font:700 8px/1.2 var(--sans); white-space:nowrap; }
.ref-menu-item-main > b { justify-self:end; color:var(--accent); font-size:15px; white-space:nowrap; }
.ref-menu-item > small { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.ref-menu-item > p { margin-top:5px; color:var(--muted); font-size:10px; line-height:1.65; }
.ref-menu-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }.ref-menu-tags span { padding:2px 5px; background:color-mix(in srgb,var(--line) 35%,transparent); color:var(--muted); font-size:8px; white-space:nowrap; }
.ref-menu-footer { position:relative; z-index:2; margin-top:34px; padding-top:15px; border-top:1px solid var(--line); color:var(--muted); text-align:center; font-size:9px; line-height:1.65; }
.ref-menu-footer p { margin-bottom:3px; }
.ref-menu-footer b { display:block; margin-top:7px; color:var(--accent); font-size:8px; letter-spacing:.14em; }
.ref-menu-section-label { position:relative; z-index:2; margin:0 0 18px; color:var(--accent); text-align:center; font:800 8px/1 var(--sans); letter-spacing:.2em; text-transform:uppercase; }

.paris-menu { margin:16px; width:calc(100% - 32px); min-height:728px; padding:55px 50px 42px; color:var(--ink); font-family:var(--serif); }
.ornate-frame { position:absolute; pointer-events:none; }.paris-menu .frame-one { inset:16px; border:1px solid var(--accent); }.paris-menu .frame-two { inset:21px; border:1px dashed color-mix(in srgb,var(--accent) 45%,transparent); }
.paris-menu .corner { position:absolute; z-index:3; width:17px; height:17px; border-color:var(--accent); }.paris-menu .c1 { top:16px; left:16px; border-top:2px solid; border-left:2px solid; }.paris-menu .c2 { top:16px; right:16px; border-top:2px solid; border-right:2px solid; }.paris-menu .c3 { bottom:16px; left:16px; border-bottom:2px solid; border-left:2px solid; }.paris-menu .c4 { right:16px; bottom:16px; border-right:2px solid; border-bottom:2px solid; }
.paris-menu > header { text-align:center; margin-bottom:38px; }.paris-kicker { display:flex; align-items:center; justify-content:center; gap:8px; color:var(--accent); }.paris-kicker span { width:32px; height:1px; background:var(--accent); }.paris-kicker em { font:700 9px/1 var(--sans); letter-spacing:.24em; font-style:normal; }.paris-menu h1 { margin-top:12px; color:var(--accent); font-size:42px; line-height:1.12; letter-spacing:.07em; }.paris-menu header p { margin-top:7px; color:var(--muted); font-style:italic; letter-spacing:.16em; font-size:11px; }.paris-divider { display:flex; align-items:center; gap:12px; margin-top:20px; }.paris-divider span { flex:1; height:1px; background:color-mix(in srgb,var(--accent) 50%,transparent); }.paris-divider i { width:8px; height:8px; transform:rotate(45deg); border:1px solid var(--accent); }
.paris-category { margin-bottom:32px; }.paris-category .ref-category-title { margin-bottom:17px; text-align:center; }.paris-category h2 { color:var(--accent); font-size:20px; letter-spacing:.16em; text-transform:uppercase; }.paris-category small { display:block; margin-top:3px; color:var(--muted); font:700 8px/1 var(--sans); letter-spacing:.18em; text-transform:uppercase; }.paris-category .ref-category-title i { display:block; width:60px; height:1px; margin:9px auto 0; background:var(--accent); }

.wabi-menu { margin:12px; width:calc(100% - 24px); min-height:736px; padding:54px 50px 40px; font-family:var(--serif); }.wabi-frame { position:absolute; inset:12px; border:1px solid var(--line); }.wabi-seal { position:absolute; z-index:3; top:24px; right:24px; width:43px; height:43px; display:grid; place-items:center; border:2px solid var(--accent); color:var(--accent); font-size:10px; font-weight:800; transform:rotate(3deg); }
.wabi-menu > header { padding-bottom:22px; margin-bottom:33px; border-bottom:1px solid var(--line); text-align:center; }.wabi-menu header small { color:var(--muted); font:700 9px/1 var(--sans); letter-spacing:.32em; text-transform:uppercase; }.wabi-menu h1 { margin-top:8px; font-size:36px; letter-spacing:.15em; }.wabi-menu header p { margin-top:7px; color:var(--muted); font:500 10px/1.5 var(--sans); letter-spacing:.15em; }
.wabi-category { margin-bottom:28px; }.wabi-category .ref-category-title { display:flex; align-items:center; gap:9px; margin-bottom:14px; }.wabi-category .ref-category-title > i { width:5px; height:18px; background:var(--accent); }.wabi-category h2 { font-size:18px; letter-spacing:.12em; }.wabi-category small { color:var(--muted); font-size:9px; }.wabi-category .ref-category-title > span { flex:1; height:1px; background:var(--line); }.wabi-menu .ref-menu-item { padding:0 0 11px 15px; border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent); }

.italian-menu { margin:18px; width:calc(100% - 36px); min-height:724px; padding:11px; border:4px solid var(--ink); font-family:var(--mono); }.italian-inner { min-height:694px; padding:38px 36px 28px; border:1px solid var(--ink); background:color-mix(in srgb,var(--paper) 90%,white); }.italian-menu header { padding-bottom:18px; margin-bottom:28px; border-bottom:2px solid var(--ink); text-align:center; }.italian-menu header small { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.15em; }.italian-menu h1 { margin-top:7px; font:800 40px/1.15 Georgia,var(--serif); }.italian-menu header p { margin-top:5px; color:var(--muted); font:italic 10px/1.4 Georgia,var(--serif); }.italian-category { margin-bottom:28px; }.italian-category .ref-category-title { margin-bottom:16px; text-align:center; }.italian-category h2 { display:inline-block; padding:3px 22px; border-top:2px solid var(--ink); border-bottom:2px solid var(--ink); font:800 17px/1.2 Georgia,var(--serif); letter-spacing:.12em; text-transform:uppercase; }.italian-category small { display:block; margin-top:4px; color:var(--muted); font-style:italic; }

.nordic-menu { margin:14px; width:calc(100% - 28px); min-height:732px; padding:42px; border:1px solid var(--line); border-radius:13px; }.nordic-bar { height:8px; margin-bottom:30px; border-radius:4px 4px 0 0; background:var(--ink); }.nordic-menu > header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; padding-bottom:22px; margin-bottom:28px; border-bottom:2px solid var(--ink); }.nordic-menu header small { color:var(--muted); font:700 9px/1.3 monospace; letter-spacing:.12em; }.nordic-menu h1 { margin-top:5px; font-size:35px; letter-spacing:-.03em; }.nordic-menu header p { margin-top:4px; color:var(--muted); font-size:10px; }.nordic-menu address { max-width:170px; color:var(--muted); text-align:right; font:500 8px/1.5 monospace; }.nordic-category { margin-bottom:28px; }.nordic-category .ref-category-title { display:flex; align-items:center; justify-content:space-between; padding:7px 10px; margin-bottom:13px; border-radius:4px; background:color-mix(in srgb,var(--line) 25%,var(--paper)); }.nordic-category h2 { font-size:12px; letter-spacing:.1em; text-transform:uppercase; }.nordic-category small { color:var(--muted); font:500 9px/1 monospace; }.nordic-items { display:grid; grid-template-columns:1fr 1fr; gap:11px; }.nordic-menu .ref-menu-item { min-height:112px; padding:12px; margin:0; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:8px; }.nordic-menu .ref-menu-item-main { align-items:flex-start; }.nordic-menu .ref-menu-item-main > b { margin-left:auto; padding:3px 6px; border-radius:3px; background:color-mix(in srgb,var(--accent) 12%,var(--paper)); }.nordic-menu .ref-menu-tags { margin-top:auto; padding-top:8px; border-top:1px solid var(--line); }

.oriental-menu { margin:16px; width:calc(100% - 32px); min-height:728px; padding:50px 48px 38px; font-family:var(--serif); }.oriental-frame { position:absolute; pointer-events:none; }.oriental-menu .frame-one { inset:10px; border:2px solid var(--accent); }.oriental-menu .frame-two { inset:18px; border:1px dashed color-mix(in srgb,var(--accent) 42%,transparent); }.oriental-menu > header { margin-bottom:34px; text-align:center; }.oriental-menu header > small { display:inline-block; padding:4px 13px; border-bottom:2px solid var(--accent); color:var(--accent); font-size:9px; font-weight:800; letter-spacing:.3em; }.oriental-menu h1 { margin-top:10px; color:var(--accent); font-size:40px; font-weight:900; letter-spacing:.16em; }.oriental-menu header p { margin-top:7px; color:var(--muted); font:500 10px/1.5 var(--sans); letter-spacing:.13em; }.oriental-divider { display:flex; align-items:center; justify-content:center; gap:11px; margin-top:15px; color:var(--accent); font-size:9px; }.oriental-divider span { width:48px; height:1px; background:var(--accent); }.oriental-category { margin-bottom:30px; }.oriental-category .ref-category-title { margin-bottom:17px; text-align:center; }.oriental-category h2 { display:inline-block; padding:6px 20px; background:var(--accent); color:var(--paper); font-size:14px; letter-spacing:.13em; }.oriental-category small { display:block; margin-top:6px; color:var(--muted); font:500 9px/1 var(--sans); letter-spacing:.14em; }

.cyber-menu { margin:14px; width:calc(100% - 28px); min-height:732px; padding:42px; border:2px solid var(--accent); border-radius:16px; font-family:var(--mono); }.cyber-orb { position:absolute; width:210px; height:210px; border-radius:50%; background:color-mix(in srgb,var(--accent) 10%,transparent); filter:blur(45px); }.cyber-menu .orb-one { top:-65px; right:-45px; }.cyber-menu .orb-two { bottom:-70px; left:-50px; background:color-mix(in srgb,var(--muted) 12%,transparent); }.cyber-top { position:relative; z-index:2; display:flex; justify-content:space-between; gap:15px; padding-bottom:12px; margin-bottom:27px; border-bottom:1px solid var(--line); color:var(--accent); font-size:8px; letter-spacing:.12em; }.cyber-top b { color:var(--muted); }.cyber-menu > header { text-align:center; margin-bottom:28px; }.cyber-menu header small { display:inline-block; padding:4px 9px; border:1px solid var(--muted); border-radius:20px; color:var(--muted); font-size:8px; letter-spacing:.12em; }.cyber-menu h1 { margin-top:10px; color:var(--ink); font-size:var(--cyber-title-size,39px); font-weight:900; letter-spacing:.08em; }.cyber-menu header p { margin-top:5px; color:var(--accent); font-size:10px; letter-spacing:.12em; }.cyber-category { margin-bottom:25px; }.cyber-category .ref-category-title { display:grid; grid-template-columns:max-content max-content minmax(0,1fr); align-items:center; gap:8px; padding:8px 10px; margin-bottom:11px; border-left:4px solid var(--muted); background:color-mix(in srgb,var(--line) 22%,transparent); }.cyber-category .ref-category-title i { color:var(--muted); font-size:9px; }.cyber-category h2 { color:var(--ink); font-size:13px; letter-spacing:.08em; white-space:nowrap; }.cyber-category small { min-width:0; color:var(--muted); font-size:8px; overflow-wrap:anywhere; }.cyber-menu .ref-menu-item { padding:11px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 85%,var(--line)); }.cyber-menu .ref-menu-item-main > b { padding-left:8px; }

/* Reference-faithful recipe templates */
.ref-recipe { position:relative; width:100%; min-height:820px; padding:46px; overflow:hidden; background:var(--paper); color:var(--ink); font-family:var(--sans); }
.ref-recipe h1,.ref-recipe h2,.ref-recipe h3,.ref-recipe p { margin:0; }.ref-recipe .ref-cover { height:290px; margin:-46px -46px 32px; overflow:hidden; }.ref-recipe .ref-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.ref-recipe > header > h1,.ref-recipe > header > div > h1 { font:800 38px/1.18 var(--serif); letter-spacing:-.02em; }.ref-subtitle { margin-top:7px!important; color:var(--accent); font:italic 13px/1.5 var(--serif); }.ref-description { margin-top:13px!important; color:var(--muted); font-size:11px; line-height:1.75; }
.ref-recipe-meta { display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin-top:20px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }.ref-recipe-meta span { padding:10px; border-right:1px solid var(--line); font-size:9px; }.ref-recipe-meta span:last-child { border-right:0; }.ref-recipe-meta b { display:block; margin-bottom:3px; color:var(--muted); font-size:8px; }
.ref-recipe > main { display:grid; grid-template-columns:5fr 7fr; gap:26px; margin-top:28px; }.ref-recipe-side,.ref-recipe-main { min-width:0; }.ref-recipe main h2 { padding-bottom:8px; margin-bottom:13px; border-bottom:2px solid var(--accent); color:var(--ink); font-size:13px; letter-spacing:.06em; }.ref-ingredient { display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); font-size:10px; }.ref-ingredient span { min-width:0; }.ref-ingredient small { display:block; margin-top:2px; color:var(--muted); font-size:8px; }.ref-ingredient b { flex:0 0 auto; color:var(--accent); font:800 9px/1 monospace; }.ref-step { display:grid; grid-template-columns:53px 1fr; gap:10px; padding:10px; margin-bottom:9px; border:1px solid var(--line); }.ref-step > b { color:var(--accent); font:800 9px/1.3 monospace; }.ref-step header { display:flex; justify-content:space-between; gap:8px; }.ref-step h3 { font-size:11px; }.ref-step header small { color:var(--accent); font-size:8px; }.ref-step p { margin-top:5px; color:var(--muted); font-size:9px; line-height:1.65; }.ref-chef-note { margin-top:25px; padding:15px; border-left:3px solid var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--paper)); }.ref-chef-note b { color:var(--accent); font-size:8px; letter-spacing:.12em; }.ref-chef-note p { margin-top:5px; font:500 10px/1.65 var(--serif); }
.editorial-top { display:flex; justify-content:space-between; padding-bottom:10px; margin-bottom:28px; border-bottom:2px solid var(--ink); color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; }.editorial-top b { color:var(--accent); }.editorial-recipe > header { max-width:640px; margin:0 auto; text-align:center; }.editorial-recipe > header .ref-description { text-align:justify; }.editorial-recipe .ref-recipe-side { padding:18px; border:1px solid var(--line); background:color-mix(in srgb,var(--line) 15%,var(--paper)); }
.editorial-recipe .editorial-top { align-items:flex-start; line-height:1.4; }
.editorial-recipe .editorial-top > span { flex:0 0 auto; display:block; white-space:nowrap; }
.editorial-recipe .editorial-top > b { min-width:0; display:block; text-align:right; white-space:nowrap; }

.journal-recipe { margin:14px; width:calc(100% - 28px); min-height:792px; padding:43px; border:4px solid var(--line); border-radius:16px; }.journal-recipe .ref-cover { margin:-43px -43px 30px; height:260px; }.washi-tape { position:absolute; z-index:4; top:-8px; left:50%; width:125px; height:27px; transform:translateX(-50%) rotate(-2deg); border-top:1px dashed var(--accent); border-bottom:1px dashed var(--accent); background:color-mix(in srgb,var(--accent) 45%,var(--paper)); }.journal-recipe > header { text-align:center; }.journal-recipe > header > small { display:inline-block; padding:5px 12px; border-radius:18px; background:color-mix(in srgb,var(--accent) 13%,var(--paper)); color:var(--accent); font-size:9px; font-weight:800; }.journal-recipe > header > h1 { margin-top:8px; }.journal-recipe .ref-description { padding:10px; border:1px solid var(--line); border-radius:8px; background:color-mix(in srgb,var(--paper) 86%,white); }.journal-recipe .ref-recipe-side { padding:16px; border:2px dashed var(--accent); border-radius:10px; background:color-mix(in srgb,var(--paper) 72%,white); transform:rotate(-.5deg); }.journal-recipe .ref-step { border-radius:7px; background:color-mix(in srgb,var(--paper) 70%,white); }.journal-note { margin-top:22px; padding-top:14px; border-top:1px solid var(--line); color:var(--accent); text-align:center; font:italic 15px/1.5 var(--serif); }

.pro-recipe { margin:12px; width:calc(100% - 24px); min-height:796px; padding:40px; border:2px solid var(--accent); border-radius:3px; font-family:monospace; }.pro-top { display:flex; justify-content:space-between; gap:12px; padding-bottom:10px; margin-bottom:20px; border-bottom:2px solid var(--accent); color:var(--accent); font-size:9px; font-weight:800; }.pro-top b { color:var(--muted); }.pro-recipe > header { padding:18px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 78%,var(--line)); display:grid; grid-template-columns:1fr auto; gap:15px; }.pro-recipe > header > strong { padding:10px; border:1px solid var(--line); color:var(--muted); font-size:8px; text-align:right; }.pro-recipe > header > strong b { color:var(--accent); font-size:10px; }.pro-recipe .ref-recipe-meta { grid-column:1/-1; }.pro-recipe .ref-recipe-side { padding:14px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 82%,var(--line)); }.pro-recipe .ref-ingredient,.pro-recipe .ref-step { padding:7px; border:1px solid var(--line); background:color-mix(in srgb,var(--paper) 88%,transparent); }.pro-recipe footer,.geek-recipe footer { display:flex; justify-content:space-between; gap:20px; margin-top:18px; padding-top:11px; border-top:1px solid var(--line); color:var(--muted); font-size:8px; }.pro-recipe footer b,.geek-recipe footer b { color:var(--accent); }

.midnight-recipe { margin:14px; width:calc(100% - 28px); min-height:792px; padding:43px; border:1px solid var(--accent); border-radius:12px; font-family:var(--serif); }.midnight-orb { position:absolute; top:-80px; right:-60px; width:290px; height:290px; border-radius:50%; background:color-mix(in srgb,var(--accent) 10%,transparent); filter:blur(50px); }.midnight-recipe > header { position:relative; text-align:center; padding-bottom:22px; border-bottom:1px solid var(--line); }.midnight-recipe > header > small { color:var(--accent); font:700 9px/1 var(--sans); letter-spacing:.2em; }.midnight-recipe > header > h1 { margin-top:10px; color:var(--ink); letter-spacing:.09em; }.midnight-recipe .ref-description { padding:11px; border:1px solid var(--line); border-radius:6px; background:color-mix(in srgb,var(--paper) 80%,var(--line)); font-style:italic; }.midnight-recipe .ref-recipe-side { padding:15px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 82%,var(--line)); }.midnight-recipe .ref-step { border-color:color-mix(in srgb,var(--line) 65%,transparent); background:color-mix(in srgb,var(--paper) 86%,var(--line)); }.midnight-recipe footer { margin-top:20px; padding-top:13px; border-top:1px solid var(--line); color:var(--accent); text-align:center; font-size:9px; font-style:italic; }

.bakery-recipe { margin:14px; width:calc(100% - 28px); min-height:792px; padding:43px; border:4px solid var(--accent); border-radius:15px; font-family:var(--serif); }.bakery-recipe > header { padding-bottom:22px; border-bottom:4px double var(--accent); text-align:center; }.bakery-recipe > header > small { color:var(--accent); font:800 9px/1 var(--sans); letter-spacing:.15em; }.bakery-recipe > header > h1 { margin-top:8px; color:var(--accent); }.bakery-recipe .ref-recipe-meta { border:0; display:flex; justify-content:center; gap:8px; }.bakery-recipe .ref-recipe-meta span { padding:5px 9px; border:0; border-radius:15px; background:color-mix(in srgb,var(--accent) 12%,var(--paper)); color:var(--accent); }.bakery-recipe .ref-recipe-meta b { display:none; }.bakery-recipe .ref-recipe-side { padding:15px; border:2px solid color-mix(in srgb,var(--accent) 30%,var(--paper)); border-radius:10px; background:color-mix(in srgb,var(--paper) 86%,white); }.bakery-recipe .ref-step { border-color:color-mix(in srgb,var(--accent) 18%,var(--paper)); border-radius:7px; background:color-mix(in srgb,var(--paper) 82%,white); }.bakery-recipe footer { margin-top:20px; padding-top:13px; border-top:1px solid var(--line); color:var(--accent); text-align:center; font:700 9px/1.5 var(--sans); }

.geek-recipe { margin:12px; width:calc(100% - 24px); min-height:796px; padding:40px; border:1px solid var(--accent); border-radius:10px; font-family:monospace; }.geek-top { display:flex; justify-content:space-between; padding-bottom:11px; margin-bottom:20px; border-bottom:1px solid var(--line); color:var(--accent); font-size:9px; font-weight:800; }.geek-top i { display:flex; gap:6px; }.geek-top i b { width:9px; height:9px; border-radius:50%; background:var(--accent); }.geek-top i b:nth-child(2) { background:var(--muted); }.geek-top i b:nth-child(3) { background:var(--line); }.geek-recipe > header { padding:17px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 82%,var(--line)); display:grid; grid-template-columns:1fr auto; gap:12px; }.geek-recipe > header > strong { padding:6px 9px; border:1px solid var(--accent); border-radius:4px; color:var(--accent); font-size:9px; }.geek-recipe .ref-recipe-meta { grid-column:1/-1; }.geek-recipe .ref-recipe-side { padding:14px; border:1px solid var(--line); border-radius:7px; background:color-mix(in srgb,var(--paper) 88%,var(--line)); }.geek-recipe .ref-ingredient,.geek-recipe .ref-step { padding:7px; border:1px solid color-mix(in srgb,var(--line) 65%,transparent); border-radius:4px; background:color-mix(in srgb,var(--paper) 92%,var(--line)); }

/* Nutrition reference corrections */
.nutrition-layout { margin:14px auto; width:calc(100% - 28px); max-width:560px; border-radius:0; box-shadow:0 12px 36px color-mix(in srgb,var(--ink) 12%,transparent); }
.nutrition-layout .cover-media { margin:-34px -34px 25px; }
.fda-sheet { width:calc(100% - 32px); max-width:410px; border:2px solid var(--ink); box-shadow:0 12px 35px color-mix(in srgb,var(--ink) 15%,transparent); }
.gb-sheet { max-width:470px; border-radius:8px; }
.gb-sheet header h1 { margin:0 0 4px; font-size:20px; letter-spacing:0; }.gb-sheet header span { color:var(--muted); font-size:9px; }.gb-sheet > h2 { margin:14px 0 8px; padding:7px; border:1px solid var(--ink); background:color-mix(in srgb,var(--line) 20%,var(--paper)); text-align:center; font-size:13px; letter-spacing:.08em; }
.traffic-sheet { max-width:520px; border:1px solid var(--line); border-radius:16px; }.traffic-sheet > header { align-items:center; padding-bottom:16px; border-bottom:1px solid var(--line); }.traffic-sheet header small { display:inline-block; padding:3px 7px; border-radius:4px; background:color-mix(in srgb,var(--accent) 12%,var(--paper)); color:var(--accent); font-size:8px; font-weight:800; letter-spacing:.1em; }.traffic-sheet > h2 { margin:0 0 8px; color:var(--muted); font-size:9px; letter-spacing:.09em; text-transform:uppercase; }.nutri-score { padding:8px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--line) 18%,var(--paper)); text-align:center; }.nutri-score > b { display:block; margin-bottom:5px; color:var(--muted); font-size:8px; }.nutri-score > div { display:flex; gap:3px; }.nutri-score span { width:23px; height:26px; display:grid; place-items:center; border-radius:3px; background:color-mix(in srgb,var(--line) 55%,var(--paper)); color:var(--muted); font-size:10px; font-weight:850; }.nutri-score span.active { outline:2px solid var(--ink); outline-offset:1px; background:var(--accent); color:var(--paper); transform:scale(1.08); }.traffic-card strong i { font-size:8px; font-style:normal; }.traffic-details { margin-top:20px; padding:12px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--line) 13%,var(--paper)); }.traffic-details h2 { margin:0 0 6px; }
.fitness-sheet { max-width:520px; border:1px solid var(--accent); border-radius:16px; }.fitness-sheet > header { padding-bottom:15px; border-bottom:1px solid var(--line); }.fitness-brand { display:flex; align-items:center; gap:9px; }.fitness-brand > i { width:34px; height:34px; display:grid; place-items:center; border-radius:7px; background:var(--accent); color:var(--paper); font-size:14px; font-style:normal; font-weight:900; }.fitness-brand small { color:var(--accent); font-size:8px; font-weight:800; letter-spacing:.08em; }.fitness-brand h1 { margin-top:3px!important; font-size:18px!important; }.fitness-energy { text-align:right; }.fitness-energy strong,.fitness-energy span { display:block; }.fitness-energy strong { color:var(--accent); font-size:25px; }.fitness-energy span { color:var(--muted); font-size:8px; }.macro-ratio { margin:13px 0 20px; padding:10px; border:1px solid var(--line); border-radius:8px; background:color-mix(in srgb,var(--paper) 88%,var(--line)); }.macro-ratio header { display:flex; justify-content:space-between; margin:0 0 6px; color:var(--muted); font-size:8px; }.macro-ratio > div { height:8px; display:flex; overflow:hidden; border-radius:5px; }.macro-ratio i { display:block; background:var(--accent); }.macro-ratio .r1 { background:color-mix(in srgb,var(--accent) 65%,var(--muted)); }.macro-ratio .r2 { background:color-mix(in srgb,var(--accent) 35%,var(--muted)); }.fitness-details { margin-top:10px; }.fitness-details h2 { margin-bottom:6px; }
.organic-sheet { max-width:470px; border:1px solid var(--line); border-radius:22px; }.organic-sheet > header { text-align:center; }.organic-panel { margin-top:20px; padding:14px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--paper) 75%,white); }.organic-serving { padding:0 0 11px; border-bottom:1px solid var(--line); background:transparent; }.organic-serving span small,.organic-serving span b { display:block; }.organic-serving span small { color:var(--accent); font-size:8px; font-weight:800; text-transform:uppercase; }.organic-serving > strong i { font-size:8px; font-style:normal; }.organic-macros { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:11px; }.organic-macros > div { padding:9px 6px; border-radius:9px; background:color-mix(in srgb,var(--accent) 8%,var(--paper)); text-align:center; }.organic-macros small,.organic-macros strong { display:block; }.organic-macros small { min-height:22px; color:var(--accent); font-size:7px; font-weight:800; }.organic-macros strong { margin-top:3px; font-size:14px; }.organic-details { margin-top:20px; padding:12px; border:1px solid var(--line); border-radius:13px; background:color-mix(in srgb,var(--paper) 78%,white); }.organic-details h2 { margin:0 0 6px; }.organic-ingredients { margin-top:15px; padding-top:12px; border-top:1px solid var(--line); }.organic-ingredients b { color:var(--accent); font-size:9px; }.organic-ingredients p { margin-top:5px; color:var(--muted); font-size:9px; line-height:1.6; }
.obsidian-sheet { max-width:480px; border:1px solid var(--accent); border-radius:15px; }.obsidian-sheet > header { display:flex; justify-content:space-between; gap:18px; margin:0 0 20px; padding-bottom:15px; }.obsidian-sheet header small { color:var(--accent); font-size:8px; font-weight:800; letter-spacing:.14em; }.obsidian-energy { flex:0 0 auto; padding:7px 10px; border:1px solid var(--accent); border-radius:7px; text-align:right; }.obsidian-energy strong,.obsidian-energy span { display:block; }.obsidian-energy strong { color:var(--accent); font-size:22px; }.obsidian-energy span { color:var(--muted); font-size:7px; text-transform:uppercase; }.obsidian-primary { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:20px; }.obsidian-primary > div { padding:12px; display:grid; grid-template-columns:1fr auto; align-items:center; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--paper) 88%,var(--line)); }.obsidian-primary span { color:var(--muted); font-size:8px; }.obsidian-primary strong { color:var(--accent); font-size:17px; }.obsidian-primary em { grid-column:1/-1; margin-top:4px; color:var(--muted); font-size:8px; font-style:normal; }.obsidian-sheet > section > h2 { display:flex; justify-content:space-between; padding-bottom:6px; border-bottom:1px solid var(--line); }.obsidian-sheet > section > h2 span { color:var(--muted); font-size:7px; font-weight:500; }

@media (max-width:900px) {
  .topbar { height:54px; }
  .brand { min-width:0; }.brand-mark { width:34px; height:36px; box-shadow:4px 4px 0 #d8cedd; }
  .workspace { height:calc(100dvh - 54px); grid-template-columns:1fr; }
  .preview-toolbar #active-template-name,.preview-actions > span { display:none; }
  .ref-menu,.ref-recipe { transform-origin:top left; }
}

/* Final recipe authority: source template geometry wins over legacy generic rules above. */
body .ref-recipe { width:100%; max-width:768px; margin:0 auto; padding:56px; }
body .ref-recipe .ref-cover { height:270px; margin:0 0 32px; border-radius:2px; }
body .editorial-recipe > header { margin:0 auto 40px; }
body .editorial-recipe .ref-recipe-meta { display:flex; grid-template-columns:none; flex-wrap:wrap; justify-content:center; gap:20px; padding:13px 0; }
body .editorial-recipe .ref-recipe-meta span { padding:0; border:0; }
body .editorial-recipe .ref-recipe-meta b { display:inline; margin-right:4px; }
body .editorial-recipe > main { grid-template-columns:4fr 8fr; gap:32px; margin:0 0 38px; }
body .editorial-recipe .ref-recipe-side { padding:23px; border-radius:8px; }
body .editorial-recipe .ref-step { grid-template-columns:32px 1fr; gap:15px; margin-bottom:20px; padding:0; border:0; background:transparent; }
body .editorial-recipe .ref-step > b { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:var(--paper); }
body .editorial-recipe .ref-chef-note { margin:0; padding:22px; border:0; border-top:2px solid var(--ink); border-radius:7px; }

body .journal-recipe { width:100%; margin:0 auto; padding:48px; }
body .journal-recipe .ref-cover { height:250px; margin:0 0 28px; border-radius:10px; }
body .journal-recipe > header { margin-bottom:30px; }
body .journal-recipe .ref-recipe-meta { display:flex; grid-template-columns:none; flex-wrap:wrap; justify-content:center; gap:8px; border:0; }
body .journal-recipe .ref-recipe-meta span { padding:5px 10px; border:0; }
body .journal-recipe .ref-recipe-meta b { display:inline; margin-right:3px; }
body .journal-recipe > main { grid-template-columns:5fr 7fr; gap:24px; margin:0 0 30px; }
body .journal-recipe .ref-recipe-side { padding:20px; }
body .journal-recipe .ref-step { display:block; margin-bottom:11px; padding:13px; }
body .journal-note { margin-top:0; }

body .pro-recipe,body .midnight-recipe,body .bakery-recipe,body .geek-recipe { width:100%; margin:0 auto; padding:48px; }
body .pro-recipe > header,body .geek-recipe > header { margin-bottom:24px; padding:20px; }
body .pro-recipe > main,body .geek-recipe > main { grid-template-columns:5fr 7fr; gap:24px; margin-top:0; }
body .midnight-recipe > main,body .bakery-recipe > main { grid-template-columns:5fr 7fr; gap:32px; margin-top:0; }
body .pro-recipe .ref-step,body .midnight-recipe .ref-step,body .bakery-recipe .ref-step,body .geek-recipe .ref-step { display:block; margin-bottom:9px; padding:11px; }
body .pro-recipe .ref-step > b,body .midnight-recipe .ref-step > b,body .bakery-recipe .ref-step > b,body .geek-recipe .ref-step > b { display:inline-block; margin-bottom:5px; }
body .pro-recipe .ref-step h3,body .bakery-recipe .ref-step h3,body .geek-recipe .ref-step h3 { display:inline; }
body .midnight-recipe .ref-recipe-meta { display:flex; grid-template-columns:none; justify-content:center; gap:22px; border:0; }
body .midnight-recipe .ref-recipe-meta span { padding:0; border:0; }
body .midnight-recipe .ref-recipe-meta b { display:inline; margin-right:4px; }
body .bakery-recipe .ref-recipe-meta { display:flex; grid-template-columns:none; }

/* Readability floor requested for the editor and every exported template. */
body { font-size:12px; }
button,input,select,textarea,output { font-size:12px!important; }
.panel-heading p,.card-title small,.card-title p,.field > span,.field small,.upload-field small,.subsection-head small,.theme-button strong,.theme-button small,.preview-toolbar strong,.preview-toolbar span,.save-state,.empty-state,.array-head,.text-button,.mini-button { font-size:12px!important; }
.theme-button { min-height:84px; }.theme-button small { white-space:normal; line-height:1.25; }
.culinary-canvas .ref-menu :is(small,p,em,address,mark),.culinary-canvas .ref-menu-tags span,.culinary-canvas .ref-menu-footer span,.culinary-canvas .cyber-top span { font-size:12px!important; }
.culinary-canvas .ref-recipe small,.culinary-canvas .ref-recipe .ref-description,.culinary-canvas .ref-recipe-meta span,.culinary-canvas .ref-ingredient span,.culinary-canvas .ref-step p,.culinary-canvas .ref-step aside,.culinary-canvas .ref-chef-note p,.culinary-canvas .ref-pairings span,.culinary-canvas .editorial-top span,.culinary-canvas .pro-top span,.culinary-canvas .geek-top span,.culinary-canvas .geek-metrics span,.culinary-canvas .ref-recipe footer { font-size:12px!important; }
.culinary-canvas .nutrition-layout :is(small,p,em,footer,span),.culinary-canvas .nutrition-layout strong i { font-size:12px!important; }
.project-name span,.toast,.eyebrow { font-size:12px!important; }
.culinary-canvas .ref-ingredient-group > h3,.culinary-canvas .ref-step h3,.culinary-canvas .ref-recipe-meta b,.culinary-canvas .ref-ingredient b,.culinary-canvas .ref-step > b,.culinary-canvas .editorial-top b,.culinary-canvas .pro-top b,.culinary-canvas .cyber-top b,.culinary-canvas .ref-menu-footer b,.culinary-canvas .ref-chef-note b,.culinary-canvas .ref-pairings strong,.culinary-canvas .oriental-divider b,.culinary-canvas .gb-head b,.culinary-canvas .traffic-note b,.culinary-canvas .nutri-score > b,.culinary-canvas .macro-ratio header b,.culinary-canvas .organic-ingredients b,.culinary-canvas .nf-reference,.culinary-canvas .organic-badge,.culinary-canvas .ref-menu-section-label { font-size:12px!important; }
.culinary-canvas .ref-recipe main h2 { font-size:16px!important; }

/* Nutrition reference fidelity pass. */
body .nutrition-layout { min-height:580px; margin:0 auto; padding:32px; font-size:12px; line-height:1.45; box-shadow:0 18px 48px color-mix(in srgb,var(--ink) 15%,transparent); }
body .nutrition-layout .cover-media { height:190px; margin:0 0 24px; border:1px solid var(--line); border-radius:8px; }
body .nutrition-row { min-height:44px; padding:10px 0; grid-template-columns:minmax(0,1fr) 112px 94px; gap:12px; }
body .nutrition-row > span,body .nutrition-row strong,body .nutrition-row strong i,body .nutrition-row em,body .nf-ingredients,body .nutrition-layout footer { font-size:12px!important; }

body .fda-sheet { width:calc(100% - 24px); max-width:410px; margin:12px auto; padding:16px; border:2px solid var(--ink); border-radius:0; font-family:Arial,Helvetica,sans-serif; }
body .fda-sheet .cover-media { height:150px; margin:0 0 15px; border:1px solid var(--ink); border-radius:0; filter:grayscale(1); }
body .fda-sheet h1 { padding-bottom:5px; border-bottom:0; font-size:42px; line-height:.95; letter-spacing:-.055em; }
body .fda-sheet .nf-product { padding:7px 0; border-bottom:1px solid var(--ink); }
body .fda-sheet .nf-product strong { font-size:14px; }.fda-sheet .nf-product span { margin-top:4px; }
body .fda-sheet .nf-serving { padding:7px 0; border-bottom:8px solid var(--ink); font-size:13px; }
body .fda-sheet .nf-serving b { font-size:13px; }
body .fda-sheet .nf-energy { padding:6px 0 8px; border-bottom:4px solid var(--ink); }
body .fda-sheet .nf-energy > span { display:block; font-weight:800; }
body .fda-sheet .nf-energy > div { align-items:baseline; }
body .fda-sheet .nf-energy b { font-size:30px; font-weight:950; }
body .fda-sheet .nf-energy strong { font-size:42px; font-weight:950; }
body .fda-sheet .nf-energy strong i { font-style:normal; font-weight:800; }
body .fda-sheet .nf-reference { padding:6px 0; border-bottom:1px solid var(--ink); text-align:right; font-weight:900; }
body .fda-sheet .nutrition-row { min-height:39px; padding:7px 0; grid-template-columns:minmax(0,1fr) 86px 76px; gap:7px; border-color:var(--ink); }
body .fda-sheet .nutrition-row.first { border-top:0; }
body .fda-sheet .nf-footnote { padding:9px 0; border-top:8px solid var(--ink); line-height:1.45; }
body .fda-sheet .nf-ingredients { margin-top:12px; padding-top:10px; border-top:1px dashed var(--muted); }

body .gb-sheet { width:100%; max-width:448px; padding:24px; border:2px solid var(--ink); border-radius:8px; }
body .gb-sheet header { padding-bottom:12px; margin-bottom:16px; border-bottom:2px solid var(--ink); }
body .gb-sheet header h1 { margin:0 0 4px; font-size:22px; letter-spacing:0; }
body .gb-sheet > h2 { margin:0 0 9px; padding:8px; border:1px solid var(--ink); background:color-mix(in srgb,var(--line) 20%,var(--paper)); color:var(--ink); text-align:center; font-size:15px; }
body .gb-sheet .gb-serving { padding:0 0 6px; color:var(--muted); text-align:right; }
body .gb-sheet .gb-head,body .gb-sheet .nutrition-row { grid-template-columns:minmax(0,1fr) 122px 112px; }
body .gb-sheet .gb-head { border:1px solid var(--ink); background:color-mix(in srgb,var(--line) 20%,var(--paper)); color:var(--ink); }
body .gb-sheet .gb-head b { padding:9px; border-right:1px solid var(--ink); }
body .gb-sheet .nutrition-row { padding:0; border-color:var(--ink); align-items:stretch; }
body .gb-sheet .nutrition-row > * { min-width:0; padding:10px 9px; border-color:var(--ink); display:flex; align-items:center; }
body .gb-sheet .nutrition-row > strong,body .gb-sheet .nutrition-row > em { justify-content:flex-end; }
body .gb-sheet .nf-ingredients { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }

body .traffic-sheet { width:100%; max-width:512px; padding:32px; border:1px solid var(--line); border-radius:16px; }
body .traffic-sheet > header { margin:0 0 24px; padding-bottom:16px; align-items:center; border-bottom:1px solid var(--line); }
body .traffic-sheet header h1 { margin-top:7px; font:850 24px/1.2 var(--sans); }
body .traffic-sheet header > div:first-child > small { display:inline-block; padding:4px 7px; border-radius:5px; background:color-mix(in srgb,var(--accent) 11%,var(--paper)); color:var(--accent); font-weight:850; letter-spacing:.08em; }
body .traffic-sheet header p { margin-top:4px; color:var(--muted); }
body .traffic-sheet .nutri-score { padding:10px; border:1px solid var(--line); border-radius:12px; }
body .traffic-sheet .nutri-score span { width:27px; height:30px; border-radius:4px; }
body .traffic-sheet .nutri-score span.active { background:var(--accent); color:var(--paper); transform:scale(1.08); }
body .traffic-sheet > h2 { margin:0 0 10px; color:var(--ink); font-size:12px; }
body .traffic-sheet .traffic-grid { gap:8px; }
body .traffic-sheet .traffic-card { min-height:120px; padding:13px 8px; border:1px solid color-mix(in srgb,currentColor 20%,transparent); border-radius:12px; }
body .traffic-sheet .traffic-card.t0 { background:color-mix(in srgb,var(--accent) 48%,#527662); }
body .traffic-sheet .traffic-card.t1 { background:color-mix(in srgb,var(--accent) 34%,#92784e); }
body .traffic-sheet .traffic-card.t2 { background:color-mix(in srgb,var(--accent) 28%,#9b6d57); }
body .traffic-sheet .traffic-card.t3 { background:color-mix(in srgb,var(--accent) 24%,#875b5d); }
body .traffic-sheet .traffic-card strong { margin:auto 0 5px; font-size:24px; }
body .traffic-sheet .traffic-details { margin-top:20px; padding:16px; border-radius:12px; }
body .traffic-sheet .traffic-note { grid-template-columns:105px 1fr; margin-top:14px; padding:13px; border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line)); border-radius:8px; }

body .fitness-sheet { width:100%; max-width:512px; padding:32px; border:1px solid var(--accent); border-radius:16px; }
body .fitness-sheet > header { margin:0 0 24px; padding-bottom:16px; border-bottom:1px solid var(--line); }
body .fitness-brand > i { width:38px; height:38px; border-radius:8px; font-size:14px!important; }
body .fitness-brand h1 { margin-top:4px!important; font-size:21px!important; }
body .fitness-energy strong { font-size:30px; }
body .fitness-sheet .macro-grid { gap:10px; }
body .fitness-sheet .macro-card { padding:14px 10px; border-radius:12px; text-align:center; }
body .fitness-sheet .macro-card.m0 { border-color:#527d68; background:color-mix(in srgb,#527d68 22%,var(--paper)); }
body .fitness-sheet .macro-card.m1 { border-color:#58758a; background:color-mix(in srgb,#58758a 22%,var(--paper)); }
body .fitness-sheet .macro-card.m2 { border-color:#957a4f; background:color-mix(in srgb,#957a4f 22%,var(--paper)); }
body .fitness-sheet .macro-card strong { margin:7px 0 4px; font-size:25px; }
body .fitness-sheet .macro-ratio { margin:18px 0 22px; padding:13px; border-radius:12px; }
body .fitness-sheet .macro-ratio > div { height:12px; }
body .fitness-sheet .fitness-details h2 { margin:0 0 9px; padding-bottom:7px; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
body .fitness-sheet .nutrition-row { margin-bottom:7px; padding:10px; border:1px solid var(--line); border-radius:5px; background:color-mix(in srgb,var(--paper) 88%,var(--line)); }

body .organic-sheet { width:100%; max-width:448px; margin:0 auto; padding:32px; border:1px solid var(--line); border-radius:24px; }
body .organic-sheet > header { margin:0 0 24px; text-align:center; }
body .organic-sheet .organic-badge { padding:6px 10px; border:0; background:color-mix(in srgb,var(--accent) 13%,var(--paper)); }
body .organic-sheet header h1 { margin-top:9px; font:850 26px/1.2 var(--sans); }
body .organic-sheet .organic-panel { padding:16px; border-radius:16px; }
body .organic-sheet .organic-serving { display:flex; justify-content:space-between; align-items:flex-end; grid-template-columns:none; padding:0 0 13px; background:transparent; }
body .organic-sheet .organic-energy { text-align:right; }
body .organic-sheet .organic-energy small,body .organic-sheet .organic-energy strong { display:block; }
body .organic-sheet .organic-energy strong { margin-top:4px; color:var(--accent); font-size:22px; }
body .organic-sheet .organic-macros { gap:8px; margin-top:13px; }
body .organic-sheet .organic-macros > div { padding:11px 7px; border-radius:12px; }
body .organic-sheet .organic-details { margin-top:20px; padding:16px; border-radius:16px; }
body .organic-sheet .organic-details h2 { margin:0 0 9px; padding-bottom:7px; border-bottom:1px solid var(--line); font:800 14px/1.3 var(--sans); }

body .obsidian-sheet { width:100%; max-width:448px; padding:32px; border:1px solid var(--accent); border-radius:16px; }
body .obsidian-sheet > header { margin:0 0 24px; padding-bottom:16px; align-items:flex-start; }
body .obsidian-sheet header h1 { margin-top:7px; font:700 24px/1.2 var(--serif); }
body .obsidian-sheet .obsidian-energy { padding:9px 12px; border-radius:8px; }
body .obsidian-sheet .obsidian-energy strong { font-size:24px; }
body .obsidian-sheet .obsidian-primary { gap:12px; margin-bottom:24px; }
body .obsidian-sheet .obsidian-primary > div { padding:14px; border-radius:12px; }
body .obsidian-sheet .obsidian-primary strong { font-size:19px; }
body .obsidian-sheet > section { padding:16px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--paper) 92%,var(--line)); }
body .obsidian-sheet > section > h2 { margin:0 0 10px; padding-bottom:8px; }
body .obsidian-sheet .obsidian-grid { gap:9px; }
body .obsidian-sheet .obsidian-grid > div { min-height:86px; padding:12px; border-radius:6px; }
body .obsidian-sheet > .nf-ingredients { margin-top:32px; }
body .obsidian-sheet footer { margin-top:18px; }

/* Final readable-type guard for labels that are not wrapped in semantic small text. */
.brand-mark,.color-grid label,.sticker-type-mark,.sticker-list-copy b,.toggle-field,.preview-meta,.preview-actions > span,.panel-heading > span,.template-chip strong,.template-chip small,.template-kicker { font-size:12px!important; }
.culinary-canvas .wabi-seal,.culinary-canvas .paris-kicker b,.culinary-canvas .pro-recipe > header > strong b,.culinary-canvas .geek-recipe > header > strong,.culinary-canvas .gb-serving,.culinary-canvas .fitness-sheet h2,.culinary-canvas .obsidian-sheet h2,.culinary-canvas .ref-recipe-mark { font-size:12px!important; }

/* Unified low-saturation ticket desk UI. */
:root {
  --ui-bg:#dde1dc;
  --ui-panel:#eceee9;
  --ui-card:#f7f6f0;
  --ui-ink:#252b27;
  --ui-muted:#68716b;
  --ui-line:#c9cec7;
  --ui-line-strong:#adb6ae;
  --ui-accent:#53685d;
  --ui-accent-soft:#d8e1da;
  --ui-danger:#8c5551;
}
body { background:var(--ui-bg); color:var(--ui-ink); }
.topbar { background:var(--ui-card); border-bottom:1px dashed var(--ui-line-strong); box-shadow:none; }
.brand-mark { border-color:#43564d; border-radius:4px; background:#43564d; box-shadow:4px 4px 0 #c2cbc4; }
.project-name input { border-color:var(--ui-line); border-radius:4px; background:#fbfaf5; }
.project-name input:hover,.project-name input:focus { background:#fff; border-color:var(--ui-accent); }
.editor-panel { background:var(--ui-panel); }
.content-panel,.style-panel { border-color:var(--ui-line); }
.panel-heading { background:#f2f3ee; border-bottom:1px dashed var(--ui-line-strong); }
.editor-scroll { background:var(--ui-panel); }
.editor-card { border-color:var(--ui-line); border-radius:6px; background:var(--ui-card); box-shadow:none; }
.card-title { padding-bottom:9px; border-bottom:1px dashed var(--ui-line); }
.segmented { border-color:var(--ui-line-strong); border-radius:4px; overflow:hidden; }
.segmented button { background:#eef0eb; border-color:var(--ui-line); }
.segmented button.active,.primary-button { background:var(--ui-accent); border-color:var(--ui-accent); color:#fff; }
.top-button,.primary-button,.secondary-button,.icon-button,.mini-button { border-radius:4px; }
.top-button,.secondary-button,.icon-button,.mini-button { border-color:var(--ui-line-strong); background:#faf9f4; }
.top-button:hover,.secondary-button:hover,.icon-button:hover,.mini-button:hover { border-color:var(--ui-accent); background:#fff; }
.field { margin-bottom:12px; }
.field > span { margin-bottom:6px; color:#48524c; }
.field input,.field textarea,.field select,.field > select { min-height:42px; padding:9px 10px; border-color:var(--ui-line-strong); border-radius:4px; background:#fffefa; line-height:1.45; }
.field textarea { min-height:78px; }
.field input:focus,.field textarea:focus,.field select:focus { border-color:var(--ui-accent); background:#fff; }
.field-row { gap:10px; }
.array-card { padding:12px; border-color:var(--ui-line); border-radius:6px; background:#f0f1ec; }
.nested-list,.info-row-list { display:grid; gap:10px; }
.nested-card { margin:0; padding:12px; border-color:var(--ui-line); border-radius:6px; background:#fffefa; }
.nested-card.compact,.row-editor,.info-row-card { border-left:1px solid var(--ui-line); }
.array-head { min-height:32px; margin-bottom:10px; color:#536059; }
.array-head > div { display:flex; gap:4px; }
.mini-button { width:32px; height:32px; margin:0; font-size:16px!important; }
.text-button:disabled { opacity:.4; cursor:not-allowed; }
.subsection-head { margin-top:19px; padding-top:15px; border-top:1px dashed var(--ui-line-strong); }
.subsection-head > div strong { display:block; }
.upload-field { padding:12px; border-color:var(--ui-line-strong); border-radius:4px; background:#f0f2ed; }
.color-grid label { border-color:var(--ui-line); border-radius:4px; background:#fffefa; }
.theme-button { border-color:var(--ui-line); border-radius:4px; background:#fbfaf5; }
.theme-button:hover,.theme-button.active { border-color:var(--ui-accent); }
.theme-button.active { background:var(--ui-accent-soft); box-shadow:inset 0 0 0 1px var(--ui-accent); }
.preview-panel,.preview-viewport { background:#d5dad5; }
.preview-toolbar { border-bottom:1px dashed var(--ui-line-strong); background:#eef0eb; }
.preview-actions button { border-color:var(--ui-line-strong); background:#faf9f4; }
.preview-stage { background:transparent; }
.culinary-canvas { box-shadow:0 16px 42px color-mix(in srgb,var(--ui-accent) 18%,transparent); }
.sticker-list-item { border-color:var(--ui-line); border-radius:4px; background:#fffefa; }
.sticker-type-mark { border-radius:3px; background:var(--ui-accent-soft); }
.sticker-list-item.active { border-color:var(--ui-accent); }

/* Editable information rows follow the compact label/content rhythm in the reference. */
.info-row-card .field-row { grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr); }
.menu-item-editor > .field-row { align-items:start; }

/* Recipe readability pass and flexible custom information rows. */
body .ref-recipe { width:100%; max-width:none; }
body .ref-recipe .ref-subtitle { font-size:16px!important; line-height:1.55; }
body .ref-recipe .ref-description,
body .ref-recipe .ref-recipe-meta span,
body .ref-recipe .ref-recipe-meta b,
body .ref-recipe .ref-ingredient-group > h3,
body .ref-recipe .ref-ingredient span,
body .ref-recipe .ref-ingredient b,
body .ref-recipe .ref-ingredient small,
body .ref-recipe .ref-step > b,
body .ref-recipe .ref-step p,
body .ref-recipe .ref-step aside,
body .ref-recipe .ref-step aside strong,
body .ref-recipe .ref-chef-note p,
body .ref-recipe .ref-chef-note b,
body .ref-recipe .ref-pairings,
body .ref-recipe .ref-pairings strong,
body .ref-recipe .ref-pairings span,
body .ref-recipe footer { font-size:14px!important; }
body .ref-recipe .ref-step h3 { font-size:16px!important; line-height:1.45; }
body .ref-recipe main h2 { font-size:18px!important; line-height:1.35; }
body .ref-recipe .ref-step aside { margin-top:10px; padding:11px 12px; line-height:1.65; }
body .ref-recipe .ref-recipe-meta { grid-template-columns:repeat(auto-fit,minmax(108px,1fr)); }
body .editorial-recipe .ref-recipe-meta,body .journal-recipe .ref-recipe-meta,body .midnight-recipe .ref-recipe-meta,body .bakery-recipe .ref-recipe-meta { flex-wrap:wrap; }
body .geek-metrics { grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); font-size:14px; }

@media (max-width:560px) {
  .info-row-card .field-row,.prompt-pair { grid-template-columns:1fr; }
}

/* Menu content readability: enlarge names, descriptions and supporting labels. */
body .ref-menu .ref-menu-item { margin-bottom:20px; }
body .ref-menu .ref-menu-item-main { gap:10px; }
body .ref-menu .ref-menu-name { gap:8px; }
body .ref-menu .ref-menu-name strong { font-size:18px!important; line-height:1.4; }
body .ref-menu .ref-menu-item-main > b { font-size:17px!important; line-height:1.4; }
body .ref-menu .ref-menu-item > small,
body .ref-menu .ref-menu-item > p,
body .ref-menu .ref-category-title small,
body .ref-menu > header > p,
body .ref-menu > header > div > p { font-size:14px!important; line-height:1.7; }
body .ref-menu .ref-menu-item > p { margin-top:7px; }
body .ref-menu .ref-menu-name mark,
body .ref-menu .ref-menu-tags span { padding:3px 6px; font-size:13px!important; line-height:1.35; }
body .ref-menu .ref-menu-tags { gap:6px; margin-top:7px; }
body .ref-menu .ref-menu-section-label { font-size:13px!important; line-height:1.3; }
body .ref-menu .ref-menu-footer,
body .ref-menu .ref-menu-footer p,
body .ref-menu .ref-menu-footer span,
body .ref-menu .ref-menu-footer b { font-size:13px!important; line-height:1.7; }

/* Nutrition documents use the whole export canvas, without a second paper layer around them. */
body .culinary-canvas.mode-nutrition { min-height:0; background:transparent; }
body .culinary-canvas.mode-nutrition > .nutrition-layout {
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-radius:0!important;
  box-shadow:none;
}

/* Keep export controls together at the end of the right sidebar. */
.export-card { border-top:3px solid var(--ui-accent); }
.export-card .field { margin-bottom:10px; }
.export-card .export-button { min-height:44px; font-size:13px!important; }

/* Explicit CJK fallbacks keep preview and raster-export font metrics identical. */
.journal-recipe,
.journal-note { font-family:"Comic Sans MS","Segoe Print","OC Noto Sans SC",cursive; }
.nordic-menu header small { font-family:var(--mono); }
.nordic-menu address { font-family:var(--mono); }
.nordic-category small { font-family:var(--mono); }
.ref-ingredient b,
.ref-step > b { font-family:var(--mono); }
.pro-recipe,
.geek-recipe { font-family:var(--mono); }
body .fda-sheet { font-family:Arial,Helvetica,"OC Noto Sans SC","Microsoft YaHei",sans-serif; }
body .geek-recipe main h2 { font-size:var(--geek-section-size,18px)!important; overflow-wrap:anywhere; }
