@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Orbitron';
  src: url('/fonts/orbitron-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}

/* ── Light mode (default) ── */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-strong: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b6b80;
  --accent: #e8356f;
  --accent-2: #1a9db8;
  --accent-3: #e09800;
  --card: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --danger: #dc3545;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --nav-bg: #ffffff;
  --nav-border: rgba(0, 0, 0, 0.06);
  --search-bg: rgba(0, 0, 0, 0.04);
  --search-border: rgba(0, 0, 0, 0.1);
  --search-focus: rgba(26, 157, 184, 0.3);
  --photo-bg: #eeeef2;
  --act-color: rgba(0, 0, 0, 0.35);
  --act-hover: rgba(0, 0, 0, 0.06);
}

/* ── Vaporwave dark mode ── */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0a1a;
  --bg-strong: #16102a;
  --ink: #f0ecff;
  --muted: #a99cc8;
  --accent: #ff6eb4;
  --accent-2: #7dd3fc;
  --accent-3: #fbbf24;
  --card: rgba(26, 18, 52, 0.9);
  --card-border: rgba(255, 110, 180, 0.2);
  --danger: #ff6b81;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(16, 10, 32, 0.92);
  --nav-border: rgba(255, 110, 180, 0.12);
  --search-bg: rgba(255, 255, 255, 0.06);
  --search-border: rgba(255, 255, 255, 0.1);
  --search-focus: rgba(125, 211, 252, 0.3);
  --photo-bg: rgba(255, 255, 255, 0.04);
  --act-color: rgba(255, 255, 255, 0.3);
  --act-hover: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 110, 180, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(125, 211, 252, 0.08) 0%, transparent 50%),
    var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before, body::after { display: none; }

h1, h2, h3 {
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  margin: 0 0 0.3rem 0;
  letter-spacing: 0.65px;
  color: var(--ink);
  text-shadow: none;
}

p {
  margin: 0;
}

.hero {
  padding: 48px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  isolation: isolate;
}

/* hero glow removed — was creating visible rectangle artifact */

.pin-button {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 6;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  background: linear-gradient(120deg, #ff2d96 0%, #8e32f1 48%, #34d7ff 100%);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(52, 215, 255, 0.24);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

.page-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 6;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  background: linear-gradient(120deg, #ff9a23 0%, #ff2d96 52%, #8e32f1 100%);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(255, 45, 150, 0.22);
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

.page-link:hover,
.pin-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(52, 215, 255, 0.3);
}

.page-link:active {
  transform: translateY(1px);
}

.pin-button:active {
  transform: translateY(1px);
}

.page-link:focus-visible,
.pin-button:focus-visible {
  outline: 2px solid rgba(52, 215, 255, 0.62);
  outline-offset: 2px;
}

.hero-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.8s ease-out;
}

.logo {
  width: clamp(230px, 45vw, 380px);
  height: clamp(230px, 45vw, 380px);
  filter:
    drop-shadow(0 28px 38px rgba(6, 0, 25, 0.76))
    drop-shadow(0 0 34px rgba(255, 50, 150, 0.5))
    drop-shadow(0 0 42px rgba(52, 215, 255, 0.4));
}

.location-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.layout {
  display: grid;
  gap: 24px;
  padding: 20px;
  width: min(960px, 100%);
  max-width: 100%;
  margin: 0 auto 60px;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 3;
}

.layout-single {
  grid-template-columns: 1fr;
  width: min(1400px, 100%);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease-out;
  backdrop-filter: blur(7px);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(52, 215, 255, 0.12);
  pointer-events: none;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 12px 14px;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#pin-input {
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--search-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.star-picker {
  display: flex;
  gap: 4px;
  align-items: center;
}

.star-btn {
  border: none;
  background: var(--act-hover);
  color: var(--muted);
  font-size: 32px;
  line-height: 1;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.star-btn:hover {
  color: var(--accent-3);
  background: rgba(255, 185, 48, 0.12);
  transform: scale(1.15);
}

.star-btn.is-active {
  color: var(--accent-3);
  background: rgba(255, 185, 48, 0.1);
}

.star-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 10px;
}

.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
  animation: shake 0.25s ease;
}

.primary {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ghost {
  border: 1px solid var(--card-border);
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ghost:hover {
  background: var(--act-hover);
  border-color: var(--accent-2);
}

.ghost.danger {
  color: var(--danger);
  border-color: var(--danger);
  background: transparent;
}

.ghost.danger:hover {
  background: rgba(220, 53, 69, 0.08);
}

.ghost.rate {
  color: var(--accent-2);
  border-color: var(--accent-2);
  background: transparent;
}

.ghost.rate:hover {
  background: rgba(48, 201, 232, 0.08);
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 190, 46, 0.2);
  color: #ffe4a4;
  font-weight: 600;
  font-size: 0.8rem;
}

.location-pill {
  background: linear-gradient(120deg, #ff8d1f, #ff2d96, #34d7ff);
  color: #fff8ec;
  text-shadow: 0 1px 8px rgba(5, 0, 24, 0.5);
  box-shadow: 0 8px 20px rgba(255, 45, 150, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(80vw, 320px);
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.search-results {
  display: grid;
  gap: 12px;
}

.result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(18, 10, 52, 0.86);
  border: 1px solid rgba(255, 45, 150, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.result:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 16px rgba(255, 45, 150, 0.24);
}

.result-title {
  font-size: 1rem;
}

.result-address,
.result-distance {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── Top bar ── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

.mobile-hero { display: none; }

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(255, 50, 150, 0.5));
}

.topbar-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  margin: 0 20px;
}

.topbar-search-input {
  width: 100%;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--search-border);
  background: var(--search-bg);
  color: var(--ink);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.topbar-search-input::placeholder { color: var(--muted); }
.topbar-search-input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--search-focus);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  overflow: hidden;
  z-index: 20;
  max-height: 400px;
  overflow-y: auto;
}

.search-dropdown:empty { display: none; }

.search-dropdown-header {
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  border-top: 1px solid var(--card-border);
}

.search-dropdown-header:first-child { border-top: none; }

.search-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--card-border);
}

