/*
 * Flagship Location Modal — shared across Search / Discover / (later) Map.
 * Uses class names from the existing modal so legacy JS keeps working.
 * All Flagship tokens hardcoded so the file is portable across pages.
 *
 * Tokens (Flagship system):
 *   --bg #0a0a0a, --bg-elev #131313, --bg-sunken #050505
 *   --ink #f5f5f5, --ink-2 #d4d4d4, --ink-3 #a3a3a3, --ink-4 #737373
 *   --line #1f1f1f, --line-2 #2a2a2a
 *   --accent #1E9B8A
 */

/* ===== Overlay & shell ===== */
.location-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10300;
  overflow-y: auto;
  padding: 0;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}
.location-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.location-modal {
  background: #131313;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  animation: fmFade 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  color: #d4d4d4;
  position: relative;
}
/* Accent strip — Flagship signature */
.location-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #1E9B8A 30%, #1E9B8A 70%, transparent 100%);
  z-index: 11;
  border-radius: 20px 20px 0 0;
}
.location-modal::-webkit-scrollbar { width: 0; }

@keyframes fmFade {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Header (photo / emoji + score badge) ===== */
.location-modal-header {
  position: relative;
  height: 240px;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  border-bottom: 1px solid #1f1f1f;
}
.location-modal-header-emoji {
  font-size: 2.4rem;
  z-index: 1;
  opacity: 0.18;
  filter: grayscale(1);
}
.location-modal-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.location-modal-header.has-photo .location-modal-header-emoji { display: none; }
.location-modal-header.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(10,10,10,0.85) 100%);
}

