:root {
  --font-sans: "Engravers Gothic BT", "EngraversGothic BT", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-display: "Pacific Again", "Pacific Again", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --shadow: 0 4px 24px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .2s ease;
  --max-width: 1200px;
  --header-h: 64px;
}

/* Anhelo brand type: the production site serves these faces by these names.
   Keep the local fallback chain so the app remains dependency-free offline. */
@font-face { font-family: "Pacific Again"; src: local("Pacific Again"), url("/assets/fonts/pacific-again.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Engravers Gothic BT"; src: local("Engravers Gothic BT"), url("/assets/fonts/engravers-gothic-bt.ttf") format("truetype"); font-display: swap; }

[data-theme="dark"] {
  --bg: #292320;
  --surface: #352d29;
  --surface-2: #423733;
  --text: #faeeda;
  --text-2: #e5d3c2;
  --muted: #bba393;
  --border: #695053;
  --primary: #997d6f;
  --primary-hover: #b59684;
  --primary-text: #faeeda;
  --accent: #c6a996;
  --danger: #E87A8A;
  --success: #4CAF50;
  --focus: #D4A574;
}

[data-theme="light"] {
  --bg: #faeeda;
  --surface: #fff8ee;
  --surface-2: #f2dfcf;
  --text: #292320;
  --text-2: #4e403a;
  --muted: #695053;
  --border: #d4b9a8;
  --primary: #997d6f;
  --primary-hover: #7d6258;
  --primary-text: #faeeda;
  --accent: #695053;
  --danger: #C41E3A;
  --success: #2E7D32;
  --focus: #C48B4A;
}

[data-theme="san-valentin-dark"] {
  --bg: #3D2B1F;
  --surface: #4A3728;
  --surface-2: #524030;
  --text: #FFF8F0;
  --text-2: #D4C4B0;
  --muted: #A89480;
  --border: #5A4630;
  --primary: #C41E3A;
  --primary-hover: #E87A8A;
  --primary-text: #FFF8F0;
  --accent: #E87A8A;
  --danger: #E87A8A;
  --success: #4CAF50;
  --focus: #C41E3A;
}

[data-theme="san-valentin-light"] {
  --bg: #FFF8F0;
  --surface: #F5EDE0;
  --surface-2: #E8DDD0;
  --text: #2D1B0E;
  --text-2: #5A4630;
  --muted: #8B7355;
  --border: #D4C4B0;
  --primary: #C41E3A;
  --primary-hover: #E87A8A;
  --primary-text: #FFF8F0;
  --accent: #E87A8A;
  --danger: #C41E3A;
  --success: #2E7D32;
  --focus: #C41E3A;
}

[data-theme="navidad-dark"] {
  --bg: #3D2B1F;
  --surface: #4A3728;
  --surface-2: #524030;
  --text: #FFF8F0;
  --text-2: #D4C4B0;
  --muted: #A89480;
  --border: #5A4630;
  --primary: #1B5E20;
  --primary-hover: #4CAF50;
  --primary-text: #FFF8F0;
  --accent: #4CAF50;
  --danger: #E87A8A;
  --success: #4CAF50;
  --focus: #1B5E20;
}

[data-theme="navidad-light"] {
  --bg: #FFF8F0;
  --surface: #F5EDE0;
  --surface-2: #E8DDD0;
  --text: #2D1B0E;
  --text-2: #5A4630;
  --muted: #8B7355;
  --border: #D4C4B0;
  --primary: #1B5E20;
  --primary-hover: #4CAF50;
  --primary-text: #FFF8F0;
  --accent: #4CAF50;
  --danger: #C41E3A;
  --success: #2E7D32;
  --focus: #1B5E20;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100%; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-text); padding: .75rem 1.5rem; border-radius: var(--radius); z-index: 10000; }
.skip-link:focus { top: 1rem; }

/* Layout */
.fixed-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; z-index: 100; }
.brand-mini { display: flex; align-items: center; gap: .5rem; color: var(--text); }
.brand-mini .name { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .04em; font-weight: 400; }
.brand-mini .name small { font-family: var(--font-sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: block; line-height: 1; }
.nav-desktop { display: none; gap: .5rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a { padding: .5rem 1rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav-desktop a:hover, .nav-desktop a.is-active { background: var(--primary); color: var(--primary-text); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.theme-toggle { width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon,
[data-theme="san-valentin-light"] .theme-toggle .moon,
[data-theme="navidad-light"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun,
[data-theme="san-valentin-light"] .theme-toggle .sun,
[data-theme="navidad-light"] .theme-toggle .sun { display: block; }
.menu-btn { padding: .5rem 1rem; border: none; background: var(--primary); color: var(--primary-text); border-radius: var(--radius-sm); font-weight: 600; display: flex; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .menu-btn { display: none; } }

.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 200; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.sheet.open { transform: translateX(0); }
.sheet header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.sheet-close { width: 44px; height: 44px; border: none; background: transparent; font-size: 2rem; color: var(--text); }
.sheet-section-label { padding: 1rem 1.5rem .5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
#site-menu-nav a { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; color: var(--text); border-bottom: 1px solid var(--border); }
#site-menu-nav a:hover { background: var(--surface); }
#site-menu-nav .num { color: var(--muted); }

/* Hero */
.hero { padding: calc(var(--header-h) + 3rem) 1.5rem 3rem; text-align: center; max-width: var(--max-width); margin: 0 auto; }
.eyebrow { font-size: .875rem; text-transform: uppercase; letter-spacing: .15em; color: var(--primary); font-weight: 600; display: inline-block; margin-bottom: .75rem; }
.eyebrow.with-tail::after { content: ""; display: inline-block; width: 3rem; height: 2px; background: var(--primary); margin-left: 1rem; vertical-align: middle; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 .5rem; font-weight: 400; line-height: 1.2; letter-spacing: .02em; }
.hero .accent { color: var(--primary); }
.tagline { font-size: 1.125rem; color: var(--text-2); max-width: 60ch; margin: 0 auto; }

/* Sections */
.section { padding: 3rem 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.section-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 2rem; text-align: center; }

/* Recommended */
.recommended-track { display: flex; gap: 1rem; overflow-x: auto; padding: .5rem; scroll-snap-type: x mandatory; }
.recommended-card { flex: 0 0 280px; scroll-snap-align: start; }

/* Quicknav */
.menu-quicknav { position: sticky; top: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); z-index: 50; padding: .5rem 0; }
.menu-quicknav-inner { max-width: var(--max-width); margin: 0 auto; display: flex; gap: .5rem; padding: 0 1.5rem; overflow-x: auto; }
.menu-quicknav a { padding: .5rem 1rem; background: var(--surface-2); border-radius: 999px; color: var(--text-2); font-size: .875rem; white-space: nowrap; }
.menu-quicknav a:hover, .menu-quicknav a.active { background: var(--primary); color: var(--primary-text); }

/* Menu Categories */
.menu-category { margin-bottom: 3rem; }
.category-title { font-family: var(--font-display); font-size: 1.75rem; letter-spacing: .04em; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--primary); display: inline-block; }
.menu-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.menu-card-image { aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.menu-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.menu-card:hover .menu-card-image img { transform: scale(1.05); }
.menu-card-content { padding: 1rem; }
.menu-card-name { font-size: 1.125rem; font-weight: 600; margin: 0 0 .25rem; }
.menu-card-desc { color: var(--text-2); font-size: .875rem; margin: 0 0 .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-card-footer { display: flex; justify-content: space-between; align-items: center; }
.menu-card-price { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.menu-card-tag { font-size: .7rem; text-transform: uppercase; background: var(--primary); color: var(--primary-text); padding: .125rem .5rem; border-radius: 999px; }
.menu-card-btn { width: 100%; padding: .75rem; background: var(--primary); color: var(--primary-text); border: none; border-radius: 0 0 var(--radius) var(--radius); font-weight: 600; margin-top: 1rem; }
.menu-card-btn:hover { background: var(--primary-hover); }

/* Dish Modal */
.dish-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.8); backdrop-filter: blur(4px); }
.dish-modal-content { background: var(--surface); border-radius: var(--radius); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; }
.dish-modal-image { aspect-ratio: 4/3; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.dish-modal-body { padding: 1.5rem; }
.dish-modal-name { margin: 0 0 .5rem; }
.dish-modal-desc { color: var(--text-2); margin: 0 0 1rem; }
.dish-modal-price { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 0 0 1rem; }
.dish-modal-options { margin-bottom: 1rem; }
.dish-modal-option { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.dish-modal-close { width: 100%; padding: 1rem; background: var(--primary); color: var(--primary-text); border: none; border-radius: 0 0 var(--radius) var(--radius); font-weight: 600; font-size: 1rem; }

/* Cart */
.cart-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; }
.cart-fab-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: var(--primary-text); border: none; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.cart-fab-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: white; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.cart-panel { position: fixed; inset: 0 0 0 auto; z-index: 250; background: var(--surface); transform: translateX(110%); transition: transform .3s ease; display: flex; flex-direction: column; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg); }
.cart-panel.open { transform: translateX(0); }
.cart-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem; }
.cart-item { display: flex; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.cart-item-image { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; margin: 0 0 .25rem; }
.cart-item-price { color: var(--primary); font-weight: 600; margin: 0; }
.cart-item-controls { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.cart-item-qty { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.cart-item-remove { color: var(--danger); background: none; border: none; font-size: .875rem; }
.cart-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.cart-total { font-size: 1.25rem; font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 1rem; }
.cart-checkout { width: 100%; padding: 1rem; background: var(--primary); color: var(--primary-text); border: none; border-radius: var(--radius); font-weight: 600; font-size: 1rem; }

/* CTA Banner */
.cta-banner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; }
.cta-banner .eyebrow { color: var(--primary); }
.cta-banner h2 { margin: .5rem 0 1rem; }
.cta-banner p { color: var(--text-2); margin: 0 0 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem; border: none; transition: all .2s; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; margin-bottom: .5rem; font-weight: 500; color: var(--text); }
.form-row input, .form-row textarea, .form-row select { width: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: var(--surface-2); }
.tag { background: var(--primary); color: var(--primary-text); padding: .125rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge { padding: .25rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge.pending { background: #FFF3E0; color: #E65100; }
.badge.redeemed { background: #E8F5E9; color: #2E7D32; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }
.filters { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters input, .filters select { padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }

/* Status messages */
.status { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.status.ok { background: #E8F5E9; color: #2E7D32; }
.status.error { background: #FDEDEC; color: #C41E3A; }

/* Admin */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--surface); border-right: 1px solid var(--border); padding: 1.5rem; height: 100vh; position: fixed; left: 0; top: 0; overflow-y: auto; }
.admin-sidebar h2 { font-family: "Pacifico", cursive; margin: 0 0 .5rem; color: var(--primary); }
.admin-sidebar p { color: var(--muted); font-size: .875rem; margin: 1.5rem 0 .5rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-sidebar a { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); color: var(--text-2); margin-bottom: .25rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--primary); color: var(--primary-text); }
.admin-main { flex: 1; margin-left: 260px; padding: 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-topbar h1 { margin: 0; font-family: "Pacifico", cursive; }
.role-badge { padding: .125rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.role-badge.root { background: var(--primary); color: var(--primary-text); }
.role-badge.asoc { background: var(--muted); color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.stat-card .num { font-size: 2.5rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-card .lbl { color: var(--muted); margin-top: .5rem; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tab-btn { padding: .75rem 1.5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); }
.tab-btn.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.tab-panel { animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.scanner-container { text-align: center; }
#qr-video { border: 2px solid var(--border); }
.scanner-controls { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.form-row input[type="checkbox"] { width: auto; margin-right: .5rem; }
.env-value { font-family: var(--font-mono); font-size: .875rem; color: var(--muted); word-break: break-all; }
.is-locked { opacity: .6; pointer-events: none; }
.admin-lock { font-size: .7rem; color: var(--muted); margin-left: .5rem; }

/* Footer */
.site-footer { padding: 2rem 1.5rem; text-align: center; border-top: 1px solid var(--border); margin-top: 3rem; }
.credit a { color: var(--muted); font-size: .875rem; }
.credit a:hover { color: var(--primary); }

/* Magnetic effect */
.magnetic { position: relative; overflow: hidden; }
.magnetic::before { content: ""; position: absolute; inset: -2px; background: var(--primary); opacity: 0; transition: opacity .3s; z-index: -1; border-radius: inherit; }
.magnetic:hover::before { opacity: 1; }
.magnetic:hover { color: var(--primary-text); }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }

/* Responsive */
@media (max-width: 767px) {
  .fixed-header { padding: 0 1rem; }
  .hero { padding-top: calc(var(--header-h) + 2rem); }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 1rem; }
  .menu-grid { grid-template-columns: 1fr; }
}

/* Interaction fixes: modal, desktop cart and scroll restoration. */
body.is-scroll-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.menu-card { cursor: pointer; }
.menu-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.menu-card-image { cursor: zoom-in; }
.dish-modal { overscroll-behavior: contain; }
.dish-modal-content { box-shadow: 0 24px 80px rgba(0,0,0,.42); }
.presentation-label { margin: 0 0 .6rem; color: var(--text-2); font-size: .85rem; font-weight: 600; }
.presentation-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.presentation-option { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.presentation-option:hover { transform: translateY(-1px); border-color: var(--primary); }
.presentation-option.is-selected { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.presentation-option strong { white-space: nowrap; font-family: var(--font-mono); }
.dish-modal-add, .dish-modal-dismiss { width: 100%; min-height: 48px; padding: .8rem 1rem; border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer; }
.dish-modal-add { border: 0; background: var(--primary); color: var(--primary-text); }
.dish-modal-dismiss { margin-top: .6rem; }
.cart-backdrop { position: fixed; inset: 0; z-index: 239; background: rgba(20, 14, 12, .52); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.cart-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-panel { z-index: 240; }
.cart-fab { z-index: 230; }
.cart-fab-btn { position: relative; }
.cart-fab-btn > span:first-child { font-size: 1.8rem; line-height: 1; }

@media (min-width: 768px) {
  #main-content > *, .hero, .menu-quicknav-inner, .client-page { width: 80%; max-width: none; margin-left: auto; margin-right: auto; }
  .menu-quicknav { width: 100%; }
}

/* Client account */
.client-page { padding: calc(var(--header-h) + 2.5rem) 0 4rem; min-height: 100vh; }
.client-hero { text-align: center; padding: 2rem 0 2.5rem; }
.client-hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem); margin: .25rem 0; }
.client-hero p { color: var(--text-2); font-size: 1.1rem; }
.client-shell { width: min(100% - 2rem, 760px); margin: 0 auto 2rem; padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.client-tabs { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: .75rem; margin-bottom: 1.5rem; }
.client-tab { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: .65rem 1rem; cursor: pointer; font: inherit; }
.client-tab.is-active { color: var(--primary-text); background: var(--primary); border-color: var(--primary); }
.client-panel h2 { font-family: var(--font-display); margin-top: 0; }
.client-panel label, .client-dashboard label { display: grid; gap: .35rem; margin-bottom: 1rem; color: var(--text-2); font-weight: 600; }
.client-panel input, .client-panel textarea, .client-panel select, .client-dashboard input { width: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; }
.client-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 1rem; }
.client-form-grid label:last-child { grid-column: 1 / -1; }
.client-message { min-height: 1.5rem; margin-bottom: 0; }
.client-message.is-error { color: var(--danger); }
.client-message.is-ok { color: var(--success); }
.client-dashboard-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.5rem; }
.client-dashboard-head h2 { font-family: var(--font-display); font-size: 2.2rem; margin: .15rem 0; }
.client-dashboard-head p { margin: 0; color: var(--text-2); }
.client-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin-bottom: 1.5rem; }
.client-stats > div { padding: 1rem; text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); }
.client-stats strong, .client-stats span { display: block; }
.client-stats strong { color: var(--primary); font: 700 2rem var(--font-mono); }
.client-stats span { color: var(--text-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.history-list { display: grid; gap: .65rem; }
.history-list article { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: .75rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.history-list span, .history-list small { color: var(--text-2); }
.client-empty { padding: 2rem; text-align: center; color: var(--text-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.client-dashboard hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.photo-capture { display:grid; gap:.65rem; }
.photo-capture .camera-video { width:min(100%, 420px); max-height:320px; object-fit:cover; border-radius:var(--radius-sm); background:#16110f; border:2px solid var(--primary); }
.photo-capture .camera-actions { display:flex; gap:.5rem; flex-wrap:wrap; }
.photo-capture .camera-status { min-height:1.3rem; margin:0; color:var(--text-2); font-size:.9rem; }
.photo-file-label { font-size:.9rem; color:var(--text-2); }
@media (max-width: 600px) { .client-form-grid { grid-template-columns: 1fr; } .client-form-grid label:last-child { grid-column: auto; } .client-dashboard-head { flex-direction: column; } .client-stats strong { font-size: 1.45rem; } .history-list article { grid-template-columns: 1fr; gap: .2rem; } }
