:root {
    --ink: #171310;
    --muted: #71685f;
    --line: #ece5dd;
    --paper: #fffaf3;
    --surface: #ffffff;
    --accent: #b21f32;
    --accent-2: #d99b31;
    --green: #0f7a52;
    --shadow: 0 18px 55px rgba(43, 30, 20, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.menu-hero {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 0 14px;
    color: #fff;
    background: linear-gradient(135deg, #171310 0%, #4a171f 58%, #8a1b2b 100%);
    box-shadow: 0 16px 40px rgba(20, 10, 8, .22);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .75);
}

.qr-card {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, .95);
    border-radius: 8px;
}

.qr-card img {
    width: 82px;
    height: 82px;
    display: block;
}

.qr-card a {
    max-width: 92px;
    color: var(--ink);
    font-size: .78rem;
    line-height: 1.15;
    font-weight: 800;
    text-decoration: none;
}

.eyebrow,
.address {
    margin: 0;
    color: rgba(255, 255, 255, .76);
}

.eyebrow {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: 0;
}

h1 {
    margin: 2px 0 4px;
    font-size: clamp(1.45rem, 5vw, 2.7rem);
    line-height: 1.05;
    font-weight: 800;
}

.quick-actions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 14px;
}

.quick-actions a,
.quick-actions span {
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: .92rem;
}

.menu-shell {
    padding-top: 18px;
    padding-bottom: 40px;
}

.search-panel {
    position: sticky;
    top: 126px;
    z-index: 15;
    padding: 12px 0;
    background: var(--paper);
}

.search-panel label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: .82rem;
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 16px;
    background: #fff;
    color: var(--ink);
    outline: none;
    box-shadow: var(--shadow);
}

.search-panel input:focus {
    border-color: var(--accent-2);
}

.category-tabs {
    position: sticky;
    top: 210px;
    z-index: 14;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 14px;
    background: var(--paper);
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar,
.quick-actions::-webkit-scrollbar {
    display: none;
}

.category-tabs a {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.category-tabs a.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.category-section {
    scroll-margin-top: 270px;
    padding-top: 16px;
}

.category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.category-heading h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 850;
}

.category-heading span {
    color: var(--muted);
    font-size: .86rem;
}

.items-list {
    display: grid;
    gap: 10px;
}

.menu-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 96px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(38, 27, 20, .07);
}

.menu-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3ebe1;
}

.item-copy {
    min-width: 0;
}

.item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-title-row h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.item-copy p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.35;
}

.item-copy small {
    display: inline-block;
    margin-top: 6px;
    color: var(--green);
    font-weight: 800;
}

.promo {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: #fff;
    background: var(--green);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.price {
    align-self: start;
    padding-top: 4px;
    color: var(--accent);
    white-space: nowrap;
    font-size: .96rem;
}

.empty-state {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.admin-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--paper);
}

.admin-box {
    width: min(100%, 460px);
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.admin-box img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-box h1 {
    margin-top: 18px;
    color: var(--ink);
    font-size: 1.55rem;
}

.admin-box p,
.admin-box label {
    color: var(--muted);
}

.admin-box form {
    display: grid;
    gap: 14px;
}

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

@media (min-width: 760px) {
    .menu-shell {
        max-width: 920px;
    }

    .brand-logo {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
    }

    .qr-card {
        display: flex;
    }

    .search-panel {
        top: 150px;
    }

    .category-tabs {
        top: 235px;
    }

    .items-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-item {
        grid-template-columns: 84px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .menu-item img {
        width: 84px;
        height: 84px;
        grid-row: span 2;
    }

    .price {
        grid-column: 2;
        padding-top: 0;
    }
}
