:root {
  --bg: #141210;
  --bg-elev: #0e0c0a;
  --bg-soft: #211c18;
  --text: #f7f3eb;
  --muted: #b8afa3;
  --line: rgba(212, 168, 83, 0.14);
  --amber: #d4a853;
  --coral: #c85a32;
  --ink: #141210;
  --paper: #f7f3eb;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --header-h: 72px;
  --radius-tile: 10px;
  --max: 1100px;
  color-scheme: dark;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="light"] {
  --bg: #faf6ee;
  --bg-elev: #f1eadc;
  --bg-soft: #efe7d6;
  --text: #221c17;
  --muted: #655a4e;
  --line: rgba(34, 28, 23, 0.14);
  --amber: #8c5a14;
  --coral: #a63f1e;
  --paper: #fffdf8;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(212, 168, 83, 0.14), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(200, 90, 50, 0.12), transparent 50%),
    var(--bg);
}

a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.visually-hidden {
  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: -100px; left: 1rem; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 0.8rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 max(1.25rem, calc((100% - var(--max)) / 2));
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="light"] .site-header { background: rgba(250, 246, 238, 0.9); }

.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  text-decoration: none; font-weight: 700; letter-spacing: 0.06em;
}
.brand-text strong { color: var(--amber); }

.desktop-nav { display: flex; align-items: center; gap: 1.25rem; }
.desktop-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  color: var(--muted); transition: color 0.15s ease;
}
.desktop-nav a:hover, .desktop-nav a.nav-active { color: var(--amber); }

.header-actions {
  display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
}
.header-instagram,
.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  max-width: 100%;
  padding: 0.45rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1;
  flex-shrink: 0;
}
.header-instagram svg,
.theme-toggle svg {
  width: 18px; height: 18px; flex: 0 0 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
}
.header-instagram .instagram-dot { fill: currentColor; stroke: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 3.5rem max(1.25rem, calc((100% - var(--max)) / 2)) 3rem;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 2.5rem; align-items: center;
}
.brand-hero {
  margin: 0 0 0.5rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber);
}
.hero h1 {
  margin: 0 0 1rem; font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05;
}
.hero-description {
  margin: 0 0 1.6rem; font-size: 1.08rem; line-height: 1.6; color: var(--muted); max-width: 56ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.button-light { background: var(--amber); color: #141210; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }

.hero-artwork {
  display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
}
.hero-artwork img { width: min(280px, 75vw); height: auto; }
.hero-artwork-caption {
  margin-top: 0.75rem; font-size: 0.72rem; letter-spacing: 0.18em; color: var(--amber); font-weight: 700;
}

/* Search Portal */
.search-portal {
  padding: 2.5rem max(1.25rem, calc((100% - var(--max)) / 2)) 4rem;
}
.search-heading {
  margin: 0 0 0.25rem; font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}
.search-subtitle { margin: 0 0 1.25rem; color: var(--muted); }

.spotify-search-chrome {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 0.65rem 0.85rem;
}
.spotify-search-control { display: flex; align-items: center; gap: 0.65rem; }
.search-icon { color: var(--amber); display: inline-flex; }
.spotify-search-control input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-size: 1.02rem; padding: 0.45rem 0; outline: none;
}
.clear-button {
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}

.catalog-filters {
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center;
}
.catalog-filters label {
  display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted);
}
.catalog-filters select {
  padding: 0.45rem 0.65rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text);
}
.favorite-filter {
  flex-direction: row !important; align-items: center; gap: 0.45rem !important;
  color: var(--text) !important; font-size: 0.88rem !important; cursor: pointer;
}

