/* ==========================================================================
   FindMyDish – design system
   ========================================================================== */

:root {
  --yellow: #FFD400;
  --yellow-600: #EBC200;
  --yellow-50: #FFF8D1;
  --ink: #14161A;
  --ink-2: #353A42;
  --muted: #6B7280;
  --line: #E8E5DC;
  --bg: #FAF8F3;
  --card: #FFFFFF;
  --green: #15803D;
  --green-50: #E7F6EC;
  --red: #C81E1E;
  --red-50: #FDECEC;
  --blue: #2563EB;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .06), 0 1px 3px rgba(20, 22, 26, .05);
  --shadow: 0 6px 24px rgba(20, 22, 26, .08);
  --shadow-lg: 0 18px 50px rgba(20, 22, 26, .16);
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid rgba(37, 99, 235, .55); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 28px; height: 28px; }
.i-star { color: #F59E0B; }

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.brand b { background: var(--yellow); padding: 0 4px; border-radius: 6px; margin: 0 1px; font-weight: 800; }
.logo-mark { width: 34px; height: 34px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn), .nav-user {
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2);
  padding: 8px 12px; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-links a:not(.btn):hover { background: #F1EEE5; color: var(--ink); }
.nav-links a.active { color: var(--ink); background: var(--yellow-50); }
.nav-auth { display: inline-flex; align-items: center; gap: 6px; min-width: 1px; }
.nav-user { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; }
.nav-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; border-radius: 10px; }
.nav-toggle:hover { background: #F1EEE5; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 16px;
    box-shadow: var(--shadow); display: none;
  }
  .site-header.nav-open .nav-links { display: flex; }
  .nav-auth { flex-direction: column; align-items: stretch; }
  .nav-links .btn { width: 100%; }
  .nav-user { max-width: none; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none; line-height: 1.2;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 0 rgba(20,22,26,.12); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: #F1EEE5; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #A01818; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 16px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.field .req { color: var(--red); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 96px; }
.input:hover { border-color: #D4D0C4; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 212, 0, .35); }
.input.invalid { border-color: var(--red); }
.hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--red); min-height: 0; }
.field-error:empty { display: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.form-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; margin-bottom: 16px;
}
.form-alert.error { background: var(--red-50); color: #8E1515; }
.form-alert.success { background: var(--green-50); color: var(--green); }
.form-alert.info { background: var(--yellow-50); color: #6B5600; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; color: #fff; isolation: isolate;
  background: #14161A url("/img/hero.png") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,22,26,.78) 0%, rgba(20,22,26,.72) 55%, rgba(20,22,26,.9) 100%);
}
.hero-inner { padding: 72px 24px 64px; max-width: 820px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { margin: 18px auto 0; max-width: 560px; font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.82); }

.search-card {
  margin: 32px auto 0; background: #fff; color: var(--ink); border-radius: 18px;
  padding: 8px; display: flex; gap: 8px; box-shadow: var(--shadow-lg); max-width: 680px;
}
.search-card .search-field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; }
.search-card .i { color: var(--muted); }
.search-card input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 14px 0; }
.search-card input::placeholder { color: #9AA0A9; }
.search-card .clear { background: none; border: 0; padding: 6px; border-radius: 50%; display: none; }
.search-card .clear.show { display: inline-flex; }
.search-card .clear:hover { background: #F1EEE5; }

.loc-line {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,.85);
}
.loc-line .here { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #fff; }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--yellow); font-weight: 700; font-size: inherit;
  text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px;
}
.link-btn:hover { color: #fff; }
.link-btn.dark { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08); color: #fff; font-size: 14px; font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: rgba(255,255,255,.2); }
.chip.active { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.chips.light .chip { color: var(--ink); border-color: var(--line); background: #fff; }
.chips.light .chip:hover { background: #F1EEE5; }
.chips.light .chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------- explore */

.explore { padding: 36px 0 64px; }
.explore-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.explore-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.explore-head p { margin-top: 6px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none; padding: 10px 38px 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.select-wrap select:hover { border-color: #D4D0C4; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.toolbar .spacer { flex: 1; }
.view-toggle { display: none; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; }
.view-toggle button { background: none; border: 0; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.view-toggle button.active { background: var(--ink); color: #fff; }

.explore-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.map-panel { position: sticky; top: calc(var(--header-h) + 16px); }
#map {
  height: calc(100vh - var(--header-h) - 48px); min-height: 420px; max-height: 760px;
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #E9E6DC;
  box-shadow: var(--shadow-sm); z-index: 1;
}
.map-fallback { display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); height: 100%; }

@media (max-width: 960px) {
  .explore-grid { grid-template-columns: 1fr; }
  .view-toggle { display: inline-flex; }
  .map-panel { position: static; display: none; }
  .explore-grid.show-map .map-panel { display: block; }
  .explore-grid.show-map .results-col { display: none; }
  #map { height: 62vh; min-height: 360px; }
}

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.cards.single { grid-template-columns: 1fr; }

.dish-card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.dish-card:hover, .dish-card.hl { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #DAD5C6; }
.dish-card.hl { outline: 3px solid var(--yellow); }
.dish-card .thumb { position: relative; aspect-ratio: 4 / 3; background: #EEEBE0; overflow: hidden; }
.dish-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dish-card:hover .thumb img { transform: scale(1.04); }
.badge {
  position: absolute; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.95); box-shadow: var(--shadow-sm);
}
.badge.tl { top: 10px; left: 10px; }
.badge.tr { top: 10px; right: 10px; background: var(--ink); color: #fff; }
.dish-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dish-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.dish-card .rest { font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.dish-card .addr { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.dish-card .addr span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dish-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; gap: 8px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--yellow-50); color: #6B5600; font-size: 12px; font-weight: 700; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.rating b { font-weight: 700; }
.rating-none { color: var(--muted); font-weight: 600; font-size: 13px; }

.state {
  text-align: center; padding: 56px 24px; background: #fff; border: 1px dashed #D8D3C4;
  border-radius: var(--radius); color: var(--muted);
}
.state .i-lg { margin: 0 auto 12px; color: #B8B2A0; width: 40px; height: 40px; }
.state h3 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }
.state .btn { margin-top: 16px; }

.skeleton { background: linear-gradient(100deg, #EEEBE0 30%, #F6F3EA 50%, #EEEBE0 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.sk-card .sk-img { aspect-ratio: 4/3; }
.sk-card .sk-body { padding: 16px; display: grid; gap: 10px; }
.sk-line { height: 14px; }

.more-wrap { text-align: center; margin-top: 24px; }

/* custom map pins */
.pin { background: none; border: 0; }
.pin span {
  display: inline-block; transform: translate(-50%, -100%); background: var(--ink); color: #fff;
  font: 700 12.5px/1 var(--font); padding: 7px 10px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.35); border: 2px solid #fff; position: relative;
}
.pin span::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: inherit;
  transform: translateX(-50%) rotate(45deg); border-right: 2px solid #fff; border-bottom: 2px solid #fff;
}
.pin.active span { background: var(--yellow); color: var(--ink); z-index: 999; }
.me-dot { width: 18px; height: 18px; background: var(--blue); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }
.pop-title { font-weight: 800; font-size: 15px; }
.pop a { font-weight: 700; color: var(--blue); }
.leaflet-container { font-family: var(--font); }

/* ------------------------------------------------------- landing blocks */

.section { padding: 64px 0; }
.section h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 560px; margin: 10px auto 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step .num {
  width: 42px; height: 42px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center;
  font-weight: 800; margin-bottom: 16px;
}
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

.cta {
  background: var(--ink); color: #fff; border-radius: 24px; padding: 48px; display: flex; gap: 24px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; background: var(--yellow); opacity: .12; border-radius: 50%; }
.cta h2 { text-align: left; font-size: clamp(24px, 3vw, 34px); }
.cta p { color: rgba(255,255,255,.75); margin-top: 8px; max-width: 520px; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.1); }
@media (max-width: 640px) { .cta { padding: 32px 24px; } }

/* -------------------------------------------------------------- footer */

.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: auto; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding-top: 40px; padding-bottom: 32px; }
.foot p { margin-top: 10px; max-width: 360px; }
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-links a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px !important; max-width: none !important; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- auth + forms */

.page-narrow { padding: 48px 0 72px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px;
  box-shadow: var(--shadow-sm);
}
.panel h1 { font-size: 28px; font-weight: 800; }
.panel .sub { margin: 8px 0 26px; color: var(--muted); }
.auth { max-width: 460px; margin: 0 auto; }
.auth .alt { margin-top: 20px; text-align: center; font-size: 15px; color: var(--muted); }
.auth .alt a { color: var(--ink); font-weight: 700; }
.auth .forgot { text-align: right; margin: -8px 0 18px; font-size: 14px; }
.auth .forgot button { background: none; border: 0; padding: 0; color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) { .panel { padding: 24px 20px; border-radius: 16px; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; font-weight: 700; transition: border-color .15s, background .15s;
}
.seg label small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span, .seg label:has(input:checked) { border-color: var(--ink); background: var(--yellow-50); }
.seg label:has(input:focus-visible) { outline: 3px solid rgba(37,99,235,.55); outline-offset: 2px; }

.pw { position: relative; }
.pw .input { padding-right: 70px; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-weight: 700; font-size: 13px; padding: 6px 8px; color: var(--ink-2); border-radius: 8px; }
.pw button:hover { background: #F1EEE5; }

.add-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .add-grid { grid-template-columns: 1fr; } }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 8px; }

#pickMap { height: 300px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: #E9E6DC; z-index: 1; }
.loc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.loc-status { font-size: 14px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #F4F1E8; margin-top: 10px; }
.loc-status.ok { background: var(--green-50); color: var(--green); }
.loc-status.bad { background: var(--red-50); color: #8E1515; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px;
  border: 2px dashed #CFC9B8; border-radius: 14px; background: #FBFAF6; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--ink); background: var(--yellow-50); }
.drop .i { width: 30px; height: 30px; color: var(--muted); }
.drop strong { font-size: 15px; }
.previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #EEEBE0; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(20,22,26,.8); color: #fff; display: grid; place-items: center;
}
.preview .first { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; background: var(--yellow); padding: 2px 8px; border-radius: 999px; }
.sticky-submit { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(250,248,243,0), var(--bg) 40%); padding: 20px 0 8px; }

.gate { text-align: center; max-width: 520px; margin: 0 auto; }
.gate .i-lg { width: 44px; height: 44px; color: var(--ink); margin: 0 auto 12px; }
.gate .actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ----------------------------------------------------------- dish page */

.crumbs { padding: 22px 0 14px; font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--ink); }
.dish-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; padding-bottom: 56px; align-items: start; }
@media (max-width: 900px) { .dish-layout { grid-template-columns: 1fr; gap: 24px; } }
.gallery .main { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #EEEBE0; border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery .thumbs button { width: 84px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2.5px solid transparent; padding: 0; background: #EEEBE0; opacity: .75; }
.gallery .thumbs button.active { border-color: var(--yellow); opacity: 1; box-shadow: 0 0 0 1.5px var(--ink); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

.dish-info h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.dish-info .rest-line { margin-top: 8px; font-size: 18px; font-weight: 600; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.price-big { font-size: 34px; font-weight: 800; margin: 18px 0; letter-spacing: -.03em; }
.facts { display: grid; gap: 12px; margin: 18px 0 24px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.fact { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.fact .i { margin-top: 2px; color: var(--muted); }
.fact b { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.about { margin-top: 24px; }
.about h2, .reviews-sec h2 { font-size: 20px; margin-bottom: 8px; }
.about p { color: var(--ink-2); white-space: pre-line; }
#miniMap { height: 220px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin-top: 24px; background: #E9E6DC; z-index: 1; }

.reviews-sec { padding: 8px 0 72px; border-top: 1px solid var(--line); padding-top: 40px; }
.rev-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.rev-summary { display: flex; align-items: center; gap: 10px; }
.rev-summary .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.review .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review .who { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.review .stars { display: inline-flex; }
.review .stars .s { color: #D5D0C2; display: inline-flex; }
.review .stars .s.on { color: #F59E0B; }
.review p { color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.review .when { font-size: 13px; color: var(--muted); }
.review .rev-actions { margin-top: 10px; display: flex; gap: 8px; }

.star-input { display: inline-flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: #D5D0C2; transition: color .1s, transform .1s; display: inline-flex; }
.star-input label .i { width: 34px; height: 34px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #F59E0B; }
.star-input label:hover { transform: scale(1.1); }
.star-input input:focus-visible + label { outline: 3px solid rgba(37,99,235,.55); border-radius: 6px; }

/* --------------------------------------------------- my dishes + admin */

.list-rows { display: grid; gap: 12px; }
.row-card { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.row-card img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex: none; background: #EEEBE0; }
.row-card .info { flex: 1; min-width: 0; }
.row-card .info h3 { font-size: 17px; font-weight: 800; }
.row-card .info p { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-card .info a { text-decoration: none; }
.row-card .info a:hover h3 { text-decoration: underline; }
.row-card .acts { display: flex; gap: 8px; flex: none; }
@media (max-width: 640px) {
  .row-card { flex-wrap: wrap; }
  .row-card .acts { width: 100%; }
  .row-card .acts .btn { flex: 1; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.stat b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-bar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-bar .input { max-width: 420px; }

/* ------------------------------------------------------------ dialogs */

.dialog {
  border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink);
}
.dialog::backdrop { background: rgba(20, 22, 26, .55); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-sm { width: min(420px, calc(100vw - 32px)); }
.dialog-body { padding: 28px; }
.dialog-body > h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.dialog-body > .muted { margin-bottom: 18px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.dialog-x { position: absolute; top: 14px; right: 14px; background: none; border: 0; padding: 6px; border-radius: 50%; }
.dialog-x:hover { background: #F1EEE5; }
.loc-results { display: grid; gap: 6px; margin-top: 12px; max-height: 260px; overflow: auto; }
.loc-results button {
  text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px;
}
.loc-results button:hover { border-color: var(--ink); background: var(--yellow-50); }
.loc-results .i { margin-top: 2px; color: var(--muted); }

/* ------------------------------------------------------------- toasts */

#toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #fff;
  font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast-success .i { color: #4ADE80; }
.toast-error { background: #7F1D1D; }
.toast-error .i { color: #FCA5A5; }

/* ---------------------------------------------------------------- 404 */

.nf { text-align: center; padding: 96px 0; }
.nf .big { font-size: clamp(80px, 18vw, 160px); font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.nf .big span { color: var(--yellow-600); }
.nf p { margin: 12px 0 26px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 640px) {
  .toolbar .select-wrap { flex: 1 1 calc(50% - 10px); }
  .toolbar .select-wrap select { width: 100%; }
  .toolbar .spacer { display: none; }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; justify-content: center; }
}
