:root {
    --primary: #22a45d;
    --primary-dark: #178746;
    --bg: #e7f0ea;
    --text: #1c1c1c;
    --muted: #667069;
    --card: #ffffff;
    --accent: #e8f7ee;
    --danger: #d64545;
    --shadow: 0 16px 40px rgba(23, 48, 34, 0.08);
    --radius: 20px;
    --font: "Be Vietnam Pro", "Noto Sans Khmer", "Noto Sans SC", "Khmer UI", "Leelawadee UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; max-width: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .btn, .add-btn { touch-action: manipulation; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

.guest-body { min-height: 100vh; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.top-link { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: var(--primary); color: white; font-size: 18px; overflow: hidden; flex: none;
}
.brand-mark.has-logo { background: #fff; }
.brand-mark img { width: 36px; height: 36px; object-fit: cover; }
.lang-switch { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-switch a, .lang-switch span {
    padding: 6px 10px; border-radius: 999px; background: var(--card); color: var(--muted);
    font-size: 13px; font-weight: 600;
}
.lang-switch a.active, .lang-switch a:hover { background: var(--primary); color: white; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; padding: 12px 0 48px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.25; letter-spacing: -0.04em; }
.hero .lead { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 520px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
    border: 0; cursor: pointer; border-radius: 999px; padding: 12px 18px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--card); color: var(--text); }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-small { padding: 8px 12px; font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.feature { background: var(--card); border-radius: 18px; padding: 14px 16px; }
.feature strong { display: block; }
.feature span { color: var(--muted); font-size: 14px; }
.demo-card { margin-top: 18px; background: #17241c; color: white; border-radius: 18px; padding: 14px 16px; }
.demo-card p { color: #c9d5ce; font-size: 14px; margin-top: 4px; }
.demo-card code { color: #d8ffe8; }

.preview-card { background: white; border-radius: 32px; padding: 14px; box-shadow: var(--shadow); }
.preview-card img { height: 210px; width: 100%; object-fit: cover; border-radius: 22px; }
.preview-copy { padding: 14px 8px 8px; }
.preview-copy h2 { font-size: 22px; }
.preview-copy p { color: var(--muted); margin: 6px 0 12px; }
.price-line { display: flex; justify-content: space-between; align-items: center; }
.price-line strong { color: var(--primary); font-size: 20px; }
.price-line s { color: #9aa39d; margin-right: 6px; }

.auth-card { width: min(440px, calc(100% - 32px)); margin: 8vh auto; background: white; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 32px; line-height: 1.3; }
.auth-card .lead { color: var(--muted); margin: 8px 0 18px; }
.auth-card .btn-block { width: 100%; min-height: 52px; margin-top: 6px; font-size: 16px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field-label a, .auth-back { color: var(--primary-dark); font-weight: 700; font-size: 13px; }
.auth-back { display: inline-block; margin-top: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e4ebe6; }
.social-row { display: flex; justify-content: center; align-items: center; gap: 18px; }
.btn-social {
    width: 56px; height: 56px; min-height: 56px; margin: 0; padding: 0; border-radius: 50%;
    background: white; color: #1c1c1c; border: 1px solid #e4ebe6;
}
.btn-social svg { width: 26px; height: 26px; }
.btn-social.google { overflow: hidden; background: #fff; }
.btn-social.google img { width: 84px; height: 84px; max-width: none; object-fit: cover; }
.btn-social.facebook { overflow: hidden; background: transparent; border: 0; }
.btn-social.facebook img { width: 56px; height: 56px; max-width: none; object-fit: cover; border-radius: 50%; }
.btn-social.telegram { background: #229ed9; color: white; border-color: #229ed9; }
.telegram-widget { display: flex; justify-content: center; min-height: 48px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field[hidden] { display: none; }
.field span, .check { font-weight: 600; font-size: 14px; }
.icon-picker { display: flex; flex-direction: column; gap: 10px; }
.icon-picker-current {
    display: inline-flex; align-items: center; gap: 12px; min-height: 52px; width: 100%;
    border: 1px solid #e4ebe6; border-radius: 14px; padding: 8px 14px; background: #fbfdfb;
    font-weight: 700;
}
.icon-picker-preview {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--accent); font-size: 26px; flex: none;
}
.icon-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px;
    max-height: 260px; overflow: auto; padding: 10px; border: 1px solid #e4ebe6;
    border-radius: 16px; background: #f7faf8;
}
.icon-choice {
    position: relative; width: 100%; aspect-ratio: 1; border: 1px solid transparent; border-radius: 12px;
    background: white; font-size: 24px; cursor: pointer; display: grid; place-items: center;
    margin: 0; padding: 0;
}
.icon-choice input {
    appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0.01; cursor: pointer; z-index: 1;
}
.icon-choice:hover { border-color: var(--primary); background: #eef8f1; }
.icon-choice:has(input:checked),
.icon-choice:has(input:focus-visible) {
    border-color: var(--primary); background: var(--accent); box-shadow: inset 0 0 0 1px var(--primary);
}
.panel-body.has-site-theme .icon-picker-current,
.panel-body.has-site-theme .icon-picker-grid,
.panel-body.has-site-theme .icon-choice { background: var(--bg); color: var(--text); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.panel-body.has-site-theme .icon-choice:has(input:checked) { background: var(--accent); border-color: var(--primary); }
.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
    width: 100%; border: 1px solid #e4ebe6; background: #fbfdfb; border-radius: 14px; padding: 12px 14px;
}
.field textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.alert { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.alert-success { background: var(--accent); color: var(--primary-dark); }
.alert-error { background: #fdecec; color: #9d2c2c; }

.panel-body { min-height: 100vh; background: #f4f7f5; }
.panel-body.has-site-theme { background: var(--bg); color: var(--text); }
.panel-body.has-site-theme .sidebar { background: var(--primary-dark); }
.panel-body.has-site-theme .stat,
.panel-body.has-site-theme .card { background: var(--card); color: var(--text); }
.panel-body.has-site-theme .field input:not([type="radio"]):not([type="checkbox"]),
.panel-body.has-site-theme .field select,
.panel-body.has-site-theme .field textarea,
.panel-body.has-site-theme .period-form select,
.panel-body.has-site-theme .period-form input,
.panel-body.has-site-theme .dish-filters input,
.panel-body.has-site-theme .dish-filters select,
.panel-body.has-site-theme .list-filters input,
.panel-body.has-site-theme .list-filters select { background: var(--bg); color: var(--text); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.panel-body.has-site-theme th,
.panel-body.has-site-theme td { border-bottom-color: color-mix(in srgb, var(--text) 12%, transparent); }
.panel-body.has-site-theme .tabs button,
.panel-body.has-site-theme .template-card,
.panel-body.has-site-theme .color-field,
.panel-body.has-site-theme .pager a,
.panel-body.has-site-theme .pager span,
.panel-body.has-site-theme .compare-col { background: var(--bg); color: var(--text); }
.panel-body.has-site-theme .tabs button.active,
.panel-body.has-site-theme .template-card:has(input:checked) { background: var(--card); color: var(--text); border-color: var(--primary); }
.panel-body.has-site-theme .bar,
.panel-body.has-site-theme .compare-meter i,
.panel-body.has-site-theme .compare-col.todayish .compare-meter i { background: var(--primary); }
.panel-body.has-site-theme .compare-col.todayish { background: var(--accent); }
.panel-body.has-site-theme .delta.up { color: var(--primary-dark); }
.panel-body.template-midnight { color-scheme: dark; }
.panel-app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: #122018; color: white; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; }
.sidebar .brand { color: white; }
.side-links { display: flex; flex-direction: column; gap: 4px; }
.side-links a {
    display: flex; align-items: center; gap: 10px; min-height: 44px;
    padding: 8px 12px; border-radius: 12px; color: #d5e2da; font-weight: 600;
}
.side-links a.active, .side-links a:hover { background: rgba(255,255,255,.12); color: white; }
.side-links svg {
    width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.side-links circle.dot { fill: currentColor; stroke: none; }
.side-user {
    margin-top: auto; color: #b7c7be; font-size: 14px; text-decoration: none;
    display: block; border-radius: 12px; padding: 8px 10px; margin-left: -10px; margin-right: -10px;
}
.side-user:hover { color: #eef6f1; background: rgba(255, 255, 255, 0.06); }
.side-user strong { color: inherit; }
.panel-main { padding: 22px; }
.panel-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.nav-toggle { display: none; }
.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.dish-filters, .list-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: -4px 0 16px; }
.dish-filters label, .list-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 180px; font-size: 13px; font-weight: 700; color: var(--muted); }
.dish-filters .grow, .list-filters .grow { flex: 1 1 280px; }
.dish-filters input, .dish-filters select, .list-filters input, .list-filters select {
    width: 100%; min-height: 44px; border: 1px solid #e4ebe6; border-radius: 14px;
    padding: 10px 12px; background: #fbfdfb; color: inherit; font: inherit; font-weight: 600;
}
.dish-filters .btn, .list-filters .btn { min-height: 44px; }
.entry-pager {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
    margin: 0 0 14px; padding: 10px 16px; background: white; border: 1px solid #e7eee9; border-radius: 16px;
}
.entry-pager.bottom { margin: 14px 0 0; }
.entry-summary { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.entry-pages { display: flex; gap: 6px; align-items: center; justify-self: center; }
.entry-pages a, .entry-pages span {
    min-width: 36px; height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid #e4ebe6; background: white; color: #5d6b63; font-weight: 700;
}
.entry-pages .current { background: var(--primary); border-color: var(--primary); color: white; }
.entry-pages .disabled { opacity: .4; }
.entry-pages .gap { border: 0; background: transparent; min-width: 24px; }
.panel-body.has-site-theme .entry-pager { background: var(--card); border-color: color-mix(in srgb, var(--text) 12%, transparent); }
.panel-body.has-site-theme .entry-pages a,
.panel-body.has-site-theme .entry-pages span { background: var(--bg); color: var(--text); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.panel-body.has-site-theme .entry-pages .current { background: var(--primary); border-color: var(--primary); color: white; }
.page-head h1 { font-size: 30px; line-height: 1.3; }
.page-head p { color: var(--muted); }
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat, .card { background: white; border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 rgba(20,40,30,.04); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; font-size: 28px; margin-top: 4px; }
.card + .card { margin-top: 12px; }
.chart-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 12px; margin-bottom: 16px; align-items: start; }
.period-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.period-form select, .period-form input[type="date"], .period-form input[type="month"], .period-form input[type="number"] {
    border: 1px solid #e4ebe6; border-radius: 12px; padding: 10px 12px; background: #fbfdfb;
}
.chart-summary { display: flex; gap: 18px; margin-bottom: 8px; }
.chart-summary strong { display: block; font-size: 20px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; overflow-x: auto; padding: 8px 0 0; }
.bar-col { flex: 1 0 16px; min-width: 16px; height: 100%; display: flex; flex-direction: column; align-items: center; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: min(100%, 22px); background: #22a45d; border-radius: 7px 7px 3px 3px; min-height: 0; }
.bar-col span { margin-top: 6px; font-size: 10px; color: #667069; line-height: 1; }
.compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-col { background: #f6faf7; border-radius: 16px; padding: 12px; }
.compare-col.todayish { background: #e8f7ee; }
.compare-meter { height: 8px; border-radius: 999px; background: #e3ebe6; overflow: hidden; margin: 8px 0; }
.compare-meter i { display: block; height: 100%; background: #8fb89a; border-radius: inherit; }
.compare-col.todayish .compare-meter i { background: #22a45d; }
.delta { font-weight: 800; font-size: 14px; }
.delta.up { color: #178746; }
.delta.down { color: #c24141; }
.delta.flat { color: #667069; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #eef2ef; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; font-weight: 700; }
.thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--accent); }
.dish-open { color: inherit; cursor: pointer; }
.dish-open:hover { color: var(--primary-dark); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--primary-dark); }
.pill-warn { background: #fff4d8; color: #8a5b10; }
.pill-muted { background: #eef1ef; color: #667069; }
.pill-danger { background: #fdecec; color: #9d2c2c; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dish-table td.row-actions {
    display: table-cell;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
}
.dish-table td.row-actions > a,
.dish-table td.row-actions > form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0;
}
.dish-table td.row-actions > form { margin-left: 8px; }
.dish-table td.row-actions .btn {
    box-sizing: border-box;
    width: 96px;
    height: 64px;
    padding: 10px 16px;
    border-radius: 14px;
}
.dish-table td.row-actions .btn-ghost {
    background: var(--primary);
    color: white;
}
.dish-table td.row-actions .btn-ghost:hover { background: var(--primary-dark); }
.dish-table td.row-actions .btn-danger {
    background: var(--danger);
    color: white;
}
.dish-table td.row-actions .btn-danger:hover { background: #b43232; }
.form-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: #eef3ef; border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 700; }
.tabs button.active { background: var(--primary); color: white; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f7faf8; border-radius: 14px; padding: 8px 10px; }
.color-field input { width: 46px; height: 32px; border: 0; background: transparent; padding: 0; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.template-card { border: 2px solid transparent; border-radius: 16px; padding: 12px; background: #f7faf8; display: block; cursor: pointer; }
.template-card.selected, .template-card:has(input:checked) { border-color: var(--primary); background: white; }
.template-card input { margin-right: 6px; }
.swatches { display: flex; gap: 4px; margin-top: 8px; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.mini-phone { border-radius: 24px; padding: 12px; background: var(--bg); color: var(--text); }
.mini-card { background: var(--card); border-radius: 16px; overflow: hidden; }
.mini-card img { height: 110px; width: 100%; object-fit: cover; }
.mini-card div { padding: 10px; }
.mini-card button { margin-top: 8px; background: var(--primary); color: white; border: 0; border-radius: 999px; padding: 8px 12px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 12px; }
.pager a, .pager span { padding: 6px 10px; border-radius: 999px; background: #eef3ef; }
.help { color: var(--muted); font-size: 13px; }

.menu-body { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.phone {
    width: min(440px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}
.phone-scroll { flex: 1 1 auto; min-width: 0; width: 100%; overflow: visible; padding-bottom: 12px; }
.cover { position: relative; height: 228px; background: linear-gradient(160deg, var(--primary), var(--primary-dark)); }
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.62)); }
.cover-copy {
    position: absolute; inset: 0; z-index: 1; color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 4px; padding: 42px 18px 16px;
}
.logo-bubble, .logo-fallback {
    width: min(210px, 68%); height: 84px; border-radius: 18px; object-fit: contain; object-position: center;
    background: white; padding: 6px 12px; flex: none;
    box-shadow: 0 8px 18px rgba(0,0,0,.18); border: 3px solid white;
}
.logo-fallback { width: 72px; height: 72px; display: grid; place-items: center; font-size: 28px; padding: 0; }
.cover-copy h1 { font-size: 22px; line-height: 1.3; }
.cover-copy p { color: rgba(255,255,255,.9); font-size: 13px; }
.menu-tools { margin-top: -18px; padding: 0 16px; position: relative; }
.search {
    display: flex; gap: 8px; align-items: center; background: var(--card); border-radius: 999px; padding: 12px 14px;
    box-shadow: var(--shadow);
}
.search input { border: 0; outline: 0; width: 100%; background: transparent; }
.chips {
    display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 14px 16px 4px;
    scrollbar-width: none; cursor: grab; user-select: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chips.is-dragging { cursor: grabbing; }
.chips.is-dragging a { pointer-events: none; }
.chips a { flex: none; background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.chips a.active { background: var(--primary); color: white; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 16px 8px; }
.section-title h2 { font-size: 18px; }
.section-title span { color: var(--muted); font-size: 13px; }
.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
.food-tile { width: 180px; flex: none; background: var(--card); border-radius: 18px; overflow: hidden; }
.food-tile img, .food-tile .ph { width: 100%; height: 110px; object-fit: cover; background: var(--accent); display: grid; place-items: center; font-size: 32px; }
.food-tile div { padding: 10px; }
.food-tile strong { display: block; font-size: 14px; line-height: 1.35; }
.food-tile em { color: var(--primary); font-style: normal; font-weight: 800; }
.dish { display: flex; gap: 12px; margin: 10px 16px; background: var(--card); border-radius: 22px; padding: 10px; align-items: center; }
.dish-photo { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; flex: none; background: var(--accent); display: grid; place-items: center; font-size: 30px; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-body { min-width: 0; flex: 1; }
.dish-title { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dish-title h2 { font-size: 15px; line-height: 1.35; }
.off { background: #f6e7b8; color: #7a5b12; border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 800; flex: none; }
.cook-time {
    display: inline-flex; align-items: center; gap: 4px; width: fit-content;
    margin: 4px 0 6px; padding: 3px 8px; border-radius: 999px;
    background: var(--accent); color: var(--primary-dark); font-size: 12px; font-weight: 700;
}
.dish-meta { display: flex; gap: 8px; color: var(--muted); font-size: 12px; margin: 4px 0 8px; flex-wrap: wrap; }
.time-form { display: flex; gap: 6px; align-items: center; }
.time-form input {
    width: 72px; border: 1px solid #d7e3db; border-radius: 12px; padding: 8px 10px; background: #fbfdfb;
}
.time-form span { color: var(--muted); font-size: 13px; }
.star { color: #e0a100; font-weight: 700; }
.dish-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dish-price s { color: var(--muted); margin-right: 6px; font-size: 12px; }
.dish-price strong { color: var(--primary); font-size: 16px; }
.add-btn { background: var(--primary); color: white; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; cursor: pointer; }
.tabbar, .dock {
    display: flex; gap: 8px; justify-content: space-between; align-items: center;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.tabbar a { flex: 1; text-align: center; font-weight: 700; color: var(--muted); position: relative; }
.tabbar a.active { color: var(--primary); }
.badge {
    position: absolute; top: -6px; margin-left: 4px; background: var(--primary); color: white;
    border-radius: 999px; font-size: 11px; min-width: 18px; padding: 1px 5px;
}
.badge[hidden] { display: none; }
.cart-toast {
    position: absolute; left: 16px; right: 16px; bottom: 74px; z-index: 6;
    background: #17241c; color: white; border-radius: 14px; padding: 10px 14px;
    text-align: center; font-weight: 700; pointer-events: none;
}
.cart-toast[hidden] { display: none; }
.hero-dish { position: relative; height: 250px; background: #d7e5dc; }
.hero-dish img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn {
    position: absolute; top: max(14px, env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,.92); color: #1c1c1c; font-weight: 800;
}
.password-dialog {
    width: min(420px, calc(100% - 32px)); border: 0; border-radius: 24px; padding: 22px;
    box-shadow: var(--shadow); color: var(--text); background: white;
}
.password-dialog::backdrop { background: rgba(16, 24, 20, .45); }
.password-dialog h2 { font-size: 24px; margin-bottom: 6px; }
.password-mask { -webkit-text-security: disc; }
.password-dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.order-summary { max-height: 42vh; overflow: auto; margin: 12px 0; }
.order-summary p { margin: 0 0 6px; }
.order-summary .confirm-items { border-top: 1px solid #e7eee9; margin-top: 8px; padding-top: 8px; }
.install-app {
    margin: 8px 16px 0; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--primary); color: white; font-weight: 800;
}
.icon-btn.left { left: 14px; }
.sheet { margin-top: -28px; background: var(--card); border-radius: 28px 28px 0 0; padding: 16px 16px 20px; position: relative; }
.sheet-head { display: flex; gap: 10px; }
.sheet-head img, .sheet-fallback { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--accent); display: grid; place-items: center; }
.sheet h1 { font-size: 22px; line-height: 1.3; }
.sheet .desc { color: var(--muted); margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stats div { background: var(--bg); border-radius: 16px; padding: 10px; text-align: center; }
.stats strong { display: block; }
.stats span { color: var(--muted); font-size: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 999px; padding: 4px; }
.stepper button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--card); cursor: pointer; font-weight: 800; }
.stepper input { width: 36px; border: 0; background: transparent; text-align: center; font-weight: 800; }
.dock strong { font-size: 18px; }
.dock small { display: block; color: var(--muted); }
.cart-line { display: flex; gap: 10px; align-items: center; }
.cart-line .grow { flex: 1; }
.choice { display: flex; gap: 8px; }
.choice label { flex: 1; text-align: center; background: var(--bg); border-radius: 14px; padding: 10px 6px; font-weight: 700; font-size: 14px; }
.choice input { display: none; }
.choice label:has(input:checked) { background: var(--primary); color: white; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.qr-sheet { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px; }
.qr-sheet img { width: 220px; height: 220px; background: white; border-radius: 12px; }
.qr-sheet .qr-logo { width: min(280px, 80%); height: 96px; object-fit: contain; background: transparent; border-radius: 0; }

@media (max-width: 759px) {
    input, select, textarea { font-size: 16px; }
    .add-btn, .chips a, .tabbar a, .btn { min-height: 44px; }
    .tabbar a { display: flex; align-items: center; justify-content: center; }
    .tabbar, .dock { position: sticky; bottom: 0; z-index: 5; }
    .cover { height: 200px; }
    .dish { margin: 8px 12px; }
    .dish-photo { width: 84px; height: 84px; }
    .h-scroll, .chips, .table-wrap { -webkit-overflow-scrolling: touch; }
    .page-head, .panel-top { flex-wrap: wrap; }
    .entry-pager { grid-template-columns: 1fr; justify-items: center; }
    .auth-card { margin: 24px auto; }
}
@media (max-width: 380px) {
    .cover-copy { padding-top: 36px; }
    .cover-copy h1, .sheet h1 { font-size: 18px; }
    .logo-bubble { height: 68px; }
    .food-tile { width: 150px; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .cover, .hero-dish { height: 150px; }
}
html.layout-tablet .phone {
    width: min(1120px, 100%);
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
html.layout-tablet .phone-scroll { overflow: visible; height: auto; }
html.layout-tablet .cover { height: 280px; }
html.layout-tablet .logo-bubble { width: min(280px, 42%); height: 104px; }
html.layout-tablet .cover-copy h1 { font-size: 34px; }
html.layout-tablet .menu-tools { padding-left: 24px; padding-right: 24px; }
html.layout-tablet .chips,
html.layout-tablet .section-title { padding-left: 24px; padding-right: 24px; }
html.layout-tablet .chips { flex-wrap: wrap; overflow: visible; }
html.layout-tablet .h-scroll {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding-left: 24px;
    padding-right: 24px;
}
html.layout-tablet .food-tile { width: auto; }
html.layout-tablet .menu-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 4px 24px 28px;
}
html.layout-tablet .menu-board .dish { margin: 0; }
html.layout-tablet .menu-board .empty { grid-column: 1 / -1; }
html.layout-tablet .dish-photo { width: 112px; height: 112px; }
html.layout-tablet .tabbar,
html.layout-tablet .dock { position: sticky; bottom: 0; z-index: 5; }
html.layout-tablet .hero-dish { height: 380px; }
html.layout-tablet .sheet { max-width: 760px; margin-left: auto; margin-right: auto; }
html.layout-tablet #cart-form {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
    align-items: start;
    padding: 8px 24px 24px;
}
html.layout-tablet #cart-form .dish { margin: 0 0 12px; }
html.layout-tablet #cart-form .sheet { margin: 0; max-width: none; }
html.layout-tablet #qty-form { grid-column: 1 / -1; }
html.layout-wide .menu-board { grid-template-columns: 1fr 1fr 1fr; }
html.layout-wide .h-scroll { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 860px) {
    .hero, .form-grid, .grid-stats, .feature-grid, .chart-grid, .compare-pair { grid-template-columns: 1fr; }
    .panel-app { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-flex; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-105%); z-index: 40; transition: transform .2s ease; }
    .sidebar.open { transform: none; }
    .panel-main { padding: 16px; }
}
@media print {
    .sidebar, .panel-top, .no-print { display: none !important; }
    .panel-app { display: block; }
    .qr-sheet { box-shadow: none; }
}