.active-filter-chips, .search-suggestions, .discovery-tools {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem;
}
.filter-chip, .suggestion-chip, .discovery-button, .related-chip {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.42rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.discovery-button-accent {
  border-color: var(--amber); background: rgba(212, 168, 83, 0.14);
}
.favorite-count {
  display: inline-block; margin-left: 0.3rem; padding: 0.08rem 0.45rem;
  border-radius: 999px; background: var(--amber); color: #141210; font-size: 0.76rem; font-weight: 700;
}

.search-guidance, .search-help, .results-count {
  font-size: 0.86rem; color: var(--muted); margin: 0.65rem 0;
}

/* Browse Grid */
.browse-title { font-family: var(--font-display); font-size: 1.5rem; margin: 1.5rem 0 0.85rem; }
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.9rem;
}
.category-tile {
  background: linear-gradient(145deg, var(--tile-color, #6b3b20), #1a1410);
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius-tile);
  padding: 1.15rem; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 112px;
  transition: transform 0.15s ease;
}
.category-tile:hover { transform: translateY(-2px); }
.tile-title { font-weight: 700; font-size: 1.08rem; display: block; margin-bottom: 0.35rem; }
.tile-count { font-size: 0.8rem; opacity: 0.88; line-height: 1.35; }

/* Results & Dish Rows */
.results-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0.85rem;
}
.results-toolbar-main { display: flex; align-items: center; gap: 0.85rem; }
.text-button {
  background: none; border: 0; color: var(--amber); font-weight: 600; cursor: pointer; padding: 0;
}
.view-toggle-btn {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  padding: 0.35rem 0.75rem; border-radius: 8px; cursor: pointer; font-size: 0.82rem;
}
.view-toggle-btn[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }

.songs-list { display: flex; flex-direction: column; gap: 0.65rem; }
.songs-list--grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem;
}
.song-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 0.9rem; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.85rem 1rem; cursor: pointer; transition: border-color 0.15s ease;
}
.song-row:hover { border-color: var(--amber); }
.songs-list--grid .song-row { grid-template-columns: 1fr; align-items: flex-start; }

.song-cover {
  width: 52px; height: 52px; border-radius: 10px;
  background: rgba(212, 168, 83, 0.14); border: 1px solid rgba(212, 168, 83, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.84rem; color: var(--amber);
}
.song-title-line { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.song-title { font-size: 1.02rem; }
.dish-price-pill { font-weight: 700; color: var(--amber); white-space: nowrap; }
.song-artist {
  background: none; border: 0; padding: 0; color: var(--amber);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; text-align: left; margin-top: 0.15rem;
}
.song-lyric { margin: 0.3rem 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.4; }
.dish-row-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.dish-tag {
  padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  background: rgba(212, 168, 83, 0.12); color: var(--amber); border: 1px solid rgba(212, 168, 83, 0.25);
}
.dish-tag--chef {
  background: rgba(200, 90, 50, 0.2); color: #f3a688; border-color: rgba(200, 90, 50, 0.4);
}
.song-actions { display: flex; align-items: center; gap: 0.45rem; }
.action-btn {
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.favorite-btn.is-favorite { color: var(--coral); border-color: var(--coral); }

/* Related & Discovery */
.related-artists, .discovery-view {
  margin: 1rem 0 1.25rem; padding: 1.1rem; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.related-list, .artist-options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.65rem; }
.artist-option {
  padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); cursor: pointer; font-weight: 600;
}
.artist-option.is-selected { background: var(--amber); color: #141210; border-color: var(--amber); }
.discovery-actions, .card-actions, .discovery-secondary-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem;
}
.discovery-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem; margin: 0.75rem 0; text-align: center;
}
.discovery-source { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); font-weight: 700; }

