:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --text: #000000;
  --muted: #333333;
  --accent: #b05523;
  --accent-hover: #8e421a;
  --accent-soft: #f9ede5;
  --line: #dddddd;
  --radius: 12px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 400 0.95rem/1.6 "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
}

h1, h2, h3, .brand {
  font-family: "Newsreader", serif;
  font-weight: 600;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
button, input { font: inherit; border: none; outline: none; }

/* Layout */
.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  margin: 0.75rem 0 1.75rem;
}

.brand {
  font-size: 1.35rem;
  color: var(--accent);
  font-style: italic;
  letter-spacing: 0.01em;
}

nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
}

nav a:hover,
nav a.active {
  color: var(--text);
  background: rgba(176, 97, 51, 0.08);
}

/* Components */
.card {
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 241, 234, 0.95) 100%);
  border-radius: 26px;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(176, 97, 51, 0.08), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(31, 24, 20, 0.03), transparent 18%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  margin: 0.5rem 0 1.1rem;
}

.hero p {
  max-width: 520px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 18px rgba(176, 97, 51, 0.18);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: none;
}

.btn.ghost:hover {
  background: #fff;
}

.chip {
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Grid & List */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.list {
  display: grid;
  gap: 1rem;
}

.restaurant {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.restaurant h3 {
  margin: 0;
  font-size: 1.15rem;
}

.restaurant .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.restaurant.favorite {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.menu-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.menu-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dotted var(--line);
}

.menu-item:last-child {
  border-bottom: none;
}

.empty-state {
  text-align: center;
}

.empty-state .pill {
  margin-inline: auto;
}

.pill {
  align-self: flex-start;
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Map */
#map-container {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  min-height: 350px;
}

/* Modal */
#modal-overlay {
  background: rgba(22, 16, 12, 0.2);
  backdrop-filter: blur(4px);
}

#menu-modal {
  border: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

/* Forms */
input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="search"] {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  transition: var(--transition);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

label { 
  display: block; 
  margin-bottom: 1.25rem; 
  font-weight: 700; 
  font-size: 0.85rem; 
  color: var(--muted);
}

/* Home Page Specifics */
.display-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
  margin: 1rem 0 1.5rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.feature-card {
  padding: 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.mt-2 { margin-top: 2rem; }

@media (min-width: 901px) {
  .grid.mt-2 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Modal Component */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(22, 16, 12, 0.2);
  backdrop-filter: blur(4px);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  border: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

/* Specific UI Tweaks */
.map-large { height: 350px; margin-bottom: 2rem; }
.avatar-profile { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.font-xs { font-size: 0.7rem; }
.font-sm { font-size: 0.8rem; }
.error-text { color: #e63946; font-size: 0.85rem; }

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .sticky-top { position: static; }
  .topbar {
    position: static;
    border-radius: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }
}

