/* Friendly editor chrome. These screen-only rules deliberately exclude the paper,
   layout board/widgets, generated image sheet and every printable output surface. */
@media screen {
  body[data-design="workspace"] #menuPdf-view,
  body[data-design="workspace"] #website-view {
    min-width:0;
    color:var(--friendly-ink,#283d30);
  }

  /* Scope, date range and method stay separate, recognizable steps. */
  body[data-design="workspace"] #menuPdf-view .menu-create-steps {
    gap:10px 22px;
    margin-bottom:18px;
    color:var(--friendly-muted,#5f6f63);
    font-size:12px;
    line-height:1.5;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-steps li {gap:9px;}
  body[data-design="workspace"] #menuPdf-view .menu-create-steps li>span {
    width:29px;height:29px;
    border-color:var(--friendly-border,#dce4d8);
    border-radius:9px;
    background:var(--friendly-surface,#fff);
    color:var(--friendly-muted,#5f6f63);
    font-size:12px;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-steps li[aria-current="step"] {color:var(--friendly-accent,#365b43);}
  body[data-design="workspace"] #menuPdf-view .menu-create-steps li[aria-current="step"]>span {
    background:var(--friendly-accent,#365b43);
    border-color:var(--friendly-accent,#365b43);
    color:#fff;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-steps .is-complete>span {
    background:var(--friendly-surface-subtle,#f0f4ed);
    color:var(--friendly-accent,#365b43);
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-selection {
    max-width:100%;
    padding:7px 11px;
    border-color:var(--friendly-border,#dce4d8);
    border-radius:8px;
    background:var(--friendly-surface-subtle,#f0f4ed);
    color:var(--friendly-accent,#365b43);
    font-size:12px;
    line-height:1.6;
    overflow-wrap:anywhere;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-options {
    grid-template-columns:minmax(0,1fr);
    gap:0;
    max-width:1100px;
    border:1px solid var(--friendly-border,#e1e7dc);
    border-radius:13px;
    background:var(--friendly-surface,#fff);
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    border:0;
    border-bottom:1px solid var(--friendly-border,#e1e7dc);
    border-radius:0;
    background:var(--friendly-surface,#fff);
    box-shadow:none;
    transition:background-color 160ms var(--friendly-ease,ease);
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card:first-child {border-radius:12px 12px 0 0;}
  body[data-design="workspace"] #menuPdf-view .menu-create-card:last-child {border-bottom:0;border-radius:0 0 12px 12px;}
  body[data-design="workspace"] #menuPdf-view .menu-create-card:only-child {border-radius:12px;}
  body[data-design="workspace"] #menuPdf-view .menu-create-card:not(.is-coming):hover {
    background:#fbfcfa;
    box-shadow:none;
    transform:none;
  }
  body[data-design="workspace"] #menuPdf-view :is(.menu-create-preview,.menu-scope-preview) {
    display:none;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-preview-ai {background:#edf2e8;}
  body[data-design="workspace"] #menuPdf-view .menu-create-card-body {display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:4px 20px;padding:16px 18px;}
  body[data-design="workspace"] #menuPdf-view .menu-create-card-body>:not(.button) {grid-column:1;}
  body[data-design="workspace"] #menuPdf-view :is(.menu-create-badge,.menu-create-preview-label) {
    color:var(--friendly-muted,#5f6f63);
    font-size:11px;
    line-height:1.5;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card h3 {
    margin:0;
    color:var(--friendly-ink,#283d30);
    font-size:15px;
    line-height:1.5;
    letter-spacing:0;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card-body>p {
    color:var(--friendly-muted,#5f6f63);
    margin:0;
    max-width:58ch;
    font-size:12px;
    line-height:1.6;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card ul {
    gap:4px;
    margin:3px 0 0;
    color:var(--friendly-muted,#5f6f63);
    font-size:11px;
    line-height:1.6;
  }
  body[data-design="workspace"] #menuPdf-view .menu-create-card .button {grid-column:2;grid-row:1 / span 5;align-self:center;margin:0;min-height:36px;width:auto;max-width:190px;border-radius:7px;font-size:12px;white-space:normal;text-align:center;}
  body[data-design="workspace"] #menuPdf-view .menu-week-range {
    padding:16px 18px;
    border-color:var(--friendly-border,#dce4d8);
    border-radius:13px;
    background:var(--friendly-surface,#fff);
    box-shadow:none;
  }
  body[data-design="workspace"] #menuPdf-view .menu-week-range-heading h3 {font-size:15px;color:var(--friendly-ink,#283d30);}
  body[data-design="workspace"] #menuPdf-view .menu-week-range-fields {gap:12px;}

  /* Only settings/toolbars are restyled; actual page dimensions and zoom stay owned
     by menu-pdf.css and their existing physical-format controllers. */
  body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-layout,.menu-ai-layout) {gap:18px;min-width:0;}
  body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-settings,.menu-ai-settings) {
    min-width:0;
    padding:16px;
    border-color:var(--friendly-border,#dce4d8);
    border-radius:13px;
    background:var(--friendly-surface,#fff);
    box-shadow:none;
  }
  body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-settings,.menu-ai-settings) h3 {
    font-size:15px;
    line-height:1.4;
    letter-spacing:-.02em;
    color:var(--friendly-ink,#283d30);
  }
  body[data-design="workspace"] #menuPdf-view .pdf-editor-summary {min-height:36px;}
  body[data-design="workspace"] #menuPdf-view :is(.pdf-editor-fold-label,.pdf-unit,.menu-pdf-note,.pdf-template-note,.pdf-design-feedback .text-button,.pdf-design-feedback .menu-pdf-note) {
    color:var(--friendly-muted,#5f6f63);
    font-size:11px;
    line-height:1.65;
  }
  body[data-design="workspace"] #menuPdf-view .pdf-editor-body {gap:14px;}
  body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-settings,.menu-ai-settings) label {font-size:12px;line-height:1.55;}
  body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-settings,.menu-ai-settings) .ui-control {min-width:0;max-width:100%;}
  body[data-design="workspace"] #menuPdf-view :is(.pdf-editor-pair,.menu-ai-format-controls,.weekly-image-settings,.weekly-widget-image-settings,.weekly-feature-copy-fields) {gap:12px;}
  body[data-design="workspace"] #menuPdf-view :is(.pdf-editor-tabs,.weekly-layout-tabs) {
    border-color:var(--friendly-border,#dce4d8);
    border-radius:8px;
    background:var(--friendly-surface-subtle,#f0f4ed);
  }
  body[data-design="workspace"] #menuPdf-view .pdf-editor-tabs::before {
    border-radius:7px;
    border-bottom-color:#79916f;
    background:var(--friendly-surface,#fff);
    box-shadow:0 1px 4px rgb(26 48 34 / .06);
    transition:transform 160ms var(--friendly-ease,ease);
  }
  body[data-design="workspace"] #menuPdf-view .pdf-editor-tabs button {min-height:40px;font-size:12px;color:var(--friendly-muted,#5f6f63);}
  body[data-design="workspace"] #menuPdf-view .pdf-editor-tabs button[aria-selected="true"] {color:var(--friendly-accent,#365b43);font-weight:600;}
  body[data-design="workspace"] #menuPdf-view .pdf-template {
    padding:11px;
    border-color:var(--friendly-border,#dce4d8);
    border-radius:9px;
    background:var(--friendly-surface,#fff);
    transition:background-color 160ms var(--friendly-ease,ease),border-color 160ms var(--friendly-ease,ease),box-shadow 160ms var(--friendly-ease,ease);
  }
  body[data-design="workspace"] #menuPdf-view .pdf-template[aria-pressed="true"] {
    border-color:#829b78;
    background:var(--friendly-surface-subtle,#f0f4ed);
    box-shadow:inset 0 -2px 0 #829b78;
  }
  body[data-design="workspace"] #menuPdf-view .pdf-template strong {font-size:13px;line-height:1.45;color:var(--friendly-ink,#283d30);}
  body[data-design="workspace"] #menuPdf-view .pdf-range input[type=number] {min-height:40px;font-size:14px;font-variant-numeric:tabular-nums;}
  body[data-design="workspace"] #menuPdf-view .pdf-range input[type=range] {min-height:40px;}
  body[data-design="workspace"] #menuPdf-view .pdf-page-assignment {gap:12px;padding-block:11px;border-color:var(--friendly-border,#dce4d8);}
  body[data-design="workspace"] #menuPdf-view .pdf-page-assignment>span {font-size:13px;line-height:1.55;}
  body[data-design="workspace"] #menuPdf-view .pdf-page-assignment.is-area>span {font-size:12px;}
  body[data-design="workspace"] #menuPdf-view .pdf-page-assignment select {font-size:13px;min-height:40px;}
  body[data-design="workspace"] #menuPdf-view .pdf-design-feedback {gap:9px;border-top-color:var(--friendly-border,#dce4d8);}
  body[data-design="workspace"] #menuPdf-view .menu-pdf-help {padding-top:14px;border-top:1px solid var(--friendly-border,#dce4d8);font-size:13px;}
  body[data-design="workspace"] #menuPdf-view .menu-pdf-help summary {min-height:40px;}
  body[data-design="workspace"] #menuPdf-view .menu-pdf-preview-label {font-size:12px;line-height:1.6;flex-wrap:wrap;}
  body[data-design="workspace"] #menuPdf-view .pdf-zoom-toolbar {gap:10px 14px;flex-wrap:wrap;color:var(--friendly-muted,#5f6f63);font-size:13px;}
  body[data-design="workspace"] #menuPdf-view .pdf-zoom-toolbar input[type=number] {min-height:40px;font-size:14px;}

  /* Selection and inspection controls live outside the weekly wire surface. */
  body[data-design="workspace"] #menuPdf-view :is(.weekly-feature-settings,.weekly-widget-inspector,.weekly-selection,.weekly-widget-readable,.weekly-image-settings,.weekly-widget-image-settings,.weekly-feature-copy-fields) {border-color:var(--friendly-border,#dce4d8);}
  body[data-design="workspace"] #menuPdf-view :is(.weekly-feature-settings summary,.weekly-selection-heading,.weekly-widget-inspector>strong) {color:var(--friendly-ink,#283d30);font-size:14px;line-height:1.6;}
  body[data-design="workspace"] #menuPdf-view .weekly-feature-settings summary {min-height:40px;align-content:center;}
  body[data-design="workspace"] #menuPdf-view .weekly-feature-chip {padding:7px 8px 7px 12px;border-color:var(--friendly-border,#dce4d8);border-radius:9px;background:var(--friendly-surface-subtle,#f0f4ed);color:var(--friendly-accent,#365b43);font-size:12px;}
  body[data-design="workspace"] #menuPdf-view .weekly-selection-heading {gap:12px;flex-wrap:wrap;}
  body[data-design="workspace"] #menuPdf-view .weekly-selection-heading>div {gap:8px;flex-wrap:wrap;}
  body[data-design="workspace"] #menuPdf-view .weekly-selection-heading button {min-height:36px;padding:7px 10px;border-radius:8px;border-color:var(--friendly-border,#dce4d8);background:var(--friendly-surface,#fff);color:var(--friendly-accent,#365b43);font-size:12px;}
  body[data-design="workspace"] #menuPdf-view .weekly-selection-chip {gap:8px;min-height:36px;padding:7px 10px;border-radius:8px;border-color:var(--friendly-border,#dce4d8);background:var(--friendly-surface,#fff);color:var(--friendly-ink,#283d30);font-size:12px;line-height:1.5;}
  body[data-design="workspace"] #menuPdf-view .weekly-selection-chip:has(input:checked) {border-color:#829b78;background:var(--friendly-surface-subtle,#f0f4ed);}
  body[data-design="workspace"] #menuPdf-view .weekly-widget-fields label {font-size:12px;color:var(--friendly-muted,#5f6f63);}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-heading {gap:12px 16px;}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-heading h3 {color:var(--friendly-ink,#283d30);font-size:15px;line-height:1.5;}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-heading>.button {min-height:40px;font-size:12px;}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-tabs {gap:7px;padding:4px;border:1px solid var(--friendly-border,#dce4d8);}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-tabs button {min-height:38px;padding:8px 13px;border-color:transparent;border-radius:7px;background:transparent;color:var(--friendly-muted,#5f6f63);font-size:13px;transition:background-color 160ms var(--friendly-ease,ease),color 160ms var(--friendly-ease,ease);}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-tabs button[aria-pressed="true"] {background:var(--friendly-surface,#fff);color:var(--friendly-accent,#365b43);box-shadow:0 1px 4px rgb(26 48 34 / .08);}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-preview {border-color:var(--friendly-border,#dce4d8);border-radius:13px;background:var(--friendly-surface,#fff);box-shadow:none;}
  body[data-design="workspace"] #menuPdf-view .weekly-view-tools {gap:10px 12px;border-color:var(--friendly-border,#dce4d8);}
  body[data-design="workspace"] #menuPdf-view .weekly-view-tools label {font-size:13px;}
  body[data-design="workspace"] #menuPdf-view .weekly-layout-viewport {background:#edf2e8;border-radius:9px;}

  body[data-design="workspace"] #menuPdf-view .menu-ai-group-heading {margin-top:10px;padding:10px 12px;border-radius:8px;background:var(--friendly-surface-subtle,#f0f4ed);color:var(--friendly-accent,#365b43);font-size:13px;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-product {gap:10px;padding-block:13px;border-bottom-color:#edf1e9;font-size:13px;line-height:1.55;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-product>span:first-of-type {overflow-wrap:anywhere;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-product-price {color:var(--friendly-ink,#283d30);font-size:13px;font-variant-numeric:tabular-nums;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-empty {border-style:solid;border-color:var(--friendly-border,#dce4d8);border-radius:14px;background:var(--friendly-surface-subtle,#f0f4ed);}
  body[data-design="workspace"] #menuPdf-view .menu-ai-empty h3 {color:var(--friendly-accent,#365b43);}
  body[data-design="workspace"] #menuPdf-view .menu-ai-empty p {color:var(--friendly-muted,#5f6f63);font-size:14px;line-height:1.75;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-text-review {border-color:var(--friendly-border,#dce4d8);border-radius:12px;background:var(--friendly-surface,#fff);font-size:14px;line-height:1.65;}
  body[data-design="workspace"] #menuPdf-view .menu-ai-text-review summary {min-height:40px;align-content:center;}

  /* Existing pending/error classes remain the only source of feedback truth. */
  body[data-design="workspace"] #menuPdf-view :is(#menu-pdf-status,#menu-ai-status,#menu-ai-count,#menu-ai-result-note,.menu-ai-image-state) {font-size:13px;line-height:1.65;color:var(--friendly-muted,#5f6f63);overflow-wrap:anywhere;}
  body[data-design="workspace"] #menuPdf-view :is(#menu-pdf-status,#menu-ai-status,.menu-ai-image-state).is-loading {padding:11px 13px;border:1px solid var(--friendly-border,#dce4d8);border-radius:9px;background:var(--friendly-surface-subtle,#f0f4ed);color:var(--friendly-accent,#365b43);}
  body[data-design="workspace"] #menuPdf-view :is(#menu-pdf-status,#menu-ai-status,.menu-ai-image-state).is-loading::before {border-top-color:var(--friendly-accent,#365b43);}
  body[data-design="workspace"] #menuPdf-view :is(.pdf-declaration-warning,.pdf-page-error,#menu-ai-status.is-error,.menu-ai-image-state.is-error) {padding:13px 15px;border:1px solid #e8d5d0;border-left:3px solid #b16d61;border-radius:9px;background:#fff7f5;color:var(--friendly-danger,#a94343);font-size:13px;line-height:1.65;}

  /* The restaurant iframe keeps its scripted device width, height, source and
     authenticated readiness channel. Only its surrounding app chrome changes. */
  body[data-design="workspace"] #website-view :is(.website-release,.website-google-form) {padding:14px 16px;border-color:var(--friendly-border,#dce4d8);border-radius:13px;background:var(--friendly-surface,#fff);box-shadow:none;}
  body[data-design="workspace"] #website-view .website-release {align-items:flex-start;margin-bottom:0;border-radius:13px 13px 0 0;gap:18px;}
  body[data-design="workspace"] #website-view .website-google-form {border-top:0;border-radius:0 0 13px 13px;margin-bottom:16px;}
  body[data-design="workspace"] #website-view .website-release strong {font-size:13px;line-height:1.5;}
  body[data-design="workspace"] #website-view :is(.website-release p,.website-google-form p,.website-status) {font-size:12px;line-height:1.6;color:var(--friendly-muted,#5f6f63);overflow-wrap:anywhere;}
  body[data-design="workspace"] #website-view .website-google-form label {font-size:13px;line-height:1.5;}
  body[data-design="workspace"] #website-view .website-actions {gap:10px 12px;}
  body[data-design="workspace"] #website-view .website-release-label {max-width:100%;white-space:normal;padding:4px 8px;border-color:var(--friendly-border,#dce4d8);border-radius:6px;background:var(--friendly-surface-subtle,#f0f4ed);color:var(--friendly-accent,#365b43);font-size:11px;line-height:1.5;}
  body[data-design="workspace"] #website-view .website-preview-toolbar {padding:11px 14px;gap:12px;border-color:var(--friendly-border,#dce4d8);border-radius:13px 13px 0 0;background:var(--friendly-surface,#fff);}
  body[data-design="workspace"] #website-view .website-preview-stage {border-color:var(--friendly-border,#dce4d8);border-radius:0 0 13px 13px;background:#f5f7f3;}
  body[data-design="workspace"] #website-view .website-frame {border-color:#d4dfcf;border-radius:8px;box-shadow:0 6px 20px rgb(26 48 34 / .08);}
  body[data-design="workspace"] #website-view .website-preview-loading {gap:12px;padding-block:32px;color:var(--friendly-accent,#365b43);font-size:14px;line-height:1.6;}
  body[data-design="workspace"] #website-view .website-spinner {border-color:#d7e2d0;border-top-color:var(--friendly-accent,#365b43);}
  body[data-design="workspace"] #website-view .website-preview-message {font-size:14px;line-height:1.7;color:var(--friendly-muted,#5f6f63);}
  body[data-design="workspace"] #website-view :is(.website-status.is-error,.website-preview-message.is-error) {color:var(--friendly-danger,#a94343);}
  body[data-design="workspace"] #website-view .website-preview-message.is-error {padding:14px 16px;border-color:#e8d5d0;border-radius:9px;background:#fff7f5;}

  @media (max-width:1100px) {
    body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-layout,.menu-ai-layout) {grid-template-columns:minmax(0,1fr);gap:20px;}
    body[data-design="workspace"] #menuPdf-view .menu-pdf-settings {max-width:100%;width:100%;}
  }
  @media (max-width:760px) {
    body[data-design="workspace"] #menuPdf-view .menu-create-steps {gap:12px 17px;font-size:12px;}
    body[data-design="workspace"] #menuPdf-view .menu-create-card {grid-template-columns:minmax(0,1fr);}
    body[data-design="workspace"] #menuPdf-view :is(.menu-create-preview,.menu-scope-preview) {display:none;}
    body[data-design="workspace"] #menuPdf-view .menu-create-card-body {grid-template-columns:minmax(0,1fr);gap:5px;padding:14px;}
    body[data-design="workspace"] #menuPdf-view .menu-create-card h3 {font-size:15px;}
    body[data-design="workspace"] #menuPdf-view .menu-create-card .button {grid-column:1;grid-row:auto;justify-self:start;max-width:100%;min-height:44px;margin-top:5px;}
    body[data-design="workspace"] #menuPdf-view :is(.menu-pdf-settings,.menu-ai-settings,.menu-week-range) {padding:14px;border-radius:13px;}
    body[data-design="workspace"] #menuPdf-view :is(.pdf-editor-basics,.pdf-editor-pair,.menu-ai-format-controls,.weekly-image-settings,.weekly-widget-image-settings,.weekly-feature-copy-fields) {grid-template-columns:minmax(0,1fr);gap:16px;}
    body[data-design="workspace"] #menuPdf-view .menu-week-range-fields {grid-template-columns:minmax(0,1fr);gap:14px;}
    body[data-design="workspace"] #menuPdf-view :is(.pdf-editor-tabs button,.weekly-layout-tabs button,.weekly-selection-chip,.weekly-selection-heading button,.weekly-feature-chip .icon-button,.pdf-zoom-toolbar input[type=number],.pdf-range input[type=number],.pdf-range input[type=range]) {min-height:44px;}
    body[data-design="workspace"] #menuPdf-view :is(.pdf-range input[type=number],.pdf-zoom-toolbar input[type=number],.weekly-widget-fields input) {font-size:16px;}
    body[data-design="workspace"] #menuPdf-view .weekly-selection-heading {align-items:flex-start;}
    body[data-design="workspace"] #menuPdf-view .weekly-selection-heading>div {width:100%;}
    body[data-design="workspace"] #menuPdf-view .weekly-selection-heading button {flex:1;}
    body[data-design="workspace"] #menuPdf-view .weekly-widget-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
    body[data-design="workspace"] #menuPdf-view .weekly-layout-tabs {flex-wrap:wrap;}
    body[data-design="workspace"] #menuPdf-view .weekly-layout-tabs button {flex:1;}
    body[data-design="workspace"] #menuPdf-view .pdf-zoom-toolbar {gap:8px 10px;}
    body[data-design="workspace"] #menuPdf-view .pdf-zoom-toolbar input[type=range] {max-width:none;}
    body[data-design="workspace"] #website-view :is(.website-release,.website-google-form) {padding:14px;}
    body[data-design="workspace"] #website-view .website-preview-toolbar {padding:12px;gap:10px;}
    body[data-design="workspace"] #website-view .website-actions {width:100%;gap:10px;}
    body[data-design="workspace"] #website-view .website-actions .button {flex:1 1 150px;min-height:44px;font-size:13px;}
  }
  @media (max-width:390px) {
    body[data-design="workspace"] #menuPdf-view .pdf-page-assignment {grid-template-columns:minmax(0,1fr) 96px;gap:8px;}
    body[data-design="workspace"] #menuPdf-view .pdf-editor-tabs button {padding-inline:2px;font-size:12px;}
    body[data-design="workspace"] #menuPdf-view .menu-ai-empty {padding:30px 18px;}
  }
  @media (prefers-reduced-motion:reduce) {
    body[data-design="workspace"] #menuPdf-view :is(.menu-create-card,.pdf-template,.weekly-layout-tabs button),
    body[data-design="workspace"] #menuPdf-view .pdf-editor-tabs::before {transition:none;}
  }
}