/* Score badge — top-right of header */
.location-modal-score {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #f5f5f5;
  z-index: 5;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.location-modal-score-big {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #f5f5f5;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Score colors — single accent palette, no rainbow */
.location-modal-score.high, .location-modal-score-big.high { background: #1E9B8A; }
.location-modal-score.good, .location-modal-score-big.good { background: #2C8C7E; }
.location-modal-score.fair, .location-modal-score-big.fair { background: #4a4a4a; }
.location-modal-score.low, .location-modal-score-big.low { background: #3a3a3a; }
.location-modal-score.poor, .location-modal-score-big.poor { background: #2a2a2a; }
.location-modal-score.unknown, .location-modal-score-big.unknown { background: #1a1a1a; color: #737373; }

/* Close button — top-left */
.location-modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.18s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'Manrope', sans-serif;
}
.location-modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #f5f5f5;
  border-color: rgba(255,255,255,0.16);
}

/* ===== Body ===== */
.location-modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.location-modal-name {
  font-family: 'Fraunces', serif;
  font-size: 2.1rem;
  font-weight: 400;
  color: #f5f5f5;
  margin: 0 0 0.4rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.location-modal-name em { font-style: italic; color: #1E9B8A; }
.location-modal-address {
  font-size: 0.82rem;
  color: #a3a3a3;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.4;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.01em;
}
.location-modal-address .ri { color: #737373; font-size: 0.85rem; }

/* Pill: cuisine + contact links + hours */
.location-modal-cuisine {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: rgba(30, 155, 138, 0.08);
  border: 1px solid rgba(30, 155, 138, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  color: #1E9B8A;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #a3a3a3;
  text-decoration: none;
  transition: all 0.16s;
}
.modal-contact-link:hover {
  border-color: #2a2a2a;
  color: #f5f5f5;
  background: rgba(255,255,255,0.02);
}
.modal-hours { cursor: default; }
.modal-hours:hover { background: transparent; color: #a3a3a3; border-color: #1f1f1f; }

/* Top action buttons — save / share */
.location-modal-actions-top {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}
.modal-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  color: #737373;
  cursor: pointer;
  transition: all 0.16s;
}
.modal-action-btn:hover {
  color: #f5f5f5;
  border-color: #2a2a2a;
  background: rgba(255,255,255,0.02);
}
.modal-action-btn svg { width: 16px; height: 16px; }
.save-btn.saved { color: #1E9B8A; border-color: rgba(30, 155, 138, 0.4); }
.save-btn.saved .heart-icon { fill: #1E9B8A; stroke: #1E9B8A; }
.save-btn.saved:hover { color: #1E9B8A; background: rgba(30, 155, 138, 0.06); }

/* ===== Score row (big) ===== */
.lm-score-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}
.location-modal-score-info { flex: 1; min-width: 0; }
.location-modal-score-label {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #f5f5f5;
  margin: 0 0 0.15rem;
  letter-spacing: -0.015em;
}
.location-modal-tier {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.tier-full { background: rgba(30, 155, 138, 0.12); color: #1E9B8A; border: 1px solid rgba(30, 155, 138, 0.25); }
.tier-partial { background: rgba(180, 180, 180, 0.06); color: #d4d4d4; border: 1px solid #2a2a2a; }
.tier-limited { background: rgba(120, 120, 120, 0.06); color: #a3a3a3; border: 1px solid #1f1f1f; }
.location-modal-score-desc {
  font-size: 0.74rem;
  color: #737373;
  margin: 0;
  line-height: 1.45;
}

/* ===== Section headings ===== */
.location-modal-section { margin-bottom: 1.5rem; }
.location-modal-section-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.7rem;
}

/* ===== Score breakdown grid ===== */
.modal-score-breakdown {
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.modal-score-breakdown .bd-full-width { grid-column: 1 / -1; }
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  transition: border-color 0.16s;
}
.breakdown-row:hover { border-color: #2a2a2a; }
.breakdown-label {
  color: #d4d4d4;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}
.breakdown-label .ri,
.breakdown-label span:first-child { color: #1E9B8A; font-size: 0.85rem; }
.breakdown-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.78rem;
}
.breakdown-value.positive { color: #1E9B8A; }
.breakdown-value.negative { color: #d4d4d4; opacity: 0.5; }
.breakdown-value.neutral { color: #404040; }
.breakdown-row.feature-unknown { opacity: 0.5; }
.breakdown-row.feature-no .breakdown-label .ri,
.breakdown-row.feature-no .breakdown-label span:first-child { color: #737373; opacity: 0.6; }

/* ===== Environment / lighting ===== */
.env-lighting-card { border-radius: 10px; overflow: hidden; }
.env-lighting-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  margin-bottom: 6px;
}
.env-lighting-row:last-child { margin-bottom: 0; }
.env-lighting-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: #131313;
  border: 1px solid #1f1f1f;
}
.env-lighting-info { flex: 1; min-width: 0; }
.env-lighting-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #d4d4d4;
  margin-bottom: 0.1rem;
  font-family: 'Manrope', sans-serif;
}
.env-lighting-desc {
  font-size: 0.7rem;
  color: #737373;
  line-height: 1.4;
}
.env-lighting-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.env-lighting-badge.bright { background: rgba(180,180,180,0.06); color: #d4d4d4; border: 1px solid #2a2a2a; }
.env-lighting-badge.moderate { background: rgba(120,120,120,0.05); color: #a3a3a3; border: 1px solid #1f1f1f; }
.env-lighting-badge.dim { background: rgba(80,80,80,0.05); color: #737373; border: 1px solid #1f1f1f; }
.env-lighting-badge.yes { background: rgba(30, 155, 138, 0.1); color: #1E9B8A; border: 1px solid rgba(30,155,138,0.2); }
.env-lighting-badge.no { background: transparent; color: #525252; border: 1px solid #1f1f1f; }

/* ===== Reservation buttons ===== */
.lm-reservations {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.lm-res-btn {
  flex: 1;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  color: #d4d4d4;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  transition: all 0.16s;
}
.lm-res-btn:hover { border-color: #1E9B8A; color: #1E9B8A; background: rgba(30, 155, 138, 0.04); }

/* ===== Reviews / accessibility mentions ===== */
.modal-reviews { display: flex; flex-direction: column; gap: 0.5rem; }
.modal-review {
  padding: 0.85rem 1rem;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  font-size: 0.84rem;
  color: #d4d4d4;
  line-height: 1.55;
  font-style: italic;
}
.modal-review-source {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  color: #737373;
  margin-top: 0.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
}

/* ===== Community feedback row ===== */
.modal-feedback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.modal-feedback-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
}
.modal-feedback-item.positive { background: rgba(30, 155, 138, 0.08); color: #1E9B8A; border: 1px solid rgba(30, 155, 138, 0.2); }
.modal-feedback-item.negative { background: rgba(180,180,180,0.04); color: #a3a3a3; border: 1px solid #1f1f1f; }
.modal-feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.modal-feedback-badge.verified { background: rgba(30, 155, 138, 0.12); color: #1E9B8A; border: 1px solid rgba(30, 155, 138, 0.25); }
.modal-feedback-source { margin-left: auto; font-size: 0.7rem; color: #737373; font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.05em; }

/* ===== Inline thumbs feedback (Is this accurate?) ===== */
.lm-feedback-row { display: flex; gap: 0.5rem; }
.lm-fb-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  color: #a3a3a3;
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s;
}
.lm-fb-yes:hover { border-color: rgba(30, 155, 138, 0.4); color: #1E9B8A; background: rgba(30, 155, 138, 0.04); }
.lm-fb-no:hover { border-color: #2a2a2a; color: #f5f5f5; background: rgba(255,255,255,0.02); }

/* ===== Bottom action buttons (Directions / View on Map) ===== */
.location-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #1f1f1f;
}
.location-modal-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
}
.location-modal-btn-primary { display: none; }
.location-modal-btn-secondary { background: transparent; border: 1px solid #1f1f1f; color: #d4d4d4; }
.location-modal-btn-secondary:hover { border-color: #1E9B8A; color: #1E9B8A; background: rgba(30, 155, 138, 0.04); }
.location-modal-btn-map { background: #f5f5f5; border: 1px solid #f5f5f5; color: #0a0a0a; }
.location-modal-btn-map:hover { background: #fff; transform: translateY(-1px); }

/* ===== Score-capped notice ===== */
.lm-cap-card {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 3px solid #1E9B8A;
}
.lm-cap-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1E9B8A;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lm-cap-desc {
  font-size: 0.8rem;
  color: #a3a3a3;
  line-height: 1.5;
}
.lm-cap-btn {
  width: 100%;
  padding: 0.6rem;
  background: transparent;
  color: #d4d4d4;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.16s;
  margin-top: 0.25rem;
}
.lm-cap-btn:hover { border-color: #1E9B8A; color: #1E9B8A; background: rgba(30, 155, 138, 0.04); }
body.light-mode .lm-cap-card { background: #fafafa; border-color: #e5e5e5; border-left-color: #1E9B8A; }
body.light-mode .lm-cap-desc { color: #525252; }
body.light-mode .lm-cap-btn { border-color: #e5e5e5; color: #404040; }

/* ===== Help-improve prompt ===== */
.location-modal-help {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(30, 155, 138, 0.04);
  border: 1px solid rgba(30, 155, 138, 0.15);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}
.modal-help-icon { font-size: 1.4rem; flex-shrink: 0; opacity: 0.7; }
.modal-help-content h4 { font-family: 'Fraunces', serif; font-size: 0.95rem; font-weight: 400; color: #f5f5f5; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.modal-help-content p { font-size: 0.78rem; color: #a3a3a3; margin: 0 0 0.7rem; line-height: 1.5; }
.modal-help-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  color: #d4d4d4;
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s;
}
.modal-help-btn:hover { border-color: #1E9B8A; color: #1E9B8A; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .location-modal-overlay.active { align-items: flex-end; padding: 0; }
  .location-modal {
    max-height: 94vh;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    margin-top: auto;
    border-bottom: 0;
  }
  .location-modal-header { height: 220px; border-radius: 18px 18px 0 0; }
  .location-modal-body { padding: 1.25rem 1.25rem 1.5rem; }
  .modal-score-breakdown { grid-template-columns: 1fr 1fr; }
  .location-modal-name { font-size: 1.4rem; }
  .lm-score-row { padding: 0.85rem; }
  .location-modal-score-big { width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ============================================================
   EXPLORE.HTML — uses different class names (.modal-backdrop,
   .modal, .modal-body, .modal-features etc). Restyled to the
   same Flagship treatment so both pages look unified.
   Scoped via #detailModal to avoid touching auth modals on
   index.html which use .modal-overlay / .modal.
   ============================================================ */
#detailModal.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10300;
  padding: 1.5rem;
  font-family: 'Manrope', system-ui, sans-serif;
  overflow-y: auto;
  justify-content: center;
  align-items: flex-start;
}
#detailModal.modal-backdrop.active { display: flex; }
#detailModal .modal {
  background: #131313;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  color: #d4d4d4;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
#detailModal .modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #1E9B8A 30%, #1E9B8A 70%, transparent 100%);
  z-index: 11;
  border-radius: 20px 20px 0 0;
}
#detailModal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d4d4d4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.18s;
}
#detailModal .modal-close:hover { background: rgba(0,0,0,0.85); color: #f5f5f5; border-color: rgba(255,255,255,0.16); }
#detailModal .modal-body { padding: 1.5rem 1.75rem 1.75rem; }

/* === Base layouts (lifted from legacy explore.html so /explore.new has them) === */
#detailModal .modal-photo-wrap { position: relative; width: 100%; height: 220px; overflow: hidden; margin-bottom: 1.25rem; }
#detailModal .modal-photo { width: 100%; height: 100%; object-fit: cover; display: none; }
#detailModal .modal-photo.loaded { display: block; }
#detailModal .modal-photo-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #525252; font-size: 2.5rem; }
#detailModal .modal-photo-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
#detailModal .modal-photo-loading .loading-spinner { width: 24px; height: 24px; border-width: 2px; margin: 0; }

#detailModal .modal-score-row { display: flex; align-items: center; margin-bottom: 1.25rem; }
#detailModal .modal-score-badge { width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
#detailModal .modal-score-info { flex: 1; }
#detailModal .modal-score-info { padding-left: 1rem; }

#detailModal .modal-features { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 1.25rem; }
#detailModal .modal-feature { display: flex; align-items: center; gap: 0.55rem; }
#detailModal .modal-feature-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }

#detailModal .modal-contact { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.25rem; padding: 0.95rem 1.1rem; }
#detailModal .modal-contact-item { display: flex; align-items: center; gap: 0.65rem; font-size: 0.88rem; }
#detailModal .modal-contact-item svg { flex-shrink: 0; }

#detailModal .modal-reservations { margin-bottom: 1.25rem; }
#detailModal .modal-res-label { margin-bottom: 0.65rem; display: block; }
#detailModal .modal-res-row { display: flex; gap: 0.65rem; flex-wrap: wrap; }
#detailModal .res-btn { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; }
#detailModal .res-btn svg { opacity: 0.7; flex-shrink: 0; }

#detailModal .modal-verify { margin-bottom: 1.25rem; }
#detailModal .modal-verify-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
#detailModal .btn-sm { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; text-decoration: none; border: none; font-family: inherit; }

#detailModal .modal-actions { display: flex; gap: 0.85rem; justify-content: center; align-items: center; flex-wrap: wrap; }
#detailModal .modal-action-link { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; font-weight: 500; }
#detailModal .modal-save-btn { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font-family: inherit; }
#detailModal .modal-save-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Header (name + cat + addr) */
#detailModal .modal-header { margin-bottom: 1.25rem; padding-right: 2.5rem; }
#detailModal .modal-title {
  font-family: 'Fraunces', serif;
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.4rem;
  color: #f5f5f5;
}
#detailModal .modal-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: rgba(30,155,138,0.08);
  border: 1px solid rgba(30,155,138,0.2);
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: #1E9B8A;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
#detailModal .modal-addr {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: #a3a3a3;
  margin-top: 0.4rem;
  letter-spacing: 0.01em;
}

/* Score row */
#detailModal .modal-score-row {
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  padding: 1rem;
  gap: 0.9rem;
}
#detailModal .modal-score-badge {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid rgba(255,255,255,0.08);
}
#detailModal .modal-score-label {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #f5f5f5;
  text-transform: none;
  letter-spacing: -0.015em;
}
#detailModal .modal-score-desc {
  font-size: 0.74rem;
  color: #737373;
  margin-top: 0.15rem;
}

/* Photo */
#detailModal .modal-photo-wrap {
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  background: #0a0a0a;
}

/* Features grid */
#detailModal .modal-features { gap: 6px; }
#detailModal .modal-feature {
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.16s;
}
#detailModal .modal-feature:hover { border-color: #2a2a2a; }
#detailModal .modal-feature-icon { font-family: 'JetBrains Mono', ui-monospace, monospace; }
#detailModal .modal-feature-icon.yes { background: rgba(30,155,138,0.15); color: #1E9B8A; }
#detailModal .modal-feature-icon.no { background: rgba(180,180,180,0.06); color: #737373; }
#detailModal .modal-feature-icon.unknown { background: transparent; color: #404040; border: 1px solid #1f1f1f; }
#detailModal .modal-feature-label { font-size: 0.82rem; color: #d4d4d4; font-weight: 500; }

/* Contact */
#detailModal .modal-contact { background: #0a0a0a; border: 1px solid #1f1f1f; border-radius: 12px; }
#detailModal .modal-contact-item a { color: #1E9B8A; }
#detailModal .modal-contact-item span { color: #a3a3a3; }

/* Reservation row */
#detailModal .modal-res-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #737373;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}
#detailModal .res-btn {
  background: transparent !important;
  border: 1px solid #1f1f1f;
  color: #d4d4d4;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: 'Manrope', sans-serif;
  transition: all 0.16s;
}
#detailModal .res-btn:hover {
  border-color: #1E9B8A;
  color: #1E9B8A;
  transform: none;
  background: rgba(30,155,138,0.04) !important;
}

/* Verify CTA */
#detailModal .modal-verify {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-left: 3px solid #1E9B8A;
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
}
#detailModal .modal-verify p { color: #a3a3a3; font-size: 0.8rem; margin-bottom: 0.7rem; }
#detailModal .modal-verify-btns { justify-content: flex-start; }
#detailModal .btn-sm {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
}
#detailModal .btn-primary.btn-sm {
  background: #f5f5f5;
  color: #0a0a0a;
  border: 1px solid #f5f5f5;
}
#detailModal .btn-primary.btn-sm:hover { background: #fff; transform: translateY(-1px); }
#detailModal .btn-ghost-sm {
  background: transparent;
  border: 1px solid #1f1f1f;
  color: #d4d4d4;
}
#detailModal .btn-ghost-sm:hover { border-color: #1E9B8A; color: #1E9B8A; }

/* Bottom action links */
#detailModal .modal-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #1f1f1f;
}
#detailModal .modal-action-link {
  color: #1E9B8A;
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}
#detailModal .modal-save-btn {
  background: transparent;
  border: 1px solid #1f1f1f;
  color: #737373;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
}
#detailModal .modal-save-btn:hover {
  border-color: #1E9B8A;
  color: #1E9B8A;
  background: rgba(30,155,138,0.04);
}
#detailModal .modal-save-btn.saved {
  background: rgba(30,155,138,0.08);
  border-color: rgba(30,155,138,0.4);
  color: #1E9B8A;
}
#detailModal .modal-save-btn.saved svg { fill: #1E9B8A; stroke: #1E9B8A; }

/* Light mode for explore modal */
body.light-mode #detailModal.modal-backdrop { background: rgba(0,0,0,0.35); }
body.light-mode #detailModal .modal { background: #ffffff; border-color: #e5e5e5; color: #404040; }
body.light-mode #detailModal .modal-title { color: #0a0a0a; }
body.light-mode #detailModal .modal-addr { color: #525252; }
body.light-mode #detailModal .modal-score-row { background: #fafafa; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-score-label { color: #0a0a0a; }
body.light-mode #detailModal .modal-feature { background: #fafafa; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-feature:hover { border-color: #d4d4d4; }
body.light-mode #detailModal .modal-feature-label { color: #0a0a0a; }
body.light-mode #detailModal .modal-contact { background: #fafafa; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-photo-wrap { background: #fafafa; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-actions { border-top-color: #e5e5e5; }
body.light-mode #detailModal .res-btn { color: #404040; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-verify { background: #fafafa; border-color: #e5e5e5; border-left-color: #1E9B8A; }
body.light-mode #detailModal .btn-ghost-sm { color: #404040; border-color: #e5e5e5; }
body.light-mode #detailModal .btn-primary.btn-sm { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
body.light-mode #detailModal .modal-save-btn { color: #737373; border-color: #e5e5e5; }
body.light-mode #detailModal .modal-close { background: rgba(0,0,0,0.05); border-color: #e5e5e5; color: #404040; }

/* ===== Light mode ===== */
body.light-mode .location-modal-overlay { background: rgba(0, 0, 0, 0.35); }
body.light-mode .location-modal { background: #ffffff; border-color: #e5e5e5; color: #404040; }
body.light-mode .location-modal-header { background: #f5f5f5; border-bottom-color: #e5e5e5; }
body.light-mode .location-modal-name { color: #0a0a0a; }
body.light-mode .location-modal-address { color: #525252; }
body.light-mode .location-modal-score-label { color: #0a0a0a; }
body.light-mode .lm-score-row { background: #fafafa; border-color: #e5e5e5; }
body.light-mode .breakdown-row { background: #fafafa; border-color: #e5e5e5; }
body.light-mode .breakdown-row:hover { border-color: #d4d4d4; }
body.light-mode .breakdown-label { color: #0a0a0a; }
body.light-mode .modal-contact-link { border-color: #e5e5e5; color: #525252; }
body.light-mode .modal-contact-link:hover { border-color: #0a0a0a; color: #0a0a0a; background: rgba(0,0,0,0.02); }
body.light-mode .modal-action-btn { border-color: #e5e5e5; color: #737373; }
body.light-mode .modal-action-btn:hover { border-color: #0a0a0a; color: #0a0a0a; }
body.light-mode .lm-fb-btn { border-color: #e5e5e5; color: #525252; }
body.light-mode .lm-fb-yes:hover { border-color: rgba(30,155,138,0.4); color: #1E9B8A; }
body.light-mode .lm-fb-no:hover { border-color: #0a0a0a; color: #0a0a0a; }
body.light-mode .lm-res-btn { border-color: #e5e5e5; color: #404040; }
body.light-mode .env-lighting-row { background: #fafafa; border-color: #e5e5e5; }
body.light-mode .env-lighting-icon { background: #fff; border-color: #e5e5e5; }
body.light-mode .env-lighting-label { color: #0a0a0a; }
body.light-mode .modal-review { background: #fafafa; border-color: #e5e5e5; color: #404040; }
body.light-mode .location-modal-actions { border-top-color: #e5e5e5; }
body.light-mode .location-modal-btn-secondary { border-color: #e5e5e5; color: #404040; }
body.light-mode .location-modal-btn-map { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
body.light-mode .location-modal-help { background: rgba(30,155,138,0.04); border-color: rgba(30,155,138,0.2); }
body.light-mode .modal-help-content h4 { color: #0a0a0a; }
body.light-mode .modal-help-content p { color: #525252; }
body.light-mode .modal-help-btn { border-color: #e5e5e5; color: #525252; }
body.light-mode .location-modal-section-title { color: #737373; }