.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: var(--act-hover); }
.search-dropdown-item strong { font-size: 0.9rem; color: var(--ink); }
.search-dropdown-meta { font-size: 0.75rem; color: var(--muted); }

.topbar-search {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  max-width: none;
  padding: 8px 16px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  display: none;
}

.topbar-search.open { display: block; }

.topbar-search-input { width: 100%; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: var(--search-bg);
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.topbar-icon-btn svg { width: 20px; height: 20px; }

.topbar-icon-btn:hover { background: var(--act-hover); color: var(--ink); }

@media (max-width: 600px) {
  .topbar-name { display: none; }
}

/* search toggle always visible, search bar always dropdown */

.topbar-location {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-location-icon {
  color: var(--accent-2);
  font-size: 0.9rem;
}

.topbar-location-text {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Sidebar (desktop only) ── */

.sidebar { display: none; }

@media (min-width: 800px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100px;
    padding: 16px 0;
    z-index: 11;
    background: var(--nav-bg);
    border-right: 1px solid var(--nav-border);
    gap: 4px;
  }

  .sidebar-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: 14px;
  border: none;
  background: none;
  color: var(--muted);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  width: 76px;
  position: relative;
}

.sidebar-item:hover { color: var(--ink); background: var(--act-hover); }

.sidebar-item.active[data-page="rated"] {
  color: var(--accent);
  background: rgba(232, 53, 111, 0.08);
}
.sidebar-item.active[data-page="rated"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.sidebar-item.active[data-page="saved"] {
  color: var(--accent-2);
  background: rgba(48, 201, 232, 0.08);
}
.sidebar-item.active[data-page="saved"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-2);
}
.sidebar-icon { display: flex; }
.sidebar-icon svg { width: 22px; height: 22px; }
.sidebar-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

/* ── Mobile bottom nav ── */

.mobile-nav { display: none; }

@media (max-width: 799px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 10;
    background: var(--nav-bg);
    border-top: 1px solid var(--nav-border);
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.15s ease;
    position: relative;
  }

  .mobile-nav-item.active[data-page="rated"] { color: var(--accent); }
  .mobile-nav-item.active[data-page="saved"] { color: var(--accent-2); }

  .mobile-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: currentColor;
  }

  .mobile-nav-icon { display: flex; }
  .mobile-nav-icon svg { width: 24px; height: 24px; }
  .mobile-nav-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
}

/* ── Page content area ── */

.page-content {
  padding: 72px 20px 20px;
  position: relative;
  z-index: 3;
}

@media (min-width: 800px) {
  .page-content { margin-left: 100px; padding: 76px 28px 40px; }
  .page-link, .pin-button, .hero { display: none; }
}

@media (max-width: 799px) {
  .page-content { padding-bottom: 72px; }
}

/* ── Rated grid ── */

.rated-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.rcard {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.4s ease-out both;
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.rcard:hover { border-color: var(--accent-2); }

.rcard-photo-wrap {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--photo-bg);
}

.rcard-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rcard-body { flex: 1; min-width: 0; }

.rcard-name {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.rcard-stars {
  color: #ffb930;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.rcard-comment {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 10px 0 0;
}

.rcard-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.rcard-drive {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(48, 201, 232, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.rcard-address {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Star filter ── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-3);
  min-width: 72px;
}

.filter-max {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-3);
}

.filter-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  max-width: 200px;
  height: 6px;
  border-radius: 999px;
  background: var(--card-border);
  outline: none;
  cursor: pointer;
}

.filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-3);
  border: 3px solid var(--bg-strong);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease;
}

.filter-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.filter-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-3);
  border: 3px solid var(--bg-strong);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ── Card actions ── */

