:root {
    --bg-canvas: #F7F7F6;
    --text-ink: #111110;
    --text-muted: #666662;
    --border-subtle: #E8E8E6;
    --nav-bg: rgba(255, 255, 255, 0.75);
    --nav-border: rgba(255, 255, 255, 0.6);
    --nav-shadow: 0 12px 40px rgba(17, 17, 16, 0.08);
    
    --font-display: 'Instrument Serif', serif;
    --font-ui: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-pill: 100px;
    
    --ease-morph: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-ui);
    background-color: #EAEAE8; /* Desktop frame color */
    color: var(--text-ink);
    line-height: 1.5;
}

#app {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--bg-canvas);
    min-height: 100vh;
    position: relative;
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    padding-bottom: 100px; /* Space for nav */
}

@media (max-width: 500px) {
    #app { border: none; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 2.2rem; }
    .category-title { font-size: 1.5rem; }
    .nav-label { font-size: 0.75rem; }
}

/* Views */
.view {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s var(--ease-morph) forwards;
    padding: 24px 20px;
    max-width: 600px;
    margin: 0 auto;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* Home & Editorial Content */
.hero {
    margin-bottom: 32px;
}
.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 12px;
    text-wrap: balance;
}
.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-wrap: pretty;
}

.category-title {
    font-size: 2rem;
    margin: 32px 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.menu-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--border-subtle);
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-item-content {
    flex: 1;
}
.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.menu-item-title {
    font-weight: 600;
    font-size: 1.1rem;
}
.menu-item-price {
    font-weight: 500;
    font-family: var(--font-ui);
}
.menu-item-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    text-wrap: pretty;
}
.menu-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #EAEAE8;
}

/* Editorial Spec */
.editorial-hero {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-md);
    background: #EAEAE8;
    margin-bottom: 24px;
    object-fit: cover;
}
.editorial-body p {
    margin-bottom: 16px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-wrap: pretty;
}
.editorial-body p:first-of-type {
    color: var(--text-ink);
    font-size: 1.25rem;
}

/* Search */
.search-header {
    position: sticky;
    top: 0;
    background: var(--bg-canvas);
    padding: 16px 0 24px;
    z-index: 10;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.2rem;
}
.search-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    background: transparent;
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-ink);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.search-input-wrapper input:focus {
    border-color: var(--text-ink);
}

.empty-state {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Floating Glassmorphism Nav */
.glass-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--nav-shadow);
    z-index: 100;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-pill);
    padding: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.4s var(--ease-morph);
    overflow: hidden;
}

.nav-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav-label {
    max-width: 0;
    opacity: 0;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.4s var(--ease-morph);
}

/* Active State morphs the tab */
.nav-item.active {
    background: var(--text-ink);
    color: #FFF;
    padding: 10px 20px 10px 16px;
}

.nav-item.active .nav-label {
    max-width: 100px;
    opacity: 1;
    margin-left: 8px;
}

/* Hover effects for non-touch devices */
@media (hover: hover) {
    .nav-item:not(.active):hover {
        background: rgba(0, 0, 0, 0.04);
        color: var(--text-ink);
    }
}