:root { --ink: #06283c; --soft: #164e63; --panel: #fff; --border: rgba(8,47,73,.25); --shadow: 0 14px 40px rgba(8,47,73,.18); }
* { box-sizing: border-box; }
html { min-height: 100%; background: #7dd3fc; }
body { min-height: 100vh; margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(145deg, #e0f7ff, #7dd3fc 55%, #38bdf8); }
button, a { font: inherit; }
.resto-shell { width: min(1100px, calc(100% - 24px)); margin: auto; padding: 24px 0 14px; }
.resto-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.resto-kicker { margin: 0 0 5px; color: #075985; font-size: .7rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.045em; }
.resto-actions { display: flex; gap: 7px; }
.resto-actions button, .resto-actions a, .locate-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 13px; border: 2px solid var(--border); border-radius: 999px; color: var(--ink); background: #fff; box-shadow: 0 3px 0 rgba(8,47,73,.15); font-weight: 850; text-decoration: none; cursor: pointer; }
.resto-actions button { width: 42px; padding: 0; }
.location-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 12px 15px; border: 2px solid #0891b2; border-radius: 17px; background: #cffafe; box-shadow: var(--shadow); }
.location-panel strong { font-size: .88rem; }
.location-panel p { margin: 3px 0 0; color: var(--soft); font-size: .7rem; }
.locate-button { flex: 0 0 auto; color: #fff; background: #0369a1; border-color: #075985; }
.locate-button:disabled { opacity: .65; cursor: wait; }
.resto-layout { display: grid; grid-template-columns: 1.45fr 1fr; gap: 12px; min-height: 610px; }
.map-panel, .results-panel { position: relative; overflow: hidden; border: 2px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
#map { width: 100%; height: 100%; min-height: 610px; }
.radius-label { position: absolute; z-index: 500; left: 10px; top: 10px; padding: 6px 9px; border: 2px solid #075985; border-radius: 999px; color: #fff; background: rgba(3,105,161,.92); font-size: .67rem; font-weight: 900; pointer-events: none; }
.results-panel { padding: 13px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.results-heading h2 { margin: 0; font-size: 1.1rem; }
.results-heading span { padding: 4px 7px; border-radius: 999px; color: #fff; background: #ea580c; font-size: .68rem; font-weight: 900; }
.restaurant-list { display: grid; gap: 8px; max-height: 550px; overflow-y: auto; }
.restaurant-card { padding: 11px; border: 2px solid #7dd3fc; border-radius: 14px; background: #f0f9ff; }
.restaurant-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.restaurant-card h3 { margin: 0; font-size: .87rem; }
.distance { flex: 0 0 auto; color: #c2410c; font-size: .7rem; font-weight: 950; }
.restaurant-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.restaurant-meta span { padding: 3px 6px; border-radius: 6px; color: #164e63; background: #dbeafe; font-size: .61rem; font-weight: 750; }
.restaurant-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.restaurant-links a { color: #075985; font-size: .62rem; font-weight: 900; }
.empty-state, .error-state { margin: 0; padding: 28px 16px; border-radius: 14px; color: var(--soft); background: #f0f9ff; font-size: .78rem; line-height: 1.5; text-align: center; }
.error-state { color: #991b1b; background: #fee2e2; }
.result-loading { min-height: 150px; border-radius: 14px; background: linear-gradient(90deg, #f0f9ff, #bae6fd, #f0f9ff); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
footer { padding-top: 9px; color: #164e63; font-size: .58rem; text-align: center; }
footer a { color: #075985; font-weight: 900; }
@keyframes shimmer { to { background-position: -220% 0; } }

html[data-theme="dark"] { --ink: #f8fafc; --soft: #bae6fd; --panel: #073b55; --border: rgba(255,255,255,.3); background: #031d2d; }
html[data-theme="dark"] body { background: linear-gradient(150deg, #075985, #082f49 58%, #031d2d); }
html[data-theme="dark"] .resto-kicker { color: #67e8f9; }
html[data-theme="dark"] .resto-actions button, html[data-theme="dark"] .resto-actions a { color: #fff; background: #073b55; }
html[data-theme="dark"] .location-panel { color: #fff; background: #075985; border-color: #67e8f9; }
html[data-theme="dark"] .location-panel p, html[data-theme="dark"] footer { color: #bae6fd; }
html[data-theme="dark"] footer a { color: #67e8f9; }
html[data-theme="dark"] .restaurant-card { color: #06283c; background: #f0f9ff; }

@media (max-width: 720px) {
  .resto-shell { width: calc(100% - 12px); padding-top: 8px; }
  .resto-header { gap: 8px; margin-bottom: 8px; }
  h1 { font-size: 1.35rem; }
  .resto-kicker { font-size: .56rem; }
  .resto-actions a span { display: none; }
  .resto-actions button, .resto-actions a { width: 34px; min-height: 34px; padding: 0; }
  .location-panel { gap: 7px; margin-bottom: 7px; padding: 8px 10px; border-radius: 14px; }
  .location-panel strong { font-size: .73rem; }
  .location-panel p { font-size: .58rem; }
  .locate-button { min-height: 34px; padding: 6px 8px; font-size: .64rem; }
  .resto-layout { grid-template-columns: 1fr; gap: 7px; min-height: 0; }
  .map-panel, .results-panel { border-radius: 15px; }
  #map { height: 43dvh; min-height: 250px; }
  .results-panel { padding: 9px; }
  .restaurant-list { max-height: none; overflow: visible; }
}

/* Finition UX */
html { scroll-behavior: smooth; }
body { line-height: 1.45; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
.restaurant-card { cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.restaurant-card:hover { border-color: #0284c7; box-shadow: 0 7px 20px rgba(8,47,73,.14); transform: translateY(-2px); }
.restaurant-links a { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 7px; border-radius: 7px; background: #dbeafe; text-decoration: none; }
.restaurant-links a:hover { background: #bae6fd; text-decoration: underline; }
.leaflet-control-zoom a { width: 34px !important; height: 34px !important; line-height: 34px !important; }

@media (min-width: 721px) {
  .resto-layout { min-height: min(680px, calc(100dvh - 150px)); }
  #map { min-height: min(680px, calc(100dvh - 150px)); }
  .restaurant-list { max-height: min(620px, calc(100dvh - 210px)); scrollbar-color: #38bdf8 transparent; scrollbar-width: thin; }
}

@media (max-width: 720px) {
  .resto-header { position: sticky; z-index: 1001; top: 0; margin-inline: -2px; padding: 7px 2px; background: rgba(224,247,255,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  html[data-theme="dark"] .resto-header { background: rgba(3,29,45,.94); }
  .resto-actions button, .resto-actions a { width: 42px; min-height: 42px; }
  .locate-button { min-height: 42px; }
  .location-panel { position: relative; z-index: 2; }
  #map { height: 40dvh; min-height: 270px; }
  .restaurant-card { padding: 12px; }
  .restaurant-card h3 { font-size: .92rem; }
  .distance { font-size: .75rem; }
  .restaurant-meta span { font-size: .67rem; line-height: 1.35; }
  footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .location-panel { align-items: stretch; flex-direction: column; }
  .locate-button { width: 100%; }
  #map { height: 38dvh; min-height: 245px; }
}

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

@media (max-width: 720px) {
  .resto-shell { width: calc(100% - 18px); padding-top: 12px; }
  .resto-header h1 { font-size: 1.7rem; }
  .resto-kicker { font-size: .67rem; }
  .location-panel { padding: 12px; }
  .location-panel strong { font-size: .88rem; }
  .location-panel p { font-size: .72rem; line-height: 1.4; }
  .locate-button { padding: 8px 12px; font-size: .75rem; }
  #map { height: 46dvh; min-height: 310px; }
  .results-heading h2 { font-size: 1.25rem; }
  .results-heading span { font-size: .75rem; }
  .restaurant-list { gap: 10px; }
  .restaurant-card { padding: 15px; }
  .restaurant-card h3 { font-size: 1.02rem; }
  .distance { font-size: .82rem; }
  .restaurant-meta { gap: 7px; margin-top: 9px; }
  .restaurant-meta span { padding: 5px 7px; font-size: .74rem; }
  .restaurant-links { gap: 7px; margin-top: 9px; }
  .restaurant-links a { min-height: 38px; font-size: .72rem; }
  footer { font-size: .68rem; line-height: 1.5; }
}
