:root {
    --bg-gradient: linear-gradient(135deg, #5c0612 0%, #2a0004 50%, #0d0002 100%);
    --bg: #0d0002;
    --surface: rgba(20, 2, 4, 0.85);
    --surface-raised: rgba(45, 5, 10, 0.9);
    --cream: #F5F0E8;
    --cream-muted: #B8AFA5;
    --gold: #C9A227;
    --gold-light: #E6C247;
    --gold-dim: rgba(201,162,39,0.15);
    --copper: #B87333;
    --border: rgba(245, 240, 232, 0.12);
    --border-strong: rgba(245, 240, 232, 0.25);
    --brand-red: #8c0c1b;
    --brand-red-bright: #bd1327;
    --success: #2e7d32;
    --warning: #ff9800;
    --info: #2196f3;
    --radius: 16px;
    --radius-sm: 12px;
}

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

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--cream);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body { padding: 0; }

button, input {
    font: inherit;
    color: inherit;
}

button {
    border: none;
    cursor: pointer;
    background: none;
    transition: all .2s ease;
}

button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { opacity: .4; cursor: not-allowed; }

input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    width: 100%;
    color: var(--cream);
    font-size: 0.95rem;
}

input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

input::placeholder { color: var(--cream-muted); opacity: .6; }

.hidden { display: none !important; }

/* ---------- Layout ---------- */
.page-shell {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 100px;
}

/* ---------- Typography ---------- */
h1, h2, h3, .serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    margin: 0;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}

/* ---------- Header ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 24px;
}

.brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.brand span {
    font-weight: 400;
    opacity: .7;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cream-muted);
    padding: 6px 0;
    letter-spacing: 0.02em;
}

.btn-text:hover { color: var(--gold); }

.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 1.1rem;
    display: grid;
    place-items: center;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 32px 0 40px;
}

.hero-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    font-weight: 700;
    font-style: italic;
    color: var(--cream);
    line-height: 1.15;
    margin-bottom: 12px;
}

.hero-tagline {
    font-size: 0.9rem;
    color: var(--cream-muted);
    margin-bottom: 28px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    width: 100%;
    max-width: 320px;
}

.btn-gold {
    background: var(--gold);
    color: #0a0a0a;
}

.btn-gold:hover:not(:disabled) {
    background: var(--gold-light);
    box-shadow: 0 4px 20px rgba(201,162,39,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
    background: var(--gold-dim);
    border-color: var(--gold);
}

.btn-copper {
    background: var(--copper);
    color: #fff;
}

.btn-copper:hover:not(:disabled) { opacity: .9; }

.btn-sm {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.85rem;
    max-width: none;
    width: auto;
    flex: 1 1 auto;
}

/* ---------- Mesa Banner ---------- */
.mesa-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.mesa-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mesa-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    font-weight: 600;
}

.mesa-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cream);
}

/* ---------- Claim Section ---------- */
.claim-section {
    margin-bottom: 24px;
}

.claim-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.claim-form .field-grow { flex: 1 1 auto; margin: 0; }
.claim-form .btn { flex: 0 0 auto; white-space: nowrap; max-width: none; width: auto; }

.hint {
    font-size: 0.8rem;
    color: var(--cream-muted);
    margin: 10px 0 0;
    font-weight: 300;
}

/* ---------- Account Section ---------- */
.account-section {
    margin-bottom: 24px;
}

.account-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.account-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cream);
}

.account-balance {
    text-align: right;
}

.balance-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cream-muted);
    margin-bottom: 2px;
}

.balance-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.cashback-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(201,162,39,0.18);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, rgba(201,162,39,0.08), rgba(201,162,39,0.03)),
        var(--surface);
}

.cashback-banner p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--cream);
}

.cashback-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(201,162,39,0.12);
    border: 1px solid rgba(201,162,39,0.25);
    color: var(--gold-light);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.aba-lookup-status {
    margin: -4px 0 14px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(33,150,243,0.25);
    background: rgba(33,150,243,0.08);
    color: var(--cream);
    font-size: 0.82rem;
    line-height: 1.45;
}

.aba-lookup-status.ok {
    border-color: rgba(46,125,50,0.3);
    background: rgba(46,125,50,0.1);
}

