:root {
    --bg: ghostwhite;
    --panel: #ffffff;
    --soft: #eef6f8;
    --line: #dde8eb;
    --text: #171717;
    --muted: #6f6a63;
    --accent: #2e99b0;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 1180px; margin: 0 auto; padding: 32px 20px 56px; }
.topbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.topbar-content { display: grid; gap: 18px; width: 100%; }
.eyebrow, .menu-section-kicker, .menu-note, .preview-label {
    margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.topbar h1, .menu-brand-copy h1, .menu-section-head h2 { margin: 0; font-family: "Cormorant Garamond", serif; }
.topbar h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 0.95; }
.intro-text { max-width: 640px; margin: 12px 0 0; color: var(--muted); line-height: 1.65; }
.hero-banner-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(30, 22, 16, 0.06);
}
.hero-banner-image {
    width: 100%;
    border-radius: 24px;
}
.pricing-panel {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.pricing-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.pricing-free-banner {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e7f7eb;
    color: #207245;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid #cbe8d3;
    box-shadow: 0 8px 22px rgba(32, 114, 69, 0.12);
}
.pricing-panel h2 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-family: "Cormorant Garamond", serif;
}
.pricing-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.pricing-badge {
    min-width: 220px;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #247e92);
    color: #ffffff;
    display: grid;
    justify-items: center;
    text-align: center;
    box-shadow: 0 14px 30px rgba(46, 153, 176, 0.22);
}
.pricing-currency {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}
.pricing-amount {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
}
.pricing-note {
    margin-top: 6px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.86);
}

.topbar-actions, .simple-panel-head, .section-actions-head, .item-editor-top, .editor-actions, .qr-actions {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.simple-layout { display: grid; gap: 20px; }
.simple-layout.form-only { grid-template-columns: minmax(0, 1fr); }
.simple-layout.has-result { grid-template-columns: minmax(0, 1fr); }
.simple-layout.result-only { grid-template-columns: minmax(0, 560px); }
.builder-column, .builder-form { display: grid; gap: 20px; }
.simple-panel, .notice, .menu-card.public {
    background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(30, 22, 16, 0.04);
}
.simple-panel { padding: 24px; }
.simple-panel-head { align-items: flex-start; margin-bottom: 18px; }
.simple-panel-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.simple-panel-head p, .field span, .helper-text, .notice, .menu-brand-copy p, .menu-item p, .menu-section-head p { color: var(--muted); }
.step-badge {
    width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; background: var(--soft); font-weight: 700; flex-shrink: 0;
}
.section-title-wrap { display: flex; gap: 12px; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field span { font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfbf9; outline: none;
}
.field input:focus, .field textarea:focus { border-color: #d8c5b2; background: #fff; }
.field textarea { resize: vertical; min-height: 96px; }
.field input[type="file"] { padding: 10px; }
.color-input-wrap { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }

.section-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.section-chip, .primary-button, .secondary-button, .secondary-link, .danger-button {
    display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 12px;
    border: 1px solid var(--line); background: #fcfbf9; font-weight: 600; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.section-chip.active, .primary-button { background: #171717; border-color: #171717; color: #fff; }
.primary-button { background: var(--accent); border-color: var(--accent); color: #fff; }
.danger-button { border-color: #edd2cb; background: #fff5f2; color: #9c4e3d; }
.section-chip:hover, .primary-button:hover, .secondary-button:hover, .secondary-link:hover, .danger-button:hover { transform: translateY(-1px); }

.section-editor, .item-stack { display: grid; gap: 14px; }
.item-editor { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fcfaf7; }
.form-submit { display: flex; justify-content: flex-start; }
.form-submit { gap: 12px; flex-wrap: wrap; }
.is-hidden { display: none !important; }
.qr-panel { max-width: 520px; }
.qr-image { width: 100%; max-width: 240px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: 18px; }
.qr-actions { display: grid; gap: 12px; margin-bottom: 12px; }
.qr-actions-single { grid-template-columns: 1fr; }
.helper-text { margin: 0 0 18px; word-break: break-all; font-size: 0.92rem; }
.notice { padding: 16px 18px; margin-bottom: 20px; }
.notice ul { margin: 10px 0 0 18px; padding: 0; }
.notice.success { border-color: #d7eadc; background: #f5fbf6; }
.notice.error { border-color: #f0d8d1; background: #fff4f1; }

.menu-card.public { max-width: 760px; margin: 32px auto; }
.menu-hero { padding: 22px; color: #fff; }
.menu-brand { display: flex; align-items: center; gap: 14px; }
.menu-logo { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: rgba(255, 255, 255, 0.14); }
.menu-logo.fallback { display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; }
.menu-brand-copy h1 { font-size: clamp(2.1rem, 4vw, 3.6rem); line-height: 0.95; }
.menu-brand-copy p, .menu-note { color: rgba(255, 255, 255, 0.82); }
.menu-meta { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px 0; }
.menu-meta span { padding: 8px 12px; border-radius: 999px; background: #edf6f8; color: var(--muted); font-size: 0.92rem; }
.menu-sections { display: grid; gap: 18px; padding: 20px; }
.menu-section { padding-top: 18px; border-top: 1px solid #efe5d8; }
.menu-section:first-child { padding-top: 0; border-top: 0; }
.menu-section-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.menu-section-head h2 { font-size: 2rem; }
.menu-items { display: grid; gap: 10px; }
.menu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-top: 12px; border-top: 1px dashed #e7ded2; }
.menu-item:first-child { padding-top: 0; border-top: 0; }
.menu-item h3 { margin: 0; font-size: 1rem; }
.menu-item p { margin: 6px 0 0; line-height: 1.6; }
.public-shell { min-height: 100vh; padding: 24px; }
.preview-banner {
    max-width: 760px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border: 1px solid #cfe4ea;
    border-radius: 14px;
    background: #eef7fa;
    color: #316776;
    font-weight: 600;
}
.setup-panel {
    max-width: 760px;
    margin: 0 auto;
}
.setup-panel h1 {
    margin: 0 0 4px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-family: "Cormorant Garamond", serif;
}

@media (max-width: 1024px) {
    .simple-layout,
    .simple-layout.form-only,
    .simple-layout.has-result { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .topbar, .topbar-actions, .simple-panel-head, .section-actions-head, .item-editor-top, .editor-actions, .menu-section-head, .menu-brand, .pricing-content {
        flex-direction: column; align-items: stretch;
    }
    .field-grid, .menu-item { grid-template-columns: 1fr; }
    .hero-banner-wrap,
    .hero-banner-image { border-radius: 18px; }
    .pricing-badge { min-width: 0; }
}
