/* Recipe Studio: generator first. Scoped to this page; recipe print output stays intact. */
@media screen {
  body[data-bt-theme].tool-editorial {
    --studio-ink: #242a20;
    --studio-paper: #fffdf8;
    --studio-cream: #f8f5ee;
    --studio-rule: #d8dccf;
    --studio-muted: #62695c;
    --studio-rust: #aa4328;
    background: var(--studio-cream);
  }
  body.tool-editorial .lab-shell .wrap { width: min(1320px, calc(100% - 64px)); max-width: none; }
  body.tool-editorial #form-section { padding: 32px 0 64px; background: var(--studio-cream); }
  body[data-tool-access="member"].tool-editorial .lab-member-only-tool { padding-top: 32px; }
  body.tool-editorial .studio-masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 0 26px; color: var(--studio-ink); }
  .studio-eyebrow { display: block; margin: 0 0 10px; color: var(--studio-rust); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
  body.tool-editorial .studio-masthead h1 { margin: 0; color: var(--studio-ink); font: 400 clamp(2.8rem, 5vw, 4.2rem)/1 Georgia, serif; letter-spacing: -.055em; }
  .studio-masthead h1 em { color: var(--studio-rust); font-weight: inherit; }
  .studio-masthead__lede { margin: 10px 0 0; color: var(--studio-muted); font-size: .95rem; }
  .studio-masthead__image { display: none; }
  .studio-shortcuts { display: flex; gap: 10px; align-items: center; }
  .studio-shortcuts a { display: flex; align-items: center; gap: 22px; min-height: 44px; padding: 0 16px; border: 1px solid var(--studio-rule); border-radius: 8px; background: var(--studio-paper); font-size: .8rem; font-weight: 700; }
  .studio-shortcuts a:hover { border-color: var(--studio-rust); }
  body.tool-editorial .lab-workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: start; margin: 0; }
  body[data-bt-theme].tool-editorial .lab-builder { min-width: 0; padding: 28px; border: 1px solid var(--studio-rule); border-radius: 16px; background: var(--studio-paper); box-shadow: 0 12px 36px #242a2006; }
  body.tool-editorial .lab-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding: 0; }
  body.tool-editorial .lab-form-head h2 { margin: 0; font: 400 clamp(1.35rem, 2vw, 1.7rem)/1.2 Georgia, serif; letter-spacing: -.025em; }
  body.tool-editorial .lab-badge { display: inline-flex; gap: 7px; align-items: center; padding: 0; border: 0; background: none; color: #526344; font-size: .68rem; white-space: nowrap; }
  body.tool-editorial #billingPlanBadge { padding: 0; border: 0; background: transparent; font-size: inherit; color: inherit; }
  body.tool-editorial .lab-dot { width: 6px; height: 6px; box-shadow: none; background: #526344; }
  body.tool-editorial .lab-section-card { display: block; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; scroll-margin-top: 90px; }
  body.tool-editorial .lab-mode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 5px; margin: 0; border: 1px solid #e0e2d9; border-radius: 10px; background: #eff0e9; }
  body.tool-editorial .mode-card { position: relative; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 9px; min-width: 0; min-height: 48px; padding: 10px 6px; margin: 0; border: 1px solid transparent; border-radius: 7px; box-shadow: none; background: transparent; color: #555e4e; cursor: pointer; transition: color .18s, background .18s; }
  body.tool-editorial .mode-card:hover { transform: none; background: #e3e6da; }
  body.tool-editorial .mode-card.active { color: #fffdf8; background: var(--studio-ink); box-shadow: 0 2px 5px #242a201a; }
  body.tool-editorial .mode-card input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
  body.tool-editorial .mode-card:focus-within { outline: 3px solid var(--studio-rust); outline-offset: 2px; }
  body.tool-editorial .mode-card strong { font: 700 .84rem/1.2 'DM Sans', sans-serif; color: inherit; letter-spacing: 0; }
  .mode-card svg, .studio-benefits svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .studio-mode-hint { margin: 12px 0 20px; color: var(--studio-muted); font-size: .8rem; line-height: 1.5; }
  body.tool-editorial #studio-source > .field { margin: 0; }
  body.tool-editorial .field label { display: block; margin: 0 0 8px; color: var(--studio-ink); font-size: .84rem; font-weight: 700; letter-spacing: 0; }
  body.tool-editorial :where(.audit-lab-form,.lab-member-access-card) :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 46px; border: 1px solid #cbd0c0; border-radius: 8px; background: #fffefa; color: var(--studio-ink); box-shadow: none; font-size: 1rem; }
  body.tool-editorial :where(.audit-lab-form,.lab-member-access-card) :where(input,select,textarea):focus-visible { outline: 3px solid #aa432840; outline-offset: 2px; border-color: var(--studio-rust); }
  body.tool-editorial #studio-source textarea { display: block; width: 100%; min-height: 152px; padding: 16px; font-size: 1rem; line-height: 1.6; resize: vertical; }
  body.tool-editorial textarea::placeholder { color: #818678; opacity: 1; }
  body.tool-editorial .help { color: var(--studio-muted); font-size: .76rem; line-height: 1.55; }
  .studio-prompt-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 14px; }
  .studio-prompt-ideas > span { color: var(--studio-muted); font-size: .68rem; margin-right: 2px; }
  .studio-prompt-ideas button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border: 1px solid #e1e4d8; border-radius: 6px; background: #f4f5ed; color: #526344; font: 600 .69rem/1.3 'DM Sans',sans-serif; cursor: pointer; }
  .studio-prompt-ideas button:hover { border-color: #526344; background: #e9eddf; }
  body[data-studio-mode="combine"] .studio-prompt-ideas { display: none; }
  body.tool-editorial .studio-disclosure, body.tool-editorial .lab-upload-drawer { margin: 10px 0 0; padding: 0; border: 1px solid var(--studio-rule); border-radius: 8px; background: #fbfaf5; box-shadow: none; }
  body.tool-editorial .studio-disclosure summary, body.tool-editorial .lab-upload-drawer summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 46px; margin: 0; padding: 10px 13px; color: var(--studio-ink); font-size: .78rem; font-weight: 650; line-height: 1.4; cursor: pointer; list-style: none; }
  .studio-disclosure summary::-webkit-details-marker, .lab-upload-drawer summary::-webkit-details-marker { display: none; }
  body.tool-editorial .studio-disclosure summary::after, body.tool-editorial .lab-upload-drawer summary::after { content: '+'; display: block; width: auto; height: auto; margin-left: auto; padding: 0; border: 0; background: none; color: #526344; font: 400 1.3rem/1 Georgia,serif; }
  body.tool-editorial .studio-disclosure[open] > summary::after, body.tool-editorial .lab-upload-drawer[open] > summary::after { content: '−'; }
  .studio-disclosure summary small { color: var(--studio-muted); font-size: .67rem; font-weight: 400; }
  .studio-disclosure__body { padding: 6px 14px 16px; }
  .studio-disclosure__body > :last-child { margin-bottom: 0; }
  body.tool-editorial .lab-upload-drawer > :not(summary) { margin: 0 14px 14px; }
  body.tool-editorial .lab-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  body.tool-editorial .lab-form-grid .field { min-width: 0; }
  body.tool-editorial #studio-tune { margin-top: 10px; }
  body.tool-editorial #studio-tune .field { margin-top: 14px; }
  body.tool-editorial .lab-actions { display: block; margin: 18px 0 0; padding: 0; border: 0; background: transparent; }
  body.tool-editorial .lab-actions-main { display: flex; flex-wrap: nowrap; gap: 10px; align-items: center; }
  body.tool-editorial .lab-actions .btn { min-height: 50px; border-radius: 8px; }
  body.tool-editorial .lab-actions .btn.accent { flex: 1; color: #fff; background: var(--studio-rust); border-color: var(--studio-rust); font-size: .95rem; }
  body.tool-editorial .lab-actions .btn.accent:hover { background: #87351f; transform: none; }
  body.tool-editorial #resetBtn { flex: 0 0 auto; min-width: 78px; padding-inline: 12px; color: var(--studio-muted); border-color: var(--studio-rule); background: transparent; font-size: .74rem; }
  body.tool-editorial .lab-actions-note { display: block; margin-top: 10px !important; color: var(--studio-muted); font-size: .67rem; text-align: center; }
  body.tool-editorial .lab-status:empty { display: none; }
  body[data-bt-theme].tool-editorial .lab-member-access-card { margin: 20px 0 0 !important; padding: 0; border: 0; border-top: 1px solid var(--studio-rule); border-radius: 0; background: transparent; }
  .lab-member-access-card summary { padding-inline: 0 !important; font-size: .72rem !important; }
  .lab-member-access-card summary #billingPlan { margin-left: auto; color: #526344; font-size: .68rem; }
  .lab-member-access-card summary::after { margin-left: 2px !important; }
  .lab-member-access-card .studio-disclosure__body { padding-inline: 0; }
  body.tool-editorial .lab-member-access-card [data-bt-usage-meter] { margin: 12px 0; }
  .studio-support-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--studio-rust); font-size: .78rem; }
  body.tool-editorial .lab-sidebar { position: sticky; top: 104px; display: grid; gap: 16px; min-width: 0; }
  .studio-featured { position: relative; overflow: hidden; min-height: 520px; margin: 0; border: 1px solid #293022; border-radius: 16px; background: #242a20; }
  .studio-featured > img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
  .studio-featured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#171d1699,transparent 35%,#171d16dd); }
  .studio-featured figcaption { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 32px; color: #fffdf8; }
  .studio-featured .studio-eyebrow { color: #efd7b0; }
  body.tool-editorial .studio-featured h3 { margin: auto 0 22px; color: #fffdf8; font: 400 clamp(2.6rem,4vw,4rem)/.97 Georgia,serif; letter-spacing: -.05em; }
  .studio-featured h3 em { color: #e8bf94; font-weight: inherit; }
  .studio-featured__tag { padding: 8px 12px; border: 1px solid #fffdf845; border-radius: 100px; background: #fffdf80c; font-size: .69rem; }
  .studio-benefits { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px 4px; }
  .studio-benefits > span { display: flex; align-items: center; gap: 7px; color: #526344; font-size: .74rem; }
  .studio-benefits svg { width: 14px; height: 14px; }
  .studio-help { margin: 0 !important; background: transparent !important; }
  .studio-help p { color: var(--studio-muted); font-size: .83rem; line-height: 1.7; }
  .studio-help a { display: inline-flex; align-items: center; min-height: 44px; color: var(--studio-rust); font-size: .8rem; }
  body.tool-editorial .lab-kitchen-source, body.tool-editorial .meal-builder { padding: 14px; border-radius: 8px; border-color: var(--studio-rule); box-shadow: none; background: #f2f4e9; }
  body.tool-editorial .meal-builder { margin-top: 12px; background: #f8f3e8; }
  body.tool-editorial .meal-component-row { min-width: 0; border-radius: 8px; }
  body.tool-editorial .lab-kitchen-source__toggle input { min-height: 0; }
  body.tool-editorial .lab-kitchen-source__toggle small { color: var(--studio-muted); }
  body.tool-editorial .lab-workspace.has-recipe-result { grid-template-columns: minmax(0,1fr); }
  body.tool-editorial .lab-workspace.has-recipe-result > .lab-sidebar { position: static; display: none; }
  body.tool-editorial #results-section { margin-top: 26px !important; padding: 20px !important; border-radius: 12px !important; box-shadow: none; }
  body.tool-editorial .lab-results-head h2 { font-family: Georgia,serif; font-weight: 400; }
  body.tool-editorial .lab-sticky-run { display: none; }
  body.tool-editorial .studio-welcome { padding: 28px 0 0; background: var(--studio-cream); }
  .studio-welcome__card { position: relative; overflow: hidden; min-height: 450px; border-radius: 16px; background: var(--studio-ink); }
  .studio-welcome__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .studio-welcome__copy { position: relative; padding: 48px; max-width: 730px; color: #fffdf8; background: linear-gradient(90deg,#151b12e8,transparent); }
  .studio-welcome__copy .studio-eyebrow { color: #e8bf94; }
  body.tool-editorial .studio-welcome h1 { margin: 16px 0 20px; color: #fffdf8; font: 400 clamp(2.5rem,5vw,4.7rem)/1 Georgia,serif; letter-spacing: -.05em; }
  .studio-welcome h1 em { color: #e8bf94; font-weight: inherit; }
  body.tool-editorial .studio-welcome p { max-width: 36ch; color: #e4e8dc; line-height: 1.6; font-size: 1rem; }
  .studio-welcome__copy small { display: block; margin-top: 16px; max-width: 49ch; color: #d1d7c6; font-size: .73rem; }
  body.tool-editorial .studio-welcome .btn { border-radius: 8px; }
  body.tool-editorial .studio-welcome .btn.ghost { border-color: #fffdf87a; color: #fffdf8; background: #242a2055; }
  body.tool-editorial #tool-gate-section { padding: 18px 0; }
  body[data-bt-theme].tool-editorial .tool-lock-card { padding: 22px; border-radius: 12px; box-shadow: none; background: #e9eddf; }
  body.tool-editorial .tool-lock-card h2 { font: 400 1.5rem/1.2 Georgia,serif; }
  body.tool-editorial .tool-lock-card p { font-size: .88rem; }
  body.tool-editorial .tool-lock-card .lab-kicker { display: none; }
  body.tool-editorial .tool-lock-actions { margin-top: 12px; }
  body.tool-editorial .studio-discover { padding-top: 30px; }
  .studio-discover h2 { margin: 0 0 24px; font: 400 clamp(1.8rem,3vw,2.7rem)/1.1 Georgia,serif; letter-spacing: -.035em; }
  .studio-discover__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 24px; }
  .studio-discover__grid article { overflow: hidden; border: 1px solid var(--studio-rule); border-radius: 12px; background: var(--studio-paper); }
  .studio-discover__grid img { display: block; width: 100%; height: 200px; object-fit: cover; }
  .studio-discover__grid article > div { padding: 22px; }
  .studio-discover__grid span { color: var(--studio-rust); font-size: .68rem; font-weight: 700; }
  .studio-discover__grid h3 { margin: 10px 0; font: 400 1.5rem/1.15 Georgia,serif; letter-spacing: -.025em; }
  .studio-discover__grid p, .studio-discover .studio-disclosure__body p { color: var(--studio-muted); font-size: .87rem; line-height: 1.65; }
  body.tool-editorial :is(button,a,input,summary,textarea,select):focus-visible { outline: 3px solid #aa4328; outline-offset: 3px; }
}
@media screen and (max-width: 1050px) {
  body.tool-editorial .lab-shell .wrap { width: calc(100% - 40px); }
  body.tool-editorial .lab-workspace { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 20px; }
  body[data-bt-theme].tool-editorial .lab-builder { padding: 22px; }
  body.tool-editorial .lab-badge { display: none; }
  .studio-featured { min-height: 490px; }
  .studio-featured figcaption { padding: 24px; }
}
@media screen and (max-width: 760px) {
  body[data-bt-theme].tool-editorial { padding-bottom: 0; }
  body.tool-editorial .lab-shell .wrap { width: calc(100% - 28px); }
  body.tool-editorial #form-section, body[data-tool-access="member"].tool-editorial .lab-member-only-tool { padding-top: 14px; padding-bottom: 32px; }
  body.tool-editorial .studio-masthead { position: relative; gap: 0; min-height: 114px; margin: 0 0 14px; padding: 16px 18px; overflow: hidden; border-radius: 12px; background: #242a20; color: #fffdf8; }
  .studio-masthead__copy { position: relative; z-index: 1; }
  .studio-masthead .studio-eyebrow { margin-bottom: 7px; color: #e8bf94; font-size: .54rem; letter-spacing: .12em; }
  body.tool-editorial .studio-masthead h1 { color: #fffdf8; font-size: 2.25rem; }
  .studio-masthead h1 em { color: #e8bf94; }
  .studio-masthead__lede { margin-top: 7px; color: #e5e9de; font-size: .69rem; }
  .studio-masthead__image { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 58%; opacity: .52; mask-image: linear-gradient(90deg,transparent 30%,#000 95%); }
  .studio-shortcuts { display: none; }
  body.tool-editorial .lab-workspace { grid-template-columns: minmax(0,1fr); gap: 22px; }
  body[data-bt-theme].tool-editorial .lab-builder { padding: 18px 16px 8px; border-radius: 12px; }
  body.tool-editorial .lab-form-head { display: none; }
  body.tool-editorial .lab-form-head h2 { font-size: 1.3rem; }
  body.tool-editorial .mode-card { min-height: 44px; gap: 6px; padding: 9px 4px; }
  body.tool-editorial .mode-card strong { font-size: .8rem; }
  .mode-card svg { width: 16px; height: 16px; }
  .studio-mode-hint { margin: 10px 0 14px; font-size: .78rem; }
  body.tool-editorial .field label { font-size: .84rem; }
  body.tool-editorial #studio-source textarea { min-height: 128px; padding: 12px; line-height: 1.5; }
  .studio-prompt-ideas { margin: 8px 0; gap: 6px; }
  .studio-prompt-ideas > span { display: none; }
  .studio-prompt-ideas button { min-height: 44px; padding: 8px; font-size: .72rem; }
  body.tool-editorial .studio-disclosure summary, body.tool-editorial .lab-upload-drawer summary { padding: 10px; min-height: 44px; font-size: .8rem; }
  .studio-disclosure summary small { display: none; }
  body.tool-editorial .lab-actions { margin-top: 14px; }
  body.tool-editorial .lab-actions .btn.accent { font-size: .88rem; }
  body.tool-editorial .lab-actions-note { font-size: .72rem; }
  body.tool-editorial .lab-member-access-card { margin-top: 14px !important; }
  body.tool-editorial .lab-sidebar { position: static; }
  .studio-featured { min-height: 270px; }
  .studio-featured figcaption { padding: 24px; }
  body.tool-editorial .studio-featured h3 { font-size: 2.8rem; margin-bottom: 18px; }
  .studio-benefits { gap: 12px 18px; }
  body.tool-editorial .lab-form-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  body.tool-editorial #results-section { padding: 10px !important; margin-inline: -6px; }
  body.tool-editorial .lab-results-head { gap: 14px; }
  body.tool-editorial .studio-welcome { padding-top: 14px; }
  .studio-welcome__card { min-height: 0; border-radius: 12px; }
  .studio-welcome__image { object-position: 64% center; opacity: .65; }
  .studio-welcome__copy { padding: 28px 20px; background: linear-gradient(90deg,#151b12d9,#151b1255); }
  body.tool-editorial .studio-welcome h1 { font-size: 2.55rem; }
  body.tool-editorial .studio-welcome p { font-size: .88rem; }
  .studio-welcome__copy small { font-size: .66rem; }
  .studio-welcome .lab-hero-actions { gap: 8px; margin-top: 20px; }
  body.tool-editorial .studio-welcome .btn { width: 100%; min-height: 46px; font-size: .82rem; }
  body.tool-editorial .tool-lock-card p { font-size: .8rem; }
  .studio-discover__grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .studio-discover__grid article { display: grid; grid-template-columns: 100px minmax(0,1fr); }
  .studio-discover__grid img { height: 100%; min-height: 160px; }
  .studio-discover__grid article > div { padding: 18px; }
  .studio-discover__grid h3 { font-size: 1.3rem; }
  .studio-discover__grid p { font-size: .76rem; margin-bottom: 0; }
}
@media screen and (prefers-reduced-motion: reduce) {
  body.tool-editorial *,body.tool-editorial *::before,body.tool-editorial *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media print {
  .studio-masthead,.studio-shortcuts,.studio-featured,.studio-benefits,.studio-help,.lab-member-access-card,body.tool-editorial .lab-sidebar { display: none !important; }
}
