*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #9b5e3a;
  --brand-dark: #7d4a2c;
  --bg: #f2e8d5;
  --surface: #ede0c4;
  --surface2: #e3d4b0;
  --text: #3a2510;
  --text-muted: #8a7055;
  --border: #d4c4a0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(58,37,16,.18);
}

html, body {
  height: 100%;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Map ── */
#map {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
}

/* ── Center hero button ── */
.center-btn {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #C8001E;
  color: #FFD600;
  font-family: 'Alfa Slab One', serif;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 100px;
  padding: 15px 32px;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(200,0,30,.35);
  z-index: 300;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.center-btn:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 8px 36px rgba(200,0,30,.45);
}
.center-btn:active { transform: translate(-50%, -50%) scale(.97); }

/* ── My Burgers floating button ── */
.my-burgers-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(242, 232, 213, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 400;
  transition: background .15s;
}
.my-burgers-btn:hover { background: rgba(227, 212, 176, 0.98); }

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 400;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.fab:hover { background: var(--brand-dark); transform: scale(1.06); }
.fab:active { transform: scale(.96); }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 590;
}
.sidebar-overlay.open { display: block; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-header h2 { font-size: 1rem; font-weight: 700; }
.sidebar-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 4px;
}

.burger-list { overflow-y: auto; flex: 1; padding: 8px 0; }

.burger-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.burger-item:hover { background: var(--surface2); }
.burger-item-name { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.burger-item-sub { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.burger-item-rating { margin: 4px 0 2px; }
.burger-item-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.burger-list-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
}

/* ── Captcha ── */
.captcha-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 800;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.captcha-backdrop.open { display: flex; }

.captcha-modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
  padding: 28px 24px 20px;
  border: 1px solid var(--border);
}

.captcha-header {
  text-align: center;
  margin-bottom: 22px;
}
.captcha-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.captcha-header p {
  font-size: .82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.condiment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 6px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, transform .1s, background .15s;
}
.condiment-btn svg { width: 52px; height: 70px; }
.condiment-btn span {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.condiment-btn:hover {
  border-color: var(--brand);
  background: var(--surface2);
  transform: scale(1.04);
}
.condiment-btn:active { transform: scale(.97); }

.captcha-error {
  text-align: center;
  color: #CC2200;
  font-size: .82rem;
  font-weight: 600;
  min-height: 18px;
  opacity: 0;
  transition: opacity .2s;
}

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 700;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; line-height: 1;
}

#burger-form label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 16px 0 6px;
}
#burger-form label:first-of-type { margin-top: 0; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; }

#burger-form input[type="date"],
#burger-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s;
}
#burger-form input[type="file"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
}
#burger-form input:focus,
#burger-form textarea:focus { border-color: var(--brand); }
#burger-form textarea { resize: vertical; }

/* ── Burger stack rating ── */
.burger-stack-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.burger-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  user-select: none;
}

.bun-top {
  width: 74px;
  height: 22px;
  background: #c8803a;
  border-radius: 50% 50% 6px 6px / 80% 80% 6px 6px;
}

.bun-bottom {
  width: 74px;
  height: 13px;
  background: #c8803a;
  border-radius: 6px 6px 50% 50% / 6px 6px 80% 80%;
}

.patty-layer {
  width: 74px;
  height: 12px;
  background: #d4c4a0;
  border-radius: 5px;
  transition: background .1s, transform .1s;
}
.patty-layer.active { background: #7d4a2c; }
.patty-layer:hover { transform: scaleX(1.04); }

/* ── Rating display (sidebar + popup) ── */
.rating-patty {
  display: inline-block;
  width: 14px;
  height: 5px;
  border-radius: 2px;
  background: #d4c4a0;
  margin: 0 1px;
  vertical-align: middle;
}
.rating-patty.active { background: var(--brand); }

/* ── Submit ── */
.submit-btn {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.submit-btn:hover { background: var(--brand-dark); }
.submit-btn:disabled { background: #aaa; cursor: not-allowed; }

/* ── Info popup ── */
.info-popup {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  z-index: 450;
  border: 1px solid var(--border);
}
.info-popup.open { display: block; }

.info-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  color: var(--text-muted); font-size: 1rem; cursor: pointer;
}

.info-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.info-place-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.info-rating { margin-bottom: 6px; }
.info-notes { font-size: .875rem; line-height: 1.5; color: var(--text); margin-bottom: 8px; }
.info-meta { font-size: .75rem; color: var(--text-muted); }

/* ── PlaceAutocomplete ── */
#place-autocomplete-container { width: 100%; }
gmp-place-autocomplete {
  width: 100%;
  --gmp-input-padding: 10px 12px;
  --gmp-input-font-size: 0.95rem;
  --gmp-input-border-radius: 8px;
  --gmp-input-background-color: var(--bg);
  --gmp-input-border-color: var(--border);
  --gmp-input-focus-border-color: var(--brand);
  --gmp-input-color: var(--text);
  --gmp-input-placeholder-color: var(--text-muted);
  font-family: inherit;
}

.pac-container {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
  font-family: 'Montserrat', sans-serif !important;
  margin-top: 4px !important;
}
.pac-item {
  color: var(--text) !important;
  border-top: 1px solid var(--border) !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
}
.pac-item:hover, .pac-item-selected { background: var(--surface2) !important; }
.pac-item-query { color: var(--text) !important; font-size: .9rem !important; }
.pac-matched { font-weight: 700 !important; }
.pac-icon { filter: sepia(60%) hue-rotate(-10deg) !important; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .sidebar { width: 100%; }
  .modal { padding: 20px 16px; }
  .center-btn { font-size: .85rem; padding: 13px 24px; }
  .captcha-modal { padding: 22px 16px 16px; }
  .condiment-btn svg { width: 44px; height: 58px; }
}