.aba-lookup-status.warn {
    border-color: rgba(255,152,0,0.32);
    background: rgba(255,152,0,0.1);
}

.aba-lookup-status.error {
    border-color: rgba(211,47,47,0.32);
    background: rgba(211,47,47,0.1);
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.summary-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
}

.pill-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cream-muted);
    margin-bottom: 4px;
}

.summary-pill strong {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cream);
}

.pill-accent { border-color: var(--gold); background: rgba(201,162,39,0.06); }
.pill-accent strong { color: var(--gold); }

.account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.account-actions-compact {
    margin-bottom: 0;
}

.table-account-panel {
    margin-top: 4px;
}

.prepay-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.prepay-field span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cream-muted);
    font-weight: 600;
}

.prepay-field input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--cream);
}

.area-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cream-muted);
    margin: 18px 0 10px;
    font-weight: 500;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface-raised);
    color: var(--cream-muted);
    border: 1px solid var(--border);
}

.badge-primary { background: rgba(201,162,39,0.12); color: var(--gold); border-color: rgba(201,162,39,0.25); }
.badge-success { background: rgba(46,125,50,0.12); color: #81c784; border-color: rgba(46,125,50,0.25); }

/* ---------- Lists ---------- */
.list-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    padding: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--cream-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-style: italic;
}

.order-entry, .payment-entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.entry-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.entry-row strong {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cream);
}

.entry-meta {
    font-size: 0.8rem;
    color: var(--cream-muted);
    margin-top: 2px;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot--sent    { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.status-dot--served  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot--active  { background: var(--info);    box-shadow: 0 0 6px var(--info); }

/* ---------- Transfer Box ---------- */
.transfer-box {
    background: rgba(201,162,39,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 14px;
    font-size: 0.85rem;
}

.transfer-box strong {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gold);
}

.checkout-link, .inline-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--gold);
    color: #0a0a0a;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------- Categories Nav ---------- */
.categories-nav {
    margin-bottom: 28px;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
}

.category-card:hover {
    border-color: var(--gold);
    background: rgba(201,162,39,0.05);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 4px;
}

.category-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cream);
    letter-spacing: 0.02em;
}

.category-desc {
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 500;
}

/* ---------- Recomendados ---------- */
.recomendados {
    margin-bottom: 28px;
}

.product-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.product-scroll::-webkit-scrollbar { display: none; }

.product-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-card .product-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.product-card .product-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cream);
}

.product-card .product-desc {
    font-size: 0.72rem;
    color: var(--cream-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
}

/* ---------- Menu ---------- */
.menu-section { margin-bottom: 32px; }

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-category {
    margin-bottom: 8px;
}

.menu-category-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item-card {
    display: flex;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    transition: all .2s ease;
}

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

.menu-item-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.menu-item-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item-info strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cream);
}

.menu-item-info small {
    font-size: 0.8rem;
    color: var(--cream-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}

.menu-item-price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
}

.btn-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: #0a0a0a;
    font-size: 1.3rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

.btn-add:hover:not(:disabled) {
    background: var(--gold-light);
    box-shadow: 0 2px 12px rgba(201,162,39,0.3);
}

.btn-add:disabled {
    background: var(--surface-raised);
    color: var(--cream-muted);
    opacity: .4;
}

/* ---------- Connection Box ---------- */
.connection-box {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.connection-box summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--cream-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.field span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cream-muted);
}

/* ---------- Modal ---------- */
.modal, .drawer {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal.hidden, .drawer.hidden { display: none !important; }

.modal-backdrop, .drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
}

.modal-sheet {
    position: relative;
    background: var(--surface);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    padding: 24px;
    overflow-y: auto;
    animation: slideUp .3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--cream-muted);
    display: grid;
    place-items: center;
    font-size: 1rem;
    z-index: 10;
}

.modal-close:hover { color: var(--cream); border-color: var(--gold); }

.modal-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 8px;
}

.modal-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.modal-product h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 4px;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--cream-muted);
    margin-bottom: 20px;
    line-height: 1.4;
    max-width: 280px;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--cream);
    font-size: 1.4rem;
    font-weight: 300;
    display: grid;
    place-items: center;
    transition: all .2s ease;
}

.qty-btn:hover { border-color: var(--gold); color: var(--gold); }

