/* Restaurants and Food (assets/sections/nearby.mjs). Uses the site's colour tokens, so evening mode works. */
.near-root { container-type: inline-size; }
.near [hidden] { display: none !important; }
.near { color: var(--ink, #1e2a2f); background: var(--surface, #fffdf9); border-radius: 22px; padding: clamp(16px, 3vw, 26px); box-shadow: var(--shadow); }
.near-bar { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.near-kicker { margin: 0 0 4px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #2f7a74); }
.near h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.15; }
.near-lead { margin: 6px 0 0; color: var(--ink-2, #34454c); font-size: 17px; }
.near button, .near input, .near a { font: inherit; }
.near-actions, .near-chips, .near-hits, .near-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.near-actions button, .near-chips button, .near-hits button, .near-card-actions button, .near-card-actions a, .near-maptoggle, .near-retry button, .near-empty button {
  min-height: 44px; border: 1px solid var(--line, #e6e0d5); background: var(--surface-2, #f9f6f0); color: var(--ink, #1e2a2f);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.near-actions button:first-child { background: var(--accent, #2f7a74); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .near-actions button:first-child { color: #0f191d; }
.near-actions button:disabled { opacity: .7; cursor: progress; }
.near-chips button[aria-pressed="true"], .near-maptoggle[aria-pressed="true"] { background: var(--accent, #2f7a74); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .near-chips button[aria-pressed="true"], :root[data-theme="dark"] .near-maptoggle[aria-pressed="true"] { color: #0f191d; }
.near-card-actions button[aria-pressed="true"] { background: var(--accent-soft, #dcebe7); color: var(--accent-2, #25635e); }
.near-search { margin: 14px 0 0; }
.near-search input { width: 100%; box-sizing: border-box; min-height: 48px; border: 1px solid var(--line-2, #d9d2c5); background: var(--surface, #fff); color: var(--ink, #1e2a2f); border-radius: 14px; padding: 12px 14px; font-size: 17px; }
.near-hits { margin-top: 10px; }
.near-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.near-tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }
.near-status { margin-top: 10px; }
.near-count, .near-wait { margin: 0; color: var(--ink-2, #34454c); font-size: 16px; }
.near-wait { display: flex; align-items: center; gap: 10px; }
.near-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent-soft, #dcebe7); border-top-color: var(--accent, #2f7a74); animation: near-spin 1s linear infinite; }
@keyframes near-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .near-spin { animation: none; } }
.near-retry { background: var(--warm-soft, #fbeee5); border-radius: 16px; padding: 14px 16px; }
.near-retry p { margin: 0 0 8px; }
.near-retry-count { color: var(--ink-2, #34454c); font-size: 15px; }
.near-layout { display: grid; gap: 16px; margin-top: 14px; }
.near-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-content: start; }
.near-map { order: -1; border-radius: 18px; overflow: hidden; border: 1px solid var(--line, #e6e0d5); background: var(--bg-2, #eef3ef); }
.near-map-canvas { width: 100%; height: min(60vh, 420px); }
@container (min-width: 760px) {
  .near-layout.has-map { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .near-layout.has-map .near-map { order: 1; position: sticky; top: 90px; }
  .near-layout.has-map .near-map-canvas { height: min(74vh, 640px); }
  .near-layout.has-map .near-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
.near-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface-2, #f9f6f0); border: 1px solid var(--line, #e6e0d5); border-radius: 18px; transition: box-shadow .2s; }
.near-card.is-picked { box-shadow: 0 0 0 3px var(--warm, #e0915f); }
.near-art { position: relative; margin: 0; aspect-ratio: 16 / 10; background: var(--accent-soft, #dcebe7); overflow: hidden; }
.near-art.is-plain { aspect-ratio: auto; min-height: 44px; background: none; }
.near-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.near-art:not(.is-own) .near-photo { filter: saturate(.92); }
.near-num { position: absolute; top: 10px; left: 10px; min-width: 30px; height: 30px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--accent, #2f7a74); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.near-art.is-plain .near-num { position: static; margin: 12px 0 0 14px; }
.near-art figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; font-size: 12.5px; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.near-art figcaption a { color: #fff; text-decoration: underline; }
.near-art figcaption b { display: block; font-weight: 600; }
.near-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.near h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.near-facts { margin: 0; color: var(--ink-2, #34454c); font-size: 16px; }
.near-open { margin: 0; font-size: 16px; font-weight: 600; }
.near-open.is-open { color: #1f7a45; }
.near-open.is-closed { color: #9a4a2c; }
:root[data-theme="dark"] .near-open.is-open { color: #7fd6a0; }
:root[data-theme="dark"] .near-open.is-closed { color: #f0ad86; }
.near-hours-raw { margin: 0; font-size: 15px; color: var(--ink-2, #34454c); }
.near-card-actions { margin-top: auto; padding-top: 6px; }
.near-card-actions button, .near-card-actions a { min-height: 44px; padding: 8px 14px; font-size: 15.5px; }
.near-detail { margin-top: 8px; display: grid; gap: 6px; font-size: 16px; }
.near-detail p { margin: 0; }
.near-detail span { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7c82); }
.near-detail a, .near-note a { color: var(--accent-2, #25635e); }
.near-osm { font-size: 14.5px; }
.near-skel { height: 300px; border-radius: 18px; background: linear-gradient(100deg, var(--surface-2, #f3efe8) 40%, var(--bg-2, #eef3ef) 50%, var(--surface-2, #f3efe8) 60%); background-size: 200% 100%; animation: near-sk 1.4s linear infinite; }
@keyframes near-sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .near-skel { animation: none; } }
.near-empty { margin: 0; font-size: 17px; }
.near-note { font-size: 14.5px; color: var(--ink-2, #34454c); margin: 16px 0 0; }
@media (max-width: 520px) {
  .near-lead { display: none; }
  .near-tools { display: block; }
  .near-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .near-chips::-webkit-scrollbar { display: none; }
  .near-chips button { flex: none; }
  .near-maptoggle { margin-top: 10px; }
  .near-actions { width: 100%; }
  .near-actions button { flex: 1 1 auto; justify-content: center; }
  .near-grid { grid-template-columns: 1fr; }
  .near-maptoggle { width: 100%; justify-content: center; }
}
