:root {
    --bg: #17130f;
    --card-bg: #221c16;
    --gold: #d4a24e;
    --gold-soft: #e9c67a;
    --text: #f2ece2;
    --text-muted: #b8ada0;
    --border: #3a2f24;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 90px;
}

.topbar {
    text-align: center;
    padding: 32px 16px 20px;
    border-bottom: 1px solid var(--border);
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--gold-soft);
    font-family: Georgia, 'Times New Roman', serif;
}

.topbar p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.quick-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 6px 14px;
}

.menu-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.category {
    margin-bottom: 36px;
}

.category h2 {
    color: var(--gold);
    font-size: 20px;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.item-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, transform .15s;
}

.item-card:hover {
    border-color: var(--gold);
}

.item-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold);
}

.item-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.item-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #2a231a;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    opacity: .4;
}

.check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    border: 1.5px solid var(--text-muted);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all .15s;
}

.item-card.selected .check-badge {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1a1a;
}

.item-info {
    padding: 12px 14px 14px;
}

.item-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.item-info p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.price {
    color: var(--gold-soft);
    font-weight: 600;
    font-size: 15px;
}

.selection-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gold);
    color: #1a1a1a;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    box-shadow: 0 -4px 12px rgba(0,0,0,.3);
    z-index: 20;
}

.selection-bar.visible {
    display: flex;
}

.selection-bar button {
    background: #1a1a1a;
    color: var(--gold-soft);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.selection-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 30;
}

.selection-modal.open {
    display: flex;
}

.selection-modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.selection-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selection-modal-header h3 {
    margin: 0;
    color: var(--gold-soft);
}

.selection-modal-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

#selectionList {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    overflow-y: auto;
    flex: 1;
}

#selectionList li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.selection-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.selection-modal-footer strong {
    color: var(--gold-soft);
}

.selection-modal-footer button {
    background: var(--gold);
    color: #1a1a1a;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 480px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