.qty-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: var(--cream);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.modal-total {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
}

/* ---------- Drawer ---------- */
.drawer-panel {
    position: relative;
    background: var(--surface);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cream);
}

.drawer-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-footer {
    padding: 16px 22px 24px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}

.drawer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--cream-muted);
}

.drawer-total-row strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    color: var(--gold);
}

.cart-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-line:last-child { border-bottom: none; }

.cart-line strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
}

.cart-line .cart-meta {
    font-size: 0.78rem;
    color: var(--cream-muted);
    margin-top: 2px;
    font-style: italic;
}

.cart-line .cart-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.cart-line .cart-actions button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    color: var(--cream);
}

.cart-line .cart-actions button:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- FAB ---------- */
.fab {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 800;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(201,162,39,0.35);
    border: 2px solid rgba(255,255,255,0.08);
    transition: transform .15s ease, box-shadow .2s ease;
}

.fab:hover { box-shadow: 0 8px 32px rgba(201,162,39,0.45); }
.fab:active { transform: scale(0.92); }

.fab-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #fff;
    color: #0a0a0a;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--gold);
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--surface-raised);
    color: var(--cream);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ---------- Footer ---------- */
.app-footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.footer-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}

.footer-brand span { font-weight: 400; opacity: .7; }

.footer-address {
    font-size: 0.8rem;
    color: var(--cream-muted);
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover { text-decoration: underline; }

/* ---------- Identity / Brand Custom Header ---------- */
.identity-header {
    position: relative;
    background: var(--cream);
    color: var(--bg);
    padding: 36px 16px 24px;
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), inset 0 0 16px rgba(184,175,165,0.25);
    margin-bottom: 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.identity-header::before, .identity-header::after {
    content: '';
    position: absolute;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border: 1px solid rgba(13,0,2,0.1);
    pointer-events: none;
    border-radius: 4px;
}
.identity-header::before { top: 8px; left: 8px; border-left: none; border-right: none; }
.identity-header::after { top: 8px; left: 8px; border-top: none; border-bottom: none; }

.identity-header .crop-corner {
    position: absolute;
    width: 8px; height: 8px;
    border-color: rgba(13,0,2,0.25);
    border-style: solid; border-width: 0;
}
.identity-header .crop-tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.identity-header .crop-tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.identity-header .crop-bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.identity-header .crop-br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

.identity-script {
    font-family: 'Great Vibes', cursive;
    font-size: 3.6rem;
    line-height: 0.85;
    color: var(--brand-red);
    transform: rotate(-4deg);
    margin-bottom: 4px;
}

.identity-num {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bg);
    position: absolute;
    right: 36px;
    bottom: 16px;
    transform: rotate(-4deg);
}

.identity-sub {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--cream-muted);
    margin-top: 12px;
}

.identity-side {
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20,2,4,0.7);
    border: 1px solid rgba(245,240,232,0.15);
    padding: 16px 6px;
    border-radius: 6px;
    display: none;
}
@media (min-width: 480px) {
    .identity-side { display: flex; }
}
.identity-side span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--cream-muted);
}

/* ---------- Map Selector Component ---------- */
.map-selector {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.map-selector-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.02em;
}

.floor-section {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 14px;
}
.floor-section:last-child { margin-bottom: 0; }

.floor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.floor-badge {
    display: inline-flex;
    align-items: center;
    background: var(--brand-red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(189,19,39,0.3);
}

.floor-meta {
    font-size: 0.7rem;
    color: var(--cream-muted);
    font-weight: 500;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
    justify-items: center;
}

.table-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 2px solid rgba(255,255,255,0.12);
    color: var(--cream);
    font-size: 0.85rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
}

.table-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.05);
}

.table-btn.selected {
    background: var(--success);
    color: #fff;
    border-color: #81c784;
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(46,125,50,0.6);
    z-index: 2;
}

.table-btn.selected::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 4px var(--gold-light);
}

.map-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .page-shell { padding: 24px; max-width: 480px; }
    .modal-sheet, .drawer-panel { max-width: 440px; border-radius: var(--radius); margin-bottom: 24px; }
    .drawer-panel { max-height: 70vh; }
    .hero-quote { font-size: 2.4rem; }
}
