:root {
  --menu-bg: #0c0a09;
  --menu-panel: #171412;
  --menu-panel-2: #211d1a;
  --menu-border: #3b332d;
  --menu-text: #fafaf9;
  --menu-muted: #d6d3d1;
  --menu-yellow: #f2c94c;
}

html { overflow-x: clip; scroll-behavior: smooth; }
body.menu-maker-page { margin: 0; overflow-x: clip; background: var(--menu-bg); color: var(--menu-text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.menu-maker-page *, .menu-maker-page *::before, .menu-maker-page *::after { box-sizing: border-box; }
.menu-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.menu-maker-page [hidden] { display: none !important; }

/* Hero */
.menu-hero { padding: 112px 0 68px; background: radial-gradient(circle at 85% 15%, rgba(242, 201, 76, .13), transparent 32%), #0c0a09; border-bottom: 1px solid #29231f; }
.menu-hero__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.menu-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: #d6d3d1; font-size: .86rem; margin-bottom: 26px; }
.menu-breadcrumb a { color: #f2c94c; text-decoration: underline; text-underline-offset: 3px; }
.menu-eyebrow, .menu-kicker { color: #f2c94c; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.menu-hero h1 { margin: 12px 0 20px; max-width: 760px; font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.05em; color: #fff; }
.menu-hero h1 span { color: #f2c94c; }
.menu-lead { max-width: 680px; margin: 0 0 24px; color: #e7e5e4; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.7; }
.menu-hero__proof { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.menu-hero__proof span { padding: 8px 11px; border: 1px solid #51463d; border-radius: 999px; background: #171412; color: #f5f5f4; font-size: .82rem; font-weight: 700; }
.menu-hero__image { margin: 0; border: 1px solid #4a4038; border-radius: 24px; overflow: hidden; background: #171412; box-shadow: 0 28px 70px rgba(0,0,0,.38); }
.menu-hero__image img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.menu-hero__image figcaption { padding: 11px 16px; color: #d6d3d1; font-size: .8rem; }

.menu-answer { background: #fff7e8; color: #592c18; border-block: 1px solid #efcda5; }
.menu-answer p { margin: 0; padding: 18px 0; line-height: 1.65; }
.menu-tool-section, .menu-content-section { padding: 78px 0; }
.menu-content-section--soft { background: #151210; border-block: 1px solid #2f2925; }
.menu-section-heading { max-width: 780px; margin: 0 auto 34px; text-align: center; }
.menu-section-heading h2, .menu-copy-grid h2, .menu-final-cta h2 { margin: 8px 0 12px; color: #fff; font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(1.85rem, 3.5vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
.menu-section-heading p:last-child, .menu-copy-grid p, .menu-final-cta p { color: #d6d3d1; line-height: 1.75; }
.menu-copy-grid a { color: #f2c94c; text-decoration: underline; text-underline-offset: 3px; }

/* Editor */
.menu-workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
.menu-editor, .menu-preview-panel { min-width: 0; border: 1px solid var(--menu-border); border-radius: 22px; background: var(--menu-panel); }
.menu-editor { padding: 24px; }
.menu-editor fieldset { min-width: 0; margin: 0; padding: 0 0 26px; border: 0; }
.menu-editor fieldset + fieldset { padding-top: 24px; border-top: 1px solid var(--menu-border); }
.menu-editor legend { padding: 0; color: #fff; font-size: 1.15rem; font-weight: 800; }
.menu-fields { display: grid; gap: 16px; margin-top: 18px; }
.menu-fields--two { grid-template-columns: 1fr 1fr; }
.menu-editor label { display: grid; gap: 7px; min-width: 0; color: #f5f5f4; font-size: .85rem; font-weight: 700; }
.menu-editor label small { color: #d6d3d1; font-weight: 500; font-size: .76rem; }
.menu-editor input:not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]), .menu-editor textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #1c1917; font: inherit; font-weight: 500; }
.menu-editor textarea { min-height: 64px; resize: vertical; }
.menu-editor input[type="file"] { width: 100%; max-width: 100%; color: #f5f5f4; font: inherit; font-size: .8rem; font-weight: 500; }
.menu-editor input:focus-visible, .menu-editor textarea:focus-visible, .menu-btn:focus-visible, .menu-icon-btn:focus-visible, .menu-remove-btn:focus-visible, .menu-related a:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
.menu-file-label { margin-top: 16px; padding: 14px; border: 1px dashed #74675d; border-radius: 12px; background: #211d1a; }
.menu-color-field { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #292524; }
.menu-color-field input { width: 52px; height: 32px; padding: 0; border: 0; background: transparent; }
.menu-editor .menu-check, .menu-editor .menu-radio { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-weight: 600; cursor: pointer; }
.menu-check input, .menu-radio input { width: 20px; height: 20px; margin: 0; accent-color: #f2c94c; flex: none; }
.menu-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }

.menu-section-list { display: grid; gap: 16px; }
.menu-section-editor { padding: 14px; border: 1px solid #5a4e45; border-radius: 16px; background: #1c1816; }
.menu-section-editor__head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.menu-section-editor__name { flex: 1; }
.menu-section-editor__tools, .menu-item-editor__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.menu-icon-btn { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 8px; border: 1px solid #74675d; border-radius: 9px; background: #332d28; color: #fff; font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; }
.menu-icon-btn:hover { background: #443c35; }
.menu-remove-btn { min-height: 40px; padding: 0 6px; border: 0; background: transparent; color: #fca5a5; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.menu-item-list { display: grid; gap: 10px; margin-bottom: 12px; }
.menu-item-editor { padding: 12px; border: 1px solid #4b423b; border-radius: 12px; background: #262120; }
.menu-item-editor__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.menu-item-editor__top strong { color: #fff; font-size: .85rem; }
.menu-item-editor__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.menu-item-editor__grid .menu-wide { grid-column: 1 / -1; }
.menu-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.menu-tags .menu-check { margin-top: 0; }
.menu-tags .menu-remove-btn { margin-left: auto; }

.menu-qr-editor { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; margin-top: 14px; align-items: start; }
.menu-qr-options { display: grid; gap: 12px; min-width: 0; }
.menu-radio-group { display: flex; flex-wrap: wrap; gap: 0 18px; }
.menu-radio-group .menu-radio { margin-top: 0; }
.menu-qr-note { margin: 0; padding: 12px 14px; border-left: 3px solid #10b981; border-radius: 0 10px 10px 0; background: #13201b; color: #d6d3d1; font-size: .8rem; line-height: 1.6; }
.menu-qr-preview { display: grid; justify-items: center; gap: 8px; padding: 7px; border-radius: 14px; background: #fff; }
.menu-qr-preview canvas { display: block; width: 176px; height: 176px; image-rendering: pixelated; }
.menu-qr-target { margin: 0 4px 4px; color: #292524; font-size: .72rem; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }

.menu-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; font: inherit; font-size: .9rem; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.menu-btn:hover { transform: translateY(-1px); }
.menu-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.menu-btn--primary { background: #f2c94c; color: #241900; border-color: #f2c94c; }
.menu-btn--secondary { background: #292524; color: #fff; border-color: #786b61; }
.menu-btn--quiet { background: transparent; color: #e7e5e4; border-color: #51463d; }
.menu-btn--publish { background: #10b981; color: #052e1f; border-color: #10b981; }
.menu-btn--publish:hover { background: #34d399; }
.menu-btn--small { min-height: 38px; padding: 7px 12px; background: #332d28; color: #fff; border-color: #74675d; font-size: .8rem; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.menu-privacy { color: #d6d3d1; font-size: .78rem; line-height: 1.6; }
.menu-status { min-height: 1.4em; color: #f2c94c; font-size: .84rem; font-weight: 700; }
.menu-status--error { color: #fca5a5; }

/* Vista previa: hoja A4 */
.menu-preview-panel { position: sticky; top: 88px; padding: 14px; overflow: hidden; }
.menu-preview-bar { display: flex; justify-content: space-between; padding: 4px 2px 13px; color: #e7e5e4; font-size: .78rem; font-weight: 800; }
.menu-output { max-height: min(860px, calc(100vh - 150px)); overflow: auto; border-radius: 12px; background: #e7e5e4; padding: 14px; }
.menu-sheet { --menu-accent: #b45309; --menu-accent-text: #fff; display: flex; flex-direction: column; width: 100%; aspect-ratio: 210 / 297; padding: 34px 34px 26px; background: #fffdf8; color: #1c1917; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-family: Inter, system-ui, sans-serif; }
.menu-sheet__header { position: relative; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 3px double var(--menu-accent); text-align: center; }
.menu-sheet__logo { width: 120px; height: 64px; margin: 0 auto 8px; }
.menu-sheet__logo img { width: 100%; height: 100%; object-fit: contain; }
.menu-sheet__label { display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; background: var(--menu-accent); color: var(--menu-accent-text); font-size: .64rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.menu-sheet__header h2 { margin: 0; color: #1c1917; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 4.4vw, 2.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.menu-sheet__tagline { margin: 6px 0 0; color: #44403c; font-family: Georgia, serif; font-style: italic; font-size: .9rem; }
.menu-sheet__info { margin: 10px 0 0; color: #44403c; font-size: .68rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.menu-sheet__sections { flex: 1; }
.menu-sheet__section { margin-top: 18px; }
.menu-sheet__section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: #1c1917; font-family: Georgia, serif; font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; break-after: avoid; page-break-after: avoid; }
.menu-sheet__section-title::after { content: ""; flex: 1; height: 2px; background: var(--menu-accent); opacity: .85; }
.menu-sheet__empty { margin: 8px 0; color: #57534e; font-size: .74rem; }
.menu-dish { display: flex; gap: 10px; padding: 7px 0; break-inside: avoid; page-break-inside: avoid; }
.menu-dish + .menu-dish { border-top: 1px solid #ece6dc; }
.menu-dish__img { width: 58px; height: 58px; flex: none; border-radius: 8px; object-fit: cover; }
.menu-dish__body { flex: 1; min-width: 0; }
.menu-dish__line { display: flex; align-items: baseline; gap: 6px; }
.menu-dish__name { margin: 0; color: #1c1917; font-size: .84rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.menu-dish__dots { flex: 1; min-width: 12px; border-bottom: 1.5px dotted #a8a29e; transform: translateY(-3px); }
.menu-dish__price { color: #1c1917; font-size: .84rem; font-weight: 900; white-space: nowrap; }
.menu-dish__desc { margin: 3px 0 0; color: #44403c; font-size: .7rem; line-height: 1.45; overflow-wrap: anywhere; }
.menu-dish__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.menu-badge { display: inline-block; padding: 2px 7px; border: 1px solid; border-radius: 999px; font-size: .58rem; font-weight: 800; letter-spacing: .02em; }
.menu-badge--veggie { border-color: #15803d; background: #f0fdf4; color: #14532d; }
.menu-badge--tacc { border-color: #b45309; background: #fffbeb; color: #78350f; }
.menu-sheet__footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid #d6d3d1; break-inside: avoid; page-break-inside: avoid; }
.menu-sheet__qr { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.menu-sheet__qr img { width: 96px; height: 96px; flex: none; image-rendering: pixelated; }
.menu-sheet__qr div { display: grid; gap: 3px; min-width: 0; }
.menu-sheet__qr strong { color: #1c1917; font-family: Georgia, serif; font-size: .95rem; }
.menu-sheet__qr span { color: #44403c; font-size: .66rem; overflow-wrap: anywhere; }
.menu-sheet__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; color: #57534e; font-size: .6rem; }

/* Contenido */
.menu-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.menu-steps article, .menu-tips article { padding: 22px; border: 1px solid #403832; border-radius: 16px; background: #1d1917; }
.menu-steps span { color: #f2c94c; font-size: .75rem; font-weight: 900; }
.menu-steps h3, .menu-tips h3 { margin: 12px 0 7px; color: #fff; font-size: 1.03rem; }
.menu-tips h3 { margin-top: 0; }
.menu-steps p, .menu-tips p { margin: 0; color: #d6d3d1; font-size: .88rem; line-height: 1.65; }
.menu-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.menu-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.menu-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-comparison > div { display: grid; gap: 12px; padding: 22px; border: 1px solid #4b423b; border-radius: 16px; background: #171412; }
.menu-comparison strong { color: #fff; font-size: 1.05rem; }
.menu-comparison span { position: relative; padding-left: 18px; color: #d6d3d1; font-size: .86rem; line-height: 1.5; }
.menu-comparison span::before { content: "✓"; position: absolute; left: 0; color: #f2c94c; font-weight: 900; }
.menu-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.menu-related a { display: grid; gap: 8px; padding: 22px; border: 1px solid #4b423b; border-radius: 16px; background: #1d1917; color: #fff; text-decoration: none; transition: border-color .18s ease; }
.menu-related a:hover { border-color: #f2c94c; }
.menu-related strong { color: #f2c94c; font-size: 1rem; }
.menu-related span { color: #d6d3d1; font-size: .88rem; line-height: 1.6; }
.menu-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.menu-faq details { padding: 16px 18px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; }
.menu-faq summary { color: #fff; font-weight: 800; cursor: pointer; }
.menu-faq p { color: #d6d3d1; line-height: 1.65; }
.menu-final-cta { padding: 44px; border: 1px solid #665a50; border-radius: 24px; background: linear-gradient(135deg, #211d1a, #151210); text-align: center; }
.menu-final-cta > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.menu-maker-page .footer { background: #0a0a0a; color: #f5f5f4; }
.menu-maker-page .footer h3 { color: #fff; }
.menu-maker-page .footer a, .menu-maker-page .footer p { color: #a8a29e; }

@media (max-width: 980px) {
  .menu-hero__grid, .menu-workspace, .menu-copy-grid { grid-template-columns: 1fr; }
  .menu-hero__image { max-width: 760px; }
  .menu-preview-panel { position: static; }
  .menu-output { max-height: none; }
  .menu-steps, .menu-tips { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .menu-container { width: min(100% - 24px, 1180px); }
  .menu-hero { padding: 92px 0 48px; }
  .menu-hero h1 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .menu-tool-section, .menu-content-section { padding: 54px 0; }
  .menu-editor { padding: 16px; }
  .menu-fields--two, .menu-item-editor__grid, .menu-faq, .menu-comparison, .menu-steps, .menu-tips, .menu-related, .menu-qr-editor { grid-template-columns: 1fr; }
  .menu-item-editor__grid .menu-wide { grid-column: auto; }
  .menu-section-editor { padding: 10px; }
  .menu-section-editor__head { flex-wrap: wrap; }
  .menu-section-editor__name { flex-basis: 100%; }
  .menu-qr-preview { justify-self: center; width: 190px; }
  .menu-legend-row { align-items: flex-start; }
  .menu-actions .menu-btn { width: 100%; }
  .menu-output { margin-inline: -5px; padding: 7px; }
  .menu-sheet { padding: 20px 16px 16px; }
  .menu-dish__img { width: 46px; height: 46px; }
  .menu-final-cta { padding: 28px 18px; }
}

/* Impresión: solo la carta, A4, sin cortar platos entre páginas */
@page { size: A4; margin: 14mm 14mm 12mm; }
@media print {
  html, body.menu-maker-page { background: #fff !important; }
  .menu-maker-page > :not(main), .menu-maker-page main > :not(.menu-tool-section), .menu-tool-section .menu-section-heading, .menu-editor, .menu-preview-bar { display: none !important; }
  .menu-tool-section, .menu-tool-section .menu-container, .menu-workspace, .menu-preview-panel, .menu-output { display: block !important; position: static !important; width: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; overflow: visible !important; }
  .menu-sheet { display: block !important; width: 100% !important; min-height: 0 !important; aspect-ratio: auto !important; padding: 0 !important; background: #fff !important; box-shadow: none !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .menu-sheet__header h2 { font-size: 30pt; }
  .menu-sheet__tagline { font-size: 12pt; }
  .menu-sheet__info { font-size: 9pt; }
  .menu-sheet__section { margin-top: 7mm; }
  .menu-sheet__section-title { font-size: 15pt; }
  .menu-dish { padding: 2.4mm 0; }
  .menu-dish__img { width: 18mm; height: 18mm; }
  .menu-dish__name, .menu-dish__price { font-size: 11pt; }
  .menu-dish__desc { font-size: 9pt; }
  .menu-badge { font-size: 7pt; }
  .menu-sheet__footer { margin-top: 8mm; }
  .menu-sheet__qr img { width: 32mm; height: 32mm; }
  .menu-sheet__qr strong { font-size: 13pt; }
  .menu-sheet__qr span { font-size: 9pt; }
  .menu-sheet__legal { font-size: 8pt; }
}