.rcard-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.rcard-act {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  text-decoration: none;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.rcard-act:active { transform: scale(0.9); }

.rcard-act.open-map {
  background: rgba(48, 201, 232, 0.12);
  color: var(--accent-2);
}

.rcard-act.rate {
  background: rgba(255, 185, 48, 0.12);
  color: var(--accent-3);
}

.rcard-act.rcard-del {
  background: rgba(220, 53, 69, 0.08);
  color: var(--danger);
}

.rcard-act:hover { filter: brightness(1.2); }

.rcard-act-icon { display: flex; }
.rcard-act-icon svg { width: 16px; height: 16px; }
.rcard-act-label { display: none; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.pager-btn {
  min-width: 80px;
  text-align: center;
  border-radius: 10px;
  font-size: 0.85rem;
}

.pager-btn:not(:disabled):hover {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

.pager-info {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (min-width: 800px) {
  .rated-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .topbar {
    height: 56px;
    padding: 0 28px;
    left: 100px;
  }

  .topbar-actions { order: 0; }
  .topbar-location { order: 2; }

  .topbar-brand {
    order: 1;
    flex: 1;
    justify-content: center;
  }
  .topbar-brand .topbar-logo { display: none; }
  .topbar-name {
    display: inline;
    font-size: 1.3rem;
    white-space: nowrap;
  }

  .topbar-location-text { font-size: 0.9rem; }

  .rcard {
    flex-direction: column;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .rcard-photo-wrap { height: 160px; border-radius: 0; border-radius: 20px 20px 0 0; }
  .rcard-body { padding: 20px 24px 8px; }
  .rcard-actions { padding: 0 24px 16px; flex-direction: row; justify-content: flex-end; gap: 8px; }

  .rcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }

  .rcard-name { font-size: 1.2rem; }
  .rcard-stars { font-size: 1.1rem; }
  .rcard-comment { font-size: 0.92rem; }
  .rcard-drive { font-size: 0.8rem; }

  .page-content { padding-top: 76px; }
}

@media (min-width: 1200px) {
  .rated-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .rcard { padding: 28px 32px; }
  .rcard-name { font-size: 1.3rem; }
}

/* ── Mobile layout ── */

.mobile-hero {
  display: none;
}

@media (max-width: 799px) {
  .topbar {
    height: 56px;
    padding: 0 14px;
  }

  .topbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .topbar-logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 12px rgba(255, 50, 150, 0.5));
  }

  .topbar-name { display: none; }

  .topbar-location { order: -1; max-width: 110px; }
  .topbar-location-text { font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .rcard {
    flex-direction: column;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .rcard-name {
    font-size: 0.95rem;
    white-space: normal;
    word-wrap: break-word;
  }

  .rcard-stars { font-size: 0.85rem; letter-spacing: 1px; }

  .rcard-comment {
    font-size: 0.78rem;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .rcard-meta { margin-top: 6px; flex-wrap: wrap; gap: 6px; }
  .rcard-drive { font-size: 0.7rem; padding: 2px 8px; }

  .rcard-address {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rcard-actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
  }

  .rcard-act-icon { font-size: 0.8rem; }
  .rcard-act-label { font-size: 0.55rem; }

  .rcard { border-color: var(--card-border); }

  .sidebar-item.active, .mobile-nav-item.active { color: var(--accent); }

  .rated-grid { gap: 10px; }

  .page-content { padding: 66px 16px 62px; }

  .pager { margin-top: 16px; gap: 14px; }
  .pager-btn { padding: 6px 12px; font-size: 0.78rem; }
}

/* ── Suggestions banner ── */

.suggestions-banner {
  margin: 0 auto 16px;
  max-width: 700px;
  padding: 0 20px;
}

.suggestions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.suggestions-header .badge {
  background: #fff;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.suggestions-header .arrow {
  margin-left: auto;
  transition: transform 0.2s;
}

.suggestions-header.open .arrow {
  transform: rotate(180deg);
}

.suggestions-list {
  display: none;
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.suggestions-list.open {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
}

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

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.suggestion-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.suggestion-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.suggestion-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.suggestion-btn:hover { opacity: 0.85; }
.suggestion-btn.approve { background: var(--accent-2); color: #fff; }
.suggestion-btn.reject { background: var(--act-hover); color: var(--muted); }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 20px;
  z-index: 20;
}

.modal.active {
  display: flex;
}

.modal-card {
  background: var(--bg-strong);
  padding: 28px;
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
}

.rate-modal-card {
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--act-hover);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.modal-close:hover { color: var(--ink); background: var(--card-border); }

.modal-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
  margin: 12px 0;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@media (min-width: 680px) {
  .logo {
    width: 140px;
    height: 140px;
  }

  .hero {
    padding: 20px 20px 4px;
  }

  .layout {
    grid-template-columns: 340px 1fr;
  }

  .form-card {
    position: sticky;
    top: 76px;
    align-self: start;
  }

  .place-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 679px) {
  .card-head {
    flex-direction: column;
  }

  .place,
  .result {
    grid-template-columns: 1fr;
  }

  .place-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  body {
    line-height: 1.5;
  }

  .hero {
    padding: 32px 14px 6px;
  }

  h2 {
    font-size: 1.2rem;
  }

  .logo {
    width: 248px;
    height: 248px;
  }

  .layout {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  input {
    font-size: 16px;
  }

  .place-meta,
  .place-address,
  .result-address,
  .result-distance {
    font-size: 0.8rem;
  }

  .pill {
    font-size: 0.75rem;
  }
}

@supports (-webkit-touch-callout: none) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