/* O Restaurante & Eventos pages */
.bar-info, .bar-event {
  padding: 3rem max(1.25rem, calc((100% - var(--max)) / 2));
  border-top: 1px solid var(--line);
}
.bar-info-grid, .bar-event-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; align-items: start;
}
.bar-block {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem;
}
.price-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.55rem; }
.price-list li {
  display: flex; justify-content: space-between; padding-bottom: 0.45rem; border-bottom: 1px dashed var(--line);
}
.bar-meta { display: grid; gap: 0.8rem; margin: 1rem 0; }
.bar-meta dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); font-weight: 700; }
.bar-meta dd { margin: 0.2rem 0 0; color: var(--text); line-height: 1.45; }
.bar-flyer { margin: 1rem 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.bar-flyer img { width: 100%; height: auto; display: block; }
.text-link { color: var(--amber); font-weight: 600; }

/* Dialogs */
dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 0;
  background: var(--paper); color: #141210; max-width: min(500px, 92vw); width: 100%;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); }
.dialog-card { padding: 1.5rem; position: relative; text-align: center; }
.night-list-card { background: var(--bg); color: var(--text); }
.dialog-close {
  position: absolute; top: 0.85rem; right: 0.85rem; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.15); background: transparent;
  cursor: pointer; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center;
}
.night-list-card .dialog-close { color: var(--text); border-color: var(--line); }
.dialog-badge {
  display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; background: rgba(200, 90, 50, 0.15); color: #a63f1e;
}
.dialog-song { font-family: var(--font-display); font-size: 1.75rem; margin: 0.5rem 0; }
.dialog-description { font-size: 0.95rem; line-height: 1.5; color: #3a322b; }
.dialog-meta-row { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin: 0.75rem 0; }
.dialog-meta-chip { font-size: 0.76rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(20, 18, 16, 0.08); }
.dialog-sauce-wrap { margin: 0.75rem 0; padding: 0.75rem; border-radius: 10px; background: rgba(20, 18, 16, 0.06); text-align: left; }
.dialog-sauce-wrap label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; }
.dialog-sauce-wrap select { width: 100%; padding: 0.5rem; border-radius: 8px; }
.dialog-pairings-wrap { margin: 0.8rem 0; text-align: left; }
.dialog-pairings { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.pairing-chip-btn {
  border: 1px solid rgba(20, 18, 16, 0.2); background: #fff; color: #141210;
  border-radius: 8px; padding: 0.35rem 0.65rem; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.code-label { display: block; font-size: 0.72rem; letter-spacing: 0.14em; font-weight: 700; opacity: 0.7; margin-top: 0.6rem; }
.song-code { display: block; font-size: 2rem; font-weight: 800; margin: 0.2rem 0 0.8rem; color: #8f3217; }
.dialog-actions-stack { display: flex; flex-direction: column; gap: 0.5rem; }

.night-list-items { display: grid; gap: 0.6rem; margin: 1rem 0; text-align: left; max-height: 260px; overflow-y: auto; }
.night-list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line);
}
.night-list-item span { display: block; font-size: 0.8rem; color: var(--muted); }
.qty-controls { display: inline-flex; align-items: center; gap: 0.35rem; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); font-weight: 700; cursor: pointer;
}
.table-summary-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); text-align: left; }
.table-summary-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.75rem; font-size: 0.86rem; }
.split-control input { width: 3.4rem; padding: 0.2rem 0.4rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); text-align: center; }
.table-totals { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; display: grid; gap: 0.4rem; margin-bottom: 0.85rem; }
.table-totals > div { display: flex; justify-content: space-between; }
.table-totals .per-person-row { padding-top: 0.4rem; border-top: 1px dashed var(--line); color: var(--amber); font-weight: 700; }
.table-cta-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.table-cta-row .button { flex: 1 1 160px; }

/* Footer & Mobile Tabbar */
.site-footer {
  padding: 2.5rem max(1.25rem, calc((100% - var(--max)) / 2)) 5rem;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem;
}
.footer-brand { font-weight: 700; letter-spacing: 0.08em; text-decoration: none; color: var(--amber); }
.footer-place { font-size: 0.86rem; color: var(--muted); }
.footer-nav { display: flex; gap: 1rem; margin-top: 0.6rem; }
.instagram-footer {
  display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start;
  padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none;
}
.instagram-footer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.mobile-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: none; grid-template-columns: repeat(3, 1fr);
  background: rgba(14, 12, 10, 0.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.mobile-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.55rem; color: var(--muted); text-decoration: none; background: none; border: 0; font-size: 0.74rem;
}
.mobile-tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.mobile-tab-primary { color: var(--amber); }

@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .mobile-tabbar { display: grid; }
  .header-instagram span,
  .theme-toggle-label { display: none; }
  .header-instagram,
  .theme-toggle { padding: 0.5rem; }
}
